Enumerations | |
enum | Elm_Colorselector_Mode { ELM_COLORSELECTOR_PALETTE = 0, ELM_COLORSELECTOR_COMPONENTS, ELM_COLORSELECTOR_BOTH } |
Different modes supported by Colorselector. More... | |
Functions | |
Evas_Object * | elm_colorselector_add (Evas_Object *parent) |
Add a new colorselector to the parent. | |
void | elm_colorselector_color_set (Evas_Object *obj, int r, int g, int b, int a) |
Set color to colorselector. | |
void | elm_colorselector_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) |
Get current color from colorselector. | |
void | elm_colorselector_mode_set (Evas_Object *obj, Elm_Colorselector_Mode mode) |
Set Colorselector's mode. | |
Elm_Colorselector_Mode | elm_colorselector_mode_get (const Evas_Object *obj) |
Get Colorselector's mode. | |
void | elm_colorselector_palette_item_color_get (const Elm_Object_Item *it, int *r, int *g, int *b, int *a) |
Get Palette item's color. | |
void | elm_colorselector_palette_item_color_set (Elm_Object_Item *it, int r, int g, int b, int a) |
Set palette item's color. | |
Elm_Object_Item * | elm_colorselector_palette_color_add (Evas_Object *obj, int r, int g, int b, int a) |
Add a new color item to palette. | |
void | elm_colorselector_palette_clear (Evas_Object *obj) |
Clear the palette items. | |
void | elm_colorselector_palette_name_set (Evas_Object *obj, const char *palette_name) |
Set current palette's name. | |
const char * | elm_colorselector_palette_name_get (const Evas_Object *obj) |
Get current palette's name. |
Detailed Description


A ColorSelector is a color selection widget. It allows application to set a series of colors.It also allows to load/save colors from/to config with a unique identifier, by default, the colors are loaded/saved from/to config using "default" identifier. The colors can be picked by user from the color set by clicking on individual color item on the palette or by selecting it from selector.
This widget inherits from the Layout one, so that all the functions acting on it also work for check objects.
This widget emits the following signals, besides the ones sent from Layout:
"changed"
- When the color value changes on selector event_info is NULL."color,item,selected"
- When user clicks on color item. The event_info parameter of the callback will be the selected color item."color,item,longpressed"
- When user long presses on color item. The event info parameter of the callback contains selected color item.
Enumeration Type Documentation
Different modes supported by Colorselector.
Function Documentation
Evas_Object* elm_colorselector_add | ( | Evas_Object * | parent | ) |
Add a new colorselector to the parent.
- Parameters:
-
parent The parent object
- Returns:
- The new object or NULL if it cannot be created
void elm_colorselector_color_get | ( | const Evas_Object * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Get current color from colorselector.
- Parameters:
-
obj Colorselector object r integer pointer for r-value of color g integer pointer for g-value of color b integer pointer for b-value of color a integer pointer for a-value of color
void elm_colorselector_color_set | ( | Evas_Object * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Set color to colorselector.
- Parameters:
-
obj Colorselector object r r-value of color g g-value of color b b-value of color a a-value of color
Elm_Colorselector_Mode elm_colorselector_mode_get | ( | const Evas_Object * | obj | ) |
Get Colorselector's mode.
- Parameters:
-
obj Colorselector object
- Returns:
- mode The current mode of colorselector
References ELM_COLORSELECTOR_BOTH.
void elm_colorselector_mode_set | ( | Evas_Object * | obj, |
Elm_Colorselector_Mode | mode | ||
) |
Set Colorselector's mode.
- Parameters:
-
obj Colorselector object mode Elm_Colorselector_Mode
Colorselector supports three modes palette only, selector only and both.
References ELM_COLORSELECTOR_BOTH, ELM_COLORSELECTOR_COMPONENTS, ELM_COLORSELECTOR_PALETTE, elm_layout_signal_emit(), elm_layout_sizing_eval(), and ELM_WIDGET_DATA.
void elm_colorselector_palette_clear | ( | Evas_Object * | obj | ) |
Clear the palette items.
- Parameters:
-
obj The Colorselector object
References ELM_COLORSELECTOR_BOTH, and ELM_COLORSELECTOR_COMPONENTS.
Elm_Object_Item* elm_colorselector_palette_color_add | ( | Evas_Object * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Add a new color item to palette.
- Parameters:
-
obj The Colorselector object r r-value of color g g-value of color b b-value of color a a-value of color
- Returns:
- A new color palette Item.
References elm_box_pack_end(), and elm_layout_sizing_eval().
void elm_colorselector_palette_item_color_get | ( | const Elm_Object_Item * | it, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Get Palette item's color.
- Parameters:
-
it The color palette item. r integer pointer for r-value of color g integer pointer for g-value of color b integer pointer for b-value of color a integer pointer for a-value of color
void elm_colorselector_palette_item_color_set | ( | Elm_Object_Item * | it, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Set palette item's color.
- Parameters:
-
it The color palette item. r r-value of color g g-value of color b b-value of color a a-value of color
const char* elm_colorselector_palette_name_get | ( | const Evas_Object * | obj | ) |
Get current palette's name.
- Parameters:
-
obj The Colorselector object
- Returns:
- Name of palette
Returns the currently set palette name using which colors will be saved/loaded in to config.
void elm_colorselector_palette_name_set | ( | Evas_Object * | obj, |
const char * | palette_name | ||
) |
Set current palette's name.
- Parameters:
-
obj The Colorselector object palette_name Name of palette
When colorpalette name is set, colors will be loaded from and saved to config using the set name. If no name is set then colors will be loaded from or saved to "default" config.