summaryrefslogtreecommitdiff
path: root/src/lib/eo
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-04-21 15:47:12 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-04-21 15:48:31 +0200
commitda43c63ce120708100e5205d3d29df26506ca88c (patch)
tree73656bae0bc82236f78a2a3e3c6bd3455bbd5908 /src/lib/eo
parentc9377e2ef7a1fc8bdfe002180951993b9794e1d3 (diff)
eo: move event related structures and callback to C
We don't need to keep this in eo files anymore because the APIs using them are now fully in C. This also allows removal of the event callback builtin from Eolian.
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/Eo.h38
-rw-r--r--src/lib/eo/efl_object.eo20
2 files changed, 30 insertions, 28 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index fe67aa0938..6e59f38304 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -216,22 +216,44 @@ typedef void (*Efl_Del_Intercept) (Eo *obj_id);
216 */ 216 */
217typedef Eo Efl_Future; 217typedef Eo Efl_Future;
218 218
219/**
220 * @typedef Efl_Event
221 * A parameter passed in event callbacks holding extra event parameters.
222 */
223typedef struct _Efl_Event Efl_Event;
224
225#include "efl_object_override.eo.h" 219#include "efl_object_override.eo.h"
226#include "efl_object.eo.h" 220#include "efl_object.eo.h"
227#include "efl_interface.eo.h" 221#include "efl_interface.eo.h"
228#define EO_CLASS EFL_OBJECT_CLASS 222#define EO_CLASS EFL_OBJECT_CLASS
229 223
230struct _Efl_Event { 224/**
225 * @struct _Efl_Event
226 * A parameter passed in event callbacks holding extra event parameters.
227 */
228typedef struct _Efl_Event {
231 Efl_Object *object; /**< The object the event was called on. */ 229 Efl_Object *object; /**< The object the event was called on. */
232 const Efl_Event_Description *desc; /**< The event description. */ 230 const Efl_Event_Description *desc; /**< The event description. */
233 void *info; /**< Extra event information passed by the event caller. */ 231 void *info; /**< Extra event information passed by the event caller. */
234}; 232} Efl_Event;
233
234/** An event callback prototype. */
235typedef void (*Efl_Event_Cb)(void *data, const Efl_Event *event);
236
237/**
238 * @brief Callback priority value. Range is -32k - 32k. The lower the number,
239 * the higher the priority.
240 *
241 * See @ref EFL_CALLBACK_PRIORITY_AFTER, @ref EFL_CALLBACK_PRIORITY_BEFORE @ref
242 * EFL_CALLBACK_PRIORITY_DEFAULT
243 */
244typedef short Efl_Callback_Priority;
245
246/**
247 * @struct _Efl_Callback_Array_Item
248 * @brief An item in an array of callback desc/func.
249 *
250 * See also efl_event_callback_array_add().
251 */
252typedef struct _Efl_Callback_Array_Item
253{
254 const Efl_Event_Description *desc; /**< The event description. */
255 Efl_Event_Cb func; /**< The callback function. */
256} Efl_Callback_Array_Item;
235 257
236/** 258/**
237 * @brief Add a callback for an event with a specific priority. 259 * @brief Add a callback for an event with a specific priority.
diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo
index c55ed76e2c..f5f1d4e08e 100644
--- a/src/lib/eo/efl_object.eo
+++ b/src/lib/eo/efl_object.eo
@@ -8,32 +8,12 @@ struct Efl.Event.Description {
8 restart: bool; [[$true if when the event is triggered again from a callback, it should start from where it was]] 8 restart: bool; [[$true if when the event is triggered again from a callback, it should start from where it was]]
9} 9}
10 10
11type Efl.Event_Cb: __builtin_event_cb; [[An event callback prototype.]]
12
13struct Efl.Callback_Array_Item {
14 [[An item in an array of callback desc/func.
15
16 See also \@ref efl_event_callback_array_add.
17 ]]
18 desc: ptr(const(Efl.Event.Description)); [[The event description.]]
19 func: Efl.Event_Cb; [[The callback function.]]
20}
21
22struct Efl.Dbg_Info { 11struct Efl.Dbg_Info {
23 [[The structure for the debug info used by Eo.]] 12 [[The structure for the debug info used by Eo.]]
24 name: stringshare; [[The name of the part (stringshare).]] 13 name: stringshare; [[The name of the part (stringshare).]]
25 value: generic_value; [[The value.]] 14 value: generic_value; [[The value.]]
26} 15}
27 16
28
29type Efl.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k.
30 The lower the number, the higher the priority.
31
32 See \@ref EFL_CALLBACK_PRIORITY_AFTER,
33 \@ref EFL_CALLBACK_PRIORITY_BEFORE
34 \@ref EFL_CALLBACK_PRIORITY_DEFAULT
35 ]]
36
37abstract Efl.Object () 17abstract Efl.Object ()
38{ 18{
39 [[Abstract Efl object class]] 19 [[Abstract Efl object class]]