IDAPython 8.4
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, *args)
 init(self, _flags=0, _hkcb_flags=0x0001) -> UI_Hooks
 
"bool" hook (self, *args)
 hook(self) -> bool
 
"bool" unhook (self, *args)
 unhook(self) -> bool
 
"void" range (self, *args)
 range(self) The disassembly range has been changed ( idainfo::min_ea ... idainfo::max_ea).
 
"void" idcstart (self, *args)
 idcstart(self) Start of IDC engine work.
 
"void" idcstop (self, *args)
 idcstop(self) Stop of IDC engine work.
 
"void" suspend (self, *args)
 suspend(self) Suspend graphical interface.
 
"void" resume (self, *args)
 resume(self) Resume the suspended graphical interface.
 
"void" saving (self, *args)
 saving(self) The kernel is flushing its buffers to the disk.
 
"void" saved (self, *args)
 saved(self, path) The kernel has saved the database.
 
"void" database_closed (self, *args)
 database_closed(self) The database has been closed.
 
"void" debugger_menu_change (self, *args)
 debugger_menu_change(self, enable) debugger menu modification detected
 
"void" widget_visible (self, *args)
 widget_visible(self, widget) TWidget is displayed on the screen.
 
"void" widget_closing (self, *args)
 widget_closing(self, widget) TWidget is about to close.
 
"void" widget_invisible (self, *args)
 widget_invisible(self, widget) TWidget is being closed.
 
"PyObject *" get_ea_hint (self, *args)
 get_ea_hint(self, ea) -> PyObject * ui wants to display a simple hint for an address.
 
"PyObject *" get_item_hint (self, *args)
 get_item_hint(self, ea, max_lines) -> PyObject * ui wants to display multiline hint for an item.
 
"PyObject *" get_custom_viewer_hint (self, *args)
 get_custom_viewer_hint(self, viewer, place) -> PyObject * ui wants to display a hint for a viewer (idaview or custom).
 
"void" database_inited (self, *args)
 database_inited(self, is_new_database, idc_script) database initialization has completed.
 
"void" ready_to_run (self, *args)
 ready_to_run(self) all UI elements have been initialized.
 
"int" preprocess_action (self, *args)
 preprocess_action(self, name) -> int ida ui is about to handle a user action.
 
"void" postprocess_action (self, *args)
 postprocess_action(self) an ida ui action has been handled
 
"void" get_chooser_item_attrs (self, *args)
 get_chooser_item_attrs(self, chooser, n, attrs) get item-specific attributes for a chooser.
 
"void" updating_actions (self, *args)
 updating_actions(self, ctx) IDA is about to update all actions.
 
"void" updated_actions (self, *args)
 updated_actions(self) IDA is done updating actions.
 
"void" populating_widget_popup (self, *args)
 populating_widget_popup(self, widget, popup_handle, ctx=None) IDA is populating the context menu for a widget.
 
"void" finish_populating_widget_popup (self, *args)
 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, *args)
 plugin_loaded(self, plugin_info) The plugin was loaded in memory.
 
"void" plugin_unloading (self, *args)
 plugin_unloading(self, plugin_info) The plugin is about to be unloaded
 
"void" current_widget_changed (self, *args)
 current_widget_changed(self, widget, prev_widget) The currently-active TWidget changed.
 
"void" screen_ea_changed (self, *args)
 screen_ea_changed(self, ea, prev_ea) The "current address" changed
 
"PyObject *" create_desktop_widget (self, *args)
 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, *args)
 get_lines_rendering_info(self, out, widget, info) get lines rendering information
 
"PyObject *" get_widget_config (self, *args)
 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, *args)
 set_widget_config(self, widget, cfg) set the widget configuration
 
"void" initing_database (self, *args)
 initing_database(self) database initialization has started.
 
"void" destroying_procmod (self, *args)
 destroying_procmod(self, procmod) The processor module is about to be destroyed
 
"void" destroying_plugmod (self, *args)
 destroying_plugmod(self, plugmod, entry) The plugin object is about to be destroyed
 
"void" desktop_applied (self, *args)
 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,
* args )
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,
* args )
Parameters
title(const char *)
cfg(const jobj_t *)
Returns
: TWidget * the created widget, or null

◆ current_widget_changed()

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

◆ database_closed()

"void" database_closed ( self,
* args )

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,
* args )

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,
* args )
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,
* args )
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,
* args )
Parameters
plugmod(const plugmod_t *)
entry(const plugin_t *)

◆ destroying_procmod()

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

◆ finish_populating_widget_popup()

"void" finish_populating_widget_popup ( self,
* args )

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,
* args )

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,
* args )

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,
* args )

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,
* args )

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,
* args )
Parameters
out(lines_rendering_output_t *)
widget(const TWidget *)
info(const lines_rendering_input_t *)

◆ get_widget_config()

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

◆ hook()

"bool" hook ( self,
* args )

◆ idcstart()

"void" idcstart ( self,
* args )

◆ idcstop()

"void" idcstop ( self,
* args )

◆ initing_database()

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

◆ plugin_loaded()

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

◆ plugin_unloading()

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

◆ populating_widget_popup()

"void" populating_widget_popup ( self,
* args )

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,
* args )

◆ preprocess_action()

"int" preprocess_action ( self,
* args )
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,
* args )

UI should redraw the scrollbars. See also: ui_lock_range_refresh

◆ ready_to_run()

"void" ready_to_run ( self,
* args )

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

◆ resume()

"void" resume ( self,
* args )

Only the text version. Interface should respond to it

◆ saved()

"void" saved ( self,
* args )

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,
* args )

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

◆ screen_ea_changed()

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

◆ set_widget_config()

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

◆ suspend()

"void" suspend ( self,
* args )

Only the text version. Interface should respond to it.

◆ unhook()

"bool" unhook ( self,
* args )

◆ updated_actions()

"void" updated_actions ( self,
* args )

◆ updating_actions()

"void" updating_actions ( self,
* args )

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,
* args )

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,
* args )

Use this event to destroy the window controls

Parameters
widget(TWidget *)

◆ widget_visible()

"void" widget_visible ( self,
* args )

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: