summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-05 17:03:36 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-05 17:03:36 +0100
commitceda77750bf976f36117e0fb668973211c5fa991 (patch)
treed094693393f6b00eee22e054ff53a206c0c77e28
parent1f84f5eb6bfe899d953b455a8763bc7ff3753d74 (diff)
eo: move some eo files to new doc syntax
-rw-r--r--src/examples/eolian_cxx/colourable.eo30
-rw-r--r--src/examples/eolian_cxx/colourablesquare.eo20
-rw-r--r--src/lib/eo/eo_base.eo282
3 files changed, 179 insertions, 153 deletions
diff --git a/src/examples/eolian_cxx/colourable.eo b/src/examples/eolian_cxx/colourable.eo
index 01ff687bc5..810ef40fd1 100644
--- a/src/examples/eolian_cxx/colourable.eo
+++ b/src/examples/eolian_cxx/colourable.eo
@@ -1,46 +1,46 @@
1class Colourable (Eo.Base) 1class Colourable (Eo.Base)
2{ 2{
3 /*@ Colourable class. */ 3 [[Colourable class.]]
4 legacy_prefix: legacy; 4 legacy_prefix: legacy;
5 data: Colourable_Data; 5 data: Colourable_Data;
6 methods { 6 methods {
7 rgb_24bits_constructor { 7 rgb_24bits_constructor {
8 /*@ RGB Constructor. */ 8 [[RGB Constructor.]]
9 legacy: null; 9 legacy: null;
10 params { 10 params {
11 @in rgb: int; /*@ 24-bit RGB Component. */ 11 @in rgb: int; [[24-bit RGB Component.]]
12 } 12 }
13 } 13 }
14 print_colour { /*@ Print the RGB colour. */ } 14 print_colour { [[Print the RGB colour.]] }
15 colour_mask { 15 colour_mask {
16 /*@ The masked RGB value. */ 16 [[The masked RGB value.]]
17 params { 17 params {
18 @in mask: int; /*@ The colour mask to be applied to current RGB value. */ 18 @in mask: int; [[The colour mask to be applied to current RGB value.]]
19 } 19 }
20 return: int; /*@ The RGB colour. */ 20 return: int; [[The RGB colour.]]
21 } 21 }
22 @property colour { 22 @property colour {
23 set { 23 set {
24 /*@ Sets a 24-bit RGB colour. */ 24 [[Sets a 24-bit RGB colour.]]
25 } 25 }
26 get { 26 get {
27 /*@ Gets the 24-bit RGB colour. */ 27 [[Gets the 24-bit RGB colour.]]
28 } 28 }
29 values { 29 values {
30 rgb: int; /*@ The RGB colour value. */ 30 rgb: int; [[The RGB colour value.]]
31 } 31 }
32 } 32 }
33 @property composite_colour { 33 @property composite_colour {
34 set { 34 set {
35 /*@ Sets a composite RGB colour. */ 35 [[Sets a composite RGB colour.]]
36 } 36 }
37 get { 37 get {
38 /*@ Gets the composite RGB colour. */ 38 [[Gets the composite RGB colour.]]
39 } 39 }
40 values { 40 values {
41 r: int; /*@ The red component. */ 41 r: int; [[The red component.]]
42 g: int; /*@ The green component. */ 42 g: int; [[The green component.]]
43 b: int; /*@ The blue component. */ 43 b: int; [[The blue component.]]
44 } 44 }
45 } 45 }
46 } 46 }
diff --git a/src/examples/eolian_cxx/colourablesquare.eo b/src/examples/eolian_cxx/colourablesquare.eo
index 9267547746..f4f4d4ce95 100644
--- a/src/examples/eolian_cxx/colourablesquare.eo
+++ b/src/examples/eolian_cxx/colourablesquare.eo
@@ -5,22 +5,22 @@ class ColourableSquare (Colourable)
5 methods { 5 methods {
6 @property size { 6 @property size {
7 set { 7 set {
8 /*@ Sets size. */ 8 [[Sets size.]]
9 } 9 }
10 get { 10 get {
11 /*@ Gets size. */ 11 [[Gets size.]]
12 } 12 }
13 values { 13 values {
14 size: int; /*@ The size. */ 14 size: int; [[The size.]]
15 } 15 }
16 } 16 }
17 size_constructor { 17 size_constructor {
18 legacy: null; 18 legacy: null;
19 params { 19 params {
20 @in size: int; 20 @in size: int;
21 } 21 }
22 } 22 }
23 size_print { /*@ Show the square. */ } 23 size_print { [[Show the square.]] }
24 } 24 }
25 constructors { 25 constructors {
26 .size_constructor; 26 .size_constructor;
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index d2753a5638..89484b0e9e 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -4,39 +4,35 @@ import eina_types;
4type @extern Eo.Event_Cb: __builtin_event_cb; 4type @extern Eo.Event_Cb: __builtin_event_cb;
5 5
6struct Eo.Event_Description { 6struct Eo.Event_Description {
7 /*@ 7 [[This struct holds the description of a specific event.]]
8 * This struct holds the description of a specific event. 8 name: const(char) *; [[name of the event.]]
9 */ 9 doc: const(char) *; [[Explanation about the event.]]
10 name: const(char) *; /*@< name of the event. */ 10 unfreezable: bool; [[Eina_True if the event cannot be frozen.]]
11 doc: const(char) *; /*@< Explanation about the event. */
12 unfreezable: bool; /*@< Eina_True if the event cannot be frozen */
13} 11}
14 12
15struct Eo.Callback_Array_Item { 13struct Eo.Callback_Array_Item {
16 /*@ 14 [[An item in an array of callback desc/func.
17 * An item in an array of callback desc/func. 15
18 * @see eo_event_callback_array_add() 16 See also @eo_event_callback_array_add.
19 */ 17 ]]
20 desc: const(Eo.Event_Description) *; /*@< The event description. */ 18 desc: const(Eo.Event_Description) *; [[The event description.]]
21 func: Eo.Event_Cb; /*@< The callback function. */ 19 func: Eo.Event_Cb; [[The callback function.]]
22} 20}
23 21
24struct Eo.Dbg_Info { 22struct Eo.Dbg_Info {
25 /*@ 23 [[The structure for the debug info used by Eo.]]
26 * The structure for the debug info used by Eo. 24 name: Eina.Stringshare *; [[The name of the part (stringshare).]]
27 */ 25 value: generic_value; [[The value.]]
28 name: Eina.Stringshare *; /*@< The name of the part (stringshare). */
29 value: generic_value; /*@< The value. */
30} 26}
31 27
32 28
33type Eo.Callback_Priority: short; /*@ * Callback priority value. Range is -32k - 32k. 29type Eo.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k.
34 *The lower the number, the higher the priority. 30 The lower the number, the higher the priority.
35 * 31
36 * @see EO_CALLBACK_PRIORITY_AFTER 32 See @EO_CALLBACK_PRIORITY_AFTER,
37 * @see EO_CALLBACK_PRIORITY_BEFORE 33 @EO_CALLBACK_PRIORITY_BEFORE
38 * @see EO_CALLBACK_PRIORITY_DEFAULT 34 @EO_CALLBACK_PRIORITY_DEFAULT
39 */ 35 ]]
40 36
41abstract Eo.Base () 37abstract Eo.Base ()
42{ 38{
@@ -46,36 +42,45 @@ abstract Eo.Base ()
46 methods { 42 methods {
47 @property parent { 43 @property parent {
48 set { 44 set {
49 /*@ Set the parent of an object 45 [[Set the parent of an object.
50Parents keep references to their children so in order to delete objects that have parents you need to set parent to NULL or use eo_del() that does that for you (and also unrefs the object). */ 46
47 Parents keep references to their children so in order to
48 delete objects that have parents you need to set parent to
49 NULL or use eo_del() that does that for you (and also unrefs
50 the object).
51 ]]
51 } 52 }
52 get { 53 get {
53 /*@ Get the parent of an object */ 54 [[Get the parent of an object]]
54 } 55 }
55 values { 56 values {
56 parent: Eo.Base*; /*@ the new parent */ 57 parent: Eo.Base*; [[the new parent]]
57 } 58 }
58 } 59 }
59 @property event_global_freeze_count @class { 60 @property event_global_freeze_count @class {
60 get { 61 get {
61 /*@ return freeze events of object. 62 [[Return freeze events of object.
62Return event freeze count. */ 63
64 Return event freeze count.
65 ]]
63 } 66 }
64 values { 67 values {
65 fcount: int; /*@ The event freeze count of the object */ 68 fcount: int; [[The event freeze count of the object]]
66 } 69 }
67 } 70 }
68 @property event_freeze_count { 71 @property event_freeze_count {
69 get { 72 get {
70 /*@ return freeze events of object. 73 [[Return freeze events of object.
71Return event freeze count. */ 74
75 Return event freeze count.
76 ]]
72 } 77 }
73 values { 78 values {
74 fcount: int; /*@ The event freeze count of the object */ 79 fcount: int; [[The event freeze count of the object]]
75 } 80 }
76 } 81 }
77 @property finalized { 82 @property finalized {
78 /*@ True if the object is already finalized, false otherwise. */ 83 [[True if the object is already finalized, false otherwise.]]
79 get { 84 get {
80 } 85 }
81 values { 86 values {
@@ -83,175 +88,196 @@ Return event freeze count. */
83 } 88 }
84 } 89 }
85 constructor { 90 constructor {
86 /*@ Call the object's constructor. 91 [[Call the object's constructor.
87Should not be used with #eo_do. Only use it with #eo_do_super. */ 92
88 return: Eo.Base *; /*@ The new object created, can be NULL if aborting */ 93 Should not be used with #eo_do. Only use it with #eo_do_super.
94 ]]
95 return: Eo.Base *; [[The new object created, can be NULL if aborting]]
89 } 96 }
90 destructor { 97 destructor {
91 /*@ Call the object's destructor. 98 [[Call the object's destructor.
92Should not be used with #eo_do. Only use it with #eo_do_super. */ 99
100 Should not be used with #eo_do. Only use it with #eo_do_super.
101 ]]
93 } 102 }
94 finalize { 103 finalize {
95 /*@ Called at the end of #eo_add. Should not be called, just overridden. */ 104 [[Called at the end of #eo_add. Should not be called, just overridden.]]
96 return: Eo.Base *; /*@ The new object created, can be NULL if aborting */ 105 return: Eo.Base *; [[The new object created, can be NULL if aborting]]
97 } 106 }
98 wref_add { 107 wref_add {
99 /*@ Add a new weak reference to obj. 108 [[Add a new weak reference to obj.
100This function registers the object handle pointed by wref to obj so when obj is deleted it'll be updated to NULL. This functions should be used when you want to keep track of an object in a safe way, but you don't want to prevent it from being freed. */ 109
110 This function registers the object handle pointed by wref to
111 obj so when obj is deleted it'll be updated to NULL. This
112 functions should be used when you want to keep track of an
113 object in a safe way, but you don't want to prevent it from
114 being freed.
115 ]]
101 params { 116 params {
102 @out wref: Eo.Base *; 117 @out wref: Eo.Base *;
103 } 118 }
104 } 119 }
105 wref_del { 120 wref_del {
106 /*@ Delete the weak reference passed. */ 121 [[Delete the weak reference passed.]]
107 params { 122 params {
108 @in wref: Eo.Base **; 123 @in wref: Eo.Base **;
109 } 124 }
110 } 125 }
111 key_data_set { 126 key_data_set {
112 /*@ Set generic data to object. 127 [[Set generic data to object.
113 The user is in change to free the data. */ 128
129 The user is in change to free the data.
130 ]]
114 params { 131 params {
115 @in key: const(char)*; /*@ the key associated with the data */ 132 @in key: const(char)*; [[the key associated with the data]]
116 @in data: const(void)*; /*@ the data to set */ 133 @in data: const(void)*; [[the data to set]]
117 } 134 }
118 } 135 }
119 key_data_get { 136 key_data_get {
120 /*@ Get generic data from object. */ 137 [[Get generic data from object.]]
121 params { 138 params {
122 @in key: const(char)*; /*@ the key associated with the data */ 139 @in key: const(char)*; [[the key associated with the data]]
123 } 140 }
124 return: void *; /*@ the data for the key */ 141 return: void *; [[the data for the key]]
125 } 142 }
126 key_data_del { 143 key_data_del {
127 /*@ Del generic data from object. */ 144 [[Del generic data from object.]]
128 params { 145 params {
129 @in key: const(char)*; /*@ the key associated with the data */ 146 @in key: const(char)*; [[the key associated with the data]]
130 } 147 }
131 } 148 }
132 event_thaw { 149 event_thaw {
133 /*@ thaw events of object. 150 [[thaw events of object.
134Lets event callbacks be called for the object. */ 151
152 Lets event callbacks be called for the object.
153 ]]
135 } 154 }
136 event_freeze { 155 event_freeze {
137 /*@ freeze events of object. 156 [[freeze events of object.
138Prevents event callbacks from being called for the object. */ 157
158 Prevents event callbacks from being called for the object.
159 ]]
139 } 160 }
140 event_global_thaw @class { 161 event_global_thaw @class {
141 /*@ thaw events of object. 162 [[thaw events of object.
142Lets event callbacks be called for the object. */ 163
164 Lets event callbacks be called for the object.
165 ]]
143 } 166 }
144 event_global_freeze @class { 167 event_global_freeze @class {
145 /*@ freeze events of object. 168 [[freeze events of object.
146Prevents event callbacks from being called for the object. */ 169
170 Prevents event callbacks from being called for the object.
171 ]]
147 } 172 }
148 event_callback_priority_add { 173 event_callback_priority_add {
149 /*@ Add a callback for an event with a specific priority. 174 [[Add a callback for an event with a specific priority.
150callbacks of the same priority are called in reverse order of creation. */ 175
176 callbacks of the same priority are called in reverse order of
177 creation.
178 ]]
151 params { 179 params {
152 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */ 180 @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]]
153 @in priority: Eo.Callback_Priority; /*@ The priority of the callback */ 181 @in priority: Eo.Callback_Priority; [[The priority of the callback]]
154 @in cb: Eo.Event_Cb; /*@ the callback to call */ 182 @in cb: Eo.Event_Cb; [[the callback to call]]
155 @in data: const(void)*; /*@ additional data to pass to the callback */ 183 @in data: const(void)*; [[additional data to pass to the callback]]
156 } 184 }
157 } 185 }
158 event_callback_del { 186 event_callback_del {
159 /*@ Del a callback with a specific data associated to it for an event. */ 187 [[Del a callback with a specific data associated to it for an event.]]
160 params { 188 params {
161 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */ 189 @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]]
162 @in func: Eo.Event_Cb; /*@ the callback to delete */ 190 @in func: Eo.Event_Cb; [[the callback to delete]]
163 @in user_data: const(void)*; /*@ The data to compare */ 191 @in user_data: const(void)*; [[The data to compare]]
164 } 192 }
165 } 193 }
166 event_callback_array_priority_add { 194 event_callback_array_priority_add {
167 /*@ Add a callback array for an event with a specific priority. 195 [[Add a callback array for an event with a specific priority.
168callbacks of the same priority are called in reverse order of creation. */ 196
197 callbacks of the same priority are called in reverse order of
198 creation.
199 ]]
169 params { 200 params {
170 @in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */ 201 @in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]]
171 @in priority: Eo.Callback_Priority; /*@ The priority of the callback */ 202 @in priority: Eo.Callback_Priority; [[The priority of the callback]]
172 @in data: const(void)*; /*@ additional data to pass to the callback */ 203 @in data: const(void)*; [[additional data to pass to the callback]]
173 } 204 }
174 } 205 }
175 event_callback_array_del { 206 event_callback_array_del {
176 /*@ Del a callback array with a specific data associated to it for an event. */ 207 [[Del a callback array with a specific data associated to it for an
208 event.
209 ]]
177 params { 210 params {
178 @in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */ 211 @in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]]
179 @in user_data: const(void)*; /*@ The data to compare */ 212 @in user_data: const(void)*; [[The data to compare]]
180 } 213 }
181 } 214 }
182 event_callback_call { 215 event_callback_call {
183 /*@ Call the callbacks for an event of an object. */ 216 [[Call the callbacks for an event of an object.]]
184 params { 217 params {
185 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to call */ 218 @in desc: const(Eo.Event_Description)*; [[The description of the event to call]]
186 @in event_info: void *; /*@ Extra event info to pass to the callbacks */ 219 @in event_info: void *; [[Extra event info to pass to the callbacks]]
187 } 220 }
188 return: bool; /*@ @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */ 221 return: bool; [[@c EINA_TRUE if one of the callbacks aborted the call,
222 @c EINA_FALSE otherwise
223 ]]
189 } 224 }
190 event_callback_forwarder_add { 225 event_callback_forwarder_add {
191 /*@ Add an event callback forwarder for an event and an object. */ 226 [[Add an event callback forwarder for an event and an object.]]
192 params { 227 params {
193 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */ 228 @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]]
194 @in new_obj: Eo.Base *; /*@ The object to emit events from */ 229 @in new_obj: Eo.Base *; [[The object to emit events from]]
195 } 230 }
196 } 231 }
197 event_callback_forwarder_del { 232 event_callback_forwarder_del {
198 /*@ Remove an event callback forwarder for an event and an object. */ 233 [[Remove an event callback forwarder for an event and an object.]]
199 params { 234 params {
200 @in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */ 235 @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]]
201 @in new_obj: Eo.Base *; /*@ The object to emit events from */ 236 @in new_obj: Eo.Base *; [[The object to emit events from]]
202 } 237 }
203 } 238 }
204 dbg_info_get { 239 dbg_info_get {
205 /*@ Get dbg information from the object. */ 240 [[Get dbg information from the object.]]
206 params { 241 params {
207 @in root_node: Eo.Dbg_Info*; /*@ node of the tree */ 242 @in root_node: Eo.Dbg_Info*; [[node of the tree]]
208 } 243 }
209 } 244 }
210 children_iterator_new { 245 children_iterator_new {
211 /*@ Get an iterator on all childrens */ 246 [[Get an iterator on all childrens]]
212 return: free(own(iterator<Eo.Base *> *), eina_iterator_free) @warn_unused; 247 return: free(own(iterator<Eo.Base *> *), eina_iterator_free) @warn_unused;
213 } 248 }
214 composite_attach @beta { 249 composite_attach @beta {
215 /*@ 250 [[Make an object a composite object of another.
216 * @brief Make an object a composite object of another. 251
217 * 252 The class of comp_obj must be part of the extensions of the class of the parent.
218 * The class of comp_obj must be part of the extensions of the class of the parent. 253 It is not possible to attach more then 1 composite of the same class.
219 * It is not possible to attach more then 1 composite of the same class. 254 This functions also sets the parent of comp_obj to parent.
220 * This functions also sets the parent of comp_obj to parent. 255
221 * 256 See @eo_composite_detach, @eo_composite_part_is.
222 * @see eo_composite_detach() 257 ]]
223 * @see eo_composite_part_is()
224 * @ingroup Eo_Composite_Objects
225 */
226 params { 258 params {
227 @in comp_obj: Eo.Base *; /*@ the object that will be used to composite the parent. */ 259 @in comp_obj: Eo.Base *; [[the object that will be used to composite the parent.]]
228 } 260 }
229 return: bool; /*@ EINA_TRUE if successfull. EINA_FALSE otherwise. */ 261 return: bool; [[EINA_TRUE if successfull. EINA_FALSE otherwise.]]
230 } 262 }
231 composite_detach @beta { 263 composite_detach @beta {
232 /*@ 264 [[Detach a composite object from another object.
233 * @brief Detach a composite object from another object. 265
234 * 266 This functions also sets the parent of comp_obj to @c NULL.
235 * This functions also sets the parent of comp_obj to @c NULL. 267
236 * 268 See @eo_composite_attach, @eo_composite_part_is.
237 * @see eo_composite_attach() 269 ]]
238 * @see eo_composite_part_is()
239 * @ingroup Eo_Composite_Objects
240 */
241 params { 270 params {
242 @in comp_obj: Eo.Base *; /*@ the object that will be removed from the parent. */ 271 @in comp_obj: Eo.Base *; [[the object that will be removed from the parent.]]
243 } 272 }
244 return: bool; /*@ EINA_TRUE if successfull. EINA_FALSE otherwise. */ 273 return: bool; [[EINA_TRUE if successfull. EINA_FALSE otherwise.]]
245 } 274 }
246 composite_part_is @beta { 275 composite_part_is @beta {
247 /*@ 276 [[Check if an object is part of a composite object.
248 * @brief Check if an object is part of a composite object. 277
249 * 278 See @eo_composite_attach, @eo_composite_part_is.
250 * @see eo_composite_attach() 279 ]]
251 * @see eo_composite_part_is() 280 return: bool; [[EINA_TRUE if it is. EINA_FALSE otherwise.]]
252 * @ingroup Eo_Composite_Objects
253 */
254 return: bool; /*@ EINA_TRUE if it is. EINA_FALSE otherwise. */
255 } 281 }
256 } 282 }
257 implements { 283 implements {
@@ -259,8 +285,8 @@ callbacks of the same priority are called in reverse order of creation. */
259 class.destructor; 285 class.destructor;
260 } 286 }
261 events { 287 events {
262 callback,add; /*@ A callback was added. */ 288 callback,add; [[A callback was added.]]
263 callback,del; /*@ A callback was deleted. */ 289 callback,del; [[A callback was deleted.]]
264 del; /*@ Obj is being deleted. */ 290 del; [[Obj is being deleted.]]
265 } 291 }
266} 292}