rofi 1.7.7
|
#include "config.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "helper.h"
#include "rofi-icon-fetcher.h"
#include "rofi-types.h"
#include "rofi.h"
#include "settings.h"
#include "theme-parser.h"
#include "theme.h"
#include "view.h"
#include "widgets/textbox.h"
#include <gio/gio.h>
Go to the source code of this file.
Macros | |
#define | G_LOG_DOMAIN "Theme" |
Variables | |
GList * | parsed_config_files = NULL |
const char *const | RofiCursorTypeStr [3] |
FILE * | yyin |
#define G_LOG_DOMAIN "Theme" |
|
static |
Definition at line 75 of file theme.c.
References RofiDistance::base, RofiDistanceUnit::distance, RofiDistance::style, and RofiDistanceUnit::type.
Referenced by int_rofi_theme_print_property().
void distance_get_linestyle | ( | RofiDistance | d, |
cairo_t * | draw ) |
d | The distance handle. |
draw | The cairo drawable. |
Set linestyle.
Definition at line 1409 of file theme.c.
References ROFI_HL_DASH, and RofiDistance::style.
Referenced by widget_draw().
int distance_get_pixel | ( | RofiDistance | d, |
RofiOrientation | ori ) |
d | The distance handle. |
ori | The orientation. |
Convert RofiDistance into pixels.
Definition at line 1405 of file theme.c.
References RofiDistance::base, and distance_unit_get_pixel().
Referenced by barview_draw(), box_get_desired_height(), box_get_desired_width(), hori_calculate_size(), icon_create(), listview_draw(), listview_get_desired_height(), listview_resize(), rofi_view_calculate_height(), rofi_view_calculate_window_position(), rofi_view_calculate_window_width(), scrollbar_create(), textbox_draw(), textbox_get_desired_width(), textbox_tab_stops(), vert_calculate_size(), widget_draw(), widget_padding_get_bottom(), widget_padding_get_left(), widget_padding_get_right(), and widget_padding_get_top().
|
static |
Definition at line 1343 of file theme.c.
References distance_unit_get_pixel(), get_pixels(), RofiDistanceUnit::left, RofiDistanceUnit::modtype, RofiDistanceUnit::right, ROFI_DISTANCE_MODIFIER_ADD, ROFI_DISTANCE_MODIFIER_CEIL, ROFI_DISTANCE_MODIFIER_DIVIDE, ROFI_DISTANCE_MODIFIER_FLOOR, ROFI_DISTANCE_MODIFIER_GROUP, ROFI_DISTANCE_MODIFIER_MAX, ROFI_DISTANCE_MODIFIER_MIN, ROFI_DISTANCE_MODIFIER_MODULO, ROFI_DISTANCE_MODIFIER_MULTIPLY, ROFI_DISTANCE_MODIFIER_ROUND, and ROFI_DISTANCE_MODIFIER_SUBTRACT.
Referenced by distance_get_pixel(), and distance_unit_get_pixel().
|
static |
Definition at line 1320 of file theme.c.
References config, RofiDistanceUnit::distance, Settings::dpi, ROFI_ORIENTATION_VERTICAL, ROFI_PU_CH, ROFI_PU_EM, ROFI_PU_MM, ROFI_PU_PERCENT, rofi_view_get_current_monitor(), textbox_get_estimated_ch(), textbox_get_estimated_char_height(), and RofiDistanceUnit::type.
Referenced by distance_unit_get_pixel().
|
static |
Definition at line 365 of file theme.c.
References _PropertyValue::b, RofiPadding::bottom, _PropertyValue::color, RofiHighlightColorStyle::color, RofiImage::colors, _PropertyValue::def_value, distance_compare(), _PropertyValue::f, _PropertyValue::highlight, _PropertyValue::i, _PropertyValue::image, int_rofi_theme_print_property(), RofiPadding::left, _PropertyValue::link, _PropertyValue::list, _PropertyValue::name, P_BOOLEAN, P_COLOR, P_CURSOR, P_DOUBLE, P_HIGHLIGHT, P_IMAGE, P_INHERIT, P_INTEGER, P_LINK, P_LIST, P_ORIENTATION, P_PADDING, P_POSITION, P_STRING, _PropertyValue::padding, RofiPadding::right, ROFI_HL_BOLD, ROFI_HL_CAPITALIZE, ROFI_HL_COLOR, ROFI_HL_ITALIC, ROFI_HL_LOWERCASE, ROFI_HL_STRIKETHROUGH, ROFI_HL_UNDERLINE, ROFI_HL_UPPERCASE, ROFI_IMAGE_LINEAR_GRADIENT, ROFI_IMAGE_URL, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_print_color(), rofi_theme_print_distance(), RofiCursorTypeStr, _PropertyValue::s, RofiHighlightColorStyle::style, RofiPadding::top, Property::type, RofiImage::type, Property::value, WL_CENTER, WL_EAST, WL_NORTH, WL_SOUTH, and WL_WEST.
Referenced by int_rofi_theme_print_property(), and rofi_theme_print_property_index().
|
inlinestatic |
Definition at line 262 of file theme.c.
Referenced by rofi_theme_print_distance_unit().
|
static |
Definition at line 648 of file theme.c.
References Property::name, and rofi_theme_property_copy().
Referenced by rofi_theme_widget_add_properties().
|
static |
Definition at line 192 of file theme.c.
References RofiDistance::base, RofiDistanceUnit::left, RofiDistanceUnit::right, and rofi_theme_distance_unit_property_free().
Referenced by rofi_theme_property_free().
|
static |
Definition at line 181 of file theme.c.
References RofiDistanceUnit::left, RofiDistanceUnit::right, and rofi_theme_distance_unit_property_free().
Referenced by rofi_theme_distance_property_free(), and rofi_theme_distance_unit_property_free().
|
static |
Definition at line 680 of file theme.c.
References rofi_theme_find_single().
Referenced by rofi_config_find_widget(), and rofi_theme_find_widget().
ThemeWidget * rofi_theme_find_or_create_name | ( | ThemeWidget * | base, |
const char * | name ) |
base | Handle to the current level in the theme. |
name | Name of the new element. |
Create a new element in the theme structure.
Definition at line 81 of file theme.c.
References ThemeWidget::name, ThemeWidget::num_widgets, ThemeWidget::parent, and ThemeWidget::widgets.
Referenced by dmenu_mode_init(), and rofi_theme_parse_merge_widgets().
|
inlinestatic |
Public API
Definition at line 670 of file theme.c.
References ThemeWidget::name, ThemeWidget::num_widgets, and ThemeWidget::widgets.
Referenced by rofi_config_find_widget(), rofi_theme_find(), and rofi_theme_find_widget().
ThemeWidget * rofi_theme_find_widget | ( | const char * | name, |
const char * | state, | ||
gboolean | exact ) |
Low-level functions. These can be used by non-widgets to obtain values.
name | The name of the element to find. |
state | The state of the element. |
exact | If the match should be exact, or parent can be included. |
Find the theme element. If not exact, the closest specified element is returned.
Definition at line 788 of file theme.c.
References rofi_theme, rofi_theme_find(), and rofi_theme_find_single().
Referenced by rofi_theme_get_boolean(), rofi_theme_get_boolean_inside(), rofi_theme_get_color(), rofi_theme_get_color_inside(), rofi_theme_get_cursor_type(), rofi_theme_get_cursor_type_inside(), rofi_theme_get_distance(), rofi_theme_get_distance_inside(), rofi_theme_get_double(), rofi_theme_get_double_inside(), rofi_theme_get_double_integer_fb_inside(), rofi_theme_get_highlight(), rofi_theme_get_highlight_inside(), rofi_theme_get_image(), rofi_theme_get_image_inside(), rofi_theme_get_integer(), rofi_theme_get_integer_inside(), rofi_theme_get_list_distance(), rofi_theme_get_list_inside(), rofi_theme_get_list_strings(), rofi_theme_get_orientation(), rofi_theme_get_orientation_inside(), rofi_theme_get_padding(), rofi_theme_get_padding_inside(), rofi_theme_get_position(), rofi_theme_get_position_inside(), rofi_theme_get_string(), rofi_theme_get_string_inside(), rofi_theme_has_property(), and rofi_theme_has_property_inside().
void rofi_theme_free | ( | ThemeWidget * | widget | ) |
widget |
Free the widget and alll children.
Definition at line 240 of file theme.c.
References ThemeWidget::media, ThemeWidget::name, ThemeWidget::num_widgets, ThemeWidget::properties, rofi_theme_free(), and ThemeWidget::widgets.
Referenced by cleanup(), main(), rofi_theme_free(), rofi_theme_parse_process_conditionals_int(), and rofi_theme_reset().
void rofi_theme_free_parsed_files | ( | void | ) |
cleanup (free) the list of parsed config files.
Definition at line 54 of file theme.c.
References parsed_config_files.
Referenced by cleanup().
int rofi_theme_get_boolean | ( | const widget * | widget, |
const char * | property, | ||
int | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the boolean of the widget.
Definition at line 901 of file theme.c.
References _widget::name, P_BOOLEAN, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_boolean_inside(), and _widget::state.
Referenced by __create_window(), box_add(), icon_create(), listview_create(), textbox_create(), textbox_draw(), and widget_init().
|
static |
Definition at line 882 of file theme.c.
References _PropertyValue::b, _widget::name, P_BOOLEAN, P_INHERIT, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_boolean_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_boolean(), and rofi_theme_get_boolean_inside().
void rofi_theme_get_color | ( | const widget * | widget, |
const char * | property, | ||
cairo_t * | d ) |
widget | The widget to query |
property | The property to query. |
d | The drawable to apply color. |
Obtain the color of the widget and applies this to the drawable d.
Definition at line 1065 of file theme.c.
References _widget::name, P_COLOR, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_color_inside(), and _widget::state.
Referenced by scrollbar_draw(), textbox_draw(), and widget_draw().
|
static |
Definition at line 1044 of file theme.c.
References ThemeColor::alpha, ThemeColor::blue, _PropertyValue::color, ThemeColor::green, _widget::name, P_COLOR, P_INHERIT, _widget::parent, ThemeColor::red, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_color_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_color(), and rofi_theme_get_color_inside().
RofiCursorType rofi_theme_get_cursor_type | ( | const widget * | widget, |
const char * | property, | ||
RofiCursorType | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the cursor indicated by property of the widget.
Definition at line 960 of file theme.c.
References _widget::name, P_CURSOR, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_cursor_type_inside(), and _widget::state.
Referenced by widget_init().
|
static |
Definition at line 938 of file theme.c.
References _PropertyValue::i, _widget::name, P_CURSOR, P_INHERIT, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_cursor_type_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_cursor_type(), and rofi_theme_get_cursor_type_inside().
RofiDistance rofi_theme_get_distance | ( | const widget * | widget, |
const char * | property, | ||
int | def ) |
Public API
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the distance of the widget.
Definition at line 875 of file theme.c.
References _widget::name, P_PADDING, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_distance_inside(), and _widget::state.
Referenced by box_create(), box_get_desired_width(), icon_create(), listview_create(), rofi_view_calculate_height(), rofi_view_calculate_window_position(), rofi_view_calculate_window_width(), scrollbar_create(), textbox_draw(), and textbox_get_desired_width().
|
static |
Definition at line 845 of file theme.c.
References _PropertyValue::i, RofiPadding::left, _widget::name, P_INHERIT, P_INTEGER, P_PADDING, _PropertyValue::padding, _widget::parent, ROFI_DISTANCE_MODIFIER_NONE, ROFI_HL_SOLID, ROFI_PU_PX, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_distance_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_distance(), and rofi_theme_get_distance_inside().
double rofi_theme_get_double | ( | const widget * | widget, |
const char * | property, | ||
double | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the double of the widget.
Definition at line 1038 of file theme.c.
References _widget::name, P_DOUBLE, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_double_inside(), and _widget::state.
Referenced by icon_create(), textbox_create(), and textbox_draw().
|
static |
Definition at line 1016 of file theme.c.
References _PropertyValue::f, _widget::name, P_DOUBLE, P_INHERIT, P_INTEGER, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_double_inside(), rofi_theme_get_double_integer_fb_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_double(), and rofi_theme_get_double_inside().
|
static |
Definition at line 994 of file theme.c.
References _PropertyValue::i, _widget::name, P_INHERIT, P_INTEGER, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_double_integer_fb_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_double_inside(), and rofi_theme_get_double_integer_fb_inside().
RofiHighlightColorStyle rofi_theme_get_highlight | ( | widget * | widget, |
const char * | property, | ||
RofiHighlightColorStyle | th ) |
widget | The widget to query |
property | The property to query. |
th | The default value. |
Obtain the highlight .
Definition at line 1309 of file theme.c.
References _widget::name, P_COLOR, P_HIGHLIGHT, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_highlight_inside(), and _widget::state.
Referenced by __textbox_update_pango_text(), and update_callback().
|
static |
Definition at line 1277 of file theme.c.
References _PropertyValue::color, RofiHighlightColorStyle::color, _PropertyValue::highlight, _widget::name, P_COLOR, P_HIGHLIGHT, P_INHERIT, _widget::parent, ROFI_HL_COLOR, ROFI_HL_NONE, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_highlight_inside(), _widget::state, RofiHighlightColorStyle::style, Property::type, and Property::value.
Referenced by rofi_theme_get_highlight(), and rofi_theme_get_highlight_inside().
gboolean rofi_theme_get_image | ( | const widget * | widget, |
const char * | property, | ||
cairo_t * | d ) |
widget | The widget to query |
property | The property to query. |
d | The drawable to apply color. |
Obtain the image of the widget and applies this to the drawable d.
Definition at line 1173 of file theme.c.
References _widget::name, P_IMAGE, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_image_inside(), and _widget::state.
Referenced by widget_draw().
|
static |
Definition at line 1071 of file theme.c.
References ThemeColor::alpha, RofiImage::angle, ThemeColor::blue, RofiImage::colors, RofiImage::dir, ThemeColor::green, _widget::h, RofiImage::hsize, _PropertyValue::image, _widget::name, P_IMAGE, P_INHERIT, _widget::parent, ThemeColor::red, ROFI_DIRECTION_ANGLE, ROFI_DIRECTION_BOTTOM, ROFI_DIRECTION_LEFT, ROFI_DIRECTION_RIGHT, ROFI_DIRECTION_TOP, rofi_icon_fetcher_get(), rofi_icon_fetcher_query_advanced(), ROFI_IMAGE_LINEAR_GRADIENT, ROFI_IMAGE_URL, ROFI_SCALE_BOTH, ROFI_SCALE_HEIGHT, ROFI_SCALE_NONE, ROFI_SCALE_WIDTH, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_image_inside(), RofiImage::scaling, _widget::state, RofiImage::surface_id, Property::type, RofiImage::type, RofiImage::url, Property::value, _widget::w, and RofiImage::wsize.
Referenced by rofi_theme_get_image(), and rofi_theme_get_image_inside().
int rofi_theme_get_integer | ( | const widget * | widget, |
const char * | property, | ||
int | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the integer of the widget.
Definition at line 840 of file theme.c.
References _widget::name, P_INTEGER, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_integer_inside(), and _widget::state.
Referenced by listview_create(), and rofi_view_setup_fake_transparency().
|
static |
Definition at line 821 of file theme.c.
References _PropertyValue::i, _widget::name, P_INHERIT, P_INTEGER, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_integer_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_integer(), and rofi_theme_get_integer_inside().
GList * rofi_theme_get_list_distance | ( | const widget * | widget, |
const char * | property ) |
widget | The widget handle. |
property | The property to query. |
Returns a list of allocated RofiDistance objects that should be freed.
Definition at line 1233 of file theme.c.
References _PropertyValue::i, RofiPadding::left, _widget::name, P_INTEGER, P_LIST, P_PADDING, _PropertyValue::padding, ROFI_DISTANCE_MODIFIER_NONE, ROFI_HL_SOLID, ROFI_PU_PX, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_list_inside(), _widget::state, Property::type, and Property::value.
Referenced by textbox_tab_stops().
|
static |
Definition at line 1214 of file theme.c.
References _PropertyValue::list, _widget::name, P_INHERIT, P_LIST, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_list_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_list_distance(), rofi_theme_get_list_inside(), and rofi_theme_get_list_strings().
GList * rofi_theme_get_list_strings | ( | const widget * | widget, |
const char * | property ) |
widget | The widget handle. |
property | The property to query. |
Returns a list of allocated strings othat should be freed.
Definition at line 1259 of file theme.c.
References _widget::name, P_LIST, P_STRING, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_list_inside(), _PropertyValue::s, _widget::state, Property::type, and Property::value.
Referenced by listview_add_widget(), listview_create_row(), rofi_view_add_widget(), and rofi_view_create().
RofiOrientation rofi_theme_get_orientation | ( | const widget * | widget, |
const char * | property, | ||
RofiOrientation | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the orientation indicated by property of the widget.
Definition at line 929 of file theme.c.
References _widget::name, P_ORIENTATION, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_orientation_inside(), and _widget::state.
Referenced by box_create(), and listview_create().
|
static |
Definition at line 907 of file theme.c.
References _PropertyValue::b, _widget::name, P_INHERIT, P_ORIENTATION, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_orientation_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_orientation(), and rofi_theme_get_orientation_inside().
RofiPadding rofi_theme_get_padding | ( | const widget * | widget, |
const char * | property, | ||
RofiPadding | pad ) |
widget | The widget to query |
property | The property to query. |
pad | The default value. |
Obtain the padding of the widget.
Definition at line 1207 of file theme.c.
References _widget::name, P_PADDING, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_padding_inside(), and _widget::state.
Referenced by widget_init(), and widget_set_state().
|
static |
Definition at line 1179 of file theme.c.
References _PropertyValue::i, _widget::name, P_INHERIT, P_PADDING, _PropertyValue::padding, _widget::parent, ROFI_DISTANCE_MODIFIER_NONE, ROFI_HL_SOLID, ROFI_PU_PX, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_padding_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_padding(), and rofi_theme_get_padding_inside().
int rofi_theme_get_position | ( | const widget * | widget, |
const char * | property, | ||
int | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the position of the widget.
Definition at line 816 of file theme.c.
References _widget::name, P_POSITION, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_position_inside(), and _widget::state.
Referenced by rofi_view_calculate_window_position().
|
static |
Definition at line 797 of file theme.c.
References _PropertyValue::i, _widget::name, P_INHERIT, P_POSITION, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_position_inside(), _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_position(), and rofi_theme_get_position_inside().
const char * rofi_theme_get_string | ( | const widget * | widget, |
const char * | property, | ||
const char * | def ) |
widget | The widget to query |
property | The property to query. |
def | The default value. |
Obtain the string of the widget.
Definition at line 987 of file theme.c.
References _widget::name, P_STRING, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_string_inside(), and _widget::state.
Referenced by __create_window(), icon_create(), listview_add_widget(), rofi_view_add_widget(), textbox_button_trigger_action(), textbox_create(), and textbox_initialize_font().
|
static |
Definition at line 967 of file theme.c.
References _widget::name, P_INHERIT, P_STRING, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_get_string_inside(), _PropertyValue::s, _widget::state, Property::type, and Property::value.
Referenced by rofi_theme_get_string(), and rofi_theme_get_string_inside().
gboolean rofi_theme_has_property | ( | const widget * | widget, |
const char * | property ) |
widget | The widget to query |
property | The property to query. |
Check if a rofi theme has a property set.
Definition at line 1654 of file theme.c.
References _widget::name, P_STRING, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_has_property_inside(), and _widget::state.
|
static |
Definition at line 1636 of file theme.c.
References _widget::name, P_INHERIT, P_STRING, _widget::parent, rofi_theme_find_property(), rofi_theme_find_widget(), rofi_theme_has_property_inside(), _widget::state, and Property::type.
Referenced by rofi_theme_has_property(), and rofi_theme_has_property_inside().
ThemeMediaType rofi_theme_parse_media_type | ( | const char * | type | ) |
type | the media type to parse. |
Returns the media type described by type.
Definition at line 1608 of file theme.c.
References THEME_MEDIA_TYPE_BOOLEAN, THEME_MEDIA_TYPE_INVALID, THEME_MEDIA_TYPE_MAX_ASPECT_RATIO, THEME_MEDIA_TYPE_MAX_HEIGHT, THEME_MEDIA_TYPE_MAX_WIDTH, THEME_MEDIA_TYPE_MIN_ASPECT_RATIO, THEME_MEDIA_TYPE_MIN_HEIGHT, THEME_MEDIA_TYPE_MIN_WIDTH, and THEME_MEDIA_TYPE_MON_ID.
void rofi_theme_parse_merge_widgets | ( | ThemeWidget * | parent, |
ThemeWidget * | child ) |
parent | target theme tree |
child | source theme three |
Merge all the settings from child into parent.
Definition at line 1429 of file theme.c.
References ThemeWidget::media, ThemeWidget::name, ThemeWidget::num_widgets, ThemeWidget::properties, rofi_theme, rofi_theme_find_or_create_name(), rofi_theme_parse_merge_widgets(), rofi_theme_widget_add_properties(), and ThemeWidget::widgets.
Referenced by rofi_theme_parse_merge_widgets(), and rofi_theme_parse_process_conditionals_int().
char * rofi_theme_parse_prepare_file | ( | const char * | file | ) |
file | File name to prepare. |
Tries to find full path relative to parent file.
Definition at line 1418 of file theme.c.
References parsed_config_files.
Referenced by main().
void rofi_theme_parse_process_conditionals | ( | void | ) |
Process conditionals.
Definition at line 1602 of file theme.c.
References mon, monitor_active(), rofi_theme, and rofi_theme_parse_process_conditionals_int().
Referenced by main().
|
static |
Definition at line 1449 of file theme.c.
References ThemeMedia::boolv, _workarea::h, ThemeWidget::media, mon, _workarea::monitor_id, ThemeWidget::num_widgets, rofi_theme_free(), rofi_theme_parse_merge_widgets(), rofi_theme_parse_process_conditionals_int(), THEME_MEDIA_TYPE_BOOLEAN, THEME_MEDIA_TYPE_MAX_ASPECT_RATIO, THEME_MEDIA_TYPE_MAX_HEIGHT, THEME_MEDIA_TYPE_MAX_WIDTH, THEME_MEDIA_TYPE_MIN_ASPECT_RATIO, THEME_MEDIA_TYPE_MIN_HEIGHT, THEME_MEDIA_TYPE_MIN_WIDTH, THEME_MEDIA_TYPE_MON_ID, ThemeMedia::type, ThemeMedia::value, _workarea::w, and ThemeWidget::widgets.
Referenced by rofi_theme_parse_process_conditionals(), and rofi_theme_parse_process_conditionals_int().
void rofi_theme_parse_process_links | ( | void | ) |
Process links.
Definition at line 1598 of file theme.c.
References rofi_theme, and rofi_theme_parse_process_links_int().
Referenced by main(), and rofi_theme_rasi_validate().
|
static |
Definition at line 1561 of file theme.c.
References _PropertyValue::link, _PropertyValue::name, Property::name, ThemeWidget::num_widgets, P_LINK, ThemeWidget::properties, _PropertyValue::ref, rofi_add_warning_message(), rofi_theme_parse_process_links_int(), rofi_theme_resolve_link_property(), rofi_theme_widget_get_name(), Property::type, Property::value, and ThemeWidget::widgets.
Referenced by rofi_theme_parse_process_links(), and rofi_theme_parse_process_links_int().
void rofi_theme_print | ( | ThemeWidget * | widget | ) |
widget | The widget handle. |
Print out the widget to the commandline.
Definition at line 593 of file theme.c.
References rofi_theme_print_index().
Referenced by main().
|
static |
Definition at line 325 of file theme.c.
References ThemeColor::alpha, ThemeColor::blue, CSSColors, ThemeColor::green, num_CSSColors, and ThemeColor::red.
Referenced by int_rofi_theme_print_property().
|
static |
Definition at line 346 of file theme.c.
References RofiDistance::base, RofiDistanceUnit::modtype, ROFI_DISTANCE_MODIFIER_GROUP, ROFI_HL_DASH, rofi_theme_print_distance_unit(), and RofiDistance::style.
Referenced by int_rofi_theme_print_property().
|
static |
Definition at line 270 of file theme.c.
References RofiDistanceUnit::distance, RofiDistanceUnit::left, RofiDistanceUnit::modtype, printf_double(), RofiDistanceUnit::right, ROFI_DISTANCE_MODIFIER_ADD, ROFI_DISTANCE_MODIFIER_CEIL, ROFI_DISTANCE_MODIFIER_DIVIDE, ROFI_DISTANCE_MODIFIER_FLOOR, ROFI_DISTANCE_MODIFIER_GROUP, ROFI_DISTANCE_MODIFIER_MAX, ROFI_DISTANCE_MODIFIER_MIN, ROFI_DISTANCE_MODIFIER_MODULO, ROFI_DISTANCE_MODIFIER_MULTIPLY, ROFI_DISTANCE_MODIFIER_NONE, ROFI_DISTANCE_MODIFIER_ROUND, ROFI_DISTANCE_MODIFIER_SUBTRACT, ROFI_PU_CH, ROFI_PU_MM, ROFI_PU_PERCENT, ROFI_PU_PX, rofi_theme_print_distance_unit(), and RofiDistanceUnit::type.
Referenced by rofi_theme_print_distance(), and rofi_theme_print_distance_unit().
void rofi_theme_print_index | ( | ThemeWidget * | widget, |
int | index ) |
widget | The widget handle. |
index | The indenting index. |
Print out the widget to the commandline indented by index.
Definition at line 533 of file theme.c.
References ThemeWidget::media, Property::name, ThemeWidget::name, ThemeWidget::num_widgets, ThemeWidget::parent, ThemeWidget::properties, rofi_theme_print_index(), rofi_theme_print_property_index(), and ThemeWidget::widgets.
Referenced by config_parse_dump_config_rasi_format(), rofi_theme_print(), and rofi_theme_print_index().
void rofi_theme_print_parsed_files | ( | gboolean | is_term | ) |
is_term | if print to terminal |
print the list of parsed config files.
Definition at line 64 of file theme.c.
References color_bold, color_reset, and parsed_config_files.
Referenced by help().
|
static |
Definition at line 524 of file theme.c.
References int_rofi_theme_print_property(), and Property::name.
Referenced by rofi_theme_print_index().
p | The property to free. |
data | User data (unused) |
Make a newly allocted copy of the property.
Definition at line 131 of file theme.c.
References RofiPadding::bottom, RofiImage::colors, _PropertyValue::def_value, _PropertyValue::image, RofiPadding::left, _PropertyValue::link, _PropertyValue::list, _PropertyValue::name, Property::name, P_IMAGE, P_LINK, P_LIST, P_PADDING, P_STRING, _PropertyValue::padding, _PropertyValue::ref, RofiPadding::right, rofi_theme_property_copy(), rofi_theme_property_copy_distance(), rofi_theme_property_create(), _PropertyValue::s, RofiPadding::top, Property::type, RofiImage::url, and Property::value.
Referenced by config_parse_set_property(), rofi_theme_copy_property_int(), and rofi_theme_property_copy().
RofiDistance rofi_theme_property_copy_distance | ( | RofiDistance const | distance | ) |
distance | The distance object to copy. |
Definition at line 119 of file theme.c.
References RofiDistance::base, RofiDistanceUnit::left, RofiDistanceUnit::right, and rofi_theme_property_copy_distance_unit().
Referenced by rofi_theme_property_copy().
|
static |
Definition at line 108 of file theme.c.
References RofiDistanceUnit::left, RofiDistanceUnit::right, and rofi_theme_property_copy_distance_unit().
Referenced by rofi_theme_property_copy_distance(), and rofi_theme_property_copy_distance_unit().
Property * rofi_theme_property_create | ( | PropertyType | type | ) |
Properties
Definition at line 101 of file theme.c.
References Property::type.
Referenced by dmenu_mode_init(), and rofi_theme_property_copy().
void rofi_theme_property_free | ( | Property * | p | ) |
p | The property to free. |
Free the content of the property.
Definition at line 203 of file theme.c.
References RofiPadding::bottom, RofiImage::colors, _PropertyValue::def_value, _PropertyValue::image, RofiPadding::left, _PropertyValue::link, _PropertyValue::list, _PropertyValue::name, Property::name, P_IMAGE, P_LINK, P_LIST, P_PADDING, P_STRING, _PropertyValue::padding, RofiPadding::right, rofi_theme_distance_property_free(), rofi_theme_property_free(), _PropertyValue::s, RofiPadding::top, Property::type, RofiImage::url, and Property::value.
Referenced by config_parse_set_property(), config_xresource_free(), dmenu_mode_init(), rofi_theme_property_free(), and rofi_theme_widget_add_properties().
void rofi_theme_reset | ( | void | ) |
Reset the current theme.
Definition at line 234 of file theme.c.
References ThemeWidget::name, rofi_theme, and rofi_theme_free().
Referenced by main().
|
static |
Definition at line 706 of file theme.c.
References _PropertyValue::def_value, _PropertyValue::link, _PropertyValue::name, Property::name, P_LINK, ThemeWidget::properties, _PropertyValue::ref, rofi_theme, rofi_theme_resolve_link_property(), Property::type, and Property::value.
Referenced by rofi_theme_find_property(), rofi_theme_parse_process_links_int(), and rofi_theme_resolve_link_property().
void rofi_theme_widget_add_properties | ( | ThemeWidget * | widget, |
GHashTable * | table ) |
widget | The widget handle. |
table | HashTable containing properties set. |
Merge properties with widgets current property.
Definition at line 654 of file theme.c.
References ThemeWidget::properties, rofi_theme_copy_property_int(), and rofi_theme_property_free().
Referenced by dmenu_mode_init(), and rofi_theme_parse_merge_widgets().
|
static |
Definition at line 1550 of file theme.c.
References ThemeWidget::name, and ThemeWidget::parent.
Referenced by rofi_theme_parse_process_links_int().
void yyerror | ( | YYLTYPE * | yylloc, |
const char * | what, | ||
const char * | s ) |
yylloc | The file location. |
what | What we are parsing, filename or string. |
s | Error message string. |
Error handler for the lex parser.
Definition at line 618 of file theme.c.
References rofi_add_error_message().
void yylex_destroy | ( | void | ) |
Destroy the internal of lex parser.
GList* parsed_config_files = NULL |
list of config files we parsed.
Definition at line 51 of file theme.c.
Referenced by rofi_theme_free_parsed_files(), rofi_theme_parse_prepare_file(), and rofi_theme_print_parsed_files().
const char* const RofiCursorTypeStr[3] |
Textual representation of RofiCursorType
Definition at line 359 of file theme.c.
Referenced by int_rofi_theme_print_property().
|
extern |
Global handle input file to flex parser.