Data Structures | Macros | Typedefs | Enumerations | Functions
Colorselector

Data Structures

struct  _Elm_Color_RGBA
 
struct  _Elm_Custom_Palette
 

Macros

#define ELM_COLORSELECTOR_CLASS   elm_colorselector_class_get()
 Elementary colorselector class.
 
#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED   (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED))
 Called when color item was selected. More...
 
#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED   (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED))
 Called when color item got a long press. More...
 
#define ELM_COLORSELECTOR_EVENT_CHANGED   (&(_ELM_COLORSELECTOR_EVENT_CHANGED))
 Called when colorselector changed.
 
#define ELM_COLORSELECTOR_EVENT_CHANGED_USER   (&(_ELM_COLORSELECTOR_EVENT_CHANGED_USER))
 Called when the object changed due to user interaction.
 

Typedefs

typedef struct _Elm_Color_RGBA Elm_Color_RGBA
 
typedef struct _Elm_Custom_Palette Elm_Custom_Palette
 

Enumerations

enum  Elm_Colorselector_Mode {
  ELM_COLORSELECTOR_PALETTE = 0,
  ELM_COLORSELECTOR_COMPONENTS,
  ELM_COLORSELECTOR_BOTH,
  ELM_COLORSELECTOR_PICKER,
  ELM_COLORSELECTOR_ALL,
  ELM_COLORSELECTOR_PALETTE = 0,
  ELM_COLORSELECTOR_COMPONENTS,
  ELM_COLORSELECTOR_BOTH,
  ELM_COLORSELECTOR_PICKER,
  ELM_COLORSELECTOR_ALL
}
 Different modes supported by Colorselector. More...
 
enum  Elm_Colorselector_Mode {
  ELM_COLORSELECTOR_PALETTE = 0,
  ELM_COLORSELECTOR_COMPONENTS,
  ELM_COLORSELECTOR_BOTH,
  ELM_COLORSELECTOR_PICKER,
  ELM_COLORSELECTOR_ALL,
  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_colorselector_picked_color_set (Eo *obj, int r, int g, int b, int a)
 Set color to colorselector. More...
 
EOAPI void elm_obj_colorselector_picked_color_get (const Eo *obj, int *r, int *g, int *b, int *a)
 Get current color from colorselector. More...
 
EOAPI void elm_obj_colorselector_palette_name_set (Eo *obj, const char *palette_name)
 Set current palette's name. More...
 
EOAPI const char * elm_obj_colorselector_palette_name_get (const Eo *obj)
 Get current palette's name. More...
 
EOAPI void elm_obj_colorselector_mode_set (Eo *obj, Elm_Colorselector_Mode mode)
 Set Colorselector's mode. More...
 
EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get (const Eo *obj)
 Get Colorselector's mode. More...
 
EOAPI const Eina_Listelm_obj_colorselector_palette_items_get (const Eo *obj)
 Get list of palette items. More...
 
EOAPI Elm_Widget_Item * elm_obj_colorselector_palette_selected_item_get (const Eo *obj)
 Get the selected item in colorselector palette. More...
 
EOAPI Elm_Widget_Item * elm_obj_colorselector_palette_color_add (Eo *obj, int r, int g, int b, int a)
 Add a new color item to palette. More...
 
EOAPI void elm_obj_colorselector_palette_clear (Eo *obj)
 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_Listelm_colorselector_palette_items_get (const Elm_Colorselector *obj)
 Get list of palette items. More...
 
Elm_Widget_Item * elm_colorselector_palette_selected_item_get (const Elm_Colorselector *obj)
 Get the selected item in colorselector palette. More...
 
Elm_Widget_Item * elm_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.
 
void elm_colorselector_palette_item_color_get (const Elm_Object_Item *it, int *r, int *g, int *b, int *a)
 
void elm_colorselector_palette_item_color_set (Elm_Object_Item *it, int r, int g, int b, int a)
 
Eina_Bool elm_colorselector_palette_item_selected_get (const Elm_Object_Item *it)
 
void elm_colorselector_palette_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
 
Evas_Objectelm_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 tutorial_colorselector.

Macro Definition Documentation

◆ ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED

#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED   (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED))

Called when color item was selected.

Returns
Efl_Object *

◆ ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED

#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED   (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED))

Called when color item got a long press.

Returns
Efl_Object *

Enumeration Type Documentation

◆ Elm_Colorselector_Mode [1/2]

Different modes supported by Colorselector.

See also elm_obj_colorselector_mode_set, elm_obj_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.

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.

◆ Elm_Colorselector_Mode [2/2]

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.

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

◆ elm_obj_colorselector_picked_color_set()

EOAPI void elm_obj_colorselector_picked_color_set ( Eo obj,
int  r,
int  g,
int  b,
int  a 
)

Set color to colorselector.

Parameters
[in]objThe object.
[in]rRed value of color
[in]gGreen value of color
[in]bBlue value of color
[in]aAlpha value of color

Referenced by elm_colorselector_color_set().

◆ elm_obj_colorselector_picked_color_get()

EOAPI void elm_obj_colorselector_picked_color_get ( const Eo obj,
int *  r,
int *  g,
int *  b,
int *  a 
)

Get current color from colorselector.

Parameters
[in]objThe object.
[out]rRed value of color
[out]gGreen value of color
[out]bBlue value of color
[out]aAlpha value of color

Referenced by elm_colorselector_color_get().

◆ elm_obj_colorselector_palette_name_set()

EOAPI void elm_obj_colorselector_palette_name_set ( Eo 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]objThe object.
[in]palette_nameName of palette

Referenced by elm_colorselector_palette_name_set().

◆ elm_obj_colorselector_palette_name_get()

EOAPI const char* elm_obj_colorselector_palette_name_get ( const Eo obj)

Get current palette's name.

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

Parameters
[in]objThe object.
Returns
Name of palette

Referenced by elm_colorselector_palette_name_get().

◆ elm_obj_colorselector_mode_set()

EOAPI void elm_obj_colorselector_mode_set ( Eo obj,
Elm_Colorselector_Mode  mode 
)

Set Colorselector's mode.

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

Parameters
[in]objThe object.
[in]modeElm_Colorselector_Mode

Referenced by elm_colorselector_mode_set().

◆ elm_obj_colorselector_mode_get()

EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get ( const Eo obj)

Get Colorselector's mode.

Parameters
[in]objThe object.
Returns
Elm_Colorselector_Mode

Referenced by elm_colorselector_mode_get().

◆ elm_obj_colorselector_palette_items_get()

EOAPI const Eina_List* elm_obj_colorselector_palette_items_get ( const Eo obj)

Get list of palette items.

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

Parameters
[in]objThe object.
Returns
The list of color palette items.
Since
1.9

Referenced by elm_colorselector_palette_items_get().

◆ elm_obj_colorselector_palette_selected_item_get()

EOAPI Elm_Widget_Item* elm_obj_colorselector_palette_selected_item_get ( const Eo obj)

Get the selected item in colorselector palette.

Parameters
[in]objThe object.
Returns
The selected item, or null if none selected.
Since
1.9

Referenced by elm_colorselector_palette_selected_item_get().

◆ elm_obj_colorselector_palette_color_add()

EOAPI Elm_Widget_Item* elm_obj_colorselector_palette_color_add ( Eo obj,
int  r,
int  g,
int  b,
int  a 
)

Add a new color item to palette.

Parameters
[in]objThe object.
[in]rRed value of color
[in]gGreen value of color
[in]bBlue value of color
[in]aAlpha value of color
Returns
A new color palette Item.

Referenced by elm_colorselector_palette_color_add().

◆ elm_colorselector_color_set()

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

Set color to colorselector.

Parameters
[in]objThe object.
[in]rRed value of color
[in]gGreen value of color
[in]bBlue value of color
[in]aAlpha value of color

References elm_obj_colorselector_picked_color_set().

◆ elm_colorselector_color_get()

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

Get current color from colorselector.

Parameters
[in]objThe object.
[out]rRed value of color
[out]gGreen value of color
[out]bBlue value of color
[out]aAlpha value of color

References elm_obj_colorselector_picked_color_get().

◆ elm_colorselector_palette_name_set()

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]objThe object.
[in]palette_nameName of palette

References elm_obj_colorselector_palette_name_set().

◆ elm_colorselector_palette_name_get()

const char* elm_colorselector_palette_name_get ( const Elm_Colorselector *  obj)

Get current palette's name.

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

Parameters
[in]objThe object.
Returns
Name of palette

References elm_obj_colorselector_palette_name_get().

◆ elm_colorselector_mode_set()

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]objThe object.
[in]modeElm_Colorselector_Mode

References elm_obj_colorselector_mode_set().

◆ elm_colorselector_mode_get()

Elm_Colorselector_Mode elm_colorselector_mode_get ( const Elm_Colorselector *  obj)

Get Colorselector's mode.

Parameters
[in]objThe object.
Returns
Elm_Colorselector_Mode

References elm_obj_colorselector_mode_get().

◆ elm_colorselector_palette_items_get()

const Eina_List* elm_colorselector_palette_items_get ( const Elm_Colorselector *  obj)

Get list of palette items.

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

Parameters
[in]objThe object.
Returns
The list of color palette items.
Since
1.9

References elm_obj_colorselector_palette_items_get().

◆ elm_colorselector_palette_selected_item_get()

Elm_Widget_Item* elm_colorselector_palette_selected_item_get ( const Elm_Colorselector *  obj)

Get the selected item in colorselector palette.

Parameters
[in]objThe object.
Returns
The selected item, or null if none selected.
Since
1.9

References elm_obj_colorselector_palette_selected_item_get().

◆ elm_colorselector_palette_color_add()

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

Add a new color item to palette.

Parameters
[in]objThe object.
[in]rRed value of color
[in]gGreen value of color
[in]bBlue value of color
[in]aAlpha value of color
Returns
A new color palette Item.

References elm_obj_colorselector_palette_color_add().

◆ elm_colorselector_add()

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