- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Colorselector

## Macros
#define | elm_obj_colorselector_color_set(r, g, b, a) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a)
#define | elm_obj_colorselector_color_get(r, g, b, a) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a)
#define | elm_obj_colorselector_mode_set(mode) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_Colorselector_Mode, mode)
#define | elm_obj_colorselector_mode_get(ret) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_Colorselector_Mode *, ret)
#define | elm_obj_colorselector_palette_color_add(r, g, b, a, ret) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_COLOR_ADD), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_colorselector_palette_clear() ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_CLEAR)
#define | elm_obj_colorselector_palette_name_set(palette_name) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_NAME_SET), EO_TYPECHECK(const char *, palette_name)
#define | elm_obj_colorselector_palette_name_get(ret) ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_NAME_GET), EO_TYPECHECK(const char **, ret)

## 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. More...
void | elm_colorselector_palette_item_color_set (Elm_Object_Item *it, int r, int g, int b, int a)
| Set palette item's color. More...
Evas_Object * | elm_colorselector_add (Evas_Object *parent)
| Add a new colorselector to the parent. More...
void | elm_colorselector_color_set (Evas_Object *obj, int r, int g, int b, int a)
| Set color to colorselector. More...
void | elm_colorselector_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a)
| Get current color from colorselector. More...
void | elm_colorselector_mode_set (Evas_Object *obj, Elm_Colorselector_Mode mode)
| Set Colorselector's mode. More...
Elm_Colorselector_Mode | elm_colorselector_mode_get (const Evas_Object *obj)
| Get Colorselector's mode. More...
Elm_Object_Item * | elm_colorselector_palette_color_add (Evas_Object *obj, int r, int g, int b, int a)
| Add a new color item to palette. More...
void | elm_colorselector_palette_clear (Evas_Object *obj)
| Clear the palette items. More...
void | elm_colorselector_palette_name_set (Evas_Object *obj, const char *palette_name)
| Set current palette's name. More...
const char * | elm_colorselector_palette_name_get (const Evas_Object *obj)
| Get current palette's name. More...

## 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)

See Color selector example.

## Macro Definition Documentation

#define elm_obj_colorselector_color_get | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a
| ) |  | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a)

Since
  1.8

Get current color from colorselector

Parameters

  [out] | r |
  [out] | g |
  [out] | b |
  [out] | a |

See Also
  elm_colorselector_color_get

Referenced by elm_colorselector_color_get().

#define elm_obj_colorselector_color_set | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a
| ) |  | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a)

Since
  1.8

Set color to colorselector

Parameters

  [in] | r |
  [in] | g |
  [in] | b |
  [in] | a |

See Also
  elm_colorselector_color_set

Referenced by elm_colorselector_color_set().

#define elm_obj_colorselector_mode_get | ( |  | ret | ) | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_Colorselector_Mode *, ret)

Since
  1.8

Get Colorselector's mode.

Parameters

  [out] | ret |

See Also
  elm_colorselector_mode_get

Referenced by elm_colorselector_mode_get().

#define elm_obj_colorselector_mode_set | ( |  | mode | ) | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_Colorselector_Mode, mode)

Since
  1.8

Set Colorselector's mode.

Parameters

  [in] | mode |

See Also
  elm_colorselector_mode_set

Referenced by elm_colorselector_mode_set().

#define elm_obj_colorselector_palette_clear | ( |  | ) | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_CLEAR)

Since
  1.8

Clear the palette items.

See Also
  elm_colorselector_palette_clear

Referenced by elm_colorselector_palette_clear().

#define elm_obj_colorselector_palette_color_add | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a,
|  |  | ret
| ) |  | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_COLOR_ADD), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Add a new color item to palette.

Parameters

  [in] | r |
  [in] | g |
  [in] | b |
  [in] | a |
  [out] | ret |

See Also
  elm_colorselector_palette_color_add

Referenced by elm_colorselector_palette_color_add().

#define elm_obj_colorselector_palette_name_get | ( |  | ret | ) | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_NAME_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get current palette's name

Parameters

  [out] | ret |

See Also
  elm_colorselector_palette_name_get

Referenced by elm_colorselector_palette_name_get().

#define elm_obj_colorselector_palette_name_set | ( |  | palette_name | ) | ELM_OBJ_COLORSELECTOR_ID(ELM_OBJ_COLORSELECTOR_SUB_ID_PALETTE_NAME_SET), EO_TYPECHECK(const char *, palette_name)

Since
  1.8

Set current palette's name

Parameters

  [in] | palette_name |

See Also
  elm_colorselector_palette_name_set

Referenced by elm_colorselector_palette_name_set().

## Function Documentation

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

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

Get current color from colorselector.

Parameters

  obj | Colorselector object
  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

References elm_obj_colorselector_color_get.

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

Set color to colorselector.

Parameters

  obj | Colorselector object
  r | r-value of color
  g | g-value of color
  b | b-value of color
  a | a-value of color

References elm_obj_colorselector_color_set.

Elm_Colorselector_Mode elm_colorselector_mode_get | ( | const Evas_Object * | obj | ) |

Get Colorselector's mode.

Parameters

  obj | Colorselector object

Returns
  mode The current mode of colorselector

References elm_obj_colorselector_mode_get.

void elm_colorselector_mode_set | ( | Evas_Object * | obj,
|  | Elm_Colorselector_Mode | mode
| ) |  |

Set Colorselector's mode.

Parameters

  obj | Colorselector object
  mode | Elm_Colorselector_Mode

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

References elm_obj_colorselector_mode_set.

void elm_colorselector_palette_clear | ( | Evas_Object * | obj | ) |

Clear the palette items.

Parameters

  obj | The Colorselector object

References elm_obj_colorselector_palette_clear.

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

Add a new color item to palette.

Parameters

  obj | The Colorselector object
  r | r-value of color
  g | g-value of color
  b | b-value of color
  a | a-value of color

Returns
  A new color palette Item.

References elm_obj_colorselector_palette_color_add.

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

const char* elm_colorselector_palette_name_get | ( | const Evas_Object * | obj | ) |

Get current palette's name.

Parameters

  obj | The Colorselector object

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 | ( | Evas_Object * | obj,
|  | const char * | palette_name
| ) |  |

Set current palette's name.

Parameters

  obj | The Colorselector object
  palette_name | Name of palette

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.

References elm_obj_colorselector_palette_name_set.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12