From 927390bc14ccd6739a62c2a291e50a4a3ce4d0b0 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Thu, 21 Oct 2021 18:27:06 +0800 Subject: Smartly update the TypeView --- binaryview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'binaryview.cpp') 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 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; } -- cgit v1.3.1