rofi 1.7.8
|
Go to the source code of this file.
Data Structures | |
struct | rofi_mode |
Macros | |
#define | ABI_VERSION 7u |
Typedefs | |
typedef void(* | _mode_free) (Mode *data) |
typedef char *(* | _mode_get_display_value) (const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry) |
typedef cairo_surface_t *(* | _mode_get_icon) (const Mode *sw, unsigned int selected_line, unsigned int height) |
typedef char *(* | _mode_get_completion) (const Mode *sw, unsigned int selected_line) |
typedef int(* | _mode_token_match) (const Mode *data, rofi_int_matcher **tokens, unsigned int index) |
typedef int(* | __mode_init) (Mode *sw) |
typedef unsigned int(* | __mode_get_num_entries) (const Mode *sw) |
typedef void(* | __mode_destroy) (Mode *sw) |
typedef ModeMode(* | _mode_result) (Mode *sw, int menu_retv, char **input, unsigned int selected_line) |
typedef char *(* | _mode_preprocess_input) (Mode *sw, const char *input) |
typedef char *(* | _mode_get_message) (const Mode *sw) |
typedef Mode *(* | _mode_create) (void) |
typedef ModeMode(* | _mode_completer_result) (Mode *sw, int menu_retv, char **input, unsigned int selected_line, char **path) |
Enumerations | |
enum | ModeType { MODE_TYPE_UNSET = 0x0 , MODE_TYPE_SWITCHER = 0x1 , MODE_TYPE_COMPLETER = 0x2 , MODE_TYPE_DMENU = 0x4 } |
#define ABI_VERSION 7u |
ABI version to check if loaded plugin is compatible.
Definition at line 35 of file mode-private.h.
Referenced by rofi_collectmodes_dir().
typedef void(* __mode_destroy) (Mode *sw) |
sw | The Mode pointer |
Destroy the current mode. Still ready to restart.
Definition at line 135 of file mode-private.h.
typedef unsigned int(* __mode_get_num_entries) (const Mode *sw) |
sw | The Mode pointer |
Get the number of entries.
Definition at line 127 of file mode-private.h.
typedef int(* __mode_init) (Mode *sw) |
sw | The Mode pointer |
Initialize the mode.
Definition at line 118 of file mode-private.h.
typedef ModeMode(* _mode_completer_result) (Mode *sw, int menu_retv, char **input, unsigned int selected_line, char **path) |
sw | The Mode pointer |
menu_retv | The return value |
input | The input string |
selected_line | The selected line |
path | the path that was completed |
Handle the user accepting an entry in completion mode.
Definition at line 188 of file mode-private.h.
typedef Mode *(* _mode_create) (void) |
Create a new instance of this mode. Free (free) result after use, after using mode_destroy.
Definition at line 175 of file mode-private.h.
typedef void(* _mode_free) (Mode *data) |
data | Pointer to Mode object. |
Mode free function.
Definition at line 57 of file mode-private.h.
typedef char *(* _mode_get_completion) (const Mode *sw, unsigned int selected_line) |
sw | The Mode pointer |
selected_line | The selected line |
Obtains the string to complete.
Definition at line 96 of file mode-private.h.
typedef char *(* _mode_get_display_value) (const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry) |
sw | The Mode pointer |
selected_line | The selected line |
state | The state to display [out] |
attribute_list | List of extra (pango) attribute to apply when displaying. [out][null] |
get_entry | if it should only return the state |
Get the value for displaying.
Definition at line 71 of file mode-private.h.
typedef cairo_surface_t *(* _mode_get_icon) (const Mode *sw, unsigned int selected_line, unsigned int height) |
sw | The Mode pointer |
selected_line | The selected line |
height | The height of the icon |
Obtains the icon if available
Definition at line 84 of file mode-private.h.
typedef char *(* _mode_get_message) (const Mode *sw) |
sw | The Mode pointer |
Message to show in the message bar.
Definition at line 167 of file mode-private.h.
typedef char *(* _mode_preprocess_input) (Mode *sw, const char *input) |
sw | The Mode pointer |
input | The input string |
Preprocess the input for sorting.
Definition at line 158 of file mode-private.h.
typedef ModeMode(* _mode_result) (Mode *sw, int menu_retv, char **input, unsigned int selected_line) |
sw | The Mode pointer |
menu_retv | The return value |
input | The input string |
selected_line | The selected line |
Handle the user accepting an entry.
Definition at line 147 of file mode-private.h.
typedef int(* _mode_token_match) (const Mode *data, rofi_int_matcher **tokens, unsigned int index) |
data | The Mode pointer |
tokens | List of (input) tokens to match. |
index | The current selected index. |
Function prototype for the matching algorithm.
Definition at line 108 of file mode-private.h.
enum ModeType |
Indicator what type of mode this is. For now it can be the classic switcher, or also implement a completer.
Enumerator | |
---|---|
MODE_TYPE_UNSET | Mode type is not set |
MODE_TYPE_SWITCHER | A normal mode. |
MODE_TYPE_COMPLETER | A mode that can be used to completer |
MODE_TYPE_DMENU | DMenu mode. |
Definition at line 41 of file mode-private.h.