45 g_return_val_if_fail(mode != NULL, FALSE);
46 g_return_val_if_fail(mode->
_init != NULL, FALSE);
48 g_warning(
"Mode '%s' does not have a type set. Please update mode/plugin.",
54 "Mode '%s' is incomplete and does not implement _completer_result.",
61 return mode->
_init(mode);
65 g_assert(mode != NULL);
71 g_assert(mode != NULL);
77 int *state, GList **attribute_list,
79 g_assert(mode != NULL);
80 g_assert(state != NULL);
88 unsigned int height) {
89 g_assert(mode != NULL);
92 cairo_surface_t *
icon = mode->
_get_icon(mode, selected_line, height);
102 cairo_surface_t *
icon =
122 g_assert(mode != NULL);
132 unsigned int selected_line) {
143 g_assert(mode != NULL);
144 g_assert(mode->
_result != NULL);
145 g_assert(input != NULL);
147 return mode->
_result(mode, menu_retv, input, selected_line);
151 unsigned int selected_line) {
152 g_assert(mode != NULL);
158 g_assert(mode != NULL);
163 g_assert(mode != NULL);
164 g_assert((*mode) != NULL);
165 if ((*mode)->free != NULL) {
166 (*mode)->free(*mode);
172 g_assert(mode != NULL);
177 g_assert(mode != NULL);
204 "The display name of this browser");
211 return g_strdup(input);
228 unsigned int selected_line,
char **path) {
230 g_warning(
"Trying to call completer_result on non completion mode.");
void config_parser_add_option(XrmOptionType type, const char *key, void **value, const char *comment)
Property * rofi_theme_find_property(ThemeWidget *wid, PropertyType type, const char *property, gboolean exact)
ThemeWidget * rofi_config_find_widget(const char *name, const char *state, gboolean exact)
cairo_surface_t * rofi_icon_fetcher_get(const uint32_t uid)
uint32_t rofi_icon_fetcher_query(const char *name, const int size)
void mode_destroy(Mode *mode)
const char * mode_get_name(const Mode *mode)
char * mode_preprocess_input(Mode *mode, const char *input)
int mode_init(Mode *mode)
cairo_surface_t * mode_get_icon(Mode *mode, unsigned int selected_line, unsigned int height)
const char * mode_get_display_name(const Mode *mode)
unsigned int mode_get_num_entries(const Mode *mode)
void mode_free(Mode **mode)
ModeMode mode_result(Mode *mode, int menu_retv, char **input, unsigned int selected_line)
Mode * mode_create(const Mode *mode)
gboolean mode_is_completer(const Mode *mode)
ModeMode mode_completer_result(Mode *mode, int menu_retv, char **input, unsigned int selected_line, char **path)
void * mode_get_private_data(const Mode *mode)
char * mode_get_message(const Mode *mode)
void mode_set_private_data(Mode *mode, void *pd)
int mode_token_match(const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line)
char * mode_get_display_value(const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
void mode_set_config(Mode *mode)
char * mode_get_completion(const Mode *mode, unsigned int selected_line)
struct rofi_int_matcher_t rofi_int_matcher
__mode_get_num_entries _get_num_entries
_mode_preprocess_input _preprocess_input
_mode_token_match _token_match
uint32_t fallback_icon_fetch_uid
_mode_get_display_value _get_display_value
_mode_get_completion _get_completion
uint32_t fallback_icon_not_found
_mode_completer_result _completer_result
_mode_get_message _get_message