IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- File List
- File Members

Classes | Functions | Macros | Typedefs | Enumerations | Variables
kernwin.hpp File Reference

## Detailed Description

Defines the interface between the kernel and the UI.

It contains:

- the UI dispatcher notification codes (ui_notification_t)
- convenience functions for UI services
- structures which hold information about the lines (disassembly, structures, enums) generated by the kernel
- functions to interact with the user (dialog boxes)
- some string and conversion functions.

## Classes
union | callui_t
| Callui return codes. More...
class | place_t
| Denotes a displayed line. More...
struct | simpleline_t
| Maintain basic information for a line in a custom view. More...
class | simpleline_place_t
| A location in a view populated by a strvec_t. More...
class | idaplace_t
| A location in a disassembly view. More...
class | enumplace_t
| A location in an enum view. More...
class | structplace_t
| A location in a struct view. More...
class | twinpos_t
| A position in a text window. More...
class | twinline_t
| A line in a text window. More...
class | linearray_t
| The group of lines corresponding to a single place within a view. More...
struct | chooser_item_attrs_t
| Chooser item attributes. More...
struct | chooser_info_t
| Chooser structure, used to embed a chooser in a form. More...
struct | textctrl_info_t
| Multi line text control, used to embed a text control in a form. More...
struct | renderer_pos_info_t
| Information about a position relative to the renderer. More...
struct | view_mouse_event_t
| Information about a mouse action within a view. More...
union | view_mouse_event_t::location_t
| Abstraction of location in flat view/graph views. More...
class | locchange_md_t
struct | cli_t
| Command line interpreter. More...
struct | exec_request_t
| Execute code in the main thread - to be used with execute_sync(). More...
class | ui_request_t
| Base class for defining UI requests. More...
class | ui_requests_t
| List of UI requests. More...
struct | action_ctx_base_t
| Maintain information about the current state of the UI. More...
struct | action_activation_ctx_t
| Instances of this class will be filled with information that is commonly used by actions when they need to be activated. More...
struct | action_update_ctx_t
| Instances of this class will be filled with information that is commonly used by actions when they need to update. More...
struct | action_handler_t
| Manages the behavior of a registered action. More...
struct | action_desc_t
| Describe an action to be registered (see register_action()) More...
class | custom_viewer_handlers_t
struct | __qtimer_t
| Timer opaque handle. More...
struct | form_actions_t
| Functions available from formchgcb_t. More...
struct | addon_info_t
| Information about an installed add-on (e.g. a plugin) More...
struct | strarray_t
| Map strings to integer values - see strarray() More...

## Functions
idaman void ida_export | init_kernel (callui_t(idaapi *_callui)(ui_notification_t what,...), int argc, char *argv[])
| The user interface must call this function before calling any kernel functions. More...
idaman int ida_export | init_database (int argc, const char *const *argv, int *newfile)
| After calling init_kernel() the ui must call this function. More...
idaman void ida_export | term_database (void)
| The database termination function. More...
idaman void ida_export | term_kernel (void)
| The kernel termination function. More...
idaman NORETURN void ida_export | verror (const char *format, va_list va)
| See error()
idaman void ida_export | vshow_hex (const void *dataptr, size_t len, const char *format, va_list va)
| See show_hex()
idaman void ida_export | vshow_hex_file (linput_t *li, int32 pos, size_t count, const char *format, va_list va)
| See show_hex_file()
bool | get_kernel_version (char *buf, size_t bufsize)
| Get IDA kernel version (in a string like "5.1"). More...
idaman int ida_export | l_compare (const place_t *t1, const place_t *t2)
| compare places and their lnnums
idaman int ida_export | internal_register_place_class (const place_t *tmplate, int flags, const plugin_t *owner, int sdk_version)
int | register_place_class (const place_t *tmplate, int flags, const plugin_t *owner)
| Register information about a place_t class. More...
idaman const place_t *ida_export | get_place_class (int *out_flags, int *out_sdk_version, int id)
| Get information about a previously-registered place_t class. More...
const place_t * | get_place_class_template (int id)
| See get_place_class()
bool | is_place_class_ea_capable (int id)
| See get_place_class()
idaman int ida_export | get_place_class_id (const char *name)
| Get the place class ID for the place that has been registered as 'name'. More...
idaman void ida_export | register_loc_converter (const char *p1, const char *p2, lochist_entry_cvt_t *cvt)
| Register a converter, that will be used for the following reasons: More...
idaman lochist_entry_cvt_t *ida_export | lookup_loc_converter (const char *p1, const char *p2)
| Search for a place converter from lochist_entry_t's with places of type 'p1' to lochist_entry_t's with places of type 'p2'. More...
void | request_refresh (unsigned int mask)
| Request a refresh of a builtin window. More...
bool | is_chooser_tform (tform_type_t t)
| Does the given tform type specify a chooser tform?
int | ida_deb (const char *format,...)
| Display debug message. More...
void | ida_debug_time (const char *file, int line)
| See debug_time()
idaman void ida_export | ida_checkmem (const char *file, int line)
| Checking heap is not available anymore. More...
void | show_hex (const void *dataptr, size_t len, const char *format,...)
| Display hex dump in the messages window.
void | show_hex_file (linput_t *li, int32 pos, size_t count, const char *format,...)
| Display hex dump of a file in the messages window.
int | askbuttons_cv (const char *Yes, const char *No, const char *Cancel, int deflt, const char *format, va_list va)
| See askbuttons_c()
char * | askfile_cv (int savefile, const char *defval, const char *format, va_list va)
| See askfile_c()
char * | askfile2_cv (bool forsave, const char *defdir, const char *filters, const char *format, va_list va)
| See askfile2_c()
char * | vaskstr (int hist, const char *defval, const char *format, va_list va)
| See askstr()
bool | vaskqstr (qstring *str, const char *format, va_list va)
| See askqstr()
char * | vasktext (size_t size, char *answer, const char *defval, const char *format, va_list va)
| See asktext()
int | vmsg (const char *format, va_list va)
| See msg()
int | vumsg (const char *format, va_list va)
| See umsg()
void | vwarning (const char *format, va_list va)
| See warning()
void | vinfo (const char *format, va_list va)
| See info()
NORETURN void | vnomem (const char *format, va_list va)
| See nomem()
uint32 | choose (int flags, int x0, int y0, int x1, int y1, void *obj, int width, uint32(idaapi *sizer)(void *obj), char *(idaapi *getl)(void *obj, uint32 n, char *buf), const char *title, int icon, uint32 deflt=-1, chooser_cb_t *del=NULL, void(idaapi *ins)(void *obj)=NULL, chooser_cb_t *update=NULL, void(idaapi *edit)(void *obj, uint32 n)=NULL, void(idaapi *enter)(void *obj, uint32 n)=NULL, void(idaapi *destroy)(void *obj)=NULL, const char *const *popup_names=NULL, int(idaapi *get_icon)(void *obj, uint32 n)=NULL)
| Display a window with a list (1-column) and allow the user to select an item. More...
uint32 | choose (void *obj, int width, uint32(idaapi *sizer)(void *obj), char *(idaapi *getl)(void *obj, uint32 n, char *buf), const char *title, int icon=-1, uint32 deflt=-1, chooser_cb_t *del=NULL, void(idaapi *ins)(void *obj)=NULL, chooser_cb_t *update=NULL, void(idaapi *edit)(void *obj, uint32 n)=NULL, void(idaapi *enter)(void *obj, uint32 n)=NULL, void(idaapi *destroy)(void *obj)=NULL, const char *const *popup_names=NULL, int(idaapi *get_icon)(void *obj, uint32 n)=NULL)
| Convenience function: modal chooser. More...
uint32 | choose2 (int flags, int x0, int y0, int x1, int y1, void *obj, int ncol, const int *widths, uint32(idaapi *sizer)(void *obj), void(idaapi *getl)(void *obj, uint32 n, char *const *arrptr), const char *title, int icon, uint32 deflt=-1, chooser_cb_t *del=NULL, void(idaapi *ins)(void *obj)=NULL, chooser_cb_t *update=NULL, void(idaapi *edit)(void *obj, uint32 n)=NULL, void(idaapi *enter)(void *obj, uint32 n)=NULL, void(idaapi *destroy)(void *obj)=NULL, const char *const *popup_names=NULL, int(idaapi *get_icon)(void *obj, uint32 n)=NULL)
| Display a generic list chooser (n-column). More...
uint32 | choose2 (void *obj, int ncol, const int *widths, uint32(idaapi *sizer)(void *), void(idaapi *getl)(void *, uint32, char *const *), const char *title, int icon=-1, uint32 deflt=-1, chooser_cb_t *del=NULL, void(idaapi *ins)(void *)=NULL, chooser_cb_t *update=NULL, void(idaapi *edit)(void *, uint32)=NULL, void(idaapi *enter)(void *, uint32)=NULL, void(idaapi *destroy)(void *)=NULL, const char *const *popup_names=NULL, int(idaapi *get_icon)(void *obj, uint32 n)=NULL)
| Convenience function: modal chooser2. More...
uint32 | choose3 (const chooser_info_t *chi)
| Display a chooser with the benefit of additional callbacks. More...
nav_colorizer_t * | set_nav_colorizer (nav_colorizer_t *func)
| Install new navigation band colorizer (ui_set_nav_colorizer). More...
| CASSERT (sizeof(locchange_md_t)==sizeof(uint32))
bool | is_action_enabled (action_state_t s)
| Check if the given action state is one of AST_ENABLE*.
THREAD_SAFE int | execute_ui_requests (ui_requests_t *reqs)
| Execute a list of UI requests (ui_execute_ui_requests_list). More...
THREAD_SAFE int | execute_ui_requests (ui_request_t *req,...)
| Execute a variable number of UI requests (ui_execute_ui_requests). More...
THREAD_SAFE bool | cancel_exec_request (int req_id)
| Try to cancel an asynchronous exec request (ui_cancel_exec_request). More...
bool | jumpto (ea_t ea, int opnum=-1, int uijmp_flags=UIJMP_ACTIVATE)
| Jump to the specified address (ui_jumpto). More...
bool | banner (int wait)
| Show a banner dialog box (ui_banner). More...
THREAD_SAFE bool | is_msg_inited (void)
| Can we use msg() functions?
void | refresh_idaview (void)
| Refresh marked windows (ui_refreshmarked)
void | refresh_idaview_anyway (void)
| Refresh all disassembly views (ui_refresh), forces an immediate refresh. More...
void | analyzer_options (void)
| Allow the user to set analyzer options. (show a dialog box) (ui_analyzer_options)
ea_t | get_screen_ea (void)
| Get the address at the screen cursor (ui_screenea)
int | get_opnum (void)
| Get current operand number, -1 means no operand (ui_get_opnum)
bool | get_cursor (int *x, int *y)
| Get the cursor position on the screen (ui_get_cursor). More...
bool | get_output_cursor (int *x, int *y)
| Get coordinates of the output window's cursor (ui_get_output_cursor). More...
char * | get_curline (void)
| Get current line from the disassemble window (ui_get_curline). More...
bool | read_selection (ea_t *ea1, ea_t *ea2)
| Get the selected area boundaries (ui_readsel). More...
void | unmark_selection (void)
| Unmark selection (ui_unmarksel)
void | open_url (const char *url)
| Open the given url (ui_open_url)
ea_t | get_hexdump_ea (int hexdump_num)
| Get the current address in a hex view. More...
ushort | get_key_code (const char *keyname)
| Get keyboard key code by its name (ui_get_key_code)
ushort | lookup_key_code (int key, int shift, bool is_qt)
| Get shortcut code previously created by ui_get_key_code. More...
void | refresh_navband (bool force)
| Refresh navigation band if changed (ui_refresh_navband). More...
bool | refresh_chooser (const char *title)
| Mark a non-modal custom chooser for a refresh (ui_refresh_chooser). More...
bool | close_chooser (const char *title)
| Close a non-modal chooser (ui_close_chooser). More...
void | install_command_interpreter (const cli_t *cp)
| Install command line interpreter (ui_install_cli)
void | remove_command_interpreter (const cli_t *cp)
| Remove command line interpreter (ui_install_cli)
void | gen_disasm_text (ea_t ea1, ea_t ea2, text_t &text, bool truncate_lines)
| Generate disassembly text for a range. More...
THREAD_SAFE int | execute_sync (exec_request_t &req, int reqf)
| Execute code in the main thread. More...
bool | set_dock_pos (const char *src_ctrl, const char *dest_ctrl, int orient, int left=0, int top=0, int right=0, int bottom=0)
| Set the docking position of a form (ui_set_dock_pos). More...
int | load_custom_icon (const char *file_name)
| Load an icon from a file (ui_load_custom_icon_file). More...
int | load_custom_icon (const void *ptr, unsigned int len, const char *format)
| Load an icon and return its id (ui_load_custom_icon). More...
void | free_custom_icon (int icon_id)
| Free an icon loaded with load_custom_icon() (ui_free_custom_icon).
bool | process_ui_action (const char *name, int flags=0, void *param=NULL)
| Processes a UI action by name. More...
bool | take_database_snapshot (snapshot_t *ss, qstring *err_msg)
| Take a database snapshot (ui_take_database_snapshot). More...
bool | restore_database_snapshot (const snapshot_t *ss, ss_restore_cb_t cb, void *ud)
| Restore a database snapshot. More...
THREAD_SAFE qtimer_t | register_timer (int interval_ms, int(idaapi *callback)(void *ud), void *ud)
| Register a timer (ui_register_timer). More...
THREAD_SAFE bool | unregister_timer (qtimer_t t)
| Unregister a timer (ui_unregister_timer). More...
bool | register_action (const action_desc_t &desc)
| Create a new action (ui_register_action). More...
bool | unregister_action (const char *name)
| Delete a previously-registered action (ui_unregister_action). More...
void | get_registered_actions (qstrvec_t *out)
| Get a list of all currently-registered actions. More...
bool | create_toolbar (const char *name, const char *label, const char *before=NULL, int flags=0)
| Create a toolbar with the given name, label and optional position. More...
bool | delete_toolbar (const char *name)
| Delete an existing toolbar. More...
bool | create_menu (const char *name, const char *label, const char *before=NULL)
| Create a menu with the given name, label and optional position. More...
bool | delete_menu (const char *name)
| Delete an existing menu. More...
bool | attach_action_to_menu (const char *menupath, const char *name, int flags)
| Attach a previously-registered action to the menu (ui_attach_action_to_menu). More...
bool | detach_action_from_menu (const char *menupath, const char *name)
| Detach an action from the menu (ui_detach_action_from_menu). More...
bool | attach_action_to_toolbar (const char *toolbar_name, const char *name)
| Attach an action to an existing toolbar (ui_attach_action_to_toolbar). More...
bool | detach_action_from_toolbar (const char *toolbar_name, const char *name)
| Detach an action from the toolbar (ui_detach_action_from_toolbar). More...
bool | register_and_attach_to_menu (const char *menupath, const char *name, const char *label, const char *shortcut, int flags, action_handler_t *handler, const plugin_t *owner)
| Helper. More...
bool | set_menu_item_icon (const char *item_name, int icon_id)
| Set the icon of a menu item (ui_set_menu_item_icon). More...
bool | enable_menu_item (const char *item_name, bool enable)
| Enable or disable a menu item (ui_enable_menu_item). More...
TForm * | create_tform (const char *caption, HWND *handle)
| Create a new tform (only gui version) (ui_create_tform). More...
void | open_tform (TForm *form, int options)
| Open a TForm (only gui version) (ui_open_tform). More...
void | close_tform (TForm *form, int options)
| Close tform (ui_close_tform, only gui version). More...
void | switchto_tform (TForm *form, bool take_focus)
| Activate tform (only gui version) (ui_switchto_tform). More...
TForm * | find_tform (const char *caption)
| Find tform with the specified caption (only gui version) (ui_find_tform). More...
TForm * | get_current_tform (void)
| Get a pointer to the current tform (only gui version) (ui_get_current_tform). More...
tform_type_t | get_tform_type (TForm *form)
| Get the type of the TForm * (ui_get_tform_type).
bool | get_tform_title (TForm *form, char *buf, size_t bufsize)
| Get the TForm's title (ui_get_tform_title).
TCustomControl * | create_custom_viewer (const char *title, TWinControl *parent, const place_t *minplace, const place_t *maxplace, const place_t *curplace, const renderer_info_t *rinfo, void *ud, const custom_viewer_handlers_t *cvhandlers, void *cvhandlers_ud)
| Create new ida viewer based on place_t (ui_new_custom_viewer). More...
bool | custom_viewer_jump (TCustomControl *v, const lochist_entry_t &loc, uint32 flags)
| Append 'loc' to the viewer's history, and cause the viewer to display it. More...
bool | ea_viewer_history_push_and_jump (TCustomControl *v, ea_t ea, int x, int y, int lnnum)
| Push current location in the history and jump to the given location (ui_ea_viewer_history_push_and_jump). More...
bool | get_ea_viewer_history_info (int *nback, int *nfwd, TCustomControl *v)
| Get information about what's in the history (ui_ea_viewer_history_info). More...
void | refresh_custom_viewer (TCustomControl *custom_viewer)
| Refresh custom ida viewer (ui_refresh_custom_viewer)
void | repaint_custom_viewer (TCustomControl *custom_viewer)
| Repaint the given widget immediately (ui_repaint_qwidget)
void | destroy_custom_viewer (TCustomControl *custom_viewer)
| Destroy custom ida viewer.
bool | jumpto (TCustomControl *custom_viewer, place_t *place, int x, int y)
| Set cursor position in custom ida viewer. More...
place_t * | get_custom_viewer_place (TCustomControl *custom_viewer, bool mouse, int *x, int *y)
| Get current place in a custom viewer (ui_get_curplace). More...
bool | is_idaq ()
| Are we running inside IDA Qt?
bool | attach_action_to_popup (TForm *form, TPopupMenu *popup_handle, const char *name, const char *popuppath=NULL, int flags=0)
| Insert a previously-registered action into the form's popup menu (ui_attach_action_to_popup). More...
bool | detach_action_from_popup (TForm *form, const char *name)
| Remove a previously-registered action, from the list of 'permanent' context menu actions for this widget (ui_detach_action_from_popup). More...
bool | attach_dynamic_action_to_popup (TForm *form, TPopupMenu *popup_handle, const action_desc_t &desc, const char *popuppath=NULL, int flags=0, char *buf=NULL, size_t bufsize=size_t(-1))
| Create & insert an action into the form's popup menu (ui_attach_dynamic_action_to_popup). More...
bool | update_action_label (const char *name, const char *label)
| Update an action's label (ui_update_action_attr). More...
bool | update_action_shortcut (const char *name, const char *shortcut)
| Update an action's shortcut (ui_update_action_attr). More...
bool | update_action_tooltip (const char *name, const char *tooltip)
| Update an action's tooltip (ui_update_action_attr). More...
bool | update_action_icon (const char *name, int icon)
| Update an action's icon (ui_update_action_attr). More...
bool | update_action_state (const char *name, action_state_t state)
| Update an action's state (ui_update_action_attr). More...
bool | update_action_checkable (const char *name, bool checkable)
| Update an action's checkability (ui_update_action_attr). More...
bool | update_action_checked (const char *name, bool checked)
| Update an action's checked state (ui_update_action_attr). More...
bool | update_action_visibility (const char *name, bool visible)
| Update an action's visibility (ui_update_action_attr). More...
bool | get_action_label (const char *name, qstring *label)
| Get an action's label (ui_get_action_attr). More...
bool | get_action_shortcut (const char *name, qstring *shortcut)
| Get an action's shortcut (ui_get_action_attr). More...
bool | get_action_tooltip (const char *name, qstring *tooltip)
| Get an action's tooltip (ui_get_action_attr). More...
bool | get_action_icon (const char *name, int *icon)
| Get an action's icon (ui_get_action_attr). More...
bool | get_action_state (const char *name, action_state_t *state)
| Get an action's state (ui_get_action_attr). More...
bool | get_action_checkable (const char *name, bool *checkable)
| Get an action's checkability (ui_get_action_attr). More...
bool | get_action_checked (const char *name, bool *checked)
| Get an action's checked state (ui_get_action_attr). More...
bool | get_action_visibility (const char *name, bool *visibility)
| Get an action's visibility (ui_get_action_attr). More...
void | set_custom_viewer_handlers (TCustomControl *custom_viewer, const custom_viewer_handlers_t *cvh, void *cvh_ud)
| Set handlers for custom viewer events (::ui_obsolete_set_custom_viewer_handlers2 - also see ui_set_custom_viewer_handler). More...
void * | set_custom_viewer_handler (TCustomControl *custom_viewer, custom_viewer_handler_id_t handler_id, void *handler_or_data)
| Set a handler for a custom viewer event (ui_set_custom_viewer_handler). More...
bool | set_custom_viewer_qt_aware (TCustomControl *custom_viewer)
| Allow the given viewer to interpret Qt events (ui_set_custom_viewer_handler)
const char * | get_custom_viewer_curline (TCustomControl *custom_viewer, bool mouse)
| Get current line of custom viewer (ui_get_custom_viewer_curline). More...
bool | get_output_curline (char *buf, size_t bufsize, bool mouse)
| Get current line of output window (ui_get_output_curline). More...
bool | get_output_selected_text (char *buf, size_t bufsize)
| Returns selected text from output window (ui_get_output_selected_text). More...
TCustomControl * | get_tform_idaview (TForm *parent)
| Get the TCustomControl associated with the given TForm (ui_get_tform_idaview). More...
TCustomControl * | get_current_viewer (void)
| Get current ida viewer (idaview or custom viewer) (ui_get_current_viewer)
tcc_renderer_type_t | get_view_renderer_type (TCustomControl *v)
| Get the type of renderer currently in use in the given view (ui_get_renderer_type)
void | set_view_renderer_type (TCustomControl *v, tcc_renderer_type_t rt)
| Set the type of renderer to use in a view (ui_set_renderer_type)
void | set_custom_viewer_range (TCustomControl *custom_viewer, const place_t *minplace, const place_t *maxplace)
| Set position range for custom viewer (ui_set_custom_viewer_range)
bool | is_idaview (TCustomControl *v)
| Is the given custom view an idaview? (ui_is_idaview)
void | get_viewer_name (TCustomControl *v, char *buf, size_t bufsize)
| Get the name of the custom or ida viewer (ui_get_viewer_name). More...
bool | readsel2 (TCustomControl *v, twinpos_t *p1, twinpos_t *p2)
| Get the selected area boundaries (ui_readsel2). More...
TCustomControl * | create_code_viewer (TForm *parent, TCustomControl *custview, int flags=0)
| Create a code viewer (ui_new_code_viewer). More...
void * | set_code_viewer_handler (TCustomControl *code_viewer, custom_viewer_handler_id_t handler_id, void *handler_or_data)
| Set a handler for a code viewer event (ui_set_custom_viewer_handler). More...
bool | set_code_viewer_user_data (TCustomControl *code_viewer, void *ud)
| Set the user data on a code viewer (ui_set_custom_viewer_handler).
void * | get_viewer_user_data (TCustomControl *viewer)
| Get the user data from a custom viewer (ui_get_viewer_user_data)
tcc_place_type_t | get_viewer_place_type (TCustomControl *viewer)
| Get the type of place_t instances a viewer uses & creates (ui_get_viewer_place_type).
void | set_code_viewer_line_handlers (TCustomControl *code_viewer, code_viewer_lines_click_t *click_handler, code_viewer_lines_click_t *popup_handler, code_viewer_lines_click_t *dblclick_handler, code_viewer_lines_icon_t *drawicon_handler, code_viewer_lines_linenum_t *linenum_handler)
| Set handlers for code viewer line events. More...
bool | set_code_viewer_lines_icon_margin (TCustomControl *code_viewer, int margin)
| Set space allowed for icons in the margin of a code viewer (ui_set_custom_viewer_handler).
bool | set_code_viewer_lines_alignment (TCustomControl *code_viewer, int align)
| Set alignment for lines in a code viewer (ui_set_custom_viewer_handler).
bool | set_code_viewer_lines_radix (TCustomControl *code_viewer, int radix)
| Set radix for values displayed in a code viewer (ui_set_custom_viewer_handler).
bool | set_code_viewer_is_source (TCustomControl *code_viewer)
| Specify that the given code viewer is used to display source code (ui_set_custom_viewer_handler).
int | get_tab_size (const char *path)
| Get the size of a tab in spaces (ui_get_tab_size). More...
THREAD_SAFE void | clearBreak (void)
| Clear Ctrl-Break flag (ui_clearbreak)
THREAD_SAFE void | setBreak (void)
| Set Ctrl-Break flag (ui_setbreak)
THREAD_SAFE bool | wasBreak (void)
| Test the ctrl-break flag (ui_wasbreak). More...
bool | ui_load_new_file (const char *filename, linput_t *li, ushort neflags)
| Display a load file dialog and load file (ui_load_file). More...
bool | ui_run_debugger (const char *dbgopts, const char *exename, int argc, const char *const *argv)
| Load a debugger plugin and run the specified program (ui_run_dbg). More...
bool | load_dbg_dbginfo (const char *path, linput_t *li=NULL, ea_t base=BADADDR, bool verbose=false)
| Load debugging information from a file. More...
int | add_idc_hotkey (const char *hotkey, const char *idcfunc)
| Add hotkey for IDC function (ui_add_idckey). More...
bool | del_idc_hotkey (const char *hotkey)
| Delete IDC function hotkey (ui_del_idckey). More...
void | get_user_strlist_options (strwinsetup_t *out)
void | setup_range_marker (void)
| Initialize pointer to idaview marker.
bool | get_highlighted_identifier (char *buf, size_t bufsize, int flags)
| Get the highlighted identifier in the current IDAView (ui_get_highlighted_identifier). More...
void | mark_range_for_refresh (ea_t ea, asize_t size)
| Inform the UI about any modifications of [ea, ea+size)
void | mark_all_eaviews_for_refresh (void)
| Tell UI to refresh all idaviews and hexviews.
TForm * | open_exports_window (ea_t ea)
| Open the exports window (ui_open_builtin). More...
TForm * | open_imports_window (ea_t ea)
| Open the exports window (ui_open_builtin). More...
TForm * | open_names_window (ea_t ea)
| Open the names window (ui_open_builtin). More...
TForm * | open_funcs_window (ea_t ea)
| Open the functions window (ui_open_builtin). More...
TForm * | open_strings_window (ea_t ea, ea_t selstart=BADADDR, ea_t selend=BADADDR)
| Open the strings window (ui_open_builtin). More...
TForm * | open_segments_window (ea_t ea)
| Open the segments window (ui_open_builtin). More...
TForm * | open_segregs_window (ea_t ea)
| Open the segment registers window (ui_open_builtin). More...
TForm * | open_selectors_window (void)
| Open the selectors window (ui_open_builtin). More...
TForm * | open_signatures_window (void)
| Open the signatures window (ui_open_builtin). More...
TForm * | open_tils_window (void)
| Open the type libraries window (ui_open_builtin). More...
TForm * | open_loctypes_window (int ordinal)
| Open the local types window (ui_open_builtin). More...
TForm * | open_calls_window (ea_t ea)
| Open the function calls window (ui_open_builtin). More...
TForm * | open_problems_window (ea_t ea)
| Open the problems window (ui_open_builtin). More...
TForm * | open_bpts_window (ea_t ea)
| Open the breakpoints window (ui_open_builtin). More...
TForm * | open_threads_window (void)
| Open the threads window (ui_open_builtin). More...
TForm * | open_modules_window (void)
| Open the modules window (ui_open_builtin). More...
TForm * | open_trace_window (void)
| Open the trace window (ui_open_builtin). More...
TForm * | open_stack_window (void)
| Open the call stack window (ui_open_builtin). More...
TForm * | open_xrefs_window (ea_t ea)
| Open the cross references window (ui_open_builtin). More...
TForm * | open_frame_window (func_t *pfn, uval_t offset)
| Open the frame window for the given function (ui_open_builtin). More...
TForm * | open_navband_window (ea_t ea, int zoom)
| Open the navigation band window (ui_open_builtin). More...
TForm * | open_enums_window (tid_t const_id=BADADDR)
| Open the enums window (ui_open_builtin). More...
TForm * | open_structs_window (tid_t id=BADADDR, uval_t offset=0)
| Open the structs window (ui_open_builtin). More...
TForm * | open_disasm_window (const char *window_title, const areavec_t *ranges=NULL)
| Open a disassembly view (ui_open_builtin). More...
TForm * | open_hexdump_window (const char *window_title)
| Open a hexdump view (ui_open_builtin). More...
TForm * | open_notepad_window (void)
| Open the notepad window (ui_open_builtin). More...
char * | choose_idasgn (void)
| Choose a signature (ui_choose, chtype_idasgn). More...
bool | choose_til (char *buf, size_t bufsize)
| Choose a type library (ui_choose, chtype_idatil). More...
ea_t | choose_entry (const char *title)
| Choose an entry point (ui_choose, chtype_entry). More...
ea_t | choose_name (const char *title)
| Choose a name (ui_choose, chtype_name). More...
ea_t | choose_stkvar_xref (func_t *pfn, member_t *mptr)
| Choose an xref to a stack variable (ui_choose, chtype_name). More...
ea_t | choose_xref (ea_t to)
| Choose an xref to an address (ui_choose, chtype_xref). More...
enum_t | choose_enum (const char *title, enum_t default_id)
| Choose an enum (ui_choose, chtype_enum). More...
enum_t | choose_enum_by_value (const char *title, enum_t default_id, uval_t value, int nbytes, uchar *serial)
| Choose an enum, restricted by value & size (ui_choose, chtype_enum_by_value_and_size). More...
func_t * | choose_func (const char *title, ea_t default_ea)
| Choose a function (ui_choose, chtype_func). More...
segment_t * | choose_segm (const char *title, ea_t default_ea)
| Choose a segment (ui_choose, chtype_segm). More...
struc_t * | choose_struc (const char *title)
| Choose a structure (ui_choose, chtype_segm). More...
segreg_area_t * | choose_srcp (const char *title)
| Choose a segment register change point (ui_choose, chtype_srcp). More...
int | choose_struc_path (const char *title, tid_t strid, uval_t offset, adiff_t delta, bool appzero, tid_t *path)
| Get path to a structure offset (for nested structures/enums) (ui_choose, chtype_strpath).
void * | get_chooser_obj (const char *chooser_caption)
| Get the underlying object of the specified chooser (ui_get_chooser_obj). More...
bool | get_chooser_data (qstrvec_t *out, const char *chooser_caption, uint32 n)
| Get the text corresponding to the index N in the chooser data.
bool idaapi | enable_chooser_item_attrs (const char *chooser_caption, bool enable)
| Enable item-specific attributes for chooser items (ui_enable_chooser_item_attrs). More...
THREAD_SAFE void | show_wait_box_v (const char *format, va_list va)
| See show_wait_box()
THREAD_SAFE void | show_wait_box (const char *format,...)
| Display a dialog box with "Please wait...". More...
THREAD_SAFE void | hide_wait_box (void)
| Hide the "Please wait dialog box".
THREAD_SAFE void | replace_wait_box (const char *format,...)
| Replace the label of "Please wait dialog box".
int | AskUsingForm_cv (const char *format, va_list va)
| See AskUsingForm_c()
TForm * | OpenForm_cv (const char *format, int flags, va_list va)
| Create and/or activate dockable modeless form (ui_show_form). More...
void | close_form (const TView *const *fields, int close_normally)
| Close the form. More...
void | beep (beep_t beep_type=beep_default)
| Issue a beeping sound (ui_beep). More...
THREAD_SAFE void | ask_for_feedback (const char *format,...)
| Show a message box asking to send the input file to suppo.nosp@m.rt@h.nosp@m.ex-ra.nosp@m.ys.c.nosp@m.om. More...
char * | askident (const char *defval, const char *format,...)
| Display a dialog box and wait for the user to input an identifier (ui_askident). More...
bool | askaddr (ea_t *addr, const char *format,...)
| Display a dialog box and wait for the user to input an address (ui_askaddr). More...
bool | askseg (sel_t *sel, const char *format,...)
| Display a dialog box and wait for the user to input an segment name (ui_askseg). More...
bool | asklong (sval_t *value, const char *format,...)
| Display a dialog box and wait for the user to input an number (ui_asklong). More...
bool | display_copyright_warning (void)
| Display copyright warning (ui_copywarn). More...
THREAD_SAFE NORETURN void | error (const char *format,...)
| Display error dialog box and exit. More...
THREAD_SAFE void | warning (const char *format,...)
| Display warning dialog box and wait for the user to press Enter or Esc. More...
THREAD_SAFE void | info (const char *format,...)
| Display info dialog box and wait for the user to press Enter or Esc. More...
THREAD_SAFE NORETURN void | nomem (const char *format,...)
| Display "no memory for module ..." dialog box and exit. More...
THREAD_SAFE int | msg (const char *format,...)
| Output a formatted string to messages window [analog of printf()]. More...
THREAD_SAFE int | umsg (const char *format,...)
| Show a message in the message window (ui_umsg, also see ui_msg). More...
int | AskUsingForm_c (const char *form,...)
| Display a dialog box and wait for the user. More...
TForm * | OpenForm_c (const char *form, int flags,...)
| Display a dockable modeless dialog box and return a handle to it. More...
int | askyn_cv (int deflt, const char *format, va_list va)
| See askyn_c()
int | askyn_c (int deflt, const char *format,...)
| Display a dialog box and get choice from "Yes", "No", "Cancel". More...
int | askbuttons_c (const char *Yes, const char *No, const char *Cancel, int deflt, const char *format,...)
| Display a dialog box and get choice from maximum three possibilities (ui_askyn). More...
char * | askstr (int hist, const char *defval, const char *format,...)
| Display a dialog box and wait for the user to input a text string (ui_askstr). More...
bool | askqstr (qstring *str, const char *format,...)
| Display a dialog box and wait for the user to input a text string (ui_askstr). More...
char * | asktext (size_t size, char *answer, const char *defval, const char *format,...)
| Display a dialog box and wait for the user to input multiline text (ui_asktext). More...
char * | askfile_c (int savefile, const char *defval, const char *format,...)
| Display a dialog box and wait for the user to input a file name (ui_askfile). More...
char * | askfile2_c (bool forsave, const char *defdir, const char *filters, const char *format,...)
| Display a dialog box and wait for the user to input a file name (ui_askfile2). More...
int | register_addon (const addon_info_t *info)
| Register an add-on. More...
int | addon_count ()
| Get number of installed addons.
bool | get_addon_info (const char *id, addon_info_t *info)
| Get info about a registered addon with a given product code. More...
bool | get_addon_info_idx (int index, addon_info_t *info)
| Get info about a registered addon with specific index. More...
idaman THREAD_SAFE char *ida_export | add_spaces (char *str, size_t bufsize, ssize_t len)
| Add space characters to the colored string so that its length will be at least 'len' characters. More...
idaman THREAD_SAFE char *ida_export | trim (char *str)
| Remove trailing space characters from a string. More...
idaman THREAD_SAFE const char *ida_export | skipSpaces (const char *ptr)
| Skip whitespaces in the string. More...
char * | skipSpaces (char *ptr)
idaman THREAD_SAFE const char *ida_export | strarray (const strarray_t *array, size_t array_size, int code)
| Find a line with the specified code in the strarray_t array. More...
idaman THREAD_SAFE void ida_export | entab (char *string)
| Convert whitespace to tabulations. More...
idaman size_t ida_export | ea2str (ea_t ea, char *buf, size_t bufsize)
| Convert linear address to ascii string.
bool | ea2str (qstring *out, ea_t ea)
idaman bool ida_export | str2ea (const char *str, ea_t *ea_ptr, ea_t screen_ea)
| Convert string to linear address. More...
idaman bool ida_export | str2ea_ex (const char *str, ea_t *ea_ptr, ea_t screen_ea, int flags)
| Same as str2ea() but possibly with some steps skipped. More...
idaman bool ida_export | atoea (const char *str, ea_t *pea)
| Convert a number in C notation to an address. More...
idaman size_t ida_export | stoa (ea_t from, sel_t seg, char *buf, size_t bufsize)
| Convert segment selector to ascii string.
idaman int ida_export | atos (const char *str, sel_t *seg)
| Convert ascii string to segment selector. More...
idaman size_t ida_export | b2a_width (int nbytes, int radix)
| Get the number of ascii characters required to represent a number with the specified number of bytes and radix. More...
idaman size_t ida_export | b2a32 (uint32 x, char *buf, size_t bufsize, int nbytes, int radix)
| Convert number to ascii string (includes leading zeroes). More...
idaman size_t ida_export | b2a64 (uint64 x, char *buf, size_t bufsize, int nbytes, int radix)
| Same as b2a32(), but can handle 'nbytes' = 8.
idaman size_t ida_export | btoa_width (int nbytes, flags_t flag, int n)
| Get max number of ascii characters required to represent a given type of value, with a given size (without leading zeroes). More...
idaman size_t ida_export | btoa32 (char *buf, size_t bufsize, uint32 x, int radix=0)
| Same as b2a32(), but will generate a string without any leading zeroes. More...
idaman size_t ida_export | btoa64 (char *buf, size_t bufsize, uint64 x, int radix=0)
| 64-bit equivalent of btoa32()
idaman size_t ida_export | btoa128 (char *buf, size_t bufsize, uint128 x, int radix=0)
| 128-bit equivalent of btoa32()
idaman size_t ida_export | numop2str (char *buf, size_t bufsize, ea_t ea, int n, uint64 x, int nbytes, int radix=0)
| Convert instruction operand immediate number to ascii. More...
idaman bool ida_export | atob32 (const char *str, uint32 *x)
| Convert ascii to a number using the current assembler formats. More...
idaman bool ida_export | atob64 (const char *str, uint64 *x)
| 64-bit equivalent of atob32()
idaman size_t ida_export | print_disp (char *buf, char *end, adiff_t disp)
| Auxiliary function. More...
idaman THREAD_SAFE char *ida_export | str2user (char *dst, const char *src, size_t dstsize)
| Make a user representation.
idaman THREAD_SAFE char *ida_export | user2str (char *dst, const char *src, size_t dstsize)
| Make an internal representation.
idaman THREAD_SAFE char ida_export | back_char (const char *&p)
| Translate char after '\'.
idaman THREAD_SAFE void ida_export | qstr2user (qstring *dst, const qstring &src)
| see str2user()
idaman THREAD_SAFE void ida_export | user2qstr (qstring *dst, const qstring &src)
| see user2str()
idaman THREAD_SAFE int ida_export | r50_to_asc (const ushort *r, char *p, int k)
| Convert RADIX50 -> ASCII. More...
int THREAD_SAFE | asc_to_r50 (const char *p, ushort *r, int k)
| Convert ASCII -> RADIX50 (see r50_to_asc())
THREAD_SAFE uchar *idaapi | pack_db (uchar *ptr, uchar *end, uchar x)
| Pack a byte into a character string. More...
THREAD_SAFE uchar idaapi | unpack_db (const uchar **pptr, const uchar *end)
| Unpack a byte from a character string, pack_db()
idaman THREAD_SAFE uchar *ida_export | pack_dw (uchar *ptr, uchar *end, uint16 x)
| pack a word, see pack_db()
idaman THREAD_SAFE uchar *ida_export | pack_dd (uchar *ptr, uchar *end, uint32 x)
| pack a double word, see pack_db()
idaman THREAD_SAFE uchar *ida_export | pack_dq (uchar *ptr, uchar *end, uint64 x)
| pack a quadword, see pack_db()
idaman THREAD_SAFE ushort ida_export | unpack_dw (const uchar **pptr, const uchar *end)
| unpack a word, see unpack_db()
idaman THREAD_SAFE uint32 ida_export | unpack_dd (const uchar **pptr, const uchar *end)
| unpack a double word, see unpack_db()
idaman THREAD_SAFE uint64 ida_export | unpack_dq (const uchar **pptr, const uchar *end)
| unpack a quadword, see unpack_db()
THREAD_SAFE uchar * | pack_ea (uchar *ptr, uchar *end, ea_t ea)
| Pack an ea value into a character string, see pack_dd()/pack_dq()
THREAD_SAFE ea_t | unpack_ea (const uchar **ptr, const uchar *end)
| Unpack an ea value, see unpack_dd()/unpack_dq()
idaman THREAD_SAFE uchar *ida_export | pack_ds (uchar *ptr, uchar *end, const char *x, size_t len=0)
| Pack a string. More...
idaman THREAD_SAFE char *ida_export | unpack_ds (const uchar **pptr, const uchar *end, bool empty_null)
| Unpack a string. More...
THREAD_SAFE void *idaapi | unpack_obj (const uchar **pptr, const uchar *end, void *destbuf, size_t destsize)
| Unpack an object of a known size. More...
THREAD_SAFE void *idaapi | unpack_buf (const uchar **pptr, const uchar *end, size_t *sz)
| Unpack an object of an unknown size (packed with append_buf()). More...
THREAD_SAFE const void *idaapi | unpack_obj_inplace (const uchar **pptr, const uchar *end, size_t objsize)
| In-place version of unpack_obj(). More...
THREAD_SAFE const void *idaapi | unpack_buf_inplace (const uchar **pptr, const uchar *end, size_t *sz)
| In-place version of unpack_buf(). More...
THREAD_SAFE void | unpack_eavec (ea_t ea, eavec_t &insns, const uchar **ptr, const uchar *end)
| Unpack a vector of ea values. More...
idaman THREAD_SAFE bool ida_export | unpack_xleb128 (void *res, int nbits, bool is_signed, const uchar **pptr, const uchar *end)
| Unpack an LEB128 encoded (DWARF-3 style) signed/unsigned value. More...
template<class T >
bool | unpack_uleb128 (T *res, const uchar **pptr, const uchar *end)
template<class T >
bool | unpack_sleb128 (T *res, const uchar **pptr, const uchar *end)
int | ds_packed_size (const char *s)
THREAD_SAFE void | append_db (bytevec_t &v, uchar x)
| Append a byte to a bytevec.
THREAD_SAFE void | append_obj (bytevec_t &v, const void *obj, size_t size)
| Append 'size' bytes from 'obj' to the bytevec;.
THREAD_SAFE void | append_dw (bytevec_t &v, uint16 x)
| Pack a word and append the result to the bytevec.
THREAD_SAFE void | append_dd (bytevec_t &v, uint32 x)
| Pack a double word and append the result to the bytevec.
THREAD_SAFE void | append_dq (bytevec_t &v, uint64 x)
| Pack a quadword and append the result to the bytevec.
THREAD_SAFE void | append_ea (bytevec_t &v, ea_t x)
| Pack an ea value and append the result to the bytevec.
THREAD_SAFE void | append_ds (bytevec_t &v, const char *x)
| Pack a string and append the result to the bytevec.
THREAD_SAFE void | append_buf (bytevec_t &v, const void *buf, size_t len)
| Pack an object of size 'len' and append the result to the bytevec.
THREAD_SAFE void | append_eavec (bytevec_t &v, ea_t ea, const eavec_t &insns)
| Pack an eavec and append the result to the bytevec. More...
THREAD_SAFE char * | unpack_str (const uchar **ptr, const uchar *end)
| Unpack a string in place. More...
int | dw_size (uchar first_byte)
int | dd_size (uchar first_byte)
template<class T >
uchar | extract_db (T &v)
template<class T >
void * | extract_obj (T &v, void *destbuf, size_t destsize)
template<class T >
uint16 | extract_dw (T &v)
template<class T >
uint32 | extract_dd (T &v)
template<class T >
uint64 | extract_dq (T &v)
template<class T >
ea_t | extract_ea (T &v)
template<class T >
void * | extract_buf (T &v, size_t size)
template<class T >
void * | extract_array (T &v, size_t *sz, size_t maxsize)
idaman THREAD_SAFE uint32 ida_export | calc_crc32 (uint32 crc, const void *buf, size_t len)
| Calculate CRC32 (polynom 0xEDB88320, zlib compatible). More...
idaman THREAD_SAFE uint32 ida_export | calc_file_crc32 (linput_t *fp)
| Calculate an input source CRC32.
idaman int ida_export | regex_match (const char *str, const char *pattern, bool sense_case)
| Match a string with a regular expression. More...
template<class T >
void | serialize_place (bytevec_t *out, T *in)
template<class T >
bool | deserialize_place (T *out, const uchar **pptr, const uchar *end)

## Macros
#define | SETMENU_POSMASK 0x3
#define | SETMENU_INS 0x0
| add menu item before the specified path (default)
#define | SETMENU_APP 0x1
| add menu item after the specified path
#define | SETMENU_FIRST 0x2
| add item to the beginning of menu
#define | CREATETB_ADV 0x1
| toolbar is for 'advanced mode' only
#define | IDCHK_OK 0
| ok
#define | IDCHK_ARG -1
| bad argument(s)
#define | IDCHK_KEY -2
| bad hotkey name
#define | IDCHK_MAX -3
| too many IDC hotkeys
#define | SETMENU_CTXMASK 0x7C000000
| Deprecated. Don't use this anymore.
#define | SETMENU_CTXAPP 0x00000000
| Deprecated. Don't use this anymore. More...
#define | SETMENU_CTXIDA 0x04000000
| Deprecated. Don't use this anymore. More...
#define | SETMENU_CTXSTR 0x08000000
| Deprecated. Don't use this anymore. More...
#define | SETMENU_CTXENUM 0x0C000000
| Deprecated. Don't use this anymore. More...
#define | SETMENU_CTXEA 0x10000000
| Deprecated. Don't use this anymore. More...
#define | SETMENU_CTXVIEW 0x14000000
| Deprecated. Don't use this anymore. More...
#define | FORM_MDI 0x01
| start by default as MDI
#define | FORM_TAB 0x02
| attached by default to a tab
#define | FORM_RESTORE 0x04
| restore state from desktop config
#define | FORM_ONTOP 0x08
| form should be "ontop"
#define | FORM_MENU 0x10
| form must be listed in the windows menu More...
#define | FORM_CENTERED 0x20
| form will be centered on the screen More...
#define | FORM_PERSIST 0x40
| form will persist until explicitly closed with close_tform() More...
#define | FORM_QWIDGET 0x80
| windows: use QWidget* instead of HWND in ui_tform_visible More...
#define | FORM_CLOSED_BY_ESC 0x100
| override idagui.cfg:CLOSED_BY_ESC: esc will close
#define | FORM_NOT_CLOSED_BY_ESC 0x200
| override idagui.cfg:CLOSED_BY_ESC: esc will not close
#define | FORM_SAVE 0x1
| save state in desktop config
#define | FORM_NO_CONTEXT 0x2
| don't change the current context (useful for toolbars)
#define | FORM_DONT_SAVE_SIZE 0x4
| don't save size of the window
#define | FORM_CLOSE_LATER 0x8
| assign the deletion of the form to the UI loop ///< More...
#define | DP_LEFT 0x0001
| Dock src_form to the left of dest_form.
#define | DP_TOP 0x0002
| Dock src_form above dest_form.
#define | DP_RIGHT 0x0004
| Dock src_form to the right of dest_form.
#define | DP_BOTTOM 0x0008
| Dock src_form below dest_form.
#define | DP_INSIDE 0x0010
| Create a new tab bar with both src_form and dest_form.
#define | DP_TAB 0x0040
| Place src_form into a tab next to dest_form,. More...
#define | DP_BEFORE 0x0020
| place src_form before dst_form in the tab bar instead of after More...
#define | DP_FLOATING 0x0080
| Make src_form floating.
#define | CDVF_NOLINES 0x0001
| don't show line numbers
#define | CDVF_LINEICONS 0x0002
| icons can be drawn over the line control
#define | CDVF_STATUSBAR 0x0004
| keep the status bar in the custom viewer
#define | SVF_COPY_LINES 0x0000
| keep a local copy of '*lines'
#define | SVF_LINES_BYPTR 0x0001
| remember the 'lines' ptr. do not make a copy of '*lines'
#define | CVNF_LAZY (1 << 0)
| try and move the cursor to a line displaying the More...
#define | CVNF_JUMP (1 << 1)
| push the current position in this viewer's More...
#define | CVNF_ACT (1 << 2)
| activate (i.e., switch to) the viewer. More...
#define | KERNEL_VERSION_MAGIC1 0x23967034
#define | KERNEL_VERSION_MAGIC2 0xAAEE67BE
#define | DEFAULT_PLACE_LNNUM short(-1)
#define | define_place_exported_functions(classname)
| Helper to define exported functions for place_t implementations. More...
#define | define_place_virtual_functions(class)
| Helper to define virtual functions in place_t implementations.
#define | PCF_EA_CAPABLE 0x00000001
#define | DECLARE_LINEARRAY_HELPERS(decl)
| Helper for declaring member functions of the linearray_t class. More...
#define | BWN_UNKNOWN -1
| unknown window
#define | BWN_EXPORTS 0
| exports
#define | BWN_IMPORTS 1
| imports
#define | BWN_NAMES 2
| names
#define | BWN_FUNCS 3
| functions
#define | BWN_STRINGS 4
| strings
#define | BWN_SEGS 5
| segments
#define | BWN_SEGREGS 6
| segment registers
#define | BWN_SELS 7
| selectors
#define | BWN_SIGNS 8
| signatures
#define | BWN_TILS 9
| type libraries
#define | BWN_LOCTYPS 10
| local types
#define | BWN_CALLS 11
| function calls
#define | BWN_PROBS 12
| problems
#define | BWN_BPTS 13
| breakpoints
#define | BWN_THREADS 14
| threads
#define | BWN_MODULES 15
| modules
#define | BWN_TRACE 16
| trace view
#define | BWN_CALL_STACK 17
| call stack
#define | BWN_XREFS 18
| xrefs
#define | BWN_SEARCH 19
| search results
#define | BWN_FRAME 25
| function frame
#define | BWN_NAVBAND 26
| navigation band
#define | BWN_ENUMS 27
| enumerations
#define | BWN_STRUCTS 28
| structures
#define | BWN_DISASM 29
| disassembly views
#define | BWN_DUMP 30
| hex dumps
#define | BWN_NOTEPAD 31
| notepad
#define | BWN_OUTPUT 32
| the text area, in the output window
#define | BWN_CLI 33
| the command-line, in the output window
#define | BWN_WATCH 34
| the 'watches' debugger window
#define | BWN_LOCALS 35
| the 'locals' debugger window
#define | BWN_STKVIEW 36
| the 'Stack view' debugger window
#define | BWN_CHOOSER 37
| a non-builtin chooser
#define | BWN_SHORTCUTCSR 38
| the shortcuts chooser (Qt version only)
#define | BWN_SHORTCUTWIN 39
| the shortcuts window (Qt version only)
#define | BWN_CPUREGS 40
| one of the 'General registers', 'FPU register', ... debugger windows
#define | BWN_SO_STRUCTS 41
| the 'Structure offsets' dialog's 'Structures and Unions' panel
#define | BWN_SO_OFFSETS 42
| the 'Structure offsets' dialog's offset panel
#define | BWN_CMDPALCSR 43
| the command palette chooser (Qt version only)
#define | BWN_CMDPALWIN 44
| the command palette window (Qt version only)
#define | BWN_STACK BWN_CALL_STACK
| Alias. More...
#define | BWN_DISASMS BWN_DISASM
| Alias. More...
#define | BWN_DUMPS BWN_DUMP
| Alias. More...
#define | BWN_SEARCHS BWN_SEARCH
| Alias. More...
#define | IWID_EXPORTS (1u << BWN_EXPORTS)
| exports (0)
#define | IWID_IMPORTS (1u << BWN_IMPORTS)
| imports (1)
#define | IWID_NAMES (1u << BWN_NAMES )
| names (2)
#define | IWID_FUNCS (1u << BWN_FUNCS )
| functions (3)
#define | IWID_STRINGS (1u << BWN_STRINGS)
| strings (4)
#define | IWID_SEGS (1u << BWN_SEGS )
| segments (5)
#define | IWID_SEGREGS (1u << BWN_SEGREGS)
| segment registers (6)
#define | IWID_SELS (1u << BWN_SELS )
| selectors (7)
#define | IWID_SIGNS (1u << BWN_SIGNS )
| signatures (8)
#define | IWID_TILS (1u << BWN_TILS )
| type libraries (9)
#define | IWID_LOCTYPS (1u << BWN_LOCTYPS)
| local types (10)
#define | IWID_CALLS (1u << BWN_CALLS )
| function calls (11)
#define | IWID_PROBS (1u << BWN_PROBS )
| problems (12)
#define | IWID_BPTS (1u << BWN_BPTS )
| breakpoints (13)
#define | IWID_THREADS (1u << BWN_THREADS)
| threads (14)
#define | IWID_MODULES (1u << BWN_MODULES)
| modules (15)
#define | IWID_TRACE (1u << BWN_TRACE )
| trace view (16)
#define | IWID_STACK (1u << BWN_STACK )
| call stack (17)
#define | IWID_XREFS (1u << BWN_XREFS )
| xrefs (18)
#define | IWID_SEARCHS (1u << BWN_SEARCH )
| search results (19)
#define | IWID_FRAME (1u << BWN_FRAME )
| function frame (25)
#define | IWID_NAVBAND (1u << BWN_NAVBAND)
| navigation band (26)
#define | IWID_ENUMS (1u << BWN_ENUMS )
| enumerations (27)
#define | IWID_STRUCTS (1u << BWN_STRUCTS)
| structures (28)
#define | IWID_DISASMS (1u << BWN_DISASM )
| disassembly views (29)
#define | IWID_DUMPS (1u << BWN_DUMP )
| hex dumps (30)
#define | IWID_NOTEPAD (1u << BWN_NOTEPAD)
| notepad (31)
#define | IWID_IDAMEMOS (IWID_DISASMS|IWID_DUMPS)
| disassembly + hex dump views
#define | IWID_ALL 0xFFFFFFFF
| mask
#define | IDA_DEBUG_DREFS 0x00000001
| drefs
#define | IDA_DEBUG_OFFSET 0x00000002
| offsets
#define | IDA_DEBUG_FLIRT 0x00000004
| flirt
#define | IDA_DEBUG_IDP 0x00000008
| idp module
#define | IDA_DEBUG_LDR 0x00000010
| ldr module
#define | IDA_DEBUG_PLUGIN 0x00000020
| plugin module
#define | IDA_DEBUG_IDS 0x00000040
| ids files
#define | IDA_DEBUG_CONFIG 0x00000080
| config file
#define | IDA_DEBUG_CHECKMEM 0x00000100
| check heap consistency
#define | IDA_DEBUG_CHECKARG 0x00000200
| checkarg
#define | IDA_DEBUG_DEMANGLE 0x00000400
| demangler
#define | IDA_DEBUG_QUEUE 0x00000800
| queue
#define | IDA_DEBUG_ROLLBACK 0x00001000
| rollback
#define | IDA_DEBUG_ALREADY 0x00002000
| already data or code
#define | IDA_DEBUG_TIL 0x00004000
| type system
#define | IDA_DEBUG_NOTIFY 0x00008000
| show all notifications
#define | IDA_DEBUG_DEBUGGER 0x00010000
| debugger
#define | IDA_DEBUG_APPCALL 0x00020000
| appcall
#define | IDA_DEBUG_SRCDBG 0x00040000
| source debugging
#define | IDA_DEBUG_ACCESSIBILITY 0x00080000
| accessibility
#define | IDA_DEBUG_INTERNET 0x00100000
| internet connection
#define | IDA_DEBUG_SIMPLEX 0x00200000
| full stack analysis
#define | IDA_DEBUG_ALWAYS 0xFFFFFFFF
| everything
#define | deb(ida_debug_bits, ...)
#define | debug_time() ida_debug_time(__FILE__, __LINE__)
| Print the tick count from the last call to debug_time(). More...
#define | checkmem() do {} while (0)
| Checking heap is not available anymore.
#define | CH_MODAL 0x01
| Modal chooser.
#define | CH_MULTI 0x02
| The chooser will allow multi-selection (only for GUI choosers). More...
#define | CH_MULTI_EDIT 0x04
| The 'edit' callback will be called for all selected items using the START_SEL/END_SEL protocol. More...
#define | CH_NOBTNS 0x08
| do not display ok/cancel/help/search buttons. More...
#define | CH_ATTRS 0x10
| generate ui_get_chooser_item_attrs (gui only)
#define | CH_NOIDB 0x20
| use the chooser even without an open database, same as x0=-2 (see below)
#define | CH_UTF8 0x40
| string encoding is utf-8
#define | CH_BUILTIN_MASK 0xF80000
| Mask for builtin chooser numbers. Plugins should not use them.
#define | CH_BUILTIN(id) ((id+1) << 19)
#define | CH_GETCN(flags) (((flags & CH_BUILTIN_MASK) >> 19) - 1)
#define | CHCOL_PLAIN 0x00000000
| plain string
#define | CHCOL_PATH 0x00010000
| file path
#define | CHCOL_HEX 0x00020000
| hexadecimal number
#define | CHCOL_DEC 0x00030000
| decimal number
#define | CHCOL_FORMAT 0x00070000
| column format mask
#define | IS_EMPTY_SEL(n) ((chooser_event_t)(size_t)n == EMPTY_SEL)
#define | IS_START_SEL(n) ((chooser_event_t)(size_t)n == START_SEL)
#define | IS_END_SEL(n) ((chooser_event_t)(size_t)n == END_SEL)
#define | IS_CHOOSER_EVENT(n)
#define | IS_SEL(n) (!IS_CHOOSER_EVENT(n))
#define | CHITEM_BOLD 0x0001
| display the item in bold
#define | CHITEM_ITALIC 0x0002
| display the item in italic
#define | CHITEM_UNDER 0x0004
| underline the item
#define | CHITEM_STRIKE 0x0008
| strikeout the item
#define | CHITEM_GRAY 0x0010
| gray out the item
#define | TXTF_AUTOINDENT 0x0001
| auto-indent on new line
#define | TXTF_ACCEPTTABS 0x0002
| Tab key inserts 'tabsize' spaces.
#define | TXTF_READONLY 0x0004
| text cannot be edited (but can be selected and copied)
#define | TXTF_SELECTED 0x0008
| shows the field with its text selected
#define | TXTF_MODIFIED 0x0010
| gets/sets the modified status
#define | TXTF_FIXEDFONT 0x0020
| the control uses IDA's fixed font
#define | CHOOSER_NO_SELECTION 0x01
| see add_chooser_command(). More...
#define | CHOOSER_MULTI_SELECTION 0x02
| see add_chooser_command(). More...
#define | CHOOSER_HOTKEY 0x08
| Deprecated. Please don't use.
#define | CHOOSER_MENU_EDIT 0
| Deprecated. Please don't use.
#define | CHOOSER_MENU_JUMP 1
| Deprecated. Please don't use.
#define | CHOOSER_MENU_SEARCH 2
| Deprecated. Please don't use.
#define | CHOOSER_POPUP_MENU 4
| Deprecated. Please don't use.
#define | VES_SHIFT (1 << 0)
| state & 1 => Shift is pressed state & 2 => Alt is pressed state & 4 => Ctrl is pressed state & 8 => Mouse left button is pressed state & 16 => Mouse right button is pressed state & 32 => Mouse middle button is pressed state & 128 => Meta is pressed (OSX only)
#define | VES_ALT (1 << 1)
#define | VES_CTRL (1 << 2)
#define | VES_MOUSE_LEFT (1 << 3)
#define | VES_MOUSE_RIGHT (1 << 4)
#define | VES_MOUSE_MIDDLE (1 << 5)
#define | VES_META (1 << 7)
#define | LCMD_SYNC (1 << 0)
#define | CLIF_QT_AWARE 1
| keydown event will use Qt key codes
#define | MFF_FAST 0x0000
| Execute code as soon as possible. More...
#define | MFF_READ 0x0001
| Execute code only when ida is idle and it is safe. More...
#define | MFF_WRITE 0x0002
| Execute code only when ida is idle and it is safe. More...
#define | MFF_NOWAIT 0x0004
| Do not wait for the request to be executed. More...
#define | UIJMP_ACTIVATE 0x0001
| activate the new window
#define | UIJMP_DONTPUSH 0x0002
| do not remember the current address More...
#define | UIJMP_IDAVIEW 0x0004
| jump in idaview (by default any eaview is good)
#define | ACF_HAS_SELECTION 1 << 0
| there is currently a valid selection
#define | ACF_XTRN_EA 1 << 1
| cur_ea is in 'externs' segment
#define | AHF_VERSION 1
| action handler version (used by action_handler_t::flags)
#define | AHF_VERSION_MASK 0xFF
| mask for action_handler_t::flags
#define | ACTION_DESC_LITERAL(name, label, handler, shortcut, tooltip, icon) { sizeof(action_desc_t), name, label, handler, &PLUGIN, shortcut, tooltip, icon }
| Get an action_desc_t instance with your plugin as the owner.
#define | ACTION_DESC_LITERAL_OWNER(name, label, handler, owner, shortcut, tooltip, icon) { sizeof(action_desc_t), name, label, handler, owner, shortcut, tooltip, icon }
| Get an action_desc_t instance with a given owner.
#define | DYNACTION_DESC_LITERAL(label, handler, shortcut, tooltip, icon) ACTION_DESC_LITERAL_OWNER(NULL, label, handler, NULL, shortcut, tooltip, icon)
| For attach_dynamic_action_to_popup() only.
#define | CURPROC_ACTION_OWNER ((const plugin_t *) 1)
| Specify that an action belongs to the current processor module. More...
#define | DEF_SET_METHOD(NAME, TYPE)
| Helper to define functions in form_actions_t that get/set field values of different types. More...
#define | DEF_FIELD_METHOD(NAME, TYPE)
| Helper to define functions in form_actions_t that get/set field values of different types. More...
#define | DEF_STR_FIELD_METHOD(NAME )
| Helper to define functions in form_actions_t that get/set field values of different types. More...
#define | ASKBTN_YES 1
| Yes button.
#define | ASKBTN_NO 0
| No button.
#define | ASKBTN_CANCEL -1
| Cancel button.
#define | ASKBTN_BTN1 1
| First (Yes) button.
#define | ASKBTN_BTN2 0
| Second (No) button.
#define | ASKBTN_BTN3 -1
| Third (Cancel) button.
#define | HIST_SEG 1
| segment names
#define | HIST_CMT 2
| comments
#define | HIST_SRCH 3
| search substrings
#define | HIST_ADDR 4
| addresses
#define | HIST_IDENT 5
| names
#define | HIST_NUM 6
| numbers
#define | HIST_FILE 7
| file names
#define | HIST_TYPE 8
| type declarations
#define | HIST_CMD 9
| commands
#define | HIST_DIR 10
| directory names
#define | S2EAOPT_NOCALC 0x00000001
| don't try to interpret string as IDC (or current extlang) expression
#define | MAX_NUMBUF (128+8)
| 16-byte value in binary base (0b00101010...)
#define | b2a b2a32
| shortcut for number->string conversion, see b2a32()
#define | btoa btoa32
| shortcut for number->string conversion, see btoa32()
#define | atob atob32
| shortcut for string->number conversion, see atob32()
#define | IK_CANCEL 0x03
#define | IK_BACK 0x08
#define | IK_TAB 0x09
#define | IK_CLEAR 0x0C
#define | IK_RETURN 0x0D
#define | IK_SHIFT 0x10
#define | IK_CONTROL 0x11
#define | IK_MENU 0x12
#define | IK_PAUSE 0x13
#define | IK_CAPITAL 0x14
#define | IK_KANA 0x15
#define | IK_ESCAPE 0x1B
#define | IK_MODECHANGE 0x1F
#define | IK_SPACE 0x20
#define | IK_PRIOR 0x21
#define | IK_NEXT 0x22
#define | IK_END 0x23
#define | IK_HOME 0x24
#define | IK_LEFT 0x25
#define | IK_UP 0x26
#define | IK_RIGHT 0x27
#define | IK_DOWN 0x28
#define | IK_SELECT 0x29
#define | IK_PRINT 0x2A
#define | IK_EXECUTE 0x2B
#define | IK_SNAPSHOT 0x2C
#define | IK_INSERT 0x2D
#define | IK_DELETE 0x2E
#define | IK_HELP 0x2F
#define | IK_LWIN 0x5B
#define | IK_RWIN 0x5C
#define | IK_APPS 0x5D
#define | IK_SLEEP 0x5F
#define | IK_NUMPAD0 0x60
#define | IK_NUMPAD1 0x61
#define | IK_NUMPAD2 0x62
#define | IK_NUMPAD3 0x63
#define | IK_NUMPAD4 0x64
#define | IK_NUMPAD5 0x65
#define | IK_NUMPAD6 0x66
#define | IK_NUMPAD7 0x67
#define | IK_NUMPAD8 0x68
#define | IK_NUMPAD9 0x69
#define | IK_MULTIPLY 0x6A
#define | IK_ADD 0x6B
#define | IK_SEPARATOR 0x6C
#define | IK_SUBTRACT 0x6D
#define | IK_DECIMAL 0x6E
#define | IK_DIVIDE 0x6F
#define | IK_F1 0x70
#define | IK_F2 0x71
#define | IK_F3 0x72
#define | IK_F4 0x73
#define | IK_F5 0x74
#define | IK_F6 0x75
#define | IK_F7 0x76
#define | IK_F8 0x77
#define | IK_F9 0x78
#define | IK_F10 0x79
#define | IK_F11 0x7A
#define | IK_F12 0x7B
#define | IK_F13 0x7C
#define | IK_F14 0x7D
#define | IK_F15 0x7E
#define | IK_F16 0x7F
#define | IK_F17 0x80
#define | IK_F18 0x81
#define | IK_F19 0x82
#define | IK_F20 0x83
#define | IK_F21 0x84
#define | IK_F22 0x85
#define | IK_F23 0x86
#define | IK_F24 0x87
#define | IK_NUMLOCK 0x90
#define | IK_SCROLL 0x91
#define | IK_OEM_FJ_MASSHOU 0x93
#define | IK_OEM_FJ_TOUROKU 0x94
#define | IK_LSHIFT 0xA0
#define | IK_RSHIFT 0xA1
#define | IK_LCONTROL 0xA2
#define | IK_RCONTROL 0xA3
#define | IK_LMENU 0xA4
#define | IK_RMENU 0xA5
#define | IK_BROWSER_BACK 0xA6
#define | IK_BROWSER_FORWARD 0xA7
#define | IK_BROWSER_REFRESH 0xA8
#define | IK_BROWSER_STOP 0xA9
#define | IK_BROWSER_SEARCH 0xAA
#define | IK_BROWSER_FAVORITES 0xAB
#define | IK_BROWSER_HOME 0xAC
#define | IK_VOLUME_MUTE 0xAD
#define | IK_VOLUME_DOWN 0xAE
#define | IK_VOLUME_UP 0xAF
#define | IK_MEDIA_NEXT_TRACK 0xB0
#define | IK_MEDIA_PREV_TRACK 0xB1
#define | IK_MEDIA_STOP 0xB2
#define | IK_MEDIA_PLAY_PAUSE 0xB3
#define | IK_LAUNCH_MAIL 0xB4
#define | IK_LAUNCH_MEDIA_SELECT 0xB5
#define | IK_LAUNCH_APP1 0xB6
#define | IK_LAUNCH_APP2 0xB7
#define | IK_OEM_1 0xBA
#define | IK_OEM_PLUS 0xBB
#define | IK_OEM_COMMA 0xBC
#define | IK_OEM_MINUS 0xBD
#define | IK_OEM_PERIOD 0xBE
#define | IK_OEM_2 0xBF
#define | IK_OEM_3 0xC0
#define | IK_OEM_4 0xDB
#define | IK_OEM_5 0xDC
#define | IK_OEM_6 0xDD
#define | IK_OEM_7 0xDE
#define | IK_OEM_102 0xE2
#define | IK_PLAY 0xFA
#define | IK_ZOOM 0xFB
#define | IK_OEM_CLEAR 0xFE
Chooser title
prefixes to be used in the chooser title
#define | CHOOSER_NOMAINMENU "NOMAINMENU\n"
| do not display main menu
#define | CHOOSER_NOSTATUSBAR "NOSTATUSBAR\n"
| do not display status bar

## Typedefs
typedef uchar | color_t
| see <lines.hpp>
typedef uval_t | bmask_t
| see <enum.hpp>
typedef tid_t | enum_t
| see <enum.hpp>
typedef qvector< simpleline_t > | strvec_t
| A collection of simple lines to populate a custom view. More...
typedef bool idaapi | lochist_entry_cvt_t(lochist_entry_t *dst, const lochist_entry_t &src, TCustomControl *view)
| Converts from an entry with a given place type, to another entry, with another place type, to be used with the view 'view'. More...
typedef qvector< twinline_t > | text_t
| A group of lines in a text window.
typedef qvector< text_t > | texts_t
| A collection of subdivisions of a text window.
typedef int | tform_type_t
| Window types
typedef int32 | chooser_event_t
| see Chooser selections
typedef uint32 idaapi | chooser_cb_t(void *obj, uint32 n)
| Callback passed to functions in Functions: generic list choosers.
typedef uint32 idaapi | nav_colorizer_t(ea_t ea, asize_t nbytes)
| Navigation band colorizer function. More...
typedef int | view_event_state_t
typedef bool idaapi | custom_viewer_keydown_t(TCustomControl *cv, int vk_key, int shift, void *ud)
| The user has pressed a key.
typedef void idaapi | custom_viewer_popup_t(TCustomControl *cv, void *ud)
| The user right clicked. See ui_populating_tform_popup, too.
typedef void idaapi | custom_viewer_mouse_moved_t(TCustomControl *cv, int shift, view_mouse_event_t *e, void *ud)
| The user moved the mouse.
typedef bool idaapi | custom_viewer_click_t(TCustomControl *cv, int shift, void *ud)
| The user clicked.
typedef bool idaapi | custom_viewer_dblclick_t(TCustomControl *cv, int shift, void *ud)
| The user double clicked.
typedef void idaapi | custom_viewer_curpos_t(TCustomControl *cv, void *ud)
| Cursor position has been changed.
typedef void idaapi | custom_viewer_close_t(TCustomControl *cv, void *ud)
| Custom viewer is being destroyed.
typedef int idaapi | custom_viewer_help_t(TCustomControl *cv, void *ud)
| Custom viewer: the user pressed F1 If the return value != -1, it is treated as a help context to display (from ida.hlp)
typedef void idaapi | custom_viewer_adjust_place_t(TCustomControl *v, lochist_entry_t *loc, void *ud)
| Fine-tune loc->place() according to the x position. More...
typedef int idaapi | custom_viewer_get_place_xcoord_t(TCustomControl *v, const place_t *pline, const place_t *pitem, void *ud)
| Does the line pointed to by pline include pitem, and if so at what X coordinate? More...
typedef int idaapi | custom_viewer_can_navigate_t(TCustomControl *v, const lochist_entry_t *now, const locchange_md_t &md, void *ud)
| The user asked to navigate to the given location. More...
typedef void idaapi | custom_viewer_location_changed_t(TCustomControl *v, const lochist_entry_t *was, const lochist_entry_t *now, const locchange_md_t &md, void *ud)
| The viewer's location (i.e., place, or cursor) changed.
typedef void idaapi | code_viewer_lines_click_t(TCustomControl *c, const place_t *p, int pos, int shift, void *ud)
| The user clicked, right clicked or double clicked. More...
typedef int idaapi | code_viewer_lines_icon_t(TCustomControl *cv, const place_t *p, int *pos, void *ud)
| Icon drawing. More...
typedef bool idaapi | code_viewer_lines_linenum_t(TCustomControl *cv, const place_t *p, uval_t *num, void *ud)
| Calculate the line number. Return false to not print any number.
typedef void(idaapi * | ss_restore_cb_t) (const char *errmsg, void *ud)
| Snapshot restoration completion callback. see restore_database_snapshot()
typedef bool idaapi | menu_item_callback_t(void *ud)
| API bw-compat only. More...
typedef struct __qtimer_t * | qtimer_t
| Timer opaque handle.
typedef struct HWND__ * | HWND
typedef void(idaapi * | formcb_t) (TView *fields[], int code)
| Callback: called when the user presses a form-specific button (defined with a field type B). More...
typedef int(idaapi * | formchgcb_t) (int field_id, form_actions_t &fa)
| Callback. More...

## Enumerations
enum | mbox_kind_t { mbox_internal, mbox_info, mbox_warning, mbox_error, mbox_nomem, mbox_feedback, mbox_readerror, mbox_writeerror, mbox_filestruct, mbox_wait, mbox_hide, mbox_replace }
| see <moves.hpp> More...
enum | choose_type_t { chtype_generic, chtype_idasgn, chtype_entry, chtype_name, chtype_stkvar_xref, chtype_xref, chtype_enum, chtype_enum_by_value, chtype_func, chtype_segm, chtype_segreg, chtype_struc, chtype_strpath, chtype_generic2, chtype_idatil, chtype_enum_by_value_and_size, chtype_srcp }
| List chooser types. More...
enum | beep_t { beep_default = 0 }
| < Beep types
enum | tcc_renderer_type_t { TCCRT_INVALID = 0, TCCRT_FLAT, TCCRT_GRAPH, TCCRT_PROXIMITY }
| TCustomControl renderer type. More...
enum | tcc_place_type_t { TCCPT_INVALID = 0, TCCPT_PLACE, TCCPT_SIMPLELINE_PLACE, TCCPT_IDAPLACE, TCCPT_ENUMPLACE, TCCPT_STRUCTPLACE }
| TCustomControl place_t type. More...
enum | vme_button_t { VME_UNKNOWN, VME_LEFT_BUTTON, VME_RIGHT_BUTTON, VME_MID_BUTTON }
| Represents mouse button for view_mouse_event_t objects. More...
enum | ui_notification_t { ui_null = 0, ui_range, ui_list, ui_idcstart, ui_idcstop, ui_suspend, ui_resume, ui_old_jumpto, ui_readsel, ui_unmarksel, ui_screenea, ui_saving, ui_saved, ui_refreshmarked, ui_refresh, ui_choose, ui_close_chooser, ui_banner, ui_setidle, ui_noabort, ui_term, ui_mbox, ui_beep, ui_msg, ui_askyn, ui_askfile, ui_form, ui_close_form, ui_clearbreak, ui_wasbreak, ui_asktext, ui_askstr, ui_askident, ui_askaddr, ui_askseg, ui_asklong, ui_obsolete_showauto, ui_obsolete_setstate, ui_add_idckey, ui_del_idckey, ui_old_get_marker, ui_analyzer_options, ui_is_msg_inited, ui_load_file, ui_run_dbg, ui_get_cursor, ui_get_curline, ui_get_hwnd, ui_copywarn, ui_getvcl, ui_idp_event, ui_lock_range_refresh, ui_unlock_range_refresh, ui_setbreak, ui_genfile_callback, ui_open_url, ui_hexdumpea, ui_set_xml, ui_get_xml, ui_del_xml, ui_push_xml, ui_pop_xml, ui_get_key_code, ui_setup_plugins_menu, ui_refresh_navband, ui_obsolete_new_custom_viewer, ui_obsolete_add_menu_item, ui_obsolete_del_menu_item, ui_debugger_menu_change, ui_get_curplace, ui_create_tform, ui_open_tform, ui_close_tform, ui_switchto_tform, ui_find_tform, ui_get_current_tform, ui_get_tform_handle, ui_tform_visible, ui_tform_invisible, ui_get_ea_hint, ui_get_item_hint, ui_obsolete_set_nav_colorizer, ui_refresh_custom_viewer, ui_destroy_custom_viewer, ui_jump_in_custom_viewer, ui_obsolete_set_custom_viewer_popup, ui_obsolete_add_custom_viewer_popup, ui_obsolete_set_custom_viewer_handlers, ui_get_custom_viewer_curline, ui_get_current_viewer, ui_is_idaview, ui_get_custom_viewer_hint, ui_readsel2, ui_set_custom_viewer_range, ui_database_inited, ui_ready_to_run, ui_set_custom_viewer_handler, ui_refresh_chooser, ui_obsolete_add_chooser_cmd, ui_open_builtin, ui_preprocess, ui_postprocess, ui_set_custom_viewer_mode, ui_gen_disasm_text, ui_gen_idanode_text, ui_install_cli, ui_execute_sync, ui_enable_input_hotkeys, ui_get_chooser_obj, ui_enable_chooser_item_attrs, ui_get_chooser_item_attrs, ui_set_dock_pos, ui_get_opnum, ui_install_custom_datatype_menu, ui_install_custom_optype_menu, ui_get_range_marker, ui_get_highlighted_identifier, ui_lookup_key_code, ui_load_custom_icon_file, ui_load_custom_icon, ui_free_custom_icon, ui_process_action, ui_new_code_viewer, ui_addons, ui_execute_ui_requests, ui_execute_ui_requests_list, ui_register_timer, ui_unregister_timer, ui_take_database_snapshot, ui_restore_database_snapshot, ui_set_code_viewer_line_handlers, ui_refresh_custom_code_viewer, ui_new_source_viewer, ui_get_tab_size, ui_set_menu_item_icon, ui_repaint_qwidget, ui_enable_menu_item, ui_custom_viewer_set_userdata, ui_obsolete_new_ea_viewer, ui_jumpto, ui_choose_info, ui_cancel_exec_request, ui_show_form, ui_unrecognized_config_directive, ui_obsolete_add_chooser_menu_cb, ui_get_viewer_name, ui_get_output_cursor, ui_get_output_curline, ui_get_output_selected_text, ui_obsolete_add_output_popup, ui_get_tform_idaview, ui_get_renderer_type, ui_set_renderer_type, ui_askfile2, ui_get_viewer_user_data, ui_get_viewer_place_type, ui_obsolete_new_ea_viewer2, ui_ea_viewer_history_push_and_jump, ui_ea_viewer_history_info, ui_register_action, ui_unregister_action, ui_attach_action_to_menu, ui_detach_action_from_menu, ui_attach_action_to_popup, ui_detach_action_from_popup, ui_attach_dynamic_action_to_popup, ui_attach_action_to_toolbar, ui_detach_action_from_toolbar, ui_updating_actions, ui_updated_actions, ui_populating_tform_popup, ui_finish_populating_tform_popup, ui_update_action_attr, ui_get_action_attr, ui_plugin_loaded, ui_plugin_unloading, ui_get_tform_type, ui_current_tform_changed, ui_get_tform_title, ui_umsg, ui_obsolete_set_custom_viewer_handlers2, ui_get_user_strlist_options, ui_askqstr, ui_new_custom_viewer, ui_custom_viewer_jump, ui_set_custom_viewer_handlers, ui_get_registered_actions, ui_create_toolbar, ui_delete_toolbar, ui_create_menu, ui_delete_menu, ui_set_nav_colorizer, ui_get_chooser_data, ui_last, ui_dbg_begin = 1000, ui_dbg_run_requests = ui_dbg_begin, ui_dbg_get_running_request, ui_dbg_get_running_notification, ui_dbg_clear_requests_queue, ui_dbg_get_process_state, ui_dbg_start_process, ui_dbg_request_start_process, ui_dbg_suspend_process, ui_dbg_request_suspend_process, ui_dbg_continue_process, ui_dbg_request_continue_process, ui_dbg_exit_process, ui_dbg_request_exit_process, ui_dbg_get_thread_qty, ui_dbg_getn_thread, ui_dbg_select_thread, ui_dbg_request_select_thread, ui_dbg_step_into, ui_dbg_request_step_into, ui_dbg_step_over, ui_dbg_request_step_over, ui_dbg_run_to, ui_dbg_request_run_to, ui_dbg_step_until_ret, ui_dbg_request_step_until_ret, ui_dbg_get_oldreg_val, ui_dbg_set_oldreg_val, ui_dbg_request_set_oldreg_val, ui_dbg_get_bpt_qty, ui_dbg_getn_oldbpt, ui_dbg_get_oldbpt, ui_dbg_add_oldbpt, ui_dbg_request_add_oldbpt, ui_dbg_del_oldbpt, ui_dbg_request_del_oldbpt, ui_dbg_update_oldbpt, ui_dbg_enable_oldbpt, ui_dbg_request_enable_oldbpt, ui_dbg_set_trace_size, ui_dbg_clear_trace, ui_dbg_request_clear_trace, ui_dbg_is_step_trace_enabled, ui_dbg_enable_step_trace, ui_dbg_request_enable_step_trace, ui_dbg_get_step_trace_options, ui_dbg_set_step_trace_options, ui_dbg_request_set_step_trace_options, ui_dbg_is_insn_trace_enabled, ui_dbg_enable_insn_trace, ui_dbg_request_enable_insn_trace, ui_dbg_get_insn_trace_options, ui_dbg_set_insn_trace_options, ui_dbg_request_set_insn_trace_options, ui_dbg_is_func_trace_enabled, ui_dbg_enable_func_trace, ui_dbg_request_enable_func_trace, ui_dbg_get_func_trace_options, ui_dbg_set_func_trace_options, ui_dbg_request_set_func_trace_options, ui_dbg_get_tev_qty, ui_dbg_get_tev_info, ui_dbg_get_insn_tev_oldreg_val, ui_dbg_get_insn_tev_oldreg_result, ui_dbg_get_call_tev_callee, ui_dbg_get_ret_tev_return, ui_dbg_get_bpt_tev_ea, ui_dbg_get_reg_value_type, ui_dbg_get_process_qty, ui_dbg_get_process_info, ui_dbg_attach_process, ui_dbg_request_attach_process, ui_dbg_detach_process, ui_dbg_request_detach_process, ui_dbg_get_first_module, ui_dbg_get_next_module, ui_dbg_bring_to_front, ui_dbg_get_current_thread, ui_dbg_wait_for_next_event, ui_dbg_get_debug_event, ui_dbg_set_debugger_options, ui_dbg_set_remote_debugger, ui_dbg_load_debugger, ui_dbg_retrieve_exceptions, ui_dbg_store_exceptions, ui_dbg_define_exception, ui_dbg_suspend_thread, ui_dbg_request_suspend_thread, ui_dbg_resume_thread, ui_dbg_request_resume_thread, ui_dbg_get_process_options, ui_dbg_check_bpt, ui_dbg_set_process_state, ui_dbg_get_manual_regions, ui_dbg_set_manual_regions, ui_dbg_enable_manual_regions, ui_dbg_set_process_options, ui_dbg_is_busy, ui_dbg_hide_all_bpts, ui_dbg_edit_manual_regions, ui_dbg_get_reg_val, ui_dbg_set_reg_val, ui_dbg_request_set_reg_val, ui_dbg_get_insn_tev_reg_val, ui_dbg_get_insn_tev_reg_result, ui_dbg_register_provider, ui_dbg_unregister_provider, ui_dbg_handle_debug_event, ui_dbg_add_vmod, ui_dbg_del_vmod, ui_dbg_compare_bpt_locs, ui_dbg_save_bpts, ui_dbg_old_getn_bpt, ui_dbg_old_get_bpt, ui_dbg_old_update_bpt, ui_dbg_set_bptloc_string, ui_dbg_get_bptloc_string, ui_dbg_internal_appcall, ui_dbg_internal_cleanup_appcall, ui_dbg_internal_get_sreg_base, ui_dbg_internal_ioctl, ui_dbg_read_memory, ui_dbg_write_memory, ui_dbg_read_registers, ui_dbg_write_register, ui_dbg_get_memory_info, ui_dbg_get_event_cond, ui_dbg_set_event_cond, ui_dbg_old_find_bpt, ui_dbg_enable_bpt, ui_dbg_request_enable_bpt, ui_dbg_old_add_bpt, ui_dbg_old_request_add_bpt, ui_dbg_del_bpt, ui_dbg_request_del_bpt, ui_dbg_map_source_path, ui_dbg_map_source_file_path, ui_dbg_modify_source_paths, ui_dbg_is_bblk_trace_enabled, ui_dbg_enable_bblk_trace, ui_dbg_request_enable_bblk_trace, ui_dbg_get_bblk_trace_options, ui_dbg_set_bblk_trace_options, ui_dbg_request_set_bblk_trace_options, ui_dbg_load_trace_file, ui_dbg_save_trace_file, ui_dbg_is_valid_trace_file, ui_dbg_set_trace_file_desc, ui_dbg_get_trace_file_desc, ui_dbg_choose_trace_file, ui_dbg_diff_trace_file, ui_dbg_graph_trace, ui_dbg_get_tev_memory_info, ui_dbg_get_tev_event, ui_dbg_get_insn_tev_reg_mem, ui_dbg_getn_bpt, ui_dbg_get_bpt, ui_dbg_find_bpt, ui_dbg_add_bpt, ui_dbg_request_add_bpt, ui_dbg_update_bpt, ui_dbg_for_all_bpts, ui_dbg_get_tev_ea, ui_dbg_get_tev_type, ui_dbg_get_tev_tid, ui_dbg_get_tev_reg_val, ui_dbg_get_tev_reg_mem_qty, ui_dbg_get_tev_reg_mem_ea, ui_dbg_get_trace_base_address, ui_dbg_set_trace_base_address, ui_dbg_add_tev, ui_dbg_add_insn_tev, ui_dbg_add_call_tev, ui_dbg_add_ret_tev, ui_dbg_add_bpt_tev, ui_dbg_add_debug_event, ui_dbg_add_thread, ui_dbg_del_thread, ui_dbg_add_many_tevs, ui_obsolete_dbg_map_binary_path, ui_obsolete_dbg_modify_binary_paths, ui_dbg_set_bpt_group, ui_dbg_set_highlight_trace_options, ui_dbg_set_trace_platform, ui_dbg_get_trace_platform, ui_dbg_internal_get_elang, ui_dbg_internal_set_elang, ui_load_dbg_dbginfo, ui_dbg_set_resume_mode, ui_dbg_request_set_resume_mode, ui_dbg_set_bptloc_group, ui_dbg_list_bptgrps, ui_dbg_rename_bptgrp, ui_dbg_del_bptgrp, ui_dbg_get_grp_bpts, ui_dbg_get_bpt_group, ui_dbg_change_bptlocs, ui_dbg_end }
| Events marked as 'ui:' should be used as a parameter to callui(). More...
enum | navaddr_type_t { nat_lib = 0, nat_fun, nat_cod, nat_dat, nat_und, nat_ext, nat_err, nat_gap, nat_cur, nat_auto, nat_last }
enum | custom_viewer_handler_id_t { CVH_USERDATA, CVH_KEYDOWN, CVH_POPUP, CVH_DBLCLICK, CVH_CURPOS, CVH_CLOSE, CVH_CLICK, CVH_QT_AWARE, CVH_HELP, CVH_MOUSEMOVE, CDVH_USERDATA = 1000, CDVH_SRCVIEW, CDVH_LINES_CLICK, CDVH_LINES_DBLCLICK, CDVH_LINES_POPUP, CDVH_LINES_DRAWICON, CDVH_LINES_LINENUM, CDVH_LINES_ICONMARGIN, CDVH_LINES_RADIX, CDVH_LINES_ALIGNMENT }
| Custom viewer & code viewer handler types. More...
enum | msg_notification_t { msg_activated, msg_deactivated, obsolete_msg_popup, msg_click, msg_dblclick, msg_closed, msg_keydown }
| Notification codes for events in the message window. More...
enum | view_notification_t { view_activated, view_deactivated, view_keydown, obsolete_view_popup, view_click, view_dblclick, view_curpos, view_created, view_close, view_switched, view_mouse_over }
| Notification codes sent by the UI for IDAView or custom viewer events. More...
enum | locchange_reason_t { lcr_unknown, lcr_goto, lcr_user_switch, lcr_auto_switch, lcr_jump, lcr_navigate, lcr_scroll, lcr_internal }
enum | action_state_t { AST_ENABLE_ALWAYS, AST_ENABLE_FOR_IDB, AST_ENABLE_FOR_FORM, AST_ENABLE, AST_DISABLE_ALWAYS, AST_DISABLE_FOR_IDB, AST_DISABLE_FOR_FORM, AST_DISABLE }
| Action states - returned by action_handler_t::update() More...
enum | action_attr_t { AA_NONE, AA_LABEL, AA_SHORTCUT, AA_TOOLTIP, AA_ICON, AA_STATE, AA_CHECKABLE, AA_CHECKED, AA_VISIBILITY }
| Codes for getting/setting action attributes. More...
enum | cb_id { CB_INIT = -1, CB_YES = -2, CB_CLOSE = -3, CB_CLOSE_IDB = -4 }
| Enumeration of form callback special values.

## Variables
idaman callui_t ida_export_data(idaapi * | callui )(ui_notification_t what,...)
| Pointer to the user-interface dispatcher function. More...
idaman unsigned int ida_export_data | dirty_infos
| Bitmask of builtin window types to be refreshed:
idaman uint32 ida_export_data | debug
| Controls debug messages - combination of IDA debug bits.
const chooser_event_t | EMPTY_SEL = 0
| no item was selected
const chooser_event_t | START_SEL = -1
| before calling the first selected item
const chooser_event_t | END_SEL = -2
| after calling the last selected item
void(idaapi * | range_marker )(ea_t ea, asize_t size)
| Pointer to range marker function (for idaviews and hexviews) This pointer is initialized by setup_range_marker()
idaman int ida_export_data | batch
| If this variable is set, then dialog boxes will not appear on the screen. More...
idaman int ida_export_data | errorexit
| useful for atexit() functions, is 1 if we are exiting with from error() function. More...
idaman char ida_export_data | AsciiStringChars [256+1]
| Maintain a collection of characters that are allowed in ASCII strings. More...

## Macro Definition Documentation

#define SETMENU_CTXAPP 0x00000000

Deprecated. Don't use this anymore.

#define SETMENU_CTXIDA 0x04000000

Deprecated. Don't use this anymore.

#define SETMENU_CTXSTR 0x08000000

Deprecated. Don't use this anymore.

#define SETMENU_CTXENUM 0x0C000000

Deprecated. Don't use this anymore.

#define SETMENU_CTXEA 0x10000000

Deprecated. Don't use this anymore.

#define SETMENU_CTXVIEW 0x14000000

Deprecated. Don't use this anymore.

#define CVNF_LAZY (1 << 0)

try and move the cursor to a line displaying the

place_t if possible. This might disregard the Y position in case of success

#define CVNF_JUMP (1 << 1)

push the current position in this viewer's

lochist_t before going to the new location

#define CVNF_ACT (1 << 2)

activate (i.e., switch to) the viewer.

Activation is performed before the new lochist_entry_t instance is actually copied to the viewer's lochist_t (otherwise, if the viewer was invisible its on_location_changed() handler wouldn't be called.)

#define define_place_exported_functions | ( |  | classname | ) |

Value:
class classname; \
idaman void ida_export classname ## __print(const classname *,void*,char*, size_t); \
idaman uval_t ida_export classname ## __touval(const classname *,void*); \
idaman place_t * ida_export classname ## __clone(const classname *); \
idaman void ida_export classname ## __copyfrom(classname *,const place_t*); \
idaman place_t * ida_export classname ## __makeplace(const classname *,void*,uval_t,short); \
idaman int ida_export classname ## __compare(const classname *,const place_t*); \
idaman void ida_export classname ## __adjust(classname *,void*); \
idaman bool ida_export classname ## __prev(classname *,void*); \
idaman bool ida_export classname ## __next(classname *,void*); \
idaman bool ida_export classname ## __beginning(const classname *,void*); \
idaman bool ida_export classname ## __ending(const classname *,void*); \
idaman int ida_export classname ## __generate(const classname *,void*,char**,int,int*,color_t*,bgcolor_t*);\
idaman void ida_export classname ## __serialize(const classname *, bytevec_t *out); \
idaman bool ida_export classname ## __deserialize(classname *, const uchar **, const uchar *); \
idaman int ida_export classname ## __id(const classname *); \
idaman const char *ida_export classname ## __name(const classname *); \
idaman ea_t ida_export classname ## __toea(const classname *); \
idaman place_t * ida_export classname ## __enter(const classname *, uint32 *); \
idaman void ida_export classname ## __leave(const classname *, uint32); \
idaman bool ida_export classname ## __rebase(classname *, const segm_move_infos_t &);
bytevec_t
Vector of bytes (use for dynamic memory)
Definition: pro.h:2737
uint32
unsigned int uint32
unsigned 32 bit value
Definition: pro.h:316
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
uchar
unsigned char uchar
unsigned 8 bit value
Definition: pro.h:305
ida_export
#define ida_export
functions marked with this keyword are available as part of the IDA SDK
Definition: pro.h:257
place_t
Denotes a displayed line.
Definition: kernwin.hpp:1306
idaman
#define idaman
specifies c linkage
Definition: pro.h:262
bgcolor_t
uint32 bgcolor_t
background color in RGB
Definition: pro.h:3300
color_t
uchar color_t
see
Definition: kernwin.hpp:35
uval_t
asize_t uval_t
unsigned value used by the processor.
Definition: pro.h:412

Helper to define exported functions for place_t implementations.

#define DECLARE_LINEARRAY_HELPERS | ( |  | decl | ) |

Value:
decl void ida_export linearray_t_ctr (linearray_t *, void *ud); \
decl void ida_export linearray_t_dtr (linearray_t *); \
decl int ida_export linearray_t_set_place(linearray_t *, const place_t *new_at); \
decl bool ida_export linearray_t_beginning(const linearray_t *); \
decl bool ida_export linearray_t_ending (const linearray_t *); \
decl char *ida_export linearray_t_down (linearray_t *); \
decl char *ida_export linearray_t_up (linearray_t *);
linearray_t
The group of lines corresponding to a single place within a view.
Definition: kernwin.hpp:1848
ida_export
#define ida_export
functions marked with this keyword are available as part of the IDA SDK
Definition: pro.h:257
place_t
Denotes a displayed line.
Definition: kernwin.hpp:1306

Helper for declaring member functions of the linearray_t class.

#define deb | ( |  | ida_debug_bits,
|  |  | ...
| ) |  |

Value:
do \
{ \
if ( (debug & (ida_debug_bits)) != 0 ) \
ida_deb(__VA_ARGS__); \
} while ( false )
debug
idaman uint32 ida_export_data debug
Controls debug messages - combination of IDA debug bits.
Definition: kernwin.hpp:2056

#define debug_time | ( |  | ) | ida_debug_time(__FILE__, __LINE__)

Print the tick count from the last call to debug_time().

The first time prints -1.

#define CHOOSER_NO_SELECTION 0x01

see add_chooser_command().

enable even if there's no selected item (n will be -1 for callback)

#define CHOOSER_MULTI_SELECTION 0x02

see add_chooser_command().

enable for multiple selections

#define CURPROC_ACTION_OWNER ((const plugin_t *) 1)

Specify that an action belongs to the current processor module.

see action_desc_t::owner and ACTION_DESC_LITERAL_OWNER

#define DEF_SET_METHOD | ( |  | NAME,
|  |  | TYPE
| ) |  |

Value:
inline bool idaapi set_ ## NAME ## _value(int field_id, const TYPE *val) \
{ \
return _set_field_value(field_id, val); \
}
idaapi
#define idaapi
specifies __stdcall calling convention
Definition: pro.h:256

Helper to define functions in form_actions_t that get/set field values of different types.

Please see this file's source code for specific uses.

#define DEF_FIELD_METHOD | ( |  | NAME,
|  |  | TYPE
| ) |  |

Value:
inline bool idaapi get_ ## NAME ## _value(int field_id, TYPE *val) \
{ \
return _get_field_value(field_id, val); \
} \
DEF_SET_METHOD(NAME, TYPE)
idaapi
#define idaapi
specifies __stdcall calling convention
Definition: pro.h:256
DEF_SET_METHOD
#define DEF_SET_METHOD(NAME, TYPE)
Helper to define functions in form_actions_t that get/set field values of different types...
Definition: kernwin.hpp:6263

Helper to define functions in form_actions_t that get/set field values of different types.

Please see this file's source code for specific uses.

#define DEF_STR_FIELD_METHOD | ( |  | NAME | ) |

Value:
inline bool idaapi get_ ## NAME ## _value(int field_id, char *buf, const size_t bufsize) \
{ \
return _get_str_field_value(field_id, buf, bufsize); \
} \
DEF_SET_METHOD(NAME, char)
idaapi
#define idaapi
specifies __stdcall calling convention
Definition: pro.h:256
DEF_SET_METHOD
#define DEF_SET_METHOD(NAME, TYPE)
Helper to define functions in form_actions_t that get/set field values of different types...
Definition: kernwin.hpp:6263

Helper to define functions in form_actions_t that get/set field values of different types.

Please see this file's source code for specific uses.

## Typedef Documentation

typedef bool idaapi lochist_entry_cvt_t(lochist_entry_t *dst, const lochist_entry_t &src, TCustomControl *view)

Converts from an entry with a given place type, to another entry, with another place type, to be used with the view 'view'.

Typically used when views are synchronized. The 'renderer_info_t' part of 'dst' will be pre-filled with the current renderer_info_t of 'view', while the 'place_t' instance will always be NULL.

typedef uint32 idaapi nav_colorizer_t(ea_t ea, asize_t nbytes)

Navigation band colorizer function.

If ea==BADADDR, then 'nbytes' is a navaddr_type_t, and the colorizer is in charge of returning the color associated to that type of address. This is used for maintaining the legend in-sync with the colors used to display the addresses in the navigation bar.

Parameters

  ea | address to calculate the color of, or BADADDR (see above)
  nbytes | number of bytes, this can be ignored for quick&dirty approach

Returns
  color of the specified address in RGB

typedef void idaapi custom_viewer_adjust_place_t(TCustomControl *v, lochist_entry_t *loc, void *ud)

Fine-tune loc->place() according to the x position.

You can consider that the place_t object is a 'row cursor' in the list of lines that fill the screen. But, it is only a 'vertical' cursor: e.g., the simpleline_place_t has the 'n' mumber, which specifies what line the place_t corresponds to, in the backing strvec_t instance.

However, some views have a place that can be sensitive to the X coordinates of the view's cursor. Think of the "Hex View-1", or the "Pseudocode-A" views: when moving the cursor on the X axis, the 'row cursor' will not change (since we are moving on the same line), but the corresponding 'ea_t' might.

For such tricky situations, we provide the following callback, that will provide the ability to update the place_t's internal state so that it really reflects the current cursor position. Most custom viewers will not need to implement this, but if some data in your place_t instances is dependent upon the X coordinate of the cursor, you'll probably want to.

Called whenever the user moves the cursor around (mouse, keyboard)

Note that this callback shouldn't touch the 'renderer_info_t' part of 'loc': doing so will result in undefined behavior.

typedef int idaapi custom_viewer_get_place_xcoord_t(TCustomControl *v, const place_t *pline, const place_t *pitem, void *ud)

Does the line pointed to by pline include pitem, and if so at what X coordinate?

place_t instances can be considered as a 'cursor' in a set of lines (see custom_viewer_adjust_place_t), but they can be 'tuned' to correctly represent the current position (e.g., hexrays decompiler plugins tune its place_t instances so they contain the real, current 'ea_t', that corresponds to the C-like expression that's shown at the X coordinate within that line.)

But then, when the viewer has to determine whether a certain twinline_t in fact displays the current place, the sublcass's implementation of place_t::compare() might lead it to think that the current twinline_t's place_t is not correct (e.g., because the 'ea_t' has been fine-tuned according to the caret's X coordinates.)

Thus, if your plugin implements custom_viewer_adjust_place_t, you probably want to implement this as well, or refreshes might be unnecessarily frequent, leading to a worse user experience.

This is typically called when the user moves the cursor around. return -1 if pitem is not included in pline -2 pitem points to the entire line >= 0 for the X coordinate within the pline, where pitem points

typedef int idaapi custom_viewer_can_navigate_t(TCustomControl *v, const lochist_entry_t *now, const locchange_md_t &md, void *ud)

The user asked to navigate to the given location.

This gives the view the possibility of declining the move. Reasons for this can be:

- the location cannot be displayed,
- going there requires a long-running operation, that can be canceled by the user (e.g., in case of the hexrays plugins: during decompilation of the target function.)
- ...

This is called before the new location is committed to the view's history.

return 0 if the move is accepted != 0 otherwise

typedef void idaapi code_viewer_lines_click_t(TCustomControl *c, const place_t *p, int pos, int shift, void *ud)

The user clicked, right clicked or double clicked.

pos: the clicked icon number. -1 means the click occurred on space not reserved to icons.

typedef int idaapi code_viewer_lines_icon_t(TCustomControl *cv, const place_t *p, int *pos, void *ud)

Icon drawing.

Parameters

  pos | the icon number, will be 0,1,2,3... can be modified to skip positions and draw at the specified one

Returns
  the id of the icon to draw. If bitwise or'ed with 0x80000000, IDA calls this function once more with pos+1 to retrieve one more icon.

typedef bool idaapi menu_item_callback_t(void *ud)

API bw-compat only.

You shouldn't be using this, as it will be deprecated soon. This is only to ease transition for older plugins/processor modules.

typedef void(idaapi * formcb_t) (TView *fields[], int code)

Callback: called when the user presses a form-specific button (defined with a field type B).

Note: from this callback you may call close_form() function.
In this case the form will be closed as soon as you return from the callback.

Parameters

  fields | array of input fields
  code | code of the pressed button

typedef int(idaapi * formchgcb_t) (int field_id, form_actions_t &fa)

Callback.

Called when an input field is modified. The callback will be also called before displaying the form and as soon as the user presses OK.

Parameters

  field_id | id of the modified field

Return values

  -1 | form is going to be displayed
  -2 | form is going to be closed with OK.
  >0 | form will be closed

## Enumeration Type Documentation

enum mbox_kind_t

see <moves.hpp>

Message box kinds

Enumerator
mbox_internal | internal error

enum choose_type_t

List chooser types.

Enumerator
chtype_generic | the generic choose() function (1-column)
chtype_idasgn | see choose_idasgn()
chtype_entry | see choose_entry()
chtype_name | see choose_name()
chtype_stkvar_xref | see choose_stkvar_xref()
chtype_xref | see choose_xref()
chtype_enum | see choose_enum()
chtype_enum_by_value | Deprecated. See chtype_enum_by_value_and_size.
chtype_func | see choose_func()
chtype_segm | see choose_segm()
chtype_segreg | Deprecated. See chtype_srcp.
chtype_struc | see choose_struc()
chtype_strpath | see choose_struc_path()
chtype_generic2 | the generic choose2() function (n-column)
chtype_idatil | see choose_til()
chtype_enum_by_value_and_size | see choose_enum_by_value()
chtype_srcp | see choose_srcp()

enum tcc_renderer_type_t

TCustomControl renderer type.

Enumerator
TCCRT_INVALID | invalid
TCCRT_FLAT | flat view
TCCRT_GRAPH | graph view
TCCRT_PROXIMITY | proximity view

enum tcc_place_type_t

TCustomControl place_t type.

Enumerator
TCCPT_INVALID | invalid
TCCPT_PLACE | place_t
TCCPT_SIMPLELINE_PLACE | simpleline_place_t
TCCPT_IDAPLACE | idaplace_t
TCCPT_ENUMPLACE | enumplace_t
TCCPT_STRUCTPLACE | structplace_t

enum vme_button_t

Represents mouse button for view_mouse_event_t objects.

Enumerator
VME_UNKNOWN | unknown mouse button
VME_LEFT_BUTTON | left mouse button
VME_RIGHT_BUTTON | right mouse button
VME_MID_BUTTON | middle mouse button

enum ui_notification_t

Events marked as 'ui:' should be used as a parameter to callui().

(See convenience functions like get_screen_ea()) Events marked as 'cb:' are designed to be callbacks and should not be used in callui(). The user may hook to HT_UI events to catch them

Enumerator
  ui_range | cb: The disassembly range has been changed ( idainfo::minEA ... idainfo::maxEA). UI should redraw the scrollbars. See also: ui_lock_range_refresh Parameters
  none |
Returns void
  ui_list | cb: The list (chooser) window contents have been changed (names, signatures, etc). UI should redraw them. Please consider request_refresh() instead Parameters
  none |
Returns void
  ui_idcstart | cb: Start of IDC engine work. Parameters
  none |
Returns void
  ui_idcstop | cb: Stop of IDC engine work. Parameters
  none |
Returns void
  ui_suspend | cb: Suspend graphical interface. Only the text version. Interface should respond to it. Parameters
  none |
Returns void
  ui_resume | cb: Resume the suspended graphical interface. Only the text version. Interface should respond to it Parameters
  none |
Returns void
  ui_old_jumpto | ui: Jump to the specified address. Parameters
  ea | (ea_t) address to jump to
  operand_num | (int) -1: don't change x coord
Returns bool success
ui_readsel | ui: see read_selection()
ui_unmarksel | ui: see unmark_selection()
ui_screenea | ui: see get_screen_ea()
ui_saving | cb: The kernel is flushing its buffers to the disk. The user interface should save its state. Parameters: none Returns: none
  ui_saved | cb: The kernel has saved the database. This callback just informs the interface. Parameters
  none |
Returns void
ui_refreshmarked | ui: see refresh_idaview()
ui_refresh | ui: see refresh_idaview_anyway()
  ui_choose | ui: Allow the user to choose an object. Always use the helper inline functions for this code. See Functions: built-in choosers for a list of such functions. Parameters
  type | (choose_type_t) type of chooser to display
  ... | other parameters depend on the given type
Returns depends on the given type
ui_close_chooser | ui: see close_chooser()
ui_banner | ui: see banner(int)
  ui_setidle | ui: Set a function to call at idle times. Parameters
  func | (int (*)(void)) pointer to function that will be called
Returns void
  ui_noabort | ui: Disable 'abort' menu item - the database was not compressed. Parameters
  none |
Returns void
  ui_term | cb: IDA is terminated (the database is already closed). The UI may close its windows in this callback. Parameters
  none |
Returns void
  ui_mbox | ui: Show a message box. Parameters
  kind | (mbox_kind_t)
  format | (const char *) format of message body
  va | (va_list]) format args
Returns void
ui_beep | ui: see beep()
  ui_msg | ui: Show a message in the message window. Also see ui_umsg. Parameters
  format | (const char *) format of message body
  va | (va_list) format args
Returns number of bytes output
ui_askyn | ui: see askbuttons_c()
ui_askfile | ui: see askfile_c()
ui_form | ui: see AskUsingForm_c()/OpenForm_c()
ui_close_form | ui: see close_form()
  ui_clearbreak | ui: Clear ctrl-break flag. NB: this call is also used to get ida version Parameters
  none |
Returns void
ui_wasbreak | ui: see wasBreak()
ui_asktext | ui: see asktext()
ui_askstr | ui: see askstr()
ui_askident | ui: see askident()
ui_askaddr | ui: see askaddr()
ui_askseg | ui: see askseg()
ui_asklong | ui: see asklong()
ui_obsolete_showauto | OBSOLETE. Use showAuto()
ui_obsolete_setstate | OBSOLETE. Use setStat()
ui_add_idckey | ui: see add_idc_hotkey()
ui_del_idckey | ui: see ui_del_idckey()
  ui_old_get_marker | ui: OBSOLETE - Get pointer to function. "void mark_idaview_for_refresh(ea_t ea)" This function will be called by the kernel when the database is changed Parameters
  none |
Returns vptr: (idaapi*marker)(ea_t ea) or NULL
ui_analyzer_options | ui: see analyzer_options()
ui_is_msg_inited | ui: see is_msg_inited()
ui_load_file | ui: see ui_load_new_file()
ui_run_dbg | ui: see ui_run_debugger()
ui_get_cursor | ui: see get_cursor()
ui_get_curline | ui: see get_curline()
  ui_get_hwnd | ui: Get HWND of the main IDA window. Parameters
  none |
Returns HWND or NULL: txt version: NULL gui version: HWND qt version under windows: HWND HWND is returned in result.vptr
ui_copywarn | ui: see display_copyright_warning()
  ui_getvcl | ui: Get VCL variables. Parameters
  app | (TApplication **)
  screen | (TScreen **)
  mouse | (TMouse **)
Returns int sizeof(TApplication)+sizeof(TScreen)+sizeof(TMouse) The text version fills the pointers with NULLs and returns 0
  ui_idp_event | cb: A processor module event has been generated (idp.hpp, idp_notify). This event should not be used as a parameter to callui(). The kernel uses it to notify the ui about the events Parameters
  event_mode | (int) one of processor_t::idp_notify
  va | (va_list)
Returns int code; code==0 - process the event. otherwise return code as the result
  ui_lock_range_refresh | ui: Lock the ui_range refreshes. The ranges will not be refreshed until the corresponding ui_unlock_range_refresh is issued. Parameters
  none |
Returns void
  ui_unlock_range_refresh | ui: Unlock the ui_range refreshes. If the number of locks is back to zero, then refresh the ranges. Parameters
  none |
Returns void
ui_setbreak | ui: see setBreak()
  ui_genfile_callback | cb: handle html generation. Parameters
  html_header_cb_t | **
  html_footer_cb_t | **
  html_line_cb_t | **
Returns void
ui_open_url | ui: see open_url()
  ui_hexdumpea | ui: Return the current address in a hex view. Parameters
  result | (ea_t *)
  hexdump_num | (int)
Returns void
  ui_set_xml | ui: set/update one or more XML values. Note obsolete, not supported anymore The 'name' element or attribute (use for an attribute) is created in all XML elements returned by the evaluation of the 'path' XPath expression, and receives the given 'value'. If 'name' is empty, the returned elements or attributes are directly updated to contain the new 'value'. Parameters
  path | (const char *)
  name | (const char *)
  value | (const char *)
Returns bool
  ui_get_xml | ui: return an XML value by evaluating the 'path' XPath expression. Note obsolete, not supported anymore Parameters
  path | (const char *)
  value | (idc_value_t *)
Returns bool
  ui_del_xml | ui: delete XML values corresponding to the evaluation of the 'path' XPath expression. Note obsolete, not supported anymore Parameters
  path | (const char *)
Returns bool
  ui_push_xml | ui: push an XML element on a stack whose uppermost element will be used to evaluate future relative XPath expressions. Note obsolete, not supported anymore Parameters
  path | (const char *)
Returns bool
  ui_pop_xml | ui: pop the uppermost XML element from the stack. Note obsolete, not supported anymore Parameters
  none |
Returns bool
ui_get_key_code | ui: see get_key_code()
  ui_setup_plugins_menu | ui: setup plugins submenu Parameters
  none |
Returns void
ui_refresh_navband | ui: see refresh_navband()
ui_obsolete_add_menu_item | See ui_register_action/ui_attach_action_to_menu.
ui_obsolete_del_menu_item | see ui_unregister_action/ui_detach_action_from_menu
  ui_debugger_menu_change | cb: debugger menu modification detected Parameters
  enable | (bool)
  Return values
  true | debugger menu has been added
  false | debugger menu will be removed
ui_get_curplace | ui: see get_custom_viewer_place()
ui_create_tform | ui: see create_tform()
ui_open_tform | ui: see open_tform()
ui_close_tform | ui: see close_tform()
ui_switchto_tform | ui: see switchto_tform()
ui_find_tform | ui: see find_tform()
ui_get_current_tform | ui: see get_current_tform()
  ui_get_tform_handle | ui: Get tform handle. Note obsolete, not supported Parameters
  form | (TForm *)
Returns HWND tform handles can be modified by the interface (for example, when the user switch from mdi to desktop) This function returns the current tform handle. It is better to hook to the 'ui_tform_visible' event and populate the window with controls at that time.
  ui_tform_visible | TForm is displayed on the screen. Use this event to populate the window with controls Parameters
  form | (TForm *)
  HWND | (void *) a HWND or QWidget* In unix, always work with QWigdet* In windows, use HWND if FORM_QWIDGET was not specified in open_tform()
Returns void
  ui_tform_invisible | TForm is being closed. Use this event to destroy the window controls Parameters
  form | (TForm *)
  HWND | (void *) a HWND or QWidget*
Returns void
  ui_get_ea_hint | cb: 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 Parameters
  ea | (ea_t)
  buf | (char *)
  bufsize | (size_t)
Returns true if generated a hint
  ui_get_item_hint | cb: ui wants to display multiline hint for an item. 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
  [out] | important_lines | (int *) number of important lines. if zero, output is ignored
  [out] | hint | (qstring *) the output string
Returns true if generated a hint
ui_obsolete_set_nav_colorizer | ui: see set_nav_colorizer()
ui_refresh_custom_viewer | ui: see refresh_custom_viewer()
ui_destroy_custom_viewer | ui: see destroy_custom_viewer()
ui_jump_in_custom_viewer | ui: see jumpto()
ui_obsolete_set_custom_viewer_popup | see ui_attach_action_to_popup
ui_obsolete_add_custom_viewer_popup | see ui_attach_action_to_popup
ui_obsolete_set_custom_viewer_handlers | see ui_set_custom_viewer_handlers
ui_get_custom_viewer_curline | ui: see get_custom_viewer_curline()
ui_get_current_viewer | ui: see get_current_viewer()
ui_is_idaview | ui: see is_idaview()
  ui_get_custom_viewer_hint | cb: ui wants to display a hint for a viewer (idaview or custom). Parameters
  | viewer | (TCustomControl*) viewer
  | place | (place_t *) current position in the viewer
  [out] | important_lines | (int *) number of important lines. if zero, the result is ignored
  [out] | hint | (qstring *) the output string
Returns true if generated a hint
ui_readsel2 | ui: see readsel2()
ui_set_custom_viewer_range | ui: set_custom_viewer_range()
  ui_database_inited | cb: database initialization has completed. the kernel is about to run idc scripts Parameters
  is_new_database | (int)
  idc_script | (const char *) - may be NULL
Returns void
  ui_ready_to_run | cb: all UI elements have been initialized. Automatic plugins may hook to this event to perform their tasks. Parameters
  none |
Returns void
ui_set_custom_viewer_handler | ui: see set_custom_viewer_handler(). also see other examples in Functions: custom viewer handlers
ui_refresh_chooser | ui: see refresh_chooser()
ui_open_builtin | ui: open a window of a built-in type. see Functions: open built-in windows
  ui_preprocess | cb: ida ui is about to handle a user command. Parameters
  name | (const char *) ui command name. these names can be looked up in ida[tg]ui.cfg
  Return values
  0 | ok
  nonzero | a plugin has handled the command
ui_postprocess | cb: an ida ui command has been handled
  ui_set_custom_viewer_mode | ui: switch between graph/text modes. Parameters
  custom_viewer | (TCustomControl *)
  graph_view | (bool)
  silent | (bool)
Returns bool success
ui_gen_disasm_text | ui: see gen_disasm_text()
  ui_gen_idanode_text | cb: generate disassembly text for a node. Plugins may intercept this event and provide custom text for an IDA graph node They may use gen_disasm_text() for that. Parameters
  fc | (qflow_chart_t *)
  node | (int)
  text | (text_t *)
Returns bool text_has_been_generated
ui_install_cli | ui: see: install_command_interpreter(), remove_command_interpreter()
ui_execute_sync | ui: see execute_sync()
  ui_enable_input_hotkeys | ui: enable or disable alphanumeric hotkeys - they can interfere with user input. Note obsolete, not supported Parameters
  enable | (bool)
Returns bool new_state
ui_get_chooser_obj | ui: see get_chooser_obj()
ui_enable_chooser_item_attrs | ui: see enable_chooser_item_attrs()
  ui_get_chooser_item_attrs | cb: get item-specific attributes for a chooser. This callback is generated only after enable_chooser_attrs() Parameters
  chooser_object | (void *)
  n | (uint32)
  attrs | (chooser_item_attrs_t *)
Returns void
ui_set_dock_pos | ui: see set_dock_pos()
ui_get_opnum | ui: see get_opnum()
  ui_install_custom_datatype_menu | ui: install/remove custom data type menu item. Parameters
  dtid | (int) data type id
  install | (bool)
Returns success
  ui_install_custom_optype_menu | ui: install/remove custom operand type menu item. Parameters
  fid | (int) format id
  install | (bool)
Returns success
  ui_get_range_marker | ui: Get pointer to function. see mark_range_for_refresh(ea_t, asize_t). This function will be called by the kernel when the database is changed Parameters
  none |
Returns vptr: (idaapi*marker)(ea_t ea, asize_t) or NULL
ui_get_highlighted_identifier | ui: see get_highlighted_identifier()
ui_lookup_key_code | ui: see lookup_key_code()
ui_load_custom_icon_file | ui: see load_custom_icon(const char *)
ui_load_custom_icon | ui: see load_custom_icon(const void *, unsigned int, const char *)
ui_free_custom_icon | ui: see free_custom_icon()
ui_process_action | ui: see process_ui_action()
ui_new_code_viewer | ui: see create_code_viewer()
ui_addons | ui: see Functions: add-ons
ui_execute_ui_requests | ui: see execute_ui_requests(ui_request_t, ...)
ui_execute_ui_requests_list | ui: see execute_ui_requests(ui_requests_t)
ui_register_timer | ui: see register_timer()
ui_unregister_timer | ui: see unregister_timer()
ui_take_database_snapshot | ui: see take_database_snapshot()
ui_restore_database_snapshot | ui: see restore_database_snapshot()
ui_set_code_viewer_line_handlers | ui: see set_code_viewer_line_handlers()
  ui_refresh_custom_code_viewer | ui: Refresh custom code viewer. Parameters
  TCustomControl | *code_viewer
Returns void
  ui_new_source_viewer | ui: Create new source viewer. Parameters
  parent | (TWinControl *)
  custview | (TCustomControl *)
  path | (const char *)
  lines | (strvec_t *)
  lnnum | (int)
  colnum | (int)
  flags | (int) (Source viewer creation flags)
Returns source_view_t *
ui_get_tab_size | ui: see get_tab_size()
ui_set_menu_item_icon | ui: see set_menu_item_icon()
ui_repaint_qwidget | ui: see repaint_custom_viewer()
ui_enable_menu_item | ui: see enable_menu_item()
  ui_custom_viewer_set_userdata | ui: Change place_t user data for a custom view. Parameters
  custom_viewer | (TCustomControl *)
  user_data | (void *)
Returns old user_data
ui_jumpto | ui: see jumpto(ea_t, int, int)
ui_choose_info | ui: see choose3()
ui_cancel_exec_request | ui: see cancel_exec_request()
ui_show_form | ui: see OpenForm_cv()
  ui_unrecognized_config_directive | ui: Possibly handle an extra config directive, passed through '-d' or '-D'. Parameters
  directive | (const char *) The config directive
Returns char * - one of Option result codes
ui_get_viewer_name | ui: see get_viewer_name()
ui_get_output_cursor | ui: see get_output_cursor()
ui_get_output_curline | ui: see get_output_curline()
ui_get_output_selected_text | ui: see get_output_selected_text()
ui_obsolete_add_output_popup | see ui_attach_action_to_popup
ui_get_tform_idaview | ui: see get_tform_idaview()
ui_get_renderer_type | ui: see get_view_renderer_type()
ui_set_renderer_type | ui: see set_view_renderer_type()
ui_askfile2 | ui: see askfile2_c()
ui_get_viewer_user_data | ui: see get_viewer_user_data()
ui_get_viewer_place_type | ui: see get_viewer_place_type()
ui_ea_viewer_history_push_and_jump | ui: see ea_viewer_history_push_and_jump()
ui_ea_viewer_history_info | ui: see get_ea_viewer_history_info()
ui_register_action | ui: see register_action()
ui_unregister_action | ui: see unregister_action()
ui_attach_action_to_menu | ui: see attach_action_to_menu()
ui_detach_action_from_menu | ui: see detach_action_from_menu()
ui_attach_action_to_popup | ui: see attach_action_to_popup()
ui_detach_action_from_popup | ui: see detach_action_from_popup()
ui_attach_dynamic_action_to_popup | ui: see create attach_dynamic_action_to_popup()
ui_attach_action_to_toolbar | ui: see attach_action_to_toolbar()
ui_detach_action_from_toolbar | ui: see detach_action_from_toolbar()
  ui_updating_actions | cb: 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. Parameters
  ctx | (action_update_ctx_t *)
Returns void
  ui_updated_actions | cb: IDA is done updating actions. Parameters
  none |
Returns void
  ui_populating_tform_popup | cb: IDA is populating the context menu for a form. This is your chance to attach_action_to_popup(). Have a look at ui_finish_populating_tform_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_tform_popup.) Parameters
  form | (TForm *)
  popup_handle | (TPopupMenu *)
Returns void ui: see ui_finish_populating_tform_popup
  ui_finish_populating_tform_popup | cb: IDA is about to be done populating the context menu for a form. This is your chance to attach_action_to_popup(). Parameters
  form | (TForm *)
  popup_handle | (TPopupMenu *)
Returns void ui: see ui_populating_tform_popup
ui_update_action_attr | ui: see Functions: update actions
ui_get_action_attr | ui: see Functions: get action attributes
  ui_plugin_loaded | cb: The plugin was loaded in memory. Parameters
  plugin_info | (const plugin_info_t *)
  ui_plugin_unloading | cb: The plugin is about to be unloaded Parameters
  plugin_info | (const plugin_info_t *)
ui_get_tform_type | ui: see get_tform_type()
  ui_current_tform_changed | cb: The currently-active TForm changed. Parameters
  form | (TForm *)
  prev_form | (TForm *)
Returns void
ui_get_tform_title | ui: see get_tform_title()
  ui_umsg | ui: Show a message in the message window. All strings ('format', and those that will be used for 's' format specifiers) MUST be utf-8-encoded strings. See also: ui_msg Parameters
  format | (const char *)
  va | (va_list)
Returns number of bytes output
ui_get_user_strlist_options | ui: see get_user_strlist_options()
ui_askqstr | ui: see askqstr()
ui_new_custom_viewer | ui: see create_viewer()
  ui_custom_viewer_jump | ui: set the current location, and have the viewer display it Parameters
  v | (TCustomControl *)
  loc | (const lochist_entry_t *)
  flags | (uint32) or'ed combination of CVNF_* values
Returns success
ui_set_custom_viewer_handlers | ui: see set_custom_viewer_handlers()
ui_get_registered_actions | ui: see get_registered_actions()
ui_create_toolbar | ui: see create_toolbar()
ui_delete_toolbar | ui: see delete_toolbar()
ui_create_menu | ui: see create_menu()
ui_delete_menu | ui: see delete_menu()
ui_set_nav_colorizer | ui: see set_nav_colorizer()
ui_get_chooser_data | ui: see get_chooser_data()
ui_last | the last notification code
ui_dbg_begin | debugger callgates. should not be used directly, see dbg.hpp for details

enum custom_viewer_handler_id_t

Custom viewer & code viewer handler types.

Enumerator
CVH_KEYDOWN | see custom_viewer_keydown_t
CVH_POPUP | see custom_viewer_popup_t
CVH_DBLCLICK | see custom_viewer_dblclick_t
CVH_CURPOS | see custom_viewer_curpos_t
CVH_CLOSE | see custom_viewer_close_t
CVH_CLICK | see custom_viewer_click_t
CVH_QT_AWARE | see set_custom_viewer_qt_aware()
CVH_HELP | see custom_viewer_help_t
CVH_MOUSEMOVE | see custom_viewer_mouse_moved_t
CDVH_USERDATA | see set_code_viewer_user_data()
CDVH_SRCVIEW | see set_code_viewer_is_source()
CDVH_LINES_CLICK | see code_viewer_lines_click_t
CDVH_LINES_DBLCLICK | see code_viewer_lines_click_t
CDVH_LINES_POPUP | see code_viewer_lines_click_t
CDVH_LINES_DRAWICON | see code_viewer_lines_icon_t
CDVH_LINES_LINENUM | see code_viewer_lines_linenum_t
CDVH_LINES_ICONMARGIN | see set_code_viewer_lines_icon_margin()
CDVH_LINES_RADIX | see set_code_viewer_lines_radix()
CDVH_LINES_ALIGNMENT | see set_code_viewer_lines_alignment()

enum msg_notification_t

Notification codes for events in the message window.

Enumerator
  msg_activated | The message window is activated. Parameters
  none |
Returns void
  msg_deactivated | The message window is deactivated. Parameters
  none |
Returns void
  msg_click | Click event. Parameters
  x | (int) x-coordinate
  y | (int) y-coordinate
  state | (::view_event_state_t)
  Return values
  1 | handled
  0 | not handled (invoke default handler)
  msg_dblclick | Double click event. Parameters
  x | (int) x-coordinate
  y | (int) y-coordinate
  state | (::view_event_state_t)
  Return values
  1 | handled
  0 | not handled (invoke default handler)
  msg_closed | View closed. Parameters
  none |
Returns void
  msg_keydown | Key down event. Parameters
  key | (int)
  state | (::view_event_state_t)
  Return values
  1 | handled
  0 | not handled (invoke default handler)

enum view_notification_t

Notification codes sent by the UI for IDAView or custom viewer events.

These notification codes should be used together with HT_VIEW hook type.

Enumerator
  view_activated | A view is activated. Parameters
  view | (TCustomControl *)
  view_deactivated | A view is deactivated. Parameters
  view | (TCustomControl *)
  view_keydown | Key down event. Parameters
  view | (TCustomControl *)
  key | (int)
  state | (::view_event_state_t)
  view_click | Click event. Parameters
  view | (TCustomControl *)
  event | (const view_mouse_event_t *)
  view_dblclick | Double click event. Parameters
  view | (TCustomControl *)
  event | (const view_mouse_event_t *)
  view_curpos | Cursor position changed. Parameters
  view | (TCustomControl *)
  view_created | A view is being created. Parameters
  view | (TCustomControl *)
  view_close | View closed. Parameters
  view | (TCustomControl *)
  view_switched | A view's renderer has changed. Parameters
  view | (TCustomControl *)
  rt | (tcc_renderer_type_t)
  view_mouse_over | The user moved the mouse over (or out of) a node or an edge. This is only relevant in a graph view. Parameters
  view | (TCustomControl *)
  event | (const view_mouse_event_t *)

enum action_state_t

Action states - returned by action_handler_t::update()

Enumerator
AST_ENABLE_ALWAYS | enable action and do not call action_handler_t::update() anymore
AST_ENABLE_FOR_IDB | enable action for the current idb. call action_handler_t::update() when a database is opened/closed
AST_ENABLE_FOR_FORM | enable action for the current form. call action_handler_t::update() when a form gets/loses focus
AST_ENABLE | enable action - call action_handler_t::update() when anything changes
AST_DISABLE_ALWAYS | disable action and do not call action_handler_t::action() anymore
AST_DISABLE_FOR_IDB | analog of AST_ENABLE_FOR_IDB
AST_DISABLE_FOR_FORM | analog of AST_ENABLE_FOR_FORM
AST_DISABLE | analog of AST_ENABLE

enum action_attr_t

Codes for getting/setting action attributes.

Enumerator
AA_NONE | no effect
AA_LABEL | see update_action_label()
AA_SHORTCUT | see update_action_shortcut()
AA_TOOLTIP | see update_action_tooltip()
AA_ICON | see update_action_icon()
AA_STATE | see update_action_state()
AA_CHECKABLE | see update_action_checkable()
AA_CHECKED | see update_action_checked()
AA_VISIBILITY | see update_action_visibility()

## Function Documentation

idaman void ida_export init_kernel | ( | callui_t(idaapi *)(ui_notification_t what,...) | _callui,
|  | int | argc,
|  | char * | argv[]
| ) |  |

The user interface must call this function before calling any kernel functions.

Parameters

  _callui | This should be the function named CALLUI The CALLUI function is a dispatcher - the user interface should have it.
  argc | argc from main()
  argv | argv from main()

idaman int ida_export init_database | ( | int | argc,
|  | const char *const * | argv,
|  | int * | newfile
| ) |  |

After calling init_kernel() the ui must call this function.

It will open the database specified in the command line. If the database did not exist, a new database will be created and the input file will be loaded.

Returns
  0-ok, otherwise an exit code

idaman void ida_export term_database | ( | void |  | ) |

The database termination function.

This function should be called to close the database.

idaman void ida_export term_kernel | ( | void |  | ) |

The kernel termination function.

This function will be automatically called when IDA exits. There is no need to call it from plugins.

bool get_kernel_version | ( | char * | buf,
|  | size_t | bufsize
| ) |  |
| inline

Get IDA kernel version (in a string like "5.1").

For old versions which do not support this call, returns false

int register_place_class | ( | const place_t * | tmplate,
|  | int | flags,
|  | const plugin_t * | owner
| ) |  |
| inline

Register information about a place_t class.

The kernel will not take ownership, nor delete the 'tmplate' instance. Therefore, it's up to the plugin to handle it (the recommended way of doing it is to pass address of a const static instance.) In addition, the place_t will be automatically unregistered when the owner plugin is unloaded from memory.

Parameters

  tmplate | the place_t template
  flags | or'ed combination of PCF_* flags
  owner | the owner plugin of the place_t type. Cannot be NULL.

Returns
  the place_t ID, or -1 if an error occured.

idaman const place_t* ida_export get_place_class | ( | int * | out_flags,
|  | int * | out_sdk_version,
|  | int | id
| ) |  |

Get information about a previously-registered place_t class.

See also register_place_class().

Parameters

  out_flags | output flags (can be NULL)
  out_sdk_version | sdk version the place was created with (can be NULL)
  id | place class ID

Returns
  the place_t template, or NULL if not found

idaman int ida_export get_place_class_id | ( | const char * | name | ) |

Get the place class ID for the place that has been registered as 'name'.

Parameters

  name | the class name

Returns
  the place class ID, or -1 if not found

idaman void ida_export register_loc_converter | ( | const char * | p1,
|  | const char * | p2,
|  | lochist_entry_cvt_t * | cvt
| ) |  |

Register a converter, that will be used for the following reasons:

- determine what view can be synchronized with what other view
- when views are synchronized, convert the location from one view, into an appropriate location in the other view
- if one of p1 or p2 is "idaplace_t", and the other is PCF_EA_CAPABLE, then the converter will also be called when the user wants to jump to an address (e.g., by pressing "g"). In that case, from's place_t's lnnum will be set to -1 (i.e., can be used to descriminate between proper synchronizations, and jump to's if needed.)

Note: the converter can be used to convert in both directions, and can be called with its 'from' being of the class of 'p1', or 'p2'. If you want your converter to work in only one direction (e.g., from 'my_dictionary_place_t' -> 'my_definition_place_t'), you can have it return false when it is called with a lochist_entry_t's whose place is of type 'my_definition_place_t'.

Note: Whenever one of the 'p1' or 'p2' places is unregistered, corresponding converters will be automatically unregistered as well.

Parameters

  p1 | the name of the first place_t class this converter can convert from/to
  p2 | the name of the second place_t class this converter can convert from/to
  cvt | the converter

idaman lochist_entry_cvt_t* ida_export lookup_loc_converter | ( | const char * | p1,
|  | const char * | p2
| ) |  |

Search for a place converter from lochist_entry_t's with places of type 'p1' to lochist_entry_t's with places of type 'p2'.

Parameters

  p1 | the name of the place_t class to convert from
  p2 | the name of the place_t class to convert to

Returns
  a converter, or NULL if none found

void request_refresh | ( | unsigned int | mask | ) |
| inline

Request a refresh of a builtin window.

Parameters

  mask | Window refresh flags

int ida_deb | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display debug message.

Parameters

  ida_debug_bits | IDA debug bits, also see debug
  format | printf()-style format

Returns
  number of bytes output Note: use deb() macro

idaman void ida_export ida_checkmem | ( | const char * | file,
|  | int | line
| ) |  |

Checking heap is not available anymore.

nav_colorizer_t* set_nav_colorizer | ( | nav_colorizer_t * | func | ) |
| inline

Install new navigation band colorizer (ui_set_nav_colorizer).

Returns
  the previous colorizer function

THREAD_SAFE int execute_ui_requests | ( | ui_requests_t * | reqs | ) |
| inline

Execute a list of UI requests (ui_execute_ui_requests_list).

Returns
  a request id: a unique number that can be used to cancel the request

THREAD_SAFE int execute_ui_requests | ( | ui_request_t * | req,
|  |  | ...
| ) |  |
| inline

Execute a variable number of UI requests (ui_execute_ui_requests).

The UI requests will be dispatched in the context of the main thread.

Parameters

  req | pointer to the first request ,use NULL to terminate the var arg request list

Returns
  a request id: a unique number that can be used to cancel the request

THREAD_SAFE bool cancel_exec_request | ( | int | req_id | ) |
| inline

Try to cancel an asynchronous exec request (ui_cancel_exec_request).

Parameters

  req_id | request id

Return values

  true | successfully canceled
  false | request has already been processed.

bool jumpto | ( | ea_t | ea,
|  | int | opnum = `-1`,
|  | int | uijmp_flags = `UIJMP_ACTIVATE`
| ) |  |
| inline

Jump to the specified address (ui_jumpto).

Parameters

  ea | destination
  opnum | -1: don't change x coord
  uijmp_flags | Jump flags

Returns
  success

bool banner | ( | int | wait | ) |
| inline

Show a banner dialog box (ui_banner).

Parameters

  wait | time to wait before closing

Return values

  1 | ok
  0 | esc was pressed

void refresh_idaview_anyway | ( | void |  | ) |
| inline

Refresh all disassembly views (ui_refresh), forces an immediate refresh.

Please consider request_refresh() instead

bool get_cursor | ( | int * | x,
|  | int * | y
| ) |  |
| inline

Get the cursor position on the screen (ui_get_cursor).

Note
  coordinates are 0-based

Parameters

  [out] | x | x-coordinate
  [out] | y | y-coordinate

Return values

  true | pointers are filled
  false | no disassembly window open

bool get_output_cursor | ( | int * | x,
|  | int * | y
| ) |  |
| inline

Get coordinates of the output window's cursor (ui_get_output_cursor).

Note
  coordinates are 0-based
  this function will succeed even if the output window is not visible

Parameters

  [out] | x | column
  [out] | y | line number (global, from the start of output)

Return values

  false | the output window has been destroyed.
  true | pointers are filled

char* get_curline | ( | void |  | ) |
| inline

Get current line from the disassemble window (ui_get_curline).

Returns
  cptr current line with the color codes (use tag_remove() to remove the color codes)

bool read_selection | ( | ea_t * | ea1,
|  | ea_t * | ea2
| ) |  |
| inline

Get the selected area boundaries (ui_readsel).

See also: readsel2()

Parameters

  [out] | ea1 | start ea
  [out] | ea2 | end ea

Return values

  0 | no area is selected
  1 | ok, start ea and end ea are filled

ea_t get_hexdump_ea | ( | int | hexdump_num | ) |
| inline

Get the current address in a hex view.

Parameters

  hexdump_num | number of hexview window

ushort lookup_key_code | ( | int | key,
|  | int | shift,
|  | bool | is_qt
| ) |  |
| inline

Get shortcut code previously created by ui_get_key_code.

Parameters

  key | key constant
  shift | modifiers
  is_qt | are we using gui version?

void refresh_navband | ( | bool | force | ) |
| inline

Refresh navigation band if changed (ui_refresh_navband).

Parameters

  force | refresh regardless

bool refresh_chooser | ( | const char * | title | ) |
| inline

Mark a non-modal custom chooser for a refresh (ui_refresh_chooser).

Parameters

  title | title of chooser

Returns
  success

bool close_chooser | ( | const char * | title | ) |
| inline

Close a non-modal chooser (ui_close_chooser).

Parameters

  title | window title of chooser to close

Returns
  success

void gen_disasm_text | ( | ea_t | ea1,
|  | ea_t | ea2,
|  | text_t & | text,
|  | bool | truncate_lines
| ) |  |
| inline

Generate disassembly text for a range.

Parameters

  | ea1 | start address
  | ea2 | end address
  [out] | text | result
  | truncate_lines | (on idainfo::margin)

THREAD_SAFE int execute_sync | ( | exec_request_t & | req,
|  | int | reqf
| ) |  |
| inline

Execute code in the main thread.

Parameters

  req | request specifying the code to execute
  reqf | Exec request flags

Returns
  if MFF_NOWAIT is specified, return the request id. otherwise return the value returned by exec_request_t::execute().

bool set_dock_pos | ( | const char * | src_ctrl,
|  | const char * | dest_ctrl,
|  | int | orient,
|  | int | left = `0`,
|  | int | top = `0`,
|  | int | right = `0`,
|  | int | bottom = `0`
| ) |  |
| inline

Set the docking position of a form (ui_set_dock_pos).

Parameters

  src_ctrl | title of form to dock
  dest_ctrl | where to dock: if NULL or invalid then create a new tab relative to current active tab
  orient | Docking positions
  left,top,right,bottom | dimensions of dock, if not specified or invalid then create the form in the center of the screen with the default size

Returns
  success

int load_custom_icon | ( | const char * | file_name | ) |
| inline

Load an icon from a file (ui_load_custom_icon_file).

Also see load_custom_icon(const void *, unsigned int, const char *)

Parameters

  file_name | path to file

Returns
  icon id

int load_custom_icon | ( | const void * | ptr,
|  | unsigned int | len,
|  | const char * | format
| ) |  |
| inline

Load an icon and return its id (ui_load_custom_icon).

Parameters

  ptr | pointer to raw image data
  len | image data length
  format | image format

Returns
  icon id

bool process_ui_action | ( | const char * | name,
|  | int | flags = `0`,
|  | void * | param = `NULL`
| ) |  |
| inline

Processes a UI action by name.

Parameters

  name | action name
  flags | reserved/not used
  param | reserved/not used

bool take_database_snapshot | ( | snapshot_t * | ss,
|  | qstring * | err_msg
| ) |  |
| inline

Take a database snapshot (ui_take_database_snapshot).

Parameters

  ss | in/out parameter. in: description, flags out: filename, id
  err_msg | optional error msg buffer

Returns
  success

bool restore_database_snapshot | ( | const snapshot_t * | ss,
|  | ss_restore_cb_t | cb,
|  | void * | ud
| ) |  |
| inline

Restore a database snapshot.

Note: This call is asynchronous. When it is completed, the callback will be triggered.

Parameters

  ss | snapshot instance (see build_snapshot_tree())
  cb | A callback that will be triggered with a NULL string. on success and an actual error message on failure.
  ud | user data passed to be passed to the callback

Returns
  false if restoration could not be started (snapshot file was not found).
  If the returned value is True then check if the operation succeeded from the callback.

THREAD_SAFE qtimer_t register_timer | ( | int | interval_ms,
|  | int(idaapi *)(void *ud) | callback,
|  | void * | ud
| ) |  |
| inline

Register a timer (ui_register_timer).

Timer functions are thread-safe and the callback is executed in the context of the main thread.

Parameters

  interval_ms | interval in milliseconds
  callback | the callback can return -1 to unregister the timer; any other value >= 0 defines the new interval for the timer
  ud | callback params

Returns
  handle to registered timer (use this handle to unregister it)

THREAD_SAFE bool unregister_timer | ( | qtimer_t | t | ) |
| inline

Unregister a timer (ui_unregister_timer).

Parameters

  t | handle to a registered timer

Returns
  success

bool register_action | ( | const action_desc_t & | desc | ) |
| inline

Create a new action (ui_register_action).

After an action has been created, it is possible to attach it to menu items (attach_action_to_menu()), or to popup menus (attach_action_to_popup()).

Because the actions will need to call the handler's activate() and update() methods at any time, you shouldn't build your action handler on the stack.

Please see the SDK's "ht_view" plugin for an example how to register actions.

Parameters

  desc | action to register

Returns
  success

bool unregister_action | ( | const char * | name | ) |
| inline

Delete a previously-registered action (ui_unregister_action).

Parameters

  name | name of action

Returns
  success

void get_registered_actions | ( | qstrvec_t * | out | ) |
| inline

Get a list of all currently-registered actions.

Parameters

  out | the list of actions to be filled

bool create_toolbar | ( | const char * | name,
|  | const char * | label,
|  | const char * | before = `NULL`,
|  | int | flags = `0`
| ) |  |
| inline

Create a toolbar with the given name, label and optional position.

Parameters

  name | name of toolbar (must be unique)
  label | label of toolbar
  before | if non-NULL, the toolbar before which the new toolbar will be inserted
  flags | a combination of create toolbar flags, to determine toolbar position

Returns
  success

bool delete_toolbar | ( | const char * | name | ) |
| inline

Delete an existing toolbar.

Parameters

  name | name of toolbar

Returns
  success

bool create_menu | ( | const char * | name,
|  | const char * | label,
|  | const char * | before = `NULL`
| ) |  |
| inline

Create a menu with the given name, label and optional position.

Parameters

  name | name of menu (must be unique)
  label | label of menu
  before | if non-NULL, the menu before which the new menu will be inserted

Returns
  success

bool delete_menu | ( | const char * | name | ) |
| inline

Delete an existing menu.

Parameters

  name | name of menu

Returns
  success

bool attach_action_to_menu | ( | const char * | menupath,
|  | const char * | name,
|  | int | flags
| ) |  |
| inline

Attach a previously-registered action to the menu (ui_attach_action_to_menu).

Note
  You should not change top level menu, or the Edit,Plugins submenus If you want to modify the debugger menu, do it at the ui_debugger_menu_change event (ida might destroy your menu item if you do it elsewhere).

Parameters

  menupath | path to the menu item after or before which the insertion will take place. Example: Debug/StartProcess Whitespace, punctuation are ignored. It is allowed to specify only the prefix of the menu item. Comparison is case insensitive. menupath may start with the following prefixes: [S] - modify the main menu of the structure window [E] - modify the main menu of the enum window
  name | the action name
  flags | a combination of Set menu flags, to determine menu item position

Returns
  success

bool detach_action_from_menu | ( | const char * | menupath,
|  | const char * | name
| ) |  |
| inline

Detach an action from the menu (ui_detach_action_from_menu).

Parameters

  menupath | path to the menu item
  name | the action name

Returns
  success

bool attach_action_to_toolbar | ( | const char * | toolbar_name,
|  | const char * | name
| ) |  |
| inline

Attach an action to an existing toolbar (ui_attach_action_to_toolbar).

Parameters

  toolbar_name | the name of the toolbar
  name | the action name

Returns
  success

bool detach_action_from_toolbar | ( | const char * | toolbar_name,
|  | const char * | name
| ) |  |
| inline

Detach an action from the toolbar (ui_detach_action_from_toolbar).

Parameters

  toolbar_name | the name of the toolbar
  name | the action name

Returns
  success

bool register_and_attach_to_menu | ( | const char * | menupath,
|  | const char * | name,
|  | const char * | label,
|  | const char * | shortcut,
|  | int | flags,
|  | action_handler_t * | handler,
|  | const plugin_t * | owner
| ) |  |
| inline

Helper.

You are not encouraged to use this, as it mixes flags for both register_action(), and attach_action_to_menu().

The only reason for its existence is to make it simpler to port existing plugins to the new actions API.

bool set_menu_item_icon | ( | const char * | item_name,
|  | int | icon_id
| ) |  |
| inline

Set the icon of a menu item (ui_set_menu_item_icon).

Returns
  success

bool enable_menu_item | ( | const char * | item_name,
|  | bool | enable
| ) |  |
| inline

Enable or disable a menu item (ui_enable_menu_item).

Returns
  success

TForm* create_tform | ( | const char * | caption,
|  | HWND * | handle
| ) |  |
| inline

Create a new tform (only gui version) (ui_create_tform).

Hook to ui_tform_visible event instead.

Parameters

  | caption | window caption
  [out] | handle | handle of resulting window. you will need this if you do not use VCL.

Returns
  If a window with the specified caption exists, return a pointer to it. 'handle' will be NULL is this case.
  NB: Do not use 'handle' to populate the window, because it can be destroyed by the user interface at any time.
  Also, the handle is invalid at the form creation time. It is present only for compatibility reasons.
  The text version always returns NULL.

void open_tform | ( | TForm * | form,
|  | int | options
| ) |  |
| inline

Open a TForm (only gui version) (ui_open_tform).

Parameters

  form | form to display
  options | Form open flags

void close_tform | ( | TForm * | form,
|  | int | options
| ) |  |
| inline

Close tform (ui_close_tform, only gui version).

Parameters

  form | pointer to the form to close
  options | Form close flags

void switchto_tform | ( | TForm * | form,
|  | bool | take_focus
| ) |  |
| inline

Activate tform (only gui version) (ui_switchto_tform).

Parameters

  form | existing form to display
  take_focus | give focus to given form

TForm* find_tform | ( | const char * | caption | ) |
| inline

Find tform with the specified caption (only gui version) (ui_find_tform).

NB: this callback works only with the tabbed forms!

Parameters

  caption | title of tab, or window title if tform is not tabbed

Returns
  pointer to the TForm, NULL if none is found

TForm* get_current_tform | ( | void |  | ) |
| inline

Get a pointer to the current tform (only gui version) (ui_get_current_tform).

NB: this callback works only with the tabbed forms!

TCustomControl* create_custom_viewer | ( | const char * | title,
|  | TWinControl * | parent,
|  | const place_t * | minplace,
|  | const place_t * | maxplace,
|  | const place_t * | curplace,
|  | const renderer_info_t * | rinfo,
|  | void * | ud,
|  | const custom_viewer_handlers_t * | cvhandlers,
|  | void * | cvhandlers_ud
| ) |  |
| inline

Create new ida viewer based on place_t (ui_new_custom_viewer).

Parameters

  title | name of viewer
  parent | form to hold viewer
  minplace | first location of the viewer
  maxplace | last location of the viewer
  curplace | set current location
  handlers | handlers for the viewer (can be NULL)
  rinfo | renderer information (can be NULL)
  ud | contents of viewer

Returns
  pointer to resulting viewer

bool custom_viewer_jump | ( | TCustomControl * | v,
|  | const lochist_entry_t & | loc,
|  | uint32 | flags
| ) |  |
| inline

Append 'loc' to the viewer's history, and cause the viewer to display it.

Parameters

  v | (TCustomControl *)
  loc | (const lochist_entry_t &)
  flags | (uint32) or'ed combination of CVNF_* values

Returns
  success

bool ea_viewer_history_push_and_jump | ( | TCustomControl * | v,
|  | ea_t | ea,
|  | int | x,
|  | int | y,
|  | int | lnnum
| ) |  |
| inline

Push current location in the history and jump to the given location (ui_ea_viewer_history_push_and_jump).

This will jump in the given ea viewer and also in other synchronized views.

Parameters

  v | ea viewer
  ea | jump destination
  x,y | coords on screen
  lnnum | desired line number of given address

bool get_ea_viewer_history_info | ( | int * | nback,
|  | int * | nfwd,
|  | TCustomControl * | v
| ) |  |
| inline

Get information about what's in the history (ui_ea_viewer_history_info).

Parameters

  [out] | nback | number of available back steps
  [out] | nfwd | number of available forward steps
  | v | ea viewer

Return values

  false | if the given ea viewer does not exist
  true | otherwise

bool jumpto | ( | TCustomControl * | custom_viewer,
|  | place_t * | place,
|  | int | x,
|  | int | y
| ) |  |
| inline

Set cursor position in custom ida viewer.

Parameters

  custom_viewer | view
  place | target position
  x | desired cursor position (column)
  y | desired cursor position (line)

Returns
  success

place_t* get_custom_viewer_place | ( | TCustomControl * | custom_viewer,
|  | bool | mouse,
|  | int * | x,
|  | int * | y
| ) |  |
| inline

Get current place in a custom viewer (ui_get_curplace).

Parameters

  | custom_viewer | view
  | mouse | mouse position (otherwise cursor position)
  [out] | x | x coordinate
  [out] | y | y coordinate

bool attach_action_to_popup | ( | TForm * | form,
|  | TPopupMenu * | popup_handle,
|  | const char * | name,
|  | const char * | popuppath = `NULL`,
|  | int | flags = `0`
| ) |  |
| inline

Insert a previously-registered action into the form's popup menu (ui_attach_action_to_popup).

This function has two "modes": 'single-shot', and 'permanent'.

Parameters

  form | target form
  popup_handle | target popup menu if non-NULL, the action is added to this popup menu invocation (i.e., 'single-shot') if NULL, the action is added to a list of actions that should always be present in context menus for this widget (i.e., 'permanent'.)
  name | action name
  popuppath | can be NULL
  flags | a combination of SETMENU_ flags (see Set menu flags)

Returns
  success

bool detach_action_from_popup | ( | TForm * | form,
|  | const char * | name
| ) |  |
| inline

Remove a previously-registered action, from the list of 'permanent' context menu actions for this widget (ui_detach_action_from_popup).

This only makes sense if the action has been added to 'form's list of permanent popup actions by calling attach_action_to_popup in 'permanent' mode.

Parameters

  form | target form
  name | action name

bool attach_dynamic_action_to_popup | ( | TForm * | form,
|  | TPopupMenu * | popup_handle,
|  | const action_desc_t & | desc,
|  | const char * | popuppath = `NULL`,
|  | int | flags = `0`,
|  | char * | buf = `NULL`,
|  | size_t | bufsize = `size_t(-1)`
| ) |  |
| inline

Create & insert an action into the form's popup menu (ui_attach_dynamic_action_to_popup).

Note
  action_desc_t::handler for 'desc' must be instantiated using 'new', as it will be 'delete'd when the action is unregistered.

Parameters

  form | target form
  popup_handle | target popup
  desc | created with DYNACTION_DESC_LITERAL
  popuppath | can be NULL
  flags | a combination of SETMENU_ constants (see Set menu flags)
  buf | a buffer, to retrieve the generated action name - can be NULL
  bufsize | the buffer size

Returns
  success

bool get_action_label | ( | const char * | name,
|  | qstring * | label
| ) |  |
| inline

Get an action's label (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | label | the action label

Returns
  success

bool get_action_shortcut | ( | const char * | name,
|  | qstring * | shortcut
| ) |  |
| inline

Get an action's shortcut (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | shortcut | the action shortcut

Returns
  success

bool get_action_tooltip | ( | const char * | name,
|  | qstring * | tooltip
| ) |  |
| inline

Get an action's tooltip (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | tooltip | the action tooltip

Returns
  success

bool get_action_icon | ( | const char * | name,
|  | int * | icon
| ) |  |
| inline

Get an action's icon (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | icon | the icon id

Returns
  success

bool get_action_state | ( | const char * | name,
|  | action_state_t * | state
| ) |  |
| inline

Get an action's state (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | state | the action's state

Returns
  success

bool get_action_checkable | ( | const char * | name,
|  | bool * | checkable
| ) |  |
| inline

Get an action's checkability (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | checkable | the action's checkability

Returns
  success

bool get_action_checked | ( | const char * | name,
|  | bool * | checked
| ) |  |
| inline

Get an action's checked state (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | checked | the action's checked state

Returns
  success

bool get_action_visibility | ( | const char * | name,
|  | bool * | visibility
| ) |  |
| inline

Get an action's visibility (ui_get_action_attr).

Parameters

  | name | the action name
  [out] | visibility | the action's visibility

Returns
  success

const char* get_custom_viewer_curline | ( | TCustomControl * | custom_viewer,
|  | bool | mouse
| ) |  |
| inline

Get current line of custom viewer (ui_get_custom_viewer_curline).

The returned line contains color codes

Parameters

  custom_viewer | view
  mouse | mouse position (otherwise cursor position)

Returns
  pointer to contents of current line

bool get_output_curline | ( | char * | buf,
|  | size_t | bufsize,
|  | bool | mouse
| ) |  |
| inline

Get current line of output window (ui_get_output_curline).

Parameters

  buf | output buffer
  bufsize | size of buffer
  mouse | current for mouse pointer?

Returns
  false if output contains no text

bool get_output_selected_text | ( | char * | buf,
|  | size_t | bufsize
| ) |  |
| inline

Returns selected text from output window (ui_get_output_selected_text).

Parameters

  buf | output buffer
  bufsize | size of buffer

Returns
  true if there is a selection

TCustomControl* get_tform_idaview | ( | TForm * | parent | ) |
| inline

Get the TCustomControl associated with the given TForm (ui_get_tform_idaview).

Returns
  pointer to the TCustomControl that is present in the TForm
  NULL if the TForm doesn't host an IDA view.

void get_viewer_name | ( | TCustomControl * | v,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |
| inline

Get the name of the custom or ida viewer (ui_get_viewer_name).

Parameters

  v | pointer to custom viewer
  buf | output buffer
  bufsize | size of buffer

bool readsel2 | ( | TCustomControl * | v,
|  | twinpos_t * | p1,
|  | twinpos_t * | p2
| ) |  |
| inline

Get the selected area boundaries (ui_readsel2).

This is the more complex version of read_selection(). If you see only the addresses, use that instead.

Parameters

  | v | view
  [out] | p1 | start of selection
  [out] | p2 | end of selection

Return values

  false | no area is selected
  true | ok, start and end are filled

TCustomControl* create_code_viewer | ( | TForm * | parent,
|  | TCustomControl * | custview,
|  | int | flags = `0`
| ) |  |
| inline

Create a code viewer (ui_new_code_viewer).

Parameters

  parent | widget to contain the new code viewer
  custview | the custom view to be added
  flags | Code viewer flags

void set_code_viewer_line_handlers | ( | TCustomControl * | code_viewer,
|  | code_viewer_lines_click_t * | click_handler,
|  | code_viewer_lines_click_t * | popup_handler,
|  | code_viewer_lines_click_t * | dblclick_handler,
|  | code_viewer_lines_icon_t * | drawicon_handler,
|  | code_viewer_lines_linenum_t * | linenum_handler
| ) |  |
| inline

Set handlers for code viewer line events.

Any of these handlers may be NULL

int get_tab_size | ( | const char * | path | ) |
| inline

Get the size of a tab in spaces (ui_get_tab_size).

Parameters

  path | the path of the source view for which the tab size is requested. if NULL, the default size is returned.

THREAD_SAFE bool wasBreak | ( | void |  | ) |
| inline

Test the ctrl-break flag (ui_wasbreak).

Return values

  1 | Ctrl-Break is detected, a message is displayed
  2 | Ctrl-Break is detected again, a message is not displayed
  0 | Ctrl-Break is not detected

bool ui_load_new_file | ( | const char * | filename,
|  | linput_t * | li,
|  | ushort | neflags
| ) |  |
| inline

Display a load file dialog and load file (ui_load_file).

Parameters

  filename | the name of input file as is. (if the input file is from library, then this is the name in the library)
  li | loader input source
  neflags | combination of NEF_... bits (see Load file flags)

Return values

  true | file was successfully loaded
  false | otherwise

bool ui_run_debugger | ( | const char * | dbgopts,
|  | const char * | exename,
|  | int | argc,
|  | const char *const * | argv
| ) |  |
| inline

Load a debugger plugin and run the specified program (ui_run_dbg).

Parameters

  dbgopts | value of the -r command line switch
  exename | name of the file to run
  argc | number of arguments for the executable
  argv | argument vector

Returns
  success

bool load_dbg_dbginfo | ( | const char * | path,
|  | linput_t * | li = `NULL`,
|  | ea_t | base = `BADADDR`,
|  | bool | verbose = `false`
| ) |  |
| inline

Load debugging information from a file.

Parameters

  path | path to file
  li | loader input. if NULL, check DBG_NAME_KEY
  base | loading address
  verbose | dump status to message window

int add_idc_hotkey | ( | const char * | hotkey,
|  | const char * | idcfunc
| ) |  |
| inline

Add hotkey for IDC function (ui_add_idckey).

Parameters

  hotkey | hotkey name
  idcfunc | IDC function name

Returns
  IDC hotkey error codes

bool del_idc_hotkey | ( | const char * | hotkey | ) |
| inline

Delete IDC function hotkey (ui_del_idckey).

Parameters

  hotkey | hotkey name

Return values

  1 | ok
  0 | failed

bool get_highlighted_identifier | ( | char * | buf,
|  | size_t | bufsize,
|  | int | flags
| ) |  |
| inline

Get the highlighted identifier in the current IDAView (ui_get_highlighted_identifier).

Parameters

  buf | buffer to copy identifier to
  bufsize | buffer size
  flags | currently not used (pass 0)

Returns
  false if no identifier is highlighted

void* get_chooser_obj | ( | const char * | chooser_caption | ) |
| inline

Get the underlying object of the specified chooser (ui_get_chooser_obj).

NB: for single-column choosers, a proxy object will be returned.

Returns
  the object that was used to create the chooser

bool idaapi enable_chooser_item_attrs | ( | const char * | chooser_caption,
|  | bool | enable
| ) |  |
| inline

Enable item-specific attributes for chooser items (ui_enable_chooser_item_attrs).

For example: color list items differently depending on a criterium.
If enabled, the chooser will generate ui_get_chooser_item_attrs
events that can be intercepted by a plugin to modify the item attributes.
This event is generated only in the GUI version of IDA.
Specifying CH_ATTRS bit at the chooser creation time has the same effect.

Returns
  success

THREAD_SAFE void show_wait_box | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box with "Please wait...".

If the text message starts with "HIDECANCEL\n", the cancel button
won't be displayed in the dialog box and you don't need to check
for cancellations with wasBreak(). Plugins must call hide_wait_box()
to close the dialog box, otherwise the user interface will be disabled.

Note that, if the wait dialog is already visible, show_wait_box() will
1) push the currently-displayed text on a stack
2) display the new text
Then, when hide_wait_box() is called, if that stack isn't empty its top
label will be popped and restored in the wait dialog.
This implies that a plugin should call hide_wait_box() exactly as many
times as it called show_wait_box(), or the wait dialog might remain
visible and block the UI.
Also, in case the plugin knows the wait dialog is currently displayed,
alternatively it can call replace_wait_box(), to replace the text of the
dialog without pushing the currently-displayed text on the stack.

void close_form | ( | const TView *const * | fields,
|  | int | close_normally
| ) |  |
| inline

Close the form.

A helper function for the complex dialog box (form) callbacks. This function may be called from pushbutton callbacks in ui_form.

Parameters

  fields | array of form fields
  close_normally | control how the form is closed 1: form is closed normally as if the user pressed Enter 0: form is closed abnormally as if the user pressed Esc

void beep | ( | beep_t | beep_type = `beep_default` | ) |
| inline

Issue a beeping sound (ui_beep).

Parameters

  beep_type | beep_t

THREAD_SAFE void ask_for_feedback | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Show a message box asking to send the input file to suppo.nosp@m.rt@h.nosp@m.ex-ra.nosp@m.ys.c.nosp@m.om.

Parameters

  format | the reason why the input file is bad

char* askident | ( | const char * | defval,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input an identifier (ui_askident).

If the user enters a non-valid identifier, this function displays a warning and allows to correct it.

Parameters

  defval | default value. will be displayed initially in the input line. may be NULL.
  format | number of message from IDA.HLP to display as question in printf() style format

Returns
  NULL-if the user pressed Esc. otherwise returns pointer to identifier.

bool askaddr | ( | ea_t * | addr,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input an address (ui_askaddr).

Parameters

  addr | in/out parameter. contains pointer to the address.
  format | printf() style format string with the question

Return values

  0 | the user pressed Esc.
  1 | ok, the user entered an address

bool askseg | ( | sel_t * | sel,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input an segment name (ui_askseg).

This function allows to enter segment register names, segment base paragraphs, segment names to denote a segment.

Parameters

  sel | in/out parameter. contains selector of the segment
  format | printf() style format string with the question

Return values

  0 | if the user pressed Esc.
  1 | ok, the user entered an segment name

bool asklong | ( | sval_t * | value,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input an number (ui_asklong).

The number is represented in C-style. This function allows to enter any IDC expression and properly calculates it.

Parameters

  value | in/out parameter. contains pointer to the number
  format | printf() style format string with the question

Return values

  0 | if the user pressed Esc.
  1 | -ok, the user entered a valid number.

bool display_copyright_warning | ( | void |  | ) |
| inline

Display copyright warning (ui_copywarn).

Returns
  yes/no

THREAD_SAFE NORETURN void error | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display error dialog box and exit.

Err() function does the same but the format string is taken from IDA.HLP. If you just want to display an error message and let IDA continue, do NOT use this function! Use warning() instead.

Parameters

  format | printf() style message string. It may have some prefixes, see 'Format of dialog box' for details.

THREAD_SAFE void warning | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display warning dialog box and wait for the user to press Enter or Esc.

This messagebox will by default contain a "Don't display this message again"
checkbox if the message is repetitively displayed. If checked, the message
won't be displayed anymore during the current IDA session.
Warn() function does the same but the format string is taken from IDA.HLP

Parameters

  format | printf() style format string. It may have some prefixes, see 'Format of dialog box' for details.

THREAD_SAFE void info | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display info dialog box and wait for the user to press Enter or Esc.

This messagebox will by default contain a "Don't display this message again"
checkbox. If checked, the message will never be displayed anymore (state saved
in the Windows registry or the idareg.cfg file for a non-Windows version).
Info() function does the same but the format string is taken from IDA.HLP

Parameters

  format | printf() style format string. It may have some prefixes, see 'Format of dialog box' for details.

THREAD_SAFE NORETURN void nomem | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Display "no memory for module ..." dialog box and exit.

Parameters

  format | printf() style message string.

THREAD_SAFE int msg | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Output a formatted string to messages window [analog of printf()].

Message() function does the same but the format string is taken from IDA.HLP Everything appearing on the messages window may be written to a text file. For this the user should define the following environment variable:
set IDALOG=idalog.txt

Parameters

  format | printf() style message string.

Returns
  number of bytes output

THREAD_SAFE int umsg | ( | const char * | format,
|  |  | ...
| ) |  |
| inline

Show a message in the message window (ui_umsg, also see ui_msg).

All strings ('format', and those that will be used for 's' format specifiers), MUST be utf-8-encoded strings.

Returns
  number of bytes output

int askyn_c | ( | int | deflt,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and get choice from "Yes", "No", "Cancel".

Parameters

  deflt | default choice: one of Button IDs
  format | The question in printf() style format

Returns
  the selected button (one of Button IDs). Esc key returns ASKBTN_CANCEL.

int askbuttons_c | ( | const char * | Yes,
|  | const char * | No,
|  | const char * | Cancel,
|  | int | deflt,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and get choice from maximum three possibilities (ui_askyn).

Note
  for all buttons:
  - use "" or NULL to take the default name for the button.
  - use 'format' to hide the cancel button

Parameters

  Yes | text for the first button
  No | text for the second button
  Cancel | text for the third button
  deflt | default choice: one of Button IDs
  format | printf-style format string for question. It may have some prefixes, see below.
  va | parameters for the format string

Returns
  one of Button IDs specifying the selected button (Esc key returns Cancel/3rd button value)

char* askstr | ( | int | hist,
|  | const char * | defval,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input a text string (ui_askstr).

Use this function to ask one-line text. For multiline input, use asktext() and asksmalltext() functions. This function will trim the trailing spaces.

Parameters

  hist | category of history lines. an arbitrary number. this number determines lines accessible in the history of the user input (when he presses down arrow) One of Input line history constants should be used here
  defval | default value. will be displayed initially in the input line. may be NULL.
  format | printf() style format string with the question

Returns
  NULL-if the user pressed Esc. otherwise returns the entered value in a static storage.

bool askqstr | ( | qstring * | str,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input a text string (ui_askstr).

Use this function to ask one-line text. For multiline input, use asktext() and asksmalltext() functions. This function will trim the trailing spaces.

Parameters

  str | qstring to fill. Can contain default value. Cannot be NULL.
  format | printf() style format string with the question

Returns
  false-if the user pressed Esc, otherwise returns true.

char* asktext | ( | size_t | size,
|  | char * | answer,
|  | const char * | defval,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input multiline text (ui_asktext).

Parameters

  size | maximum size of text in bytes
  answer | output buffer. if you specify NULL then the answer will be returned in a buffer allocated by 'new char' operator.
  defval | default value. will be displayed initially in the input line. may be NULL.
  format | printf() style format string with the question

Returns
  NULL-if the user pressed Esc. otherwise returns pointer to text.

char* askfile_c | ( | int | savefile,
|  | const char * | defval,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input a file name (ui_askfile).

This function displays a window with file names present in the directory pointed to by 'defval'.

Parameters

  savefile | nonzero means filename will be used to save a file
  defval | default value. will be displayed initially in the input line. may be NULL may be or a wildcard file name.
  format | printf-style format string with the question

Returns
  NULL-if the user pressed Esc. Otherwise the user entered a valid file name.

char* askfile2_c | ( | bool | forsave,
|  | const char * | defdir,
|  | const char * | filters,
|  | const char * | format,
|  |  | ...
| ) |  |
| inline

Display a dialog box and wait for the user to input a file name (ui_askfile2).

This function displays a window with file names present in the directory pointed by 'defval'.

Parameters

  forsave | the entered file name will be used to save file
  defdir | default location
  filters | filters in the format 'description1|wildcard11;wildcards12;...|description2|wildcards21;wildcards22...|...', or the name of a file
  format | printf() style format string with the question

Return values

  pointer | to the resulting filename
  NULL | the user pressed Esc.

THREAD_SAFE uchar* idaapi pack_db | ( | uchar * | ptr,
|  | uchar * | end,
|  | uchar | x
| ) |  |
| inline

Pack a byte into a character string.

This function encodes numbers using an encoding similar to UTF. The smaller the number, the better the packing.

Parameters

  ptr | pointer to output buffer
  end | pointer to end of output buffer
  x | value to pack

Returns
  pointer to end of resulting string

idaman THREAD_SAFE uchar* ida_export pack_ds | ( | uchar * | ptr,
|  | uchar * | end,
|  | const char * | x,
|  | size_t | len = `0`
| ) |  |

Pack a string.

Parameters

  ptr | pointer to output buffer
  end | pointer to end of output buffer
  x | string to pack. If NULL, empty string is packed
  len | number of chars to pack. If 0, the length of given string is used

Returns
  pointer to end of packed string

idaman THREAD_SAFE char* ida_export unpack_ds | ( | const uchar ** | pptr,
|  | const uchar * | end,
|  | bool | empty_null
| ) |  |

Unpack a string.

Parameters

  pptr | pointer to packed string
  end | pointer to end of packed string
  empty_null | if true, then return NULL for empty strings. otherwise return an empty string (not NULL).

Returns
  pointer to unpacked string.
  this string will be allocated in dynamic memory.
  the caller should use qfree() to deallocate it.

THREAD_SAFE void* idaapi unpack_obj | ( | const uchar ** | pptr,
|  | const uchar * | end,
|  | void * | destbuf,
|  | size_t | destsize
| ) |  |
| inline

Unpack an object of a known size.

Parameters

  pptr | pointer to packed object
  end | pointer to end of packed object
  destbuf | output buffer
  destsize | size of output buffer

Returns
  pointer to the destination buffer. if any error, returns NULL.

THREAD_SAFE void* idaapi unpack_buf | ( | const uchar ** | pptr,
|  | const uchar * | end,
|  | size_t * | sz
| ) |  |
| inline

Unpack an object of an unknown size (packed with append_buf()).

Parameters

  | pptr | pointer to packed object
  | end | pointer to end of packed object
  [out] | sz | size of unpacked object

Returns
  pointer to the destination buffer, which is allocated in the dynamic memory.
  the caller should use qfree() to deallocate it.
  if any error, returns NULL.
  NB: zero size objects will return NULL too.

THREAD_SAFE const void* idaapi unpack_obj_inplace | ( | const uchar ** | pptr,
|  | const uchar * | end,
|  | size_t | objsize
| ) |  |
| inline

In-place version of unpack_obj().

It does not copy any data. It just returns a pointer to the object in the packed string. If any error, it returns NULL.

THREAD_SAFE const void* idaapi unpack_buf_inplace | ( | const uchar ** | pptr,
|  | const uchar * | end,
|  | size_t * | sz
| ) |  |
| inline

In-place version of unpack_buf().

It does not copy any data. It just returns a pointer to the object in the packed string. If any error, it returns NULL.

Parameters

  [out] | sz | size of the unpacked string

THREAD_SAFE void unpack_eavec | ( | ea_t | ea,
|  | eavec_t & | insns,
|  | const uchar ** | ptr,
|  | const uchar * | end
| ) |  |
| inline

Unpack a vector of ea values.

Parameters

  | ea | base value that was used to pack the eavec (see append_eavec())
  [out] | insns | resulting vector
  | ptr | pointer to packed eavec
  | end | pointer to end of packed eavec

idaman THREAD_SAFE bool ida_export unpack_xleb128 | ( | void * | res,
|  | int | nbits,
|  | bool | is_signed,
|  | const uchar ** | pptr,
|  | const uchar * | end
| ) |  |

Unpack an LEB128 encoded (DWARF-3 style) signed/unsigned value.

Do not use this function directly - see Template unpacking

THREAD_SAFE char* unpack_str | ( | const uchar ** | ptr,
|  | const uchar * | end
| ) |  |
| inline

Unpack a string in place.

Returns
  a pointer to the beginning of the string, and fills 'ptr' with a pointer to the end of the string

idaman THREAD_SAFE uint32 ida_export calc_crc32 | ( | uint32 | crc,
|  | const void * | buf,
|  | size_t | len
| ) |  |

Calculate CRC32 (polynom 0xEDB88320, zlib compatible).

Note
  in IDA versions before 6.0 a different, incompatible algorithm was used

idaman int ida_export regex_match | ( | const char * | str,
|  | const char * | pattern,
|  | bool | sense_case
| ) |  |

Match a string with a regular expression.

Return values

  0 | no match
  1 | match
  -1 | error

## Variable Documentation

idaman callui_t ida_export_data(idaapi* callui) (ui_notification_t what,...)

Pointer to the user-interface dispatcher function.

This pointer is in the kernel

idaman int ida_export_data batch

If this variable is set, then dialog boxes will not appear on the screen.

Warning/info messages are shown in the messages window.
The default value of user input dialogs will be returned to the caller immediately.
This variable is used to enable unattended work of ida.

idaman int ida_export_data errorexit

useful for atexit() functions, is 1 if we are exiting with from error() function.