summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_list_item_private.h
blob: 0df36bc459d4d282e87f6a4ee87c03700bddec78 (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
28
29
30
#ifndef EFL_UI_LIST_ITEM_PRIVATE_H
#define EFL_UI_LIST_ITEM_PRIVATE_H

#include "Elementary.h"

typedef struct _Efl_Ui_List_Item_Data
{
   // Eo Objects
   Eo *obj; /* Self-Object */
   Eina_Bool  needs_size_calc : 1; /* Flag for Size calculation */
} Efl_Ui_List_Item_Data;


#define EFL_UI_LIST_ITEM_DATA_GET(o, pd) \
  Efl_Ui_List_Item_Data * pd = efl_data_scope_safe_get(o, EFL_UI_LIST_ITEM_CLASS)

#define EFL_UI_LIST_ITEM_DATA_GET_OR_RETURN(o, ptr, ...)   \
  EFL_UI_LIST_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_LIST_ITEM_CHECK_OR_RETURN(obj, ...)            \
  if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_LIST_ITEM_CLASS))) \
    return __VA_ARGS__;

#endif