diff options
Diffstat (limited to 'tests')
4 files changed, 68 insertions, 0 deletions
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page new file mode 100644 index 00000000..345d64b9 --- /dev/null +++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<page id="DocExamples.Obj-vfunc" + type="topic" + style="vfunc" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/experimental/ui/"> + <info> + <link type="guide" xref="DocExamples.Obj" group="vfunc"/> + </info> + <title>vfunc</title> +<synopsis><code mime="text/x-csrc"> +</code></synopsis> +<p>This is an example of how to document a vfunc.</p> + +<table> +<tr> +<td><p>first_arg :</p></td> +<td><p>first argument</p></td> +</tr> +<tr> +<td><p>Returns :</p></td> +<td></td> +</tr> +</table> +<p>Since 0.99</p> +</page> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page new file mode 100644 index 00000000..4e394d2d --- /dev/null +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<page id="DocExamples.Obj-vfunc" + type="topic" + style="vfunc" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/experimental/ui/"> + <info> + <link type="guide" xref="DocExamples.Obj" group="vfunc"/> + <title type="link" role="topic">vfunc</title> + </info> + <title>DocExamples.Obj.vfunc</title> +<synopsis><code mime="text/x-python"> +@accepts(gint) +@returns(none) +def do_vfunc(self, first_arg): +</code></synopsis> +<p>This is an example of how to document a vfunc.</p> + +<table> +<tr> +<td><p>first_arg :</p></td> +<td><p>first argument</p></td> +</tr> +</table> +<p>Since 0.99</p> +</page> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page index cab691e7..071abf1a 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page @@ -44,6 +44,9 @@ obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_exa <links type="topic" ui:expanded="yes" groups="signal" style="linklist"> <title>Signals</title> </links> + <links type="topic" ui:expanded="yes" groups="vfunc" style="linklist"> + <title>Virtual functions</title> + </links> <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist"> <title>Other</title> </links> diff --git a/tests/doctool/doc-examples-obj.h b/tests/doctool/doc-examples-obj.h index 46db806d..7bc9e1da 100644 --- a/tests/doctool/doc-examples-obj.h +++ b/tests/doctool/doc-examples-obj.h @@ -40,6 +40,17 @@ struct _DocExamplesObj struct _DocExamplesObjClass { GObjectClass parent_class; + + /** + * DocExamplesObjClass::vfunc: + * @self: + * @first_arg: first argument + * + * This is an example of how to document a vfunc. + * + * Since: 0.99 + */ + void (*vfunc) (DocExamplesObj *self, gint first_arg); }; GType doc_examples_obj_get_type (void) G_GNUC_CONST; |