summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_item_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_item_private.h')
-rw-r--r--src/lib/elementary/efl_ui_item_private.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_item_private.h b/src/lib/elementary/efl_ui_item_private.h
new file mode 100644
index 0000000000..b8849a2316
--- /dev/null
+++ b/src/lib/elementary/efl_ui_item_private.h
@@ -0,0 +1,37 @@
+#ifndef EFL_UI_ITEM_PRIVATE_H
+#define EFL_UI_ITEM_PRIVATE_H
+
+#include "Elementary.h"
+
+typedef struct _Efl_Ui_Item_Data
+{
+ // Eo Objects
+ Eo *obj; /* Self-Object */
+ Eo *parent; /* Parent Widget */
+
+ Efl_Ui_Select_Mode *select_mode; /* Select Mdoe of parent widget */
+ Ecore_Timer *longpress_timer; /* Timer for longpress handle */
+
+ // Boolean Data
+ Eina_Bool selected : 1; /* State for item selected */
+ Eina_Bool needs_size_calc : 1; /* Flag for Size calculation */
+} Efl_Ui_Item_Data;
+
+
+#define EFL_UI_ITEM_DATA_GET(o, pd) \
+ Efl_Ui_Item_Data * pd = efl_data_scope_safe_get(o, EFL_UI_ITEM_CLASS)
+
+#define EFL_UI_ITEM_DATA_GET_OR_RETURN(o, ptr, ...) \
+ EFL_UI_ITEM_DATA_GET(o, ptr); \
+ if (EINA_UNLIKELY(!ptr)) \
+ { \
+ ERR("No widget data for object %p (%s)", \
+ o, evas_object_type_get(o)); \
+ return __VA_ARGS__; \
+ }
+
+#define EFL_UI_ITEM_CHECK_OR_RETURN(obj, ...) \
+ if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_ITEM_CLASS))) \
+ return __VA_ARGS__;
+
+#endif