4 /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
5 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
6 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK
9 * How to make your own widget? like this (where wname is your widget
10 * name (space) and wparentname is you widget's parent widget name
11 * (the base widget class if its a 'root' one).
13 * #include <Elementary.h>
14 * #include "elm_priv.h"
16 * static const char ELM_WNAME_SMART_NAME[] = "elm_wname";
18 * #define ELM_WNAME_DATA_GET(o, sd) \
19 * Elm_WName_Smart_Data * sd = evas_object_smart_data_get(o)
21 * #define ELM_WNAME_CHECK(obj) \
22 * if (!obj || !elm_widget_type_check((obj), ELM_WNAME_SMART_NAME, \
26 * typedef struct _Elm_WName_Smart_Class
28 * Elm_WParentName_Smart_Class base;
29 * } Elm_WName_Smart_Class;
31 * typedef struct _Elm_WName_Smart_Data Elm_WName_Smart_Data;
32 * struct _Elm_WName_Smart_Data
34 * Elm_WParentName_Smart_Data base;
35 * Evas_Object *sub; // or any private data needed for an instance
36 * // add any other instance data here too
39 * static const char SIG_CLICKED[] = "clicked";
40 * static const Evas_Smart_Cb_Description _smart_callbacks[] = {
45 * EVAS_SMART_SUBCLASS_NEW
46 * (ELM_WNAME_SMART_NAME, _elm_wname, Elm_WName_Smart_Class,
47 * Elm_WParentName_Smart_Class, elm_wparentname_smart_class_get,
51 * _elm_wname_smart_on_focus(Evas_Object *obj)
53 * ELM_WNAME_DATA_GET(obj, sd);
55 * // handle focus going in and out - optional, but if you want to,
56 * // define this virtual function to handle it (e.g. to emit a
57 * // signal to an edje object)
59 * if (elm_widget_focus_get(obj))
61 * edje_object_signal_emit(sd->sub, "elm,action,focus", "elm");
62 * evas_object_focus_set(sd->sub, EINA_TRUE);
66 * edje_object_signal_emit(sd->sub, "elm,action,unfocus", "elm");
67 * evas_object_focus_set(sd->sub, EINA_FALSE);
74 * _elm_wname_smart_theme(Evas_Object *obj)
76 * ELM_WNAME_DATA_GET(obj, sd);
78 * if (!ELM_WIDGET_CLASS(_elm_wname_parent_sc)->theme(obj))
81 * // handle changes in theme/scale etc here. always call the
82 * // parent class's version, as even the base class implements it.
84 * elm_widget_theme_object_set(obj, sd->sub, "wname", "base",
85 * elm_widget_style_get(obj));
91 * _elm_widget_smart_disable(Evas_Object *obj)
93 * ELM_WNAME_DATA_GET(obj, sd);
95 * // optional, but handle if the widget gets disabled or not
96 * if (elm_widget_disabled_get(obj))
97 * edje_object_signal_emit(sd->sub, "elm,state,disabled", "elm");
99 * edje_object_signal_emit(sd->sub, "elm,state,enabled", "elm");
105 * _elm_wname_smart_add(Evas_Object *obj)
107 * EVAS_SMART_DATA_ALLOC(obj, Elm_WName_Smart_Data);
109 * ELM_WIDGET_CLASS(_elm_wname_parent_sc)->base.add(obj);
111 * priv->sub = edje_object_add(evas_object_evas_get(obj));
112 * // just an example having an Edje object here. if it's really the case
113 * // you have a sub edje object as a resize object, consider inheriting
114 * // from @ref elm-layout-class.
115 * elm_widget_can_focus_set(obj, EINA_TRUE);
117 * // for this widget we will add 1 sub object that is an edje object
118 * priv->sub = edje_object_add(e);
119 * // set the theme. this follows a scheme for group name like this:
120 * // "elm/WIDGETNAME/ELEMENT/STYLE"
121 * // so here it will be:
122 * // "elm/wname/base/default"
123 * // changing style changes style name from default (all widgets start
124 * // with the default style) and element is for your widget internal
125 * // structure as you see fit
126 * elm_widget_theme_object_set
127 * (obj, priv->sub, "wname", "base", "default");
128 * // listen to a signal from the edje object to produce widget smart
129 * // callback (like click)
130 * edje_object_signal_callback_add
131 * (priv->sub, "elm,action,click", "", _clicked_signal_cb, obj);
132 * // set this sub object as the "resize object". widgets get 1 resize
133 * // object that is resized along with the object wrapper.
134 * elm_widget_resize_object_set(obj, priv->sub, EINA_TRUE);
138 * _elm_wname_smart_del(Evas_Object *obj)
140 * ELM_WNAME_DATA_GET(obj, sd);
142 * // deleting 'virtual' function implementation - on deletion of
143 * // object delete object struct, etc.
145 * ELM_WIDGET_CLASS(_elm_wname_parent_sc)->base.del(obj);
149 * _elm_wname_smart_set_user(Elm_WName_Smart_Class *sc)
151 * ELM_WIDGET_CLASS(sc)->base.add = _elm_wname_smart_add;
152 * ELM_WIDGET_CLASS(sc)->base.del = _elm_wname_smart_del;
154 * ELM_WIDGET_CLASS(sc)->theme = _elm_wname_smart_theme;
155 * ELM_WIDGET_CLASS(sc)->disable = _elm_wname_smart_disable;
156 * ELM_WIDGET_CLASS(sc)->on_focus = _elm_wname_smart_on_focus;
159 * // actual API to create your widget. add more to manipulate it as
160 * // needed mark your calls with EAPI to make them "external api"
164 * elm_wname_add(Evas_Object *parent)
168 * EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
170 * obj = elm_widget_add(_elm_check_smart_class_new(), parent);
171 * if (!obj) return NULL;
173 * if (!elm_widget_sub_object_add(parent, obj))
174 * ERR("could not add %p as sub object of %p", obj, parent);
179 * // example - do "whatever" to the widget (here just emit a signal)
181 * elm_wname_whatever(Evas_Object *obj)
183 * // check if type is correct - check will return if it fails
184 * ELM_WNAME_CHECK(obj);
185 * // get widget data - type is correct and sane by this point, so this
186 * // should never fail
187 * ELM_WNAME_DATA_GET(obj, sd);
188 * // do whatever you like
189 * edje_object_signal_emit(sd->sub, "elm,state,action,whatever", "elm");
192 * // you can add more - you need to see elementary's code to know how
193 * // to handle all cases. remember this api is not stable and may
194 * change. it's internal
197 #ifndef ELM_INTERNAL_API_ARGESFSDFEFC
198 #warning "You are using an internal elementary API. This API is not stable"
199 #warning "and is subject to change. You use this at your own risk."
200 #warning "Remember to call elm_widget_api_check(ELM_INTERNAL_API_VERSION);"
201 #warning "in your widgets before you call any other elm_widget calls to do"
202 #warning "a correct runtime version check. Also remember - you don't NEED"
203 #warning "to make an Elementary widget is almost ALL cases. You can easily"
204 #warning "make a smart object with Evas's API and do everything you need"
205 #warning "there. You only need a widget if you want to seamlessly be part"
206 #warning "of the focus tree and want to transparently become a container"
207 #warning "for any number of child Elementary widgets"
208 #error "ERROR. Compile aborted."
210 #define ELM_INTERNAL_API_VERSION 7000
214 * @defgroup Widget Widgets Extension Infrastructure
216 * This section is intended for people willing to create @b custom
217 * Elementary widgets or to contribute new (useful, unique) widgets
218 * upstream. If neither is your case, this text won't be of any use
221 * Elementary widgets are built in a @b hierarchical fashion. The idea
222 * is to factorize as much code as possible between widgets with
223 * behavioral similarities, as long as to facilitate the creation of
224 * @b custom, new widgets, may the user need them.
226 * It all starts with a base class, which aggregates behaviour
227 * @b every Elementary widget is supposed to have:
228 * #Elm_Widget_Smart_Class. Every Elementary widget will be of that
229 * type, be it directly or by means of @b inheriting from it.
231 * #Elm_Widget_Smart_Class happens to be an @c Evas_Smart_Class. If
232 * you check out Evas' documentation on it, you'll see it's how one is
233 * supposed to create custom Evas objects, what Elementary widgets
236 * Once one instantiates an Elementary widget, since it inherits from
237 * #Elm_Widget_Smart_Class, the system will raise a class instance of
238 * that type for you. But that happens only @b once: the first time
239 * you ask for an Elementary widget (of a given type). All subsequent
240 * ones will only point to the very same class instance. Since it's
241 * the class which points to the functions implementing the behavior
242 * of objects of that type, all of the live instances of Elementary
243 * widgets (of that type) will share the same blob of code loaded in
244 * memory to execute their routines.
246 * Now go and take a look at #Elm_Widget_Smart_Class's fields. Because
247 * it inherits from Evas' base smart class, we got a field of that
248 * type as the first member, so that Evas can handle Elementary
249 * objects internally as if they were 'normal' Evas objects. Evas has
250 * the Evas-only behavior function pointers in there, so it's all it
253 * Then, comes a version field, so that whenever we got to update or
254 * change the fields on our base smart class, there'll be a runtime
255 * check of the version expected by Elementary and the one provided by
256 * any code linking with it. A mismatch will show the developer of
257 * that code he/she needs to recompile and link its code to a newer
258 * version of Elementary.
260 * The next fields are the class functions themselves. We call them
261 * 'virtual' because, as in object-oriented languages, one is supposed
262 * here to override them on inheriting classes. On most of
263 * inheritances you'll probably want to call the parent's version of
264 * the class function too: you must analyse each case to tell.
266 * Take a look at #Elm_Widget_Smart_Data. That's private data bound to
267 * each Elementary object @b instance. It aggregates data needed for
268 * all widgets, since it's meant for the #Elm_Widget_Smart_Class-typed
271 * When inheriting from that base type, instance data for this new
272 * class has to have, as the first member, a field of type
273 * #Elm_Widget_Smart_Data. This has to be respected recursively -- if
274 * a third class is to be created inheriting from the one that is a
275 * direct 'child' of #Elm_Widget_Smart_Class, then the private data on
276 * this third class has to have, as its first field, a variable of the
277 * type of the private data of the second class (its parent), direct
278 * child of #Elm_Widget_Smart_Class.
280 * It is from the base private data, #Elm_Widget_Smart_Data, that we
281 * reach an object's class functions, by the given object
282 * instance. This is the reason of the first field of that struct: a
283 * pointer set to point to its class when the object is instantiated.
285 * The following figure illustrates the widget inheritance schema.
287 * @image html elm-widget-hierarchy.png
288 * @image rtf elm-widget-hierarchy.png
289 * @image latex elm-widget-hierarchy.eps
291 * @section elm-hierarchy-tree Elementary Widgets Hierarchy Tree
293 * The following figure illustrates the Elementary widget inheritance
296 * @image html elm-widget-tree.png
297 * @image rtf elm-widget-tree.png
298 * @image latex elm-widget-tree.eps
307 /* Elm_Activate is used in 'Virtual' function Eina_Bool (*activate)
308 * (Evas_Object *obj, Elm_Activate act); of Elm_Widget_Smart_Class */
311 ELM_ACTIVATE_DEFAULT = 0,
319 /* Please, ALWAYS update the ELM_WIDGET_SMART_CLASS_INIT macro
320 * whenever you change the following struct! */
323 * Base widget smart class. It has the 'virtual' functions for all
324 * general, common actions on Elementary widgets.
326 typedef struct _Elm_Widget_Smart_Class
328 Evas_Smart_Class base; /**< Base smart class struct, needed for all smart objects */
329 int version; /**< Version of this smart class definition */
331 void (*parent_set)(Evas_Object *obj,
332 Evas_Object *parent); /**< 'Virtual' function handling parent widget attachment to new object */
333 Eina_Bool (*on_focus)(Evas_Object *obj); /**< 'Virtual' function handling focus in/out events on the widget */
334 Eina_Bool (*disable)(Evas_Object *obj); /**< 'Virtual' function on the widget being disabled */
335 Eina_Bool (*theme)(Evas_Object *obj); /**< 'Virtual' function on the widget being re-themed */
336 Eina_Bool (*translate)(Evas_Object *obj); /**< 'Virtual' function handling language changes on Elementary */
337 Eina_Bool (*event)(Evas_Object *obj,
339 Evas_Callback_Type type,
340 void *event_info); /**< 'Virtual' function handling input events on the widget */
341 Eina_Bool (*on_focus_region)(const Evas_Object *obj,
345 Evas_Coord *h); /**< 'Virtual' function returning an inner area of a widget that should be brought into the visible area of a broader viewport, may this context arise. On the base Elementary widget class, it defaults to the object's total area, so only override it if you have to. */
346 Eina_Bool (*focus_next)(const Evas_Object *obj,
347 Elm_Focus_Direction dir,
349 Elm_Object_Item **next_item); /**< 'Virtual' function handling passing focus to sub-objects */
350 Eina_Bool (*focus_direction)(const Evas_Object *obj,
351 const Evas_Object *base,
353 Evas_Object **target,
354 Elm_Object_Item **target_item,
355 double *weight); /**< 'Virtual' function handling passing focus to sub-objects <b>given a direction, in degrees</b> */
357 Eina_Bool (*sub_object_add)(Evas_Object *obj,
358 Evas_Object *sobj); /**< 'Virtual' function handling sub objects being added */
360 Eina_Bool (*sub_object_del)(Evas_Object *obj,
361 Evas_Object *sobj); /**< 'Virtual' function handling sub objects being removed */
362 void (*access)(Evas_Object *obj,
363 Eina_Bool is_access); /**< 'Virtual' function on the widget being set access */
364 Eina_Bool (*activate)(Evas_Object *obj,
365 Elm_Activate act); /**< 'Virtual' function to activate widget */
366 } Elm_Widget_Smart_Class;
369 * Base widget smart data. This is data bound to an Elementary object
370 * @b instance, so its particular to that specific object and not
371 * shared between all objects in its class. It is here, though, that
372 * we got a pointer to the object's class, the first field -- @c
375 typedef struct _Elm_Widget_Smart_Data
377 Evas_Object *obj; /**< object pointer for this widget smart data */
378 Evas_Object *parent_obj; /**< parent object of a widget in the elementary tree */
379 Evas_Object *parent2; /**< parent object for an inlined window */
380 Evas_Coord x, y, w, h;
381 Eina_List *subobjs; /**< list of widgets' sub objects in the elementary tree */
382 Evas_Object *resize_obj; /**< an unique object for each widget that shows the look of a widget. Resize object's geometry is same as the widget. This resize object is different from that of window's resize object. */
383 Evas_Object *hover_obj;
384 Eina_List *tooltips, *cursors;
385 Evas_Object *focus_previous, *focus_next;
386 Evas_Object *focus_up, *focus_down, *focus_right, *focus_left;
387 Elm_Object_Item *item_focus_previous, *item_focus_next;
388 Elm_Object_Item *item_focus_up, *item_focus_down, *item_focus_right, *item_focus_left;
390 /* "show region" coordinates. all widgets got those because this
391 * info may be set and queried recursively through the widget
393 Evas_Coord rx, ry, rw, rh;
395 /* scrolling hold/freeze hints. all widgets got those because this
396 * info may be set and queried recursively through the widget
404 const char *focus_highlight_style; /**< custom focus style for a widget */
405 const char *access_info;
406 const char *accessible_name;
407 unsigned int focus_order;
408 Eina_Bool focus_order_on_calc;
410 int child_drag_x_locked;
411 int child_drag_y_locked;
413 Eina_Inlist *translate_strings;
414 Eina_List *focus_chain;
417 int role; /**< Accessibility role */
418 const char *description; /**< Accessibility description */
419 //TIZEN_ONLY(20150717) add widget name setter
422 Eo *atspi_custom_parent; /**< Accessibility parent if different then parent_obj */
423 //TIZEN_ONLY(20150709) add relations atpi
424 Elm_Atspi_Relation_Set atspi_custom_relations; /**< Developer-defined accessiblity relations */
425 ///////////////////////////////////
426 //TIZEN_ONLY(20150731) : add i18n support for name and description
427 const char *atspi_translation_domain;
429 //TIZEN_ONLY(20160725): Add attributes set function and store the list
430 Eina_List *attr_list;
433 /* this is a hook to be set on-the-fly on widgets. this is code
434 * handling the request of showing a specific region from an inner
435 * widget (mainly issued by entries, on cursor moving) */
436 void *on_show_region_data;
437 void (*on_show_region)(void *data,
440 int orient_mode; /* -1 is disabled */
441 Elm_Focus_Move_Policy focus_move_policy;
442 Elm_Focus_Region_Show_Mode focus_region_show_mode;
443 /* TIZEN_ONLY(20160622): Override Paragraph Direction APIs */
444 Evas_BiDi_Direction paragraph_direction : 3;
445 Eina_Bool inherit_paragraph_direction : 1;
448 Eina_Bool drag_x_locked : 1;
449 Eina_Bool drag_y_locked : 1;
451 Eina_Bool can_focus : 1;
452 Eina_Bool child_can_focus : 1;
453 Eina_Bool focused : 1;
454 Eina_Bool top_win_focused : 1;
455 Eina_Bool tree_unfocusable : 1;
456 Eina_Bool focus_move_policy_auto_mode : 1; /* This is TRUE by default */
457 /* TIZEN_ONLY(20161212): With this flag, on_focus can know whether it's the focus target or not */
458 Eina_Bool is_focus_target : 1;
460 Eina_Bool highlight_ignore : 1;
461 Eina_Bool highlight_in_theme : 1;
462 Eina_Bool access_highlight_in_theme : 1;
463 Eina_Bool disabled : 1;
464 Eina_Bool is_mirrored : 1;
465 Eina_Bool mirrored_auto_mode : 1; /* This is
468 Eina_Bool still_in : 1;
469 Eina_Bool highlighted : 1;
470 Eina_Bool highlight_root : 1;
471 Eina_Bool on_translate : 1; /**< This is true when any types of elm translate function is being called. */
472 Eina_Bool on_create : 1; /**< This is true when the widget is on creation(general widget constructor). */
473 Eina_Bool on_destroy: 1; /**< This is true when the widget is on destruction(general widget destructor). */
474 ///TIZEN_ONLY(20170717) : expose highlight information on atspi
475 Eina_Bool can_highlight : 1; /**< true if widget have at-spi HIGHLIGHTABLE state */
477 //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
478 Eina_Bool highlight_grabbing : 1;
480 // TIZEN_ONLY(20150705): Genlist item align feature
481 Eina_Bool scroll_item_align_enable;
482 const char *scroll_item_valign;
485 /* TIZEN_ONLY(20161222): Update show region geometry when entry is resized */
486 Eina_Bool on_show_region_set: 1;
488 } Elm_Widget_Smart_Data;
494 typedef struct _Elm_Tooltip Elm_Tooltip;
495 typedef struct _Elm_Cursor Elm_Cursor;
497 /**< base structure for all widget items that are not Elm_Widget themselves */
498 typedef struct _Elm_Widget_Item_Data Elm_Widget_Item_Data;
499 typedef struct _Elm_Widget_Item_Signal_Data Elm_Widget_Item_Signal_Data;
501 /**< accessibility information to be able to set and get from the access API */
502 typedef struct _Elm_Access_Info Elm_Access_Info;
504 /**< accessibility info item */
505 typedef struct _Elm_Access_Item Elm_Access_Item;
507 typedef struct _Elm_Action Elm_Action;
509 typedef void (*Elm_Widget_Text_Set_Cb)(void *data, const char *part, const char *text);
510 typedef void (*Elm_Widget_Content_Set_Cb)(void *data, const char *part, Evas_Object *content);
511 typedef const char *(*Elm_Widget_Text_Get_Cb)(const void *data, const char *part);
512 typedef Evas_Object *(*Elm_Widget_Content_Get_Cb)(const void *data, const char *part);
513 typedef Evas_Object *(*Elm_Widget_Content_Unset_Cb)(const void *data, const char *part);
514 typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const char *emission, const char *source);
515 typedef void (*Elm_Widget_Disable_Cb)(void *data);
516 typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
517 typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Object_Item *item, const char *emission, const char *source);
518 typedef void (*Elm_Widget_Style_Set_Cb)(void *data, const char *style);
519 typedef const char *(*Elm_Widget_Style_Get_Cb)(const void *data);
520 typedef void (*Elm_Widget_Focus_Set_Cb)(void *data, Eina_Bool focused);
521 typedef Eina_Bool (*Elm_Widget_Focus_Get_Cb)(const void *data);
523 #define ELM_ACCESS_DONE -1 /* sentence done - send done event here */
524 #define ELM_ACCESS_CANCEL -2 /* stop reading immediately */
526 typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
528 struct _Elm_Access_Item
532 Elm_Access_Info_Cb func;
535 struct _Elm_Access_Info
537 Evas_Object *hoverobj;
539 Ecore_Timer *delay_timer;
540 void *on_highlight_data;
541 Elm_Access_On_Highlight_Cb on_highlight;
544 Elm_Access_Activate_Cb activate;
546 /* the owner widget item that owns this access info */
547 Elm_Widget_Item_Data *widget_item;
549 /* the owner part object that owns this access info */
550 Evas_Object *part_object;
559 Eina_Bool (*func)(Evas_Object *obj, const char *params);
562 void _elm_access_shutdown();
563 void _elm_access_mouse_event_enabled_set(Eina_Bool enabled);
565 /* if auto_higlight is EINA_TRUE, it does not steal a focus, it just moves a highlight */
566 void _elm_access_auto_highlight_set(Eina_Bool enabled);
567 Eina_Bool _elm_access_auto_highlight_get(void);
568 void _elm_access_widget_item_access_order_set(Elm_Widget_Item_Data *item, Eina_List *objs);
569 const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item_Data *item);
570 void _elm_access_widget_item_access_order_unset(Elm_Widget_Item_Data *item);
572 // widget focus highlight
573 void _elm_widget_focus_highlight_start(const Evas_Object *obj);
574 void _elm_widget_highlight_in_theme_update(Eo *obj);
576 // win focus highlight
577 void _elm_win_focus_highlight_start(Evas_Object *obj);
578 void _elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme);
579 Evas_Object *_elm_win_focus_highlight_object_get(Evas_Object *obj);
580 void _elm_win_focus_auto_show(Evas_Object *obj);
581 void _elm_win_focus_auto_hide(Evas_Object *obj);
582 //TIZEN_ONLY(20160404) Accessibility Highlight Frame added (99248ce)
583 void _elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj, Eina_Bool visible);
586 //TIZEN_ONLY(20170919): Handle default label object
587 void _elm_win_default_label_obj_append(Evas_Object *default_label_obj);
588 void _elm_win_default_label_obj_remove(Evas_Object *default_label_obj);
589 Evas_Object *_elm_win_default_label_obj_get(Evas_Object *obj);
591 void *_elm_object_accessibility_currently_highlighted_get();
592 void _elm_widget_showing_geometry_get(Eo *obj, int *x, int *y, int *w, int *h);
594 //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
595 Eina_Bool _elm_widget_accessibility_highlight_grabbing_get(Eo *obj);
596 void _elm_widget_accessibility_highlight_grabbing_set(Eo *obj, Eina_Bool grabbing);
599 EAPI void _elm_access_clear(Elm_Access_Info *ac);
600 EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
601 EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
602 EAPI char *_elm_access_text_get(const Elm_Access_Info *ac, int type, const Evas_Object *obj); /* this is ok it actually returns a strduped string - it's meant to! */
603 EAPI void _elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj);
604 EAPI void _elm_access_say(const char *txt);
605 EAPI Elm_Access_Info *_elm_access_info_get(const Evas_Object *obj);
606 EAPI void _elm_access_object_highlight(Evas_Object *obj);
607 EAPI void _elm_access_object_unhighlight(Evas_Object *obj);
608 EAPI void _elm_access_object_highlight_disable(Evas *e);
609 EAPI void _elm_access_object_register(Evas_Object *obj, Evas_Object *hoverobj);
610 EAPI void _elm_access_object_unregister(Evas_Object *obj, Evas_Object *hoverobj);
611 EAPI Eina_Bool _elm_access_2nd_click_timeout(Evas_Object *obj);
612 EAPI void _elm_access_highlight_set(Evas_Object* obj);
613 EAPI Evas_Object * _elm_access_edje_object_part_object_register(Evas_Object *obj, const Evas_Object *partobj, const char* part);
614 EAPI void _elm_access_edje_object_part_object_unregister(Evas_Object* obj, const Evas_Object *eobj, const char* part);
615 EAPI void _elm_access_widget_item_register(Elm_Widget_Item_Data *item);
616 EAPI void _elm_access_widget_item_unregister(Elm_Widget_Item_Data *item);
617 EAPI void _elm_access_on_highlight_hook_set(Elm_Access_Info *ac, Elm_Access_On_Highlight_Cb func, void *data);
618 EAPI void _elm_access_activate_callback_set(Elm_Access_Info *ac, Elm_Access_Activate_Cb func, void *data);
619 EAPI void _elm_access_highlight_object_activate(Evas_Object *obj, Elm_Activate act);
620 EAPI void _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir);
622 EINA_DEPRECATED EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object *obj);
624 #define ELM_PREFS_DATA_MAGIC 0xe1f5da7a
626 /**< put this as the first member in your widget item struct */
627 #define ELM_WIDGET_ITEM Elm_Widget_Item_Data base
629 struct _Elm_Widget_Item_Signal_Data
631 Elm_Object_Item *item;
632 Elm_Widget_Item_Signal_Cb func;
633 const char *emission;
638 #define WIDGET_ITEM_DATA_GET(eo_obj) \
641 eo_do_ret(eo_obj, _data, eo_key_data_get("__elm_widget_item_data")); \
644 #define WIDGET_ITEM_DATA_SET(eo_obj, data) \
646 eo_do(eo_obj, eo_key_data_set("__elm_widget_item_data", data)); \
649 struct _Elm_Widget_Item_Data
651 /* ef1 ~~ efl, el3 ~~ elm */
652 #define ELM_WIDGET_ITEM_MAGIC 0xef1e1301
654 /* simple accessor macros */
655 #define VIEW(X) X->base->view
656 #define WIDGET(X) X->base->widget
657 #define EO_OBJ(X) ((X)?X->base->eo_obj:NULL)
658 /**< the owner widget that owns this item */
660 /**< The Eo item, useful to invoke eo_do when only the item data is available */
662 /**< the base view object */
664 /**< user delete callback function */
665 Evas_Smart_Cb del_func;
666 /**< widget delete callback function. don't expose this callback call */
667 Elm_Widget_Del_Pre_Cb del_pre_func;
669 Evas_Object *focus_previous, *focus_next;
670 Evas_Object *focus_up, *focus_down, *focus_right, *focus_left;
671 Elm_Object_Item *item_focus_previous, *item_focus_next;
672 Elm_Object_Item *item_focus_up, *item_focus_down, *item_focus_right, *item_focus_left;
674 Evas_Object *access_obj;
675 const char *access_info;
676 const char *accessible_name;
677 Eina_List *access_order;
678 Eina_Inlist *translate_strings;
681 Evas_Object *track_obj;
684 const char *description;
686 //TIZEN_ONLY(20150709) add relations atpi
687 Elm_Atspi_Relation_Set atspi_custom_relations; /**< Developer-defined accessiblity relations */
688 ///////////////////////////////////
690 //TIZEN_ONLY(20160725): Add attributes set function and store the list
691 Eina_List *attr_list;
693 //TIZEN_ONLY(20150731) : add i18n support for name and description
694 const char *atspi_translation_domain;
696 //TIZEN_ONLY(20161013): clean up elm color class feature
697 Eina_Hash *color_classes;
700 Eina_Bool disabled : 1;
701 Eina_Bool on_deletion : 1;
702 Eina_Bool on_translate : 1;
703 Eina_Bool still_in : 1;
704 ///TIZEN_ONLY(20170717) : expose highlight information on atspi
705 Eina_Bool can_highlight : 1; /**< true if widget have at-spi HIGHLIGHTABLE state */
709 typedef void (*region_hook_func_type)(void *data, Evas_Object *obj);
710 typedef void * (*list_data_get_func_type)(const Eina_List * l);
712 #include "elm_widget.eo.h"
714 #define ELM_NEW(t) calloc(1, sizeof(t))
716 EAPI Evas_Object *elm_widget_add(Evas_Smart *, Evas_Object *);
717 EAPI void elm_widget_parent_set(Evas_Object *, Evas_Object *);
718 EAPI Eina_Bool elm_widget_api_check(int ver);
719 EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access);
720 //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
721 //register/unregister access objects accordingly.
722 // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property
723 EAPI Eina_Bool elm_widget_screen_reader(Evas_Object *obj, Eina_Bool is_access);
724 EAPI Eina_Bool elm_widget_atspi(Evas_Object *obj, Eina_Bool is_atspi);
725 //TIZEN_ONLY(20170621) handle atspi proxy connection at runtime
726 EAPI Eo *elm_widget_atspi_plug_type_proxy_get(Evas_Object *obj);
730 EAPI Elm_Theme_Apply elm_widget_theme(Evas_Object *obj);
731 EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
732 EAPI void elm_widget_translate(Evas_Object *obj);
733 EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Object *obj), void *data);
734 EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj);
735 EAPI Eina_Bool elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
736 EAPI Eina_Bool elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
737 EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj, Eina_Bool sub_obj);
738 EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
739 EAPI void elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source);
740 EAPI void elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
741 EAPI void *elm_widget_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
742 EAPI void elm_widget_can_focus_set(Evas_Object *obj, Eina_Bool can_focus);
743 EAPI Eina_Bool elm_widget_can_focus_get(const Evas_Object *obj);
744 EAPI Eina_Bool elm_widget_child_can_focus_get(const Evas_Object *obj);
745 EAPI Eina_List *elm_widget_can_focus_child_list_get(const Evas_Object *obj);
746 EAPI void elm_widget_tree_unfocusable_set(Evas_Object *obj, Eina_Bool tree_unfocusable);
747 EAPI Eina_Bool elm_widget_tree_unfocusable_get(const Evas_Object *obj);
748 EAPI void elm_widget_highlight_ignore_set(Evas_Object *obj, Eina_Bool ignore);
749 EAPI Eina_Bool elm_widget_highlight_ignore_get(const Evas_Object *obj);
750 EAPI void elm_widget_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
751 EAPI Eina_Bool elm_widget_highlight_in_theme_get(const Evas_Object *obj);
752 EAPI void elm_widget_access_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
753 EAPI Eina_Bool elm_widget_access_highlight_in_theme_get(const Evas_Object *obj);
754 EAPI Eina_Bool elm_widget_focus_get(const Evas_Object *obj);
755 EAPI Eina_Bool elm_widget_highlight_get(const Evas_Object *obj);
756 EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
757 EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
758 EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
759 EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
760 EAPI void elm_widget_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data);
761 EAPI void *elm_widget_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data);
762 EAPI Eina_Bool elm_widget_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags);
763 EAPI void elm_widget_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs);
764 EAPI void elm_widget_focus_custom_chain_unset(Evas_Object *obj);
765 EAPI const Eina_List *elm_widget_focus_custom_chain_get(const Evas_Object *obj);
766 EAPI void elm_widget_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child);
767 EAPI void elm_widget_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child);
768 EAPI void elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir);
769 EAPI Eina_Bool elm_widget_focus_direction_go(Evas_Object *obj, double degree);
770 EAPI Eina_Bool elm_widget_focus_direction_get(const Evas_Object *obj, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight);
771 EAPI Eina_Bool elm_widget_focus_next_get(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item);
772 EAPI Eina_Bool elm_widget_focus_list_direction_get(const Evas_Object *obj, const Evas_Object *base, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight);
773 EAPI Eina_Bool elm_widget_focus_list_next_get(const Evas_Object *obj, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item);
774 EAPI Evas_Object *elm_widget_focus_next_object_get(const Evas_Object *obj, Elm_Focus_Direction dir);
775 EAPI void elm_widget_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir);
776 EAPI Elm_Object_Item *elm_widget_focus_next_item_get(const Evas_Object *obj, Elm_Focus_Direction dir);
777 EAPI void elm_widget_focus_next_item_set(Evas_Object *obj, Elm_Object_Item *next_item, Elm_Focus_Direction dir);
778 EAPI Eina_Bool elm_widget_focus_highlight_style_set(Evas_Object *obj, const char *style);
779 EAPI const char *elm_widget_focus_highlight_style_get(const Evas_Object *obj);
780 EAPI void elm_widget_parent_highlight_set(Evas_Object *obj, Eina_Bool highlighted);
781 EAPI void elm_widget_focus_set(Evas_Object *obj, Eina_Bool focus);
782 EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
783 EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
784 EAPI Evas_Object *elm_widget_parent2_get(const Evas_Object *obj);
785 EAPI void elm_widget_parent2_set(Evas_Object *obj, Evas_Object *parent);
786 EAPI void elm_widget_focus_steal(Evas_Object *obj, Elm_Object_Item *next_item);
787 EAPI Evas_Object *elm_widget_newest_focus_order_get(const Evas_Object *obj, unsigned int *newest_focus_order, Eina_Bool can_focus_only);
788 EAPI void elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode);
789 EAPI Eina_Bool elm_widget_focus_highlight_enabled_get(const Evas_Object *obj);
790 EAPI void elm_widget_focus_highlight_focus_part_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
791 Evas_Object *_elm_widget_focus_highlight_object_get(const Evas_Object *obj);
792 double _elm_widget_focus_direction_weight_get(const Evas_Object *obj1, const Evas_Object *obj2, double degree);
793 EAPI const Elm_Widget_Smart_Class *elm_widget_smart_class_get(void);
798 * Restore the focus state of the sub-tree.
800 * This API will restore the focus state of the sub-tree to the latest
801 * state. If a sub-tree is unfocused and wants to get back to the latest
802 * focus state, this API will be helpful.
804 * @param obj The widget root of sub-tree
808 EAPI void elm_widget_focus_restore(Evas_Object *obj);
810 EAPI void elm_widget_disabled_set(Evas_Object *obj, Eina_Bool disabled);
811 EAPI Eina_Bool elm_widget_disabled_get(const Evas_Object *obj);
812 EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool forceshow);
813 EAPI void elm_widget_show_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
814 EAPI Eina_Bool elm_widget_focus_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
815 EAPI void elm_widget_focus_region_show(const Evas_Object *obj);
816 EAPI void elm_widget_parents_bounce_get(const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert);
817 EAPI void elm_widget_scroll_hold_push(Evas_Object *obj);
818 EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj);
819 EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj);
820 EAPI void elm_widget_scroll_freeze_push(Evas_Object *obj);
821 EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
822 EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
823 // TIZEN_ONLY(20150705): Genlist item align feature
824 EAPI void elm_widget_scroll_item_align_enabled_set(Evas_Object *obj, Eina_Bool scroll_item_align_enable);
825 EAPI Eina_Bool elm_widget_scroll_item_align_enabled_get(const Evas_Object *obj);
826 EAPI void elm_widget_scroll_item_valign_set(Evas_Object *obj, const char *scroll_item_valign);
827 EAPI const char* elm_widget_scroll_item_valign_get(const Evas_Object *obj);
829 EAPI void elm_widget_scale_set(Evas_Object *obj, double scale);
830 EAPI double elm_widget_scale_get(const Evas_Object *obj);
831 EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj);
832 EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored);
833 EAPI Eina_Bool elm_widget_mirrored_automatic_get(const Evas_Object *obj);
834 EAPI void elm_widget_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic);
835 EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
836 EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
837 EAPI Elm_Theme_Apply elm_widget_style_set(Evas_Object *obj, const char *style);
838 EAPI const char *elm_widget_style_get(const Evas_Object *obj);
839 EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);
840 EAPI const char *elm_widget_type_get(const Evas_Object *obj);
841 EAPI void elm_widget_tooltip_add(Evas_Object *obj, Elm_Tooltip *tt);
842 EAPI void elm_widget_tooltip_del(Evas_Object *obj, Elm_Tooltip *tt);
843 EAPI void elm_widget_cursor_add(Evas_Object *obj, Elm_Cursor *cur);
844 EAPI void elm_widget_cursor_del(Evas_Object *obj, Elm_Cursor *cur);
845 EAPI void elm_widget_drag_lock_x_set(Evas_Object *obj, Eina_Bool lock);
846 EAPI void elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock);
847 EAPI Eina_Bool elm_widget_drag_lock_x_get(const Evas_Object *obj);
848 EAPI Eina_Bool elm_widget_drag_lock_y_get(const Evas_Object *obj);
849 EAPI int elm_widget_drag_child_locked_x_get(const Evas_Object *obj);
850 EAPI int elm_widget_drag_child_locked_y_get(const Evas_Object *obj);
851 EAPI void elm_widget_item_loop_enabled_set(Evas_Object *obj, Eina_Bool enable);
852 EAPI Eina_Bool elm_widget_item_loop_enabled_get(const Evas_Object *obj);
853 EAPI Elm_Theme_Apply elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle);
854 EAPI Eina_Bool elm_widget_type_check(const Evas_Object *obj, const char *type, const char *func);
855 EAPI Evas_Object *elm_widget_name_find(const Evas_Object *obj, const char *name, int recurse);
856 EAPI Eina_List *elm_widget_stringlist_get(const char *str);
857 EAPI void elm_widget_stringlist_free(Eina_List *list);
858 EAPI void elm_widget_focus_hide_handle(Evas_Object *obj);
859 EAPI void elm_widget_focus_mouse_up_handle(Evas_Object *obj);
860 EAPI void elm_widget_focus_tree_unfocusable_handle(Evas_Object *obj);
861 EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj);
862 EAPI unsigned int elm_widget_focus_order_get(const Evas_Object *obj);
863 EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act);
864 EAPI void elm_widget_part_text_set(Evas_Object *obj, const char *part, const char *label);
865 EAPI const char *elm_widget_part_text_get(const Evas_Object *obj, const char *part);
866 EAPI void elm_widget_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text);
867 EAPI const char *elm_widget_translatable_part_text_get(const Evas_Object *obj, const char *part);
868 EAPI void elm_widget_domain_part_text_translatable_set(Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable);
869 EAPI const char * elm_widget_part_text_translate(Evas_Object *obj, const char *part, const char *text);
870 EAPI void elm_widget_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content);
871 EAPI Evas_Object *elm_widget_content_part_get(const Evas_Object *obj, const char *part);
872 EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *part);
873 EAPI void elm_widget_access_info_set(Evas_Object *obj, const char *txt);
874 EAPI const char *elm_widget_access_info_get(const Evas_Object *obj);
875 EAPI void elm_widget_orientation_set(Evas_Object *obj, int rotation);
876 EAPI Elm_Object_Item *elm_widget_focused_item_get(const Evas_Object *obj);
877 EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled);
878 EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj);
879 EAPI void elm_widget_focus_highlight_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
880 void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it);
881 EAPI void elm_widget_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy);
882 EAPI Elm_Focus_Move_Policy elm_widget_focus_move_policy_get(const Evas_Object *obj);
883 EAPI Eina_Bool elm_widget_focus_move_policy_automatic_get(const Evas_Object *obj);
884 EAPI void elm_widget_focus_move_policy_automatic_set(Evas_Object *obj, Eina_Bool automatic);
885 EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode);
886 EAPI Elm_Focus_Region_Show_Mode elm_widget_focus_region_show_mode_get(const Evas_Object *obj);
887 EAPI void elm_widget_focus_reconfigure(Evas_Object *obj);
888 //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
889 EAPI Evas_Object *elm_widget_part_access_object_get(const Evas_Object *obj, const char *part);
891 EAPI Eo* _elm_atspi_bridge_utils_plug_create(Eo *parent, const char *svcname, int svcnum);
892 EAPI Eo* _elm_atspi_bridge_utils_socket_create(Eo *parent, const char *svcname, int svcnum);
895 * Function to operate on a given widget's scrollabe children when necessary.
896 * @warning free the returned list with eina_list_free().
898 EAPI Eina_List *elm_widget_scrollable_children_get(const Evas_Object *obj);
900 /* debug function. don't use it unless you are tracking parenting issues */
901 EAPI void elm_widget_tree_dump(const Evas_Object *top);
902 EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *output);
903 EAPI Eina_Bool _elm_widget_onscreen_is(Evas_Object *widget);
904 EAPI Eina_Bool _elm_widget_item_onscreen_is(Elm_Object_Item *item);
905 const char* _elm_widget_accessible_plain_name_get(Evas_Object *obj, const char* name);
906 const char* _elm_widget_item_accessible_plain_name_get(Elm_Object_Item *item, const char* name);
907 //TIZEN_ONLY(20161107): enhance elm_atspi_accessible_can_highlight_set to set can_hihglight property to its children
908 EAPI Eina_Bool _elm_widget_highlightable(Evas_Object *widget);
909 EAPI Eina_Bool _elm_widget_item_highlightable(Elm_Object_Item *item);
911 //TIZEN_ONLY(20170905): find valid child of list item
912 Eina_Bool _elm_widget_atspi_role_acceptable_check(Eo *obj);
915 #define ELM_WIDGET_DATA_GET_OR_RETURN(o, ptr, ...) \
916 Elm_Widget_Smart_Data *ptr; \
917 ptr = eo_data_scope_get(o, ELM_WIDGET_CLASS); \
918 if (EINA_UNLIKELY(!ptr)) \
920 CRI("no widget data for object %p (%s)", \
921 o, evas_object_type_get(o)); \
922 return __VA_ARGS__; \
925 #define ELM_WIDGET_CHECK(obj) \
926 if (EINA_UNLIKELY(!eo_isa((obj), ELM_WIDGET_CLASS))) \
929 #define ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, ...) \
931 if (item && (item)->on_deletion) { \
932 WRN("Elm_Widget_Item " # item " is deleting"); \
933 return __VA_ARGS__; \
937 #define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \
940 CRI("Elm_Widget_Item " # item " is NULL"); \
941 return __VA_ARGS__; \
943 if ((item)->eo_obj && \
944 eo_isa((item)->eo_obj, ELM_WIDGET_ITEM_CLASS)) break; \
945 if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \
946 EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \
947 return __VA_ARGS__; \
951 #define ELM_WIDGET_ITEM_CHECK_OR_GOTO(item, label) \
954 CRI("Elm_Widget_Item " # item " is NULL"); \
957 if ((item)->eo_obj && \
958 eo_isa((item)->eo_obj, ELM_WIDGET_ITEM_CLASS)) break; \
959 if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \
960 EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \
965 static inline Eina_Bool
966 _elm_widget_sub_object_redirect_to_top(Evas_Object *obj, Evas_Object *sobj)
968 Eina_Bool ret = elm_widget_sub_object_del(obj, sobj);
970 ret = elm_widget_sub_object_add(elm_widget_top_get(obj), sobj);
975 //TIZEN_ONLY(20161013): clean up elm color class feature
976 Eina_Bool _elm_widget_item_color_class_update(Elm_Widget_Item_Data *sd);
979 /* to be used by INTERNAL classes on Elementary, so that the widgets
980 * parsing script skips it */
981 #define ELM_INTERNAL_SMART_SUBCLASS_NEW EVAS_SMART_SUBCLASS_NEW
983 EAPI Eina_Bool elm_selection_selection_has_owner(Evas_Object *obj);
985 #define ELM_WIDGET_ITEM_PROTECTED
986 #include "elm_widget_item.eo.h"