summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_colorselector_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_colorselector_eo.h')
-rw-r--r--src/lib/elementary/elm_colorselector_eo.h203
1 files changed, 203 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_colorselector_eo.h b/src/lib/elementary/elm_colorselector_eo.h
new file mode 100644
index 0000000..84fe60a
--- /dev/null
+++ b/src/lib/elementary/elm_colorselector_eo.h
@@ -0,0 +1,203 @@
1#ifndef _ELM_COLORSELECTOR_EO_H_
2#define _ELM_COLORSELECTOR_EO_H_
3
4#ifndef _ELM_COLORSELECTOR_EO_CLASS_TYPE
5#define _ELM_COLORSELECTOR_EO_CLASS_TYPE
6
7typedef Eo Elm_Colorselector;
8
9#endif
10
11#ifndef _ELM_COLORSELECTOR_EO_TYPES
12#define _ELM_COLORSELECTOR_EO_TYPES
13
14/**
15 * @brief Different modes supported by Colorselector
16 *
17 * See also @ref elm_obj_colorselector_mode_set,
18 * @ref elm_obj_colorselector_mode_get.
19 *
20 * @ingroup Elm_Colorselector
21 */
22typedef enum
23{
24 ELM_COLORSELECTOR_PALETTE = 0, /**< Only color palette is displayed. */
25 ELM_COLORSELECTOR_COMPONENTS, /**< Only color selector is displayed. */
26 ELM_COLORSELECTOR_BOTH, /**< Both Palette and selector is displayed, default.
27 */
28 ELM_COLORSELECTOR_PICKER, /**< Only color picker is displayed. */
29 ELM_COLORSELECTOR_ALL /**< All possible color selector is displayed. */
30} Elm_Colorselector_Mode;
31
32
33#endif
34/** Elementary colorselector class
35 *
36 * @ingroup Elm_Colorselector
37 */
38#define ELM_COLORSELECTOR_CLASS elm_colorselector_class_get()
39
40EWAPI const Efl_Class *elm_colorselector_class_get(void);
41
42/**
43 * @brief Set color to colorselector.
44 *
45 * @param[in] obj The object.
46 * @param[in] r Red value of color
47 * @param[in] g Green value of color
48 * @param[in] b Blue value of color
49 * @param[in] a Alpha value of color
50 *
51 * @ingroup Elm_Colorselector
52 */
53EOAPI void elm_obj_colorselector_picked_color_set(Eo *obj, int r, int g, int b, int a);
54
55/**
56 * @brief Get current color from colorselector.
57 *
58 * @param[in] obj The object.
59 * @param[out] r Red value of color
60 * @param[out] g Green value of color
61 * @param[out] b Blue value of color
62 * @param[out] a Alpha value of color
63 *
64 * @ingroup Elm_Colorselector
65 */
66EOAPI void elm_obj_colorselector_picked_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
67
68/**
69 * @brief Set current palette's name
70 *
71 * When colorpalette name is set, colors will be loaded from and saved to
72 * config using the set name. If no name is set then colors will be loaded from
73 * or saved to "default" config.
74 *
75 * @param[in] obj The object.
76 * @param[in] palette_name Name of palette
77 *
78 * @ingroup Elm_Colorselector
79 */
80EOAPI void elm_obj_colorselector_palette_name_set(Eo *obj, const char *palette_name);
81
82/**
83 * @brief Get current palette's name
84 *
85 * Returns the currently set palette name using which colors will be
86 * saved/loaded in to config.
87 *
88 * @param[in] obj The object.
89 *
90 * @return Name of palette
91 *
92 * @ingroup Elm_Colorselector
93 */
94EOAPI const char *elm_obj_colorselector_palette_name_get(const Eo *obj);
95
96/**
97 * @brief Set Colorselector's mode.
98 *
99 * Colorselector supports three modes palette only, selector only and both.
100 *
101 * @param[in] obj The object.
102 * @param[in] mode Elm_Colorselector_Mode
103 *
104 * @ingroup Elm_Colorselector
105 */
106EOAPI void elm_obj_colorselector_mode_set(Eo *obj, Elm_Colorselector_Mode mode);
107
108/**
109 * @brief Get Colorselector's mode.
110 *
111 * @param[in] obj The object.
112 *
113 * @return Elm_Colorselector_Mode
114 *
115 * @ingroup Elm_Colorselector
116 */
117EOAPI Elm_Colorselector_Mode elm_obj_colorselector_mode_get(const Eo *obj);
118
119/**
120 * @brief Get list of palette items.
121 *
122 * Note That palette item list is internally managed by colorselector widget
123 * and it should not be freed/modified by application.
124 *
125 * @param[in] obj The object.
126 *
127 * @return The list of color palette items.
128 *
129 * @since 1.9
130 *
131 * @ingroup Elm_Colorselector
132 */
133EOAPI const Eina_List *elm_obj_colorselector_palette_items_get(const Eo *obj);
134
135/**
136 * @brief Get the selected item in colorselector palette.
137 *
138 * @param[in] obj The object.
139 *
140 * @return The selected item, or @c null if none selected.
141 *
142 * @since 1.9
143 *
144 * @ingroup Elm_Colorselector
145 */
146EOAPI Elm_Widget_Item *elm_obj_colorselector_palette_selected_item_get(const Eo *obj);
147
148/**
149 * @brief Add a new color item to palette.
150 *
151 * @param[in] obj The object.
152 * @param[in] r Red value of color
153 * @param[in] g Green value of color
154 * @param[in] b Blue value of color
155 * @param[in] a Alpha value of color
156 *
157 * @return A new color palette Item.
158 *
159 * @ingroup Elm_Colorselector
160 */
161EOAPI Elm_Widget_Item *elm_obj_colorselector_palette_color_add(Eo *obj, int r, int g, int b, int a);
162
163/** Clear the palette items.
164 *
165 * @ingroup Elm_Colorselector
166 */
167EOAPI void elm_obj_colorselector_palette_clear(Eo *obj);
168
169EWAPI extern const Efl_Event_Description _ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED;
170
171/** Called when color item was selected
172 * @return Efl_Object *
173 *
174 * @ingroup Elm_Colorselector
175 */
176#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED))
177
178EWAPI extern const Efl_Event_Description _ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED;
179
180/** Called when color item got a long press
181 * @return Efl_Object *
182 *
183 * @ingroup Elm_Colorselector
184 */
185#define ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED (&(_ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED))
186
187EWAPI extern const Efl_Event_Description _ELM_COLORSELECTOR_EVENT_CHANGED;
188
189/** Called when colorselector changed
190 *
191 * @ingroup Elm_Colorselector
192 */
193#define ELM_COLORSELECTOR_EVENT_CHANGED (&(_ELM_COLORSELECTOR_EVENT_CHANGED))
194
195EWAPI extern const Efl_Event_Description _ELM_COLORSELECTOR_EVENT_CHANGED_USER;
196
197/** Called when the object changed due to user interaction
198 *
199 * @ingroup Elm_Colorselector
200 */
201#define ELM_COLORSELECTOR_EVENT_CHANGED_USER (&(_ELM_COLORSELECTOR_EVENT_CHANGED_USER))
202
203#endif