rofi 2.0.0
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
54 const char *name);
55
62
70
79
86
95Property *rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *);
102
110gboolean rofi_theme_parse_file(const char *file);
111
119gboolean rofi_theme_parse_string(const char *string);
120
127void rofi_theme_widget_add_properties(ThemeWidget *widget, GHashTable *table);
128
132
142RofiDistance rofi_theme_get_distance(const widget *widget, const char *property,
143 int def);
144
154int rofi_theme_get_integer(const widget *widget, const char *property, int def);
155
165int rofi_theme_get_position(const widget *widget, const char *property,
166 int def);
167
177int rofi_theme_get_boolean(const widget *widget, const char *property, int def);
178
189 const char *property,
190 RofiOrientation def);
191
202 const char *property,
203 RofiCursorType def);
213const char *rofi_theme_get_string(const widget *widget, const char *property,
214 const char *def);
215
225double rofi_theme_get_double(const widget *widget, const char *property,
226 double def);
227
236void rofi_theme_get_color(const widget *widget, const char *property,
237 cairo_t *d);
238
248gboolean rofi_theme_get_image(const widget *widget, const char *property,
249 cairo_t *d);
250
258gboolean rofi_theme_has_property(const widget *widget, const char *property);
259
269RofiPadding rofi_theme_get_padding(const widget *widget, const char *property,
270 RofiPadding pad);
271
282 const char *property,
284
299void distance_get_linestyle(RofiDistance d, cairo_t *draw);
300
315ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
316 gboolean exact);
317
321void rofi_theme_reset(void);
322
330char *rofi_theme_parse_prepare_file(const char *file);
331
336
341
349
356
363
369int rofi_theme_rasi_validate(const char *filename);
370
376
383
393GList *rofi_theme_get_list_distance(const widget *widget, const char *property);
394
404GList *rofi_theme_get_list_strings(const widget *widget, const char *property);
405
409typedef guint (*disp_scale_func)(void);
410
418#endif
struct _widget widget
Definition widget.h:49
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:1208
ThemeWidget * rofi_theme_find_or_create_name(ThemeWidget *base, const char *name)
Definition theme.c:83
gboolean rofi_theme_get_image(const widget *widget, const char *property, cairo_t *d)
Definition theme.c:1174
GList * rofi_theme_get_list_strings(const widget *widget, const char *property)
Definition theme.c:1260
void rofi_theme_free_parsed_files(void)
Definition theme.c:56
gboolean rofi_theme_parse_string(const char *string)
Property * rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *)
Definition theme.c:133
const char * rofi_theme_get_string(const widget *widget, const char *property, const char *def)
Definition theme.c:989
RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def)
Definition theme.c:877
int rofi_theme_get_boolean(const widget *widget, const char *property, int def)
Definition theme.c:903
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
Definition theme.c:1406
guint(* disp_scale_func)(void)
Definition theme.h:409
void rofi_theme_parse_process_links(void)
Definition theme.c:1599
RofiCursorType rofi_theme_get_cursor_type(const widget *widget, const char *property, RofiCursorType def)
Definition theme.c:962
void rofi_theme_parse_process_conditionals(void)
Definition theme.c:1603
void rofi_theme_get_color(const widget *widget, const char *property, cairo_t *d)
Definition theme.c:1067
RofiHighlightColorStyle rofi_theme_get_highlight(widget *widget, const char *property, RofiHighlightColorStyle th)
Definition theme.c:1310
int rofi_theme_rasi_validate(const char *filename)
Definition rofi.c:1346
RofiOrientation rofi_theme_get_orientation(const widget *widget, const char *property, RofiOrientation def)
Definition theme.c:931
Property * rofi_theme_property_create(PropertyType type)
Definition theme.c:103
ThemeMediaType rofi_theme_parse_media_type(const char *type)
Definition theme.c:1609
void rofi_theme_widget_add_properties(ThemeWidget *widget, GHashTable *table)
Definition theme.c:656
double rofi_theme_get_double(const widget *widget, const char *property, double def)
Definition theme.c:1040
ThemeWidget * rofi_theme
int rofi_theme_get_integer(const widget *widget, const char *property, int def)
Definition theme.c:842
void rofi_theme_print(ThemeWidget *widget)
Definition theme.c:595
gboolean rofi_theme_parse_file(const char *file)
char * rofi_theme_parse_prepare_file(const char *file)
Definition theme.c:1419
gboolean rofi_theme_has_property(const widget *widget, const char *property)
Definition theme.c:1655
void rofi_theme_reset(void)
Definition theme.c:236
void rofi_theme_parse_merge_widgets(ThemeWidget *parent, ThemeWidget *child)
Definition theme.c:1430
ThemeWidget * rofi_theme_find_widget(const char *name, const char *state, gboolean exact)
Definition theme.c:790
int rofi_theme_get_position(const widget *widget, const char *property, int def)
Definition theme.c:818
GList * rofi_theme_get_list_distance(const widget *widget, const char *property)
Definition theme.c:1234
void rofi_theme_print_index(ThemeWidget *widget, int index)
Definition theme.c:535
void rofi_theme_free(ThemeWidget *widget)
Definition theme.c:242
void rofi_theme_set_disp_scale_func(disp_scale_func func)
Definition theme.c:1661
RofiDistance rofi_theme_property_copy_distance(RofiDistance const distance)
Definition theme.c:121
void rofi_theme_property_free(Property *p)
Definition theme.c:205
void rofi_theme_print_parsed_files(int is_term)
void distance_get_linestyle(RofiDistance d, cairo_t *draw)
Definition theme.c:1410
ThemeWidget * rofi_configuration
Definition xrmoptions.c:42