glib/gobject
Emmanuele Bassi 9ba17d511e mkenums: Support public/private trigraph
It is possible, when using GTK-Doc, to mark sections of an enumeration
type as "private": the values are there, but they are not documented,
and GTK-Doc won't complain about missing symbols:

    typedef enum {
      /*< private >*/
      MY_FOO_PRIVATE,

      /*< public >*/
      MY_FOO_VALUE_A,
      MY_FOO_VALUE_B,

      /*< private >*/
      MY_FOO_VALUE_C,
      MY_FOO_VALUE_D
    } MyFooValue;

The glib-mkenums parser also allows skipping enumeration values, using a
slightly different syntax:

    typedef enum P
      MY_BAR_PRIVATE, /*< skip >*/
      MY_BAR_VALUE_A,
      MY_BAR_VALUE_B
    } MyBarValue;

The annotation must sit on the same line as the enumeration value.

Both GTK-Doc and glib-mkenum use the same trigraph syntax, but slightly
different keys. This makes combining them slightly redundant, but
feasible.

All would be well and good, except that glib-mkenum will generate a
warning for lines it does not understand — and that includes the GTK-Doc
annotation trigraph, which, when confronted with the MyFooValue
enumeration above, will result in a warning like:

    glib-mkenums: myfoo.h:2: Failed to parse `  /*< private >*/ '
    glib-mkenums: myfoo.h:5: Failed to parse `  /*< public >*/ '
    glib-mkenums: myfoo.h:9: Failed to parse `  /*< private >*/ '

Of course, we could make glib-mkenum ignore any trigraph comment on a
stand alone line, but it would probably be better to ensure that both
glib-mkenums and gtk-doc behave consistently with each other, and
especially with the maintainer's intent of hiding some values from the
user, and reserving them for internal use.

So we should ensure that glib-mkenums automatically skips all the
enumeration values after a "private" flag has been set, until it reaches
a "public" stanza.

https://bugzilla.gnome.org/show_bug.cgi?id=782162
2017-05-16 11:23:50 +01:00
..
tests Drop trailing semi-colon from G_DEFINE_ macro 2017-04-10 10:38:31 +01:00
.gitignore Stop using glib-genmarshal at build time 2011-06-20 17:24:07 -04:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
gatomicarray.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gatomicarray.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gbinding.c Drop trailing semi-colon from G_DEFINE_ macro 2017-04-10 10:38:31 +01:00
gbinding.h GObject: Remove more leftover markup from headers 2014-03-07 06:10:36 -05:00
gboxed.c Drop trailing semi-colon from G_DEFINE_ macro 2017-04-10 10:38:31 +01:00
gboxed.h glib: Add missing (nullable) and (optional) annotations 2015-11-07 10:48:32 +01:00
gclosure.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gclosure.h introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
genums.c gobject: Add to_string() functions for Enum and Flags types 2017-03-30 09:52:28 +01:00
genums.h gobject: Add to_string() functions for Enum and Flags types 2017-03-30 09:52:28 +01:00
glib-genmarshal.c genmarshal: Always generate the prototypes in the body 2017-04-28 17:39:14 +01:00
glib-mkenums.in mkenums: Support public/private trigraph 2017-05-16 11:23:50 +01:00
glib-types.h Move GStrv typedef to glib.h instead of gobject.h 2015-09-22 11:18:30 -04:00
gmarshal.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gmarshal.h gmarshal.h: replace "extern" with GLIB_AVAILABLE_IN_ALL 2013-01-13 13:13:55 -05:00
gmarshal.list Update the comment in gmarshal.list 2012-06-23 17:53:22 -04:00
gobject_gdb.py Rename gdb macros with _gdb suffix to avoid ns clashes 2016-05-23 10:52:10 -04:00
gobject_probes.d Add missing semicolons to gobject_probes.d 2012-10-15 19:48:44 -04:00
gobject_trace.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gobject-autocleanups.h Revert "gvalue: Use g_value_clear as clear function" 2015-10-02 10:07:53 -04:00
gobject-query.c gobject: Mark a helper variable as const 2015-03-04 08:55:30 +00:00
gobject.c docs: Trivial typo fixes 2017-05-16 11:22:54 +01:00
gobject.h gobject: Fix Since/Deprecated versions for GParameter replacement API 2017-03-31 11:09:53 +01:00
gobject.rc.in Update the year in the *.rc.in files 2011-06-07 08:55:31 +08:00
gobject.stp.in glib: Namespace global tapset variables by soname 2016-11-23 10:50:39 +00:00
gobjectnotifyqueue.c Updated FSF's address 2014-01-31 14:31:55 +01:00
gparam.c GParam: make G_PARAM_USER_MASK unsigned 2016-12-02 19:10:26 +00:00
gparam.h gobject: Fix Since/Deprecated versions for GParameter replacement API 2017-03-31 11:09:53 +01:00
gparamspecs.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gparamspecs.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gsignal.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gsignal.h gsignal: Mention handler ID type in signal connection macro docs 2016-11-10 16:12:41 +00:00
gsourceclosure.c Prevent race condition in g_io_condition_get_type 2015-06-04 22:30:50 -04:00
gsourceclosure.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gtype-private.h gobject: add GOBJECT_IF_DEBUG macro for debugging gobjects and gsignals. 2016-07-16 20:54:44 -04:00
gtype.c Avoid calling Standard C string/array functions with NULL arguments 2016-12-02 19:10:39 +00:00
gtype.h gobject: Document behaviour of GType checking macros on NULL 2017-01-07 23:43:06 +00:00
gtypemodule.c GObject: Convert docs to markdown 2014-02-01 10:22:45 -05:00
gtypemodule.h gobject: add g_autoptr support for GTypeModule 2016-07-21 17:03:06 +03:00
gtypeplugin.c Annotate all examples with their language 2014-02-01 15:11:49 -05:00
gtypeplugin.h GObject: Remove more leftover markup from headers 2014-03-07 06:10:36 -05:00
gvalue.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gvalue.h Revert "gvalue: Add g_value_clear method" 2015-10-02 10:07:53 -04:00
gvaluearray.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gvaluearray.h Updated FSF's address 2014-01-31 14:31:55 +01:00
gvaluecollector.h docs: fix many documentation issues in gobject/ 2015-02-05 16:01:17 +01:00
gvaluetransform.c gobject: Add to_string() functions for Enum and Flags types 2017-03-30 09:52:28 +01:00
gvaluetypes.c introspection: use (nullable) or (optional) instead of (allow-none) 2016-11-22 14:14:37 -08:00
gvaluetypes.h Updated FSF's address 2014-01-31 14:31:55 +01:00
libgobject-gdb.py.in Rename gdb macros with _gdb suffix to avoid ns clashes 2016-05-23 10:52:10 -04:00
Makefile.am Install gdb Python helpers as data, not as executable scripts 2017-03-03 20:08:42 +00:00
makefile.msc.in gobject/: fully remove gobjectalias hacks 2010-07-07 19:40:48 -04:00
marshal-genstrings.pl Hacky script to fix up your .msc.in files on windows. Dunno if this is a 2001-08-04 15:49:55 +00:00