summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_popup_private.h
blob: 3cf0eee24a97fce53d1960727b591c7e7cd933c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef EFL_UI_WIDGET_POPUP_H
#define EFL_UI_WIDGET_POPUP_H

typedef struct _Efl_Ui_Popup_Data Efl_Ui_Popup_Data;
struct _Efl_Ui_Popup_Data
{
   Eo                *win_parent;
   Eo                *backwall;
   Efl_Ui_Popup_Align align;
   Ecore_Timer       *timer;
   double             timeout;
   Eina_Bool          needs_group_calc : 1;
   Eina_Bool          needs_size_calc : 1;
   Eina_Bool          needs_align_calc : 1;
};

#define EFL_UI_POPUP_DATA_GET_OR_RETURN(o, ptr, ...) \
  Efl_Ui_Popup_Data *ptr;                            \
  ptr = efl_data_scope_get(o, EFL_UI_POPUP_CLASS);   \
  if (EINA_UNLIKELY(!ptr))                           \
    {                                                \
       CRI("no ui popup data for object %p (%s)",    \
           o, evas_object_type_get(o));              \
       return __VA_ARGS__;                           \
    }

#endif