summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo_base.eo
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-14 17:19:58 +0000
committerTom Hacohen <tom@stosb.com>2016-03-14 17:23:53 +0000
commitda37a41fd1cb861df56862a2e0d88e8ff4b2cb59 (patch)
tree6c5012b2df61c62edd7204b74a6a9470b02174e6 /src/lib/eo/eo_base.eo
parent22875f066c5b0f341bdae57d14b4428b525a273e (diff)
Eo: Move generation of Eo_Event_Cb to Eolian.
This fixes the type redefinition warning (apparently it's C11). Thanks to bu5hm4n for reporting this.
Diffstat (limited to '')
-rw-r--r--src/lib/eo/eo_base.eo21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 8a31a35233..aa952c0bbc 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -1,8 +1,5 @@
1import eina_types; 1import eina_types;
2 2
3/* Event callbacks are a special case and have to be external as eolian doesn't support function pointers. */
4type @extern Eo.Event_Cb: __builtin_event_cb;
5
6struct Eo.Event_Description { 3struct Eo.Event_Description {
7 [[This struct holds the description of a specific event.]] 4 [[This struct holds the description of a specific event.]]
8 name: const(char) *; [[name of the event.]] 5 name: const(char) *; [[name of the event.]]
@@ -10,6 +7,17 @@ struct Eo.Event_Description {
10 legacy_is: bool; [[Internal use: if is a legacy event.]] 7 legacy_is: bool; [[Internal use: if is a legacy event.]]
11} 8}
12 9
10struct Eo.Event {
11 [[Parameter passed in event callbacks holding extra event parameters]]
12 obj: Eo.Base *; [[The object the event was called on.]]
13 desc: const(Eo.Event_Description) *; [[The event description.]]
14 event_info: void *; [[Extra event information passed by the event caller.]]
15}
16
17type Eo.Event_Cb: __builtin_event_cb; [[An event callback prototype.
18 return $EO_CALLBACK_STOP to stop calling additional callbacks for the event, $EO_CALLBACK_CONTINUE to continue.]]
19
20
13struct Eo.Callback_Array_Item { 21struct Eo.Callback_Array_Item {
14 [[An item in an array of callback desc/func. 22 [[An item in an array of callback desc/func.
15 23
@@ -34,13 +42,6 @@ type Eo.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k
34 \@ref EO_CALLBACK_PRIORITY_DEFAULT 42 \@ref EO_CALLBACK_PRIORITY_DEFAULT
35 ]] 43 ]]
36 44
37struct Eo.Event {
38 [[Parameter passed in event callbacks holding extra event parameters]]
39 obj: Eo.Base *; [[The object the event was called on.]]
40 desc: const(Eo.Event_Description) *; [[The event description.]]
41 event_info: void *; [[Extra event information passed by the event caller.]]
42}
43
44abstract Eo.Base () 45abstract Eo.Base ()
45{ 46{
46 eo_prefix: eo; 47 eo_prefix: eo;