Tizen Native API
Functions
Colorselector
Elementary Widgets

Functions

Evas_Objectelm_colorselector_add (Evas_Object *parent)
 Adds a new colorselector to the parent.
void elm_colorselector_color_set (Evas_Object *obj, int r, int g, int b, int a)
 Sets a color to the colorselector.
void elm_colorselector_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a)
 Gets the current color from the colorselector.
void elm_colorselector_mode_set (Evas_Object *obj, Elm_Colorselector_Mode mode)
 Sets the Colorselector mode.
Elm_Colorselector_Mode elm_colorselector_mode_get (const Evas_Object *obj)
 Gets the Colorselector mode.
void elm_colorselector_palette_item_color_get (const Elm_Object_Item *it, int *r, int *g, int *b, int *a)
 Gets the Palette item's color.
void elm_colorselector_palette_item_color_set (Elm_Object_Item *it, int r, int g, int b, int a)
 Sets the palette item's color.
Elm_Object_Itemelm_colorselector_palette_color_add (Evas_Object *obj, int r, int g, int b, int a)
 Adds a new color item to the palette.
void elm_colorselector_palette_clear (Evas_Object *obj)
 Clears the palette items.
Eina_Listelm_colorselector_palette_items_get (const Evas_Object *obj)
 Gets the list of palette items.
void elm_colorselector_palette_name_set (Evas_Object *obj, const char *palette_name)
 Sets the current palette's name.
const char * elm_colorselector_palette_name_get (const Evas_Object *obj)
 Gets the current palette's name.

A ColorSelector is a color selection widget.

colorselector_inheritance_tree.png

It allows an 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 a "default" identifier. The colors can be picked by the user from the color set by clicking on individual color items on the palette or by selecting it from the 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 :


Enumeration Type Documentation

Enumeration that defines the different modes supported by Colorselector.

See also:
elm_colorselector_mode_set()
elm_colorselector_mode_get()
Enumerator:
ELM_COLORSELECTOR_PALETTE 

Only the color palette is displayed

ELM_COLORSELECTOR_COMPONENTS 

Only the color selector is displayed

ELM_COLORSELECTOR_BOTH 

Both the Palette and the selector is displayed, default

ELM_COLORSELECTOR_PICKER 

Only the color picker is displayed

ELM_COLORSELECTOR_PLANE 

Only the color plane is displayed

ELM_COLORSELECTOR_PALETTE_PLANE 

Both the palette and the plane is displayed

ELM_COLORSELECTOR_ALL 

All possible color selectors are displayed


Function Documentation

Adds a new colorselector to the parent.

Since :
2.3
Parameters:
[in]parentThe parent object
Returns:
The new object, otherwise NULL if it cannot be created
void elm_colorselector_color_get ( const Evas_Object obj,
int *  r,
int *  g,
int *  b,
int *  a 
)

Gets the current color from the colorselector.

Since :
2.3
Parameters:
[in]objThe colorselector object
[out]rAn integer pointer for the r-value of color
[out]gAn integer pointer for the g-value of color
[out]bAn integer pointer for the b-value of color
[out]aAn integer pointer for the a-value of color
void elm_colorselector_color_set ( Evas_Object obj,
int  r,
int  g,
int  b,
int  a 
)

Sets a color to the colorselector.

Since :
2.3
Parameters:
[in]objThe colorselector object
[in]rThe r-value of color
[in]gThe g-value of color
[in]bThe b-value of color
[in]aThe a-value of color

Gets the Colorselector mode.

Since :
2.3
Parameters:
[in]objThe Colorselector object
Returns:
mode The current mode of the colorselector

Sets the Colorselector mode.

Since :
2.3
Remarks:
Colorselector supports three modes: palette only, selector only, and both.
Parameters:
[in]objThe colorselector object
[in]modeThe Elm_Colorselector_Mode

Clears the palette items.

Since :
2.3
Parameters:
[in]objThe Colorselector object
Elm_Object_Item* elm_colorselector_palette_color_add ( Evas_Object obj,
int  r,
int  g,
int  b,
int  a 
)

Adds a new color item to the palette.

Since :
2.3
Parameters:
[in]objThe Colorselector object
[in]rThe r-value of color
[in]gThe g-value of color
[in]bThe b-value of color
[in]aThe a-value of color
Returns:
A new color palette Item
void elm_colorselector_palette_item_color_get ( const Elm_Object_Item it,
int *  r,
int *  g,
int *  b,
int *  a 
)

Gets the Palette item's color.

Since :
2.3
Parameters:
[in]itThe color palette item
[out]rAn integer pointer for the r-value of color
[out]gAn integer pointer for the g-value of color
[out]bAn integer pointer for the b-value of color
[out]aAn integer pointer for the a-value of color
void elm_colorselector_palette_item_color_set ( Elm_Object_Item it,
int  r,
int  g,
int  b,
int  a 
)

Sets the palette item's color.

Since :
2.3
Parameters:
[in]itThe color palette item
[in]rThe r-value of color
[in]gThe g-value of color
[in]bThe b-value of color
[in]aThe a-value of color

Gets the list of palette items.

Since :
2.3
Parameters:
[in]objThe Colorselector object
Returns:
The list of color items
const char* elm_colorselector_palette_name_get ( const Evas_Object obj)

Gets the current palette's name.

Since :
2.3

This returns the currently set palette name using which colors are saved/loaded into the config.

Parameters:
[in]objThe Colorselector object
Returns:
The name of the palette
void elm_colorselector_palette_name_set ( Evas_Object obj,
const char *  palette_name 
)

Sets the current palette's name.

Since :
2.3
Remarks:
When the colorpalette name is set, colors are loaded from and saved to the config using the set name. If no name is set then colors are loaded from or saved to the "default" config.
Parameters:
[in]objThe Colorselector object
[in]palette_nameThe name of the palette

Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License