rofi 1.7.9
theme.h
Go to the documentation of this file.
1/*
2 * rofi
3 *
4 * MIT/X11 License
5 * Copyright © 2013-2023 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 THEME_H
29#define THEME_H
30#include "rofi-types.h"
31#include <cairo.h>
32#include <glib.h>
33#include <widgets/widget.h>
34
39
44
49
59 const char *name);
60
67
75
84
91
100Property *rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *);
107
115gboolean rofi_theme_parse_file(const char *file);
116
124gboolean rofi_theme_parse_string(const char *string);
125
132void rofi_theme_widget_add_properties(ThemeWidget *widget, GHashTable *table);
133
137
147RofiDistance rofi_theme_get_distance(const widget *widget, const char *property,
148 int def);
149
159int rofi_theme_get_integer(const widget *widget, const char *property, int def);
160
170int rofi_theme_get_position(const widget *widget, const char *property,
171 int def);
172
182int rofi_theme_get_boolean(const widget *widget, const char *property, int def);
183
194 const char *property,
195 RofiOrientation def);
196
207 const char *property,
208 RofiCursorType def);
218const char *rofi_theme_get_string(const widget *widget, const char *property,
219 const char *def);
220
230double rofi_theme_get_double(const widget *widget, const char *property,
231 double def);
232
241void rofi_theme_get_color(const widget *widget, const char *property,
242 cairo_t *d);
243
253gboolean rofi_theme_get_image(const widget *widget, const char *property,
254 cairo_t *d);
255
263gboolean rofi_theme_has_property(const widget *widget, const char *property);
264
274RofiPadding rofi_theme_get_padding(const widget *widget, const char *property,
275 RofiPadding pad);
276
287 const char *property,
289
304void distance_get_linestyle(RofiDistance d, cairo_t *draw);
305
320ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
321 gboolean exact);
322
326void rofi_theme_reset(void);
327
335char *rofi_theme_parse_prepare_file(const char *file);
336
341
346
354
361
368
374int rofi_theme_rasi_validate(const char *filename);
375
381
388
398GList *rofi_theme_get_list_distance(const widget *widget, const char *property);
399
409GList *rofi_theme_get_list_strings(const widget *widget, const char *property);
410#endif
struct _widget widget
Definition widget.h:51
ThemeMediaType
Definition rofi-types.h:299
PropertyType
Definition rofi-types.h:10
RofiOrientation
Definition rofi-types.h:139
RofiCursorType
Definition rofi-types.h:147
RofiPadding rofi_theme_get_padding(const widget *widget, const char *property, RofiPadding pad)
Definition theme.c:1207
ThemeWidget * rofi_theme_find_or_create_name(ThemeWidget *base, const char *name)
Definition theme.c:81
gboolean rofi_theme_get_image(const widget *widget, const char *property, cairo_t *d)
Definition theme.c:1173
GList * rofi_theme_get_list_strings(const widget *widget, const char *property)
Definition theme.c:1259
void rofi_theme_free_parsed_files(void)
Definition theme.c:54
gboolean rofi_theme_parse_string(const char *string)
Property * rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *)
Definition theme.c:131
const char * rofi_theme_get_string(const widget *widget, const char *property, const char *def)
Definition theme.c:987
RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def)
Definition theme.c:875
int rofi_theme_get_boolean(const widget *widget, const char *property, int def)
Definition theme.c:901
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
Definition theme.c:1405
void rofi_theme_parse_process_links(void)
Definition theme.c:1598
RofiCursorType rofi_theme_get_cursor_type(const widget *widget, const char *property, RofiCursorType def)
Definition theme.c:960
void rofi_theme_parse_process_conditionals(void)
Definition theme.c:1602
void rofi_theme_get_color(const widget *widget, const char *property, cairo_t *d)
Definition theme.c:1065
RofiHighlightColorStyle rofi_theme_get_highlight(widget *widget, const char *property, RofiHighlightColorStyle th)
Definition theme.c:1309
int rofi_theme_rasi_validate(const char *filename)
Definition rofi.c:1245
RofiOrientation rofi_theme_get_orientation(const widget *widget, const char *property, RofiOrientation def)
Definition theme.c:929
Property * rofi_theme_property_create(PropertyType type)
Definition theme.c:101
ThemeMediaType rofi_theme_parse_media_type(const char *type)
Definition theme.c:1608
void rofi_theme_widget_add_properties(ThemeWidget *widget, GHashTable *table)
Definition theme.c:654
double rofi_theme_get_double(const widget *widget, const char *property, double def)
Definition theme.c:1038
int rofi_theme_get_integer(const widget *widget, const char *property, int def)
Definition theme.c:840
void rofi_theme_print(ThemeWidget *widget)
Definition theme.c:593
gboolean rofi_theme_parse_file(const char *file)
char * rofi_theme_parse_prepare_file(const char *file)
Definition theme.c:1418
gboolean rofi_theme_has_property(const widget *widget, const char *property)
Definition theme.c:1654
ThemeWidget * rofi_theme
Definition theme.h:43
void rofi_theme_reset(void)
Definition theme.c:234
void rofi_theme_parse_merge_widgets(ThemeWidget *parent, ThemeWidget *child)
Definition theme.c:1429
ThemeWidget * rofi_theme_find_widget(const char *name, const char *state, gboolean exact)
Definition theme.c:788
int rofi_theme_get_position(const widget *widget, const char *property, int def)
Definition theme.c:816
GList * rofi_theme_get_list_distance(const widget *widget, const char *property)
Definition theme.c:1233
void rofi_theme_print_index(ThemeWidget *widget, int index)
Definition theme.c:533
void rofi_theme_free(ThemeWidget *widget)
Definition theme.c:240
RofiDistance rofi_theme_property_copy_distance(RofiDistance const distance)
Definition theme.c:119
void rofi_theme_property_free(Property *p)
Definition theme.c:203
void rofi_theme_print_parsed_files(int is_term)
void distance_get_linestyle(RofiDistance d, cairo_t *draw)
Definition theme.c:1409
ThemeWidget * rofi_configuration
Definition xrmoptions.c:46