2 * @defgroup Colorselector Colorselector
6 * @image html img/widget/colorselector/preview-00.png
7 * @image latex img/widget/colorselector/preview-00.eps
9 * @brief Widget for user to select a color.
11 * Signals that you can add callbacks for are:
12 * "changed" - When the color value changes(event_info is NULL).
14 * See @ref tutorial_colorselector.
19 ELM_COLORSELECTOR_PALETTE = 0,
20 ELM_COLORSELECTOR_COMPONENTS,
21 ELM_COLORSELECTOR_BOTH
22 } Elm_Colorselector_Mode;
25 * @brief Add a new colorselector to the parent
27 * @param parent The parent object
28 * @return The new object or NULL if it cannot be created
30 * @ingroup Colorselector
32 EAPI Evas_Object *elm_colorselector_add(Evas_Object *parent);
35 * Set a color for the colorselector
37 * @param obj Colorselector object
38 * @param r r-value of color
39 * @param g g-value of color
40 * @param b b-value of color
41 * @param a a-value of color
43 * @ingroup Colorselector
45 EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a);
48 * Get a color from the colorselector
50 * @param obj Colorselector object
51 * @param r integer pointer for r-value of color
52 * @param g integer pointer for g-value of color
53 * @param b integer pointer for b-value of color
54 * @param a integer pointer for a-value of color
56 * @ingroup Colorselector
58 EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
61 * Set a Colorselector mode.
64 * @param obj Colorselector object
66 * @param g G color value to be returned
67 * @param b B color value to be returned
68 * @param a A color value to be returned
70 * @ingroup Colorselector
72 EAPI void elm_colorselector_mode_set(Evas_Object *obj, Elm_Colorselector_Mode mode);
75 * Get a Colorselector mode.
77 * @param item The color palette item.
78 * @param r R color value to be returned
79 * @param g G color value to be returned
80 * @param b B color value to be returned
81 * @param a A color value to be returned
83 * @ingroup Colorselector
85 EAPI Elm_Colorselector_Mode elm_colorselector_mode_get(const Evas_Object *obj);
88 * Get a palette item's color.
90 * @param item The color palette item.
91 * @param r integer pointer for r-value of color
92 * @param g integer pointer for g-value of color
93 * @param b integer pointer for b-value of color
94 * @param a integer pointer for a-value of color
96 * @ingroup Colorselector
98 EAPI void elm_colorselector_palette_item_color_get(const Elm_Object_Item *it, int *r, int *g, int *b, int *a);
101 * Set the palette item's color.
103 * @param item The color paltte item.
104 * @param r r-value of color
105 * @param g g-value of color
106 * @param b b-value of color
107 * @param a a-value of color
109 * @ingroup Colorselector
111 EAPI void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a);
114 * Add a new color item to palette.
116 * @param obj The Colorselector object
117 * @param r r-value of color
118 * @param g g-value of color
119 * @param b b-value of color
120 * @param a a-value of color
121 * @return A new color palette Item.
123 * @ingroup Colorselector
125 EAPI Elm_Object_Item *elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a);
128 * Clear the palette items.
130 * @param obj The Colorselector object
132 * @note This API will be available when ELM_COLORSELECTOR_PALETTE or
133 * ELM_COLORSELECTOR_BOTH mode is set.
135 * @ingroup Colorselector
137 EAPI void elm_colorselector_palette_clear(Evas_Object *obj);
140 * Set current palette's name
142 * @param obj The Colorselector object
143 * @param palette_name Name of palette
145 * When colorpalette name is set, colors will be loaded from and saved to config
146 * using the set name. If no name is set then colors will be loaded from or
147 * saved to "default" config.
149 * @ingroup Colorselector
151 EAPI void elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name);
154 * Get current palette's name
156 * @param obj The Colorselector object
157 * @return Name of palette
159 * Returns the currently set palette name using which colors will be
160 * saved/loaded in to config.
162 * @ingroup Colorselector
164 EAPI const char *elm_colorselector_palette_name_get(const Evas_Object *obj);