summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo_base.eo
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-05-29 10:32:48 +0100
committerTom Hacohen <tom@stosb.com>2015-05-29 11:39:03 +0100
commit5b89cf16336380c2d74690b6bbbbf7a9f36b0fa0 (patch)
tree40afec3e9a83b11c7a6d1de6460893fd72e20a1a /src/lib/eo/eo_base.eo
parentcab1391471b96752c846d6a030c7397f4d226db2 (diff)
Eo base: move type definitions into eo_base.eo.
Diffstat (limited to '')
-rw-r--r--src/lib/eo/eo_base.eo62
1 files changed, 50 insertions, 12 deletions
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 97bc6bff27..1a2b05ff8e 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -1,3 +1,41 @@
1/* XXX: Hack until Eolian is ready. */
2type @extern Eo.Event_Cb: __builtin_event_cb;
3
4struct Eo.Event_Description {
5 /*@
6 * This struct holds the description of a specific event.
7 */
8 name: const(char) *; /*@< name of the event. */
9 doc: const(char) *; /*@< Explanation about the event. */
10 unfreezable: bool; /*@< Eina_True if the event cannot be frozen */
11}
12
13struct Eo.Callback_Array_Item {
14 /*@
15 * An item in an array of callback desc/func.
16 * @see eo_event_callback_array_add()
17 */
18 desc: const(Eo.Event_Description) *; /*@< The event description. */
19 func: Eo.Event_Cb; /*@< The callback function. */
20}
21
22struct Eo.Dbg_Info {
23 /*@
24 * The structure for the debug info used by Eo.
25 */
26 name: Eina_Stringshare *; /*@< The name of the part (stringshare). */
27 value: Eina_Value; /*@< The value. */
28}
29
30
31type Eo.Callback_Priority: short; /*@ * Callback priority value. Range is -32k - 32k.
32 *The lower the number, the higher the priority.
33 *
34 * @see EO_CALLBACK_PRIORITY_AFTER
35 * @see EO_CALLBACK_PRIORITY_BEFORE
36 * @see EO_CALLBACK_PRIORITY_DEFAULT
37 */
38
1abstract Eo.Base () 39abstract Eo.Base ()
2{ 40{
3 eo_prefix: eo; 41 eo_prefix: eo;
@@ -109,17 +147,17 @@ Prevents event callbacks from being called for the object. */
109 /*@ Add a callback for an event with a specific priority. 147 /*@ Add a callback for an event with a specific priority.
110callbacks of the same priority are called in reverse order of creation. */ 148callbacks of the same priority are called in reverse order of creation. */
111 params { 149 params {
112 @in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */ 150 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
113 @in priority: Eo_Callback_Priority; /*@ The priority of the callback */ 151 @in priority: Eo.Callback_Priority; /*@ The priority of the callback */
114 @in cb: Eo_Event_Cb; /*@ the callback to call */ 152 @in cb: Eo.Event_Cb; /*@ the callback to call */
115 @in data: const(void)*; /*@ additional data to pass to the callback */ 153 @in data: const(void)*; /*@ additional data to pass to the callback */
116 } 154 }
117 } 155 }
118 event_callback_del { 156 event_callback_del {
119 /*@ Del a callback with a specific data associated to it for an event. */ 157 /*@ Del a callback with a specific data associated to it for an event. */
120 params { 158 params {
121 @in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */ 159 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
122 @in func: Eo_Event_Cb; /*@ the callback to delete */ 160 @in func: Eo.Event_Cb; /*@ the callback to delete */
123 @in user_data: const(void)*; /*@ The data to compare */ 161 @in user_data: const(void)*; /*@ The data to compare */
124 } 162 }
125 } 163 }
@@ -127,22 +165,22 @@ callbacks of the same priority are called in reverse order of creation. */
127 /*@ Add a callback array for an event with a specific priority. 165 /*@ Add a callback array for an event with a specific priority.
128callbacks of the same priority are called in reverse order of creation. */ 166callbacks of the same priority are called in reverse order of creation. */
129 params { 167 params {
130 @in array: const(Eo_Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */ 168 @in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
131 @in priority: Eo_Callback_Priority; /*@ The priority of the callback */ 169 @in priority: Eo.Callback_Priority; /*@ The priority of the callback */
132 @in data: const(void)*; /*@ additional data to pass to the callback */ 170 @in data: const(void)*; /*@ additional data to pass to the callback */
133 } 171 }
134 } 172 }
135 event_callback_array_del { 173 event_callback_array_del {
136 /*@ Del a callback array with a specific data associated to it for an event. */ 174 /*@ Del a callback array with a specific data associated to it for an event. */
137 params { 175 params {
138 @in array: const(Eo_Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */ 176 @in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
139 @in user_data: const(void)*; /*@ The data to compare */ 177 @in user_data: const(void)*; /*@ The data to compare */
140 } 178 }
141 } 179 }
142 event_callback_call { 180 event_callback_call {
143 /*@ Call the callbacks for an event of an object. */ 181 /*@ Call the callbacks for an event of an object. */
144 params { 182 params {
145 @in desc: const(Eo_Event_Description)*; /*@ The description of the event to call */ 183 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to call */
146 @in event_info: void *; /*@ Extra event info to pass to the callbacks */ 184 @in event_info: void *; /*@ Extra event info to pass to the callbacks */
147 } 185 }
148 return: bool; /*@ @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */ 186 return: bool; /*@ @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */
@@ -150,21 +188,21 @@ callbacks of the same priority are called in reverse order of creation. */
150 event_callback_forwarder_add { 188 event_callback_forwarder_add {
151 /*@ Add an event callback forwarder for an event and an object. */ 189 /*@ Add an event callback forwarder for an event and an object. */
152 params { 190 params {
153 @in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */ 191 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
154 @in new_obj: Eo.Base *; /*@ The object to emit events from */ 192 @in new_obj: Eo.Base *; /*@ The object to emit events from */
155 } 193 }
156 } 194 }
157 event_callback_forwarder_del { 195 event_callback_forwarder_del {
158 /*@ Remove an event callback forwarder for an event and an object. */ 196 /*@ Remove an event callback forwarder for an event and an object. */
159 params { 197 params {
160 @in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */ 198 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
161 @in new_obj: Eo.Base *; /*@ The object to emit events from */ 199 @in new_obj: Eo.Base *; /*@ The object to emit events from */
162 } 200 }
163 } 201 }
164 dbg_info_get { 202 dbg_info_get {
165 /*@ Get dbg information from the object. */ 203 /*@ Get dbg information from the object. */
166 params { 204 params {
167 @in root_node: Eo_Dbg_Info*; /*@ node of the tree */ 205 @in root_node: Eo.Dbg_Info*; /*@ node of the tree */
168 } 206 }
169 } 207 }
170 children_iterator_new { 208 children_iterator_new {