IDA C++ SDK 9.2
Loading...
Searching...
No Matches
kernwin.hpp File Reference

Defines the interface between the kernel and the UI. More...

Go to the source code of this file.

Classes

union  callui_t
 Callui return codes. More...
class  place_t
 Denotes a displayed line. More...
class  simpleline_place_t
 A location in a view populated by a strvec_t. More...
struct  hexplace_gen_t
class  hexplace_t
class  tiplace_t
class  sync_source_t
struct  synced_group_t
class  twinpos_t
 A position in a text window. More...
class  twinline_t
 A line in a text window. More...
struct  lines_rendering_input_t
 Contains information necessary for plugins to compute extra information needed for rendering. More...
struct  line_rendering_output_entry_t
struct  lines_rendering_output_t
struct  line_section_t
struct  tagged_line_section_t
struct  tagged_line_sections_t
struct  listing_location_t
 Holds (live) data about a location being displayed in a listing. More...
struct  chooser_item_attrs_t
 Chooser item attributes. More...
struct  chooser_row_info_t
 Row data returned by get_chooser_rows(). More...
struct  chooser_stdact_desc_t
struct  chooser_base_t
 Chooser object. #chooser. More...
struct  chooser_t
 The chooser object without multi-selection. More...
struct  chooser_t::cbret_t
 Return value of ins(), del(), edit(), enter(), refresh() callbacks. More...
struct  chooser_multi_t
 The chooser object with multi-selection. 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...
union  view_mouse_event_location_t
 Abstraction of location in flat view/graph views (out of 'view_mouse_event_t' to make it easy for SWiG to wrap) More...
struct  view_mouse_event_t
 Information about a mouse action within a view. More...
class  locchange_md_t
struct  input_event_t
 A representation of a user input. More...
struct  input_event_t::input_event_shortcut_data_t
struct  input_event_t::input_event_keyboard_data_t
struct  input_event_t::input_event_mouse_data_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_cur_sel_t
struct  action_ctx_base_t
 Maintain information about the current state of the UI. 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  range_marker_suspender_t
 Ignores range_marker during the lifetime of the object. 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...

Namespaces

namespace  QT

Typedefs

typedef uchar color_t
 see <lines.hpp>
typedef uval_t uval_t
typedef uint64 tif_cursor_t
 A location in a tinfo_t.
typedef QT::QWidget TWidget
typedef qvector< sync_source_tsync_source_vec_t
typedef lecvt_code_t idaapi lochist_entry_cvt2_t(lochist_entry_t *dst, const lochist_entry_t &src, TWidget *view, uint32 flags)
typedef qvector< twinline_ttext_t
 A group of lines in a text window.
typedef qvector< const twinline_t * > section_lines_refs_t
typedef qvector< section_lines_refs_tsections_lines_refs_t
typedef qvector< line_rendering_output_entry_t * > line_rendering_output_entries_refs_t
typedef int cpidx_t
typedef int cplen_t
typedef qvector< cpidx_tcpidxvec_t
typedef qvector< line_section_tline_sections_t
typedef qvector< tagged_line_section_ttagged_line_section_vec_t
typedef int twidget_type_t
 Window types
typedef qvector< chooser_row_info_tchooser_row_info_vec_t
typedef action_ctx_base_t action_update_ctx_t
 Instances of this class will be filled with information that is commonly used by actions when they need to update.
typedef uint32 idaapi nav_colorizer_t(ea_t ea, asize_t nbytes, void *ud)
 Navigation band colorizer function.
typedef int input_event_modifiers_t
typedef input_event_modifiers_t view_event_state_t
typedef bool idaapi custom_viewer_keydown_t(TWidget *cv, int vk_key, int shift, void *ud)
 The user has pressed a key.
typedef void idaapi custom_viewer_popup_t(TWidget *cv, void *ud)
 The user right clicked. See ui_populating_widget_popup, too.
typedef void idaapi custom_viewer_mouse_moved_t(TWidget *cv, int shift, view_mouse_event_t *e, void *ud)
 The user moved the mouse.
typedef bool idaapi custom_viewer_click_t(TWidget *cv, int shift, void *ud)
 The user clicked.
typedef bool idaapi custom_viewer_dblclick_t(TWidget *cv, int shift, void *ud)
 The user double clicked.
typedef void idaapi custom_viewer_curpos_t(TWidget *cv, void *ud)
 Deprecated.
typedef void idaapi custom_viewer_close_t(TWidget *cv, void *ud)
 Custom viewer is being destroyed.
typedef int idaapi obsolete_custom_viewer_help_t(TWidget *cv, void *ud)
typedef bool idaapi custom_viewer_help_t(qstring *out, TWidget *cv, void *ud)
 Custom viewer: the user pressed F1 If true and out is filled, it will be considered either an absolute URL, or a path relative to the user guide's root.
typedef void idaapi custom_viewer_adjust_place_t(TWidget *v, lochist_entry_t *loc, void *ud)
 Fine-tune 'loc->place()' according to the X position (i.e., 'loc->renderer_info().pos.cx')
typedef int idaapi custom_viewer_get_place_xcoord_t(TWidget *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?
typedef int idaapi custom_viewer_can_navigate_t(TWidget *v, const lochist_entry_t *now, const locchange_md_t &md, void *ud)
 The user asked to navigate to the given location.
typedef void idaapi custom_viewer_location_changed_t(TWidget *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(TWidget *c, const place_t *p, int pos, int shift, void *ud)
 The user clicked, right clicked or double clicked.
typedef int idaapi code_viewer_lines_icon_t(TWidget *cv, const place_t *p, int *pos, void *ud)
 Retrieve an icon for a code viewer line.
typedef bool idaapi code_viewer_lines_linenum_t(TWidget *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 action_ctx_base_t 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.
typedef struct __qtimer_tqtimer_t
 Timer opaque handle.
typedef int idaapi formchgcb_t(int field_id, form_actions_t &fa)
 Callback.
typedef int idaapi buttoncb_t(int button_code, form_actions_t &fa)
 Callback.
typedef qvector< simpleline_t > strvec_t
 A collection of simple lines to populate a custom view.

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 <loader.hpp> More...
enum  choose_type_t {
  chtype_generic , chtype_idasgn , chtype_entry , chtype_name ,
  chtype_stkvar_xref , chtype_xref , chtype_func , chtype_segm ,
  chtype_strpath , chtype_idatil , chtype_srcp , chtype_struct ,
  chtype_enum , chtype_enum_by_value_and_size
}
 List chooser types. More...
enum  beep_t { beep_default = 0 }
 < Beep types More...
enum  tcc_renderer_type_t { TCCRT_INVALID = 0 , TCCRT_FLAT , TCCRT_GRAPH , TCCRT_PROXIMITY }
 TWidget renderer type. More...
enum  tcc_place_type_t {
  TCCPT_INVALID = 0 , TCCPT_PLACE , TCCPT_SIMPLELINE_PLACE , TCCPT_IDAPLACE ,
  TCCPT_TIPLACE
}
 TWidget 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  execute_sync_availability_t {
  esa_unknown = 0 , esa_available , esa_unavailable , esa_release ,
  esa_app_unavailable
}
enum  execute_sync_ctl_t { esctl_none = 0 , esctl_cancel_request , esctl_cancel_thread_requests , esctl_set_availability }
enum  ui_notification_t {
  ui_null = 0 , ui_range , ui_refresh_choosers , ui_idcstart ,
  ui_idcstop , ui_suspend , ui_resume , ui_broadcast ,
  ui_read_selection , ui_read_range_selection , ui_unmarksel , ui_screenea ,
  ui_saving , ui_saved , ui_refreshmarked , ui_refresh ,
  ui_choose , ui_close_chooser , ui_banner , ui_setidle ,
  ui_database_closed , ui_beep , ui_is_msg_inited , ui_msg ,
  ui_mbox , ui_clr_cancelled , ui_set_cancelled , ui_test_cancelled ,
  ui_ask_buttons , ui_ask_file , ui_ask_form , ui_ask_text ,
  ui_ask_str , ui_ask_addr , ui_ask_seg , ui_ask_long ,
  ui_add_idckey , ui_obsolete_del_idckey , ui_analyzer_options , ui_load_file ,
  ui_run_dbg , ui_get_cursor , ui_get_curline , ui_copywarn ,
  ui_noabort , ui_lock_range_refresh , ui_unlock_range_refresh , ui_genfile_callback ,
  ui_open_url , ui_hexdumpea , ui_get_key_code , ui_setup_plugins_menu ,
  ui_get_kernel_version , ui_is_idaq , ui_refresh_navband , ui_debugger_menu_change ,
  ui_get_curplace , ui_obsolete_display_widget , ui_close_widget , ui_activate_widget ,
  ui_find_widget , ui_get_current_widget , ui_widget_visible , ui_widget_closing ,
  ui_widget_invisible , ui_get_ea_hint , ui_get_item_hint , ui_refresh_custom_viewer ,
  ui_destroy_custom_viewer , ui_jump_in_custom_viewer , ui_get_custom_viewer_curline , ui_get_current_viewer ,
  ui_is_idaview , ui_get_custom_viewer_hint , ui_set_custom_viewer_range , ui_database_inited ,
  ui_ready_to_run , ui_set_custom_viewer_handler , ui_refresh_chooser , ui_open_builtin ,
  ui_preprocess_action , ui_postprocess_action , ui_set_custom_viewer_mode , ui_gen_disasm_text ,
  ui_gen_idanode_text , ui_install_cli , ui_execute_sync , ui_execute_sync_ctl ,
  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_lookup_key_code , ui_load_custom_icon_file , ui_load_custom_icon , ui_free_custom_icon ,
  ui_process_action , ui_create_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_obsolete_refresh_custom_code_viewer , ui_create_source_viewer ,
  ui_get_tab_size , ui_repaint_qwidget , ui_custom_viewer_set_userdata , ui_jumpto ,
  ui_open_form , ui_unrecognized_config_directive , ui_get_output_cursor , ui_get_output_curline ,
  ui_get_output_selected_text , ui_get_renderer_type , ui_set_renderer_type , ui_get_viewer_user_data ,
  ui_get_viewer_place_type , 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_widget_popup , ui_finish_populating_widget_popup ,
  ui_update_action_attr , ui_get_action_attr , ui_plugin_loaded , ui_plugin_unloading ,
  ui_get_widget_type , ui_current_widget_changed , ui_get_widget_title , ui_obsolete_get_user_strlist_options ,
  ui_create_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_obsolete_set_nav_colorizer , ui_get_chooser_data , ui_obsolete_get_highlight , ui_set_highlight ,
  ui_set_mappings , ui_create_empty_widget , ui_msg_clear , ui_msg_save ,
  ui_msg_get_lines , ui_chooser_default_enter , ui_screen_ea_changed , ui_get_active_modal_widget ,
  ui_navband_pixel , ui_navband_ea , ui_get_window_id , ui_create_desktop_widget ,
  ui_strchoose , ui_set_nav_colorizer , ui_display_widget , ui_get_lines_rendering_info ,
  ui_sync_sources , ui_get_widget_config , ui_set_widget_config , ui_obsolete_get_custom_viewer_location ,
  ui_initing_database , ui_destroying_procmod , ui_destroying_plugmod , ui_update_file_history ,
  ui_get_synced_group , ui_show_rename_dialog , ui_desktop_applied , ui_choose_bookmark ,
  ui_get_custom_viewer_place_xcoord , ui_get_user_input_event , ui_get_highlight_2 , ui_get_custom_viewer_location_2 ,
  ui_get_chooser_rows , ui_get_icon_id_by_name , ui_open_builtin2 , ui_get_last_widget ,
  ui_prompt_function_prototype , ui_parse_tagged_line_sections , 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_bpt_qty , ui_dbg_add_oldbpt , ui_dbg_request_add_oldbpt ,
  ui_dbg_del_oldbpt , ui_dbg_request_del_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_call_tev_callee ,
  ui_dbg_get_ret_tev_return , ui_dbg_get_bpt_tev_ea , ui_dbg_get_reg_value_type , ui_dbg_get_processes ,
  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_sp_val , ui_dbg_get_ip_val ,
  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_obsolete_dbg_save_bpts ,
  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_enable_bpt , ui_dbg_request_enable_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_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_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_dbg_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_collect_stack_trace , ui_dbg_get_module_info ,
  ui_dbg_get_srcinfo_provider , ui_dbg_get_global_var , ui_dbg_get_local_var , ui_dbg_get_local_vars ,
  ui_dbg_add_path_mapping , ui_dbg_get_current_source_file , ui_dbg_get_current_source_line , ui_dbg_srcdbg_step_into ,
  ui_dbg_srcdbg_request_step_into , ui_dbg_srcdbg_step_over , ui_dbg_srcdbg_request_step_over , ui_dbg_srcdbg_step_until_ret ,
  ui_dbg_srcdbg_request_step_until_ret , ui_dbg_getn_thread_name , ui_dbg_bin_search , ui_dbg_get_insn_tev_reg_val_i ,
  ui_dbg_get_insn_tev_reg_result_i , ui_dbg_get_reg_val_i , ui_dbg_set_reg_val_i , ui_dbg_get_reg_info ,
  ui_dbg_set_trace_dynamic_register_set , ui_dbg_get_trace_dynamic_register_set , ui_dbg_enable_bptgrp , ui_dbg_continue_backwards ,
  ui_dbg_request_continue_backwards , ui_dbg_step_into_backwards , ui_dbg_request_step_into_backwards , ui_dbg_step_over_backwards ,
  ui_dbg_request_step_over_backwards , ui_dbg_run_to_backwards , ui_dbg_request_run_to_backwards , ui_dbg_set_suspend_on_event ,
  ui_dbg_end , debug_obsolete_assert_thread_waitready
}
 Events marked as 'ui:' should be used as a parameter to callui(). More...
enum  lecvt_code_t { LECVT_CANCELED = -1 , LECVT_ERROR = 0 , LECVT_OK = 1 }
 Converts from an entry with a given place type, to another entry, with another place type, to be used with the view 'view'. More...
enum  action_state_t {
  AST_ENABLE_ALWAYS , AST_ENABLE_FOR_IDB , AST_ENABLE_FOR_WIDGET , AST_ENABLE ,
  AST_DISABLE_ALWAYS , AST_DISABLE_FOR_IDB , AST_DISABLE_FOR_WIDGET , AST_DISABLE
}
 Action states - returned by action_handler_t::update() 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_lum , nat_hlo ,
  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 , 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 , view_click ,
  view_dblclick , view_curpos , view_created , view_close ,
  view_switched , view_mouse_over , view_loc_changed , view_mouse_moved
}
 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  input_event_kind_t {
  iek_unknown = 0 , iek_shortcut , iek_key_press , iek_key_release ,
  iek_mouse_button_press , iek_mouse_button_release , iek_mouse_wheel
}
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_INVISIBLE = -4 ,
  CB_DESTROYING = -5 , CB_NO = -6 , CB_CANCEL = -7
}

Functions

idaman callui_t ida_export_data (idaapi *callui)(ui_notification_t what
 Pointer to the user-interface dispatcher function.
idaman callui_t idaman int ida_export init_database (int argc, const char *const *argv, int *newfile)
 After calling init_kernel() the ui must call this function.
idaman void ida_export term_database ()
 The database termination function.
idaman NORETURN AS_PRINTF (1, 0) void ida_export verror(const char *format
 See error()
idaman AS_PRINTF (3, 0) void ida_export vshow_hex(const void *dataptr
 See show_hex()
idaman AS_PRINTF (4, 0) void ida_export vshow_hex_file(linput_t *li
 See show_hex_file()
ssize_t get_kernel_version (char *buf, size_t bufsize)
 Get IDA kernel version (in a string like "5.1").
bool is_ida_library (char *path=nullptr, size_t pathsize=0, void **handle=nullptr)
idaman int ida_export l_compare (const place_t *t1, const place_t *t2)
 compare places and their lnnums
idaman int ida_export l_compare2 (const place_t *t1, const place_t *t2, void *ud)
idaman bool ida_export l_equals (const place_t *t1, const place_t *t2, void *ud)
define_place_exported_functions(idaplace_t) class idaplace_t define_place_exported_functions (hexplace_t) struct outctx_base_t
 A location in a disassembly view.
idaman void ida_export hexplace_t__out_one_item (const hexplace_t *_this, outctx_base_t &ctx, const hexplace_gen_t *hg, int itemno, color_t *color, color_t patch_or_edit)
idaman size_t ida_export hexplace_t__ea2str (char *buf, size_t bufsize, const hexplace_gen_t *hg, ea_t ea)
 define_place_exported_functions (tiplace_t) typedef uchar type_t
bool is_tif_cursor_header (tif_cursor_t c)
bool is_tif_cursor_footer (tif_cursor_t c)
bool is_tif_cursor_index (tif_cursor_t c)
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.
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.
const place_tget_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'.
 DECLARE_TYPE_AS_MOVABLE (sync_source_t)
 CASSERT (sizeof(sync_source_t)==16)
idaman void ida_export register_loc_converter2 (const char *p1, const char *p2, lochist_entry_cvt2_t *cvt)
 Register a converter, that will be used for the following reasons:
idaman lochist_entry_cvt2_t *ida_export lookup_loc_converter2 (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'.
 DECLARE_TYPE_AS_MOVABLE (twinline_t)
 DECLARE_LINEARRAY_HELPERS (idaman) class linearray_t
 The group of lines corresponding to a single place within a view.
 DECLARE_TYPE_AS_MOVABLE (line_rendering_output_entry_t)
 DECLARE_TYPE_AS_MOVABLE (line_section_t)
 DECLARE_TYPE_AS_MOVABLE (tagged_line_section_t)
idaman uint64 ida_export get_dirty_infos ()
 Bitmask of builtin window types to be refreshed:
idaman void ida_export request_refresh (uint64 mask, bool cnd=true)
 Request a refresh of a builtin window.
void clear_refresh_request (uint64 mask)
idaman bool ida_export is_refresh_requested (uint64 mask)
 Get a refresh request state.
bool is_chooser_widget (twidget_type_t t)
 Does the given widget type specify a chooser widget?
 AS_PRINTF (1, 2) inline int ida_deb(const char *format
 Display debug message.
 va_start (va, format)
 va_end (va)
 AS_PRINTF (3, 4) inline void show_hex(const void *dataptr
 Display hex dump in the messages window.
 vshow_hex (dataptr, len, format, va)
 AS_PRINTF (4, 5) inline void show_hex_file(linput_t *li
 Display hex dump of a file in the messages window.
 vshow_hex_file (li, pos, count, format, va)
bool is_action_enabled (action_state_t s)
 Check if the given action state is one of AST_ENABLE*.
 DECLARE_TYPE_AS_MOVABLE (chooser_item_attrs_t)
 DECLARE_TYPE_AS_MOVABLE (chooser_row_info_t)
ssize_t choose (chooser_base_t *ch, const void *def_item)
 Display a generic list chooser (n-column) and allow the user to select an item.
void set_nav_colorizer (nav_colorizer_t **out_was_func, void **out_was_ud, nav_colorizer_t *func, void *ud)
 Install new navigation band colorizer (ui_set_nav_colorizer).
 CASSERT (sizeof(locchange_md_t)==sizeof(uint32))
 DECLARE_TYPE_AS_MOVABLE (locchange_md_t)
THREAD_SAFE int execute_ui_requests (ui_requests_t *reqs)
 Execute a list of UI requests (ui_execute_ui_requests_list).
THREAD_SAFE int execute_ui_requests (ui_request_t *req,...)
 Execute a variable number of UI requests (ui_execute_ui_requests).
THREAD_SAFE bool cancel_exec_request (int req_id)
 Try to cancel an asynchronous exec request (::ui_cancel_exec_request).
THREAD_SAFE int cancel_thread_exec_requests (qthread_t tid)
 Try to cancel asynchronous exec requests created by the specified thread.
THREAD_SAFE execute_sync_availability_t set_execute_sync_availability (qthread_t tid, execute_sync_availability_t availability)
 Set the availability of the execute_sync functionality for the given thread.
const synced_group_tget_synced_group (const TWidget *w)
 Get the group of widgets/registers this view is synchronized with.
bool jumpto (ea_t ea, int opnum=-1, int uijmp_flags=UIJMP_ACTIVATE)
 Jump to the specified address (ui_jumpto).
bool banner (int wait)
 Show a banner dialog box (ui_banner).
THREAD_SAFE bool is_msg_inited ()
 Can we use msg() functions?
void refresh_idaview ()
 Refresh marked windows (ui_refreshmarked)
void refresh_idaview_anyway ()
 Refresh all disassembly views (ui_refresh), forces an immediate refresh.
void analyzer_options ()
 Allow the user to set analyzer options. (show a dialog box) (ui_analyzer_options)
ea_t get_screen_ea ()
 Get the address at the screen cursor (ui_screenea)
int get_opnum ()
 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).
bool get_output_cursor (int *x, int *y)
 Get coordinates of the output window's cursor (ui_get_output_cursor).
const char * get_curline ()
 Get current line from the disassemble window (ui_get_curline).
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.
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.
void refresh_navband (bool force)
 Refresh navigation band if changed (ui_refresh_navband).
bool refresh_chooser (const char *title)
 Mark a non-modal custom chooser for a refresh (ui_refresh_chooser).
bool close_chooser (const char *title)
 Close a non-modal chooser (ui_close_chooser).
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 (text_t &text, ea_t ea1, ea_t ea2, bool truncate_lines)
 Generate disassembly text for a range.
THREAD_SAFE ssize_t execute_sync (exec_request_t &req, int reqf)
 Execute code in the main thread.
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 widget (ui_set_dock_pos).
int get_icon_id_by_name (const char *icon_name)
 Retrieve the id of the icon by name (ui_get_icon_id_by_name).
int load_custom_icon (const char *file_name)
 Load an icon from a file (ui_load_custom_icon_file).
int load_custom_icon (const void *ptr, unsigned int len, const char *format)
 Load an icon and return its id (ui_load_custom_icon).
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=nullptr)
 Processes a UI action by name.
bool take_database_snapshot (snapshot_t *ss, qstring *err_msg)
 Take a database snapshot (ui_take_database_snapshot).
bool restore_database_snapshot (const snapshot_t *ss, ss_restore_cb_t *cb, void *ud)
 Restore a database snapshot.
THREAD_SAFE qtimer_t register_timer (int interval_ms, int(idaapi *callback)(void *ud), void *ud)
 Register a timer (ui_register_timer).
THREAD_SAFE bool unregister_timer (qtimer_t t)
 Unregister a timer (ui_unregister_timer).
bool register_action (const action_desc_t &desc)
 Create a new action (ui_register_action).
bool unregister_action (const char *name)
 Delete a previously-registered action (ui_unregister_action).
void get_registered_actions (qstrvec_t *out)
 Get a list of all currently-registered actions.
bool create_toolbar (const char *name, const char *label, const char *before=nullptr, int flags=0)
 Create a toolbar with the given name, label and optional position.
bool delete_toolbar (const char *name)
 Delete an existing toolbar.
bool create_menu (const char *name, const char *label, const char *menupath=nullptr)
 Create a menu with the given name, label and optional position, either in the menubar, or as a submenu.
bool delete_menu (const char *name)
 Delete an existing menu.
bool attach_action_to_menu (const char *menupath, const char *name, int flags=0)
 Attach a previously-registered action to the menu (ui_attach_action_to_menu).
bool detach_action_from_menu (const char *menupath, const char *name)
 Detach an action from the menu (ui_detach_action_from_menu).
bool attach_action_to_toolbar (const char *toolbar_name, const char *name)
 Attach an action to an existing toolbar (ui_attach_action_to_toolbar).
bool detach_action_from_toolbar (const char *toolbar_name, const char *name)
 Detach an action from the toolbar (ui_detach_action_from_toolbar).
bool register_and_attach_to_menu (const char *menupath, const char *name, const char *label, const char *shortcut, int flags, action_handler_t *handler, void *owner, int action_desc_t_flags)
 Helper.
void display_widget (TWidget *widget, uint32 options, const char *dest_ctrl=nullptr)
 Display a widget, dock it if not done before.
void close_widget (TWidget *widget, int options)
 Close widget (ui_close_widget, only gui version).
void activate_widget (TWidget *widget, bool take_focus)
 Activate widget (only gui version) (ui_activate_widget).
TWidgetfind_widget (const char *caption)
 Find widget with the specified caption (only gui version) (ui_find_widget).
TWidgetget_current_widget ()
 Get a pointer to the current widget (ui_get_current_widget).
twidget_type_t get_widget_type (TWidget *widget)
 Get the type of the TWidget * (ui_get_widget_type).
bool get_widget_title (qstring *buf, TWidget *widget)
 Get the TWidget's title (ui_get_widget_title).
TWidgetcreate_custom_viewer (const char *title, 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, TWidget *parent=nullptr)
 Create new ida viewer based on place_t (ui_create_custom_viewer).
bool custom_viewer_jump (TWidget *v, const lochist_entry_t &loc, uint32 flags=0)
 Append 'loc' to the viewer's history, and cause the viewer to display it.
bool ea_viewer_history_push_and_jump (TWidget *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).
bool get_ea_viewer_history_info (int *nback, int *nfwd, TWidget *v)
 Get information about what's in the history (ui_ea_viewer_history_info).
void refresh_custom_viewer (TWidget *custom_viewer)
 Refresh custom ida viewer (ui_refresh_custom_viewer)
void repaint_custom_viewer (TWidget *custom_viewer)
 Repaint the given widget immediately (ui_repaint_qwidget)
void destroy_custom_viewer (TWidget *custom_viewer)
 Destroy custom ida viewer.
bool jumpto (TWidget *custom_viewer, place_t *place, int x, int y)
 Set cursor position in custom ida viewer.
place_tget_custom_viewer_place (TWidget *custom_viewer, bool mouse, int *x, int *y)
 Get current place in a custom viewer (ui_get_curplace).
bool get_custom_viewer_location (lochist_entry_t *out, TWidget *custom_viewer, bool mouse=false)
bool get_custom_viewer_location (listing_location_t *out, TWidget *custom_viewer, uint32 flags=0)
 Get the current location in a custom viewer (ui_get_custom_viewer_location_2).
bool is_idaq ()
 Are we running inside IDA Qt?
bool attach_action_to_popup (TWidget *widget, TPopupMenu *popup_handle, const char *name, const char *popuppath=nullptr, int flags=0)
 Insert a previously-registered action into the widget's popup menu (ui_attach_action_to_popup).
bool detach_action_from_popup (TWidget *widget, const char *name)
 Remove a previously-registered action, from the list of 'permanent' context menu actions for this widget (ui_detach_action_from_popup).
bool attach_dynamic_action_to_popup (TWidget *unused, TPopupMenu *popup_handle, const action_desc_t &desc, const char *popuppath=nullptr, int flags=0, qstring *buf=nullptr)
 Create & insert an action into the widget's popup menu (ui_attach_dynamic_action_to_popup).
bool update_action_label (const char *name, const char *label)
 Update an action's label (ui_update_action_attr).
bool update_action_shortcut (const char *name, const char *shortcut)
 Update an action's shortcut (ui_update_action_attr).
bool update_action_tooltip (const char *name, const char *tooltip)
 Update an action's tooltip (ui_update_action_attr).
bool update_action_icon (const char *name, int icon)
 Update an action's icon (ui_update_action_attr).
bool update_action_state (const char *name, action_state_t state)
 Update an action's state (ui_update_action_attr).
bool update_action_checkable (const char *name, bool checkable)
 Update an action's checkability (ui_update_action_attr).
bool update_action_checked (const char *name, bool checked)
 Update an action's checked state (ui_update_action_attr).
bool update_action_visibility (const char *name, bool visible)
 Update an action's visibility (ui_update_action_attr).
bool get_action_label (qstring *label, const char *name)
 Get an action's label (ui_get_action_attr).
bool get_action_shortcut (qstring *shortcut, const char *name)
 Get an action's shortcut (ui_get_action_attr).
bool get_action_tooltip (qstring *tooltip, const char *name)
 Get an action's tooltip (ui_get_action_attr).
bool get_action_icon (const char *name, int *icon)
 Get an action's icon (ui_get_action_attr).
bool get_action_state (const char *name, action_state_t *state)
 Get an action's state (ui_get_action_attr).
bool get_action_checkable (const char *name, bool *checkable)
 Get an action's checkability (ui_get_action_attr).
bool get_action_checked (const char *name, bool *checked)
 Get an action's checked state (ui_get_action_attr).
bool get_action_visibility (const char *name, bool *visibility)
 Get an action's visibility (ui_get_action_attr).
void set_custom_viewer_handlers (TWidget *custom_viewer, const custom_viewer_handlers_t *cvh, void *cvh_ud)
 Set handlers for custom viewer events Any of these handlers may be nullptr.
voidset_custom_viewer_handler (TWidget *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).
bool set_custom_viewer_qt_aware (TWidget *custom_viewer)
 Allow the given viewer to interpret Qt events (ui_set_custom_viewer_handler)
const char * get_custom_viewer_curline (TWidget *custom_viewer, bool mouse)
 Get current line of custom viewer (ui_get_custom_viewer_curline).
int get_custom_viewer_place_xcoord (TWidget *custom_viewer, const place_t *pline, const place_t *pitem)
 Get the X position of the item, in the line.
bool get_user_input_event (input_event_t *out)
 Get the current user input event (mouse button press, key press, ...) It is sometimes desirable to be able to tell when a certain situation happens (e.g., 'view_curpos' gets triggered); this function exists to provide that context (GUI version only)
bool get_output_curline (qstring *buf, bool mouse)
 Get current line of output window (ui_get_output_curline).
bool get_output_selected_text (qstring *buf)
 Returns selected text from output window (ui_get_output_selected_text).
TWidgetget_current_viewer ()
 Get current ida viewer (idaview or custom viewer) (ui_get_current_viewer)
TWidgetget_last_widget (uint64 mask=uint64(-1))
 Get last ida viewer (idaview or custom viewer) (ui_get_last_widget)
bool prompt_function_prototype (qstring *errbuf, tinfo_t *out_tif, func_t *pfn, tinfo_t *tif, const char *name)
 Open function prototype editor to edit function type and create new type.
bool parse_tagged_line_sections (tagged_line_sections_t *out, const char *line)
 Collect tagged sections in a color-tagged line (produced by place_t::generate)
tcc_renderer_type_t get_view_renderer_type (TWidget *v)
 Get the type of renderer currently in use in the given view (ui_get_renderer_type)
void set_view_renderer_type (TWidget *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 (TWidget *custom_viewer, const place_t *minplace, const place_t *maxplace)
 Set position range for custom viewer (ui_set_custom_viewer_range)
TWidgetcreate_empty_widget (const char *title, int icon=-1)
 Create an empty widget, serving as a container for custom user widgets.
void msg_clear ()
 Clear the "Output" window.
bool msg_save (qstring &path)
 Save the "Output" window contents into a file.
void msg_get_lines (qstrvec_t *out, int count=-1)
 Retrieve the last 'count' lines from the output window, in reverse order (from most recent, to least recent)
TWidgetget_active_modal_widget ()
 Get the current, active modal TWidget instance.
int get_navband_pixel (bool *out_is_vertical, ea_t ea)
 Translate the provided ea_t, into its pixel position (plus pixel ranges) on the navigation band.
ea_t get_navband_ea (int pixel)
 Translate the pixel position on the navigation band, into an address.
voidget_window_id (const char *name=nullptr)
 Get the system-specific window ID (GUI version only)
bool is_idaview (TWidget *v)
 Is the given custom view an idaview? (ui_is_idaview)
bool read_selection (TWidget *v, twinpos_t *p1, twinpos_t *p2)
 Get the selected range boundaries (ui_read_selection).
bool read_range_selection (TWidget *v, ea_t *ea1, ea_t *ea2)
 Get the address range for the selected range boundaries, this is the convenient function for read_selection()
void unmark_selection ()
 Unmark selection (ui_unmarksel)
TWidgetcreate_code_viewer (TWidget *custview, int flags=0, TWidget *parent=nullptr)
 Create a code viewer (ui_create_code_viewer).
voidset_code_viewer_handler (TWidget *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).
bool set_code_viewer_user_data (TWidget *code_viewer, void *ud)
 Set the user data on a code viewer (ui_set_custom_viewer_handler).
voidget_viewer_user_data (TWidget *viewer)
 Get the user data from a custom viewer (ui_get_viewer_user_data)
tcc_place_type_t get_viewer_place_type (TWidget *viewer)
 Get the type of place_t instances a viewer uses & creates (ui_get_viewer_place_type).
void set_code_viewer_line_handlers (TWidget *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.
bool set_code_viewer_lines_icon_margin (TWidget *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 (TWidget *code_viewer, int align)
 Set alignment for lines in a code viewer (ui_set_custom_viewer_handler).
bool set_code_viewer_lines_radix (TWidget *code_viewer, int radix)
 Set radix for values displayed in a code viewer (ui_set_custom_viewer_handler).
bool set_code_viewer_is_source (TWidget *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).
THREAD_SAFE void clr_cancelled ()
 Clear "Cancelled" flag (ui_clr_cancelled)
THREAD_SAFE void set_cancelled ()
 Set "Cancelled" flag (ui_set_cancelled)
THREAD_SAFE bool user_cancelled ()
 Test the cancellation flag (ui_test_cancelled).
bool ui_load_new_file (qstring *temp_file, qstring *filename, linput_t **pli, ushort neflags, load_info_t **ploaders)
 Display a load file dialog and load file (ui_load_file).
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).
bool load_dbg_dbginfo (const char *path, linput_t *li=nullptr, ea_t base=BADADDR, bool verbose=false)
 Load debugging information from a file.
int add_idc_hotkey (const char *hotkey, const char *idcfunc)
 Add hotkey for IDC function (ui_add_idckey).
bool get_highlight (qstring *out_str, TWidget *viewer, uint32 *out_flags, uint32 flags=0)
 Get the highlighted identifier in the viewer (ui_get_highlight_2).
bool set_highlight (TWidget *viewer, const char *str, int flags)
 Set the highlighted identifier in the viewer (ui_set_highlight).
 void (idaapi *range_marker)(ea_t ea
 Pointer to range marker function (for idaviews and hexviews) This pointer is initialized by setup_range_marker()
void setup_range_marker ()
 Initialize pointer to idaview marker.
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 ()
 Tell UI to refresh all idaviews and hexviews.
TWidgetopen_exports_window (ea_t ea)
 Open the exports window (ui_open_builtin).
TWidgetopen_imports_window (ea_t ea)
 Open the exports window (ui_open_builtin).
TWidgetopen_names_window (ea_t ea)
 Open the names window (ui_open_builtin).
TWidgetopen_funcs_window (ea_t ea)
 Open the 'Functions' window (ui_open_builtin).
TWidgetopen_strings_window (ea_t ea, ea_t selstart=BADADDR, ea_t selend=BADADDR)
 Open the 'Strings' window (ui_open_builtin).
TWidgetopen_segments_window (ea_t ea)
 Open the segments window (ui_open_builtin).
TWidgetopen_segregs_window (ea_t ea)
 Open the segment registers window (ui_open_builtin).
TWidgetopen_selectors_window ()
 Open the selectors window (ui_open_builtin).
TWidgetopen_signatures_window ()
 Open the signatures window (ui_open_builtin).
TWidgetopen_tils_window ()
 Open the type libraries window (ui_open_builtin).
TWidgetopen_loctypes_window (int ordinal, const tif_cursor_t *cursor=nullptr)
 Open the local types window (ui_open_builtin2).
TWidgetopen_til_view_window (tinfo_t *tif, const tif_cursor_t *cursor=nullptr)
 Open the sub-til window (ui_open_builtin2).
TWidgetopen_calls_window (ea_t ea)
 Open the function calls window (ui_open_builtin).
TWidgetopen_problems_window (ea_t ea)
 Open the problems window (ui_open_builtin).
TWidgetopen_bpts_window (ea_t ea)
 Open the breakpoints window (ui_open_builtin).
TWidgetopen_threads_window ()
 Open the threads window (ui_open_builtin).
TWidgetopen_modules_window ()
 Open the modules window (ui_open_builtin).
TWidgetopen_trace_window ()
 Open the tracing window (ui_open_builtin).
TWidgetopen_stack_window ()
 Open the call stack window (ui_open_builtin).
TWidgetopen_xrefs_window (ea_t ea)
 Open the cross references window (ui_open_builtin).
TWidgetopen_frame_window (func_t *pfn, uval_t offset)
 Open the frame window for the given function (ui_open_builtin).
TWidgetopen_navband_window (ea_t ea, int zoom)
 Open the navigation band window (ui_open_builtin).
TWidgetopen_disasm_window (const char *window_title, const rangevec_t *ranges=nullptr)
 Open a disassembly view (ui_open_builtin).
TWidgetopen_hexdump_window (const char *window_title)
 Open a hexdump view (ui_open_builtin).
TWidgetopen_notepad_window ()
 Open the notepad window (ui_open_builtin).
TWidgetopen_bookmarks_window (TWidget *w)
 Open the bookmarks window (ui_open_builtin).
bool sync_sources (const sync_source_t &what, const sync_source_t &with, bool sync)
 [Un]synchronize sources
char * choose_idasgn ()
 Choose a signature (ui_choose, chtype_idasgn).
bool choose_til (qstring *buf)
 Choose a type library (ui_choose, chtype_idatil).
ea_t choose_entry (const char *title)
 Choose an entry point (ui_choose, chtype_entry).
ea_t choose_name (const char *title)
 Choose a name (ui_choose, chtype_name).
ea_t choose_stkvar_xref (func_t *pfn, tid_t srkvar_tid)
 Choose an xref to a stack variable (ui_choose, chtype_name).
ea_t choose_xref (ea_t to)
 Choose an xref to an address (ui_choose, chtype_xref).
bool choose_enum (tinfo_t *out, const char *title, uint32 default_ord)
 Choose an enum (ui_choose, chtype_enum).
bool choose_enum_by_value (tinfo_t *out, const char *title, uint32 default_ord, uint64 value, int nbytes, uchar *serial)
 Choose an enum, restricted by value & size (ui_choose, chtype_enum_by_value_and_size).
func_tchoose_func (const char *title, ea_t default_ea)
 Choose a function (ui_choose, chtype_func).
segment_tchoose_segm (const char *title, ea_t default_ea)
 Choose a segment (ui_choose, chtype_segm).
bool choose_struct (tinfo_t *out, const char *title)
 Choose a structure (ui_choose, chtype_struct).
sreg_range_tchoose_srcp (const char *title)
 Choose a segment register change point (ui_choose, chtype_srcp).
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).
voidget_chooser_obj (const char *chooser_caption)
 Get the underlying object of the specified chooser (ui_get_chooser_obj).
bool get_chooser_data (qstrvec_t *out, const char *chooser_caption, int n)
 Get the text corresponding to the index N in the chooser data.
bool get_chooser_rows (chooser_row_info_vec_t *out, const char *chooser_caption, size_t what)
 Get the chooser contents corresponding to the rows indicated by "what".
bool idaapi enable_chooser_item_attrs (const char *chooser_caption, bool enable)
 Enable item-specific attributes for chooser items (ui_enable_chooser_item_attrs).
 show_wait_box_v (format, va)
THREAD_SAFE void hide_wait_box ()
 Hide the "Please wait dialog box".
 callui (ui_mbox, mbox_replace, format, va)
void beep (beep_t beep_type=beep_default)
 Issue a beeping sound (ui_beep).
bool display_copyright_warning ()
 Display copyright warning (ui_copywarn).
 callui (ui_mbox, mbox_feedback, format, va)
 AS_PRINTF (2, 3) inline bool ask_addr(ea_t *addr
 Display a dialog box and wait for the user to input an address (ui_ask_addr).
 verror (format, va)
 abort ()
 vnomem (format, va)
int vask_form (const char *format, va_list va)
 See ask_form()
int ask_form (const char *form,...)
 Display a dialog box and wait for the user.
TWidgetvopen_form (const char *format, uint32 flags, va_list va)
 Create and/or activate dockable modeless form (ui_open_form).
TWidgetopen_form (const char *form, uint32 flags,...)
 Display a dockable modeless dialog box and return a handle to it.
THREAD_SAFE AS_PRINTF (5, 0) inline int vask_buttons(const char *Yes
 AS_PRINTF (2, 0) inline int vask_yn(int deflt
 AS_PRINTF (5, 6) inline int ask_buttons(const char *Yes
 Display a dialog box and get choice from maximum three possibilities (ui_ask_buttons).
int register_addon (const addon_info_t *info)
 Register an add-on.
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.
bool get_addon_info_idx (int index, addon_info_t *info)
 Get info about a registered addon with specific index.
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.
idaman THREAD_SAFE char *ida_export trim (char *str)
 Remove trailing space characters from a string.
idaman THREAD_SAFE const char *ida_export skip_spaces (const char *ptr)
 Skip whitespaces in the string.
char * skip_spaces (char *ptr)
idaman THREAD_SAFE ssize_t ida_export qcleanline (qstring *buf, char cmt_char='\0', uint32 flags=CLNL_TRIM|CLNL_FINDCMT)
 Performs some cleanup operations to a line.
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.
idaman size_t ida_export ea2str (char *buf, size_t bufsize, ea_t ea)
 Convert linear address to UTF-8 string.
bool ea2str (qstring *out, ea_t ea)
 Convert linear address to UTF-8 string.
idaman bool ida_export str2ea (ea_t *out, const char *str, ea_t screen_ea=BADADDR)
 Convert string to linear address.
idaman bool ida_export str2ea_ex (ea_t *out, const char *str, ea_t screen_ea=BADADDR, int flags=0)
 Same as str2ea() but possibly with some steps skipped.
idaman bool ida_export atoea (ea_t *out, const char *str)
 Convert a number in C notation to an address.
idaman size_t ida_export stoa (qstring *out, ea_t from, sel_t seg)
 Convert segment selector to UTF-8 string.
idaman int ida_export atos (sel_t *seg, const char *str)
 Convert UTF-8 string to segment selector.
idaman size_t ida_export b2a_width (int nbytes, int radix)
 Get the number of UTF-8 characters required to represent a number with the specified number of bytes and radix.
idaman size_t ida_export b2a32 (char *buf, size_t bufsize, uint32 x, int nbytes, int radix)
 Convert number to UTF-8 string (includes leading zeroes).
idaman size_t ida_export b2a64 (char *buf, size_t bufsize, uint64 x, int nbytes, int radix)
 Same as b2a32(), but can handle 'nbytes' = 8.
idaman size_t ida_export btoa_width (int nbytes, flags64_t flag, int n)
 Get max number of UTF-8 characters required to represent a given type of value, with a given size (without leading zeroes).
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.
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 UTF-8.
idaman bool ida_export atob32 (uint32 *x, const char *str)
 Convert UTF-8 to a number using the current assembler formats.
idaman bool ida_export atob64 (uint64 *x, const char *str)
 64-bit equivalent of atob32()
idaman size_t ida_export pretty_print_size (char *buf, size_t bufsize, uint64 value)
 Pretty-print a size.
idaman bool ida_export parse_pretty_size (uint64 *out, const char *in)
 Parse a pretty-printed size.
idaman void ida_export append_disp (qstring *buf, adiff_t disp, bool tag=true)
 Auxiliary function.
idaman THREAD_SAFE int ida_export r50_to_asc (char *p, const ushort *r, int k)
 Convert RADIX50 -> UTF-8.
int THREAD_SAFE asc_to_r50 (ushort *r, const char *p, int k)
 Convert UTF-8 -> RADIX50 (see r50_to_asc())
void place_t__serialize (const place_t *_this, bytevec_t *out)
bool place_t__deserialize (place_t *_this, const uchar **pptr, const uchar *end)
DEPRECATED void get_user_strlist_options (strwinsetup_t *out)
DEPRECATED bool del_idc_hotkey (const char *hotkey)
idaman DEPRECATED void ida_export ida_checkmem (const char *file, int line)

Variables

idaman NORETURN va_list va
idaman size_t len
idaman size_t const char * format
idaman int64 pos
idaman int64 size_t count
const int64 IDALIB_API_MAGIC = 0x001DA11B00000000LL
idaman uint32 ida_export_data debug
 Controls debug messages - combination of IDA debug bits.
int nbytes = callui(ui_msg, format, va).i
asize_t size
idaman bool ida_export_data batch
 If this variable is set, then dialog boxes will not appear on the screen.
idaman int ida_export_data errorexit
 Exiting because of a a fatal error?
ssize_t rc = vwarning(format, va)
THREAD_SAFE const char * No
THREAD_SAFE const char const char * Cancel
THREAD_SAFE const char const char int deflt
int code = vask_yn(deflt, format, va)
int hist
bool result = vask_str(str, hist, format, va)
size_t max_size
size_t const char * defval
char * answer = vask_file(for_saving, defval, format, va)
Anterior/Posterior lines
bool ok = callui(ui_ask_addr, addr, format, va).cnd

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.

Typedef Documentation

◆ strvec_t

typedef qvector<simpleline_t> strvec_t

A collection of simple lines to populate a custom view.

This is an example of what you would pass as the 'ud' argument to create_custom_viewer()

◆ uval_t

typedef uval_t uval_t

◆ tif_cursor_t

A location in a tinfo_t.

◆ TWidget

typedef TView TWidget

◆ sync_source_vec_t

◆ lochist_entry_cvt2_t

typedef lecvt_code_t idaapi lochist_entry_cvt2_t(lochist_entry_t *dst, const lochist_entry_t &src, TWidget *view, uint32 flags)

◆ text_t

A group of lines in a text window.

◆ section_lines_refs_t

◆ sections_lines_refs_t

◆ line_rendering_output_entries_refs_t

◆ cpidx_t

typedef int cpidx_t

◆ cplen_t

typedef int cplen_t

◆ cpidxvec_t

◆ line_sections_t

◆ tagged_line_section_vec_t

◆ twidget_type_t

◆ chooser_row_info_vec_t

◆ action_update_ctx_t

Instances of this class will be filled with information that is commonly used by actions when they need to update.

This is so they don't have to perform (possibly) costly operations more than once.

◆ nav_colorizer_t

typedef uint32 idaapi nav_colorizer_t(ea_t ea, asize_t nbytes, void *ud)

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
eaaddress to calculate the color of, or BADADDR (see above)
nbytesnumber of bytes, this can be ignored for quick&dirty approach
uduser data
Returns
color of the specified address in RGB

◆ input_event_modifiers_t

◆ view_event_state_t

◆ custom_viewer_keydown_t

typedef bool idaapi custom_viewer_keydown_t(TWidget *cv, int vk_key, int shift, void *ud)

The user has pressed a key.

◆ custom_viewer_popup_t

typedef void idaapi custom_viewer_popup_t(TWidget *cv, void *ud)

The user right clicked. See ui_populating_widget_popup, too.

◆ custom_viewer_mouse_moved_t

typedef void idaapi custom_viewer_mouse_moved_t(TWidget *cv, int shift, view_mouse_event_t *e, void *ud)

The user moved the mouse.

◆ custom_viewer_click_t

typedef bool idaapi custom_viewer_click_t(TWidget *cv, int shift, void *ud)

The user clicked.

◆ custom_viewer_dblclick_t

typedef bool idaapi custom_viewer_dblclick_t(TWidget *cv, int shift, void *ud)

The user double clicked.

◆ custom_viewer_curpos_t

typedef void idaapi custom_viewer_curpos_t(TWidget *cv, void *ud)

Deprecated.

See custom_viewer_location_changed_t for a more competent, and general solution.

◆ custom_viewer_close_t

typedef void idaapi custom_viewer_close_t(TWidget *cv, void *ud)

Custom viewer is being destroyed.

◆ obsolete_custom_viewer_help_t

typedef int idaapi obsolete_custom_viewer_help_t(TWidget *cv, void *ud)

◆ custom_viewer_help_t

typedef bool idaapi custom_viewer_help_t(qstring *out, TWidget *cv, void *ud)

Custom viewer: the user pressed F1 If true and out is filled, it will be considered either an absolute URL, or a path relative to the user guide's root.

◆ custom_viewer_adjust_place_t

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

Fine-tune 'loc->place()' according to the X position (i.e., 'loc->renderer_info().pos.cx')

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 'loc->place()'s internal state according to 'loc->renderer_info().pos.cx' 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: this callback should only ever read 'loc->renderer_info()', not modify it. Doing so will result in undefined behavior.

◆ custom_viewer_get_place_xcoord_t

typedef int idaapi custom_viewer_get_place_xcoord_t(TWidget *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

◆ custom_viewer_can_navigate_t

typedef int idaapi custom_viewer_can_navigate_t(TWidget *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

◆ custom_viewer_location_changed_t

typedef void idaapi custom_viewer_location_changed_t(TWidget *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.

◆ code_viewer_lines_click_t

typedef void idaapi code_viewer_lines_click_t(TWidget *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.

◆ code_viewer_lines_icon_t

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

Retrieve an icon for a code viewer line.

Icons are drawn on the gutter to the left of the code viewer text. Multiple icons can be drawn for a line. Each icon has its position (the leftmost icon has the position 0, the next one has the position 1, etc).

Parameters
cvpointer to the code viewer
pthe line position in the code viewer for which retrieve the icon
posthe icon number, will be 0,1,2,3...
can be modified to skip positions and draw at the specified one
uduser data of the code viewer
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.

◆ code_viewer_lines_linenum_t

typedef bool idaapi code_viewer_lines_linenum_t(TWidget *cv, const place_t *p, uval_t *num, void *ud)

Calculate the line number. Return false to not print any number.

◆ ss_restore_cb_t

typedef void idaapi ss_restore_cb_t(const char *errmsg, void *ud)

Snapshot restoration completion callback. see restore_database_snapshot()

◆ 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.

This is so they don't have to perform (possibly) costly operations more than once.

◆ qtimer_t

typedef struct __qtimer_t * qtimer_t

Timer opaque handle.

◆ formchgcb_t

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 the 'Yes/No/Cancel' buttons or closes the window. The callback will be called for both modal and modeless window.

Parameters
field_idid of the modified field or a special field id Form callback special values
fahelper class with useful virtual functions
Return values
0continue editing
>0form will be closed
Note
the return value is used by IDA only for modal forms, and only for the following special field ids: CB_CLOSE, CB_YES, CB_NO, CB_CANCEL (for modeless forms CB_CLOSE is also used).

◆ buttoncb_t

typedef int idaapi buttoncb_t(int button_code, form_actions_t &fa)

Callback.

Called when a button is clicked.

Parameters
button_codebutton code as specified in the form
fahelper class with useful virtual functions
Return values
0currently ignored

Enumeration Type Documentation

◆ mbox_kind_t

see <loader.hpp>

Message box kinds

Enumerator
mbox_internal 

internal error

mbox_info 
mbox_warning 
mbox_error 
mbox_nomem 
mbox_feedback 
mbox_readerror 
mbox_writeerror 
mbox_filestruct 
mbox_wait 
mbox_hide 
mbox_replace 

◆ choose_type_t

List chooser types.

Enumerator
chtype_generic 

the generic choose() function

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_func 

see choose_func()

chtype_segm 

see choose_segm()

chtype_strpath 

see choose_struc_path()

chtype_idatil 

see choose_til()

chtype_srcp 

see choose_srcp()

chtype_struct 

see choose_struct()

chtype_enum 

see choose_enum()

chtype_enum_by_value_and_size 

see choose_enum_by_value()

◆ beep_t

enum beep_t

< Beep types

Enumerator
beep_default 

◆ tcc_renderer_type_t

TWidget renderer type.

Enumerator
TCCRT_INVALID 

invalid

TCCRT_FLAT 

flat view

TCCRT_GRAPH 

graph view

TCCRT_PROXIMITY 

proximity view

◆ tcc_place_type_t

TWidget place_t type.

Enumerator
TCCPT_INVALID 

invalid

TCCPT_PLACE 

place_t

TCCPT_SIMPLELINE_PLACE 

simpleline_place_t

TCCPT_IDAPLACE 

::idaplace_t

TCCPT_TIPLACE 

tiplace_t

◆ 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

◆ execute_sync_availability_t

Enumerator
esa_unknown 
esa_available 
esa_unavailable 
esa_release 
esa_app_unavailable 

◆ execute_sync_ctl_t

Enumerator
esctl_none 
esctl_cancel_request 
esctl_cancel_thread_requests 
esctl_set_availability 

◆ 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_null 
ui_range 

cb: The disassembly range has been changed ( idainfo::min_ea ... idainfo::max_ea).

UI should redraw the scrollbars. See also: ui_lock_range_refresh

Parameters
none
Returns
void
ui_refresh_choosers 

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_broadcast 

cb: broadcast call

Parameters
magic(int64) a magic number
...other parameters depend on the given magic modules may hook to this event and reply to the caller. for example, the decompiler uses it to communicate its entry point to other plugins
ui_read_selection 

ui: see read_selection()

ui_read_range_selection 

ui: see read_range_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. Note that at the time this notification is sent, the internal paths are not updated yet, and calling get_path(PATH_TYPE_IDB) will return the previous path.

Parameters
path(const char *) the database path
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()

ui_setidle 

ui: Set a function to call at idle times.

Parameters
func(int (*)()) pointer to function that will be called
Returns
void
ui_database_closed 

cb: The database has been closed.

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

Returns
void
ui_beep 

ui: see beep()

ui_is_msg_inited 

ui: see is_msg_inited()

ui_msg 

ui: Show a message in the message window.

Parameters
format(const char *) format of message body
va(va_list) format args
Returns
number of bytes output
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_clr_cancelled 

ui: see clr_cancelled()

ui_set_cancelled 

ui: see set_cancelled()

ui_test_cancelled 

ui: see user_cancelled()

ui_ask_buttons 

ui: see ask_yn() and ask_buttons()

ui_ask_file 

ui: see ask_file()

ui_ask_form 

ui: see ask_form()/open_form()

ui_ask_text 

ui: see ask_text()

ui_ask_str 

ui: see ask_str()

ui_ask_addr 

ui: see ask_addr()

ui_ask_seg 

ui: see ask_seg()

ui_ask_long 

ui: see ask_long()

ui_add_idckey 

ui: see add_idc_hotkey()

ui_obsolete_del_idckey 

ui: see ui_del_idckey()

ui_analyzer_options 

ui: see analyzer_options()

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_copywarn 

ui: see display_copyright_warning()

ui_noabort 

ui: Disable 'abort' menu item - the database was not compressed.

Parameters
none
Returns
void
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_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_get_key_code 

ui: see get_key_code()

ui_setup_plugins_menu 

ui: setup plugins submenu

Parameters
none
Returns
void
ui_get_kernel_version 

ui: see get_kernel_version()

ui_is_idaq 

ui: see is_idaq()

ui_refresh_navband 

ui: see refresh_navband()

ui_debugger_menu_change 

cb: debugger menu modification detected

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

ui: see get_custom_viewer_place(). See also ui_get_custom_viewer_location

ui_obsolete_display_widget 
ui_close_widget 

ui: see close_widget()

ui_activate_widget 

ui: see activate_widget()

ui_find_widget 

ui: see find_widget()

ui_get_current_widget 

ui: see get_current_widget()

ui_widget_visible 

TWidget is displayed on the screen.

Use this event to populate the window with controls

Parameters
widget(TWidget *)
Returns
void
ui_widget_closing 

TWidget is about to close.

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

Parameters
widget(TWidget *)
Returns
void
ui_widget_invisible 

TWidget is being closed.

Use this event to destroy the window controls

Parameters
widget(TWidget *)
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
buf(qstring *)
ea(ea_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
[out]hint(qstring *) the output string
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
Returns
true if generated a hint
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_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).

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

Parameters
[out]hint(qstring *) the output string, on input contains hints from the previous subscribes
viewer(TWidget*) viewer
place(place_t *) current position in the viewer
[out]important_lines(int *) number of important lines, should be incremented, if zero, the result is ignored
Return values
0continue collecting hints with other subscribers
1stop collecting hints
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 nullptr
Returns
void See also ui_initing_database. This event is called for both new and old databases.
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_action 

cb: ida ui is about to handle a user action.

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

cb: an ida ui action has been handled

ui_set_custom_viewer_mode 

ui: switch between graph/text modes.

Parameters
custom_viewer(TWidget *)
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
text(text_t *)
fc(qflow_chart_t *)
node(int)
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_execute_sync_ctl 

ui: see cancel_thread_exec_requests(), cancel_exec_request(), set_execute_sync_availability()

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(const chooser_base_t *)
n(::size_t)
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 nullptr
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_create_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_obsolete_refresh_custom_code_viewer 
ui_create_source_viewer 

ui: Create new source viewer.

Parameters
top_tl(TWidget **) toplevel widget of created source viewer (can be nullptr)
parent(TWidget *)
custview(TWidget *)
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_repaint_qwidget 

ui: see repaint_custom_viewer()

ui_custom_viewer_set_userdata 

ui: Change place_t user data for a custom view.

Parameters
custom_viewer(TWidget *)
user_data(void *)
Returns
old user_data
ui_jumpto 

ui: see jumpto(ea_t, int, int)

ui_open_form 

ui: see vopen_form()

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 See also register_cfgopts, which is better
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_get_renderer_type 

ui: see get_view_renderer_type()

ui_set_renderer_type 

ui: see set_view_renderer_type()

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_widget_popup 

cb: IDA is populating the context menu for a widget.

This is your chance to attach_action_to_popup().

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

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

ui: see ui_finish_populating_widget_popup

ui_finish_populating_widget_popup 

cb: IDA is about to be done populating the context menu for a widget.

This is your chance to attach_action_to_popup().

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

ui: see ui_populating_widget_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_widget_type 

ui: see get_widget_type()

ui_current_widget_changed 

cb: The currently-active TWidget changed.

Parameters
widget(TWidget *)
prev_widget(TWidget *)
Returns
void
ui_get_widget_title 

ui: see get_widget_title()

ui_obsolete_get_user_strlist_options 

ui: see get_user_strlist_options()

ui_create_custom_viewer 

ui: see create_custom_viewer()

ui_custom_viewer_jump 

ui: set the current location, and have the viewer display it

Parameters
v(TWidget *)
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_obsolete_set_nav_colorizer 
ui_get_chooser_data 

ui: see get_chooser_data()

ui_obsolete_get_highlight 

now ui_get_highlight_2

ui_set_highlight 

ui: see set_highlight()

ui_set_mappings 

ui: Show current memory mappings and allow the user to change them.

ui_create_empty_widget 

ui: see create_empty_widget()

ui_msg_clear 

ui: see msg_clear()

ui_msg_save 

ui: see msg_save()

ui_msg_get_lines 

ui: see msg_get_lines()

ui_chooser_default_enter 

ui: jump to the address returned by get_ea() callback in the case of the non-modal choosers

Parameters
chooser(const chooser_base_t *)
n/sel(::size_t *) for chooser_t (sizevec_t *) for chooser_multi_t
Returns
int chooser_t::cbres_t
ui_screen_ea_changed 

cb: The "current address" changed

Parameters
ea(ea_t)
prev_ea(ea_t)
Returns
void
ui_get_active_modal_widget 

ui: see get_active_modal_widget()

ui_navband_pixel 

ui: see get_navband_pixel

ui_navband_ea 

ui: see get_navband_ea

ui_get_window_id 

ui: set get_window_id (GUI only)

ui_create_desktop_widget 

cb: create a widget, to be placed in the widget tree (at desktop-creation time.)

Parameters
title(const char *)
cfg(const jobj_t *)
Returns
TWidget * the created widget, or null
ui_strchoose 

ui: undocumented

ui_set_nav_colorizer 

ui: see set_nav_colorizer()

ui_display_widget 

ui: see display_widget()

ui_get_lines_rendering_info 

cb: get lines rendering information

Parameters
out(lines_rendering_output_t *)
widget(const TWidget *)
info(const lines_rendering_input_t *)
Returns
void
ui_sync_sources 

ui: [un]synchronize sources

Parameters
what(const sync_source_t *)
with(const sync_source_t *)
sync(bool)
Returns
success
ui_get_widget_config 

cb: retrieve the widget configuration (it will be passed back at ui_create_desktop_widget-, and ui_set_widget_config-time)

Parameters
widget(const TWidget *)
cfg(jobj_t *)
Returns
void
ui_set_widget_config 

cb: set the widget configuration

Parameters
widget(const TWidget *)
cfg(const jobj_t *)
Returns
void
ui_obsolete_get_custom_viewer_location 
ui_initing_database 

cb: database initialization has started.

Returns
void See also ui_database_inited. This event is called for both new and old databases.
ui_destroying_procmod 

cb: The processor module is about to be destroyed

Parameters
procmod(const procmod_t *)
ui_destroying_plugmod 

cb: The plugin object is about to be destroyed

Parameters
plugmod(const plugmod_t *)
entry(const plugin_t *)
ui_update_file_history 

ui: manipulate the file history

Parameters
add_path(const char *)
del_path(const char *)
ui_get_synced_group 

ui: see get_synced_group()

ui_show_rename_dialog 

ui: undocumented

Returns
success
ui_desktop_applied 

cb: a desktop has been applied

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

ui: modal chooser (legacy)

Parameters
n(uint32 *) input: default slot, output: chosen bookmark index
entry(const lochist_entry_t *) entry with place type
ud(void *) user data
ui_get_custom_viewer_place_xcoord 

ui: see get_custom_viewer_place_xcoord()

ui_get_user_input_event 

ui: see get_user_input_event()

ui_get_highlight_2 

ui: see get_highlight()

ui_get_custom_viewer_location_2 

ui: see get_custom_viewer_location()

Parameters
out(listing_location_t *)
custom_viewer(TWidget *)
flags(uint32) or'ed combination of CVLF_* values
ui_get_chooser_rows 

ui: see get_chooser_rows()

Parameters
out(chooser_row_info_vec_t *) column data for each returned row
chooser_caption(const char *)
what(size_t) row number, or one of the GCRF_ flags
ui_get_icon_id_by_name 

ui: see get_icon_id_by_name()

Parameters
icon_namefull name of the icon
Returns
icon id
ui_open_builtin2 

ui: open a window of a built-in type.

see Functions: open built-in windows

Parameters
bwnthe builtin widget type
arg0the first argument (e.g., ordinal for BWN_TICSR)
arg1the second argument (e.g., a tif_cursor_t * for BWN_TICSR)
ui_get_last_widget 

ui: see get_last_widget()

ui_prompt_function_prototype 

ui: open Function Prototype Editor and return new type for function

ui_parse_tagged_line_sections 

ui: see parse_tagged_line_sections()

ui_last 

the last notification code

ui_dbg_begin 

debugger callgates. should not be used directly, see dbg.hpp for details

ui_dbg_run_requests 
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_bpt_qty 
ui_dbg_add_oldbpt 
ui_dbg_request_add_oldbpt 
ui_dbg_del_oldbpt 
ui_dbg_request_del_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_call_tev_callee 
ui_dbg_get_ret_tev_return 
ui_dbg_get_bpt_tev_ea 
ui_dbg_get_reg_value_type 
ui_dbg_get_processes 
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_sp_val 
ui_dbg_get_ip_val 
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_obsolete_dbg_save_bpts 
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_enable_bpt 
ui_dbg_request_enable_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_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_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_dbg_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_collect_stack_trace 
ui_dbg_get_module_info 
ui_dbg_get_srcinfo_provider 
ui_dbg_get_global_var 
ui_dbg_get_local_var 
ui_dbg_get_local_vars 
ui_dbg_add_path_mapping 
ui_dbg_get_current_source_file 
ui_dbg_get_current_source_line 
ui_dbg_srcdbg_step_into 
ui_dbg_srcdbg_request_step_into 
ui_dbg_srcdbg_step_over 
ui_dbg_srcdbg_request_step_over 
ui_dbg_srcdbg_step_until_ret 
ui_dbg_srcdbg_request_step_until_ret 
ui_dbg_getn_thread_name 
ui_dbg_bin_search 
ui_dbg_get_insn_tev_reg_val_i 
ui_dbg_get_insn_tev_reg_result_i 
ui_dbg_get_reg_val_i 
ui_dbg_set_reg_val_i 
ui_dbg_get_reg_info 
ui_dbg_set_trace_dynamic_register_set 
ui_dbg_get_trace_dynamic_register_set 
ui_dbg_enable_bptgrp 
ui_dbg_continue_backwards 
ui_dbg_request_continue_backwards 
ui_dbg_step_into_backwards 
ui_dbg_request_step_into_backwards 
ui_dbg_step_over_backwards 
ui_dbg_request_step_over_backwards 
ui_dbg_run_to_backwards 
ui_dbg_request_run_to_backwards 
ui_dbg_set_suspend_on_event 
ui_dbg_end 
debug_obsolete_assert_thread_waitready 

◆ lecvt_code_t

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 nullptr.

Enumerator
LECVT_CANCELED 
LECVT_ERROR 
LECVT_OK 

◆ 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_WIDGET 

enable action for the current widget.

call action_handler_t::update() when a widget 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_WIDGET 

analog of AST_ENABLE_FOR_WIDGET

AST_DISABLE 

analog of AST_ENABLE

◆ navaddr_type_t

Enumerator
nat_lib 
nat_fun 
nat_cod 
nat_dat 
nat_und 
nat_ext 
nat_err 
nat_gap 
nat_cur 
nat_auto 
nat_lum 
nat_hlo 
nat_last 

◆ custom_viewer_handler_id_t

Custom viewer & code viewer handler types.

Enumerator
CVH_USERDATA 
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()

◆ 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
1handled
0not 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
1handled
0not 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
1handled
0not handled (invoke default handler)

◆ 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(TWidget *)
view_deactivated 

A view is deactivated.

Parameters
view(TWidget *)
view_keydown 

Key down event.

Parameters
view(TWidget *)
key(int)
state(view_event_state_t)
view_click 

Click event.

Parameters
view(TWidget *)
event(const view_mouse_event_t *)
view_dblclick 

Double click event.

Parameters
view(TWidget *)
event(const view_mouse_event_t *)
view_curpos 

Cursor position changed.

Parameters
view(TWidget *)
view_created 

A view is being created.

Parameters
view(TWidget *)
view_close 

View closed.

Parameters
view(TWidget *)
view_switched 

A view's renderer has changed.

Parameters
view(TWidget *)
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(TWidget *)
event(const view_mouse_event_t *)
view_loc_changed 

The location for the view has changed (can be either the place_t, the renderer_info_t, or both.)

Parameters
view(TWidget *)
now(const lochist_entry_t *)
was(const lochist_entry_t *)
view_mouse_moved 

The mouse moved on the view.

Parameters
view(TWidget *)
event(const view_mouse_event_t *)

◆ locchange_reason_t

Enumerator
lcr_unknown 
lcr_goto 
lcr_user_switch 
lcr_auto_switch 
lcr_jump 
lcr_navigate 
lcr_scroll 
lcr_internal 

◆ input_event_kind_t

Enumerator
iek_unknown 
iek_shortcut 
iek_key_press 
iek_key_release 
iek_mouse_button_press 
iek_mouse_button_release 
iek_mouse_wheel 

◆ 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

◆ ida_export_data()

idaman callui_t ida_export_data ( idaapi * callui)

Pointer to the user-interface dispatcher function.

This pointer is in the kernel

◆ init_database()

idaman callui_t 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

◆ term_database()

idaman void ida_export term_database ( )

The database termination function.

This function should be called to close the database.

◆ AS_PRINTF() [1/10]

idaman NORETURN AS_PRINTF ( 1 ,
0  ) const

See error()

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

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

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

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

See show_wait_box()

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.

Parameters
formatprintf() style format string. It may have some prefixes, see 'Format of dialog box' for details.
vapointer to variadic arguments.
Returns
< 0 in case the warning was inhibited, >= 0 otherwise

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).

Parameters
formatprintf() style format string. It may have some prefixes, see 'Format of dialog box' for details.
vapointer to variadic arguments.
Returns
< 0 in case the message was inhibited, >= 0 otherwise
Parameters
formatprintf() style message string.
vapointer to variadic arguments.

Everything appearing on the output window may be written to a text file. For this the user should define the following environment variable:
set IDALOG=idalog.txt

Parameters
formatprintf() style message string.
vapointer to variadic arguments.
Returns
number of bytes output

◆ AS_PRINTF() [2/10]

idaman AS_PRINTF ( 3 ,
0  )

See show_hex()

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

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

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

Parameters
strqstring to fill. Can contain the default value. Cannot be nullptr.
histcategory 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
formatprintf() style format string with the question
vapointer to variadic arguments.
Returns
false if the user cancelled the dialog, otherwise returns true.

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

The 'format' parameter can contain a 'FILTER' description, of the form 'description1|{wildcard1}+|...|descriptionN|{wildcardsN}+', where each file type description has a corresponding set of one (or more) ';'-separated mask(s). E.g.,

Text files|*.txt|Executable files|*.exe;*.bin
Parameters
for_savingwill the filename be used to save a file?
defvaldefault value. will be displayed initially in the input line. may be nullptr may be or a wildcard file name.
formatprintf-style format string with the dialog title, possibly including a filter.
vapointer to variadic arguments.
Returns
nullptr the user cancelled the dialog. Otherwise the user entered a valid file name.

◆ AS_PRINTF() [3/10]

AS_PRINTF ( 4 ,
0  )

See show_hex_file()

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

Parameters
answeroutput buffer
max_sizemaximum size of text in bytes including terminating zero (0 for unlimited)
defvaldefault value. will be displayed initially in the input line. may be nullptr.
formatprintf() style format string with the question. the following options are accepted at its beginning: "ACCEPT TABS\n": accept tabulations in the input "NORMAL FONT\n": use regular font (otherwise the notepad font)
vapointer to variadic arguments.
Returns
false-if the user pressed Esc, otherwise returns true.

◆ get_kernel_version()

ssize_t get_kernel_version ( char * buf,
size_t bufsize )
inline

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

◆ is_ida_library()

bool is_ida_library ( char * path = nullptr,
size_t pathsize = 0,
void ** handle = nullptr )
inline

◆ l_compare()

idaman int ida_export l_compare ( const place_t * t1,
const place_t * t2 )

compare places and their lnnums

◆ l_compare2()

idaman int ida_export l_compare2 ( const place_t * t1,
const place_t * t2,
void * ud )

◆ l_equals()

idaman bool ida_export l_equals ( const place_t * t1,
const place_t * t2,
void * ud )

◆ define_place_exported_functions() [1/2]

define_place_exported_functions(idaplace_t) class idaplace_t define_place_exported_functions ( hexplace_t )

A location in a disassembly view.

A location in a hex view

◆ hexplace_t__out_one_item()

idaman void ida_export hexplace_t__out_one_item ( const hexplace_t * _this,
outctx_base_t & ctx,
const hexplace_gen_t * hg,
int itemno,
color_t * color,
color_t patch_or_edit )

◆ hexplace_t__ea2str()

idaman size_t ida_export hexplace_t__ea2str ( char * buf,
size_t bufsize,
const hexplace_gen_t * hg,
ea_t ea )

◆ define_place_exported_functions() [2/2]

define_place_exported_functions ( tiplace_t )

◆ is_tif_cursor_header()

bool is_tif_cursor_header ( tif_cursor_t c)
inline

◆ is_tif_cursor_footer()

bool is_tif_cursor_footer ( tif_cursor_t c)
inline

◆ is_tif_cursor_index()

bool is_tif_cursor_index ( tif_cursor_t c)
inline

◆ internal_register_place_class()

idaman int ida_export internal_register_place_class ( const place_t * tmplate,
int flags,
const plugin_t * owner,
int sdk_version )

◆ register_place_class()

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
tmplatethe place_t template
flagsor'ed combination of PCF_* flags. You should always pass at least PCF_MAKEPLACE_ALLOCATES, and have the place_t::makeplace() implementation create new instances.
ownerthe owner plugin of the place_t type. Cannot be nullptr.
Returns
the place_t ID, or -1 if an error occurred.

◆ get_place_class()

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_flagsoutput flags (can be nullptr)
out_sdk_versionsdk version the place was created with (can be nullptr)
idplace class ID
Returns
the place_t template, or nullptr if not found

◆ get_place_class_template()

const place_t * get_place_class_template ( int id)
inline

◆ is_place_class_ea_capable()

bool is_place_class_ea_capable ( int id)
inline

◆ get_place_class_id()

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
namethe class name
Returns
the place class ID, or -1 if not found

◆ DECLARE_TYPE_AS_MOVABLE() [1/8]

DECLARE_TYPE_AS_MOVABLE ( sync_source_t )

◆ CASSERT() [1/2]

CASSERT ( sizeof(sync_source_t) = =16)

◆ register_loc_converter2()

idaman void ida_export register_loc_converter2 ( const char * p1,
const char * p2,
lochist_entry_cvt2_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
p1the name of the first place_t class this converter can convert from/to
p2the name of the second place_t class this converter can convert from/to
cvtthe converter

◆ lookup_loc_converter2()

idaman lochist_entry_cvt2_t *ida_export lookup_loc_converter2 ( 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
p1the name of the place_t class to convert from
p2the name of the place_t class to convert to
Returns
a converter, or nullptr if none found

◆ DECLARE_TYPE_AS_MOVABLE() [2/8]

DECLARE_TYPE_AS_MOVABLE ( twinline_t )

◆ DECLARE_LINEARRAY_HELPERS()

DECLARE_LINEARRAY_HELPERS ( idaman )

The group of lines corresponding to a single place within a view.

Position the array. This function must be called before calling any other member functions.

Parameters
new_atnew position of the array. linearray will make a clone of this object.
Returns
the delta of lines that the linearray_t had to adjust the place by.
For example, if the place_t has a lnnum of 5, but it turns out, upon generating lines,
that the number of lines for that particular place is only 2, then 3 will be returned.

Copy information from one linearray to another. Only linearray objects with compatible 'ud' fields can be copied.

Get the current place. If called before down(), then returns place of line which will be returned by down(). If called after up(), then returns place if line returned by up().

Get current background color. (the same behavior as with get_place(): good before down() and after up())

Get current prefix color. (the same behavior as with get_place(): good before down() and after up())

Get default line number. (the same behavior as with get_place(): good before down() and after up())

Get number of lines for the current place. (the same behavior as with get_place(): good before down() and after up())

Get pointer to user data

Change the user data

Are we at the beginning?

Get the next line going downwards. 'at' for the retrieved line is correct BEFORE calling this function.

Get the next line going upwards. 'at' for the retrieved line is correct AFTER calling this function.

Set max number of lines to generate for a place. 0 means to use the default value, MAX_ITEM_LINES from ida.cfg

◆ DECLARE_TYPE_AS_MOVABLE() [3/8]

DECLARE_TYPE_AS_MOVABLE ( line_rendering_output_entry_t )

◆ DECLARE_TYPE_AS_MOVABLE() [4/8]

DECLARE_TYPE_AS_MOVABLE ( line_section_t )

◆ DECLARE_TYPE_AS_MOVABLE() [5/8]

DECLARE_TYPE_AS_MOVABLE ( tagged_line_section_t )

◆ get_dirty_infos()

idaman uint64 ida_export get_dirty_infos ( )

Bitmask of builtin window types to be refreshed:

◆ request_refresh()

idaman void ida_export request_refresh ( uint64 mask,
bool cnd = true )

Request a refresh of a builtin window.

Parameters
maskWindow refresh flags
cndset if true or clear flag otherwise

◆ clear_refresh_request()

void clear_refresh_request ( uint64 mask)
inline

◆ is_refresh_requested()

idaman bool ida_export is_refresh_requested ( uint64 mask)

Get a refresh request state.

Parameters
maskWindow refresh flags
Returns
the state (set or cleared)

◆ is_chooser_widget()

bool is_chooser_widget ( twidget_type_t t)
inline

Does the given widget type specify a chooser widget?

◆ AS_PRINTF() [4/10]

AS_PRINTF ( 1 ,
2  ) const

Display debug message.

Display error dialog box and exit.

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.

Replace the label of "Please wait dialog box".

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

Parameters
ida_debug_bitsIDA debug bits, also see debug
formatprintf()-style format
Returns
number of bytes output Note: use deb() macro

The behavior of the dialog box can be configured with well-known
tokens, that should be placed at the start of the format string:
"NODELAY\n": the dialog will show immediately, instead of
appearing after usual grace threshold
"HIDECANCEL\n": the cancel button won't be added to the dialog box
and user_cancelled() will always return false (but
can be called to refresh UI)
Using "HIDECANCEL" implies "NODELAY"
Plugins must call hide_wait_box() to close the dialog box, otherwise
the user interface will remain 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.

Parameters
formatthe reason why the input file is bad

If you just want to display an error message and let IDA continue, do NOT use this function! Use warning() or info() instead.

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

◆ va_start()

va_start ( va ,
format  )

◆ va_end()

va_end ( va )

◆ AS_PRINTF() [5/10]

AS_PRINTF ( 3 ,
4  ) const

Display hex dump in the messages window.

◆ vshow_hex()

vshow_hex ( dataptr ,
len ,
format ,
va  )

◆ AS_PRINTF() [6/10]

AS_PRINTF ( 4 ,
5  )

Display hex dump of a file in the messages window.

◆ vshow_hex_file()

vshow_hex_file ( li ,
pos ,
count ,
format ,
va  )

◆ is_action_enabled()

bool is_action_enabled ( action_state_t s)
inline

Check if the given action state is one of AST_ENABLE*.

◆ DECLARE_TYPE_AS_MOVABLE() [6/8]

DECLARE_TYPE_AS_MOVABLE ( chooser_item_attrs_t )

◆ DECLARE_TYPE_AS_MOVABLE() [7/8]

DECLARE_TYPE_AS_MOVABLE ( chooser_row_info_t )

◆ set_nav_colorizer()

void set_nav_colorizer ( nav_colorizer_t ** out_was_func,
void ** out_was_ud,
nav_colorizer_t * func,
void * ud )
inline

Install new navigation band colorizer (ui_set_nav_colorizer).

◆ CASSERT() [2/2]

CASSERT ( sizeof(locchange_md_t) = =sizeof(uint32))

◆ DECLARE_TYPE_AS_MOVABLE() [8/8]

DECLARE_TYPE_AS_MOVABLE ( locchange_md_t )

◆ execute_ui_requests() [1/2]

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

◆ execute_ui_requests() [2/2]

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
reqpointer to the first request ,use nullptr to terminate the var arg request list
Returns
a request id: a unique number that can be used to cancel the request

◆ cancel_exec_request()

THREAD_SAFE bool cancel_exec_request ( int req_id)
inline

Try to cancel an asynchronous exec request (::ui_cancel_exec_request).

Parameters
req_idrequest id
Return values
truesuccessfully canceled
falserequest has already been processed.

◆ cancel_thread_exec_requests()

THREAD_SAFE int cancel_thread_exec_requests ( qthread_t tid)
inline

Try to cancel asynchronous exec requests created by the specified thread.

Parameters
tidthread id
Returns
number of the canceled requests.

◆ set_execute_sync_availability()

THREAD_SAFE execute_sync_availability_t set_execute_sync_availability ( qthread_t tid,
execute_sync_availability_t availability )
inline

Set the availability of the execute_sync functionality for the given thread.

Setting it to esa_unavailable will cause the existing requests for this thread to be cancelled. Setting it to esa_release will clear the status for this thread, and should be issued right before a call to qthread_free is issued.

Parameters
tidthread id
availabilitythe availability
Returns
the previous availability

◆ get_synced_group()

const synced_group_t * get_synced_group ( const TWidget * w)
inline

Get the group of widgets/registers this view is synchronized with.

Parameters
wthe widget
Returns
the group of widgets/registers, or nullptr

◆ jumpto() [1/2]

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

Jump to the specified address (ui_jumpto).

Parameters
eadestination
opnum-1: don't change x coord
uijmp_flagsJump flags
Returns
success

◆ banner()

bool banner ( int wait)
inline

Show a banner dialog box (ui_banner).

Parameters
waittime to wait before closing
Return values
1ok
0esc was pressed

◆ is_msg_inited()

THREAD_SAFE bool is_msg_inited ( )
inline

Can we use msg() functions?

◆ refresh_idaview()

void refresh_idaview ( )
inline

Refresh marked windows (ui_refreshmarked)

◆ refresh_idaview_anyway()

void refresh_idaview_anyway ( )
inline

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

Please consider request_refresh() instead

◆ analyzer_options()

void analyzer_options ( )
inline

Allow the user to set analyzer options. (show a dialog box) (ui_analyzer_options)

◆ get_screen_ea()

ea_t get_screen_ea ( )
inline

Get the address at the screen cursor (ui_screenea)

◆ get_opnum()

int get_opnum ( )
inline

Get current operand number, -1 means no operand (ui_get_opnum)

◆ get_cursor()

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]xx-coordinate
[out]yy-coordinate
Return values
truepointers are filled
falseno disassembly window open

◆ get_output_cursor()

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]xcolumn
[out]yline number (global, from the start of output)
Return values
falsethe output window has been destroyed.
truepointers are filled

◆ get_curline()

const char * get_curline ( )
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)

◆ open_url()

void open_url ( const char * url)
inline

Open the given url (ui_open_url)

◆ get_hexdump_ea()

ea_t get_hexdump_ea ( int hexdump_num)
inline

Get the current address in a hex view.

Parameters
hexdump_numnumber of hexview window

◆ get_key_code()

ushort get_key_code ( const char * keyname)
inline

Get keyboard key code by its name (ui_get_key_code)

◆ lookup_key_code()

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

Get shortcut code previously created by ui_get_key_code.

Parameters
keykey constant
shiftmodifiers
is_qtare we using gui version?

◆ refresh_navband()

void refresh_navband ( bool force)
inline

Refresh navigation band if changed (ui_refresh_navband).

Parameters
forcerefresh regardless

◆ refresh_chooser()

bool refresh_chooser ( const char * title)
inline

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

Parameters
titletitle of chooser
Returns
success

◆ close_chooser()

bool close_chooser ( const char * title)
inline

Close a non-modal chooser (ui_close_chooser).

Parameters
titlewindow title of chooser to close
Returns
success

◆ install_command_interpreter()

void install_command_interpreter ( const cli_t * cp)
inline

Install command line interpreter (ui_install_cli)

◆ remove_command_interpreter()

void remove_command_interpreter ( const cli_t * cp)
inline

Remove command line interpreter (ui_install_cli)

◆ gen_disasm_text()

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

Generate disassembly text for a range.

Parameters
[out]textresult
ea1start address
ea2end address
truncate_lines(on idainfo::margin)

◆ execute_sync()

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

Execute code in the main thread.

Parameters
reqrequest specifying the code to execute
reqfExec request flags
Returns
if #MFF_NOWAIT is specified, return the request id. otherwise return the value returned by exec_request_t::execute().

◆ set_dock_pos()

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 widget (ui_set_dock_pos).

Parameters
src_ctrltitle of widget to dock
dest_ctrlwhere to dock: if nullptr or invalid then create a new tab relative to current active tab
orientDocking positions
left,top,right,bottomdimensions of dock, if not specified or invalid then create the widget in the center of the screen with the default size
Returns
success

◆ get_icon_id_by_name()

int get_icon_id_by_name ( const char * icon_name)
inline

Retrieve the id of the icon by name (ui_get_icon_id_by_name).

Parameters
icon_namefull name of the icon
Returns
icon id

◆ load_custom_icon() [1/2]

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_namepath to file
Returns
icon id

◆ load_custom_icon() [2/2]

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
ptrpointer to raw image data
lenimage data length
formatimage format
Returns
icon id

◆ free_custom_icon()

void free_custom_icon ( int icon_id)
inline

Free an icon loaded with load_custom_icon() (ui_free_custom_icon).

◆ process_ui_action()

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

Processes a UI action by name.

Parameters
nameaction name
flagsreserved/not used
paramreserved/not used

◆ take_database_snapshot()

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

Take a database snapshot (ui_take_database_snapshot).

Parameters
ssin/out parameter.
  • in: description, flags
  • out: filename, id
err_msgoptional error msg buffer
Returns
success

◆ restore_database_snapshot()

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
sssnapshot instance (see build_snapshot_tree())
cbA callback that will be triggered with a nullptr string. on success and an actual error message on failure.
uduser 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.

◆ register_timer()

THREAD_SAFE qtimer_t register_timer ( int interval_ms,
int(idaapi *callback)(void *ud) ,
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_msinterval in milliseconds
callbackthe callback can return -1 to unregister the timer; any other value >= 0 defines the new interval for the timer
udcallback params
Returns
handle to registered timer (use this handle to unregister it), or nullptr

◆ unregister_timer()

THREAD_SAFE bool unregister_timer ( qtimer_t t)
inline

Unregister a timer (ui_unregister_timer).

Parameters
thandle to a registered timer
Returns
success

◆ register_action()

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
descaction to register
Returns
success

◆ unregister_action()

bool unregister_action ( const char * name)
inline

Delete a previously-registered action (ui_unregister_action).

Parameters
namename of action
Returns
success

◆ get_registered_actions()

void get_registered_actions ( qstrvec_t * out)
inline

Get a list of all currently-registered actions.

Parameters
outthe list of actions to be filled

◆ create_toolbar()

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

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

Parameters
namename of toolbar (must be unique)
labellabel of toolbar
beforeif non-nullptr, the toolbar before which the new toolbar will be inserted
flagsa combination of create toolbar flags, to determine toolbar position
Returns
success

◆ delete_toolbar()

bool delete_toolbar ( const char * name)
inline

Delete an existing toolbar.

Parameters
namename of toolbar
Returns
success

◆ create_menu()

bool create_menu ( const char * name,
const char * label,
const char * menupath = nullptr )
inline

Create a menu with the given name, label and optional position, either in the menubar, or as a submenu.

If 'menupath' is non-nullptr, it provides information about where the menu should be positioned. First, IDA will try and resolve the corresponding menu by its name. If such an existing menu is found and is present in the menubar, then the new menu will be inserted in the menubar before it. Otherwise, IDA will try to resolve 'menupath' as it would for attach_action_to_menu() and, if found, add the new menu like so:

// The new 'My menu' submenu will appear in the 'Comments' submenu
// before the 'Enter comment..." command
create_menu("(...)", "My menu", "Edit/Comments/Enter comment...");
bool create_menu(const char *name, const char *label, const char *menupath=nullptr)
Create a menu with the given name, label and optional position, either in the menubar,...
Definition kernwin.hpp:5214

or

// The new 'My menu' submenu will appear at the end of the
// 'Comments' submenu.
create_menu("(...)", "My menu", "Edit/Comments/");

If the above fails, the new menu will be appended to the menubar.

Parameters
namename of menu (must be unique)
labellabel of menu
menupathwhere should the menu be inserted
Returns
success

◆ delete_menu()

bool delete_menu ( const char * name)
inline

Delete an existing menu.

Parameters
namename of menu
Returns
success

◆ attach_action_to_menu()

bool attach_action_to_menu ( const char * menupath,
const char * name,
int flags = 0 )
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
menupathpath 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
namethe action name
flagsa combination of Set menu flags, to determine menu item position
Returns
success

◆ detach_action_from_menu()

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

Detach an action from the menu (ui_detach_action_from_menu).

Parameters
menupathpath to the menu item
namethe action name
Returns
success

◆ attach_action_to_toolbar()

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_namethe name of the toolbar
namethe action name
Returns
success

◆ detach_action_from_toolbar()

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_namethe name of the toolbar
namethe action name
Returns
success

◆ register_and_attach_to_menu()

bool register_and_attach_to_menu ( const char * menupath,
const char * name,
const char * label,
const char * shortcut,
int flags,
action_handler_t * handler,
void * owner,
int action_desc_t_flags )
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.

◆ display_widget()

void display_widget ( TWidget * widget,
uint32 options,
const char * dest_ctrl = nullptr )
inline

Display a widget, dock it if not done before.

Parameters
widgetwidget to display
optionsWidget open flags
dest_ctrlwhere to dock: if nullptr or invalid then use the active docker if there is not create a new tab relative to current active tab

◆ close_widget()

void close_widget ( TWidget * widget,
int options )
inline

Close widget (ui_close_widget, only gui version).

Parameters
widgetpointer to the widget to close
optionsForm close flags

◆ activate_widget()

void activate_widget ( TWidget * widget,
bool take_focus )
inline

Activate widget (only gui version) (ui_activate_widget).

Parameters
widgetexisting widget to display
take_focusgive focus to given widget

◆ find_widget()

TWidget * find_widget ( const char * caption)
inline

Find widget with the specified caption (only gui version) (ui_find_widget).

NB: this callback works only with the tabbed widgets!

Parameters
captiontitle of tab, or window title if widget is not tabbed
Returns
pointer to the TWidget, nullptr if none is found

◆ get_current_widget()

TWidget * get_current_widget ( )
inline

Get a pointer to the current widget (ui_get_current_widget).

◆ get_widget_type()

twidget_type_t get_widget_type ( TWidget * widget)
inline

Get the type of the TWidget * (ui_get_widget_type).

◆ get_widget_title()

bool get_widget_title ( qstring * buf,
TWidget * widget )
inline

Get the TWidget's title (ui_get_widget_title).

◆ create_custom_viewer()

TWidget * create_custom_viewer ( const char * title,
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,
TWidget * parent = nullptr )
inline

Create new ida viewer based on place_t (ui_create_custom_viewer).

Parameters
titlename of viewer
minplacefirst location of the viewer
maxplacelast location of the viewer
curplaceset current location
rinforenderer information (can be nullptr)
uduser data for the viewer
cvhandlershandlers for the viewer (can be nullptr)
cvhandlers_udpointer to arbitrary user data; it will be passed to cvhandlers
parentwidget to hold viewer
Returns
pointer to resulting viewer

◆ custom_viewer_jump()

bool custom_viewer_jump ( TWidget * v,
const lochist_entry_t & loc,
uint32 flags = 0 )
inline

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

Parameters
v(TWidget *)
loc(const lochist_entry_t &)
flags(uint32) or'ed combination of CVNF_* values
Returns
success

◆ ea_viewer_history_push_and_jump()

bool ea_viewer_history_push_and_jump ( TWidget * 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
vea viewer
eajump destination
x,ycoords on screen
lnnumdesired line number of given address

◆ get_ea_viewer_history_info()

bool get_ea_viewer_history_info ( int * nback,
int * nfwd,
TWidget * v )
inline

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

Parameters
[out]nbacknumber of available back steps
[out]nfwdnumber of available forward steps
vea viewer
Return values
falseif the given ea viewer does not exist
trueotherwise

◆ refresh_custom_viewer()

void refresh_custom_viewer ( TWidget * custom_viewer)
inline

Refresh custom ida viewer (ui_refresh_custom_viewer)

◆ repaint_custom_viewer()

void repaint_custom_viewer ( TWidget * custom_viewer)
inline

Repaint the given widget immediately (ui_repaint_qwidget)

◆ destroy_custom_viewer()

void destroy_custom_viewer ( TWidget * custom_viewer)
inline

Destroy custom ida viewer.

◆ jumpto() [2/2]

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

Set cursor position in custom ida viewer.

Parameters
custom_viewerview
placetarget position
xdesired cursor position (column)
ydesired cursor position (line)
Returns
success

◆ get_custom_viewer_place()

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

Get current place in a custom viewer (ui_get_curplace).

See also the more complete get_custom_viewer_location()

Parameters
custom_viewerview
mousemouse position (otherwise cursor position)
[out]xx coordinate
[out]yy coordinate

◆ get_custom_viewer_location() [1/2]

bool get_custom_viewer_location ( lochist_entry_t * out,
TWidget * custom_viewer,
bool mouse = false )
inline

◆ get_custom_viewer_location() [2/2]

bool get_custom_viewer_location ( listing_location_t * out,
TWidget * custom_viewer,
uint32 flags = 0 )
inline

Get the current location in a custom viewer (ui_get_custom_viewer_location_2).

Parameters
outoutput structure to fill
custom_viewerthe listing widget
flagsor'ed combination of CVLF_* values

◆ is_idaq()

bool is_idaq ( )
inline

Are we running inside IDA Qt?

◆ attach_action_to_popup()

bool attach_action_to_popup ( TWidget * widget,
TPopupMenu * popup_handle,
const char * name,
const char * popuppath = nullptr,
int flags = 0 )
inline

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

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

Parameters
widgettarget widget
popup_handletarget popup menu
  • if non-nullptr, the action is added to this popup menu invocation (i.e., 'single-shot')
  • if nullptr, the action is added to a list of actions that should always be present in context menus for this widget (i.e., 'permanent'.)
nameaction name
popuppathcan be nullptr
flagsa combination of SETMENU_ flags (see Set menu flags)
Returns
success

◆ detach_action_from_popup()

bool detach_action_from_popup ( TWidget * widget,
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 'widget's list of permanent popup actions by calling attach_action_to_popup in 'permanent' mode.

Parameters
widgettarget widget
nameaction name

◆ attach_dynamic_action_to_popup()

bool attach_dynamic_action_to_popup ( TWidget * unused,
TPopupMenu * popup_handle,
const action_desc_t & desc,
const char * popuppath = nullptr,
int flags = 0,
qstring * buf = nullptr )
inline

Create & insert an action into the widget'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
unuseddeprecated; should be nullptr
popup_handletarget popup
desccreated with #DYNACTION_DESC_LITERAL
popuppathcan be nullptr
flagsa combination of SETMENU_ constants (see Set menu flags)
bufa buffer, to retrieve the generated action name - can be nullptr
Returns
success

◆ get_action_label()

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

Get an action's label (ui_get_action_attr).

Parameters
[out]labelthe action label
namethe action name
Returns
success

◆ get_action_shortcut()

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

Get an action's shortcut (ui_get_action_attr).

Parameters
[out]shortcutthe action shortcut
namethe action name
Returns
success

◆ get_action_tooltip()

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

Get an action's tooltip (ui_get_action_attr).

Parameters
[out]tooltipthe action tooltip
namethe action name
Returns
success

◆ get_action_icon()

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

Get an action's icon (ui_get_action_attr).

Parameters
namethe action name
[out]iconthe icon id
Returns
success

◆ get_action_state()

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

Get an action's state (ui_get_action_attr).

Parameters
namethe action name
[out]statethe action's state
Returns
success

◆ get_action_checkable()

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

Get an action's checkability (ui_get_action_attr).

Parameters
namethe action name
[out]checkablethe action's checkability
Returns
success

◆ get_action_checked()

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

Get an action's checked state (ui_get_action_attr).

Parameters
namethe action name
[out]checkedthe action's checked state
Returns
success

◆ get_action_visibility()

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

Get an action's visibility (ui_get_action_attr).

Parameters
namethe action name
[out]visibilitythe action's visibility
Returns
success

◆ get_custom_viewer_curline()

const char * get_custom_viewer_curline ( TWidget * custom_viewer,
bool mouse )
inline

Get current line of custom viewer (ui_get_custom_viewer_curline).

The returned line contains color codes

See also the more powerful get_custom_viewer_location()

Parameters
custom_viewerview
mousemouse position (otherwise cursor position)
Returns
pointer to contents of current line

◆ get_custom_viewer_place_xcoord()

int get_custom_viewer_place_xcoord ( TWidget * custom_viewer,
const place_t * pline,
const place_t * pitem )
inline

Get the X position of the item, in the line.

Parameters
custom_viewerthe widget
plinea place corresponding to the line
pitema place corresponding to the item
Return values
-1if 'pitem' is not included in the line
-2if 'pitem' points at the entire line
>=0 for the X coordinate within the pline, where pitem points

◆ get_user_input_event()

bool get_user_input_event ( input_event_t * out)
inline

Get the current user input event (mouse button press, key press, ...) It is sometimes desirable to be able to tell when a certain situation happens (e.g., 'view_curpos' gets triggered); this function exists to provide that context (GUI version only)

Parameters
outthe input event data
Returns
false if we are not currently processing a user input event

◆ get_output_curline()

bool get_output_curline ( qstring * buf,
bool mouse )
inline

Get current line of output window (ui_get_output_curline).

Parameters
bufoutput buffer
mousecurrent for mouse pointer?
Returns
false if output contains no text

◆ get_output_selected_text()

bool get_output_selected_text ( qstring * buf)
inline

Returns selected text from output window (ui_get_output_selected_text).

Parameters
bufoutput buffer
Returns
true if there is a selection

◆ get_current_viewer()

TWidget * get_current_viewer ( )
inline

Get current ida viewer (idaview or custom viewer) (ui_get_current_viewer)

◆ get_last_widget()

TWidget * get_last_widget ( uint64 mask = uint64(-1))
inline

Get last ida viewer (idaview or custom viewer) (ui_get_last_widget)

Parameters
maskan OR'ed set of IWID_* to limit the search to
Returns
the viewer, if found

◆ prompt_function_prototype()

bool prompt_function_prototype ( qstring * errbuf,
tinfo_t * out_tif,
func_t * pfn,
tinfo_t * tif,
const char * name )
inline

Open function prototype editor to edit function type and create new type.

Allows to change the function prototype either in the "old" one-liner mode or in the new multi-line editor, which supports shortcuts, etc. Note: changes will not apply! It is the caller's job to apply the resulting out_tif. Parameters:

Parameters
[out]errbuf- (qstring *) the output string for errors
[out]out_tif- (tinfo_t *) tif for created type
pfn- (func_t *) editing function
tif- (tinfo_t *) current function type
name- (const char *) function name
Returns
true if new type created successfully

◆ parse_tagged_line_sections()

bool parse_tagged_line_sections ( tagged_line_sections_t * out,
const char * line )
inline

Collect tagged sections in a color-tagged line (produced by place_t::generate)

Parameters
outsections storage
lineinput line
Returns
success

◆ get_view_renderer_type()

tcc_renderer_type_t get_view_renderer_type ( TWidget * v)
inline

Get the type of renderer currently in use in the given view (ui_get_renderer_type)

◆ set_view_renderer_type()

void set_view_renderer_type ( TWidget * v,
tcc_renderer_type_t rt )
inline

Set the type of renderer to use in a view (ui_set_renderer_type)

◆ set_custom_viewer_range()

void set_custom_viewer_range ( TWidget * custom_viewer,
const place_t * minplace,
const place_t * maxplace )
inline

Set position range for custom viewer (ui_set_custom_viewer_range)

◆ create_empty_widget()

TWidget * create_empty_widget ( const char * title,
int icon = -1 )
inline

Create an empty widget, serving as a container for custom user widgets.

◆ msg_clear()

void msg_clear ( )
inline

Clear the "Output" window.

◆ msg_save()

bool msg_save ( qstring & path)
inline

Save the "Output" window contents into a file.

Parameters
pathThe path of the file to save the contents into. An empty path means that the user will be prompted for the destination and, if the file already exists, the user will be asked to confirm before overriding its contents. Upon return, 'path' will contain the path that the user chose.
Returns
success

◆ msg_get_lines()

void msg_get_lines ( qstrvec_t * out,
int count = -1 )
inline

Retrieve the last 'count' lines from the output window, in reverse order (from most recent, to least recent)

Parameters
outOutput storage
countThe number of lines to retrieve. -1 means: all

◆ get_active_modal_widget()

TWidget * get_active_modal_widget ( )
inline

Get the current, active modal TWidget instance.

Note that in this context, the "wait dialog" is not considered: this function will return nullptr even if it is currently shown.

Returns
TWidget * the active modal widget, or nullptr

◆ get_navband_pixel()

int get_navband_pixel ( bool * out_is_vertical,
ea_t ea )
inline

Translate the provided ea_t, into its pixel position (plus pixel ranges) on the navigation band.

◆ get_navband_ea()

ea_t get_navband_ea ( int pixel)
inline

Translate the pixel position on the navigation band, into an address.

◆ get_window_id()

void * get_window_id ( const char * name = nullptr)
inline

Get the system-specific window ID (GUI version only)

Parameters
namename of the window (nullptr means the main IDA window)
Returns
the low-level window ID

◆ is_idaview()

bool is_idaview ( TWidget * v)
inline

Is the given custom view an idaview? (ui_is_idaview)

◆ read_selection()

bool read_selection ( TWidget * v,
twinpos_t * p1,
twinpos_t * p2 )
inline

Get the selected range boundaries (ui_read_selection).

Parameters
vview
[out]p1start of selection
[out]p2end of selection
Return values
falseno range is selected
trueok, start and end are filled

◆ read_range_selection()

bool read_range_selection ( TWidget * v,
ea_t * ea1,
ea_t * ea2 )
inline

Get the address range for the selected range boundaries, this is the convenient function for read_selection()

Parameters
vview, nullptr means the last active window containing addresses
[out]ea1start ea
[out]ea2end ea
Return values
0no range is selected
1ok, start ea and end ea are filled

◆ unmark_selection()

void unmark_selection ( )
inline

Unmark selection (ui_unmarksel)

◆ create_code_viewer()

TWidget * create_code_viewer ( TWidget * custview,
int flags = 0,
TWidget * parent = nullptr )
inline

Create a code viewer (ui_create_code_viewer).

A code viewer contains on the left side a widget representing the line numbers, and on the right side, the child widget passed as parameter. It will inherit its title from the child widget.

Parameters
custviewthe custom view to be added
flagsCode viewer flags
parentwidget to contain the new code viewer

◆ get_viewer_user_data()

void * get_viewer_user_data ( TWidget * viewer)
inline

Get the user data from a custom viewer (ui_get_viewer_user_data)

◆ get_viewer_place_type()

tcc_place_type_t get_viewer_place_type ( TWidget * viewer)
inline

Get the type of place_t instances a viewer uses & creates (ui_get_viewer_place_type).

◆ set_code_viewer_line_handlers()

void set_code_viewer_line_handlers ( TWidget * 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 nullptr

◆ get_tab_size()

int get_tab_size ( const char * path)
inline

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

Parameters
paththe path of the source view for which the tab size is requested.
  • if nullptr, the default size is returned.

◆ clr_cancelled()

THREAD_SAFE void clr_cancelled ( )
inline

Clear "Cancelled" flag (ui_clr_cancelled)

◆ set_cancelled()

THREAD_SAFE void set_cancelled ( )
inline

Set "Cancelled" flag (ui_set_cancelled)

◆ user_cancelled()

THREAD_SAFE bool user_cancelled ( )
inline

Test the cancellation flag (ui_test_cancelled).

Return values
trueCancelled, a message is displayed
falseNot cancelled

◆ ui_load_new_file()

bool ui_load_new_file ( qstring * temp_file,
qstring * filename,
linput_t ** pli,
ushort neflags,
load_info_t ** ploaders )
inline

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

Parameters
[out]temp_filename of the file with the extracted archive member.
[in,out]filenamethe name of input file as is, library or archive name
[in,out]pliloader input source, may be changed to point to temp_file
neflagscombination of NEF_... bits (see Load file flags)
[in,out]ploaderslist of loaders which accept file, may be changed for loaders of temp_file
Return values
truefile was successfully loaded
falseotherwise

◆ ui_run_debugger()

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
dbgoptsvalue of the -r command line switch
exenamename of the file to run
argcnumber of arguments for the executable
argvargument vector
Returns
success

◆ load_dbg_dbginfo()

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

Load debugging information from a file.

Parameters
pathpath to file
liloader input. if nullptr, check DBG_NAME_KEY
baseloading address
verbosedump status to message window

◆ add_idc_hotkey()

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

Add hotkey for IDC function (ui_add_idckey).

Parameters
hotkeyhotkey name
idcfuncIDC function name
Returns
IDC hotkey error codes

◆ get_highlight()

bool get_highlight ( qstring * out_str,
TWidget * viewer,
uint32 * out_flags,
uint32 flags = 0 )
inline

Get the highlighted identifier in the viewer (ui_get_highlight_2).

Parameters
out_strbuffer to copy identifier to
viewerthe viewer
out_flagsstorage for the flags (see set_highlight flags)
flagsinput flags; optionally specify a highlight slot (0-7)
Returns
false if no identifier is highlighted

◆ set_highlight()

bool set_highlight ( TWidget * viewer,
const char * str,
int flags )
inline

Set the highlighted identifier in the viewer (ui_set_highlight).

Parameters
viewerthe viewer
strthe text to match, or nullptr to remove current
flagscombination of HIF_... bits (see set_highlight flags)
Returns
false if an error occurred

◆ void()

void ( idaapi * range_marker)
extern

Pointer to range marker function (for idaviews and hexviews) This pointer is initialized by setup_range_marker()

◆ setup_range_marker()

void setup_range_marker ( )
inline

Initialize pointer to idaview marker.

◆ mark_range_for_refresh()

void mark_range_for_refresh ( ea_t ea,
asize_t size )
inline

Inform the UI about any modifications of [ea, ea+size)

◆ mark_all_eaviews_for_refresh()

void mark_all_eaviews_for_refresh ( )
inline

Tell UI to refresh all idaviews and hexviews.

◆ sync_sources()

bool sync_sources ( const sync_source_t & what,
const sync_source_t & with,
bool sync )
inline

[Un]synchronize sources

Parameters
what
with
sync
Returns
success

◆ choose_struc_path()

int choose_struc_path ( const char * title,
tid_t strid,
uval_t offset,
adiff_t delta,
bool appzero,
tid_t * path )
inline

Get path to a structure offset (for nested structures/enums) (ui_choose, chtype_strpath).

◆ get_chooser_obj()

void * get_chooser_obj ( const char * chooser_caption)
inline

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

This attemps to find the choser by its title and, if found, returns the result of calling its chooser_base_t::get_chooser_obj() method.

Note
This is object is chooser-specific.
Returns
the object that was used to create the chooser

◆ get_chooser_data()

bool get_chooser_data ( qstrvec_t * out,
const char * chooser_caption,
int n )
inline

Get the text corresponding to the index N in the chooser data.

Use -1 to get the header.

See also get_chooser_rows().

◆ get_chooser_rows()

bool get_chooser_rows ( chooser_row_info_vec_t * out,
const char * chooser_caption,
size_t what )
inline

Get the chooser contents corresponding to the rows indicated by "what".

Parameters
outA vector of chooser_row_info_t, one entry per returned row.
chooser_captionThe caption that identifies the desired chooser.
whatEither one of the GCRF_ flags, or a row index.
Returns
Success.

◆ enable_chooser_item_attrs()

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

◆ show_wait_box_v()

show_wait_box_v ( format ,
va  )

◆ hide_wait_box()

THREAD_SAFE void hide_wait_box ( )
inline

Hide the "Please wait dialog box".

◆ callui() [1/2]

callui ( ui_mbox ,
mbox_replace ,
format ,
va  )

◆ beep()

void beep ( beep_t beep_type = beep_default)
inline

Issue a beeping sound (ui_beep).

Parameters
beep_typebeep_t

◆ display_copyright_warning()

bool display_copyright_warning ( )
inline

Display copyright warning (ui_copywarn).

Returns
yes/no

◆ callui() [2/2]

callui ( ui_mbox ,
mbox_feedback ,
format ,
va  )

◆ AS_PRINTF() [7/10]

AS_PRINTF ( 2 ,
3  )

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

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

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

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

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

Parameters
addrin/out parameter. contains pointer to the address.
formatprintf() style format string with the question
Return values
0the user pressed Esc.
1ok, the user entered an address

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

Parameters
selin/out parameter. contains selector of the segment
formatprintf() style format string with the question
Return values
0if the user pressed Esc.
1ok, the user entered an segment name

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

Parameters
valuein/out parameter. contains pointer to the number
formatprintf() style format string with the question
Return values
0if the user pressed Esc.
1ok, the user entered a valid number.
Parameters
defltdefault choice: one of Button IDs
formatThe question in printf() style format
Returns
the selected button (one of Button IDs). Esc key returns #ASKBTN_CANCEL.

If the user enters a non-valid identifier, this function displays a warning and allows the user to correct it. CPU register names are usually forbidden.

Parameters
strqstring to fill. Can contain the default value. Cannot be nullptr.
formatprintf() style format string with the question
Returns
false if the user cancelled the dialog, otherwise returns true.

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

Parameters
strqstring to fill. Can contain the default value. Cannot be nullptr.
formatprintf() style format string with the question
Returns
false if the user cancelled the dialog, otherwise returns true.

◆ verror()

verror ( format ,
va  )

◆ abort()

abort ( )

◆ vnomem()

vnomem ( format ,
va  )

◆ AS_PRINTF() [8/10]

THREAD_SAFE AS_PRINTF ( 5 ,
0  ) const

◆ AS_PRINTF() [9/10]

AS_PRINTF ( 2 ,
0  )

◆ AS_PRINTF() [10/10]

AS_PRINTF ( 5 ,
6  ) const

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

Note
for all buttons:
  • use "" or nullptr to take the default name for the button.
  • prepend "HIDECANCEL\n" in 'format' to hide the Cancel button
Parameters
Yestext for the first button
Notext for the second button
Canceltext for the third button
defltdefault choice: one of Button IDs
formatprintf-style format string for question. It may have some prefixes, see below.
vaparameters for the format string
Returns
one of Button IDs specifying the selected button (Esc key returns Cancel/3rd button value)

◆ place_t__serialize()

void place_t__serialize ( const place_t * _this,
bytevec_t * out )
inline

◆ place_t__deserialize()

bool place_t__deserialize ( place_t * _this,
const uchar ** pptr,
const uchar * end )
inline

◆ get_user_strlist_options()

DEPRECATED void get_user_strlist_options ( strwinsetup_t * out)
inline

◆ del_idc_hotkey()

DEPRECATED bool del_idc_hotkey ( const char * hotkey)
inline

◆ ida_checkmem()

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

Variable Documentation

◆ va

const char const char va_list va
Initial value:
{
idaman THREAD_SAFE va_list va
See qsscanf()
Definition err.h:21
idaman THREAD_SAFE const char * format
Definition fpro.h:78
callui(ui_mbox, mbox_replace, format, va)
@ ui_mbox
ui: Show a message box.
Definition kernwin.hpp:462
@ mbox_wait
Definition kernwin.hpp:48

◆ len

size_t len

◆ format

const char const char* format

◆ pos

int64 pos

◆ count

int64 size_t count

◆ IDALIB_API_MAGIC

const int64 IDALIB_API_MAGIC = 0x001DA11B00000000LL

◆ debug

idaman uint32 ida_export_data debug

Controls debug messages - combination of IDA debug bits.

◆ nbytes

return nbytes = callui(ui_msg, format, va).i

◆ size

asize_t size

◆ ok

return ok = callui(ui_ask_addr, addr, format, va).cnd

◆ batch

idaman bool 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.

◆ errorexit

idaman int ida_export_data errorexit

Exiting because of a a fatal error?

Is non-zero if we are exiting with from the error() function.

◆ rc

return rc = vwarning(format, va)

◆ No

const char * No

◆ Cancel

const char const char * Cancel

◆ deflt

const char const char int deflt

◆ code

return code = vask_yn(deflt, format, va)

◆ hist

int hist

◆ result

return result = vask_str(str, hist, format, va)

◆ max_size

size_t max_size

◆ defval

const char * defval

◆ answer

return answer = vask_file(for_saving, defval, format, va)