summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2022-06-19 09:25:37 -0400
committerPeter LaFosse <peter@vector35.com>2022-06-19 09:25:37 -0400
commit5685e3f423dc93b33d3a89ca5d8438bdf2cddfbe (patch)
tree63af062ee6575ab5a14a5a2266667fb09abc6d86
parentb512f7eea44b8cf0e4f9756dbd1dd9fe285646d2 (diff)
Add support for toggling integer size/sign in typesview
-rw-r--r--ui/typeview.h13
-rw-r--r--ui/uitypes.h4
2 files changed, 13 insertions, 4 deletions
diff --git a/ui/typeview.h b/ui/typeview.h
index 834cb7d8..082da83f 100644
--- a/ui/typeview.h
+++ b/ui/typeview.h
@@ -78,6 +78,13 @@ class BINARYNINJAUIAPI TypeViewHistoryEntry : public HistoryEntry
class TypesContainer;
+enum ModifyExistingMember
+{
+ DontModify,
+ ToggleSize,
+ ToggleSign
+};
+
class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, public BinaryNinja::BinaryDataNotification
{
Q_OBJECT
@@ -145,9 +152,9 @@ class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, publi
void ensureCursorVisible();
void focusOnCursor();
- void changeToSpecificType(TypeRef type);
+ void changeToSpecificType(TypeRef type, ModifyExistingMember modifyExisting = DontModify);
bool canCreateMembersInSelectedRegion();
- void createMembersInSelectedRegion(TypeRef type);
+ void createMembersInSelectedRegion(TypeRef type, ModifyExistingMember modifyExisting = DontModify);
void deleteMembersInSelectedRegion();
void moveUp(bool selecting);
@@ -263,6 +270,8 @@ class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, publi
void defineName();
void undefine();
void changeType();
+ void toggleIntSize();
+ void toggleIntSign();
void makeInt8();
void makeInt16();
void makeInt32();
diff --git a/ui/uitypes.h b/ui/uitypes.h
index 62111001..f16a84eb 100644
--- a/ui/uitypes.h
+++ b/ui/uitypes.h
@@ -6,14 +6,14 @@
// 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
+#define BN_CURRENT_UI_ABI_VERSION 5
// 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
+#define BN_MINIMUM_UI_ABI_VERSION 5
#ifdef __GNUC__
#ifdef BINARYNINJAUI_LIBRARY