glib/docs/reference
Aleksander Morgado ec6056e3ab glib-mkenums: allow optional 'since' tag
The glib-mkenums program allows generating code to handle enums/flags
with very different purposes. One of its purposes could be generating
per-enum/flag methods to be exposed in a library API, and while doing
that, it would be nice to have a way to specify in which API version
the enum/flag was introduced, so that the same version could be shown
in the generated API methods.

E.g. From the following code:

    /**
     * QmiWmsMessageProtocol:
     * @QMI_WMS_MESSAGE_PROTOCOL_CDMA: CDMA.
     * @QMI_WMS_MESSAGE_PROTOCOL_WCDMA: WCDMA.
     *
     * Type of message protocol.
     *
     * Since: 1.0
     */
    typedef enum { /*< since=1.0 >*/
        QMI_WMS_MESSAGE_PROTOCOL_CDMA  = 0x00,
        QMI_WMS_MESSAGE_PROTOCOL_WCDMA = 0x01
    } QmiWmsMessageProtocol;

The template would allow us to generate a method documented like this,
including the Since tag with the value given in the mkenums 'since' tag.

    /**
     * qmi_wms_message_protocol_get_string:
     * @val: a QmiWmsMessageProtocol.
     *
     * Gets the nickname string for the #QmiWmsMessageProtocol specified at @val.
     *
     * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value.
     * Since: 1.0
     */
    const gchar *qmi_wms_message_protocol_get_string (QmiWmsMessageProtocol val);

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
2020-05-14 17:00:54 +02:00
..
gio docs: Mention new gio tool options 2020-04-02 13:23:09 +02:00
glib Revert "glib: annotate static inline functions with G_AVAILABLE-type macros" 2020-05-12 21:28:52 +00:00
gobject glib-mkenums: allow optional 'since' tag 2020-05-14 17:00:54 +02:00
.gitignore .gitignore manpages (*.1) 2010-05-24 23:21:01 -04:00
AUTHORS Initial revision 1999-08-16 17:58:30 +00:00
COPYING Initial revision 1999-08-16 17:58:30 +00:00
meson.build Revert "glib: annotate static inline functions with G_AVAILABLE-type macros" 2020-05-12 21:28:52 +00:00
NEWS Initial revision 1999-08-16 17:58:30 +00:00