Elm_Colorselector(3)

NAME
Elm_Colorselector - Colorselector

SYNOPSIS

  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.
#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED))
Called when color item got a long press.
#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.
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.

  Functions
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.
Eina_Bool elm_colorselector_palette_item_selected_get (const Elm_Object_Item *it)
Get the selected state of color palette item.
void elm_colorselector_palette_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
Set the selected state of color palette item.
EOAPI void elm_obj_colorselector_picked_color_set (Eo *obj, int r, int g, int b, int a)
Set color to colorselector.
EOAPI void elm_obj_colorselector_picked_color_get (const Eo *obj, int *r, int *g, int *b, int *a)
Get current color from colorselector.
EOAPI void elm_obj_colorselector_palette_name_set (Eo *obj, const char *palette_name)
Set current palette's name.
EOAPI const char * elm_obj_colorselector_palette_name_get (const Eo *obj)
Get current palette's name.
EOAPI void elm_obj_colorselector_mode_set (Eo *obj, Elm_Colorselector_Mode mode)
Set Colorselector's mode.
EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get (const Eo *obj)
Get Colorselector's mode.
EOAPI const Eina_List * elm_obj_colorselector_palette_items_get (const Eo *obj)
Get list of palette items.
EOAPI Elm_Widget_Item * elm_obj_colorselector_palette_selected_item_get (const Eo *obj)
Get the selected item in colorselector palette.
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.
EOAPI void elm_obj_colorselector_palette_clear (Eo *obj)
Clear the palette items.
Evas_Object * elm_colorselector_add (Evas_Object *parent)
Add a new colorselector to the parent.

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.

•   '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.

Macro Definition Documentation

  #define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED))

Called when color item was selected.

Returns
    Efl_Object *

  #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

  enum Elm_Colorselector_Mode

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.

  enum Elm_Colorselector_Mode

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

  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

  Eina_Bool elm_colorselector_palette_item_selected_get (const Elm_Object_Item * it)

Get the selected state of color palette item.

Parameters
    it The colorpalette item

Returns
    EINA_TRUE if the item is selected, EINA_FALSE otherwise.

  void elm_colorselector_palette_item_selected_set (Elm_Object_Item * it, Eina_Bool selected)

Set the selected state of color palette item.

Parameters
    it The colorpalette item
    selected The selected state

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

Set color to colorselector.

Parameters
    obj The object.
    r Red value of color
    g Green value of color
    b Blue value of color
    a Alpha value of color

  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
    obj The object.
    r Red value of color
    g Green value of color
    b Blue value of color
    a Alpha value of color

  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
    obj The object.
    palette_name Name of palette

  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
    obj The object.

Returns
    Name of palette

  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
    obj The object.
    mode Elm_Colorselector_Mode

  EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get (const Eo * obj)

Get Colorselector's mode.

Parameters
    obj The object.

Returns
    Elm_Colorselector_Mode

  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
    obj The object.

Returns
    The list of color palette items.

Since
    1.9

  EOAPI Elm_Widget_Item* elm_obj_colorselector_palette_selected_item_get (const Eo * obj)

Get the selected item in colorselector palette.

Parameters
    obj The object.

Returns
    The selected item, or null if none selected.

Since
    1.9

  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
    obj The object.
    r Red value of color
    g Green value of color
    b Blue value of color
    a Alpha value of color

Returns
    A new color palette Item.

  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

References EINA_SAFETY_ON_NULL_RETURN_VAL.

Author

Generated automatically by Doxygen for EFL from the source code.