Latest available version: IDA and decompilers v8.4.240215 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
cli_t Struct Reference

Command line interpreter. More...

#include <kernwin.hpp>

Public Attributes

size_t size
 size of this structure
 
int32 flags
 CLI attributes
 
const char * sname
 short name (displayed on the button)
 
const char * lname
 long name (displayed in the menu)
 
const char * hint
 hint for the input line
 
bool(idaapi * execute_line )(const char *line)
 Callback: the user pressed Enter. More...
 
void * unused
 
bool(idaapi * keydown )(qstring *line, int *p_x, int *p_sellen, int *p_vk_key, int shift)
 Callback: a keyboard key has been pressed. More...
 
bool(idaapi * find_completions )(qstrvec_t *out_completions, int *out_match_start, int *out_match_end, const char *line, int x)
 Callback: the user pressed Tab/Shift+Tab. More...
 

Detailed Description

Command line interpreter.

Provides functionality for the command line (located at the bottom of the main window). Only GUI version of IDA supports CLIs.

Member Data Documentation

◆ execute_line

bool(idaapi * cli_t::execute_line) (const char *line)

Callback: the user pressed Enter.

CLI is free to execute the line immediately or ask for more lines.

Parameters
linecommand to execute (utf-8-encoded)
Return values
trueexecuted line
falseask for more lines

◆ keydown

bool(idaapi * cli_t::keydown) (qstring *line, int *p_x, int *p_sellen, int *p_vk_key, int shift)

Callback: a keyboard key has been pressed.

This callback is optional. It is a generic callback and the CLI is free to do whatever it wants.

Parameters
linecurrent input line (in/out argument)
p_xpointer to current x coordinate of the cursor (in/out)
p_sellenpointer to current selection length (usually 0)
p_vk_keypointer to virtual key code (in/out). if the key has been handled, it should be reset to 0 by CLI
shiftshift state
Return values
truemodified input line or x coordinate or selection length
falseotherwise

◆ find_completions

bool(idaapi * cli_t::find_completions) (qstrvec_t *out_completions, int *out_match_start, int *out_match_end, const char *line, int x)

Callback: the user pressed Tab/Shift+Tab.

This callback is optional.

Parameters
[out]out_completionsresults of completion
[out]out_match_startthe codepoint index in the line, where match starts
[out]out_match_endthe codepoint index in the line, where ends ends
linecommand line
xcodepoint index of the cursor in line
Return values
truegot results
falseotherwise

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