- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
Edje Class: Color
Edje Object

Functions that deal with Color Classes. More...

## Functions
Eina_Bool | edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
| Set Edje color class. More...
Eina_Bool | edje_color_class_get (const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
| Get Edje color class. More...
void | edje_color_class_del (const char *color_class)
| Delete edje color class. More...
Eina_List * | edje_color_class_list (void)
| Lists color classes. More...
#define | edje_obj_color_class_set(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_SET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(int, r2), EO_TYPECHECK(int, g2), EO_TYPECHECK(int, b2), EO_TYPECHECK(int, a2), EO_TYPECHECK(int, r3), EO_TYPECHECK(int, g3), EO_TYPECHECK(int, b3), EO_TYPECHECK(int, a3), EO_TYPECHECK(Eina_Bool *, ret)
| Sets the object color class. More...
#define | edje_obj_color_class_get(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_GET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a), EO_TYPECHECK(int *, r2), EO_TYPECHECK(int *, g2), EO_TYPECHECK(int *, b2), EO_TYPECHECK(int *, a2), EO_TYPECHECK(int *, r3), EO_TYPECHECK(int *, g3), EO_TYPECHECK(int *, b3), EO_TYPECHECK(int *, a3), EO_TYPECHECK(Eina_Bool *, ret)
| Gets the object color class. More...
Eina_Bool | edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
| Sets the object color class. More...
Eina_Bool | edje_object_color_class_get (const Evas_Object *o, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
| Gets the object color class. More...
void | edje_object_color_class_del (Evas_Object *obj, const char *color_class)
| Delete the object color class. More...

## Detailed Description

Functions that deal with Color Classes.

Sometimes we want to change the color of two or more parts equally and that's when we use color classes.

If one or more parts are assigned with a color class, when we set color values to this class it will cause all these parts to have their colors multiplied by the values. Setting values to a color class at a process level will affect all parts with that color class, while at a object level will affect only the parts inside an specified object.

## Macro Definition Documentation

#define edje_obj_color_class_set | ( |  | color_class,
|  |  | r,
|  |  | g,
|  |  | b,
|  |  | a,
|  |  | r2,
|  |  | g2,
|  |  | b2,
|  |  | a2,
|  |  | r3,
|  |  | g3,
|  |  | b3,
|  |  | a3,
|  |  | ret
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_SET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(int, r2), EO_TYPECHECK(int, g2), EO_TYPECHECK(int, b2), EO_TYPECHECK(int, a2), EO_TYPECHECK(int, r3), EO_TYPECHECK(int, g3), EO_TYPECHECK(int, b3), EO_TYPECHECK(int, a3), EO_TYPECHECK(Eina_Bool *, ret)

Sets the object color class.

Since
  1.8

Parameters

  [in] | color_class |
  [in] | r |
  [in] | g |
  [in] | b |
  [in] | a |
  [in] | r2 |
  [in] | g2 |
  [in] | b2 |
  [in] | a2 |
  [in] | r3 |
  [in] | g3 |
  [in] | b3 |
  [in] | a3 |
  [out] | ret |

See Also
  edje_object_color_class_set

Referenced by edje_object_color_class_set().

#define edje_obj_color_class_get | ( |  | color_class,
|  |  | r,
|  |  | g,
|  |  | b,
|  |  | a,
|  |  | r2,
|  |  | g2,
|  |  | b2,
|  |  | a2,
|  |  | r3,
|  |  | g3,
|  |  | b3,
|  |  | a3,
|  |  | ret
| ) |  | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_GET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a), EO_TYPECHECK(int *, r2), EO_TYPECHECK(int *, g2), EO_TYPECHECK(int *, b2), EO_TYPECHECK(int *, a2), EO_TYPECHECK(int *, r3), EO_TYPECHECK(int *, g3), EO_TYPECHECK(int *, b3), EO_TYPECHECK(int *, a3), EO_TYPECHECK(Eina_Bool *, ret)

Gets the object color class.

Since
  1.8

Parameters

  [in] | color_class |
  [out] | r |
  [out] | g |
  [out] | b |
  [out] | a |
  [out] | r2 |
  [out] | g2 |
  [out] | b2 |
  [out] | a2 |
  [out] | r3 |
  [out] | g3 |
  [out] | b3 |
  [out] | a3 |
  [out] | ret |

See Also
  edje_object_color_class_get

Referenced by edje_object_color_class_get().

## Function Documentation

Eina_Bool edje_color_class_set | ( | const char * | color_class,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a,
|  | int | r2,
|  | int | g2,
|  | int | b2,
|  | int | a2,
|  | int | r3,
|  | int | g3,
|  | int | b3,
|  | int | a3
| ) |  |

Set Edje color class.

Parameters

  color_class |
  r | Object Red value
  g | Object Green value
  b | Object Blue value
  a | Object Alpha value
  r2 | Outline Red value
  g2 | Outline Green value
  b2 | Outline Blue value
  a2 | Outline Alpha value
  r3 | Shadow Red value
  g3 | Shadow Green value
  b3 | Shadow Blue value
  a3 | Shadow Alpha value

This function sets the color values for a process level color class. This will cause all edje parts in the current process that have the specified color class to have their colors multiplied by these values. (Object level color classes set by edje_object_color_class_set() will override the values set by this function).

The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).

Setting color emits a signal "color_class,set" with source being the given color class in all objects.

See Also
  edje_color_class_set().

Note
  unlike Evas, Edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.

Examples:
  edje-color-class.c.

References EINA_FALSE, eina_hash_add(), eina_hash_find(), eina_hash_string_superfast_new(), eina_list_data_get(), eina_list_next(), eina_stringshare_add(), and EINA_TRUE.

Eina_Bool edje_color_class_get | ( | const char * | color_class,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a,
|  | int * | r2,
|  | int * | g2,
|  | int * | b2,
|  | int * | a2,
|  | int * | r3,
|  | int * | g3,
|  | int * | b3,
|  | int * | a3
| ) |  |

Get Edje color class.

Parameters

  color_class |
  r | Object Red value
  g | Object Green value
  b | Object Blue value
  a | Object Alpha value
  r2 | Outline Red value
  g2 | Outline Green value
  b2 | Outline Blue value
  a2 | Outline Alpha value
  r3 | Shadow Red value
  g3 | Shadow Green value
  b3 | Shadow Blue value
  a3 | Shadow Alpha value

Returns
  EINA_TRUE if found or EINA_FALSE if not found and all values are zeroed.

This function gets the color values for a process level color class. This value is the globally set and not per-object, that is, the value that would be used by objects if they did not override with edje_object_color_class_set().

The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).

See Also
  edje_color_class_set().

Note
  unlike Evas, Edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.

Examples:
  edje-color-class.c.

References EINA_FALSE, eina_hash_find(), and EINA_TRUE.

void edje_color_class_del | ( | const char * | color_class | ) |

Delete edje color class.

Parameters

  color_class | This function deletes any values at the process level for the specified color class.

Note
  Deleting the color class will revert it to the values defined in the theme file.

Deleting the color class will emit the signal "color_class,del" to all the Edje objects in the running program.

Examples:
  edje-color-class.c.

References eina_hash_del(), eina_hash_find(), eina_list_data_get(), eina_list_next(), eina_stringshare_del(), and EINA_TRUE.

Eina_List* edje_color_class_list | ( | void |  | ) |

Lists color classes.

Returns
  A list of color class names (strings). These strings and the list must be free()'d by the caller.

This function lists all color classes known about by the current process.

Examples:
  edje-color-class.c.

References eina_hash_foreach().

Eina_Bool edje_object_color_class_set | ( | Evas_Object * | obj,
|  | const char * | color_class,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a,
|  | int | r2,
|  | int | g2,
|  | int | b2,
|  | int | a2,
|  | int | r3,
|  | int | g3,
|  | int | b3,
|  | int | a3
| ) |  |

Sets the object color class.

Parameters

  obj | A valid Evas_Object handle
  color_class |
  r | Object Red value
  g | Object Green value
  b | Object Blue value
  a | Object Alpha value
  r2 | Outline Red value
  g2 | Outline Green value
  b2 | Outline Blue value
  a2 | Outline Alpha value
  r3 | Shadow Red value
  g3 | Shadow Green value
  b3 | Shadow Blue value
  a3 | Shadow Alpha value

This function sets the color values for an object level color class. This will cause all edje parts in the specified object that have the specified color class to have their colors multiplied by these values.

The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).

Setting color emits a signal "color_class,set" with source being the given color.

Note
  unlike Evas, Edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.

Examples:
  edje-color-class.c.

References edje_obj_color_class_set, and EINA_FALSE.

Eina_Bool edje_object_color_class_get | ( | const Evas_Object * | o,
|  | const char * | color_class,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a,
|  | int * | r2,
|  | int * | g2,
|  | int * | b2,
|  | int * | a2,
|  | int * | r3,
|  | int * | g3,
|  | int * | b3,
|  | int * | a3
| ) |  |

Gets the object color class.

Parameters

  o | A valid Evas_Object handle
  color_class |
  r | Object Red value
  g | Object Green value
  b | Object Blue value
  a | Object Alpha value
  r2 | Outline Red value
  g2 | Outline Green value
  b2 | Outline Blue value
  a2 | Outline Alpha value
  r3 | Shadow Red value
  g3 | Shadow Green value
  b3 | Shadow Blue value
  a3 | Shadow Alpha value

Returns
  EINA_TRUE if found or EINA_FALSE if not found and all values are zeroed.

This function gets the color values for an object level color class. If no explicit object color is set, then global values will be used.

The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).

Note
  unlike Evas, Edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.

References edje_obj_color_class_get, and EINA_FALSE.

void edje_object_color_class_del | ( | Evas_Object * | obj,
|  | const char * | color_class
| ) |  |

Delete the object color class.

Parameters

  obj | The edje object's reference.
  color_class | The color class to be deleted.

This function deletes any values at the object level for the specified object and color class.

Note
  Deleting the color class will revert it to the values defined by edje_color_class_set() or the color class defined in the theme file.

Deleting the color class will emit the signal "color_class,del" for the given Edje object.

Examples:
  edje-color-class.c.

References eina_hash_del(), and EINA_TRUE.