Commit 7a7a2b10 authored by Christian Hergert's avatar Christian Hergert

add callback generation

parent fb762fa0
......@@ -176,6 +176,7 @@ girst_generator_generate_namespace (GirstGenerator *self,
} info[] = {
{ "aliases.rst.tmpl", "aliases.rst", "aliases", NULL, NULL, GIRST_TYPE_ALIAS },
{ "bitfields.rst.tmpl", "bitfields.rst", "bitfields", "bitfield.rst.tmpl", "bitfield", GIRST_TYPE_BITFIELD },
{ "callbacks.rst.tmpl", "callbacks.rst", NULL, NULL, NULL, GIRST_TYPE_CALLBACK },
{ "classes.rst.tmpl", "classes.rst", "classes", "object.rst.tmpl", "object", GIRST_TYPE_CLASS },
{ "constants.rst.tmpl", "constants.rst", NULL, NULL, NULL, GIRST_TYPE_CONSTANT },
{ "enumerations.rst.tmpl", "enumerations.rst", "enumerations", "enumeration.rst.tmpl", "enum", GIRST_TYPE_ENUMERATION },
......
......@@ -778,6 +778,13 @@ girst_clink_full (const gchar *word,
return g_strdup_printf (":ref:`%s <C:%s%s>`", word, c_type, section);
}
if (GIRST_IS_CALLBACK (dest))
{
const gchar *c_type = girst_callback_get_c_type (GIRST_CALLBACK (dest));
return g_strdup_printf (":ref:`%s <C:%s%s>`", word, c_type, section);
}
if (GIRST_IS_MEMBER (dest))
{
const gchar *c_identifier = girst_member_get_c_identifier (GIRST_MEMBER (dest));
......
......@@ -5,6 +5,7 @@
<file>templates/bitfield.rst.tmpl</file>
<file>templates/bitfields.rst.tmpl</file>
<file>templates/boxes.rst.tmpl</file>
<file>templates/callbacks.rst.tmpl</file>
<file>templates/classes.rst.tmpl</file>
<file>templates/constants.rst.tmpl</file>
<file>templates/enumeration.rst.tmpl</file>
......
.. This file was generated by gir2rst and should not be modified.
Instead, modify the gtk-doc in the project's source files.
{{require GObject version "2.0"}}
{{require Girst version "1.0"}}
{{Girst.title1("Callbacks")}}
.. csv-table::
:class: column1-right column1-code column2-code
:widths: 1, 100
{{for function in namespace.get_children_typed(Girst.Callback)}}
"{{Girst.clink_full(function.get_lhs_ctype(), function.get_lhs(), "")}}","{{Girst.clink_full("(*"+function.c_type+") ()", function, "")}}"
{{end}}
{{Girst.title2("Callback Details")}}
{{for function in namespace.get_children_typed(Girst.Callback)}}
.. _C:{{function.c_type}}:
{{include "function.rst.tmpl"}}
{{end}}
{{require GObject version "2.0"}}
{{require Girst version "1.0"}}
{{if GObject.type_is_a(typeof(function), Girst.Callback)}}
{{Girst.title3(function.c_type + " ()")}}
{{else}}
{{if function.c_identifier}}
{{Girst.title3(function.c_identifier)}}
{{else}}
{{Girst.title3(container.c_type + "." + function.name)}}
{{end}}
{{end}}
.. code-block:: c
......
......@@ -37,6 +37,9 @@
{{if namespace.has_child_typed(Girst.Alias)}}
aliases
{{end}}
{{if namespace.has_child_typed(Girst.Callback)}}
callbacks
{{end}}
{{if namespace.has_child_typed(Girst.Constant)}}
constants
{{end}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment