glib/docs/reference/gobject
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
..
images add missing image 2005-04-22 18:34:41 +00:00
xml docs: Change Bugzilla references to GitLab 2018-06-15 13:04:39 +01:00
glib-genmarshal.xml docs: Document generated headers caveats for genmarshal 2020-02-25 03:14:50 +05:30
glib-mkenums.xml glib-mkenums: allow optional 'since' tag 2020-05-14 17:00:54 +02:00
gobject-docs.xml gversionmacros: Add version macros for GLib 2.66 2020-03-04 14:46:28 +00:00
gobject-overrides.txt Improve separation of generic non-generic parts and dependencies. 2000-09-06 15:01:07 +00:00
gobject-query.xml docs: Improve man page consistency 2012-08-03 23:36:45 -04:00
gobject-sections.txt gobject: Add g_{param_spec,signal}_is_valid_name() functions 2020-03-04 14:46:28 +00:00
meson.build doc: Run gtkdoc-check with unit tests 2020-01-29 15:54:53 +01:00
tut_gobject.xml tutorial: Add private members to example code in tutorial 2019-08-29 09:20:01 +01:00
tut_gsignal.xml Fix documentation about stopping signal emission from inside a hook 2017-10-05 15:26:08 +01:00
tut_gtype.xml docs: Fix incorrect macro name in GType tutorial 2017-10-05 15:40:14 +01:00
tut_howto.xml minor typos in the documentation (a/an) 2019-08-24 19:14:05 +00:00
tut_intro.xml docs: General cleanups and rewording in the GObject concepts docs 2015-08-21 15:15:53 +01:00
tut_tools.xml general: Remove a few unhelpful references to ‘master’ 2019-04-25 09:25:49 +01:00
version.xml.in Add version info to API docs. 2002-11-23 01:37:17 +00:00