summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_mi_rule_private.h
blob: b41788799409f695d66c908e657c8f74cd3727b8 (plain) (blame)
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_MI_RULE_PRIVATE_H
#define EFL_UI_MI_RULE_PRIVATE_H

#include "Elementary.h"
#include "efl_ui_mi_rule.eo.h"

typedef struct _Efl_Ui_Mi_Rule_Data Efl_Ui_Mi_Rule_Data;

struct _Efl_Ui_Mi_Rule_Data
{
   Evas_Object *event_rect;
   Eina_Stringshare *keypath;
};

#define EFL_UI_MI_RULE_DATA_GET(o, sd) \
  Efl_Ui_Mi_Rule_Data * sd = efl_data_scope_safe_get(o, EFL_UI_MI_RULE_CLASS)

#define EFL_UI_MI_RULE_DATA_GET_OR_RETURN(o, ptr)   \
  EFL_UI_MI_RULE_DATA_GET(o, ptr);                  \
  if (EINA_UNLIKELY(!ptr))                              \
    {                                                   \
       ERR("No widget data for object %p (%s)",         \
           o, evas_object_type_get(o));                 \
       return;                                          \
    }

#endif