summaryrefslogtreecommitdiff
path: root/tests/doctool/doc-examples-obj.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-09 02:31:22 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-01-09 03:16:13 -0500
commitc357dd59730b266f4ccc095e628b69520aff5977 (patch)
tree9870f43cd1f57e23df872b0b129ffcd9f1c9b3f4 /tests/doctool/doc-examples-obj.c
parent10d366ff029f3644bdc3ee659421ebc843ca3b09 (diff)
downloadgobject-introspection-c357dd59730b266f4ccc095e628b69520aff5977.tar.gz
mallardwriter: Add support for parameters
Support the inline @my_parameter syntax, and translate it to <code>my_parameter</code>, as Mallard doesn't have anything more fancy than that. For Python, where we omit the first parameter of methods like that automatically, force to "self".
Diffstat (limited to 'tests/doctool/doc-examples-obj.c')
-rw-r--r--tests/doctool/doc-examples-obj.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/doctool/doc-examples-obj.c b/tests/doctool/doc-examples-obj.c
index 992e7151..bf4fcc7e 100644
--- a/tests/doctool/doc-examples-obj.c
+++ b/tests/doctool/doc-examples-obj.c
@@ -56,6 +56,8 @@ doc_examples_obj_class_init (DocExamplesObjClass *klass)
* @obj:
* @int_param: a parameter of type int
* @float_param: a parameter of type float
+ * @pointer_param: A pointer to @obj's thingy --
+ * pass @int_param if you really want to.
*
* This is an example of how to document a signal.
*
@@ -66,7 +68,7 @@ doc_examples_obj_class_init (DocExamplesObjClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
NULL,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
+ G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_POINTER);
/**
* DocExamplesObj:property-example:
@@ -106,6 +108,8 @@ doc_examples_obj_new (void)
* @second_arg: second argument
* @boolean_arg: You should always pass %TRUE.
* @pointer_arg: (allow-none): If not %NULL, do a thing.
+ * Pass @first_arg if you want to sometimes. You can
+ * also pass @second_arg, or even @boolean_arg.
* @string: A %NULL-terminated string.
*
* This is an example of how to document a method.