summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-10-21 18:27:06 +0800
committerXusheng <xusheng@vector35.com>2021-10-28 15:08:53 +0800
commit927390bc14ccd6739a62c2a291e50a4a3ce4d0b0 (patch)
treea628e18289034040005afd0a5c450fd8bea99e0f /binaryview.cpp
parentc6f170d1541c53a5b2a9821b31f77612d0b8559f (diff)
Smartly update the TypeView
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index d7040cea..749368dc 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -225,6 +225,15 @@ void BinaryDataNotification::TypeReferenceChangedCallback(void* ctxt, BNBinaryVi
}
+void BinaryDataNotification::TypeFieldReferenceChangedCallback(void* ctxt, BNBinaryView* data, BNQualifiedName* name, uint64_t offset)
+{
+ BinaryDataNotification* notify = (BinaryDataNotification*)ctxt;
+ Ref<BinaryView> view = new BinaryView(BNNewViewReference(data));
+ notify->OnTypeFieldReferenceChanged(view, QualifiedName::FromAPIObject(name), offset);
+}
+
+
+
BinaryDataNotification::BinaryDataNotification()
{
m_callbacks.context = this;
@@ -251,6 +260,7 @@ BinaryDataNotification::BinaryDataNotification()
m_callbacks.typeDefined = TypeDefinedCallback;
m_callbacks.typeUndefined = TypeUndefinedCallback;
m_callbacks.typeReferenceChanged = TypeReferenceChangedCallback;
+ m_callbacks.typeFieldReferenceChanged = TypeFieldReferenceChangedCallback;
}