rofi 1.7.5
mode-private.h
Go to the documentation of this file.
1/*
2 * rofi
3 *
4 * MIT/X11 License
5 * Copyright © 2013-2022 Qball Cow <qball@gmpclient.org>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 */
27
28#ifndef ROFI_MODE_PRIVATE_H
29#define ROFI_MODE_PRIVATE_H
30#include "mode.h"
31#include <gmodule.h>
32G_BEGIN_DECLS
33
35#define ABI_VERSION 6u
36
42typedef void (*_mode_free)(Mode *data);
43
56typedef char *(*_mode_get_display_value)(const Mode *sw,
57 unsigned int selected_line, int *state,
58 GList **attribute_list, int get_entry);
59
69typedef cairo_surface_t *(*_mode_get_icon)(const Mode *sw,
70 unsigned int selected_line,
71 unsigned int height);
72
81typedef char *(*_mode_get_completion)(const Mode *sw,
82 unsigned int selected_line);
83
93typedef int (*_mode_token_match)(const Mode *data, rofi_int_matcher **tokens,
94 unsigned int index);
95
103typedef int (*__mode_init)(Mode *sw);
104
112typedef unsigned int (*__mode_get_num_entries)(const Mode *sw);
113
120typedef void (*__mode_destroy)(Mode *sw);
121
132typedef ModeMode (*_mode_result)(Mode *sw, int menu_retv, char **input,
133 unsigned int selected_line);
134
143typedef char *(*_mode_preprocess_input)(Mode *sw, const char *input);
144
152typedef char *(*_mode_get_message)(const Mode *sw);
153
159struct rofi_mode {
161 unsigned int abi_version;
163 char *name;
164 char cfg_name_key[128];
166
186
188
190
193
201 void *ed;
202
204 GModule *module;
205
209};
210G_END_DECLS
211#endif // ROFI_MODE_PRIVATE_H
ModeMode
Definition: mode.h:49
void(* _mode_free)(Mode *data)
Definition: mode-private.h:42
char *(* _mode_get_message)(const Mode *sw)
Definition: mode-private.h:152
int(* _mode_token_match)(const Mode *data, rofi_int_matcher **tokens, unsigned int index)
Definition: mode-private.h:93
char *(* _mode_get_completion)(const Mode *sw, unsigned int selected_line)
Definition: mode-private.h:81
unsigned int(* __mode_get_num_entries)(const Mode *sw)
Definition: mode-private.h:112
char *(* _mode_get_display_value)(const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
Definition: mode-private.h:56
int(* __mode_init)(Mode *sw)
Definition: mode-private.h:103
char *(* _mode_preprocess_input)(Mode *sw, const char *input)
Definition: mode-private.h:143
cairo_surface_t *(* _mode_get_icon)(const Mode *sw, unsigned int selected_line, unsigned int height)
Definition: mode-private.h:69
ModeMode(* _mode_result)(Mode *sw, int menu_retv, char **input, unsigned int selected_line)
Definition: mode-private.h:132
void(* __mode_destroy)(Mode *sw)
Definition: mode-private.h:120
_mode_result _result
Definition: mode-private.h:177
__mode_get_num_entries _get_num_entries
Definition: mode-private.h:175
__mode_destroy _destroy
Definition: mode-private.h:173
_mode_preprocess_input _preprocess_input
Definition: mode-private.h:187
char * display_name
Definition: mode-private.h:165
_mode_free free
Definition: mode-private.h:199
unsigned int abi_version
Definition: mode-private.h:161
_mode_token_match _token_match
Definition: mode-private.h:179
uint32_t fallback_icon_fetch_uid
Definition: mode-private.h:207
_mode_get_display_value _get_display_value
Definition: mode-private.h:181
_mode_get_icon _get_icon
Definition: mode-private.h:183
_mode_get_completion _get_completion
Definition: mode-private.h:185
char cfg_name_key[128]
Definition: mode-private.h:164
GModule * module
Definition: mode-private.h:204
void * ed
Definition: mode-private.h:201
uint32_t fallback_icon_not_found
Definition: mode-private.h:208
__mode_init _init
Definition: mode-private.h:171
char * name
Definition: mode-private.h:163
_mode_get_message _get_message
Definition: mode-private.h:189
void * private_data
Definition: mode-private.h:192