diff options
Diffstat (limited to 'interaction.cpp')
| -rw-r--r-- | interaction.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/interaction.cpp b/interaction.cpp index 05420f17..2f808067 100644 --- a/interaction.cpp +++ b/interaction.cpp @@ -415,6 +415,13 @@ static BNMessageBoxButtonResult ShowMessageBoxCallback(void* ctxt, const char* t } +static bool OpenUrlCallback(void* ctxt, const char* url) +{ + InteractionHandler* handler = (InteractionHandler*)ctxt; + return handler->OpenUrl(url); +} + + void BinaryNinja::RegisterInteractionHandler(InteractionHandler* handler) { BNInteractionHandlerCallbacks cb; @@ -433,6 +440,7 @@ void BinaryNinja::RegisterInteractionHandler(InteractionHandler* handler) cb.getDirectoryNameInput = GetDirectoryNameInputCallback; cb.getFormInput = GetFormInputCallback; cb.showMessageBox = ShowMessageBoxCallback; + cb.openUrl = OpenUrlCallback; BNRegisterInteractionHandler(&cb); } @@ -660,6 +668,12 @@ BNMessageBoxButtonResult BinaryNinja::ShowMessageBox(const string& title, const } +bool BinaryNinja::OpenUrl(const std::string& url) +{ + return BNOpenUrl(url.c_str()); +} + + ReportCollection::ReportCollection() { m_object = BNCreateReportCollection(); |
