eo: use ref types in eo_base

This commit is contained in:
Daniel Kolesa 2016-07-04 14:55:33 +01:00
parent 9527240d74
commit f72c475867
1 changed files with 12 additions and 13 deletions

View File

@ -11,7 +11,7 @@ struct Eo.Event.Description {
struct Eo.Event { struct Eo.Event {
[[Parameter passed in event callbacks holding extra event parameters]] [[Parameter passed in event callbacks holding extra event parameters]]
object: Eo.Base; [[The object the event was called on.]] object: Eo.Base; [[The object the event was called on.]]
desc: const(Eo.Event.Description) *; [[The event description.]] desc: ref(const(Eo.Event.Description)); [[The event description.]]
info: void_ptr; [[Extra event information passed by the event caller.]] info: void_ptr; [[Extra event information passed by the event caller.]]
} }
@ -24,7 +24,7 @@ struct Eo.Callback_Array_Item {
See also \@ref eo_event_callback_array_add. See also \@ref eo_event_callback_array_add.
]] ]]
desc: const(Eo.Event.Description) *; [[The event description.]] desc: ref(const(Eo.Event.Description)); [[The event description.]]
func: Eo.Event_Cb; [[The callback function.]] func: Eo.Event_Cb; [[The callback function.]]
} }
@ -206,8 +206,7 @@ abstract Eo.Base ()
wref_del { wref_del {
[[Delete the weak reference passed.]] [[Delete the weak reference passed.]]
params { params {
/* FIXME: this should be @ref when I add it */ @in wref: ref(Eo.Base);
@out wref: Eo.Base;
} }
} }
@property key_data { @property key_data {
@ -268,7 +267,7 @@ abstract Eo.Base ()
key: string; [[the key associated with the value]] key: string; [[the key associated with the value]]
} }
values { values {
value: generic_value *; [[the value to set]] value: ref(generic_value); [[the value to set]]
} }
} }
event_thaw { event_thaw {
@ -303,7 +302,7 @@ abstract Eo.Base ()
]] ]]
return: bool; [[Return true when the callback has been successfully added.]] return: bool; [[Return true when the callback has been successfully added.]]
params { params {
@in desc: const(Eo.Event.Description)*; [[The description of the event to listen to]] @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
@in priority: Eo.Callback_Priority; [[The priority of the callback]] @in priority: Eo.Callback_Priority; [[The priority of the callback]]
@in cb: Eo.Event_Cb; [[the callback to call]] @in cb: Eo.Event_Cb; [[the callback to call]]
@in data: const(void_ptr); [[additional data to pass to the callback]] @in data: const(void_ptr); [[additional data to pass to the callback]]
@ -313,7 +312,7 @@ abstract Eo.Base ()
[[Del a callback with a specific data associated to it for an event.]] [[Del a callback with a specific data associated to it for an event.]]
return: bool; [[Return true when the callback has been successfully removed.]] return: bool; [[Return true when the callback has been successfully removed.]]
params { params {
@in desc: const(Eo.Event.Description)*; [[The description of the event to listen to]] @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
@in func: Eo.Event_Cb; [[the callback to delete]] @in func: Eo.Event_Cb; [[the callback to delete]]
@in user_data: const(void_ptr); [[The data to compare]] @in user_data: const(void_ptr); [[The data to compare]]
} }
@ -326,7 +325,7 @@ abstract Eo.Base ()
]] ]]
return: bool; [[Return true when the callback has been successfully added.]] return: bool; [[Return true when the callback has been successfully added.]]
params { params {
@in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]] @in array: ref(const(Eo.Callback_Array_Item)); [[an #Eo_Callback_Array_Item of events to listen to]]
@in priority: Eo.Callback_Priority; [[The priority of the callback]] @in priority: Eo.Callback_Priority; [[The priority of the callback]]
@in data: const(void_ptr); [[additional data to pass to the callback]] @in data: const(void_ptr); [[additional data to pass to the callback]]
} }
@ -337,14 +336,14 @@ abstract Eo.Base ()
]] ]]
return: bool; [[Return true when the callback has been successfully removed.]] return: bool; [[Return true when the callback has been successfully removed.]]
params { params {
@in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]] @in array: ref(const(Eo.Callback_Array_Item)); [[an #Eo_Callback_Array_Item of events to listen to]]
@in user_data: const(void_ptr); [[The data to compare]] @in user_data: const(void_ptr); [[The data to compare]]
} }
} }
event_callback_call { event_callback_call {
[[Call the callbacks for an event of an object.]] [[Call the callbacks for an event of an object.]]
params { params {
@in desc: const(Eo.Event.Description)*; [[The description of the event to call]] @in desc: ref(const(Eo.Event.Description)); [[The description of the event to call]]
@in event_info: void_ptr; [[Extra event info to pass to the callbacks]] @in event_info: void_ptr; [[Extra event info to pass to the callbacks]]
} }
return: bool; [[$false if one of the callbacks aborted the call, return: bool; [[$false if one of the callbacks aborted the call,
@ -363,21 +362,21 @@ abstract Eo.Base ()
event_callback_forwarder_add { event_callback_forwarder_add {
[[Add an event callback forwarder for an event and an object.]] [[Add an event callback forwarder for an event and an object.]]
params { params {
@in desc: const(Eo.Event.Description)*; [[The description of the event to listen to]] @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
@in new_obj: Eo.Base; [[The object to emit events from]] @in new_obj: Eo.Base; [[The object to emit events from]]
} }
} }
event_callback_forwarder_del { event_callback_forwarder_del {
[[Remove an event callback forwarder for an event and an object.]] [[Remove an event callback forwarder for an event and an object.]]
params { params {
@in desc: const(Eo.Event.Description)*; [[The description of the event to listen to]] @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
@in new_obj: Eo.Base; [[The object to emit events from]] @in new_obj: Eo.Base; [[The object to emit events from]]
} }
} }
dbg_info_get { dbg_info_get {
[[Get dbg information from the object.]] [[Get dbg information from the object.]]
params { params {
@in root_node: Eo.Dbg_Info*; [[node of the tree]] @in root_node: ref(Eo.Dbg_Info); [[node of the tree]]
} }
} }
children_iterator_new { children_iterator_new {