Ewl_Theme: Methods for Accessing and Modifying Theme Data
Detailed Description
Provides methods for accessing theme data, global theme data or per-widget theme data.Tutorial
Defines | |
#define | EWL_THEME_KEY_NOMATCH ((char *)0xdeadbeef) |
Functions | |
int | ewl_theme_data_int_get (Ewl_Widget *w, char *k) |
Retrieve an integer value from a widgets theme. | |
void | ewl_theme_data_int_set (Ewl_Widget *w, char *k, int v) |
Store data into a widgets theme. | |
void | ewl_theme_data_reset (Ewl_Widget *w) |
Reset the theme settings for the widget w. | |
const char * | ewl_theme_data_str_get (Ewl_Widget *w, char *k) |
Retrieve an string value from a widgets theme. | |
void | ewl_theme_data_str_set (Ewl_Widget *w, char *k, char *v) |
Store data into a widgets theme. | |
void | ewl_theme_font_path_add (char *path) |
Add a specified path to the font search path. | |
Ecore_List * | ewl_theme_font_path_get (void) |
retrieve the path of a widgets theme's fonts | |
char * | ewl_theme_image_get (Ewl_Widget *w, char *k) |
retrieve the path to an image from a widgets theme | |
int | ewl_theme_init (void) |
const char * | ewl_theme_path_get (void) |
Return the path of the current theme. | |
void | ewl_theme_shutdown (void) |
int | ewl_theme_theme_set (const char *theme) |
int | ewl_theme_widget_init (Ewl_Widget *w) |
void | ewl_theme_widget_shutdown (Ewl_Widget *w) |
Define Documentation
#define EWL_THEME_KEY_NOMATCH ((char *)0xdeadbeef) |
Referenced by ewl_icon_theme_icon_path_get(), ewl_theme_data_str_get(), and ewl_theme_data_str_set().
Function Documentation
int ewl_theme_data_int_get | ( | Ewl_Widget * | w, | |
char * | k | |||
) |
Retrieve an integer value from a widgets theme.
- Parameters:
-
w,: the widget to search k,: the key to search for
- Returns:
- Returns the integer associated with key k on success, 0 on failure.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and ewl_theme_data_str_get().
Referenced by ewl_combo_scrollable_set(), ewl_context_menu_init(), ewl_scrollbar_orientation_set(), and ewl_text_index_geometry_map().
void ewl_theme_data_int_set | ( | Ewl_Widget * | w, | |
char * | k, | |||
int | v | |||
) |
Store data into a widgets theme.
- Parameters:
-
w,: the widget to change theme data k,: the key to change v,: the data to assign to the key
- Returns:
- Returns no value. Changes the theme data in widget w so that key k now is associated with value v.
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and ewl_theme_data_str_set().
void ewl_theme_data_reset | ( | Ewl_Widget * | w | ) |
Reset the theme settings for the widget w.
- Parameters:
-
w,: the widget to reset theme settings
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_WIDGET_TYPE, IF_FREE_HASH, and Ewl_Widget::theme.
const char* ewl_theme_data_str_get | ( | Ewl_Widget * | w, | |
char * | k | |||
) |
Retrieve an string value from a widgets theme.
- Parameters:
-
w,: the widget to search k,: the key to search for
- Returns:
- Returns the string associated with k on success, NULL on failure.
References alloca(), DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_config_cache, EWL_THEME_KEY_NOMATCH, ewl_widget_appearance_path_copy(), ewl_widget_appearance_path_size_get(), Ewl_Widget::parent, PATH_MAX, Ewl_Config_Cache::print_keys, Ewl_Widget::theme, and Ewl_Widget::theme_path.
Referenced by ewl_scrollpane_init(), ewl_text_font_source_apply(), ewl_text_font_source_set(), ewl_theme_data_int_get(), ewl_theme_image_get(), ewl_widget_appearance_text_get(), and ewl_widget_cb_realize().
void ewl_theme_data_str_set | ( | Ewl_Widget * | w, | |
char * | k, | |||
char * | v | |||
) |
Store data into a widgets theme.
- Parameters:
-
w,: the widget to change theme data k,: the key to change v,: the data to assign to the key
- Returns:
- Returns no value. Changes the theme data in widget w so that key k now is associated with value v.
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_THEME_KEY_NOMATCH, ewl_widget_realize(), ewl_widget_unrealize(), REALIZED, and Ewl_Widget::theme.
Referenced by ewl_theme_data_int_set().
void ewl_theme_font_path_add | ( | char * | path | ) |
Add a specified path to the font search path.
- Parameters:
-
path,: the font to add to the search path
- Returns:
- Returns no value. Duplicates the string pointed to by path and adds it to the list of paths that are searched for fonts.
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and ewl_embed_font_path_add().
Ecore_List* ewl_theme_font_path_get | ( | void | ) |
retrieve the path of a widgets theme's fonts
- Returns:
- Returns the font path of widget w on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, and DRETURN_PTR.
Referenced by ewl_embed_canvas_set(), and ewl_embed_font_path_add().
char* ewl_theme_image_get | ( | Ewl_Widget * | w, | |
char * | k | |||
) |
retrieve the path to an image from a widgets theme
- Parameters:
-
w,: the widget to search k,: the image to search for
- Returns:
- Returns the path of image key k on success, NULL on failure.
References DCHECK_PARAM_PTR, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_theme_data_str_get(), EWL_WIDGET_TYPE, FREE, and PATH_MAX.
Referenced by ewl_widget_cb_realize().
int ewl_theme_init | ( | void | ) |
References DEFAULT_THEME, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, DWARNING, ewl_config, ewl_config_string_get(), EWL_CONFIG_THEME_NAME, and ewl_theme_theme_set().
Referenced by ewl_init().
const char* ewl_theme_path_get | ( | void | ) |
Return the path of the current theme.
- Returns:
- Returns the current theme path on success, NULL on failure
References DENTER_FUNCTION, DLEVEL_STABLE, and DRETURN_PTR.
Referenced by ewl_engine_theme_data_get(), and ewl_text_context_format_string_create().
void ewl_theme_shutdown | ( | void | ) |
References DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, FREE, IF_FREE_HASH, and IF_FREE_LIST.
Referenced by ewl_init().
int ewl_theme_theme_set | ( | const char * | theme | ) |
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_embed_list, ewl_widget_hide(), ewl_widget_realize(), ewl_widget_unrealize(), IF_FREE, IF_FREE_HASH, and REALIZED.
Referenced by ewl_theme_init().
int ewl_theme_widget_init | ( | Ewl_Widget * | w | ) |
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_WIDGET_TYPE, and Ewl_Widget::theme.
Referenced by ewl_widget_init().
void ewl_theme_widget_shutdown | ( | Ewl_Widget * | w | ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_WIDGET_TYPE, IF_FREE_HASH, and Ewl_Widget::theme.
Referenced by ewl_widget_free().