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}}: .. code-block:: c
:type {{param.name}}: :c:type:`{{param.type_name("c")}}`
{{if param.has_child_typed(Girst.Doc)}}
{{param.first_typed(Girst.Doc).to_c(" ")}} {{param.annotations()}} {{signal.get_signature()}}
{{else}}
{{param.annotations()}}
{{end}}
{{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: {{if signal.has_child_typed(Girst.Parameters)}}
{{return_value.first_typed(Girst.Doc).to_c(" ")}} {{Girst.title4("Parameters")}}
{{end}}
{{if return_value.to_c() != "void"}} {{for param in signal.get_parameters()}}
:rtype: :c:type:`{{return_value.to_c()}}` - **{{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}}
{{end}} {{end}}
{{if signal.version}}
.. versionadded:: {{signal.version}} {{if signal.get_lhs_ctype() != "void"}}
{{end}} {{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}} {{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")}} {{if signal.stability == "Unstable"}}
{{end}} .. warning:: This signal is currently considered unstable.
{{else if signal.stability == "Private"}}
.. note:: This signal is currently considered private.
{{end}} {{end}}
{{if signal.has_child_typed(Girst.Doc)}}
{{signal.first_typed(Girst.Doc).to_c(" ")}} {{if signal.version}}
.. versionadded:: {{signal.version}}
{{end}} {{end}}
{{if signal.introspectable == "0"}} {{if signal.deprecated_version}}
.. note:: :c:func:`{{container.c_type}}::{{signal.name}}` is not introspectable. .. deprecated:: {{signal.deprecated_version}}
{{else if signal.deprecated}}
.. deprecated::
{{end}} {{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