summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_widget_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_widget_eo.legacy.h')
-rw-r--r--src/lib/elementary/efl_ui_widget_eo.legacy.h334
1 files changed, 334 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_widget_eo.legacy.h b/src/lib/elementary/efl_ui_widget_eo.legacy.h
new file mode 100644
index 0000000..70ae62e
--- /dev/null
+++ b/src/lib/elementary/efl_ui_widget_eo.legacy.h
@@ -0,0 +1,334 @@
1#ifndef _EFL_UI_WIDGET_EO_LEGACY_H_
2#define _EFL_UI_WIDGET_EO_LEGACY_H_
3
4#ifndef _EFL_UI_WIDGET_EO_CLASS_TYPE
5#define _EFL_UI_WIDGET_EO_CLASS_TYPE
6
7typedef Eo Efl_Ui_Widget;
8
9#endif
10
11#ifndef _EFL_UI_WIDGET_EO_TYPES
12#define _EFL_UI_WIDGET_EO_TYPES
13
14/** Function pointer for on show region hook
15 *
16 * @ingroup Efl_Ui
17 */
18typedef void (*Efl_Ui_Scrollable_On_Show_Region)(void *data, Efl_Canvas_Object *obj, Eina_Rect region);
19
20/** All relevant fields needed for the current state of focus registeration
21 *
22 * @ingroup Efl_Ui
23 */
24typedef struct _Efl_Ui_Widget_Focus_State
25{
26 Efl_Ui_Focus_Manager *manager; /**< The manager where the widget is registered
27 * in */
28 Efl_Ui_Focus_Object *parent; /**< The parent the widget is using as logical
29 * parent */
30 Eina_Bool logical; /**< @c true if this is registered as logical currently */
31} Efl_Ui_Widget_Focus_State;
32
33
34#endif
35
36/**
37 * @brief This is the internal canvas object managed by a widget.
38 *
39 * This property is protected as it is meant for widget implementations only,
40 * to set and access the internal canvas object. Do use this function unless
41 * you're implementing a widget.
42 *
43 * Sets the new resize object for this widget.
44 *
45 * @param[in] obj The object.
46 * @param[in] sobj A canvas object (often a @ref Efl_Canvas_Layout object).
47 *
48 * @ingroup Elm_Widget_Group
49 */
50EAPI void elm_widget_resize_object_set(Efl_Ui_Widget *obj, Efl_Canvas_Object *sobj);
51
52/**
53 * @brief Whether the widget is enabled (accepts and reacts to user inputs).
54 *
55 * The property works counted, this means, whenever n-caller set the value to
56 * @c true, n-caller have to set it to @c false in order to get it out of the
57 * disabled state again.
58 *
59 * Each widget may handle the disabled state differently, but overall disabled
60 * widgets shall not respond to any input events. This is @c false by default,
61 * meaning the widget is enabled.
62 *
63 * Enables or disables this widget.
64 *
65 * Disabling a widget will disable all its children recursively, but only this
66 * widget will be marked as disabled internally.
67 *
68 * @param[in] obj The object.
69 * @param[in] disabled @c true if the widget is disabled.
70 *
71 * @ingroup Elm_Widget_Group
72 */
73EAPI void elm_widget_disabled_set(Efl_Ui_Widget *obj, Eina_Bool disabled);
74
75/**
76 * @brief Whether the widget is enabled (accepts and reacts to user inputs).
77 *
78 * The property works counted, this means, whenever n-caller set the value to
79 * @c true, n-caller have to set it to @c false in order to get it out of the
80 * disabled state again.
81 *
82 * Each widget may handle the disabled state differently, but overall disabled
83 * widgets shall not respond to any input events. This is @c false by default,
84 * meaning the widget is enabled.
85 *
86 * Returns whether the widget is disabled.
87 *
88 * This will return @c true if any widget in the parent hierarchy is disabled.
89 * Re-enabling that parent may in turn change the disabled state of this
90 * widget.
91 *
92 * @param[in] obj The object.
93 *
94 * @return @c true if the widget is disabled.
95 *
96 * @ingroup Elm_Widget_Group
97 */
98EAPI Eina_Bool elm_widget_disabled_get(const Efl_Ui_Widget *obj);
99
100/**
101 * @brief The widget style to use.
102 *
103 * Styles define different look and feel for widgets, and may provide different
104 * parts for layout-based widgets. Styles vary from widget to widget and may be
105 * defined by other themes by means of extensions and overlays.
106 *
107 * The style can only be set before @ref Efl.Object.finalize, which means at
108 * construction time of the object (inside @c efl_add in C).
109 *
110 * Can only be called during construction, before finalize.
111 *
112 * @param[in] obj The object.
113 * @param[in] style Name of the style to use. Refer to each widget's
114 * documentation for the available style names, or to the themes in use.
115 *
116 * @return Whether the style was successfully applied or not, see the values of
117 * Efl.Ui.Theme.Apply_Error for more information.
118 *
119 * @ingroup Elm_Widget_Group
120 */
121EAPI Eina_Error elm_widget_style_set(Efl_Ui_Widget *obj, const char *style);
122
123/**
124 * @brief The widget style to use.
125 *
126 * Styles define different look and feel for widgets, and may provide different
127 * parts for layout-based widgets. Styles vary from widget to widget and may be
128 * defined by other themes by means of extensions and overlays.
129 *
130 * The style can only be set before @ref Efl.Object.finalize, which means at
131 * construction time of the object (inside @c efl_add in C).
132 *
133 * Returns the current style of a widget.
134 *
135 * @param[in] obj The object.
136 *
137 * @return Name of the style to use. Refer to each widget's documentation for
138 * the available style names, or to the themes in use.
139 *
140 * @ingroup Elm_Widget_Group
141 */
142EAPI const char *elm_widget_style_get(const Efl_Ui_Widget *obj);
143
144
145/**
146 * @brief The ability for a widget to be focused.
147 *
148 * Unfocusable objects do nothing when programmatically focused. The nearest
149 * focusable parent object the one really getting focus. Also, when they
150 * receive mouse input, they will get the event, but not take away the focus
151 * from where it was previously.
152 *
153 * @note Objects which are meant to be interacted with by input events are
154 * created able to be focused, by default. All the others are not.
155 *
156 * This property's default value depends on the widget (eg. a box is not
157 * focusable, but a button is).
158 *
159 * @param[in] obj The object.
160 * @param[in] can_focus Whether the object is focusable.
161 *
162 * @ingroup Elm_Widget_Group
163 */
164EAPI void elm_widget_can_focus_set(Efl_Ui_Widget *obj, Eina_Bool can_focus);
165
166/**
167 * @brief The ability for a widget to be focused.
168 *
169 * Unfocusable objects do nothing when programmatically focused. The nearest
170 * focusable parent object the one really getting focus. Also, when they
171 * receive mouse input, they will get the event, but not take away the focus
172 * from where it was previously.
173 *
174 * @note Objects which are meant to be interacted with by input events are
175 * created able to be focused, by default. All the others are not.
176 *
177 * This property's default value depends on the widget (eg. a box is not
178 * focusable, but a button is).
179 *
180 * @param[in] obj The object.
181 *
182 * @return Whether the object is focusable.
183 *
184 * @ingroup Elm_Widget_Group
185 */
186EAPI Eina_Bool elm_widget_can_focus_get(const Efl_Ui_Widget *obj);
187
188/**
189 * @brief The internal parent of this widget.
190 *
191 * @ref Efl_Ui_Widget objects have a parent hierarchy that may differ slightly
192 * from their @ref Efl_Object or @ref Efl_Canvas_Object hierarchy. This is
193 * meant for internal handling.
194 *
195 * @param[in] obj The object.
196 * @param[in] parent Widget parent object
197 *
198 * @ingroup Elm_Widget_Group
199 */
200EAPI void elm_widget_parent_set(Efl_Ui_Widget *obj, Efl_Ui_Widget *parent);
201
202/**
203 * @brief The internal parent of this widget.
204 *
205 * @ref Efl_Ui_Widget objects have a parent hierarchy that may differ slightly
206 * from their @ref Efl_Object or @ref Efl_Canvas_Object hierarchy. This is
207 * meant for internal handling.
208 *
209 * @param[in] obj The object.
210 *
211 * @return Widget parent object
212 *
213 * @ingroup Elm_Widget_Group
214 */
215EAPI Efl_Ui_Widget *elm_widget_parent_get(const Efl_Ui_Widget *obj);
216
217/**
218 * @brief Virtual function handling sub objects being added.
219 *
220 * Sub objects can be any canvas object, not necessarily widgets.
221 *
222 * See also @ref elm_widget_parent_get.
223 *
224 * @param[in] obj The object.
225 * @param[in] sub_obj Sub object to be added. Not necessarily a widget itself.
226 *
227 * @return Indicates if the operation succeeded.
228 *
229 * @ingroup Elm_Widget_Group
230 */
231EAPI Eina_Bool elm_widget_sub_object_add(Efl_Ui_Widget *obj, Efl_Canvas_Object *sub_obj);
232
233/**
234 * @brief Virtual function handling sub objects being removed.
235 *
236 * Sub objects can be any canvas object, not necessarily widgets.
237 *
238 * See also @ref elm_widget_parent_get.
239 *
240 * @param[in] obj The object.
241 * @param[in] sub_obj Sub object to be removed. Should be a child of this
242 * widget.
243 *
244 * @return Indicates if the operation succeeded.
245 *
246 * @ingroup Elm_Widget_Group
247 */
248EAPI Eina_Bool elm_widget_sub_object_del(Efl_Ui_Widget *obj, Efl_Canvas_Object *sub_obj);
249
250/**
251 * @brief Virtual function called when the widget needs to re-apply its theme.
252 *
253 * This may be called when the object is first created, or whenever the widget
254 * is modified in any way that may require a reload of the theme. This may
255 * include but is not limited to scale, theme, or mirrored mode changes.
256 *
257 * @note even widgets not based on layouts may override this method to handle
258 * widget updates (scale, mirrored mode, etc...).
259 *
260 * @param[in] obj The object.
261 *
262 * @return Indicates success, and if the current theme or default theme was
263 * used.
264 *
265 * @ingroup Elm_Widget_Group
266 */
267EAPI Eina_Error elm_widget_theme_apply(Efl_Ui_Widget *obj);
268
269/**
270 * @brief Region of interest inside this widget, that should be given priority
271 * to be visible inside a scroller.
272 *
273 * When this widget or one of its subwidgets is given focus, this region should
274 * be shown, which means any parent scroller should attempt to display the
275 * given area of this widget. For instance, an entry given focus should scroll
276 * to show the text cursor if that cursor moves. In this example, this region
277 * defines the relative geometry of the cursor within the widget.
278 *
279 * @note The region is relative to the top-left corner of the widget, i.e. X,Y
280 * start from 0,0 to indicate the top-left corner of the widget. W,H must be
281 * greater or equal to 1 for this region to be taken into account, otherwise it
282 * is ignored.
283 *
284 * @param[in] obj The object.
285 *
286 * @return The relative region to show. If width or height is <= 0 it will be
287 * ignored, and no action will be taken.
288 *
289 * @ingroup Elm_Widget_Group
290 */
291EAPI Eina_Rect elm_widget_focus_region_get(const Efl_Ui_Widget *obj);
292
293/**
294 * @brief The rectangle region to be highlighted on focus.
295 *
296 * This is a rectangle region where the focus highlight should be displayed.
297 *
298 * This is a read-only property.
299 *
300 * @param[in] obj The object.
301 *
302 * @return The rectangle area.
303 *
304 * @ingroup Elm_Widget_Group
305 */
306EAPI Eina_Rect elm_widget_focus_highlight_geometry_get(const Efl_Ui_Widget *obj);
307
308/**
309 * @brief Register focus with the given configuration.
310 *
311 * The implementation can feel free to change the logical flag as it wants, but
312 * other than that it should strictly keep the configuration.
313 *
314 * The implementation in elm.widget updates the current state into what is
315 * passed as configured state, respecting manager changes, registeration and
316 * unregistration based on if it should be registered or unregistered.
317 *
318 * A manager field that is @c null means that the widget should not or was not
319 * registered.
320 *
321 * @param[in] obj The object.
322 * @param[in] current_state The focus manager to register with.
323 * @param[in,out] configured_state The evaluated Focus state that should be
324 * used.
325 * @param[in] redirect A redirect that will be set by the elm.widget
326 * implementation.
327 *
328 * @return Returns whether the widget is registered or not.
329 *
330 * @ingroup Elm_Widget_Group
331 */
332EAPI Eina_Bool elm_widget_focus_state_apply(Efl_Ui_Widget *obj, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect);
333
334#endif