Commit efc3b79c authored by Christian Hergert's avatar Christian Hergert

signal: improve signal layout

parent 866372c5
{{require GObject version "2.0"}}
{{require Girst version "1.0"}}
.. c:function:: {{container.c_type}}::{{signal.name}}
{{Girst.title3("The “" + signal.name + "” signal")}}
{{if signal.has_child_typed(Girst.Parameters)}}
{{for param in signal.first_typed(Girst.Parameters)}}
:param {{param.name}}:
:type {{param.name}}: :c:type:`{{param.type_name("c")}}`
{{if param.has_child_typed(Girst.Doc)}}
.. code-block:: c
{{param.first_typed(Girst.Doc).to_c(" ")}} {{param.annotations()}}
{{else}}
{{param.annotations()}}
{{end}}
{{signal.get_signature()}}
{{end}}
{{end}}
{{if signal.has_child_typed(Girst.ReturnValue)}}
{{return_value = signal.first_typed(Girst.ReturnValue)}}
{{if return_value.has_child_typed(Girst.Doc)}}
..
:returns:
{{return_value.first_typed(Girst.Doc).to_c(" ")}}
{{if signal.has_child_typed(Girst.Parameters)}}
{{Girst.title4("Parameters")}}
{{end}}
{{if return_value.to_c() != "void"}}
:rtype: :c:type:`{{return_value.to_c()}}`
{{for param in signal.get_parameters()}}
- **{{param.name}}**: {{if param.annotations()}}{{param.annotations()}}: {{end}}{{if param.has_child_typed(Girst.Doc)}}{{Girst.one_line(param.first_typed(Girst.Doc).inner_text, "c")}}{{else}}{{Girst.clink_full(param.get_lhs_ctype(), param.get_lhs(), "")}}{{end}}
{{end}}
{{end}}
{{if signal.version}}
.. versionadded:: {{signal.version}}
{{end}}
{{if signal.get_lhs_ctype() != "void"}}
{{Girst.title4("Returns")}}
{{if signal.stability == "Unstable"}}
{{for return_value in signal.get_children_typed(Girst.ReturnValue)}}
{{Girst.clink_full(signal.get_lhs_ctype(), signal.get_lhs(), "")}}: {{if return_value.annotations()}}{{return_value.annotations()}}: {{end}}{{if return_value.has_child_typed(Girst.Doc)}}{{Girst.one_line(return_value.first_typed(Girst.Doc).inner_text, "c")}}{{end}}
.. warning:: Method is currently considered unstable.
{{end}}
{{if signal.deprecated}}
{{end}}
.. deprecated:: {{signal.deprecated_version}}
{{if signal.has_child_typed(Girst.DocDeprecated)}}
{{Girst.one_line(signal.first_typed(Girst.DocDeprecated).inner_text, "c")}}
{{end}}
{{if signal.stability == "Unstable"}}
.. warning:: This signal is currently considered unstable.
{{else if signal.stability == "Private"}}
.. note:: This signal is currently considered private.
{{end}}
{{if signal.has_child_typed(Girst.Doc)}}
{{signal.first_typed(Girst.Doc).to_c(" ")}}
{{if signal.version}}
.. versionadded:: {{signal.version}}
{{end}}
{{if signal.introspectable == "0"}}
.. note:: :c:func:`{{container.c_type}}::{{signal.name}}` is not introspectable.
{{if signal.deprecated_version}}
.. deprecated:: {{signal.deprecated_version}}
{{else if signal.deprecated}}
.. deprecated::
{{end}}
{{if signal.has_child_typed(Girst.DocDeprecated)}}
{{Girst.one_line(signal.first_typed(Girst.DocDeprecated).inner_text, "c")}}
{{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