summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2016-09-19 23:57:39 -0400
committerRusty Wagner <rusty@vector35.com>2016-09-19 23:57:39 -0400
commit91c9990b0f51864f60e71d4004cfb2eb75154eb8 (patch)
treef82f2bdb9a4e6253c98797347b918634834184dc /binaryninjacore.h
parent1364a9bc7b3887441540cd27685c1addb028afb3 (diff)
Add API for showing a message box in the UI
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 084fd34d..6339b1c3 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -1050,6 +1050,29 @@ extern "C"
uint8_t mix, r, g, b, alpha;
};
+ enum BNMessageBoxIcon
+ {
+ InformationIcon,
+ QuestionIcon,
+ WarningIcon,
+ ErrorIcon
+ };
+
+ enum BNMessageBoxButtonSet
+ {
+ OKButtonSet,
+ YesNoButtonSet,
+ YesNoCancelButtonSet
+ };
+
+ enum BNMessageBoxButtonResult
+ {
+ NoButton = 0,
+ YesButton = 1,
+ OKButton = 2,
+ CancelButton = 3
+ };
+
struct BNInteractionHandlerCallbacks
{
void* context;
@@ -1068,6 +1091,8 @@ extern "C"
bool (*getSaveFileNameInput)(void* ctxt, char** result, const char* prompt, const char* ext,
const char* defaultName);
bool (*getDirectoryNameInput)(void* ctxt, char** result, const char* prompt, const char* defaultName);
+ BNMessageBoxButtonResult (*showMessageBox)(void* ctxt, const char* title, const char* text,
+ BNMessageBoxButtonSet buttons, BNMessageBoxIcon icon);
};
struct BNObjectDestructionCallbacks
@@ -2082,6 +2107,8 @@ extern "C"
BINARYNINJACOREAPI bool BNGetSaveFileNameInput(char** result, const char* prompt, const char* ext,
const char* defaultName);
BINARYNINJACOREAPI bool BNGetDirectoryNameInput(char** result, const char* prompt, const char* defaultName);
+ BINARYNINJACOREAPI BNMessageBoxButtonResult BNShowMessageBox(const char* title, const char* text,
+ BNMessageBoxButtonSet buttons, BNMessageBoxIcon icon);
#ifdef __cplusplus
}