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.
21 ELM_COLORSELECTOR_PALETTE = 0,
22 ELM_COLORSELECTOR_COMPONENTS,
23 ELM_COLORSELECTOR_BOTH
24 } Elm_Colorselector_Mode;
26 >>>>>>> remotes/origin/upstream
28 * @brief Add a new colorselector to the parent
30 * @param parent The parent object
31 * @return The new object or NULL if it cannot be created
33 * @ingroup Colorselector
35 EAPI Evas_Object *elm_colorselector_add(Evas_Object *parent);
38 * Set a color for the colorselector
40 * @param obj Colorselector object
41 * @param r r-value of color
42 * @param g g-value of color
43 * @param b b-value of color
44 * @param a a-value of color
46 * @ingroup Colorselector
48 EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a);
51 * Get a color from the colorselector
53 * @param obj Colorselector object
54 * @param r integer pointer for r-value of color
55 * @param g integer pointer for g-value of color
56 * @param b integer pointer for b-value of color
57 * @param a integer pointer for a-value of color
59 * @ingroup Colorselector
61 EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
66 * Set a Colorselector mode.
69 * @param obj Colorselector object
71 * @param g G color value to be returned
72 * @param b B color value to be returned
73 * @param a A color value to be returned
75 * @ingroup Colorselector
77 EAPI void elm_colorselector_mode_set(Evas_Object *obj, Elm_Colorselector_Mode mode);
80 * Get a Colorselector mode.
82 * @param item The color palette item.
83 * @param r R color value to be returned
84 * @param g G color value to be returned
85 * @param b B color value to be returned
86 * @param a A color value to be returned
88 * @ingroup Colorselector
90 EAPI Elm_Colorselector_Mode elm_colorselector_mode_get(const Evas_Object *obj);
93 * Get a palette item's color.
95 * @param item The color palette item.
96 * @param r integer pointer for r-value of color
97 * @param g integer pointer for g-value of color
98 * @param b integer pointer for b-value of color
99 * @param a integer pointer for a-value of color
101 * @ingroup Colorselector
103 EAPI void elm_colorselector_palette_item_color_get(const Elm_Object_Item *it, int *r, int *g, int *b, int *a);
106 * Set the palette item's color.
108 * @param item The color palette item.
109 * @param r r-value of color
110 * @param g g-value of color
111 * @param b b-value of color
112 * @param a a-value of color
114 * @ingroup Colorselector
116 EAPI void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a);
119 * Add a new color item to palette.
121 * @param obj The Colorselector object
122 * @param r r-value of color
123 * @param g g-value of color
124 * @param b b-value of color
125 * @param a a-value of color
126 * @return A new color palette Item.
128 * @ingroup Colorselector
130 EAPI Elm_Object_Item *elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a);
133 * Clear the palette items.
135 * @param obj The Colorselector object
137 * @note This API will be available when ELM_COLORSELECTOR_PALETTE or
138 * ELM_COLORSELECTOR_BOTH mode is set.
140 * @ingroup Colorselector
142 EAPI void elm_colorselector_palette_clear(Evas_Object *obj);
145 * Set current palette's name
147 * @param obj The Colorselector object
148 * @param palette_name Name of palette
150 * When colorpalette name is set, colors will be loaded from and saved to config
151 * using the set name. If no name is set then colors will be loaded from or
152 * saved to "default" config.
154 * @ingroup Colorselector
156 EAPI void elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name);
159 * Get current palette's name
161 * @param obj The Colorselector object
162 * @return Name of palette
164 * Returns the currently set palette name using which colors will be
165 * saved/loaded in to config.
167 * @ingroup Colorselector
169 EAPI const char *elm_colorselector_palette_name_get(const Evas_Object *obj);
172 >>>>>>> remotes/origin/upstream