rofi  1.5.1
rofi.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_MAIN_H
29 #define ROFI_MAIN_H
30 #include <xcb/xcb.h>
31 #include <xkbcommon/xkbcommon.h>
32 #include <glib.h>
33 #include <string.h>
34 #include <stdlib.h>
35 #include "rofi-types.h"
36 #include "keyb.h"
37 #include "mode.h"
38 #include "view.h"
39 
48 extern const char *cache_dir;
49 
55 unsigned int rofi_get_num_enabled_modi ( void );
56 
64 const Mode * rofi_get_mode ( unsigned int index );
65 
71 void rofi_add_error_message ( GString *str );
72 
79 void rofi_set_return_code ( int code );
80 
81 void rofi_quit_main_loop ( void );
82 
88 Mode * rofi_collect_modi_search ( const char *name );
90 #define color_reset "\033[0m"
91 
92 #define color_bold "\033[1m"
93 
94 #define color_italic "\033[2m"
95 
96 #define color_green "\033[0;32m"
97 
98 #define color_red "\033[0;31m"
99 
101 #define ERROR_MSG( a ) a "\n" \
102  "If you suspect this is caused by a bug in rofi,\n" \
103  "please report the following information to rofi's github page:\n" \
104  " * The generated commandline output when the error occored.\n" \
105  " * Output of -dump-xresource\n" \
106  " * Steps to reproduce\n" \
107  " * The version of rofi you are running\n\n" \
108  " <i>https://github.com/DaveDavenport/rofi/</i>"
109 
110 #define ERROR_MSG_MARKUP TRUE
111 
112 #endif
const char * cache_dir
Definition: rofi.c:80
void rofi_quit_main_loop(void)
Definition: rofi.c:621
void rofi_set_return_code(int code)
Definition: rofi.c:118
unsigned int rofi_get_num_enabled_modi(void)
Definition: rofi.c:123
Mode * rofi_collect_modi_search(const char *name)
Definition: rofi.c:456
void rofi_add_error_message(GString *str)
Definition: rofi.c:86
const Mode * rofi_get_mode(unsigned int index)
Definition: rofi.c:128