Module ida_kernwin
[frames] | no frames]

Module ida_kernwin

IDA Plugin SDK API wrapper: kernwin

Classes
  UI_Hooks
Proxy of C++ UI_Hooks class
  disasm_line_t
Proxy of C++ disasm_line_t class
  place_t
Proxy of C++ place_t class
  simpleline_t
Proxy of C++ simpleline_t class
  simpleline_place_t
Proxy of C++ simpleline_place_t class
  idaplace_t
Proxy of C++ idaplace_t class
  enumplace_t
Proxy of C++ enumplace_t class
  structplace_t
Proxy of C++ structplace_t class
  twinpos_t
Proxy of C++ twinpos_t class
  chooser_item_attrs_t
Proxy of C++ chooser_item_attrs_t class
  renderer_pos_info_t
Proxy of C++ renderer_pos_info_t class
  view_mouse_event_location_t
Proxy of C++ view_mouse_event_location_t class
  view_mouse_event_t
Proxy of C++ view_mouse_event_t class
  locchange_md_t
Proxy of C++ locchange_md_t class
  ui_requests_t
Proxy of C++ ui_requests_t class
  action_ctx_base_t
Proxy of C++ action_ctx_base_t class
  action_activation_ctx_t
Proxy of C++ action_activation_ctx_t class
  action_update_ctx_t
Proxy of C++ action_update_ctx_t class
  action_desc_t
Proxy of C++ action_desc_t class
  addon_info_t
Proxy of C++ addon_info_t class
  strarray_t
Proxy of C++ strarray_t class
  disasm_text_t
Proxy of C++ qvector<(disasm_line_t)> class
  action_handler_t
  Choose
Chooser wrapper class.
  textctrl_info_t
Class representing textctrl_info_t
  Form
  cli_t
cli_t wrapper class.
  View_Hooks
Proxy of C++ View_Hooks class
  CustomIDAMemo
  IDAViewWrapper
Deprecated.
  simplecustviewer_t
The base class for implementing simple custom viewers
  PluginForm
PluginForm class.
Functions
 
refresh_choosers()
PyObject *
textctrl_info_t_create()
bool
textctrl_info_t_destroy(py_obj)
textctrl_info_t *
textctrl_info_t_get_clink(self)
PyObject *
textctrl_info_t_get_clink_ptr(self)
PyObject *
register_timer(interval, py_callback)
Register a timer
PyObject *
unregister_timer(py_timerctx)
Unregister a timer
PyObject *
choose_idasgn()
Opens the signature chooser
PyObject *
get_highlight(v)
Returns the currently highlighted identifier and flags
int
py_load_custom_icon_fn(filename)
int
py_load_custom_icon_data(data, format)
PyObject *
msg(o)
Prints text into IDA's Output window
PyObject *
ask_text(max_size, defval, prompt)
Asks for a long text
PyObject *
ask_str(defval, hist, prompt)
Asks for a long text
ea_t
str2ea(str, screenEA=BADADDR)
Converts a string express to EA.
bool
process_ui_action(name, flags=0)
Invokes an IDA UI action by name
bool
del_hotkey(pyctx)
Deletes a previously registered function hotkey
PyObject *
add_hotkey(hotkey, pyfunc)
Associates a function call with a hotkey.
PyObject *
take_database_snapshot(ss)
 
py_ss_restore_callback(err_msg, userdata)
PyObject *
restore_database_snapshot(ss, pyfunc_or_none, pytuple_or_none)
int
execute_sync(py_callable, reqf)
Executes a function in the context of the main thread.
bool
execute_ui_requests(py_list)
Inserts a list of callables into the UI message processing queue.
bool
register_action(desc)
PyObject *
get_registered_actions()
bool
attach_dynamic_action_to_popup(widget, popup_handle, desc, popuppath=None, flags=0)
 
gen_disasm_text(text, ea1, ea2, truncate_lines)
nav_colorizer_t *
set_nav_colorizer(new_py_colorizer)
Set a new colorizer for the navigation band.
uint32
call_nav_colorizer(col, ea, nbytes)
To be used with the IDA-provided colorizer, that is returned as result of the first call to set_nav_colorizer().
ssize_t
get_kernel_version()
idaplace_t
place_t_as_idaplace_t(p)
enumplace_t
place_t_as_enumplace_t(p)
structplace_t
place_t_as_structplace_t(p)
simpleline_place_t
place_t_as_simpleline_place_t(p)
int
internal_register_place_class(tmplate, flags, owner, sdk_version)
place_t
get_place_class(out_flags, out_sdk_version, id)
place_t
get_place_class_template(id)
bool
is_place_class_ea_capable(id)
int
get_place_class_id(name)
 
request_refresh(mask, cnd=True)
 
clear_refresh_request(mask)
bool
is_refresh_requested(mask)
bool
is_chooser_widget(t)
bool
is_action_enabled(s)
bool
cancel_exec_request(req_id)
bool
banner(wait)
bool
is_msg_inited()
 
refresh_idaview()
 
refresh_idaview_anyway()
 
analyzer_options()
ea_t
get_screen_ea()
int
get_opnum()
bool
get_cursor()
bool
get_output_cursor()
char *
get_curline()
 
open_url(url)
ea_t
get_hexdump_ea(hexdump_num)
ushort
get_key_code(keyname)
ushort
lookup_key_code(key, shift, is_qt)
 
refresh_navband(force)
bool
refresh_chooser(title)
bool
close_chooser(title)
bool
set_dock_pos(src_ctrl, dest_ctrl, orient, left=0, top=0, right=0, bottom=0)
Sets the dock orientation of a window relatively to another window.
 
free_custom_icon(icon_id)
Frees an icon loaded with load_custom_icon()
bool
unregister_action(name)
bool
create_toolbar(name, label, before=None, flags=0)
bool
delete_toolbar(name)
bool
create_menu(name, label, before=None)
bool
delete_menu(name)
bool
attach_action_to_menu(menupath, name, flags)
bool
detach_action_from_menu(menupath, name)
bool
attach_action_to_toolbar(toolbar_name, name)
bool
detach_action_from_toolbar(toolbar_name, name)
bool
register_and_attach_to_menu(menupath, name, label, shortcut, flags, handler, owner)
 
display_widget(widget, options)
 
close_widget(widget, options)
 
activate_widget(widget, take_focus)
TWidget *
find_widget(caption)
TWidget *
get_current_widget()
twidget_type_t
get_widget_type(widget)
bool
get_widget_title(widget)
bool
custom_viewer_jump(v, loc, flags)
bool
ea_viewer_history_push_and_jump(v, ea, x, y, lnnum)
bool
get_ea_viewer_history_info(nback, nfwd, v)
 
repaint_custom_viewer(custom_viewer)
bool
jumpto(ea, opnum=-1, uijmp_flags=0x0001)
jumpto(custom_viewer, place, x, y) -> bool
place_t
get_custom_viewer_place(custom_viewer, mouse)
bool
is_idaq()
Returns True or False depending if IDAPython is hosted by IDAQ
bool
attach_action_to_popup(widget, popup_handle, name, popuppath=None, flags=0)
bool
detach_action_from_popup(widget, name)
bool
update_action_label(name, label)
bool
update_action_shortcut(name, shortcut)
bool
update_action_tooltip(name, tooltip)
bool
update_action_icon(name, icon)
bool
update_action_state(name, state)
bool
update_action_checkable(name, checkable)
bool
update_action_checked(name, checked)
bool
update_action_visibility(name, visible)
bool
get_action_label(name)
bool
get_action_shortcut(name)
bool
get_action_tooltip(name)
bool
get_action_icon(name)
bool
get_action_state(name)
bool
get_action_checkable(name)
bool
get_action_checked(name)
bool
get_action_visibility(name)
bool
set_custom_viewer_qt_aware(custom_viewer)
char const *
get_custom_viewer_curline(custom_viewer, mouse)
bool
get_output_curline(mouse)
bool
get_output_selected_text()
TWidget *
get_current_viewer()
tcc_renderer_type_t
get_view_renderer_type(v)
 
set_view_renderer_type(v, rt)
TWidget *
create_empty_widget(title, icon=-1)
bool
read_selection(v, p1, p2)
Read the user selection, and store its information in p0 (from) and p1 (to).
bool
read_range_selection(v)
 
unmark_selection()
TWidget *
create_code_viewer(custview, flags=0, parent=None)
void *
set_code_viewer_handler(code_viewer, handler_id, handler_or_data)
bool
set_code_viewer_user_data(code_viewer, ud)
void *
get_viewer_user_data(viewer)
tcc_place_type_t
get_viewer_place_type(viewer)
 
set_code_viewer_line_handlers(code_viewer, click_handler, popup_handler, dblclick_handler, drawicon_handler, linenum_handler)
bool
set_code_viewer_lines_icon_margin(code_viewer, margin)
bool
set_code_viewer_lines_alignment(code_viewer, align)
bool
set_code_viewer_lines_radix(code_viewer, radix)
bool
set_code_viewer_is_source(code_viewer)
int
get_tab_size(path)
 
clr_cancelled()
 
set_cancelled()
bool
user_cancelled()
bool
ui_load_new_file(temp_file, filename, pli, neflags, ploaders)
bool
ui_run_debugger(dbgopts, exename, argc, argv)
bool
load_dbg_dbginfo(path, li=None, base=BADADDR, verbose=False)
int
add_idc_hotkey(hotkey, idcfunc)
bool
del_idc_hotkey(hotkey)
 
get_user_strlist_options(out)
bool
set_highlight(viewer, str, flags)
TWidget *
open_exports_window(ea)
TWidget *
open_imports_window(ea)
TWidget *
open_names_window(ea)
TWidget *
open_funcs_window(ea)
TWidget *
open_strings_window(ea, selstart=BADADDR, selend=BADADDR)
TWidget *
open_segments_window(ea)
TWidget *
open_segregs_window(ea)
TWidget *
open_selectors_window()
TWidget *
open_signatures_window()
TWidget *
open_tils_window()
TWidget *
open_loctypes_window(ordinal)
TWidget *
open_calls_window(ea)
TWidget *
open_problems_window(ea)
TWidget *
open_bpts_window(ea)
TWidget *
open_threads_window()
TWidget *
open_modules_window()
TWidget *
open_trace_window()
TWidget *
open_stack_window()
TWidget *
open_xrefs_window(ea)
TWidget *
open_frame_window(pfn, offset)
TWidget *
open_navband_window(ea, zoom)
TWidget *
open_enums_window(const_id=BADADDR)
TWidget *
open_structs_window(id=BADADDR, offset=0)
TWidget *
open_disasm_window(window_title, ranges=None)
TWidget *
open_hexdump_window(window_title)
TWidget *
open_notepad_window()
bool
choose_til()
ea_t
choose_entry(title)
ea_t
choose_name(title)
ea_t
choose_stkvar_xref(pfn, mptr)
ea_t
choose_xref(to)
enum_t
choose_enum(title, default_id)
enum_t
choose_enum_by_value(title, default_id, value, nbytes)
func_t *
choose_func(title, default_ea)
segment_t *
choose_segm(title, default_ea)
struc_t *
choose_struc(title)
sreg_range_t *
choose_srcp(title)
void *
get_chooser_obj(chooser_caption)
bool
enable_chooser_item_attrs(chooser_caption, enable)
 
show_wait_box(format)
 
hide_wait_box()
 
replace_wait_box(format)
 
beep(beep_type=beep_default)
bool
display_copyright_warning()
 
ask_for_feedback(format)
 
error(format)
 
warning(format)
 
info(format)
 
nomem(format)
int
ask_yn(deflt, format)
int
ask_buttons(Yes, No, Cancel, deflt, format)
char *
ask_file(for_saving, defval, format)
int
register_addon(info)
int
addon_count()
bool
get_addon_info(id, info)
bool
get_addon_info_idx(index, info)
char *
add_spaces(str, bufsize, len)
ssize_t
qcleanline(cmt_char='', flags=((1 << 0)|(1 << 1))|(1 << 2))
char const *
strarray(array, array_size, code)
size_t
ea2str(ea)
 
load_custom_icon(file_name=None, data=None, format=None)
Loads a custom icon and returns an identifier that can be used with other APIs
 
ask_long(defval, format)
 
ask_addr(defval, format)
 
ask_seg(defval, format)
 
ask_ident(defval, format)
PyObject *
choose_find(title)
 
choose_refresh(self)
 
choose_close(self)
int
choose_create(self)
 
choose_activate(self)
PyObject *
choose_get_embedded(self)
PyObject *
choose_get_embedded_selection(self)
PyObject *
get_chooser_data(chooser_caption, n)
TWidget *
choose_get_widget(self)
bool
textctrl_info_t_assign(self, other)
bool
textctrl_info_t_set_text(self, s)
char const *
textctrl_info_t_get_text(self)
bool
textctrl_info_t_set_flags(self, flags)
unsigned int
textctrl_info_t_get_flags(self, flags)
bool
textctrl_info_t_set_tabsize(self, tabsize)
unsigned int
textctrl_info_t_get_tabsize(self, tabsize)
bool
formchgcbfa_enable_field(p_fa, fid, enable)
bool
formchgcbfa_show_field(p_fa, fid, show)
bool
formchgcbfa_move_field(p_fa, fid, x, y, w, h)
int
formchgcbfa_get_focused_field(p_fa)
bool
formchgcbfa_set_focused_field(p_fa, fid)
 
formchgcbfa_refresh_field(p_fa, fid)
 
formchgcbfa_close(p_fa, close_normally)
PyObject *
formchgcbfa_get_field_value(p_fa, fid, ft, sz)
bool
formchgcbfa_set_field_value(p_fa, fid, ft, py_val)
size_t
py_get_ask_form()
size_t
py_get_open_form()
 
py_register_compiled_form(py_form)
 
py_unregister_compiled_form(py_form)
 
ask_form(*args)
Calls ask_form()
 
open_form(*args)
Calls open_form()
int
install_command_interpreter(py_obj)
 
remove_command_interpreter(cli_idx)
bool
pyidag_bind(self)
bool
pyidag_unbind(self)
PyObject *
pyscv_init(py_link, title)
bool
pyscv_refresh(py_this)
bool
pyscv_delete(py_this)
bool
pyscv_refresh_current(py_this)
PyObject *
pyscv_get_current_line(py_this, mouse, notags)
bool
pyscv_is_focused(py_this)
size_t
pyscv_count(py_this)
bool
pyscv_show(py_this)
 
pyscv_close(py_this)
bool
pyscv_jumpto(py_this, ln, x, y)
PyObject *
pyscv_get_line(py_this, nline)
PyObject *
pyscv_get_pos(py_this, mouse)
PyObject *
pyscv_clear_lines(py_this)
bool
pyscv_add_line(py_this, py_sl)
bool
pyscv_insert_line(py_this, nline, py_sl)
bool
pyscv_patch_line(py_this, nline, offs, value)
bool
pyscv_del_line(py_this, nline)
PyObject *
pyscv_get_selection(py_this)
PyObject *
pyscv_get_current_word(py_this, mouse)
bool
pyscv_edit_line(py_this, nline, py_sl)
TWidget *
pyscv_get_widget(py_this)
PyObject *
plgform_new()
bool
plgform_show(py_link, py_obj, caption, options=WOPN_TAB|WOPN_MENU|WOPN_RESTORE)
 
plgform_close(py_link, options)
Variables
  mbox_internal = 0
  mbox_info = 1
  mbox_warning = 2
  mbox_error = 3
  mbox_nomem = 4
  mbox_feedback = 5
  mbox_readerror = 6
  mbox_writeerror = 7
  mbox_filestruct = 8
  mbox_wait = 9
  mbox_hide = 10
  mbox_replace = 11
  chtype_generic = 0
  chtype_idasgn = 1
  chtype_entry = 2
  chtype_name = 3
  chtype_stkvar_xref = 4
  chtype_xref = 5
  chtype_enum = 6
  chtype_enum_by_value = 7
  chtype_func = 8
  chtype_segm = 9
  chtype_struc = 10
  chtype_strpath = 11
  chtype_idatil = 12
  chtype_enum_by_value_and_size = 13
  chtype_srcp = 14
  beep_default = 0
  TCCRT_INVALID = 0
  TCCRT_FLAT = 1
  TCCRT_GRAPH = 2
  TCCRT_PROXIMITY = 3
  TCCPT_INVALID = 0
  TCCPT_PLACE = 1
  TCCPT_SIMPLELINE_PLACE = 2
  TCCPT_IDAPLACE = 3
  TCCPT_ENUMPLACE = 4
  TCCPT_STRUCTPLACE = 5
  VME_UNKNOWN = 0
  VME_LEFT_BUTTON = 1
  VME_RIGHT_BUTTON = 2
  VME_MID_BUTTON = 3
  SETMENU_POSMASK = 3
  SETMENU_INS = 0
  SETMENU_APP = 1
  SETMENU_FIRST = 2
  CREATETB_ADV = 1
  HIF_IDENTIFIER = 1
  HIF_REGISTER = 2
  HIF_LOCKED = 4
  DEFAULT_PLACE_LNNUM = -1
  PCF_EA_CAPABLE = 1
  BWN_UNKNOWN = -1
  BWN_EXPORTS = 0
  BWN_IMPORTS = 1
  BWN_NAMES = 2
  BWN_FUNCS = 3
  BWN_STRINGS = 4
  BWN_SEGS = 5
  BWN_SEGREGS = 6
  BWN_SELS = 7
  BWN_SIGNS = 8
  BWN_TILS = 9
  BWN_LOCTYPS = 10
  BWN_CALLS = 11
  BWN_PROBS = 12
  BWN_BPTS = 13
  BWN_THREADS = 14
  BWN_MODULES = 15
  BWN_TRACE = 16
  BWN_CALL_STACK = 17
  BWN_XREFS = 18
  BWN_SEARCH = 19
  BWN_FRAME = 25
  BWN_NAVBAND = 26
  BWN_ENUMS = 27
  BWN_STRUCTS = 28
  BWN_DISASM = 29
  BWN_DUMP = 30
  BWN_NOTEPAD = 31
  BWN_OUTPUT = 32
  BWN_CLI = 33
  BWN_WATCH = 34
  BWN_LOCALS = 35
  BWN_STKVIEW = 36
  BWN_CHOOSER = 37
  BWN_SHORTCUTCSR = 38
  BWN_SHORTCUTWIN = 39
  BWN_CPUREGS = 40
  BWN_SO_STRUCTS = 41
  BWN_SO_OFFSETS = 42
  BWN_CMDPALCSR = 43
  BWN_CMDPALWIN = 44
  BWN_SNIPPETS = 45
  BWN_CUSTVIEW = 46
  BWN_ADDRWATCH = 47
  BWN_PSEUDOCODE = 48
  BWN_STACK = 17
  BWN_DISASMS = 29
  BWN_DUMPS = 30
  BWN_SEARCHS = 19
  IWID_EXPORTS = 1
  IWID_IMPORTS = 2
  IWID_NAMES = 4
  IWID_FUNCS = 8
  IWID_STRINGS = 16
  IWID_SEGS = 32
  IWID_SEGREGS = 64
  IWID_SELS = 128
  IWID_SIGNS = 256
  IWID_TILS = 512
  IWID_LOCTYPS = 1024
  IWID_CALLS = 2048
  IWID_PROBS = 4096
  IWID_BPTS = 8192
  IWID_THREADS = 16384
  IWID_MODULES = 32768
  IWID_TRACE = 65536
  IWID_STACK = 131072
  IWID_XREFS = 262144
  IWID_SEARCHS = 524288
  IWID_FRAME = 33554432
  IWID_NAVBAND = 67108864
  IWID_ENUMS = 134217728
  IWID_STRUCTS = 268435456
  IWID_DISASMS = 536870912
  IWID_DUMPS = 1073741824
  IWID_NOTEPAD = 2147483648
  IWID_IDAMEMOS = 1610612736
  IWID_ALL = -1
  CHITEM_BOLD = 1
  CHITEM_ITALIC = 2
  CHITEM_UNDER = 4
  CHITEM_STRIKE = 8
  CHITEM_GRAY = 16
  CHOOSER_NOMAINMENU = 'NOMAINMENU\n'
  CHOOSER_NOSTATUSBAR = 'NOSTATUSBAR\n'
  CHOOSER_NO_SELECTION = 1
  CHOOSER_MULTI_SELECTION = 2
  CHOOSER_POPUP_MENU = 4
  CHOOSER_MENU_EDIT = 0
  CHOOSER_MENU_JUMP = 1
  CHOOSER_MENU_SEARCH = 2
  nat_lib = 0
  nat_fun = 1
  nat_cod = 2
  nat_dat = 3
  nat_und = 4
  nat_ext = 5
  nat_err = 6
  nat_gap = 7
  nat_cur = 8
  nat_auto = 9
  nat_last = 10
  CVH_USERDATA = 0
  CVH_KEYDOWN = 1
  CVH_POPUP = 2
  CVH_DBLCLICK = 3
  CVH_CURPOS = 4
  CVH_CLOSE = 5
  CVH_CLICK = 6
  CVH_QT_AWARE = 7
  CVH_HELP = 8
  CVH_MOUSEMOVE = 9
  CDVH_USERDATA = 1000
  CDVH_SRCVIEW = 1001
  CDVH_LINES_CLICK = 1002
  CDVH_LINES_DBLCLICK = 1003
  CDVH_LINES_POPUP = 1004
  CDVH_LINES_DRAWICON = 1005
  CDVH_LINES_LINENUM = 1006
  CDVH_LINES_ICONMARGIN = 1007
  CDVH_LINES_RADIX = 1008
  CDVH_LINES_ALIGNMENT = 1009
  VES_SHIFT = 1
  VES_ALT = 2
  VES_CTRL = 4
  VES_MOUSE_LEFT = 8
  VES_MOUSE_RIGHT = 16
  VES_MOUSE_MIDDLE = 32
  VES_META = 128
  msg_activated = 0
  msg_deactivated = 1
  msg_click = 2
  msg_dblclick = 3
  msg_closed = 4
  msg_keydown = 5
  view_activated = 0
  view_deactivated = 1
  view_keydown = 2
  view_click = 3
  view_dblclick = 4
  view_curpos = 5
  view_created = 6
  view_close = 7
  view_switched = 8
  view_mouse_over = 9
  view_loc_changed = 10
  view_mouse_moved = 11
  lcr_unknown = 0
  lcr_goto = 1
  lcr_user_switch = 2
  lcr_auto_switch = 3
  lcr_jump = 4
  lcr_navigate = 5
  lcr_scroll = 6
  lcr_internal = 7
  LCMD_SYNC = 1
  MFF_FAST = 0
  MFF_READ = 1
  MFF_WRITE = 2
  MFF_NOWAIT = 4
  UIJMP_ACTIVATE = 1
  UIJMP_DONTPUSH = 2
  UIJMP_IDAVIEW = 4
  ACF_HAS_SELECTION = 1
  ACF_XTRN_EA = 2
  AHF_VERSION = 1
  AHF_VERSION_MASK = 255
  AST_ENABLE_ALWAYS = 0
  AST_ENABLE_FOR_IDB = 1
  AST_ENABLE_FOR_WIDGET = 2
  AST_ENABLE = 3
  AST_DISABLE_ALWAYS = 4
  AST_DISABLE_FOR_IDB = 5
  AST_DISABLE_FOR_WIDGET = 6
  AST_DISABLE = 7
  ADF_OWN_HANDLER = 1
  AA_NONE = 0
  AA_LABEL = 1
  AA_SHORTCUT = 2
  AA_TOOLTIP = 3
  AA_ICON = 4
  AA_STATE = 5
  AA_CHECKABLE = 6
  AA_CHECKED = 7
  AA_VISIBILITY = 8
  ASKBTN_YES = 1
  ASKBTN_NO = 0
  ASKBTN_CANCEL = -1
  ASKBTN_BTN1 = 1
  ASKBTN_BTN2 = 0
  ASKBTN_BTN3 = -1
  HIST_SEG = 1
  HIST_CMT = 2
  HIST_SRCH = 3
  HIST_IDENT = 4
  HIST_FILE = 5
  HIST_TYPE = 6
  HIST_CMD = 7
  HIST_DIR = 8
  cvar = _ida_kernwin.cvar
  CLNL_RTRIM = 1
  CLNL_LTRIM = 2
  CLNL_FINDCMT = 4
  CLNL_TRIM = 3
  IK_CANCEL = 3
  IK_BACK = 8
  IK_TAB = 9
  IK_CLEAR = 12
  IK_RETURN = 13
  IK_SHIFT = 16
  IK_CONTROL = 17
  IK_MENU = 18
  IK_PAUSE = 19
  IK_CAPITAL = 20
  IK_KANA = 21
  IK_ESCAPE = 27
  IK_MODECHANGE = 31
  IK_SPACE = 32
  IK_PRIOR = 33
  IK_NEXT = 34
  IK_END = 35
  IK_HOME = 36
  IK_LEFT = 37
  IK_UP = 38
  IK_RIGHT = 39
  IK_DOWN = 40
  IK_SELECT = 41
  IK_PRINT = 42
  IK_EXECUTE = 43
  IK_SNAPSHOT = 44
  IK_INSERT = 45
  IK_DELETE = 46
  IK_HELP = 47
  IK_LWIN = 91
  IK_RWIN = 92
  IK_APPS = 93
  IK_SLEEP = 95
  IK_NUMPAD0 = 96
  IK_NUMPAD1 = 97
  IK_NUMPAD2 = 98
  IK_NUMPAD3 = 99
  IK_NUMPAD4 = 100
  IK_NUMPAD5 = 101
  IK_NUMPAD6 = 102
  IK_NUMPAD7 = 103
  IK_NUMPAD8 = 104
  IK_NUMPAD9 = 105
  IK_MULTIPLY = 106
  IK_ADD = 107
  IK_SEPARATOR = 108
  IK_SUBTRACT = 109
  IK_DECIMAL = 110
  IK_DIVIDE = 111
  IK_F1 = 112
  IK_F2 = 113
  IK_F3 = 114
  IK_F4 = 115
  IK_F5 = 116
  IK_F6 = 117
  IK_F7 = 118
  IK_F8 = 119
  IK_F9 = 120
  IK_F10 = 121
  IK_F11 = 122
  IK_F12 = 123
  IK_F13 = 124
  IK_F14 = 125
  IK_F15 = 126
  IK_F16 = 127
  IK_F17 = 128
  IK_F18 = 129
  IK_F19 = 130
  IK_F20 = 131
  IK_F21 = 132
  IK_F22 = 133
  IK_F23 = 134
  IK_F24 = 135
  IK_NUMLOCK = 144
  IK_SCROLL = 145
  IK_OEM_FJ_MASSHOU = 147
  IK_OEM_FJ_TOUROKU = 148
  IK_LSHIFT = 160
  IK_RSHIFT = 161
  IK_LCONTROL = 162
  IK_RCONTROL = 163
  IK_LMENU = 164
  IK_RMENU = 165
  IK_BROWSER_BACK = 166
  IK_BROWSER_FORWARD = 167
  IK_BROWSER_REFRESH = 168
  IK_BROWSER_STOP = 169
  IK_BROWSER_SEARCH = 170
  IK_BROWSER_FAVORITES = 171
  IK_BROWSER_HOME = 172
  IK_VOLUME_MUTE = 173
  IK_VOLUME_DOWN = 174
  IK_VOLUME_UP = 175
  IK_MEDIA_NEXT_TRACK = 176
  IK_MEDIA_PREV_TRACK = 177
  IK_MEDIA_STOP = 178
  IK_MEDIA_PLAY_PAUSE = 179
  IK_LAUNCH_MAIL = 180
  IK_LAUNCH_MEDIA_SELECT = 181
  IK_LAUNCH_APP1 = 182
  IK_LAUNCH_APP2 = 183
  IK_OEM_1 = 186
  IK_OEM_PLUS = 187
  IK_OEM_COMMA = 188
  IK_OEM_MINUS = 189
  IK_OEM_PERIOD = 190
  IK_OEM_2 = 191
  IK_OEM_3 = 192
  IK_OEM_4 = 219
  IK_OEM_5 = 220
  IK_OEM_6 = 221
  IK_OEM_7 = 222
  IK_OEM_102 = 226
  IK_PLAY = 250
  IK_ZOOM = 251
  IK_OEM_CLEAR = 254
  CB_INIT = -1
  CB_YES = -2
  CB_CLOSE = -3
  CB_INVISIBLE = -4
  DP_LEFT = 1
  DP_TOP = 2
  DP_RIGHT = 4
  DP_BOTTOM = 8
  DP_INSIDE = 16
  DP_BEFORE = 32
  DP_TAB = 64
  DP_FLOATING = 128
  ask_form__ = <CFunctionType object at 0x7f9668806390>
  open_form__ = <CFunctionType object at 0x7f9668806460>
  __package__ = None
Function Details

register_timer(interval, py_callback)

 

Register a timer

Parameters:
  • interval - Interval in milliseconds
  • callback - A Python callable that takes no parameters and returns an integer. The callback may return: -1 : to unregister the timer >= 0 : the new or same timer interval
Returns: PyObject *
None or a timer object

unregister_timer(py_timerctx)

 

Unregister a timer

Parameters:
  • timer_obj - a timer object previously returned by a register_timer()
Returns: PyObject *
Boolean

Note: After the timer has been deleted, the timer_obj will become invalid.

choose_idasgn()

 

Opens the signature chooser

Returns: PyObject *
None or the selected signature name

get_highlight(v)

 

Returns the currently highlighted identifier and flags

Returns: PyObject *
a tuple (text, flags), or None if nothing is highlighted or in case of error.

msg(o)

 

Prints text into IDA's Output window

Parameters:
  • text - text to print Can be Unicode, or string in local encoding
Returns: PyObject *
number of bytes printed

ask_text(max_size, defval, prompt)

 

Asks for a long text

Parameters:
  • max_size - Maximum text length, 0 for unlimited
  • defval - The default value
  • prompt - The prompt value
Returns: PyObject *
None or the entered string

ask_str(defval, hist, prompt)

 

Asks for a long text

Parameters:
  • hist - history id
  • defval - The default value
  • prompt - The prompt value
Returns: PyObject *
None or the entered string

str2ea(str, screenEA=BADADDR)

 

Converts a string express to EA. The expression evaluator may be called as well.

Returns: ea_t
BADADDR or address value

process_ui_action(name, flags=0)

 

Invokes an IDA UI action by name

Parameters:
  • name - action name
Returns: bool
Boolean

del_hotkey(pyctx)

 

Deletes a previously registered function hotkey

Parameters:
  • ctx - Hotkey context previously returned by add_hotkey()
Returns: bool
Boolean.

add_hotkey(hotkey, pyfunc)

 

Associates a function call with a hotkey. Callable pyfunc will be called each time the hotkey is pressed

Parameters:
  • hotkey - The hotkey
  • pyfunc - Callable
Returns: PyObject *
Context object on success or None on failure.

execute_sync(py_callable, reqf)

 

Executes a function in the context of the main thread. If the current thread not the main thread, then the call is queued and executed afterwards.

Parameters:
  • callable - A python callable object, must return an integer value
  • reqf - one of MFF_ flags
Returns: int
-1 or the return value of the callable

execute_ui_requests(py_list)

 

Inserts a list of callables into the UI message processing queue. When the UI is ready it will call one callable. A callable can request to be called more than once if it returns True.

Parameters:
  • callable_list - A list of python callable objects.
Returns: bool
Boolean. False if the list contains a non callabale item

Note: A callable should return True if it wants to be called more than once.

set_nav_colorizer(new_py_colorizer)

 
Set a new colorizer for the navigation band.

The 'callback' is a function of 2 arguments:
   - ea (the EA to colorize for)
   - nbytes (the number of bytes at that EA)
and must return a 'long' value.

The previous colorizer is returned, allowing
the new 'callback' to use 'call_nav_colorizer'
with it.

Note that the previous colorizer is returned
only the first time set_nav_colorizer() is called:
due to the way the colorizers API is defined in C,
it is impossible to chain more than 2 colorizers
in IDAPython: the original, IDA-provided colorizer,
and a user-provided one.

Example: colorizer inverting the color provided by the IDA colorizer:
    def my_colorizer(ea, nbytes):
        global ida_colorizer
        orig = idaapi.call_nav_colorizer(ida_colorizer, ea, nbytes)
        return long(~orig)

    ida_colorizer = idaapi.set_nav_colorizer(my_colorizer)

Returns: nav_colorizer_t *

call_nav_colorizer(col, ea, nbytes)

 

To be used with the IDA-provided colorizer, that is returned as result of the first call to set_nav_colorizer().

This is a trivial trampoline, so that SWIG can generate a wrapper that will do the types checking.

Returns: uint32

set_dock_pos(src_ctrl, dest_ctrl, orient, left=0, top=0, right=0, bottom=0)

 
Sets the dock orientation of a window relatively to another window.

@param src: Source docking control
@param dest: Destination docking control
@param orient: One of DOR_XXXX constants
@param left, top, right, bottom: These parameter if DOR_FLOATING is used, or if you want to specify the width of docked windows
@return: Boolean

Example:
    set_dock_pos('Structures', 'Enums', DOR_RIGHT) <- docks the Structures window to the right of Enums window

Returns: bool

read_selection(v, p1, p2)

 

Read the user selection, and store its information in p0 (from) and p1 (to).

This can be used as follows:

>>> p0 = idaapi.twinpos_t()
p1 = idaapi.twinpos_t()
view = idaapi.get_current_viewer()
idaapi.read_selection(view, p0, p1)

At that point, p0 and p1 hold information for the selection. But, the 'at' property of p0 and p1 is not properly typed. To specialize it, call #place() on it, passing it the view they were retrieved from. Like so:

>>> place0 = p0.place(view)
place1 = p1.place(view)

This will effectively "cast" the place into a specialized type, holding proper information, depending on the view type (e.g., disassembly, structures, enums, ...)

Parameters:
  • view - The view to retrieve the selection for.
  • p0 - Storage for the "from" part of the selection.
  • p1 - Storage for the "to" part of the selection.
Returns: bool
a bool value indicating success.

load_custom_icon(file_name=None, data=None, format=None)

 

Loads a custom icon and returns an identifier that can be used with other APIs

If file_name is passed then the other two arguments are ignored.

Parameters:
  • file_name - The icon file name
  • data - The icon data
  • format - The icon data format
Returns:
Icon id or 0 on failure. Use free_custom_icon() to free it

ask_form(*args)

 

Calls ask_form()

Returns:
1 = ok, 0 = cancel