IDAPython 9.0
Loading...
Searching...
No Matches
UI_Hooks Class Reference

Proxy of C++ UI_Hooks class.

Inheritance diagram for UI_Hooks:
GraphViewer.UI_Hooks_Trampoline Choose.UI_Hooks_Trampoline simplecustviewer_t.UI_Hooks_Trampoline

Public Member Functions

 __init__ (self, "uint32" _flags=0, "uint32" _hkcb_flags=0x0001)
 init(self, _flags=0, _hkcb_flags=0x0001) -> UI_Hooks
 
"bool" hook (self)
 hook(self) -> bool
 
"bool" unhook (self)
 unhook(self) -> bool
 
"void" range (self)
 range(self) The disassembly range has been changed ( idainfo::min_ea ... idainfo::max_ea).
 
"void" idcstart (self)
 idcstart(self) Start of IDC engine work.
 
"void" idcstop (self)
 idcstop(self) Stop of IDC engine work.
 
"void" suspend (self)
 suspend(self) Suspend graphical interface.
 
"void" resume (self)
 resume(self) Resume the suspended graphical interface.
 
"void" saving (self)
 saving(self) The kernel is flushing its buffers to the disk.
 
"void" saved (self, "char const *" path)
 saved(self, path) The kernel has saved the database.
 
"void" database_closed (self)
 database_closed(self) The database has been closed.
 
"void" debugger_menu_change (self, "bool" enable)
 debugger_menu_change(self, enable) debugger menu modification detected
 
"void" widget_visible (self, "TWidget *" widget)
 widget_visible(self, widget) TWidget is displayed on the screen.
 
"void" widget_closing (self, "TWidget *" widget)
 widget_closing(self, widget) TWidget is about to close.
 
"void" widget_invisible (self, "TWidget *" widget)
 widget_invisible(self, widget) TWidget is being closed.
 
"PyObject *" get_ea_hint (self, "ea_t" ea)
 get_ea_hint(self, ea) -> PyObject * ui wants to display a simple hint for an address.
 
"PyObject *" get_item_hint (self, "ea_t" ea, "int" max_lines)
 get_item_hint(self, ea, max_lines) -> PyObject * ui wants to display multiline hint for an item.
 
"PyObject *" get_custom_viewer_hint (self, "TWidget *" viewer, "place_t" place)
 get_custom_viewer_hint(self, viewer, place) -> PyObject * ui wants to display a hint for a viewer (idaview or custom).
 
"void" database_inited (self, "int" is_new_database, "char const *" idc_script)
 database_inited(self, is_new_database, idc_script) database initialization has completed.
 
"void" ready_to_run (self)
 ready_to_run(self) all UI elements have been initialized.
 
"int" preprocess_action (self, "char const *" name)
 preprocess_action(self, name) -> int ida ui is about to handle a user action.
 
"void" postprocess_action (self)
 postprocess_action(self) an ida ui action has been handled
 
"void" get_chooser_item_attrs (self, "chooser_base_t" chooser, "size_t" n, "chooser_item_attrs_t" attrs)
 get_chooser_item_attrs(self, chooser, n, attrs) get item-specific attributes for a chooser.
 
"void" updating_actions (self, "action_ctx_base_t" ctx)
 updating_actions(self, ctx) IDA is about to update all actions.
 
"void" updated_actions (self)
 updated_actions(self) IDA is done updating actions.
 
"void" populating_widget_popup (self, "TWidget *" widget, "TPopupMenu *" popup_handle, "action_ctx_base_t" ctx=None)
 populating_widget_popup(self, widget, popup_handle, ctx=None) IDA is populating the context menu for a widget.
 
"void" finish_populating_widget_popup (self, "TWidget *" widget, "TPopupMenu *" popup_handle, "action_ctx_base_t" ctx=None)
 finish_populating_widget_popup(self, widget, popup_handle, ctx=None) IDA is about to be done populating the context menu for a widget.
 
"void" plugin_loaded (self, "plugin_info_t const *" plugin_info)
 plugin_loaded(self, plugin_info) The plugin was loaded in memory.
 
"void" plugin_unloading (self, "plugin_info_t const *" plugin_info)
 plugin_unloading(self, plugin_info) The plugin is about to be unloaded
 
"void" current_widget_changed (self, "TWidget *" widget, "TWidget *" prev_widget)
 current_widget_changed(self, widget, prev_widget) The currently-active TWidget changed.
 
"void" screen_ea_changed (self, "ea_t" ea, "ea_t" prev_ea)
 screen_ea_changed(self, ea, prev_ea) The "current address" changed
 
"PyObject *" create_desktop_widget (self, "char const *" title, "jobj_wrapper_t" cfg)
 create_desktop_widget(self, title, cfg) -> PyObject * create a widget, to be placed in the widget tree (at desktop-creation time.)
 
"void" get_lines_rendering_info (self, "lines_rendering_output_t" out, "TWidget const *" widget, "lines_rendering_input_t" info)
 get_lines_rendering_info(self, out, widget, info) get lines rendering information
 
"PyObject *" get_widget_config (self, "TWidget const *" widget, "jobj_t *" cfg)
 get_widget_config(self, widget, cfg) -> PyObject * retrieve the widget configuration (it will be passed back at ui_create_desktop_widget-, and ui_set_widget_config-time)
 
"void" set_widget_config (self, "TWidget const *" widget, "jobj_wrapper_t" cfg)
 set_widget_config(self, widget, cfg) set the widget configuration
 
"void" initing_database (self)
 initing_database(self) database initialization has started.
 
"void" destroying_procmod (self, "procmod_t" procmod)
 destroying_procmod(self, procmod) The processor module is about to be destroyed
 
"void" destroying_plugmod (self, "plugmod_t" plugmod, "plugin_t const *" entry)
 destroying_plugmod(self, plugmod, entry) The plugin object is about to be destroyed
 
"void" desktop_applied (self, "char const *" name, "bool" from_idb, "int" type)
 desktop_applied(self, name, from_idb, type) a desktop has been applied
 
 __disown__ (self)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
"uint32" _flags = 0,
"uint32" _hkcb_flags = 0x0001 )
Parameters
_flagsuint32
_hkcb_flagsuint32

Reimplemented in GraphViewer.UI_Hooks_Trampoline, Choose.UI_Hooks_Trampoline, and simplecustviewer_t.UI_Hooks_Trampoline.

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ create_desktop_widget()

"PyObject *" create_desktop_widget ( self,
"char const *" title,
"jobj_wrapper_t" cfg )
Parameters
title(const char *)
cfg(const jobj_t *)
Returns
: TWidget * the created widget, or null

◆ current_widget_changed()

"void" current_widget_changed ( self,
"TWidget *" widget,
"TWidget *" prev_widget )
Parameters
widget(TWidget *)
prev_widget(TWidget *)

◆ database_closed()

"void" database_closed ( self)

See also processor_t::closebase, it occurs earlier. See also ui_initing_database. This is not the same as IDA exiting. If you need to perform cleanup at the exiting time, use qatexit().

◆ database_inited()

"void" database_inited ( self,
"int" is_new_database,
"char const *" idc_script )

the kernel is about to run idc scripts

Parameters
is_new_database(int)
idc_script(const char *) - may be nullptr
Returns
: void See also ui_initing_database. This event is called for both new and old databases.

◆ debugger_menu_change()

"void" debugger_menu_change ( self,
"bool" enable )
Parameters
enable(bool) true: debugger menu has been added, or a different debugger has been selected false: debugger menu will be removed (user switched to "No debugger")

◆ desktop_applied()

"void" desktop_applied ( self,
"char const *" name,
"bool" from_idb,
"int" type )
Parameters
name(const char *) the desktop name
from_idb(bool) the desktop was stored in the IDB (false if it comes from the registry)
type(int) the desktop type (1-disassembly, 2-debugger, 3-merge)

◆ destroying_plugmod()

"void" destroying_plugmod ( self,
"plugmod_t" plugmod,
"plugin_t const *" entry )
Parameters
plugmod(const plugmod_t *)
entry(const plugin_t *)

◆ destroying_procmod()

"void" destroying_procmod ( self,
"procmod_t" procmod )
Parameters
procmod(const procmod_t *)

◆ finish_populating_widget_popup()

"void" finish_populating_widget_popup ( self,
"TWidget *" widget,
"TPopupMenu *" popup_handle,
"action_ctx_base_t" ctx = None )

This is your chance to attach_action_to_popup().

Parameters
widget(TWidget *)
popup_handle(TPopupMenu *)
ctx(const action_activation_ctx_t *)

◆ get_chooser_item_attrs()

"void" get_chooser_item_attrs ( self,
"chooser_base_t" chooser,
"size_t" n,
"chooser_item_attrs_t" attrs )

This callback is generated only after enable_chooser_attrs()

Parameters
chooser(const chooser_base_t *)
n(::size_t)
attrs(chooser_item_attrs_t *)

◆ get_custom_viewer_hint()

"PyObject *" get_custom_viewer_hint ( self,
"TWidget *" viewer,
"place_t" place )

Every subscriber is supposed to append the hint lines to HINT and increment IMPORTANT_LINES accordingly. Completely overwriting the existing lines in HINT is possible but not recommended. If the REG_HINTS_MARKER sequence is found in the returned hints string, it will be replaced with the contents of the "regular" hints. If the SRCDBG_HINTS_MARKER sequence is found in the returned hints string, it will be replaced with the contents of the source-level debugger-generated hints. The following keywords might appear at the beginning of the returned hints: HIGHLIGHT text where text will be highlighted CAPTION caption caption for the hint widget

Parameters
viewer(TWidget*) viewer
place(place_t *) current position in the viewer
Return values
0continue collecting hints with other subscribers
1stop collecting hints

◆ get_ea_hint()

"PyObject *" get_ea_hint ( self,
"ea_t" ea )

Use this event to generate a custom hint See also more generic ui_get_item_hint

Parameters
ea(::ea_t)
Returns
: true if generated a hint

◆ get_item_hint()

"PyObject *" get_item_hint ( self,
"ea_t" ea,
"int" max_lines )

See also more generic ui_get_custom_viewer_hint

Parameters
ea(ea_t) or item id like a structure or enum member
max_lines(int) maximal number of lines
Returns
: true if generated a hint

◆ get_lines_rendering_info()

"void" get_lines_rendering_info ( self,
"lines_rendering_output_t" out,
"TWidget const *" widget,
"lines_rendering_input_t" info )
Parameters
out(lines_rendering_output_t *)
widget(const TWidget *)
info(const lines_rendering_input_t *)

◆ get_widget_config()

"PyObject *" get_widget_config ( self,
"TWidget const *" widget,
"jobj_t *" cfg )
Parameters
widget(const TWidget *)
cfg(jobj_t *)

◆ hook()

"bool" hook ( self)

◆ idcstart()

"void" idcstart ( self)

◆ idcstop()

"void" idcstop ( self)

◆ initing_database()

"void" initing_database ( self)
Returns
: void See also ui_database_inited. This event is called for both new and old databases.

◆ plugin_loaded()

"void" plugin_loaded ( self,
"plugin_info_t const *" plugin_info )
Parameters
plugin_info(const plugin_info_t *)

◆ plugin_unloading()

"void" plugin_unloading ( self,
"plugin_info_t const *" plugin_info )
Parameters
plugin_info(const plugin_info_t *)

◆ populating_widget_popup()

"void" populating_widget_popup ( self,
"TWidget *" widget,
"TPopupMenu *" popup_handle,
"action_ctx_base_t" ctx = None )

This is your chance to attach_action_to_popup().

Have a look at ui_finish_populating_widget_popup, if you want to augment the context menu with your own actions after the menu has had a chance to be properly populated by the owning component or plugin (which typically does it on ui_populating_widget_popup.)

Parameters
widget(TWidget *)
popup_handle(TPopupMenu *)
ctx(const action_activation_ctx_t *)

Reimplemented in GraphViewer.UI_Hooks_Trampoline, Choose.UI_Hooks_Trampoline, and simplecustviewer_t.UI_Hooks_Trampoline.

◆ postprocess_action()

"void" postprocess_action ( self)

◆ preprocess_action()

"int" preprocess_action ( self,
"char const *" name )
Parameters
name(const char *) ui action name. these names can be looked up in ida[tg]ui.cfg
Return values
0ok
nonzeroa plugin has handled the command

◆ range()

"void" range ( self)

UI should redraw the scrollbars. See also: ui_lock_range_refresh

◆ ready_to_run()

"void" ready_to_run ( self)

Automatic plugins may hook to this event to perform their tasks.

◆ resume()

"void" resume ( self)

Only the text version. Interface should respond to it

◆ saved()

"void" saved ( self,
"char const *" path )

This callback just informs the interface. Note that at the time this notification is sent, the internal paths are not updated yet, and calling get_path(PATH_TYPE_IDB) will return the previous path.

Parameters
path(const char *) the database path

◆ saving()

"void" saving ( self)

The user interface should save its state. Parameters: none Returns: none

◆ screen_ea_changed()

"void" screen_ea_changed ( self,
"ea_t" ea,
"ea_t" prev_ea )
Parameters
ea(ea_t)
prev_ea(ea_t)

◆ set_widget_config()

"void" set_widget_config ( self,
"TWidget const *" widget,
"jobj_wrapper_t" cfg )
Parameters
widget(const TWidget *)
cfg(const jobj_t *)

◆ suspend()

"void" suspend ( self)

Only the text version. Interface should respond to it.

◆ unhook()

"bool" unhook ( self)

◆ updated_actions()

"void" updated_actions ( self)

◆ updating_actions()

"void" updating_actions ( self,
"action_ctx_base_t" ctx )

If your plugin needs to perform expensive operations more than once (e.g., once per action it registers), you should do them only once, right away.

Parameters
ctx(action_update_ctx_t *)

◆ widget_closing()

"void" widget_closing ( self,
"TWidget *" widget )

This event precedes ui_widget_invisible. Use this to perform some possible actions relevant to the lifecycle of this widget

Parameters
widget(TWidget *)

◆ widget_invisible()

"void" widget_invisible ( self,
"TWidget *" widget )

Use this event to destroy the window controls

Parameters
widget(TWidget *)

◆ widget_visible()

"void" widget_visible ( self,
"TWidget *" widget )

Use this event to populate the window with controls

Parameters
widget(TWidget *)

Property Documentation

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

The documentation for this class was generated from the following file: