|
|
|
|
The theme system of Etk
Detailed Description
The theme system of Etk.
TODOC
|
Enumerations |
enum | Etk_Color_Type {
ETK_COLOR_FOREGROUND,
ETK_COLOR_BACKGROUND,
ETK_COLOR_IMPORTANT_FG,
ETK_COLOR_IMPORTANT_BG,
ETK_COLOR_WARNING_FG,
ETK_COLOR_WARNING_BG,
ETK_COLOR_INFO_FG,
ETK_COLOR_INFO_BG,
ETK_COLOR_DEFAULT1_FG,
ETK_COLOR_DEFAULT1_BG,
ETK_COLOR_DEFAULT2_FG,
ETK_COLOR_DEFAULT2_BG,
ETK_COLOR_DEFAULT3_FG,
ETK_COLOR_DEFAULT3_BG,
ETK_COLOR_DEFAULT4_FG,
ETK_COLOR_DEFAULT4_BG,
ETK_COLOR_DEFAULT5_FG,
ETK_COLOR_DEFAULT5_BG
} |
| The different types of colors. More...
|
Functions |
Etk_Bool | etk_theme_widget_set_from_path (const char *theme_path) |
| Sets the theme that will be used by new widgets, from its path.
|
Etk_Bool | etk_theme_widget_set_from_name (const char *theme_name) |
| Sets the theme that will be used by new widgets, from its name.
|
const char * | etk_theme_widget_path_get (void) |
| Gets the path of the current widget-theme file of Etk.
|
char * | etk_theme_widget_name_get (void) |
| Gets the name of the current widget-theme file of Etk.
|
Eina_List * | etk_theme_widget_available_themes_get (void) |
| Gets the list of the available widget-themes. The list contains the names of the themes, not the paths.
|
char * | etk_theme_widget_find (const char *theme_name) |
| Finds the path of a widget-theme file, from its name.
|
Etk_Bool | etk_theme_icon_set_from_path (const char *theme_path) |
| Sets the theme that will be used by new icons, from its path.
|
Etk_Bool | etk_theme_icon_set_from_name (const char *theme_name) |
| Sets the theme that will be used by new icons, from its name.
|
const char * | etk_theme_icon_path_get (void) |
| Gets the path of the current icon-theme file of Etk.
|
char * | etk_theme_icon_name_get (void) |
| Gets the name of the current icon-theme file of Etk.
|
Eina_List * | etk_theme_icon_available_themes_get (void) |
| Gets the list of the available icon-themes. The list contains the names of the themes, not the paths.
|
char * | etk_theme_icon_find (const char *theme_name) |
| Finds the path of a icon-theme file, from its name.
|
void | etk_theme_available_themes_free (Eina_List *themes) |
| A function used to free the list returned by etk_theme_widget_available_themes_get() or etk_theme_icon_available_themes_get().
|
Etk_Bool | etk_theme_group_exists (const char *file, const char *group, const char *parent_group) |
| Checks whether the given theme-group exists. The edje-group to check is named "etk/parent_group/group" if parent_group is not NULL, or "etk/group" if parent_group is NULL.
|
Etk_Bool | etk_theme_edje_object_set (Evas_Object *object, const char *file, const char *group, const char *parent_group) |
| Loads an edje-group from a theme-file and sets it to the object. The edje-group to load is named "etk/parent_group/group" if parent_group is not NULL, or "etk/group" if parent_group is NULL.
|
Etk_Bool | etk_theme_edje_object_set_from_parent (Evas_Object *object, const char *group, Etk_Widget *parent) |
| Loads an edje-group from a theme-file and sets it to the object. Equivalent to etk_theme_edje_object_set(object, etk_widget_theme_file_get(parent), group, etk_widget_theme_group_get(parent)).
|
Etk_Bool | etk_theme_color_get (const char *file, Etk_Color_Type color_type, int *r, int *g, int *b, int *a) |
| Gets the components of the given color. The color depends on the theme used.
|
Enumeration Type Documentation
The different types of colors.
- Enumerator:
-
ETK_COLOR_FOREGROUND |
The default foreground color |
ETK_COLOR_BACKGROUND |
The default background color |
ETK_COLOR_IMPORTANT_FG |
Foreground color to express importance |
ETK_COLOR_IMPORTANT_BG |
Background color to express importance |
ETK_COLOR_WARNING_FG |
Foreground color to express warning |
ETK_COLOR_WARNING_BG |
Background color to express warning |
ETK_COLOR_INFO_FG |
Foreground color to show informative areas |
ETK_COLOR_INFO_BG |
Background color to show informative areas |
ETK_COLOR_DEFAULT1_FG |
Default foreground color 1 |
ETK_COLOR_DEFAULT1_BG |
Default background color 1 |
ETK_COLOR_DEFAULT2_FG |
Default foreground color 2 |
ETK_COLOR_DEFAULT2_BG |
Default background color 2 |
ETK_COLOR_DEFAULT3_FG |
Default foreground color 3 |
ETK_COLOR_DEFAULT3_BG |
Default background color 3 |
ETK_COLOR_DEFAULT4_FG |
Default foreground color 4 |
ETK_COLOR_DEFAULT4_BG |
Default background color 4 |
ETK_COLOR_DEFAULT5_FG |
Default foreground color 5 |
ETK_COLOR_DEFAULT5_BG |
Default background color 5 |
Function Documentation
Etk_Bool etk_theme_widget_set_from_path |
( |
const char * |
theme_path |
) |
|
Sets the theme that will be used by new widgets, from its path.
- Parameters:
-
| theme_path | the path of the widget-theme to use |
- Returns:
- Returns ETK_TRUE if the theme has been found, or ETK_FALSE otherwise
Etk_Bool etk_theme_widget_set_from_name |
( |
const char * |
theme_name |
) |
|
Sets the theme that will be used by new widgets, from its name.
- Parameters:
-
| theme_name | the name of the widget-theme to use |
- Returns:
- Returns ETK_TRUE if the theme has been found, or ETK_FALSE otherwise
const char * etk_theme_widget_path_get |
( |
void |
|
) |
|
Gets the path of the current widget-theme file of Etk.
- Returns:
- Returns the path of the current widget-theme file
char * etk_theme_widget_name_get |
( |
void |
|
) |
|
Gets the name of the current widget-theme file of Etk.
- Returns:
- Returns the name of the current widget-theme file, or NULL on failure
- Note:
- The returned path will have to be freed with free()
Eina_List * etk_theme_widget_available_themes_get |
( |
void |
|
) |
|
Gets the list of the available widget-themes. The list contains the names of the themes, not the paths.
- Returns:
- Returns an Eina_List of the available widget-themes
- Note:
- The returned list should be free with etk_theme_available_themes_free()
char * etk_theme_widget_find |
( |
const char * |
theme_name |
) |
|
Finds the path of a widget-theme file, from its name.
- Parameters:
-
| theme_name | the name of the theme to find |
- Returns:
- Returns the path of the corresponding widget-theme file, or NULL if there is no corresponding theme
- Note:
- The returned value will have to be freed with free()
Etk_Bool etk_theme_icon_set_from_path |
( |
const char * |
theme_path |
) |
|
Sets the theme that will be used by new icons, from its path.
- Parameters:
-
| theme_path | the path of the icon-theme to use |
- Returns:
- Returns ETK_TRUE if the theme has been found, or ETK_FALSE otherwise
Etk_Bool etk_theme_icon_set_from_name |
( |
const char * |
theme_name |
) |
|
Sets the theme that will be used by new icons, from its name.
- Parameters:
-
| theme_name | the name of the icon-theme to use |
- Returns:
- Returns ETK_TRUE if the theme has been found, or ETK_FALSE otherwise
const char * etk_theme_icon_path_get |
( |
void |
|
) |
|
Gets the path of the current icon-theme file of Etk.
- Returns:
- Returns the path of the current icon-theme file
char * etk_theme_icon_name_get |
( |
void |
|
) |
|
Gets the name of the current icon-theme file of Etk.
- Returns:
- Returns the name of the current icon-theme file, or NULL on failure
- Note:
- The returned path will have to be freed with free()
Eina_List * etk_theme_icon_available_themes_get |
( |
void |
|
) |
|
Gets the list of the available icon-themes. The list contains the names of the themes, not the paths.
- Returns:
- Returns an Eina_List of the available icon-themes
- Note:
- The returned list should be free with etk_theme_available_themes_free()
char * etk_theme_icon_find |
( |
const char * |
theme_name |
) |
|
Finds the path of a icon-theme file, from its name.
- Parameters:
-
| theme_name | the name of the theme to find |
- Returns:
- Returns the path of the corresponding icon-theme file, or NULL if there is no corresponding theme
- Note:
- The returned value will have to be freed with free()
void etk_theme_available_themes_free |
( |
Eina_List * |
themes |
) |
|
Etk_Bool etk_theme_group_exists |
( |
const char * |
file, |
|
|
const char * |
group, |
|
|
const char * |
parent_group | |
|
) |
| | |
Checks whether the given theme-group exists. The edje-group to check is named "etk/parent_group/group" if parent_group is not NULL, or "etk/group" if parent_group is NULL.
- Parameters:
-
| file | the path of a theme-file. If file is NULL, the current Etk's theme-file is used |
| group | the main theme-group |
| parent_group | the parent theme-group. It can be NULL |
- Returns:
- Returns ETK_TRUE if the theme-group exists, ETK_FALSE otherwise
Etk_Bool etk_theme_edje_object_set |
( |
Evas_Object * |
object, |
|
|
const char * |
file, |
|
|
const char * |
group, |
|
|
const char * |
parent_group | |
|
) |
| | |
Loads an edje-group from a theme-file and sets it to the object. The edje-group to load is named "etk/parent_group/group" if parent_group is not NULL, or "etk/group" if parent_group is NULL.
- Parameters:
-
| object | an Edje object |
| file | the path of the theme-file. If file is NULL, the current Etk's theme-file is used |
| group | the theme-group of the object |
| parent_group | the theme-group of the parent of the object. It can be NULL |
- Returns:
- Returns ETK_TRUE on success, ETK_FALSE on failure
Etk_Bool etk_theme_edje_object_set_from_parent |
( |
Evas_Object * |
object, |
|
|
const char * |
group, |
|
|
Etk_Widget * |
parent | |
|
) |
| | |
Loads an edje-group from a theme-file and sets it to the object. Equivalent to etk_theme_edje_object_set(object, etk_widget_theme_file_get(parent), group, etk_widget_theme_group_get(parent)).
- Parameters:
-
| object | an Edje object |
| group | the theme-group of the object |
| parent | the theme-parent of the object |
- Returns:
- Returns ETK_TRUE on success, ETK_FALSE on failure
Etk_Bool etk_theme_color_get |
( |
const char * |
file, |
|
|
Etk_Color_Type |
color_type, |
|
|
int * |
r, |
|
|
int * |
g, |
|
|
int * |
b, |
|
|
int * |
a | |
|
) |
| | |
Gets the components of the given color. The color depends on the theme used.
- Parameters:
-
| file | the path to the theme-file where to find the given color. If file is NULL, the current widget-theme file will be used |
| color_type | the color whose components will be returned |
| r | the location where to store the 'red' component of the color |
| g | the location where to store the 'green' component of the color |
| b | the location where to store the 'blue' component of the color |
| a | the location where to store the 'alpha' component of the color |
- Returns:
- Returns ETK_TRUE if the color has been found, ETK_FALSE otherwise
- Note:
- Note that even if the color has not been found (because it is not defined in the theme), the components will still be set to their default values, so the color will still be usable
|
|
|
|
|
|