summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_widget_entry.h
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2012-11-26 06:32:53 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-11-26 06:32:53 +0000
commit5c9834319878a3717b1d422a83e4930190eeab07 (patch)
tree3eb8b9e2d641e5385d1996ba68ea321f3563f612 /legacy/elementary/src/lib/elm_widget_entry.h
parent1388bbb3f34e9277c0174ad0ad21a34b3d1e9d0c (diff)
We have ported to Eo all the widgets of elementary. We didn't change the inheritance itself, only the mechanism, as done previously in Evas, Ecore and Edje. We removed totally the previous inheritance mechanism.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com> Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 79668
Diffstat (limited to '')
-rw-r--r--legacy/elementary/src/lib/elm_widget_entry.h114
1 files changed, 2 insertions, 112 deletions
diff --git a/legacy/elementary/src/lib/elm_widget_entry.h b/legacy/elementary/src/lib/elm_widget_entry.h
index 1c49121..2e1c0ee 100644
--- a/legacy/elementary/src/lib/elm_widget_entry.h
+++ b/legacy/elementary/src/lib/elm_widget_entry.h
@@ -15,107 +15,6 @@
15 * other widgets which are a entry with some more logic on top. 15 * other widgets which are a entry with some more logic on top.
16 */ 16 */
17 17
18/**
19 * @def ELM_ENTRY_CLASS
20 *
21 * Use this macro to cast whichever subclass of
22 * #Elm_Entry_Smart_Class into it, so to access its fields.
23 *
24 * @ingroup Widget
25 */
26#define ELM_ENTRY_CLASS(x) ((Elm_Entry_Smart_Class *)x)
27
28/**
29 * @def ELM_ENTRY_DATA
30 *
31 * Use this macro to cast whichever subdata of
32 * #Elm_Entry_Smart_Data into it, so to access its fields.
33 *
34 * @ingroup Widget
35 */
36#define ELM_ENTRY_DATA(x) ((Elm_Entry_Smart_Data *)x)
37
38/**
39 * @def ELM_ENTRY_SMART_CLASS_VERSION
40 *
41 * Current version for Elementary entry @b base smart class, a value
42 * which goes to _Elm_Entry_Smart_Class::version.
43 *
44 * @ingroup Widget
45 */
46#define ELM_ENTRY_SMART_CLASS_VERSION 1
47
48/**
49 * @def ELM_ENTRY_SMART_CLASS_INIT
50 *
51 * Initializer for a whole #Elm_Entry_Smart_Class structure, with
52 * @c NULL values on its specific fields.
53 *
54 * @param smart_class_init initializer to use for the "base" field
55 * (#Evas_Smart_Class).
56 *
57 * @see EVAS_SMART_CLASS_INIT_NULL
58 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
59 * @see ELM_ENTRY_SMART_CLASS_INIT_NULL
60 * @see ELM_ENTRY_SMART_CLASS_INIT_NAME_VERSION
61 *
62 * @ingroup Widget
63 */
64#define ELM_ENTRY_SMART_CLASS_INIT(smart_class_init) \
65 {smart_class_init, ELM_ENTRY_SMART_CLASS_VERSION}
66
67/**
68 * @def ELM_ENTRY_SMART_CLASS_INIT_NULL
69 *
70 * Initializer to zero out a whole #Elm_Entry_Smart_Class structure.
71 *
72 * @see ELM_ENTRY_SMART_CLASS_INIT_NAME_VERSION
73 * @see ELM_ENTRY_SMART_CLASS_INIT
74 *
75 * @ingroup Widget
76 */
77#define ELM_ENTRY_SMART_CLASS_INIT_NULL \
78 ELM_ENTRY_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL)
79
80/**
81 * @def ELM_ENTRY_SMART_CLASS_INIT_NAME_VERSION
82 *
83 * Initializer to zero out a whole #Elm_Entry_Smart_Class structure and
84 * set its name and version.
85 *
86 * This is similar to #ELM_ENTRY_SMART_CLASS_INIT_NULL, but it will
87 * also set the version field of #Elm_Entry_Smart_Class (base field)
88 * to the latest #ELM_ENTRY_SMART_CLASS_VERSION and name it to the
89 * specific value.
90 *
91 * It will keep a reference to the name field as a <c>"const char *"</c>,
92 * i.e., the name must be available while the structure is
93 * used (hint: static or global variable!) and must not be modified.
94 *
95 * @see ELM_ENTRY_SMART_CLASS_INIT_NULL
96 * @see ELM_ENTRY_SMART_CLASS_INIT
97 *
98 * @ingroup Widget
99 */
100#define ELM_ENTRY_SMART_CLASS_INIT_NAME_VERSION(name) \
101 ELM_ENTRY_SMART_CLASS_INIT \
102 (ELM_LAYOUT_SMART_CLASS_INIT_NAME_VERSION(name))
103
104/**
105 * Elementary entry base smart class. This inherits directly from
106 * #Elm_Layout_Smart_Class and is meant to build widgets extending the
107 * behavior of a entry.
108 *
109 * All of the functions listed on @ref Entry namespace will work for
110 * objects deriving from #Elm_Entry_Smart_Class.
111 */
112typedef struct _Elm_Entry_Smart_Class
113{
114 Elm_Layout_Smart_Class base;
115
116 int version; /**< Version of this smart class definition */
117} Elm_Entry_Smart_Class;
118
119typedef struct _Mod_Api Mod_Api; 18typedef struct _Mod_Api Mod_Api;
120 19
121/** 20/**
@@ -124,12 +23,7 @@ typedef struct _Mod_Api Mod_Api;
124typedef struct _Elm_Entry_Smart_Data Elm_Entry_Smart_Data; 23typedef struct _Elm_Entry_Smart_Data Elm_Entry_Smart_Data;
125struct _Elm_Entry_Smart_Data 24struct _Elm_Entry_Smart_Data
126{ 25{
127 Elm_Layout_Smart_Data base; /* base widget smart data as
128 * first member obligatory, as
129 * we're inheriting from it */
130
131 Evas_Object *hit_rect, *entry_edje, *scr_edje; 26 Evas_Object *hit_rect, *entry_edje, *scr_edje;
132 const Elm_Scrollable_Smart_Interface *s_iface;
133 27
134 Evas_Object *hoversel; 28 Evas_Object *hoversel;
135 Ecore_Job *deferred_recalc_job; 29 Ecore_Job *deferred_recalc_job;
@@ -236,11 +130,8 @@ typedef enum _Length_Unit
236 * @} 130 * @}
237 */ 131 */
238 132
239EAPI extern const char ELM_ENTRY_SMART_NAME[];
240EAPI const Elm_Entry_Smart_Class *elm_entry_smart_class_get(void);
241
242#define ELM_ENTRY_DATA_GET(o, sd) \ 133#define ELM_ENTRY_DATA_GET(o, sd) \
243 Elm_Entry_Smart_Data * sd = evas_object_smart_data_get(o) 134 Elm_Entry_Smart_Data * sd = eo_data_get(o, ELM_OBJ_ENTRY_CLASS)
244 135
245#define ELM_ENTRY_DATA_GET_OR_RETURN(o, ptr) \ 136#define ELM_ENTRY_DATA_GET_OR_RETURN(o, ptr) \
246 ELM_ENTRY_DATA_GET(o, ptr); \ 137 ELM_ENTRY_DATA_GET(o, ptr); \
@@ -261,8 +152,7 @@ EAPI const Elm_Entry_Smart_Class *elm_entry_smart_class_get(void);
261 } 152 }
262 153
263#define ELM_ENTRY_CHECK(obj) \ 154#define ELM_ENTRY_CHECK(obj) \
264 if (!obj || !elm_widget_type_check \ 155 if (!eo_isa((obj), ELM_OBJ_ENTRY_CLASS)) \
265 ((obj), ELM_ENTRY_SMART_NAME, __func__)) \
266 return 156 return
267 157
268#endif 158#endif