Enumerations | Functions
Colorselector

Enumerations

enum  Elm_Colorselector_Mode {
  ELM_COLORSELECTOR_PALETTE = 0,
  ELM_COLORSELECTOR_COMPONENTS,
  ELM_COLORSELECTOR_BOTH,
  ELM_COLORSELECTOR_PICKER,
  ELM_COLORSELECTOR_ALL
}
 Different modes supported by Colorselector. More...
 

Functions

EOAPI void elm_obj_color_item_color_set (int r, int g, int b, int a)
 Set Palette item's color. More...
 
EOAPI void elm_obj_color_item_color_get (int *r, int *g, int *b, int *a)
 Get Palette item's color. More...
 
EOAPI void elm_obj_color_item_selected_set (Eina_Bool selected)
 Set the selected state of color palette item. More...
 
EOAPI Eina_Bool elm_obj_color_item_selected_get (void)
 Get the selected state of color palette item. More...
 
void elm_color_item_color_set (Elm_Color_Item *obj, int r, int g, int b, int a)
 Set Palette item's color. More...
 
void elm_color_item_color_get (const Elm_Color_Item *obj, int *r, int *g, int *b, int *a)
 Get Palette item's color. More...
 
void elm_color_item_selected_set (Elm_Color_Item *obj, Eina_Bool selected)
 Set the selected state of color palette item. More...
 
Eina_Bool elm_color_item_selected_get (const Elm_Color_Item *obj)
 Get the selected state of color palette item. More...
 
EOAPI void elm_obj_colorselector_color_set (int r, int g, int b, int a)
 Set color to colorselector. More...
 
EOAPI void elm_obj_colorselector_color_get (int *r, int *g, int *b, int *a)
 Get current color from colorselector. More...
 
EOAPI void elm_obj_colorselector_palette_name_set (const char *palette_name)
 Set current palette's name. More...
 
EOAPI const char * elm_obj_colorselector_palette_name_get (void)
 Get current palette's name. More...
 
EOAPI void elm_obj_colorselector_mode_set (Elm_Colorselector_Mode mode)
 Set Colorselector's mode. More...
 
EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get (void)
 Get Colorselector's mode. More...
 
EOAPI const Eina_List * elm_obj_colorselector_palette_items_get (void)
 Get list of palette items. More...
 
EOAPI Elm_Object_Itemelm_obj_colorselector_palette_selected_item_get (void)
 Get the selected item in colorselector palette. More...
 
EOAPI Elm_Object_Itemelm_obj_colorselector_palette_color_add (int r, int g, int b, int a)
 Add a new color item to palette. More...
 
EOAPI void elm_obj_colorselector_palette_clear (void)
 Clear the palette items.
 
void elm_colorselector_color_set (Elm_Colorselector *obj, int r, int g, int b, int a)
 Set color to colorselector. More...
 
void elm_colorselector_color_get (const Elm_Colorselector *obj, int *r, int *g, int *b, int *a)
 Get current color from colorselector. More...
 
void elm_colorselector_palette_name_set (Elm_Colorselector *obj, const char *palette_name)
 Set current palette's name. More...
 
const char * elm_colorselector_palette_name_get (const Elm_Colorselector *obj)
 Get current palette's name. More...
 
void elm_colorselector_mode_set (Elm_Colorselector *obj, Elm_Colorselector_Mode mode)
 Set Colorselector's mode. More...
 
Elm_Colorselector_Mode elm_colorselector_mode_get (const Elm_Colorselector *obj)
 Get Colorselector's mode. More...
 
const Eina_List * elm_colorselector_palette_items_get (const Elm_Colorselector *obj)
 Get list of palette items. More...
 
Elm_Object_Itemelm_colorselector_palette_selected_item_get (const Elm_Colorselector *obj)
 Get the selected item in colorselector palette. More...
 
Elm_Object_Itemelm_colorselector_palette_color_add (Elm_Colorselector *obj, int r, int g, int b, int a)
 Add a new color item to palette. More...
 
void elm_colorselector_palette_clear (Elm_Colorselector *obj)
 Clear the palette items.
 
Evas_Object * elm_colorselector_add (Evas_Object *parent)
 Add a new colorselector to the parent. More...
 

Detailed Description

colorselector_inheritance_tree.png
preview-00.png

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:

See Color selector example.

Enumeration Type Documentation

Different modes supported by Colorselector.

See also
elm_colorselector_mode_set()
elm_colorselector_mode_get()
Enumerator
ELM_COLORSELECTOR_PALETTE 

only color palette is displayed

ELM_COLORSELECTOR_COMPONENTS 

only color selector is displayed

ELM_COLORSELECTOR_BOTH 

Both Palette and selector is displayed, default.

ELM_COLORSELECTOR_PICKER 

only color picker is displayed

ELM_COLORSELECTOR_ALL 

all possible color selector is displayed

Function Documentation

void elm_color_item_color_get ( const Elm_Color_Item *  obj,
int *  r,
int *  g,
int *  b,
int *  a 
)

Get Palette item's color.

Parameters
[out]rred-value of color
[out]ggreen-value of color
[out]bblue-value of color
[out]aalpha-value of color

References elm_obj_color_item_color_get().

void elm_color_item_color_set ( Elm_Color_Item *  obj,
int  r,
int  g,
int  b,
int  a 
)

Set Palette item's color.

Parameters
[in]rred-value of color
[in]ggreen-value of color
[in]bblue-value of color
[in]aalpha-value of color

References elm_obj_color_item_color_set().

Eina_Bool elm_color_item_selected_get ( const Elm_Color_Item *  obj)

Get the selected state of color palette item.

Since
1.9

References elm_obj_color_item_selected_get().

void elm_color_item_selected_set ( Elm_Color_Item *  obj,
Eina_Bool  selected 
)

Set the selected state of color palette item.

Since
1.9
Parameters
[in]selectedEINA_TRUE if selected EINA_FALSE otherwise

References elm_obj_color_item_selected_set().

Evas_Object* elm_colorselector_add ( Evas_Object *  parent)

Add a new colorselector to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
void elm_colorselector_color_get ( const Elm_Colorselector *  obj,
int *  r,
int *  g,
int *  b,
int *  a 
)

Get current color from colorselector.

Parameters
[out]rr-value of color
[out]gg-value of color
[out]bb-value of color
[out]aa-value of color

References elm_obj_colorselector_color_get().

void elm_colorselector_color_set ( Elm_Colorselector *  obj,
int  r,
int  g,
int  b,
int  a 
)

Set color to colorselector.

Parameters
[in]rr-value of color
[in]gg-value of color
[in]bb-value of color
[in]aa-value of color

References elm_obj_colorselector_color_set().

Elm_Colorselector_Mode elm_colorselector_mode_get ( const Elm_Colorselector *  obj)

Get Colorselector's mode.

Returns
mode The current mode of colorselector

References elm_obj_colorselector_mode_get().

void elm_colorselector_mode_set ( Elm_Colorselector *  obj,
Elm_Colorselector_Mode  mode 
)

Set Colorselector's mode.

Colorselector supports three modes palette only, selector only and both.

Parameters
[in]modeElm_Colorselector_Mode

References elm_obj_colorselector_mode_set().

Elm_Object_Item* elm_colorselector_palette_color_add ( Elm_Colorselector *  obj,
int  r,
int  g,
int  b,
int  a 
)

Add a new color item to palette.

Returns
A new color palette Item.
Parameters
[in]rr-value of color
[in]gg-value of color
[in]bb-value of color
[in]aa-value of color

References elm_obj_colorselector_palette_color_add().

const Eina_List* elm_colorselector_palette_items_get ( const Elm_Colorselector *  obj)

Get list of palette items.

Returns
The list of color palette items.

Note That palette item list is internally managed by colorselector widget and it should not be freed/modified by application.

Since
1.9

References elm_obj_colorselector_palette_items_get().

const char* elm_colorselector_palette_name_get ( const Elm_Colorselector *  obj)

Get current palette's name.

Returns
Name of palette

Returns the currently set palette name using which colors will be saved/loaded in to config.

References elm_obj_colorselector_palette_name_get().

void elm_colorselector_palette_name_set ( Elm_Colorselector *  obj,
const char *  palette_name 
)

Set current palette's name.

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.

Parameters
[in]palette_nameName of palette

References elm_obj_colorselector_palette_name_set().

Elm_Object_Item* elm_colorselector_palette_selected_item_get ( const Elm_Colorselector *  obj)

Get the selected item in colorselector palette.

Returns
The selected item, or NULL if none is selected.
Since
1.9

References elm_obj_colorselector_palette_selected_item_get().

EOAPI void elm_obj_color_item_color_get ( int *  r,
int *  g,
int *  b,
int *  a 
)

Get Palette item's color.

Parameters
[out]rred-value of color
[out]ggreen-value of color
[out]bblue-value of color
[out]aalpha-value of color

Referenced by elm_color_item_color_get().

EOAPI void elm_obj_color_item_color_set ( int  r,
int  g,
int  b,
int  a 
)

Set Palette item's color.

Parameters
[in]rred-value of color
[in]ggreen-value of color
[in]bblue-value of color
[in]aalpha-value of color

Referenced by elm_color_item_color_set().

EOAPI Eina_Bool elm_obj_color_item_selected_get ( void  )

Get the selected state of color palette item.

Since
1.9

Referenced by elm_color_item_selected_get().

EOAPI void elm_obj_color_item_selected_set ( Eina_Bool  selected)

Set the selected state of color palette item.

Since
1.9
Parameters
[in]selectedEINA_TRUE if selected EINA_FALSE otherwise

Referenced by elm_color_item_selected_set().

EOAPI void elm_obj_colorselector_color_get ( int *  r,
int *  g,
int *  b,
int *  a 
)

Get current color from colorselector.

Parameters
[out]rr-value of color
[out]gg-value of color
[out]bb-value of color
[out]aa-value of color

Referenced by elm_colorselector_color_get().

EOAPI void elm_obj_colorselector_color_set ( int  r,
int  g,
int  b,
int  a 
)

Set color to colorselector.

Parameters
[in]rr-value of color
[in]gg-value of color
[in]bb-value of color
[in]aa-value of color

Referenced by elm_colorselector_color_set().

EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get ( void  )

Get Colorselector's mode.

Returns
mode The current mode of colorselector

Referenced by elm_colorselector_mode_get().

EOAPI void elm_obj_colorselector_mode_set ( Elm_Colorselector_Mode  mode)

Set Colorselector's mode.

Colorselector supports three modes palette only, selector only and both.

Parameters
[in]modeElm_Colorselector_Mode

Referenced by elm_colorselector_mode_set().

EOAPI Elm_Object_Item* elm_obj_colorselector_palette_color_add ( int  r,
int  g,
int  b,
int  a 
)

Add a new color item to palette.

Returns
A new color palette Item.
Parameters
[in]rr-value of color
[in]gg-value of color
[in]bb-value of color
[in]aa-value of color

Referenced by elm_colorselector_palette_color_add().

EOAPI const Eina_List* elm_obj_colorselector_palette_items_get ( void  )

Get list of palette items.

Returns
The list of color palette items.

Note That palette item list is internally managed by colorselector widget and it should not be freed/modified by application.

Since
1.9

Referenced by elm_colorselector_palette_items_get().

EOAPI const char* elm_obj_colorselector_palette_name_get ( void  )

Get current palette's name.

Returns
Name of palette

Returns the currently set palette name using which colors will be saved/loaded in to config.

Referenced by elm_colorselector_palette_name_get().

EOAPI void elm_obj_colorselector_palette_name_set ( const char *  palette_name)

Set current palette's name.

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.

Parameters
[in]palette_nameName of palette

Referenced by elm_colorselector_palette_name_set().

EOAPI Elm_Object_Item* elm_obj_colorselector_palette_selected_item_get ( void  )

Get the selected item in colorselector palette.

Returns
The selected item, or NULL if none is selected.
Since
1.9

Referenced by elm_colorselector_palette_selected_item_get().