IDAPython 9.0
Loading...
Searching...
No Matches
UI_Hooks Class Reference
Inheritance diagram for UI_Hooks:
GraphViewer.UI_Hooks_Trampoline Choose.UI_Hooks_Trampoline simplecustviewer_t.UI_Hooks_Trampoline

Public Member Functions

 __init__ (self, int _flags=0, int _hkcb_flags=1)
 
bool hook (self)
 
bool unhook (self)
 
None range (self)
 
None idcstart (self)
 
None idcstop (self)
 
None suspend (self)
 
None resume (self)
 
None saving (self)
 
None saved (self, str path)
 
None database_closed (self)
 
None debugger_menu_change (self, bool enable)
 
None widget_visible (self, 'TWidget *' widget)
 
None widget_closing (self, 'TWidget *' widget)
 
None widget_invisible (self, 'TWidget *' widget)
 
'PyObject *' get_ea_hint (self, ida_idaapi.ea_t ea)
 
'PyObject *' get_item_hint (self, ida_idaapi.ea_t ea, int max_lines)
 
'PyObject *' get_custom_viewer_hint (self, 'TWidget *' viewer, 'place_t' place)
 
None database_inited (self, int is_new_database, str idc_script)
 
None ready_to_run (self)
 
int preprocess_action (self, str name)
 
None postprocess_action (self)
 
None get_chooser_item_attrs (self, 'chooser_base_t' chooser, 'size_t' n, 'chooser_item_attrs_t' attrs)
 
None updating_actions (self, 'action_ctx_base_t' ctx)
 
None updated_actions (self)
 
None populating_widget_popup (self, 'TWidget *' widget, 'TPopupMenu *' popup_handle, 'action_ctx_base_t' ctx=None)
 
None finish_populating_widget_popup (self, 'TWidget *' widget, 'TPopupMenu *' popup_handle, 'action_ctx_base_t' ctx=None)
 
None plugin_loaded (self, 'plugin_info_t const *' plugin_info)
 
None plugin_unloading (self, 'plugin_info_t const *' plugin_info)
 
None current_widget_changed (self, 'TWidget *' widget, 'TWidget *' prev_widget)
 
None screen_ea_changed (self, ida_idaapi.ea_t ea, ida_idaapi.ea_t prev_ea)
 
'PyObject *' create_desktop_widget (self, str title, 'jobj_wrapper_t' cfg)
 
None get_lines_rendering_info (self, 'lines_rendering_output_t' out, 'TWidget const *' widget, 'lines_rendering_input_t' info)
 
'PyObject *' get_widget_config (self, 'TWidget const *' widget, 'jobj_t *' cfg)
 
None set_widget_config (self, 'TWidget const *' widget, 'jobj_wrapper_t' cfg)
 
None initing_database (self)
 
None destroying_procmod (self, 'procmod_t' procmod)
 
None destroying_plugmod (self, 'plugmod_t' plugmod, 'plugin_t const *' entry)
 
None desktop_applied (self, str name, bool from_idb, int type)
 
 __disown__ (self)
 

Properties

 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
int _flags = 0,
int _hkcb_flags = 1 )

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ create_desktop_widget()

'PyObject *' create_desktop_widget ( self,
str title,
'jobj_wrapper_t' cfg )
create a widget, to be placed in the widget tree (at desktop-creation time.) 
  
@param title: (const char *)
@param cfg: (const jobj_t *)
@returns TWidget * the created widget, or null

◆ current_widget_changed()

None current_widget_changed ( self,
'TWidget *' widget,
'TWidget *' prev_widget )
The currently-active TWidget changed. 
  
@param widget: (TWidget *)
@param prev_widget: (TWidget *)
@returns void

◆ database_closed()

None database_closed ( self)
The database has been closed. 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(). 
  
@returns void

◆ database_inited()

None database_inited ( self,
int is_new_database,
str idc_script )
database initialization has completed. the kernel is about to run idc scripts 
  
@param is_new_database: (int)
@param 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()

None debugger_menu_change ( self,
bool enable )
debugger menu modification detected 
  
@param 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")
@returns void

◆ desktop_applied()

None desktop_applied ( self,
str name,
bool from_idb,
int type )
a desktop has been applied 
  
@param name: (const char *) the desktop name
@param from_idb: (bool) the desktop was stored in the IDB (false if it comes from the registry)
@param type: (int) the desktop type (1-disassembly, 2-debugger, 3-merge)

◆ destroying_plugmod()

None destroying_plugmod ( self,
'plugmod_t' plugmod,
'plugin_t const *' entry )
The plugin object is about to be destroyed 
  
@param plugmod: (const plugmod_t *)
@param entry: (const plugin_t *)

◆ destroying_procmod()

None destroying_procmod ( self,
'procmod_t' procmod )
The processor module is about to be destroyed 
  
@param procmod: (const procmod_t *)

◆ finish_populating_widget_popup()

None finish_populating_widget_popup ( self,
'TWidget *' widget,
'TPopupMenu *' popup_handle,
'action_ctx_base_t' ctx = None )
IDA is about to be done populating the context menu for a widget. This is your chance to attach_action_to_popup().

@param widget: (TWidget *)
@param popup_handle: (TPopupMenu *)
@param ctx: (const action_activation_ctx_t *)
@returns void

◆ get_chooser_item_attrs()

None get_chooser_item_attrs ( self,
'chooser_base_t' chooser,
'size_t' n,
'chooser_item_attrs_t' attrs )
get item-specific attributes for a chooser. This callback is generated only after enable_chooser_attrs() 
  
@param chooser: (const chooser_base_t *)
@param n: (::size_t)
@param attrs: (chooser_item_attrs_t *)
@returns void

◆ get_custom_viewer_hint()

'PyObject *' get_custom_viewer_hint ( self,
'TWidget *' viewer,
'place_t' place )
ui wants to display a hint for a viewer (idaview or custom). 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 
  
@param viewer: (TWidget*) viewer
@param place: (place_t *) current position in the viewer
@retval 0: continue collecting hints with other subscribers
@retval 1: stop collecting hints

◆ get_ea_hint()

'PyObject *' get_ea_hint ( self,
ida_idaapi.ea_t ea )
ui wants to display a simple hint for an address. Use this event to generate a custom hint See also more generic ui_get_item_hint 
  
@param ea: (::ea_t)
@returns true if generated a hint

◆ get_item_hint()

'PyObject *' get_item_hint ( self,
ida_idaapi.ea_t ea,
int max_lines )
ui wants to display multiline hint for an item. See also more generic ui_get_custom_viewer_hint 
  
@param ea: (ea_t) or item id like a structure or enum member
@param max_lines: (int) maximal number of lines
@returns true if generated a hint

◆ get_lines_rendering_info()

None get_lines_rendering_info ( self,
'lines_rendering_output_t' out,
'TWidget const *' widget,
'lines_rendering_input_t' info )
get lines rendering information 
  
@param out: (lines_rendering_output_t *)
@param widget: (const TWidget *)
@param info: (const lines_rendering_input_t *)
@returns void

◆ get_widget_config()

'PyObject *' get_widget_config ( self,
'TWidget const *' widget,
'jobj_t *' cfg )
retrieve the widget configuration (it will be passed back at ui_create_desktop_widget-, and ui_set_widget_config-time) 
  
@param widget: (const TWidget *)
@param cfg: (jobj_t *)
@returns void

◆ hook()

bool hook ( self)

◆ idcstart()

None idcstart ( self)
Start of IDC engine work. 
  
@returns void

◆ idcstop()

None idcstop ( self)
Stop of IDC engine work. 
  
@returns void

◆ initing_database()

None initing_database ( self)
database initialization has started. 
  
@returns void See also ui_database_inited. This event is called for both new and old databases.

◆ plugin_loaded()

None plugin_loaded ( self,
'plugin_info_t const *' plugin_info )
The plugin was loaded in memory. 
  
@param plugin_info: (const plugin_info_t *)

◆ plugin_unloading()

None plugin_unloading ( self,
'plugin_info_t const *' plugin_info )
The plugin is about to be unloaded 
  
@param plugin_info: (const plugin_info_t *)

◆ populating_widget_popup()

None populating_widget_popup ( self,
'TWidget *' widget,
'TPopupMenu *' popup_handle,
'action_ctx_base_t' ctx = None )
IDA is populating the context menu for a widget. 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.)

@param widget: (TWidget *)
@param popup_handle: (TPopupMenu *)
@param ctx: (const action_activation_ctx_t *)
@returns void

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

◆ postprocess_action()

None postprocess_action ( self)
an ida ui action has been handled

◆ preprocess_action()

int preprocess_action ( self,
str name )
ida ui is about to handle a user action. 
  
@param name: (const char *) ui action name. these names can be looked up in ida[tg]ui.cfg
@retval 0: ok
@retval nonzero: a plugin has handled the command

◆ range()

None range ( self)
The disassembly range has been changed ( idainfo::min_ea ... idainfo::max_ea). UI should redraw the scrollbars. See also: ui_lock_range_refresh 
  
@returns void

◆ ready_to_run()

None ready_to_run ( self)
all UI elements have been initialized. Automatic plugins may hook to this event to perform their tasks. 
  
@returns void

◆ resume()

None resume ( self)
Resume the suspended graphical interface. Only the text version. Interface should respond to it 
  
@returns void

◆ saved()

None saved ( self,
str path )
The kernel has saved the database. 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. 
  
@param path: (const char *) the database path
@returns void

◆ saving()

None saving ( self)
The kernel is flushing its buffers to the disk. The user interface should save its state. Parameters: none Returns: none 

◆ screen_ea_changed()

None screen_ea_changed ( self,
ida_idaapi.ea_t ea,
ida_idaapi.ea_t prev_ea )
The "current address" changed 
  
@param ea: (ea_t)
@param prev_ea: (ea_t)
@returns void

◆ set_widget_config()

None set_widget_config ( self,
'TWidget const *' widget,
'jobj_wrapper_t' cfg )
set the widget configuration 
  
@param widget: (const TWidget *)
@param cfg: (const jobj_t *)
@returns void

◆ suspend()

None suspend ( self)
Suspend graphical interface. Only the text version. Interface should respond to it. 
  
@returns void

◆ unhook()

bool unhook ( self)

◆ updated_actions()

None updated_actions ( self)
IDA is done updating actions. 
  
@returns void

◆ updating_actions()

None updating_actions ( self,
'action_ctx_base_t' ctx )
IDA is about to update all actions. 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. 
  
@param ctx: (action_update_ctx_t *)
@returns void

◆ widget_closing()

None widget_closing ( self,
'TWidget *' widget )
TWidget is about to close. This event precedes ui_widget_invisible. Use this to perform some possible actions relevant to the lifecycle of this widget 
  
@param widget: (TWidget *)
@returns void

◆ widget_invisible()

None widget_invisible ( self,
'TWidget *' widget )
TWidget is being closed. Use this event to destroy the window controls 
  
@param widget: (TWidget *)
@returns void

◆ widget_visible()

None widget_visible ( self,
'TWidget *' widget )
TWidget is displayed on the screen. Use this event to populate the window with controls 
  
@param widget: (TWidget *)
@returns void

Property Documentation

◆ thisown

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

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