docs: Mention alternatives for defining enumeration types

We should mention glib-mkenums in the documentation for
G_DEFINE_ENUM_TYPE and G_DEFINE_FLAGS_TYPE.

We should also mention the macros in the documentation for glib-mkenums.

This way, developers can choose the most appropriate tool for their use
case.
This commit is contained in:
Emmanuele Bassi
2022-06-29 15:44:36 +01:00
parent 6cbf7a7461
commit fa05ebe27c
2 changed files with 14 additions and 0 deletions

View File

@@ -44,6 +44,12 @@ input. The options specified control the text that generated, substituting vario
keywords enclosed in <literal>@</literal> characters in the templates.
</para>
<para>Since version 2.74, GLib provides the <literal>G_DEFINE_ENUM_TYPE</literal>
and <literal>G_DEFINE_FLAGS_TYPE</literal> C pre-processor macros. These macros
can be used to define a GType for projects that have few, small enumeration
types without going through the complexities of generating code at build
time.</para>
<refsect2><title>Production text substitutions</title>
<para>
Certain keywords enclosed in <literal>@</literal> characters will be substituted in the