rofi 1.7.5
|
Typedefs | |
typedef struct rofi_mode | Mode |
Enumerations | |
enum | ModeMode { MODE_EXIT = 1000 , NEXT_DIALOG = 1001 , RELOAD_DIALOG = 1002 , PREVIOUS_DIALOG = 1003 , RESET_DIALOG = 1004 } |
enum | MenuReturn { MENU_OK = 0x00010000 , MENU_CANCEL = 0x00020000 , MENU_NEXT = 0x00040000 , MENU_CUSTOM_INPUT = 0x00080000 , MENU_ENTRY_DELETE = 0x00100000 , MENU_QUICK_SWITCH = 0x00200000 , MENU_CUSTOM_COMMAND = 0x00800000 , MENU_PREVIOUS = 0x00400000 , MENU_COMPLETE = 0x01000000 , MENU_CUSTOM_ACTION = 0x10000000 , MENU_LOWER_MASK = 0x0000FFFF } |
Functions | |
void | mode_destroy (Mode *mode) |
unsigned int | mode_get_num_entries (const Mode *mode) |
char * | mode_get_display_value (const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry) |
cairo_surface_t * | mode_get_icon (Mode *mode, unsigned int selected_line, unsigned int height) |
char * | mode_get_completion (const Mode *mode, unsigned int selected_line) |
ModeMode | mode_result (Mode *mode, int menu_retv, char **input, unsigned int selected_line) |
int | mode_token_match (const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line) |
const char * | mode_get_name (const Mode *mode) |
void | mode_free (Mode **mode) |
void * | mode_get_private_data (const Mode *mode) |
void | mode_set_private_data (Mode *mode, void *pd) |
const char * | mode_get_display_name (const Mode *mode) |
void | mode_set_config (Mode *mode) |
char * | mode_preprocess_input (Mode *mode, const char *input) |
char * | mode_get_message (const Mode *mode) |
int | mode_init (Mode *mode) |
The 'object' that makes a mode in rofi.
enum MenuReturn |
State returned by the rofi window.
enum ModeMode |
void mode_destroy | ( | Mode * | mode | ) |
mode | The mode to destroy |
Destroy the mode
Definition at line 52 of file mode.c.
References rofi_mode::_destroy.
Referenced by cleanup(), combi_mode_destroy(), dmenu_finish(), and run_mode_destroy().
void mode_free | ( | Mode ** | mode | ) |
mode | The mode to query |
Free the resources allocated for this mode.
Definition at line 150 of file mode.c.
Referenced by rofi_collectmodes_destroy().
char * mode_get_completion | ( | const Mode * | mode, |
unsigned int | selected_line ) |
mode | The mode to query |
selected_line | The entry to query |
Return a string that can be used for completion. It has should have no markup.
Definition at line 109 of file mode.c.
References rofi_mode::_get_completion, and rofi_mode::_get_display_value.
Referenced by combi_get_completion(), filter_elements(), and rofi_view_nav_row_select().
const char * mode_get_display_name | ( | const Mode * | mode | ) |
mode | The mode to query |
Get the name of the mode as it should be presented to the user.
Find the widget
Check string property
Definition at line 172 of file mode.c.
References rofi_mode::display_name, rofi_mode::name, P_STRING, rofi_config_find_widget(), rofi_theme_find_property(), _PropertyValue::s, Property::type, and Property::value.
Referenced by combi_mgrv(), rofi_view_add_widget(), rofi_view_create(), rofi_view_switch_mode(), and rofi_view_update_prompt().
char * mode_get_display_value | ( | const Mode * | mode, |
unsigned int | selected_line, | ||
int * | state, | ||
GList ** | attribute_list, | ||
int | get_entry ) |
mode | The mode to query |
selected_line | The entry to query |
state | The state of the entry [out] |
attribute_list | List of extra (pango) attribute to apply when displaying. [out][null] |
get_entry | If the should be returned. |
Returns the string as it should be displayed for the entry and the state of how it should be displayed.
Definition at line 64 of file mode.c.
References rofi_mode::_get_display_value.
Referenced by combi_mgrv(), selection_changed_callback(), and update_callback().
cairo_surface_t * mode_get_icon | ( | Mode * | mode, |
unsigned int | selected_line, | ||
unsigned int | height ) |
mode | The mode to query |
selected_line | The entry to query |
height | The desired height of the icon. |
Returns the icon for the selected_line
Load user entires
Definition at line 75 of file mode.c.
References rofi_mode::_get_icon, rofi_mode::fallback_icon_fetch_uid, rofi_mode::fallback_icon_not_found, rofi_mode::name, P_STRING, rofi_config_find_widget(), rofi_icon_fetcher_get(), rofi_icon_fetcher_query(), rofi_theme_find_property(), _PropertyValue::s, Property::type, and Property::value.
Referenced by combi_get_icon(), selection_changed_callback(), and update_callback().
char * mode_get_message | ( | const Mode * | mode | ) |
mode | The mode to query |
Query the mode for a user display.
Definition at line 201 of file mode.c.
References rofi_mode::_get_message.
Referenced by rofi_view_reload_message_bar(), and run_get_message().
const char * mode_get_name | ( | const Mode * | mode | ) |
mode | The mode to query |
Get the name of the mode.
Definition at line 145 of file mode.c.
References rofi_mode::name.
Referenced by combi_get_completion(), combi_mode_result(), combi_preprocess_input(), and mode_lookup().
unsigned int mode_get_num_entries | ( | const Mode * | mode | ) |
mode | The mode to query |
Get the number of entries in the mode.
Definition at line 58 of file mode.c.
References rofi_mode::_get_num_entries.
Referenced by _rofi_view_reload_row(), combi_mode_get_num_entries(), rofi_view_create(), and rofi_view_reload_idle().
void * mode_get_private_data | ( | const Mode * | mode | ) |
mode | The mode to query |
Helper functions for mode. Get the private data object.
Definition at line 159 of file mode.c.
References rofi_mode::private_data.
Referenced by _get_completion(), _get_display_value(), _get_display_value(), _get_display_value(), _get_icon(), _get_icon(), _get_message(), combi_get_completion(), combi_get_icon(), combi_mgrv(), combi_mode_destroy(), combi_mode_get_num_entries(), combi_mode_init(), combi_mode_match(), combi_mode_parse_switchers(), combi_mode_result(), combi_preprocess_input(), dmenu_get_completion_data(), dmenu_get_icon(), dmenu_get_message(), dmenu_mode_free(), dmenu_mode_get_num_entries(), dmenu_mode_init(), dmenu_token_match(), file_browser_mode_completer(), file_browser_mode_destroy(), file_browser_mode_get_num_entries(), file_browser_mode_init(), file_browser_mode_init_current_dir(), file_browser_mode_result(), file_browser_token_match(), get_display_data(), get_file_browser(), help_keys_mode_destroy(), help_keys_mode_get_num_entries(), help_keys_mode_init(), help_keys_token_match(), script_get_icon(), ssh_mode_destroy(), ssh_mode_get_num_entries(), ssh_mode_init(), ssh_mode_result(), and ssh_token_match().
int mode_init | ( | Mode * | mode | ) |
mode | The mode to initialize |
Initialize mode
Definition at line 43 of file mode.c.
References rofi_mode::_init, rofi_mode::fallback_icon_fetch_uid, and rofi_mode::fallback_icon_not_found.
Referenced by combi_mode_init(), dmenu_mode_dialog(), run_mode_index(), and run_mode_result().
char * mode_preprocess_input | ( | Mode * | mode, |
const char * | input ) |
mode | The mode to query |
input | The input to process |
This processes the input so it can be used for matching and sorting. This includes removing pango markup.
Definition at line 195 of file mode.c.
References rofi_mode::_preprocess_input.
Referenced by rofi_view_refilter_real().
mode | The mode to query |
menu_retv | The menu return value. |
input | Pointer to the user input string. [in][out] |
selected_line | the line selected by the user. |
Acts on the user interaction.
Definition at line 119 of file mode.c.
References rofi_mode::_result, MENU_LOWER_MASK, MENU_NEXT, MENU_PREVIOUS, MENU_QUICK_SWITCH, NEXT_DIALOG, and PREVIOUS_DIALOG.
Referenced by combi_mode_result(), and process_result().
void mode_set_config | ( | Mode * | mode | ) |
mode | The mode to query |
Should be called once for each mode. This adds the display-name configuration option for the mode.
Definition at line 188 of file mode.c.
References rofi_mode::cfg_name_key, config_parser_add_option(), rofi_mode::display_name, rofi_mode::name, and xrm_String.
Referenced by add_mode(), and rofi_collectmodes_setup().
void mode_set_private_data | ( | Mode * | mode, |
void * | pd ) |
mode | The mode to query |
pd | Pointer to private data to attach to the mode. |
Helper functions for mode. Set the private data object.
Definition at line 164 of file mode.c.
References rofi_mode::private_data.
Referenced by combi_mode_destroy(), combi_mode_init(), dmenu_mode_free(), dmenu_mode_init(), file_browser_mode_destroy(), file_browser_mode_init(), help_keys_mode_destroy(), help_keys_mode_init(), ssh_mode_destroy(), and ssh_mode_init().
int mode_token_match | ( | const Mode * | mode, |
rofi_int_matcher ** | tokens, | ||
unsigned int | selected_line ) |
mode | The mode to query |
tokens | The set of tokens to match against |
selected_line | The index of the entry to match |
Match entry against the set of tokens.
Definition at line 138 of file mode.c.
References rofi_mode::_token_match.
Referenced by combi_mode_match(), and filter_elements().