summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-24 11:09:46 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-24 11:10:08 +0100
commit92d39a9ed93e0fa67b314c78deaf60433ef1301e (patch)
tree22941d0b93ef834e382bdeb0205e92b7ce0e9a29
parentadff9e013d32df52f78b807a7e2ac5351dad899d (diff)
elua: ad the rest of Eo APIs to ffi cdef
-rw-r--r--src/bindings/luajit/eo.lua51
1 files changed, 49 insertions, 2 deletions
diff --git a/src/bindings/luajit/eo.lua b/src/bindings/luajit/eo.lua
index a85a0eb6b8..c80a568078 100644
--- a/src/bindings/luajit/eo.lua
+++ b/src/bindings/luajit/eo.lua
@@ -5,10 +5,31 @@ local ffi = require("ffi")
5 5
6ffi.cdef [[ 6ffi.cdef [[
7 typedef unsigned char Eina_Bool; 7 typedef unsigned char Eina_Bool;
8 typedef struct _Eina_Iterator Eina_Iterator;
8 9
9 typedef struct _Eo_Opaque Eo; 10 typedef struct _Eo_Opaque Eo;
10 typedef Eo Eo_Class; 11 typedef Eo Eo_Class;
11 12
13 typedef short Eo_Callback_Priority;
14
15 typedef void (*eo_key_data_free_func)(void *);
16
17 struct _Eo_Event_Description {
18 const char *name;
19 const char *doc;
20 Eina_Bool unfreezable;
21 };
22 typedef struct _Eo_Event_Description Eo_Event_Description;
23
24 typedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj,
25 const Eo_Event_Description *desc, void *event_info);
26
27 struct _Eo_Callback_Array_Item {
28 const Eo_Event_Description *desc;
29 Eo_Event_Cb func;
30 };
31 typedef struct _Eo_Callback_Array_Item Eo_Callback_Array_Item;
32
12 Eina_Bool eo_init(void); 33 Eina_Bool eo_init(void);
13 Eina_Bool eo_shutdown(void); 34 Eina_Bool eo_shutdown(void);
14 35
@@ -36,6 +57,9 @@ ffi.cdef [[
36 Eo *eo_ref(const Eo *obj); 57 Eo *eo_ref(const Eo *obj);
37 void eo_unref(const Eo *obj); 58 void eo_unref(const Eo *obj);
38 int eo_ref_get(const Eo *obj); 59 int eo_ref_get(const Eo *obj);
60 void eo_wref_add(Eo **wref);
61 void eo_wref_del(Eo **wref);
62
39 void eo_del(const Eo *obj); 63 void eo_del(const Eo *obj);
40 64
41 void eo_manual_free_set(Eo *obj, Eina_Bool manual_free); 65 void eo_manual_free_set(Eo *obj, Eina_Bool manual_free);
@@ -46,8 +70,6 @@ ffi.cdef [[
46 Eina_Bool eo_composite_detach(Eo *comp_obj, Eo *parent); 70 Eina_Bool eo_composite_detach(Eo *comp_obj, Eo *parent);
47 Eina_Bool eo_composite_is(const Eo *comp_obj); 71 Eina_Bool eo_composite_is(const Eo *comp_obj);
48 72
49 Eo *eo_finalize(void);
50
51 void eo_parent_set(Eo *parent); 73 void eo_parent_set(Eo *parent);
52 Eo *eo_parent_get(void); 74 Eo *eo_parent_get(void);
53 75
@@ -57,6 +79,31 @@ ffi.cdef [[
57 void eo_event_global_freeze(void); 79 void eo_event_global_freeze(void);
58 void eo_event_global_thaw(void); 80 void eo_event_global_thaw(void);
59 int eo_event_global_freeze_count_get(void); 81 int eo_event_global_freeze_count_get(void);
82
83 Eina_Bool eo_finalized_get(void);
84 Eo *eo_finalize(void);
85
86 void eo_event_callback_forwarder_add(const Eo_Event_Description *desc,
87 Eo *new_obj);
88 void eo_event_callback_forwarder_del(const Eo_Event_Description *desc,
89 Eo *new_obj);
90 void eo_event_callback_priority_add(const Eo_Event_Description *desc,
91 Eo_Callback_Priority priority, Eo_Event_Cb cb, const void *data);
92 void eo_event_callback_del(const Eo_Event_Description *desc,
93 Eo_Event_Cb func, const void *user_data);
94 void eo_event_callback_array_priority_add(const Eo_Callback_Array_Item *array,
95 Eo_Callback_Priority priority, const void *data);
96 void eo_event_callback_array_del(const Eo_Callback_Array_Item *array,
97 const void *user_data);
98 Eina_Bool eo_event_callback_call(const Eo_Event_Description *desc,
99 void *event_info);
100
101 void eo_key_data_set(const char *key, const void *data,
102 eo_key_data_free_func free_func);
103 void *eo_key_data_get(const char *key);
104 void eo_key_data_del(const char *key);
105
106 Eina_Iterator *eo_children_iterator_new(void);
60]] 107]]
61 108
62local cutil = require("cutil") 109local cutil = require("cutil")