1 #include "annotation.h"
3 static char backslash_parsing_tester = '\\';
5 G_DEFINE_TYPE (AnnotationObject, annotation_object, G_TYPE_OBJECT);
8 annotation_object_class_init (AnnotationObjectClass *klass)
14 annotation_object_init (AnnotationObject *object)
20 * annotation_object_method:
23 * Return value: an int
26 annotation_object_method (AnnotationObject *object)
32 * annotation_object_out:
35 * This is a test for out arguments
37 * @outarg: (out): This is an argument test
38 * Return value: an int
41 annotation_object_out (AnnotationObject *object, int *outarg)
48 * annotation_object_in:
51 * This is a test for in arguments
53 * @inarg: (in): This is an argument test
54 * Return value: an int
57 annotation_object_in (AnnotationObject *object, int *inarg)
64 * annotation_object_inout:
67 * This is a test for out arguments
69 * @inoutarg: (inout): This is an argument test
70 * Return value: an int
73 annotation_object_inout (AnnotationObject *object, int *inoutarg)
75 return *inoutarg += 1;
79 * annotation_object_inout2:
82 * This is a second test for out arguments
84 * @inoutarg: (inout): This is an argument test
85 * Return value: an int
88 annotation_object_inout2 (AnnotationObject *object, int *inoutarg)
90 return *inoutarg += 1;
95 * annotation_object_inout3:
98 * This is a 3th test for out arguments
100 * @inoutarg: (inout) (allow-none): This is an argument test
101 * Return value: an int
104 annotation_object_inout3 (AnnotationObject *object, int *inoutarg)
107 return *inoutarg + 1;
112 * annotation_object_calleeowns:
113 * @object: a #GObject
115 * This is a test for out arguments; GObject defaults to transfer
117 * @toown: (out): a #GObject
118 * Return value: an int
121 annotation_object_calleeowns (AnnotationObject *object, GObject **toown)
128 * annotation_object_calleesowns:
129 * @object: a #GObject
131 * This is a test for out arguments, one transferred, other not
133 * @toown1: (out) (transfer): a #GObject
134 * @toown2: (out) (transfer none): a #GObject
135 * Return value: an int
138 annotation_object_calleesowns (AnnotationObject *object,
147 * annotation_object_get_strings:
148 * @object: a #GObject
150 * This is a test for returning a list of strings, where
151 * each string needs to be freed.
153 * Return value: (element-type utf8) (transfer): list of strings
156 annotation_object_get_strings (AnnotationObject *object)
159 list = g_list_prepend (list, g_strdup ("annotation"));
160 list = g_list_prepend (list, g_strdup ("bar"));
166 * annotation_object_with_voidp
167 * @data: Opaque pointer handle
170 annotation_object_with_voidp (AnnotationObject *object, void *data)
176 * annotation_object_get_objects:
177 * @object: a #GObject
179 * This is a test for returning a list of objects.
180 * The list itself should be freed, but not the internal objects,
181 * intentionally similar example to gtk_container_get_children
183 * Return value: (element-type AnnotationObject) (transfer container): list of objects
186 annotation_object_get_objects (AnnotationObject *object)
189 list = g_slist_prepend (list, object);
194 * annotation_object_create_object:
195 * @object: a #GObject
197 * Test returning a caller-owned object
199 * Return value: (transfer): The object
202 annotation_object_create_object (AnnotationObject *object)
204 return g_object_ref (object);
208 annotation_object_use_buffer (AnnotationObject *object,
215 * annotation_object_compute_sum:
216 * @object: a #GObject
217 * @nums: (array): Sequence of numbers
219 * Test taking a zero-terminated array
222 annotation_object_compute_sum (AnnotationObject *object,
229 * annotation_object_compute_sum_n:
230 * @object: a #GObject
231 * @nums: (array length=n_nums): Sequence of numbers
232 * @n_nums: Length of number array
234 * Test taking an array with length parameter
237 annotation_object_compute_sum_n(AnnotationObject *object,
245 * annotation_object_compute_sum_nz:
246 * @object: a #AnnotationObject
247 * @nums: (array length=n_nums zero-terminated=1): Sequence of numbers
248 * @n_nums: Length of number array
250 * Test taking a zero-terminated array with length parameter
253 annotation_object_compute_sum_nz(AnnotationObject *object,
261 * annotation_object_parse_args:
262 * @object: a #AnnotationObject
263 * @argc: (inout): Length of the argument vector
264 * @argv: (inout) (array length=argc zero-terminated=1): Argument vector
266 * Test taking a zero-terminated array with length parameter
269 annotation_object_parse_args(AnnotationObject *object,
277 * annotation_object_allow_none:
278 * @object: a #GObject
279 * @somearg: (allow-none):
282 annotation_object_allow_none (AnnotationObject *object, const gchar *somearg)
288 * annotation_object_notrans:
289 * @object: a #GObject
291 * Returns: (transfer none): An object, not referenced
295 annotation_object_notrans (AnnotationObject *object)
301 * annotation_object_do_not_use:
302 * @object: a #GObject
304 * Deprecated: 0.12: Use annotation_object_create_object() instead.
307 annotation_object_do_not_use (AnnotationObject *object)
314 * @argc: (inout): The number of args.
315 * @argv: (inout) (array length=argc zero-terminated=1): The arguments.
318 annotation_init (int *argc, char ***argv)
324 static char backslash_parsing_tester_2 = '\\';