rofi  1.5.4
mode-private.h
Go to the documentation of this file.
1 /*
2  * rofi
3  *
4  * MIT/X11 License
5  * Copyright © 2013-2017 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 <gmodule.h>
31 G_BEGIN_DECLS
32 
34 #define ABI_VERSION 0x00000006
35 
41 typedef void ( *_mode_free )( Mode *data );
42 
54 typedef char * ( *_mode_get_display_value )( const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry );
55 
64 typedef cairo_surface_t * ( *_mode_get_icon )( const Mode *sw, unsigned int selected_line, int height );
65 
74 typedef char * ( *_mode_get_completion )( const Mode *sw, unsigned int selected_line );
75 
87 typedef int ( *_mode_token_match )( const Mode *data, rofi_int_matcher **tokens, unsigned int index );
88 
96 typedef int ( *__mode_init )( Mode *sw );
97 
105 typedef unsigned int ( *__mode_get_num_entries )( const Mode *sw );
106 
113 typedef void ( *__mode_destroy )( Mode *sw );
114 
125 typedef ModeMode ( *_mode_result )( Mode *sw, int menu_retv, char **input, unsigned int selected_line );
126 
135 typedef char* ( *_mode_preprocess_input )( Mode *sw, const char *input );
136 
144 typedef char * ( *_mode_get_message )( const Mode *sw );
145 
151 struct rofi_mode
152 {
154  unsigned int abi_version;
156  char *name;
157  char cfg_name_key[128];
159 
179 
181 
183 
186 
194  void *ed;
195 
197  GModule *module;
198 };
199 G_END_DECLS
200 #endif // ROFI_MODE_PRIVATE_H
_mode_free
void(* _mode_free)(Mode *data)
Definition: mode-private.h:41
_mode_token_match
int(* _mode_token_match)(const Mode *data, rofi_int_matcher **tokens, unsigned int index)
Definition: mode-private.h:87
rofi_mode::name
char * name
Definition: mode-private.h:156
_mode_get_icon
cairo_surface_t *(* _mode_get_icon)(const Mode *sw, unsigned int selected_line, int height)
Definition: mode-private.h:64
rofi_mode::_init
__mode_init _init
Definition: mode-private.h:164
rofi_int_matcher_t
Definition: rofi-types.h:235
rofi_mode::ed
void * ed
Definition: mode-private.h:194
rofi_mode::_token_match
_mode_token_match _token_match
Definition: mode-private.h:172
rofi_mode::_get_icon
_mode_get_icon _get_icon
Definition: mode-private.h:176
rofi_mode::_preprocess_input
_mode_preprocess_input _preprocess_input
Definition: mode-private.h:180
_mode_get_display_value
char *(* _mode_get_display_value)(const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
Definition: mode-private.h:54
rofi_mode::free
_mode_free free
Definition: mode-private.h:192
__mode_destroy
void(* __mode_destroy)(Mode *sw)
Definition: mode-private.h:113
rofi_mode
Definition: mode-private.h:152
rofi_mode::private_data
void * private_data
Definition: mode-private.h:185
rofi_mode::abi_version
unsigned int abi_version
Definition: mode-private.h:154
rofi_mode::_destroy
__mode_destroy _destroy
Definition: mode-private.h:166
rofi_mode::display_name
char * display_name
Definition: mode-private.h:158
rofi_mode::_get_display_value
_mode_get_display_value _get_display_value
Definition: mode-private.h:174
__mode_get_num_entries
unsigned int(* __mode_get_num_entries)(const Mode *sw)
Definition: mode-private.h:105
_mode_get_message
char *(* _mode_get_message)(const Mode *sw)
Definition: mode-private.h:144
_mode_result
ModeMode(* _mode_result)(Mode *sw, int menu_retv, char **input, unsigned int selected_line)
Definition: mode-private.h:125
ModeMode
ModeMode
Definition: mode.h:50
__mode_init
int(* __mode_init)(Mode *sw)
Definition: mode-private.h:96
rofi_mode::module
GModule * module
Definition: mode-private.h:197
_mode_preprocess_input
char *(* _mode_preprocess_input)(Mode *sw, const char *input)
Definition: mode-private.h:135
rofi_mode::cfg_name_key
char cfg_name_key[128]
Definition: mode-private.h:157
_mode_get_completion
char *(* _mode_get_completion)(const Mode *sw, unsigned int selected_line)
Definition: mode-private.h:74
rofi_mode::_result
_mode_result _result
Definition: mode-private.h:170
rofi_mode::_get_completion
_mode_get_completion _get_completion
Definition: mode-private.h:178
rofi_mode::_get_message
_mode_get_message _get_message
Definition: mode-private.h:182
rofi_mode::_get_num_entries
__mode_get_num_entries _get_num_entries
Definition: mode-private.h:168