diff options
| author | Mark Rowe <mark@vector35.com> | 2026-04-13 13:07:09 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-04-22 15:20:52 -0700 |
| commit | aa8dab21d44b4e0dd863f0867c7e735cfb878a4d (patch) | |
| tree | 256ca89364716afed1735521106130571b0fdb9b /binaryninjaapi.h | |
| parent | 84d66dc7e6244e6ef78ebb3a2aa24b57a6ed4345 (diff) | |
Always show the triage view when opening a shared cache or kernel cache
BinaryViewType gains a HasNoInitialContent function that views can use
to suppress layout restoration when opening a file. The layout will
still be restored when the view is loaded from a saved database.
Fixes https://github.com/Vector35/binaryninja-api/issues/8083.
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index fe57d92d..1c482b66 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -8623,6 +8623,7 @@ namespace BinaryNinja { static bool IsDeprecatedCallback(void* ctxt); static bool IsForceLoadableCallback(void *ctxt); static BNSettings* GetSettingsCallback(void* ctxt, BNBinaryView* data); + static bool HasNoInitialContentCallback(void* ctxt); BinaryViewType(BNBinaryViewType* type); @@ -8775,6 +8776,18 @@ namespace BinaryNinja { */ virtual bool IsForceLoadable(); + /*! Check whether instances of this BinaryViewType start with no loaded content + + When true, the view has no meaningful default state: the user must make a + selection (e.g. load images from a shared cache) before any content exists. + Callers can use this to suppress restoring previously-saved view state for + files not being loaded from a database, since a saved layout would reference + content that isn't available on reopen. + + \return Whether instances of this BinaryViewType start with no loaded content + */ + virtual bool HasNoInitialContent(); + virtual Ref<Settings> GetLoadSettingsForData(BinaryView* data); Ref<Settings> GetDefaultLoadSettingsForData(BinaryView* data); @@ -8798,6 +8811,7 @@ namespace BinaryNinja { virtual bool IsTypeValidForData(BinaryView* data) override; virtual bool IsDeprecated() override; virtual bool IsForceLoadable() override; + virtual bool HasNoInitialContent() override; virtual Ref<Settings> GetLoadSettingsForData(BinaryView* data) override; }; |
