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.
"focused"
- When the colorselector has received focus. (since 1.8)
"unfocused"
- When the colorselector has lost focus. (since 1.8)
"language,changed"
- the program's language changed (since 1.9)
See Color selector example.
Function Documentation
Add a new colorselector to the parent.
- Parameters:
-
- Returns:
- The new object or NULL if it cannot be created
- Since :
- 2.3
- Examples:
- colorselector_example_01.c.
Get Palette item's color.
- Parameters:
-
[in] | it | The color palette item. |
[out] | r | integer pointer for r-value of color |
[out] | g | integer pointer for g-value of color |
[out] | b | integer pointer for b-value of color |
[out] | a | integer pointer for a-value of color |
- Since :
- 2.3
- Examples:
- colorselector_example_01.c.
Set palette item's color.
- Parameters:
-
[in] | it | The color palette item. |
[in] | r | r-value of color |
[in] | g | g-value of color |
[in] | b | b-value of color |
[in] | a | a-value of color |
- Since :
- 2.3
Get the selected state of color palette item.
- Parameters:
-
[in] | it | The colorpalette item |
- Returns:
EINA_TRUE
if the item is selected, EINA_FALSE
otherwise.
- Since :
- 3.0f(2.3.1)
Set the selected state of color palette item.
- Parameters:
-
[in] | it | The colorpalette item |
[in] | selected | The selected state |
- Since :
- 3.0f(2.3.1)