#pragma once #include "binaryninjaapi.h" // Current ABI version for linking to the UI API. This is incremented any time // there are changes to the API that affect linking, including new functions, // new types, modifications to existing functions or types, or new versions // of the Qt libraries. #define BN_CURRENT_UI_ABI_VERSION 4 // Minimum ABI version that is supported for loading of plugins. Plugins that // are linked to an ABI version less than this will not be able to load and // will require rebuilding. The minimum version is increased when there are // incompatible changes that break binary compatibility, such as changes to // existing types or functions, or a new version of Qt. #define BN_MINIMUM_UI_ABI_VERSION 4 #ifdef __GNUC__ # ifdef BINARYNINJAUI_LIBRARY # define BINARYNINJAUIAPI __attribute__((visibility("default"))) # else # define BINARYNINJAUIAPI # endif #else #ifdef _MSC_VER # ifndef DEMO_VERSION # ifdef BINARYNINJAUI_LIBRARY # define BINARYNINJAUIAPI __declspec(dllexport) # else # define BINARYNINJAUIAPI __declspec(dllimport) # endif # else # define BINARYNINJAUIAPI # endif #else #define BINARYNINJAUIAPI #endif #endif #ifdef BINARYNINJAUI_PYTHON_BINDINGS #include "bindings.h" #endif // The BN_DECLARE_UI_ABI_VERSION must be included in native UI plugin modules. If // the ABI version is not declared, the UI will not load the plugin. #ifdef DEMO_VERSION #define BN_DECLARE_UI_ABI_VERSION #else #define BN_DECLARE_UI_ABI_VERSION \ extern "C" \ { \ BINARYNINJAPLUGIN uint32_t UIPluginABIVersion() \ { \ return BN_CURRENT_UI_ABI_VERSION; \ } \ } #endif // The Python bindings generator does not recognize automatic conversion of API types into their // Python equivalents if using templates (Ref<*>), so we typedef all API references so that // the Python bindings can be easily generated for them. typedef BinaryNinja::Ref ArchitectureRef; typedef BinaryNinja::Ref BackgroundTaskRef; typedef BinaryNinja::Ref BasicBlockRef; typedef BinaryNinja::Ref BinaryDataRef; typedef BinaryNinja::Ref BinaryViewRef; typedef BinaryNinja::Ref BinaryViewTypeRef; typedef BinaryNinja::Ref DatabaseRef; typedef BinaryNinja::Ref DisassemblySettingsRef; typedef BinaryNinja::Ref DownloadInstanceRef; typedef BinaryNinja::Ref DownloadProviderRef; typedef BinaryNinja::Ref EnumerationRef; typedef BinaryNinja::Ref FileMetadataRef; typedef BinaryNinja::Ref FlowGraphRef; typedef BinaryNinja::Ref FlowGraphLayoutRequestRef; typedef BinaryNinja::Ref FlowGraphNodeRef; typedef BinaryNinja::Ref FunctionRef; typedef BinaryNinja::Ref KeyValueStoreRef; typedef BinaryNinja::Ref LowLevelILFunctionRef; typedef BinaryNinja::Ref MainThreadActionRef; typedef BinaryNinja::Ref MediumLevelILFunctionRef; typedef BinaryNinja::Ref HighLevelILFunctionRef; typedef BinaryNinja::Ref PlatformRef; typedef BinaryNinja::Ref ReportCollectionRef; typedef BinaryNinja::Ref SaveSettingsRef; typedef BinaryNinja::Ref ScriptingInstanceRef; typedef BinaryNinja::Ref ScriptingProviderRef; typedef BinaryNinja::Ref SectionRef; typedef BinaryNinja::Ref SegmentRef; typedef BinaryNinja::Ref SettingsRef; typedef BinaryNinja::Ref SnapshotRef; typedef BinaryNinja::Ref StructureRef; typedef BinaryNinja::Ref SymbolRef; typedef BinaryNinja::Ref TagRef; typedef BinaryNinja::Ref TagTypeRef; typedef BinaryNinja::Ref TemporaryFileRef; typedef BinaryNinja::Ref TransformRef; typedef BinaryNinja::Ref TypeRef; typedef BinaryNinja::Ref WebsocketClientRef; typedef BinaryNinja::Ref WebsocketProviderRef; typedef BinaryNinja::Ref RepoPluginRef; typedef BinaryNinja::Ref RepositoryRef; typedef BinaryNinja::Ref RepositoryManagerRef;