;; From gbookmarkfile.h

;; Original typedef:
;; typedef enum
;; {
;;   G_BOOKMARK_FILE_ERROR_INVALID_URI,
;;   G_BOOKMARK_FILE_ERROR_INVALID_VALUE,
;;   G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED,
;;   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND,
;;   G_BOOKMARK_FILE_ERROR_READ,
;;   G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING,
;;   G_BOOKMARK_FILE_ERROR_WRITE,
;;   G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND
;; } GBookmarkFileError;

(define-enum-extended BookmarkFileError
  (in-module "G")
  (c-name "GBookmarkFileError")
  (values
    '("invalid-uri" "G_BOOKMARK_FILE_ERROR_INVALID_URI" "0")
    '("invalid-value" "G_BOOKMARK_FILE_ERROR_INVALID_VALUE" "1")
    '("app-not-registered" "G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED" "2")
    '("uri-not-found" "G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND" "3")
    '("read" "G_BOOKMARK_FILE_ERROR_READ" "4")
    '("unknown-encoding" "G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING" "5")
    '("write" "G_BOOKMARK_FILE_ERROR_WRITE" "6")
    '("file-not-found" "G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND" "7")
  )
)

;; From gbsearcharray.h

;; Original typedef:
;; typedef enum
;; {
;;   G_BSEARCH_ARRAY_ALIGN_POWER2  = 1 << 0, /* align memory to power2 sizes */
;;   G_BSEARCH_ARRAY_AUTO_SHRINK  = 1 << 1   /* shrink array upon removal */
;; } GBSearchArrayFlags;

(define-flags-extended BSearchArrayFlags
  (in-module "G")
  (c-name "GBSearchArrayFlags")
  (values
    '("align-power2" "G_BSEARCH_ARRAY_ALIGN_POWER2" "1 << 0")
    '("auto-shrink" "G_BSEARCH_ARRAY_AUTO_SHRINK" "1 << 1")
  )
)

;; From gchecksum.h

;; Original typedef:
;; typedef enum {
;;   G_CHECKSUM_MD5,
;;   G_CHECKSUM_SHA1,
;;   G_CHECKSUM_SHA256,
;;   G_CHECKSUM_SHA512,
;;   G_CHECKSUM_SHA384
;; } GChecksumType;

(define-enum-extended ChecksumType
  (in-module "G")
  (c-name "GChecksumType")
  (values
    '("md5" "G_CHECKSUM_MD5" "0")
    '("sha1" "G_CHECKSUM_SHA1" "1")
    '("sha256" "G_CHECKSUM_SHA256" "2")
    '("sha512" "G_CHECKSUM_SHA512" "3")
    '("sha384" "G_CHECKSUM_SHA384" "4")
  )
)

;; From gconvert.h

;; Original typedef:
;; typedef enum
;; {
;;   G_CONVERT_ERROR_NO_CONVERSION,
;;   G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
;;   G_CONVERT_ERROR_FAILED,
;;   G_CONVERT_ERROR_PARTIAL_INPUT,
;;   G_CONVERT_ERROR_BAD_URI,
;;   G_CONVERT_ERROR_NOT_ABSOLUTE_PATH,
;;   G_CONVERT_ERROR_NO_MEMORY,
;;   G_CONVERT_ERROR_EMBEDDED_NUL
;; } GConvertError;

(define-enum-extended ConvertError
  (in-module "G")
  (c-name "GConvertError")
  (values
    '("no-conversion" "G_CONVERT_ERROR_NO_CONVERSION" "0")
    '("illegal-sequence" "G_CONVERT_ERROR_ILLEGAL_SEQUENCE" "1")
    '("failed" "G_CONVERT_ERROR_FAILED" "2")
    '("partial-input" "G_CONVERT_ERROR_PARTIAL_INPUT" "3")
    '("bad-uri" "G_CONVERT_ERROR_BAD_URI" "4")
    '("not-absolute-path" "G_CONVERT_ERROR_NOT_ABSOLUTE_PATH" "5")
    '("no-memory" "G_CONVERT_ERROR_NO_MEMORY" "6")
    '("embedded-nul" "G_CONVERT_ERROR_EMBEDDED_NUL" "7")
  )
)

;; From gdate.h

;; Original typedef:
;; typedef enum
;; {
;;   G_DATE_DAY   = 0,
;;   G_DATE_MONTH = 1,
;;   G_DATE_YEAR  = 2
;; } GDateDMY;

(define-enum-extended DateDMY
  (in-module "G")
  (c-name "GDateDMY")
  (values
    '("day" "G_DATE_DAY" "0")
    '("month" "G_DATE_MONTH" "1")
    '("year" "G_DATE_YEAR" "2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_DATE_BAD_WEEKDAY  = 0,
;;   G_DATE_MONDAY       = 1,
;;   G_DATE_TUESDAY      = 2,
;;   G_DATE_WEDNESDAY    = 3,
;;   G_DATE_THURSDAY     = 4,
;;   G_DATE_FRIDAY       = 5,
;;   G_DATE_SATURDAY     = 6,
;;   G_DATE_SUNDAY       = 7
;; } GDateWeekday;

(define-enum-extended DateWeekday
  (in-module "G")
  (c-name "GDateWeekday")
  (values
    '("bad-weekday" "G_DATE_BAD_WEEKDAY" "0")
    '("monday" "G_DATE_MONDAY" "1")
    '("tuesday" "G_DATE_TUESDAY" "2")
    '("wednesday" "G_DATE_WEDNESDAY" "3")
    '("thursday" "G_DATE_THURSDAY" "4")
    '("friday" "G_DATE_FRIDAY" "5")
    '("saturday" "G_DATE_SATURDAY" "6")
    '("sunday" "G_DATE_SUNDAY" "7")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_DATE_BAD_MONTH = 0,
;;   G_DATE_JANUARY   = 1,
;;   G_DATE_FEBRUARY  = 2,
;;   G_DATE_MARCH     = 3,
;;   G_DATE_APRIL     = 4,
;;   G_DATE_MAY       = 5,
;;   G_DATE_JUNE      = 6,
;;   G_DATE_JULY      = 7,
;;   G_DATE_AUGUST    = 8,
;;   G_DATE_SEPTEMBER = 9,
;;   G_DATE_OCTOBER   = 10,
;;   G_DATE_NOVEMBER  = 11,
;;   G_DATE_DECEMBER  = 12
;; } GDateMonth;

(define-enum-extended DateMonth
  (in-module "G")
  (c-name "GDateMonth")
  (values
    '("bad-month" "G_DATE_BAD_MONTH" "0")
    '("january" "G_DATE_JANUARY" "1")
    '("february" "G_DATE_FEBRUARY" "2")
    '("march" "G_DATE_MARCH" "3")
    '("april" "G_DATE_APRIL" "4")
    '("may" "G_DATE_MAY" "5")
    '("june" "G_DATE_JUNE" "6")
    '("july" "G_DATE_JULY" "7")
    '("august" "G_DATE_AUGUST" "8")
    '("september" "G_DATE_SEPTEMBER" "9")
    '("october" "G_DATE_OCTOBER" "10")
    '("november" "G_DATE_NOVEMBER" "11")
    '("december" "G_DATE_DECEMBER" "12")
  )
)

;; From gfileutils.h

;; Original typedef:
;; typedef enum
;; {
;;   G_FILE_ERROR_EXIST,
;;   G_FILE_ERROR_ISDIR,
;;   G_FILE_ERROR_ACCES,
;;   G_FILE_ERROR_NAMETOOLONG,
;;   G_FILE_ERROR_NOENT,
;;   G_FILE_ERROR_NOTDIR,
;;   G_FILE_ERROR_NXIO,
;;   G_FILE_ERROR_NODEV,
;;   G_FILE_ERROR_ROFS,
;;   G_FILE_ERROR_TXTBSY,
;;   G_FILE_ERROR_FAULT,
;;   G_FILE_ERROR_LOOP,
;;   G_FILE_ERROR_NOSPC,
;;   G_FILE_ERROR_NOMEM,
;;   G_FILE_ERROR_MFILE,
;;   G_FILE_ERROR_NFILE,
;;   G_FILE_ERROR_BADF,
;;   G_FILE_ERROR_INVAL,
;;   G_FILE_ERROR_PIPE,
;;   G_FILE_ERROR_AGAIN,
;;   G_FILE_ERROR_INTR,
;;   G_FILE_ERROR_IO,
;;   G_FILE_ERROR_PERM,
;;   G_FILE_ERROR_NOSYS,
;;   G_FILE_ERROR_FAILED
;; } GFileError;

(define-enum-extended FileError
  (in-module "G")
  (c-name "GFileError")
  (values
    '("exist" "G_FILE_ERROR_EXIST" "0")
    '("isdir" "G_FILE_ERROR_ISDIR" "1")
    '("acces" "G_FILE_ERROR_ACCES" "2")
    '("nametoolong" "G_FILE_ERROR_NAMETOOLONG" "3")
    '("noent" "G_FILE_ERROR_NOENT" "4")
    '("notdir" "G_FILE_ERROR_NOTDIR" "5")
    '("nxio" "G_FILE_ERROR_NXIO" "6")
    '("nodev" "G_FILE_ERROR_NODEV" "7")
    '("rofs" "G_FILE_ERROR_ROFS" "8")
    '("txtbsy" "G_FILE_ERROR_TXTBSY" "9")
    '("fault" "G_FILE_ERROR_FAULT" "10")
    '("loop" "G_FILE_ERROR_LOOP" "11")
    '("nospc" "G_FILE_ERROR_NOSPC" "12")
    '("nomem" "G_FILE_ERROR_NOMEM" "13")
    '("mfile" "G_FILE_ERROR_MFILE" "14")
    '("nfile" "G_FILE_ERROR_NFILE" "15")
    '("badf" "G_FILE_ERROR_BADF" "16")
    '("inval" "G_FILE_ERROR_INVAL" "17")
    '("pipe" "G_FILE_ERROR_PIPE" "18")
    '("again" "G_FILE_ERROR_AGAIN" "19")
    '("intr" "G_FILE_ERROR_INTR" "20")
    '("io" "G_FILE_ERROR_IO" "21")
    '("perm" "G_FILE_ERROR_PERM" "22")
    '("nosys" "G_FILE_ERROR_NOSYS" "23")
    '("failed" "G_FILE_ERROR_FAILED" "24")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_FILE_TEST_IS_REGULAR    = 1 << 0,
;;   G_FILE_TEST_IS_SYMLINK    = 1 << 1,
;;   G_FILE_TEST_IS_DIR        = 1 << 2,
;;   G_FILE_TEST_IS_EXECUTABLE = 1 << 3,
;;   G_FILE_TEST_EXISTS        = 1 << 4
;; } GFileTest;

(define-flags-extended FileTest
  (in-module "G")
  (c-name "GFileTest")
  (values
    '("is-regular" "G_FILE_TEST_IS_REGULAR" "1 << 0")
    '("is-symlink" "G_FILE_TEST_IS_SYMLINK" "1 << 1")
    '("is-dir" "G_FILE_TEST_IS_DIR" "1 << 2")
    '("is-executable" "G_FILE_TEST_IS_EXECUTABLE" "1 << 3")
    '("exists" "G_FILE_TEST_EXISTS" "1 << 4")
  )
)

;; From ghook.h

;; Original typedef:
;; typedef enum
;; {
;;   G_HOOK_FLAG_ACTIVE	    = 1 << 0,
;;   G_HOOK_FLAG_IN_CALL	    = 1 << 1,
;;   G_HOOK_FLAG_MASK	    = 0x0f
;; } GHookFlagMask;

(define-flags-extended HookFlagMask
  (in-module "G")
  (c-name "GHookFlagMask")
  (values
    '("active" "G_HOOK_FLAG_ACTIVE" "1 << 0")
    '("in-call" "G_HOOK_FLAG_IN_CALL" "1 << 1")
    '("mask" "G_HOOK_FLAG_MASK" "0x0f")
  )
)

;; From giochannel.h

;; Original typedef:
;; typedef enum
;; {
;;   G_IO_ERROR_NONE,
;;   G_IO_ERROR_AGAIN,
;;   G_IO_ERROR_INVAL,
;;   G_IO_ERROR_UNKNOWN
;; } GIOError;

(define-enum-extended IOError
  (in-module "G")
  (c-name "GIOError")
  (values
    '("none" "G_IO_ERROR_NONE" "0")
    '("again" "G_IO_ERROR_AGAIN" "1")
    '("inval" "G_IO_ERROR_INVAL" "2")
    '("unknown" "G_IO_ERROR_UNKNOWN" "3")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   /* Derived from errno */
;;   G_IO_CHANNEL_ERROR_FBIG,
;;   G_IO_CHANNEL_ERROR_INVAL,
;;   G_IO_CHANNEL_ERROR_IO,
;;   G_IO_CHANNEL_ERROR_ISDIR,
;;   G_IO_CHANNEL_ERROR_NOSPC,
;;   G_IO_CHANNEL_ERROR_NXIO,
;;   G_IO_CHANNEL_ERROR_OVERFLOW,
;;   G_IO_CHANNEL_ERROR_PIPE,
;;   /* Other */
;;   G_IO_CHANNEL_ERROR_FAILED
;; } GIOChannelError;

(define-enum-extended IOChannelError
  (in-module "G")
  (c-name "GIOChannelError")
  (values
    '("fbig" "G_IO_CHANNEL_ERROR_FBIG" "0")
    '("inval" "G_IO_CHANNEL_ERROR_INVAL" "1")
    '("io" "G_IO_CHANNEL_ERROR_IO" "2")
    '("isdir" "G_IO_CHANNEL_ERROR_ISDIR" "3")
    '("nospc" "G_IO_CHANNEL_ERROR_NOSPC" "4")
    '("nxio" "G_IO_CHANNEL_ERROR_NXIO" "5")
    '("overflow" "G_IO_CHANNEL_ERROR_OVERFLOW" "6")
    '("pipe" "G_IO_CHANNEL_ERROR_PIPE" "7")
    '("failed" "G_IO_CHANNEL_ERROR_FAILED" "8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_IO_STATUS_ERROR,
;;   G_IO_STATUS_NORMAL,
;;   G_IO_STATUS_EOF,
;;   G_IO_STATUS_AGAIN
;; } GIOStatus;

(define-enum-extended IOStatus
  (in-module "G")
  (c-name "GIOStatus")
  (values
    '("error" "G_IO_STATUS_ERROR" "0")
    '("normal" "G_IO_STATUS_NORMAL" "1")
    '("eof" "G_IO_STATUS_EOF" "2")
    '("again" "G_IO_STATUS_AGAIN" "3")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_SEEK_CUR,
;;   G_SEEK_SET,
;;   G_SEEK_END
;; } GSeekType;

(define-enum-extended SeekType
  (in-module "G")
  (c-name "GSeekType")
  (values
    '("cur" "G_SEEK_CUR" "0")
    '("set" "G_SEEK_SET" "1")
    '("end" "G_SEEK_END" "2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_IO_FLAG_APPEND = 1 << 0,
;;   G_IO_FLAG_NONBLOCK = 1 << 1,
;;   G_IO_FLAG_IS_READABLE = 1 << 2,	/* Read only flag */
;;   G_IO_FLAG_IS_WRITABLE = 1 << 3,	/* Read only flag */
;;   G_IO_FLAG_IS_WRITEABLE = 1 << 3,      /* Misspelling in 2.29.10 and earlier */
;;   G_IO_FLAG_IS_SEEKABLE = 1 << 4,	/* Read only flag */
;;   G_IO_FLAG_MASK = (1 << 5) - 1,
;;   G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK,
;;   G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK
;; } GIOFlags;

(define-flags-extended IOFlags
  (in-module "G")
  (c-name "GIOFlags")
  (values
    '("append" "G_IO_FLAG_APPEND" "1 << 0")
    '("nonblock" "G_IO_FLAG_NONBLOCK" "1 << 1")
    '("is-readable" "G_IO_FLAG_IS_READABLE" "1 << 2")
    '("is-writable" "G_IO_FLAG_IS_WRITABLE" "1 << 3")
    '("is-writeable" "G_IO_FLAG_IS_WRITEABLE" "1 << 3")
    '("is-seekable" "G_IO_FLAG_IS_SEEKABLE" "1 << 4")
    '("mask" "G_IO_FLAG_MASK" "(1 << 5) - 1")
    '("get-mask" "G_IO_FLAG_GET_MASK" "0x1F")
    '("set-mask" "G_IO_FLAG_SET_MASK" "0x3")
  )
)

;; From gkeyfile.h

;; Original typedef:
;; typedef enum
;; {
;;   G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
;;   G_KEY_FILE_ERROR_PARSE,
;;   G_KEY_FILE_ERROR_NOT_FOUND,
;;   G_KEY_FILE_ERROR_KEY_NOT_FOUND,
;;   G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
;;   G_KEY_FILE_ERROR_INVALID_VALUE
;; } GKeyFileError;

(define-enum-extended KeyFileError
  (in-module "G")
  (c-name "GKeyFileError")
  (values
    '("unknown-encoding" "G_KEY_FILE_ERROR_UNKNOWN_ENCODING" "0")
    '("parse" "G_KEY_FILE_ERROR_PARSE" "1")
    '("not-found" "G_KEY_FILE_ERROR_NOT_FOUND" "2")
    '("key-not-found" "G_KEY_FILE_ERROR_KEY_NOT_FOUND" "3")
    '("group-not-found" "G_KEY_FILE_ERROR_GROUP_NOT_FOUND" "4")
    '("invalid-value" "G_KEY_FILE_ERROR_INVALID_VALUE" "5")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_KEY_FILE_NONE              = 0,
;;   G_KEY_FILE_KEEP_COMMENTS     = 1 << 0,
;;   G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
;; } GKeyFileFlags;

(define-flags-extended KeyFileFlags
  (in-module "G")
  (c-name "GKeyFileFlags")
  (values
    '("none" "G_KEY_FILE_NONE" "0x0")
    '("keep-comments" "G_KEY_FILE_KEEP_COMMENTS" "1 << 0")
    '("keep-translations" "G_KEY_FILE_KEEP_TRANSLATIONS" "1 << 1")
  )
)

;; From gmain.h

;; Original typedef:
;; typedef enum /*< flags >*/
;; {
;;   G_IO_IN	GLIB_SYSDEF_POLLIN,
;;   G_IO_OUT	GLIB_SYSDEF_POLLOUT,
;;   G_IO_PRI	GLIB_SYSDEF_POLLPRI,
;;   G_IO_ERR	GLIB_SYSDEF_POLLERR,
;;   G_IO_HUP	GLIB_SYSDEF_POLLHUP,
;;   G_IO_NVAL	GLIB_SYSDEF_POLLNVAL
;; } GIOCondition;

;; We hand-edit these to use the actual enum values,
;; because the values are actually defines that contain a =,
;; which is very bizarre.
;; We would need to include the header anyway,
;; because we can't just use numeric values.
;; If you regenerate this .defs file and forget to make this change
;; then you will see compiler errors like this:
;; ../glibmm/iochannel.h:154:12: error: expected primary-expression before '=' token
(define-flags-extended IOCondition
  (in-module "G")
  (c-name "GIOCondition")
  (values
    '("in" "G_IO_IN" "G_IO_IN")
    '("out" "G_IO_OUT" "G_IO_OUT")
    '("pri" "G_IO_PRI" "G_IO_PRI")
    '("err" "G_IO_ERR" "G_IO_ERR")
    '("hup" "G_IO_HUP" "G_IO_HUP")
    '("nval" "G_IO_NVAL" "G_IO_NVAL")
  )
)

;; From gmarkup.h

;; Original typedef:
;; typedef enum
;; {
;;   G_MARKUP_ERROR_BAD_UTF8,
;;   G_MARKUP_ERROR_EMPTY,
;;   G_MARKUP_ERROR_PARSE,
;;   /* The following are primarily intended for specific GMarkupParser
;;    * implementations to set.
;;    */
;;   G_MARKUP_ERROR_UNKNOWN_ELEMENT,
;;   G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
;;   G_MARKUP_ERROR_INVALID_CONTENT,
;;   G_MARKUP_ERROR_MISSING_ATTRIBUTE
;; } GMarkupError;

(define-enum-extended MarkupError
  (in-module "G")
  (c-name "GMarkupError")
  (values
    '("bad-utf8" "G_MARKUP_ERROR_BAD_UTF8" "0")
    '("empty" "G_MARKUP_ERROR_EMPTY" "1")
    '("parse" "G_MARKUP_ERROR_PARSE" "2")
    '("unknown-element" "G_MARKUP_ERROR_UNKNOWN_ELEMENT" "3")
    '("unknown-attribute" "G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE" "4")
    '("invalid-content" "G_MARKUP_ERROR_INVALID_CONTENT" "5")
    '("missing-attribute" "G_MARKUP_ERROR_MISSING_ATTRIBUTE" "6")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
;;   G_MARKUP_TREAT_CDATA_AS_TEXT              = 1 << 1,
;;   G_MARKUP_PREFIX_ERROR_POSITION            = 1 << 2,
;;   G_MARKUP_IGNORE_QUALIFIED                 = 1 << 3
;; } GMarkupParseFlags;

(define-flags-extended MarkupParseFlags
  (in-module "G")
  (c-name "GMarkupParseFlags")
  (values
    '("do-not-use-this-unsupported-flag" "G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG" "1 << 0")
    '("treat-cdata-as-text" "G_MARKUP_TREAT_CDATA_AS_TEXT" "1 << 1")
    '("prefix-error-position" "G_MARKUP_PREFIX_ERROR_POSITION" "1 << 2")
    '("ignore-qualified" "G_MARKUP_IGNORE_QUALIFIED" "1 << 3")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_MARKUP_COLLECT_INVALID,
;;   G_MARKUP_COLLECT_STRING,
;;   G_MARKUP_COLLECT_STRDUP,
;;   G_MARKUP_COLLECT_BOOLEAN,
;;   G_MARKUP_COLLECT_TRISTATE,
;; 
;;   G_MARKUP_COLLECT_OPTIONAL = (1 << 16)
;; } GMarkupCollectType;

(define-flags-extended MarkupCollectType
  (in-module "G")
  (c-name "GMarkupCollectType")
  (values
    '("invalid" "G_MARKUP_COLLECT_INVALID" "0x0")
    '("string" "G_MARKUP_COLLECT_STRING" "0x1")
    '("strdup" "G_MARKUP_COLLECT_STRDUP" "0x2")
    '("boolean" "G_MARKUP_COLLECT_BOOLEAN" "0x3")
    '("tristate" "G_MARKUP_COLLECT_TRISTATE" "0x4")
    '("optional" "G_MARKUP_COLLECT_OPTIONAL" "(1 << 16)")
  )
)

;; From gmessages.h

;; Original typedef:
;; typedef enum
;; {
;;   /* log flags */
;;   G_LOG_FLAG_RECURSION          = 1 << 0,
;;   G_LOG_FLAG_FATAL              = 1 << 1,
;; 
;;   /* GLib log levels */
;;   G_LOG_LEVEL_ERROR             = 1 << 2,       /* always fatal */
;;   G_LOG_LEVEL_CRITICAL          = 1 << 3,
;;   G_LOG_LEVEL_WARNING           = 1 << 4,
;;   G_LOG_LEVEL_MESSAGE           = 1 << 5,
;;   G_LOG_LEVEL_INFO              = 1 << 6,
;;   G_LOG_LEVEL_DEBUG             = 1 << 7,
;; 
;;   G_LOG_LEVEL_MASK              = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL)
;; } GLogLevelFlags;

(define-flags-extended LogLevelFlags
  (in-module "G")
  (c-name "GLogLevelFlags")
  (values
    '("flag-recursion" "G_LOG_FLAG_RECURSION" "1 << 0")
    '("flag-fatal" "G_LOG_FLAG_FATAL" "1 << 1")
    '("level-error" "G_LOG_LEVEL_ERROR" "1 << 2")
    '("level-critical" "G_LOG_LEVEL_CRITICAL" "1 << 3")
    '("level-warning" "G_LOG_LEVEL_WARNING" "1 << 4")
    '("level-message" "G_LOG_LEVEL_MESSAGE" "1 << 5")
    '("level-info" "G_LOG_LEVEL_INFO" "1 << 6")
    '("level-debug" "G_LOG_LEVEL_DEBUG" "1 << 7")
    '("level-mask" "G_LOG_LEVEL_MASK" "0xFFFFFFFFFFFFFFFC")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_LOG_WRITER_HANDLED = 1,
;;   G_LOG_WRITER_UNHANDLED = 0,
;; } GLogWriterOutput;

(define-enum-extended LogWriterOutput
  (in-module "G")
  (c-name "GLogWriterOutput")
  (values
    '("handled" "G_LOG_WRITER_HANDLED" "1")
    '("unhandled" "G_LOG_WRITER_UNHANDLED" "0")
  )
)

;; From gnode.h

;; Original typedef:
;; typedef enum
;; {
;;   G_TRAVERSE_LEAVES     = 1 << 0,
;;   G_TRAVERSE_NON_LEAVES = 1 << 1,
;;   G_TRAVERSE_ALL        = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES,
;;   G_TRAVERSE_MASK       = 0x03,
;;   G_TRAVERSE_LEAFS      = G_TRAVERSE_LEAVES,
;;   G_TRAVERSE_NON_LEAFS  = G_TRAVERSE_NON_LEAVES
;; } GTraverseFlags;

(define-flags-extended TraverseFlags
  (in-module "G")
  (c-name "GTraverseFlags")
  (values
    '("leaves" "G_TRAVERSE_LEAVES" "1 << 0")
    '("non-leaves" "G_TRAVERSE_NON_LEAVES" "1 << 1")
    '("all" "G_TRAVERSE_ALL" "0x3")
    '("mask" "G_TRAVERSE_MASK" "0x03")
    '("leafs" "G_TRAVERSE_LEAFS" "0x1")
    '("non-leafs" "G_TRAVERSE_NON_LEAFS" "0x2")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_IN_ORDER,
;;   G_PRE_ORDER,
;;   G_POST_ORDER,
;;   G_LEVEL_ORDER
;; } GTraverseType;

(define-enum-extended TraverseType
  (in-module "G")
  (c-name "GTraverseType")
  (values
    '("in-order" "G_IN_ORDER" "0")
    '("pre-order" "G_PRE_ORDER" "1")
    '("post-order" "G_POST_ORDER" "2")
    '("level-order" "G_LEVEL_ORDER" "3")
  )
)

;; From goption.h

;; Original typedef:
;; typedef enum
;; {
;;   G_OPTION_FLAG_NONE            = 0,
;;   G_OPTION_FLAG_HIDDEN		= 1 << 0,
;;   G_OPTION_FLAG_IN_MAIN		= 1 << 1,
;;   G_OPTION_FLAG_REVERSE		= 1 << 2,
;;   G_OPTION_FLAG_NO_ARG		= 1 << 3,
;;   G_OPTION_FLAG_FILENAME	= 1 << 4,
;;   G_OPTION_FLAG_OPTIONAL_ARG    = 1 << 5,
;;   G_OPTION_FLAG_NOALIAS	        = 1 << 6
;; } GOptionFlags;

(define-flags-extended OptionFlags
  (in-module "G")
  (c-name "GOptionFlags")
  (values
    '("none" "G_OPTION_FLAG_NONE" "0x0")
    '("hidden" "G_OPTION_FLAG_HIDDEN" "1 << 0")
    '("in-main" "G_OPTION_FLAG_IN_MAIN" "1 << 1")
    '("reverse" "G_OPTION_FLAG_REVERSE" "1 << 2")
    '("no-arg" "G_OPTION_FLAG_NO_ARG" "1 << 3")
    '("filename" "G_OPTION_FLAG_FILENAME" "1 << 4")
    '("optional-arg" "G_OPTION_FLAG_OPTIONAL_ARG" "1 << 5")
    '("noalias" "G_OPTION_FLAG_NOALIAS" "1 << 6")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_OPTION_ARG_NONE,
;;   G_OPTION_ARG_STRING,
;;   G_OPTION_ARG_INT,
;;   G_OPTION_ARG_CALLBACK,
;;   G_OPTION_ARG_FILENAME,
;;   G_OPTION_ARG_STRING_ARRAY,
;;   G_OPTION_ARG_FILENAME_ARRAY,
;;   G_OPTION_ARG_DOUBLE,
;;   G_OPTION_ARG_INT64
;; } GOptionArg;

(define-enum-extended OptionArg
  (in-module "G")
  (c-name "GOptionArg")
  (values
    '("none" "G_OPTION_ARG_NONE" "0")
    '("string" "G_OPTION_ARG_STRING" "1")
    '("int" "G_OPTION_ARG_INT" "2")
    '("callback" "G_OPTION_ARG_CALLBACK" "3")
    '("filename" "G_OPTION_ARG_FILENAME" "4")
    '("string-array" "G_OPTION_ARG_STRING_ARRAY" "5")
    '("filename-array" "G_OPTION_ARG_FILENAME_ARRAY" "6")
    '("double" "G_OPTION_ARG_DOUBLE" "7")
    '("int64" "G_OPTION_ARG_INT64" "8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_OPTION_ERROR_UNKNOWN_OPTION,
;;   G_OPTION_ERROR_BAD_VALUE,
;;   G_OPTION_ERROR_FAILED
;; } GOptionError;

(define-enum-extended OptionError
  (in-module "G")
  (c-name "GOptionError")
  (values
    '("unknown-option" "G_OPTION_ERROR_UNKNOWN_OPTION" "0")
    '("bad-value" "G_OPTION_ERROR_BAD_VALUE" "1")
    '("failed" "G_OPTION_ERROR_FAILED" "2")
  )
)

;; From gregex.h

;; Original typedef:
;; typedef enum
;; {
;;   G_REGEX_ERROR_COMPILE,
;;   G_REGEX_ERROR_OPTIMIZE,
;;   G_REGEX_ERROR_REPLACE,
;;   G_REGEX_ERROR_MATCH,
;;   G_REGEX_ERROR_INTERNAL,
;; 
;;   /* These are the error codes from PCRE + 100 */
;;   G_REGEX_ERROR_STRAY_BACKSLASH = 101,
;;   G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102,
;;   G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103,
;;   G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104,
;;   G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105,
;;   G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106,
;;   G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107,
;;   G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108,
;;   G_REGEX_ERROR_NOTHING_TO_REPEAT = 109,
;;   G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112,
;;   G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113,
;;   G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114,
;;   G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115,
;;   G_REGEX_ERROR_UNTERMINATED_COMMENT = 118,
;;   G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120,
;;   G_REGEX_ERROR_MEMORY_ERROR = 121,
;;   G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125,
;;   G_REGEX_ERROR_MALFORMED_CONDITION = 126,
;;   G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127,
;;   G_REGEX_ERROR_ASSERTION_EXPECTED = 128,
;;   G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130,
;;   G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131,
;;   G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134,
;;   G_REGEX_ERROR_INVALID_CONDITION = 135,
;;   G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136,
;;   G_REGEX_ERROR_INFINITE_LOOP = 140,
;;   G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142,
;;   G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143,
;;   G_REGEX_ERROR_MALFORMED_PROPERTY = 146,
;;   G_REGEX_ERROR_UNKNOWN_PROPERTY = 147,
;;   G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148,
;;   G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149,
;;   G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151,
;;   G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154,
;;   G_REGEX_ERROR_DEFINE_REPETION = 155,
;;   G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156,
;;   G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157,
;;   G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158,
;;   G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159,
;;   G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB  = 160,
;;   G_REGEX_ERROR_NUMBER_TOO_BIG = 161,
;;   G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162,
;;   G_REGEX_ERROR_MISSING_DIGIT = 163,
;;   G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164,
;;   G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165,
;;   G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166,
;;   G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168,
;;   G_REGEX_ERROR_MISSING_NAME = 169,
;;   G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171,
;;   G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172,
;;   G_REGEX_ERROR_NAME_TOO_LONG = 175,
;;   G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176
;; } GRegexError;

(define-enum-extended RegexError
  (in-module "G")
  (c-name "GRegexError")
  (values
    '("compile" "G_REGEX_ERROR_COMPILE" "0")
    '("optimize" "G_REGEX_ERROR_OPTIMIZE" "1")
    '("replace" "G_REGEX_ERROR_REPLACE" "2")
    '("match" "G_REGEX_ERROR_MATCH" "3")
    '("internal" "G_REGEX_ERROR_INTERNAL" "4")
    '("stray-backslash" "G_REGEX_ERROR_STRAY_BACKSLASH" "101")
    '("missing-control-char" "G_REGEX_ERROR_MISSING_CONTROL_CHAR" "102")
    '("unrecognized-escape" "G_REGEX_ERROR_UNRECOGNIZED_ESCAPE" "103")
    '("quantifiers-out-of-order" "G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER" "104")
    '("quantifier-too-big" "G_REGEX_ERROR_QUANTIFIER_TOO_BIG" "105")
    '("unterminated-character-class" "G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS" "106")
    '("invalid-escape-in-character-class" "G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS" "107")
    '("range-out-of-order" "G_REGEX_ERROR_RANGE_OUT_OF_ORDER" "108")
    '("nothing-to-repeat" "G_REGEX_ERROR_NOTHING_TO_REPEAT" "109")
    '("unrecognized-character" "G_REGEX_ERROR_UNRECOGNIZED_CHARACTER" "112")
    '("posix-named-class-outside-class" "G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS" "113")
    '("unmatched-parenthesis" "G_REGEX_ERROR_UNMATCHED_PARENTHESIS" "114")
    '("inexistent-subpattern-reference" "G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE" "115")
    '("unterminated-comment" "G_REGEX_ERROR_UNTERMINATED_COMMENT" "118")
    '("expression-too-large" "G_REGEX_ERROR_EXPRESSION_TOO_LARGE" "120")
    '("memory-error" "G_REGEX_ERROR_MEMORY_ERROR" "121")
    '("variable-length-lookbehind" "G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND" "125")
    '("malformed-condition" "G_REGEX_ERROR_MALFORMED_CONDITION" "126")
    '("too-many-conditional-branches" "G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES" "127")
    '("assertion-expected" "G_REGEX_ERROR_ASSERTION_EXPECTED" "128")
    '("unknown-posix-class-name" "G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME" "130")
    '("posix-collating-elements-not-supported" "G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED" "131")
    '("hex-code-too-large" "G_REGEX_ERROR_HEX_CODE_TOO_LARGE" "134")
    '("invalid-condition" "G_REGEX_ERROR_INVALID_CONDITION" "135")
    '("single-byte-match-in-lookbehind" "G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND" "136")
    '("infinite-loop" "G_REGEX_ERROR_INFINITE_LOOP" "140")
    '("missing-subpattern-name-terminator" "G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR" "142")
    '("duplicate-subpattern-name" "G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME" "143")
    '("malformed-property" "G_REGEX_ERROR_MALFORMED_PROPERTY" "146")
    '("unknown-property" "G_REGEX_ERROR_UNKNOWN_PROPERTY" "147")
    '("subpattern-name-too-long" "G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG" "148")
    '("too-many-subpatterns" "G_REGEX_ERROR_TOO_MANY_SUBPATTERNS" "149")
    '("invalid-octal-value" "G_REGEX_ERROR_INVALID_OCTAL_VALUE" "151")
    '("too-many-branches-in-define" "G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE" "154")
    '("define-repetion" "G_REGEX_ERROR_DEFINE_REPETION" "155")
    '("inconsistent-newline-options" "G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS" "156")
    '("missing-back-reference" "G_REGEX_ERROR_MISSING_BACK_REFERENCE" "157")
    '("invalid-relative-reference" "G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE" "158")
    '("backtracking-control-verb-argument-forbidden" "G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN" "159")
    '("unknown-backtracking-control-verb" "G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB" "160")
    '("number-too-big" "G_REGEX_ERROR_NUMBER_TOO_BIG" "161")
    '("missing-subpattern-name" "G_REGEX_ERROR_MISSING_SUBPATTERN_NAME" "162")
    '("missing-digit" "G_REGEX_ERROR_MISSING_DIGIT" "163")
    '("invalid-data-character" "G_REGEX_ERROR_INVALID_DATA_CHARACTER" "164")
    '("extra-subpattern-name" "G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME" "165")
    '("backtracking-control-verb-argument-required" "G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED" "166")
    '("invalid-control-char" "G_REGEX_ERROR_INVALID_CONTROL_CHAR" "168")
    '("missing-name" "G_REGEX_ERROR_MISSING_NAME" "169")
    '("not-supported-in-class" "G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS" "171")
    '("too-many-forward-references" "G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES" "172")
    '("name-too-long" "G_REGEX_ERROR_NAME_TOO_LONG" "175")
    '("character-value-too-large" "G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE" "176")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_REGEX_CASELESS          = 1 << 0,
;;   G_REGEX_MULTILINE         = 1 << 1,
;;   G_REGEX_DOTALL            = 1 << 2,
;;   G_REGEX_EXTENDED          = 1 << 3,
;;   G_REGEX_ANCHORED          = 1 << 4,
;;   G_REGEX_DOLLAR_ENDONLY    = 1 << 5,
;;   G_REGEX_UNGREEDY          = 1 << 9,
;;   G_REGEX_RAW               = 1 << 11,
;;   G_REGEX_NO_AUTO_CAPTURE   = 1 << 12,
;;   G_REGEX_OPTIMIZE          = 1 << 13,
;;   G_REGEX_FIRSTLINE         = 1 << 18,
;;   G_REGEX_DUPNAMES          = 1 << 19,
;;   G_REGEX_NEWLINE_CR        = 1 << 20,
;;   G_REGEX_NEWLINE_LF        = 1 << 21,
;;   G_REGEX_NEWLINE_CRLF      = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF,
;;   G_REGEX_NEWLINE_ANYCRLF   = G_REGEX_NEWLINE_CR | 1 << 22,
;;   G_REGEX_BSR_ANYCRLF       = 1 << 23,
;;   G_REGEX_JAVASCRIPT_COMPAT = 1 << 25
;; } GRegexCompileFlags;

(define-flags-extended RegexCompileFlags
  (in-module "G")
  (c-name "GRegexCompileFlags")
  (values
    '("caseless" "G_REGEX_CASELESS" "1 << 0")
    '("multiline" "G_REGEX_MULTILINE" "1 << 1")
    '("dotall" "G_REGEX_DOTALL" "1 << 2")
    '("extended" "G_REGEX_EXTENDED" "1 << 3")
    '("anchored" "G_REGEX_ANCHORED" "1 << 4")
    '("dollar-endonly" "G_REGEX_DOLLAR_ENDONLY" "1 << 5")
    '("ungreedy" "G_REGEX_UNGREEDY" "1 << 9")
    '("raw" "G_REGEX_RAW" "1 << 11")
    '("no-auto-capture" "G_REGEX_NO_AUTO_CAPTURE" "1 << 12")
    '("optimize" "G_REGEX_OPTIMIZE" "1 << 13")
    '("firstline" "G_REGEX_FIRSTLINE" "1 << 18")
    '("dupnames" "G_REGEX_DUPNAMES" "1 << 19")
    '("newline-cr" "G_REGEX_NEWLINE_CR" "1 << 20")
    '("newline-lf" "G_REGEX_NEWLINE_LF" "1 << 21")
    '("newline-crlf" "G_REGEX_NEWLINE_CRLF" "0x300000")
    '("newline-anycrlf" "G_REGEX_NEWLINE_ANYCRLF" "0x500000")
    '("bsr-anycrlf" "G_REGEX_BSR_ANYCRLF" "1 << 23")
    '("javascript-compat" "G_REGEX_JAVASCRIPT_COMPAT" "1 << 25")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_REGEX_MATCH_ANCHORED         = 1 << 4,
;;   G_REGEX_MATCH_NOTBOL           = 1 << 7,
;;   G_REGEX_MATCH_NOTEOL           = 1 << 8,
;;   G_REGEX_MATCH_NOTEMPTY         = 1 << 10,
;;   G_REGEX_MATCH_PARTIAL          = 1 << 15,
;;   G_REGEX_MATCH_NEWLINE_CR       = 1 << 20,
;;   G_REGEX_MATCH_NEWLINE_LF       = 1 << 21,
;;   G_REGEX_MATCH_NEWLINE_CRLF     = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF,
;;   G_REGEX_MATCH_NEWLINE_ANY      = 1 << 22,
;;   G_REGEX_MATCH_NEWLINE_ANYCRLF  = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_ANY,
;;   G_REGEX_MATCH_BSR_ANYCRLF      = 1 << 23,
;;   G_REGEX_MATCH_BSR_ANY          = 1 << 24,
;;   G_REGEX_MATCH_PARTIAL_SOFT     = G_REGEX_MATCH_PARTIAL,
;;   G_REGEX_MATCH_PARTIAL_HARD     = 1 << 27,
;;   G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 << 28
;; } GRegexMatchFlags;

(define-flags-extended RegexMatchFlags
  (in-module "G")
  (c-name "GRegexMatchFlags")
  (values
    '("anchored" "G_REGEX_MATCH_ANCHORED" "1 << 4")
    '("notbol" "G_REGEX_MATCH_NOTBOL" "1 << 7")
    '("noteol" "G_REGEX_MATCH_NOTEOL" "1 << 8")
    '("notempty" "G_REGEX_MATCH_NOTEMPTY" "1 << 10")
    '("partial" "G_REGEX_MATCH_PARTIAL" "1 << 15")
    '("newline-cr" "G_REGEX_MATCH_NEWLINE_CR" "1 << 20")
    '("newline-lf" "G_REGEX_MATCH_NEWLINE_LF" "1 << 21")
    '("newline-crlf" "G_REGEX_MATCH_NEWLINE_CRLF" "0x300000")
    '("newline-any" "G_REGEX_MATCH_NEWLINE_ANY" "1 << 22")
    '("newline-anycrlf" "G_REGEX_MATCH_NEWLINE_ANYCRLF" "0x500000")
    '("bsr-anycrlf" "G_REGEX_MATCH_BSR_ANYCRLF" "1 << 23")
    '("bsr-any" "G_REGEX_MATCH_BSR_ANY" "1 << 24")
    '("partial-soft" "G_REGEX_MATCH_PARTIAL_SOFT" "0x8000")
    '("partial-hard" "G_REGEX_MATCH_PARTIAL_HARD" "1 << 27")
    '("notempty-atstart" "G_REGEX_MATCH_NOTEMPTY_ATSTART" "1 << 28")
  )
)

;; From gscanner.h

;; Original typedef:
;; typedef enum
;; {
;;   G_ERR_UNKNOWN,
;;   G_ERR_UNEXP_EOF,
;;   G_ERR_UNEXP_EOF_IN_STRING,
;;   G_ERR_UNEXP_EOF_IN_COMMENT,
;;   G_ERR_NON_DIGIT_IN_CONST,
;;   G_ERR_DIGIT_RADIX,
;;   G_ERR_FLOAT_RADIX,
;;   G_ERR_FLOAT_MALFORMED
;; } GErrorType;

(define-enum-extended ErrorType
  (in-module "G")
  (c-name "GErrorType")
  (values
    '("unknown" "G_ERR_UNKNOWN" "0")
    '("unexp-eof" "G_ERR_UNEXP_EOF" "1")
    '("unexp-eof-in-string" "G_ERR_UNEXP_EOF_IN_STRING" "2")
    '("unexp-eof-in-comment" "G_ERR_UNEXP_EOF_IN_COMMENT" "3")
    '("non-digit-in-const" "G_ERR_NON_DIGIT_IN_CONST" "4")
    '("digit-radix" "G_ERR_DIGIT_RADIX" "5")
    '("float-radix" "G_ERR_FLOAT_RADIX" "6")
    '("float-malformed" "G_ERR_FLOAT_MALFORMED" "7")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_TOKEN_EOF			=   0,
;;   
;;   G_TOKEN_LEFT_PAREN		= '(',
;;   G_TOKEN_RIGHT_PAREN		= ')',
;;   G_TOKEN_LEFT_CURLY		= '{',
;;   G_TOKEN_RIGHT_CURLY		= '}',
;;   G_TOKEN_LEFT_BRACE		= '[',
;;   G_TOKEN_RIGHT_BRACE		= ']',
;;   G_TOKEN_EQUAL_SIGN		= '=',
;;   G_TOKEN_COMMA			= ',',
;;   
;;   G_TOKEN_NONE			= 256,
;;   
;;   G_TOKEN_ERROR,
;;   
;;   G_TOKEN_CHAR,
;;   G_TOKEN_BINARY,
;;   G_TOKEN_OCTAL,
;;   G_TOKEN_INT,
;;   G_TOKEN_HEX,
;;   G_TOKEN_FLOAT,
;;   G_TOKEN_STRING,
;;   
;;   G_TOKEN_SYMBOL,
;;   G_TOKEN_IDENTIFIER,
;;   G_TOKEN_IDENTIFIER_NULL,
;;   
;;   G_TOKEN_COMMENT_SINGLE,
;;   G_TOKEN_COMMENT_MULTI,
;; 
;;   /*< private >*/
;;   G_TOKEN_LAST
;; } GTokenType;

(define-enum-extended TokenType
  (in-module "G")
  (c-name "GTokenType")
  (values
    '("eof" "G_TOKEN_EOF" "0")
    '("left-paren" "G_TOKEN_LEFT_PAREN" "'('")
    '("right-paren" "G_TOKEN_RIGHT_PAREN" "')'")
    '("left-curly" "G_TOKEN_LEFT_CURLY" "'{'")
    '("right-curly" "G_TOKEN_RIGHT_CURLY" "'}'")
    '("left-brace" "G_TOKEN_LEFT_BRACE" "'['")
    '("right-brace" "G_TOKEN_RIGHT_BRACE" "']'")
    '("equal-sign" "G_TOKEN_EQUAL_SIGN" "'='")
    '("comma" "G_TOKEN_COMMA" "','")
    '("none" "G_TOKEN_NONE" "256")
    '("error" "G_TOKEN_ERROR" "257")
    '("char" "G_TOKEN_CHAR" "258")
    '("binary" "G_TOKEN_BINARY" "259")
    '("octal" "G_TOKEN_OCTAL" "260")
    '("int" "G_TOKEN_INT" "261")
    '("hex" "G_TOKEN_HEX" "262")
    '("float" "G_TOKEN_FLOAT" "263")
    '("string" "G_TOKEN_STRING" "264")
    '("symbol" "G_TOKEN_SYMBOL" "265")
    '("identifier" "G_TOKEN_IDENTIFIER" "266")
    '("identifier-null" "G_TOKEN_IDENTIFIER_NULL" "267")
    '("comment-single" "G_TOKEN_COMMENT_SINGLE" "268")
    '("comment-multi" "G_TOKEN_COMMENT_MULTI" "269")
    '("last" "G_TOKEN_LAST" "270")
  )
)

;; From gshell.h

;; Original typedef:
;; typedef enum
;; {
;;   /* mismatched or otherwise mangled quoting */
;;   G_SHELL_ERROR_BAD_QUOTING,
;;   /* string to be parsed was empty */
;;   G_SHELL_ERROR_EMPTY_STRING,
;;   G_SHELL_ERROR_FAILED
;; } GShellError;

(define-enum-extended ShellError
  (in-module "G")
  (c-name "GShellError")
  (values
    '("bad-quoting" "G_SHELL_ERROR_BAD_QUOTING" "0")
    '("empty-string" "G_SHELL_ERROR_EMPTY_STRING" "1")
    '("failed" "G_SHELL_ERROR_FAILED" "2")
  )
)

;; From gslice.h

;; Original typedef:
;; typedef enum {
;;   G_SLICE_CONFIG_ALWAYS_MALLOC = 1,
;;   G_SLICE_CONFIG_BYPASS_MAGAZINES,
;;   G_SLICE_CONFIG_WORKING_SET_MSECS,
;;   G_SLICE_CONFIG_COLOR_INCREMENT,
;;   G_SLICE_CONFIG_CHUNK_SIZES,
;;   G_SLICE_CONFIG_CONTENTION_COUNTER
;; } GSliceConfig;

(define-enum-extended SliceConfig
  (in-module "G")
  (c-name "GSliceConfig")
  (values
    '("always-malloc" "G_SLICE_CONFIG_ALWAYS_MALLOC" "1")
    '("bypass-magazines" "G_SLICE_CONFIG_BYPASS_MAGAZINES" "2")
    '("working-set-msecs" "G_SLICE_CONFIG_WORKING_SET_MSECS" "3")
    '("color-increment" "G_SLICE_CONFIG_COLOR_INCREMENT" "4")
    '("chunk-sizes" "G_SLICE_CONFIG_CHUNK_SIZES" "5")
    '("contention-counter" "G_SLICE_CONFIG_CONTENTION_COUNTER" "6")
  )
)

;; From gspawn.h

;; Original typedef:
;; typedef enum
;; {
;;   G_SPAWN_ERROR_FORK,   /* fork failed due to lack of memory */
;;   G_SPAWN_ERROR_READ,   /* read or select on pipes failed */
;;   G_SPAWN_ERROR_CHDIR,  /* changing to working dir failed */
;;   G_SPAWN_ERROR_ACCES,  /* execv() returned EACCES */
;;   G_SPAWN_ERROR_PERM,   /* execv() returned EPERM */
;;   G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */
;;   G_SPAWN_ERROR_2BIG GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(G_SPAWN_ERROR_TOO_BIG) = G_SPAWN_ERROR_TOO_BIG,
;;   G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */
;;   G_SPAWN_ERROR_NAMETOOLONG, /* ""  "" ENAMETOOLONG */
;;   G_SPAWN_ERROR_NOENT,       /* ""  "" ENOENT */
;;   G_SPAWN_ERROR_NOMEM,       /* ""  "" ENOMEM */
;;   G_SPAWN_ERROR_NOTDIR,      /* ""  "" ENOTDIR */
;;   G_SPAWN_ERROR_LOOP,        /* ""  "" ELOOP   */
;;   G_SPAWN_ERROR_TXTBUSY,     /* ""  "" ETXTBUSY */
;;   G_SPAWN_ERROR_IO,          /* ""  "" EIO */
;;   G_SPAWN_ERROR_NFILE,       /* ""  "" ENFILE */
;;   G_SPAWN_ERROR_MFILE,       /* ""  "" EMFLE */
;;   G_SPAWN_ERROR_INVAL,       /* ""  "" EINVAL */
;;   G_SPAWN_ERROR_ISDIR,       /* ""  "" EISDIR */
;;   G_SPAWN_ERROR_LIBBAD,      /* ""  "" ELIBBAD */
;;   G_SPAWN_ERROR_FAILED       /* other fatal failure, error->message
;;                               * should explain
;;                               */
;; } GSpawnError;

(define-enum-extended SpawnError
  (in-module "G")
  (c-name "GSpawnError")
  (values
    '("fork" "G_SPAWN_ERROR_FORK" "0")
    '("read" "G_SPAWN_ERROR_READ" "1")
    '("chdir" "G_SPAWN_ERROR_CHDIR" "2")
    '("acces" "G_SPAWN_ERROR_ACCES" "3")
    '("perm" "G_SPAWN_ERROR_PERM" "4")
    '("too-big" "G_SPAWN_ERROR_TOO_BIG" "5")
    '("2big" "G_SPAWN_ERROR_2BIG" "5")
    '("noexec" "G_SPAWN_ERROR_NOEXEC" "6")
    '("nametoolong" "G_SPAWN_ERROR_NAMETOOLONG" "7")
    '("noent" "G_SPAWN_ERROR_NOENT" "8")
    '("nomem" "G_SPAWN_ERROR_NOMEM" "9")
    '("notdir" "G_SPAWN_ERROR_NOTDIR" "10")
    '("loop" "G_SPAWN_ERROR_LOOP" "11")
    '("txtbusy" "G_SPAWN_ERROR_TXTBUSY" "12")
    '("io" "G_SPAWN_ERROR_IO" "13")
    '("nfile" "G_SPAWN_ERROR_NFILE" "14")
    '("mfile" "G_SPAWN_ERROR_MFILE" "15")
    '("inval" "G_SPAWN_ERROR_INVAL" "16")
    '("isdir" "G_SPAWN_ERROR_ISDIR" "17")
    '("libbad" "G_SPAWN_ERROR_LIBBAD" "18")
    '("failed" "G_SPAWN_ERROR_FAILED" "19")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_SPAWN_DEFAULT                = 0,
;;   G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
;;   G_SPAWN_DO_NOT_REAP_CHILD      = 1 << 1,
;;   /* look for argv[0] in the path i.e. use execvp() */
;;   G_SPAWN_SEARCH_PATH            = 1 << 2,
;;   /* Dump output to /dev/null */
;;   G_SPAWN_STDOUT_TO_DEV_NULL     = 1 << 3,
;;   G_SPAWN_STDERR_TO_DEV_NULL     = 1 << 4,
;;   G_SPAWN_CHILD_INHERITS_STDIN   = 1 << 5,
;;   G_SPAWN_FILE_AND_ARGV_ZERO     = 1 << 6,
;;   G_SPAWN_SEARCH_PATH_FROM_ENVP  = 1 << 7,
;;   G_SPAWN_CLOEXEC_PIPES          = 1 << 8
;; } GSpawnFlags;

(define-flags-extended SpawnFlags
  (in-module "G")
  (c-name "GSpawnFlags")
  (values
    '("default" "G_SPAWN_DEFAULT" "0x0")
    '("leave-descriptors-open" "G_SPAWN_LEAVE_DESCRIPTORS_OPEN" "1 << 0")
    '("do-not-reap-child" "G_SPAWN_DO_NOT_REAP_CHILD" "1 << 1")
    '("search-path" "G_SPAWN_SEARCH_PATH" "1 << 2")
    '("stdout-to-dev-null" "G_SPAWN_STDOUT_TO_DEV_NULL" "1 << 3")
    '("stderr-to-dev-null" "G_SPAWN_STDERR_TO_DEV_NULL" "1 << 4")
    '("child-inherits-stdin" "G_SPAWN_CHILD_INHERITS_STDIN" "1 << 5")
    '("file-and-argv-zero" "G_SPAWN_FILE_AND_ARGV_ZERO" "1 << 6")
    '("search-path-from-envp" "G_SPAWN_SEARCH_PATH_FROM_ENVP" "1 << 7")
    '("cloexec-pipes" "G_SPAWN_CLOEXEC_PIPES" "1 << 8")
  )
)

;; From gstrfuncs.h

;; Original typedef:
;; typedef enum {
;;   G_ASCII_ALNUM  = 1 << 0,
;;   G_ASCII_ALPHA  = 1 << 1,
;;   G_ASCII_CNTRL  = 1 << 2,
;;   G_ASCII_DIGIT  = 1 << 3,
;;   G_ASCII_GRAPH  = 1 << 4,
;;   G_ASCII_LOWER  = 1 << 5,
;;   G_ASCII_PRINT  = 1 << 6,
;;   G_ASCII_PUNCT  = 1 << 7,
;;   G_ASCII_SPACE  = 1 << 8,
;;   G_ASCII_UPPER  = 1 << 9,
;;   G_ASCII_XDIGIT = 1 << 10
;; } GAsciiType;

(define-flags-extended AsciiType
  (in-module "G")
  (c-name "GAsciiType")
  (values
    '("alnum" "G_ASCII_ALNUM" "1 << 0")
    '("alpha" "G_ASCII_ALPHA" "1 << 1")
    '("cntrl" "G_ASCII_CNTRL" "1 << 2")
    '("digit" "G_ASCII_DIGIT" "1 << 3")
    '("graph" "G_ASCII_GRAPH" "1 << 4")
    '("lower" "G_ASCII_LOWER" "1 << 5")
    '("print" "G_ASCII_PRINT" "1 << 6")
    '("punct" "G_ASCII_PUNCT" "1 << 7")
    '("space" "G_ASCII_SPACE" "1 << 8")
    '("upper" "G_ASCII_UPPER" "1 << 9")
    '("xdigit" "G_ASCII_XDIGIT" "1 << 10")
  )
)

;; Original typedef:
;; typedef enum
;;   {
;;     G_NUMBER_PARSER_ERROR_INVALID,
;;     G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS,
;;   } GNumberParserError;

(define-enum-extended NumberParserError
  (in-module "G")
  (c-name "GNumberParserError")
  (values
    '("invalid" "G_NUMBER_PARSER_ERROR_INVALID" "0")
    '("out-of-bounds" "G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS" "1")
  )
)

;; From gtestutils.h

;; Original typedef:
;; typedef enum {
;;   G_TEST_TRAP_SILENCE_STDOUT    = 1 << 7,
;;   G_TEST_TRAP_SILENCE_STDERR    = 1 << 8,
;;   G_TEST_TRAP_INHERIT_STDIN     = 1 << 9
;; } GTestTrapFlags GLIB_DEPRECATED_TYPE_IN_2_38_FOR(GTestSubprocessFlags);

(define-flags-extended TestTrapFlags
  (in-module "G")
  (c-name "GTestTrapFlags")
  (values
    '("silence-stdout" "G_TEST_TRAP_SILENCE_STDOUT" "1 << 7")
    '("silence-stderr" "G_TEST_TRAP_SILENCE_STDERR" "1 << 8")
    '("inherit-stdin" "G_TEST_TRAP_INHERIT_STDIN" "1 << 9")
  )
)

;; Original typedef:
;; typedef enum {
;;   G_TEST_SUBPROCESS_INHERIT_STDIN  = 1 << 0,
;;   G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1,
;;   G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2
;; } GTestSubprocessFlags;

(define-flags-extended TestSubprocessFlags
  (in-module "G")
  (c-name "GTestSubprocessFlags")
  (values
    '("stdin" "G_TEST_SUBPROCESS_INHERIT_STDIN" "1 << 0")
    '("stdout" "G_TEST_SUBPROCESS_INHERIT_STDOUT" "1 << 1")
    '("stderr" "G_TEST_SUBPROCESS_INHERIT_STDERR" "1 << 2")
  )
)

;; Original typedef:
;; typedef enum {
;;   G_TEST_RUN_SUCCESS,
;;   G_TEST_RUN_SKIPPED,
;;   G_TEST_RUN_FAILURE,
;;   G_TEST_RUN_INCOMPLETE
;; } GTestResult;

(define-enum-extended TestResult
  (in-module "G")
  (c-name "GTestResult")
  (values
    '("success" "G_TEST_RUN_SUCCESS" "0")
    '("skipped" "G_TEST_RUN_SKIPPED" "1")
    '("failure" "G_TEST_RUN_FAILURE" "2")
    '("incomplete" "G_TEST_RUN_INCOMPLETE" "3")
  )
)

;; Original typedef:
;; typedef enum {
;;   G_TEST_LOG_NONE,
;;   G_TEST_LOG_ERROR,             /* s:msg */
;;   G_TEST_LOG_START_BINARY,      /* s:binaryname s:seed */
;;   G_TEST_LOG_LIST_CASE,         /* s:testpath */
;;   G_TEST_LOG_SKIP_CASE,         /* s:testpath */
;;   G_TEST_LOG_START_CASE,        /* s:testpath */
;;   G_TEST_LOG_STOP_CASE,         /* d:status d:nforks d:elapsed */
;;   G_TEST_LOG_MIN_RESULT,        /* s:blurb d:result */
;;   G_TEST_LOG_MAX_RESULT,        /* s:blurb d:result */
;;   G_TEST_LOG_MESSAGE,           /* s:blurb */
;;   G_TEST_LOG_START_SUITE,
;;   G_TEST_LOG_STOP_SUITE
;; } GTestLogType;

(define-enum-extended TestLogType
  (in-module "G")
  (c-name "GTestLogType")
  (values
    '("none" "G_TEST_LOG_NONE" "0")
    '("error" "G_TEST_LOG_ERROR" "1")
    '("start-binary" "G_TEST_LOG_START_BINARY" "2")
    '("list-case" "G_TEST_LOG_LIST_CASE" "3")
    '("skip-case" "G_TEST_LOG_SKIP_CASE" "4")
    '("start-case" "G_TEST_LOG_START_CASE" "5")
    '("stop-case" "G_TEST_LOG_STOP_CASE" "6")
    '("min-result" "G_TEST_LOG_MIN_RESULT" "7")
    '("max-result" "G_TEST_LOG_MAX_RESULT" "8")
    '("message" "G_TEST_LOG_MESSAGE" "9")
    '("start-suite" "G_TEST_LOG_START_SUITE" "10")
    '("stop-suite" "G_TEST_LOG_STOP_SUITE" "11")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_TEST_DIST,
;;   G_TEST_BUILT
;; } GTestFileType;

(define-enum-extended TestFileType
  (in-module "G")
  (c-name "GTestFileType")
  (values
    '("dist" "G_TEST_DIST" "0")
    '("built" "G_TEST_BUILT" "1")
  )
)

;; From gthread.h

;; Original typedef:
;; typedef enum
;; {
;;   G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */
;; } GThreadError;

(define-enum-extended ThreadError
  (in-module "G")
  (c-name "GThreadError")
  (values
    '("again" "G_THREAD_ERROR_AGAIN" "0")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_ONCE_STATUS_NOTCALLED,
;;   G_ONCE_STATUS_PROGRESS,
;;   G_ONCE_STATUS_READY
;; } GOnceStatus;

(define-enum-extended OnceStatus
  (in-module "G")
  (c-name "GOnceStatus")
  (values
    '("notcalled" "G_ONCE_STATUS_NOTCALLED" "0")
    '("progress" "G_ONCE_STATUS_PROGRESS" "1")
    '("ready" "G_ONCE_STATUS_READY" "2")
  )
)

;; From gtimezone.h

;; Original typedef:
;; typedef enum
;; {
;;   G_TIME_TYPE_STANDARD,
;;   G_TIME_TYPE_DAYLIGHT,
;;   G_TIME_TYPE_UNIVERSAL
;; } GTimeType;

(define-enum-extended TimeType
  (in-module "G")
  (c-name "GTimeType")
  (values
    '("standard" "G_TIME_TYPE_STANDARD" "0")
    '("daylight" "G_TIME_TYPE_DAYLIGHT" "1")
    '("universal" "G_TIME_TYPE_UNIVERSAL" "2")
  )
)

;; From gunicode.h

;; Original typedef:
;; typedef enum
;; {
;;   G_UNICODE_CONTROL,
;;   G_UNICODE_FORMAT,
;;   G_UNICODE_UNASSIGNED,
;;   G_UNICODE_PRIVATE_USE,
;;   G_UNICODE_SURROGATE,
;;   G_UNICODE_LOWERCASE_LETTER,
;;   G_UNICODE_MODIFIER_LETTER,
;;   G_UNICODE_OTHER_LETTER,
;;   G_UNICODE_TITLECASE_LETTER,
;;   G_UNICODE_UPPERCASE_LETTER,
;;   G_UNICODE_SPACING_MARK,
;;   G_UNICODE_ENCLOSING_MARK,
;;   G_UNICODE_NON_SPACING_MARK,
;;   G_UNICODE_DECIMAL_NUMBER,
;;   G_UNICODE_LETTER_NUMBER,
;;   G_UNICODE_OTHER_NUMBER,
;;   G_UNICODE_CONNECT_PUNCTUATION,
;;   G_UNICODE_DASH_PUNCTUATION,
;;   G_UNICODE_CLOSE_PUNCTUATION,
;;   G_UNICODE_FINAL_PUNCTUATION,
;;   G_UNICODE_INITIAL_PUNCTUATION,
;;   G_UNICODE_OTHER_PUNCTUATION,
;;   G_UNICODE_OPEN_PUNCTUATION,
;;   G_UNICODE_CURRENCY_SYMBOL,
;;   G_UNICODE_MODIFIER_SYMBOL,
;;   G_UNICODE_MATH_SYMBOL,
;;   G_UNICODE_OTHER_SYMBOL,
;;   G_UNICODE_LINE_SEPARATOR,
;;   G_UNICODE_PARAGRAPH_SEPARATOR,
;;   G_UNICODE_SPACE_SEPARATOR
;; } GUnicodeType;

(define-enum-extended UnicodeType
  (in-module "G")
  (c-name "GUnicodeType")
  (values
    '("control" "G_UNICODE_CONTROL" "0")
    '("format" "G_UNICODE_FORMAT" "1")
    '("unassigned" "G_UNICODE_UNASSIGNED" "2")
    '("private-use" "G_UNICODE_PRIVATE_USE" "3")
    '("surrogate" "G_UNICODE_SURROGATE" "4")
    '("lowercase-letter" "G_UNICODE_LOWERCASE_LETTER" "5")
    '("modifier-letter" "G_UNICODE_MODIFIER_LETTER" "6")
    '("other-letter" "G_UNICODE_OTHER_LETTER" "7")
    '("titlecase-letter" "G_UNICODE_TITLECASE_LETTER" "8")
    '("uppercase-letter" "G_UNICODE_UPPERCASE_LETTER" "9")
    '("spacing-mark" "G_UNICODE_SPACING_MARK" "10")
    '("enclosing-mark" "G_UNICODE_ENCLOSING_MARK" "11")
    '("non-spacing-mark" "G_UNICODE_NON_SPACING_MARK" "12")
    '("decimal-number" "G_UNICODE_DECIMAL_NUMBER" "13")
    '("letter-number" "G_UNICODE_LETTER_NUMBER" "14")
    '("other-number" "G_UNICODE_OTHER_NUMBER" "15")
    '("connect-punctuation" "G_UNICODE_CONNECT_PUNCTUATION" "16")
    '("dash-punctuation" "G_UNICODE_DASH_PUNCTUATION" "17")
    '("close-punctuation" "G_UNICODE_CLOSE_PUNCTUATION" "18")
    '("final-punctuation" "G_UNICODE_FINAL_PUNCTUATION" "19")
    '("initial-punctuation" "G_UNICODE_INITIAL_PUNCTUATION" "20")
    '("other-punctuation" "G_UNICODE_OTHER_PUNCTUATION" "21")
    '("open-punctuation" "G_UNICODE_OPEN_PUNCTUATION" "22")
    '("currency-symbol" "G_UNICODE_CURRENCY_SYMBOL" "23")
    '("modifier-symbol" "G_UNICODE_MODIFIER_SYMBOL" "24")
    '("math-symbol" "G_UNICODE_MATH_SYMBOL" "25")
    '("other-symbol" "G_UNICODE_OTHER_SYMBOL" "26")
    '("line-separator" "G_UNICODE_LINE_SEPARATOR" "27")
    '("paragraph-separator" "G_UNICODE_PARAGRAPH_SEPARATOR" "28")
    '("space-separator" "G_UNICODE_SPACE_SEPARATOR" "29")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_UNICODE_BREAK_MANDATORY,
;;   G_UNICODE_BREAK_CARRIAGE_RETURN,
;;   G_UNICODE_BREAK_LINE_FEED,
;;   G_UNICODE_BREAK_COMBINING_MARK,
;;   G_UNICODE_BREAK_SURROGATE,
;;   G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
;;   G_UNICODE_BREAK_INSEPARABLE,
;;   G_UNICODE_BREAK_NON_BREAKING_GLUE,
;;   G_UNICODE_BREAK_CONTINGENT,
;;   G_UNICODE_BREAK_SPACE,
;;   G_UNICODE_BREAK_AFTER,
;;   G_UNICODE_BREAK_BEFORE,
;;   G_UNICODE_BREAK_BEFORE_AND_AFTER,
;;   G_UNICODE_BREAK_HYPHEN,
;;   G_UNICODE_BREAK_NON_STARTER,
;;   G_UNICODE_BREAK_OPEN_PUNCTUATION,
;;   G_UNICODE_BREAK_CLOSE_PUNCTUATION,
;;   G_UNICODE_BREAK_QUOTATION,
;;   G_UNICODE_BREAK_EXCLAMATION,
;;   G_UNICODE_BREAK_IDEOGRAPHIC,
;;   G_UNICODE_BREAK_NUMERIC,
;;   G_UNICODE_BREAK_INFIX_SEPARATOR,
;;   G_UNICODE_BREAK_SYMBOL,
;;   G_UNICODE_BREAK_ALPHABETIC,
;;   G_UNICODE_BREAK_PREFIX,
;;   G_UNICODE_BREAK_POSTFIX,
;;   G_UNICODE_BREAK_COMPLEX_CONTEXT,
;;   G_UNICODE_BREAK_AMBIGUOUS,
;;   G_UNICODE_BREAK_UNKNOWN,
;;   G_UNICODE_BREAK_NEXT_LINE,
;;   G_UNICODE_BREAK_WORD_JOINER,
;;   G_UNICODE_BREAK_HANGUL_L_JAMO,
;;   G_UNICODE_BREAK_HANGUL_V_JAMO,
;;   G_UNICODE_BREAK_HANGUL_T_JAMO,
;;   G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
;;   G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE,
;;   G_UNICODE_BREAK_CLOSE_PARANTHESIS,
;;   G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER,
;;   G_UNICODE_BREAK_HEBREW_LETTER,
;;   G_UNICODE_BREAK_REGIONAL_INDICATOR,
;;   G_UNICODE_BREAK_EMOJI_BASE,
;;   G_UNICODE_BREAK_EMOJI_MODIFIER,
;;   G_UNICODE_BREAK_ZERO_WIDTH_JOINER
;; } GUnicodeBreakType;

(define-enum-extended UnicodeBreakType
  (in-module "G")
  (c-name "GUnicodeBreakType")
  (values
    '("mandatory" "G_UNICODE_BREAK_MANDATORY" "0")
    '("carriage-return" "G_UNICODE_BREAK_CARRIAGE_RETURN" "1")
    '("line-feed" "G_UNICODE_BREAK_LINE_FEED" "2")
    '("combining-mark" "G_UNICODE_BREAK_COMBINING_MARK" "3")
    '("surrogate" "G_UNICODE_BREAK_SURROGATE" "4")
    '("zero-width-space" "G_UNICODE_BREAK_ZERO_WIDTH_SPACE" "5")
    '("inseparable" "G_UNICODE_BREAK_INSEPARABLE" "6")
    '("non-breaking-glue" "G_UNICODE_BREAK_NON_BREAKING_GLUE" "7")
    '("contingent" "G_UNICODE_BREAK_CONTINGENT" "8")
    '("space" "G_UNICODE_BREAK_SPACE" "9")
    '("after" "G_UNICODE_BREAK_AFTER" "10")
    '("before" "G_UNICODE_BREAK_BEFORE" "11")
    '("before-and-after" "G_UNICODE_BREAK_BEFORE_AND_AFTER" "12")
    '("hyphen" "G_UNICODE_BREAK_HYPHEN" "13")
    '("non-starter" "G_UNICODE_BREAK_NON_STARTER" "14")
    '("open-punctuation" "G_UNICODE_BREAK_OPEN_PUNCTUATION" "15")
    '("close-punctuation" "G_UNICODE_BREAK_CLOSE_PUNCTUATION" "16")
    '("quotation" "G_UNICODE_BREAK_QUOTATION" "17")
    '("exclamation" "G_UNICODE_BREAK_EXCLAMATION" "18")
    '("ideographic" "G_UNICODE_BREAK_IDEOGRAPHIC" "19")
    '("numeric" "G_UNICODE_BREAK_NUMERIC" "20")
    '("infix-separator" "G_UNICODE_BREAK_INFIX_SEPARATOR" "21")
    '("symbol" "G_UNICODE_BREAK_SYMBOL" "22")
    '("alphabetic" "G_UNICODE_BREAK_ALPHABETIC" "23")
    '("prefix" "G_UNICODE_BREAK_PREFIX" "24")
    '("postfix" "G_UNICODE_BREAK_POSTFIX" "25")
    '("complex-context" "G_UNICODE_BREAK_COMPLEX_CONTEXT" "26")
    '("ambiguous" "G_UNICODE_BREAK_AMBIGUOUS" "27")
    '("unknown" "G_UNICODE_BREAK_UNKNOWN" "28")
    '("next-line" "G_UNICODE_BREAK_NEXT_LINE" "29")
    '("word-joiner" "G_UNICODE_BREAK_WORD_JOINER" "30")
    '("hangul-l-jamo" "G_UNICODE_BREAK_HANGUL_L_JAMO" "31")
    '("hangul-v-jamo" "G_UNICODE_BREAK_HANGUL_V_JAMO" "32")
    '("hangul-t-jamo" "G_UNICODE_BREAK_HANGUL_T_JAMO" "33")
    '("hangul-lv-syllable" "G_UNICODE_BREAK_HANGUL_LV_SYLLABLE" "34")
    '("hangul-lvt-syllable" "G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE" "35")
    '("close-paranthesis" "G_UNICODE_BREAK_CLOSE_PARANTHESIS" "36")
    '("conditional-japanese-starter" "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER" "37")
    '("hebrew-letter" "G_UNICODE_BREAK_HEBREW_LETTER" "38")
    '("regional-indicator" "G_UNICODE_BREAK_REGIONAL_INDICATOR" "39")
    '("emoji-base" "G_UNICODE_BREAK_EMOJI_BASE" "40")
    '("emoji-modifier" "G_UNICODE_BREAK_EMOJI_MODIFIER" "41")
    '("zero-width-joiner" "G_UNICODE_BREAK_ZERO_WIDTH_JOINER" "42")
  )
)

;; Original typedef:
;; typedef enum
;; {                         /* ISO 15924 code */
;;   G_UNICODE_SCRIPT_INVALID_CODE = -1,
;;   G_UNICODE_SCRIPT_COMMON       = 0,   /* Zyyy */
;;   G_UNICODE_SCRIPT_INHERITED,          /* Zinh (Qaai) */
;;   G_UNICODE_SCRIPT_ARABIC,             /* Arab */
;;   G_UNICODE_SCRIPT_ARMENIAN,           /* Armn */
;;   G_UNICODE_SCRIPT_BENGALI,            /* Beng */
;;   G_UNICODE_SCRIPT_BOPOMOFO,           /* Bopo */
;;   G_UNICODE_SCRIPT_CHEROKEE,           /* Cher */
;;   G_UNICODE_SCRIPT_COPTIC,             /* Copt (Qaac) */
;;   G_UNICODE_SCRIPT_CYRILLIC,           /* Cyrl (Cyrs) */
;;   G_UNICODE_SCRIPT_DESERET,            /* Dsrt */
;;   G_UNICODE_SCRIPT_DEVANAGARI,         /* Deva */
;;   G_UNICODE_SCRIPT_ETHIOPIC,           /* Ethi */
;;   G_UNICODE_SCRIPT_GEORGIAN,           /* Geor (Geon, Geoa) */
;;   G_UNICODE_SCRIPT_GOTHIC,             /* Goth */
;;   G_UNICODE_SCRIPT_GREEK,              /* Grek */
;;   G_UNICODE_SCRIPT_GUJARATI,           /* Gujr */
;;   G_UNICODE_SCRIPT_GURMUKHI,           /* Guru */
;;   G_UNICODE_SCRIPT_HAN,                /* Hani */
;;   G_UNICODE_SCRIPT_HANGUL,             /* Hang */
;;   G_UNICODE_SCRIPT_HEBREW,             /* Hebr */
;;   G_UNICODE_SCRIPT_HIRAGANA,           /* Hira */
;;   G_UNICODE_SCRIPT_KANNADA,            /* Knda */
;;   G_UNICODE_SCRIPT_KATAKANA,           /* Kana */
;;   G_UNICODE_SCRIPT_KHMER,              /* Khmr */
;;   G_UNICODE_SCRIPT_LAO,                /* Laoo */
;;   G_UNICODE_SCRIPT_LATIN,              /* Latn (Latf, Latg) */
;;   G_UNICODE_SCRIPT_MALAYALAM,          /* Mlym */
;;   G_UNICODE_SCRIPT_MONGOLIAN,          /* Mong */
;;   G_UNICODE_SCRIPT_MYANMAR,            /* Mymr */
;;   G_UNICODE_SCRIPT_OGHAM,              /* Ogam */
;;   G_UNICODE_SCRIPT_OLD_ITALIC,         /* Ital */
;;   G_UNICODE_SCRIPT_ORIYA,              /* Orya */
;;   G_UNICODE_SCRIPT_RUNIC,              /* Runr */
;;   G_UNICODE_SCRIPT_SINHALA,            /* Sinh */
;;   G_UNICODE_SCRIPT_SYRIAC,             /* Syrc (Syrj, Syrn, Syre) */
;;   G_UNICODE_SCRIPT_TAMIL,              /* Taml */
;;   G_UNICODE_SCRIPT_TELUGU,             /* Telu */
;;   G_UNICODE_SCRIPT_THAANA,             /* Thaa */
;;   G_UNICODE_SCRIPT_THAI,               /* Thai */
;;   G_UNICODE_SCRIPT_TIBETAN,            /* Tibt */
;;   G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
;;   G_UNICODE_SCRIPT_YI,                 /* Yiii */
;;   G_UNICODE_SCRIPT_TAGALOG,            /* Tglg */
;;   G_UNICODE_SCRIPT_HANUNOO,            /* Hano */
;;   G_UNICODE_SCRIPT_BUHID,              /* Buhd */
;;   G_UNICODE_SCRIPT_TAGBANWA,           /* Tagb */
;; 
;;   /* Unicode-4.0 additions */
;;   G_UNICODE_SCRIPT_BRAILLE,            /* Brai */
;;   G_UNICODE_SCRIPT_CYPRIOT,            /* Cprt */
;;   G_UNICODE_SCRIPT_LIMBU,              /* Limb */
;;   G_UNICODE_SCRIPT_OSMANYA,            /* Osma */
;;   G_UNICODE_SCRIPT_SHAVIAN,            /* Shaw */
;;   G_UNICODE_SCRIPT_LINEAR_B,           /* Linb */
;;   G_UNICODE_SCRIPT_TAI_LE,             /* Tale */
;;   G_UNICODE_SCRIPT_UGARITIC,           /* Ugar */
;; 
;;   /* Unicode-4.1 additions */
;;   G_UNICODE_SCRIPT_NEW_TAI_LUE,        /* Talu */
;;   G_UNICODE_SCRIPT_BUGINESE,           /* Bugi */
;;   G_UNICODE_SCRIPT_GLAGOLITIC,         /* Glag */
;;   G_UNICODE_SCRIPT_TIFINAGH,           /* Tfng */
;;   G_UNICODE_SCRIPT_SYLOTI_NAGRI,       /* Sylo */
;;   G_UNICODE_SCRIPT_OLD_PERSIAN,        /* Xpeo */
;;   G_UNICODE_SCRIPT_KHAROSHTHI,         /* Khar */
;; 
;;   /* Unicode-5.0 additions */
;;   G_UNICODE_SCRIPT_UNKNOWN,            /* Zzzz */
;;   G_UNICODE_SCRIPT_BALINESE,           /* Bali */
;;   G_UNICODE_SCRIPT_CUNEIFORM,          /* Xsux */
;;   G_UNICODE_SCRIPT_PHOENICIAN,         /* Phnx */
;;   G_UNICODE_SCRIPT_PHAGS_PA,           /* Phag */
;;   G_UNICODE_SCRIPT_NKO,                /* Nkoo */
;; 
;;   /* Unicode-5.1 additions */
;;   G_UNICODE_SCRIPT_KAYAH_LI,           /* Kali */
;;   G_UNICODE_SCRIPT_LEPCHA,             /* Lepc */
;;   G_UNICODE_SCRIPT_REJANG,             /* Rjng */
;;   G_UNICODE_SCRIPT_SUNDANESE,          /* Sund */
;;   G_UNICODE_SCRIPT_SAURASHTRA,         /* Saur */
;;   G_UNICODE_SCRIPT_CHAM,               /* Cham */
;;   G_UNICODE_SCRIPT_OL_CHIKI,           /* Olck */
;;   G_UNICODE_SCRIPT_VAI,                /* Vaii */
;;   G_UNICODE_SCRIPT_CARIAN,             /* Cari */
;;   G_UNICODE_SCRIPT_LYCIAN,             /* Lyci */
;;   G_UNICODE_SCRIPT_LYDIAN,             /* Lydi */
;; 
;;   /* Unicode-5.2 additions */
;;   G_UNICODE_SCRIPT_AVESTAN,                /* Avst */
;;   G_UNICODE_SCRIPT_BAMUM,                  /* Bamu */
;;   G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS,   /* Egyp */
;;   G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC,       /* Armi */
;;   G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI,  /* Phli */
;;   G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */
;;   G_UNICODE_SCRIPT_JAVANESE,               /* Java */
;;   G_UNICODE_SCRIPT_KAITHI,                 /* Kthi */
;;   G_UNICODE_SCRIPT_LISU,                   /* Lisu */
;;   G_UNICODE_SCRIPT_MEETEI_MAYEK,           /* Mtei */
;;   G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN,      /* Sarb */
;;   G_UNICODE_SCRIPT_OLD_TURKIC,             /* Orkh */
;;   G_UNICODE_SCRIPT_SAMARITAN,              /* Samr */
;;   G_UNICODE_SCRIPT_TAI_THAM,               /* Lana */
;;   G_UNICODE_SCRIPT_TAI_VIET,               /* Tavt */
;; 
;;   /* Unicode-6.0 additions */
;;   G_UNICODE_SCRIPT_BATAK,                  /* Batk */
;;   G_UNICODE_SCRIPT_BRAHMI,                 /* Brah */
;;   G_UNICODE_SCRIPT_MANDAIC,                /* Mand */
;; 
;;   /* Unicode-6.1 additions */
;;   G_UNICODE_SCRIPT_CHAKMA,                 /* Cakm */
;;   G_UNICODE_SCRIPT_MEROITIC_CURSIVE,       /* Merc */
;;   G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS,   /* Mero */
;;   G_UNICODE_SCRIPT_MIAO,                   /* Plrd */
;;   G_UNICODE_SCRIPT_SHARADA,                /* Shrd */
;;   G_UNICODE_SCRIPT_SORA_SOMPENG,           /* Sora */
;;   G_UNICODE_SCRIPT_TAKRI,                  /* Takr */
;; 
;;   /* Unicode 7.0 additions */
;;   G_UNICODE_SCRIPT_BASSA_VAH,              /* Bass */
;;   G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN,     /* Aghb */
;;   G_UNICODE_SCRIPT_DUPLOYAN,               /* Dupl */
;;   G_UNICODE_SCRIPT_ELBASAN,                /* Elba */
;;   G_UNICODE_SCRIPT_GRANTHA,                /* Gran */
;;   G_UNICODE_SCRIPT_KHOJKI,                 /* Khoj */
;;   G_UNICODE_SCRIPT_KHUDAWADI,              /* Sind */
;;   G_UNICODE_SCRIPT_LINEAR_A,               /* Lina */
;;   G_UNICODE_SCRIPT_MAHAJANI,               /* Mahj */
;;   G_UNICODE_SCRIPT_MANICHAEAN,             /* Mani */
;;   G_UNICODE_SCRIPT_MENDE_KIKAKUI,          /* Mend */
;;   G_UNICODE_SCRIPT_MODI,                   /* Modi */
;;   G_UNICODE_SCRIPT_MRO,                    /* Mroo */
;;   G_UNICODE_SCRIPT_NABATAEAN,              /* Nbat */
;;   G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN,      /* Narb */
;;   G_UNICODE_SCRIPT_OLD_PERMIC,             /* Perm */
;;   G_UNICODE_SCRIPT_PAHAWH_HMONG,           /* Hmng */
;;   G_UNICODE_SCRIPT_PALMYRENE,              /* Palm */
;;   G_UNICODE_SCRIPT_PAU_CIN_HAU,            /* Pauc */
;;   G_UNICODE_SCRIPT_PSALTER_PAHLAVI,        /* Phlp */
;;   G_UNICODE_SCRIPT_SIDDHAM,                /* Sidd */
;;   G_UNICODE_SCRIPT_TIRHUTA,                /* Tirh */
;;   G_UNICODE_SCRIPT_WARANG_CITI,            /* Wara */
;; 
;;   /* Unicode 8.0 additions */
;;   G_UNICODE_SCRIPT_AHOM,                   /* Ahom */
;;   G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS,  /* Hluw */
;;   G_UNICODE_SCRIPT_HATRAN,                 /* Hatr */
;;   G_UNICODE_SCRIPT_MULTANI,                /* Mult */
;;   G_UNICODE_SCRIPT_OLD_HUNGARIAN,          /* Hung */
;;   G_UNICODE_SCRIPT_SIGNWRITING,            /* Sgnw */
;; 
;;   /* Unicode 9.0 additions */
;;   G_UNICODE_SCRIPT_ADLAM,                  /* Adlm */
;;   G_UNICODE_SCRIPT_BHAIKSUKI,              /* Bhks */
;;   G_UNICODE_SCRIPT_MARCHEN,                /* Marc */
;;   G_UNICODE_SCRIPT_NEWA,                   /* Newa */
;;   G_UNICODE_SCRIPT_OSAGE,                  /* Osge */
;;   G_UNICODE_SCRIPT_TANGUT,                 /* Tang */
;; 
;;   /* Unicode 10.0 additions */
;;   G_UNICODE_SCRIPT_MASARAM_GONDI,          /* Gonm */
;;   G_UNICODE_SCRIPT_NUSHU,                  /* Nshu */
;;   G_UNICODE_SCRIPT_SOYOMBO,                /* Soyo */
;;   G_UNICODE_SCRIPT_ZANABAZAR_SQUARE,       /* Zanb */
;; 
;;   /* Unicode 11.0 additions */
;;   G_UNICODE_SCRIPT_DOGRA,                  /* Dogr */
;;   G_UNICODE_SCRIPT_GUNJALA_GONDI,          /* Gong */
;;   G_UNICODE_SCRIPT_HANIFI_ROHINGYA,        /* Rohg */
;;   G_UNICODE_SCRIPT_MAKASAR,                /* Maka */
;;   G_UNICODE_SCRIPT_MEDEFAIDRIN,            /* Medf */
;;   G_UNICODE_SCRIPT_OLD_SOGDIAN,            /* Sogo */
;;   G_UNICODE_SCRIPT_SOGDIAN,                /* Sogd */
;; 
;;   /* Unicode 12.0 additions */
;;   G_UNICODE_SCRIPT_ELYMAIC,                /* Elym */
;;   G_UNICODE_SCRIPT_NANDINAGARI,            /* Nand */
;;   G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG, /* Rohg */
;;   G_UNICODE_SCRIPT_WANCHO                  /* Wcho */
;; } GUnicodeScript;

(define-enum-extended UnicodeScript
  (in-module "G")
  (c-name "GUnicodeScript")
  (values
    '("invalid-code" "G_UNICODE_SCRIPT_INVALID_CODE" "-1")
    '("common" "G_UNICODE_SCRIPT_COMMON" "0")
    '("inherited" "G_UNICODE_SCRIPT_INHERITED" "1")
    '("arabic" "G_UNICODE_SCRIPT_ARABIC" "2")
    '("armenian" "G_UNICODE_SCRIPT_ARMENIAN" "3")
    '("bengali" "G_UNICODE_SCRIPT_BENGALI" "4")
    '("bopomofo" "G_UNICODE_SCRIPT_BOPOMOFO" "5")
    '("cherokee" "G_UNICODE_SCRIPT_CHEROKEE" "6")
    '("coptic" "G_UNICODE_SCRIPT_COPTIC" "7")
    '("cyrillic" "G_UNICODE_SCRIPT_CYRILLIC" "8")
    '("deseret" "G_UNICODE_SCRIPT_DESERET" "9")
    '("devanagari" "G_UNICODE_SCRIPT_DEVANAGARI" "10")
    '("ethiopic" "G_UNICODE_SCRIPT_ETHIOPIC" "11")
    '("georgian" "G_UNICODE_SCRIPT_GEORGIAN" "12")
    '("gothic" "G_UNICODE_SCRIPT_GOTHIC" "13")
    '("greek" "G_UNICODE_SCRIPT_GREEK" "14")
    '("gujarati" "G_UNICODE_SCRIPT_GUJARATI" "15")
    '("gurmukhi" "G_UNICODE_SCRIPT_GURMUKHI" "16")
    '("han" "G_UNICODE_SCRIPT_HAN" "17")
    '("hangul" "G_UNICODE_SCRIPT_HANGUL" "18")
    '("hebrew" "G_UNICODE_SCRIPT_HEBREW" "19")
    '("hiragana" "G_UNICODE_SCRIPT_HIRAGANA" "20")
    '("kannada" "G_UNICODE_SCRIPT_KANNADA" "21")
    '("katakana" "G_UNICODE_SCRIPT_KATAKANA" "22")
    '("khmer" "G_UNICODE_SCRIPT_KHMER" "23")
    '("lao" "G_UNICODE_SCRIPT_LAO" "24")
    '("latin" "G_UNICODE_SCRIPT_LATIN" "25")
    '("malayalam" "G_UNICODE_SCRIPT_MALAYALAM" "26")
    '("mongolian" "G_UNICODE_SCRIPT_MONGOLIAN" "27")
    '("myanmar" "G_UNICODE_SCRIPT_MYANMAR" "28")
    '("ogham" "G_UNICODE_SCRIPT_OGHAM" "29")
    '("old-italic" "G_UNICODE_SCRIPT_OLD_ITALIC" "30")
    '("oriya" "G_UNICODE_SCRIPT_ORIYA" "31")
    '("runic" "G_UNICODE_SCRIPT_RUNIC" "32")
    '("sinhala" "G_UNICODE_SCRIPT_SINHALA" "33")
    '("syriac" "G_UNICODE_SCRIPT_SYRIAC" "34")
    '("tamil" "G_UNICODE_SCRIPT_TAMIL" "35")
    '("telugu" "G_UNICODE_SCRIPT_TELUGU" "36")
    '("thaana" "G_UNICODE_SCRIPT_THAANA" "37")
    '("thai" "G_UNICODE_SCRIPT_THAI" "38")
    '("tibetan" "G_UNICODE_SCRIPT_TIBETAN" "39")
    '("canadian-aboriginal" "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL" "40")
    '("yi" "G_UNICODE_SCRIPT_YI" "41")
    '("tagalog" "G_UNICODE_SCRIPT_TAGALOG" "42")
    '("hanunoo" "G_UNICODE_SCRIPT_HANUNOO" "43")
    '("buhid" "G_UNICODE_SCRIPT_BUHID" "44")
    '("tagbanwa" "G_UNICODE_SCRIPT_TAGBANWA" "45")
    '("braille" "G_UNICODE_SCRIPT_BRAILLE" "46")
    '("cypriot" "G_UNICODE_SCRIPT_CYPRIOT" "47")
    '("limbu" "G_UNICODE_SCRIPT_LIMBU" "48")
    '("osmanya" "G_UNICODE_SCRIPT_OSMANYA" "49")
    '("shavian" "G_UNICODE_SCRIPT_SHAVIAN" "50")
    '("linear-b" "G_UNICODE_SCRIPT_LINEAR_B" "51")
    '("tai-le" "G_UNICODE_SCRIPT_TAI_LE" "52")
    '("ugaritic" "G_UNICODE_SCRIPT_UGARITIC" "53")
    '("new-tai-lue" "G_UNICODE_SCRIPT_NEW_TAI_LUE" "54")
    '("buginese" "G_UNICODE_SCRIPT_BUGINESE" "55")
    '("glagolitic" "G_UNICODE_SCRIPT_GLAGOLITIC" "56")
    '("tifinagh" "G_UNICODE_SCRIPT_TIFINAGH" "57")
    '("syloti-nagri" "G_UNICODE_SCRIPT_SYLOTI_NAGRI" "58")
    '("old-persian" "G_UNICODE_SCRIPT_OLD_PERSIAN" "59")
    '("kharoshthi" "G_UNICODE_SCRIPT_KHAROSHTHI" "60")
    '("unknown" "G_UNICODE_SCRIPT_UNKNOWN" "61")
    '("balinese" "G_UNICODE_SCRIPT_BALINESE" "62")
    '("cuneiform" "G_UNICODE_SCRIPT_CUNEIFORM" "63")
    '("phoenician" "G_UNICODE_SCRIPT_PHOENICIAN" "64")
    '("phags-pa" "G_UNICODE_SCRIPT_PHAGS_PA" "65")
    '("nko" "G_UNICODE_SCRIPT_NKO" "66")
    '("kayah-li" "G_UNICODE_SCRIPT_KAYAH_LI" "67")
    '("lepcha" "G_UNICODE_SCRIPT_LEPCHA" "68")
    '("rejang" "G_UNICODE_SCRIPT_REJANG" "69")
    '("sundanese" "G_UNICODE_SCRIPT_SUNDANESE" "70")
    '("saurashtra" "G_UNICODE_SCRIPT_SAURASHTRA" "71")
    '("cham" "G_UNICODE_SCRIPT_CHAM" "72")
    '("ol-chiki" "G_UNICODE_SCRIPT_OL_CHIKI" "73")
    '("vai" "G_UNICODE_SCRIPT_VAI" "74")
    '("carian" "G_UNICODE_SCRIPT_CARIAN" "75")
    '("lycian" "G_UNICODE_SCRIPT_LYCIAN" "76")
    '("lydian" "G_UNICODE_SCRIPT_LYDIAN" "77")
    '("avestan" "G_UNICODE_SCRIPT_AVESTAN" "78")
    '("bamum" "G_UNICODE_SCRIPT_BAMUM" "79")
    '("egyptian-hieroglyphs" "G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS" "80")
    '("imperial-aramaic" "G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC" "81")
    '("inscriptional-pahlavi" "G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI" "82")
    '("inscriptional-parthian" "G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN" "83")
    '("javanese" "G_UNICODE_SCRIPT_JAVANESE" "84")
    '("kaithi" "G_UNICODE_SCRIPT_KAITHI" "85")
    '("lisu" "G_UNICODE_SCRIPT_LISU" "86")
    '("meetei-mayek" "G_UNICODE_SCRIPT_MEETEI_MAYEK" "87")
    '("old-south-arabian" "G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN" "88")
    '("old-turkic" "G_UNICODE_SCRIPT_OLD_TURKIC" "89")
    '("samaritan" "G_UNICODE_SCRIPT_SAMARITAN" "90")
    '("tai-tham" "G_UNICODE_SCRIPT_TAI_THAM" "91")
    '("tai-viet" "G_UNICODE_SCRIPT_TAI_VIET" "92")
    '("batak" "G_UNICODE_SCRIPT_BATAK" "93")
    '("brahmi" "G_UNICODE_SCRIPT_BRAHMI" "94")
    '("mandaic" "G_UNICODE_SCRIPT_MANDAIC" "95")
    '("chakma" "G_UNICODE_SCRIPT_CHAKMA" "96")
    '("meroitic-cursive" "G_UNICODE_SCRIPT_MEROITIC_CURSIVE" "97")
    '("meroitic-hieroglyphs" "G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS" "98")
    '("miao" "G_UNICODE_SCRIPT_MIAO" "99")
    '("sharada" "G_UNICODE_SCRIPT_SHARADA" "100")
    '("sora-sompeng" "G_UNICODE_SCRIPT_SORA_SOMPENG" "101")
    '("takri" "G_UNICODE_SCRIPT_TAKRI" "102")
    '("bassa-vah" "G_UNICODE_SCRIPT_BASSA_VAH" "103")
    '("caucasian-albanian" "G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN" "104")
    '("duployan" "G_UNICODE_SCRIPT_DUPLOYAN" "105")
    '("elbasan" "G_UNICODE_SCRIPT_ELBASAN" "106")
    '("grantha" "G_UNICODE_SCRIPT_GRANTHA" "107")
    '("khojki" "G_UNICODE_SCRIPT_KHOJKI" "108")
    '("khudawadi" "G_UNICODE_SCRIPT_KHUDAWADI" "109")
    '("linear-a" "G_UNICODE_SCRIPT_LINEAR_A" "110")
    '("mahajani" "G_UNICODE_SCRIPT_MAHAJANI" "111")
    '("manichaean" "G_UNICODE_SCRIPT_MANICHAEAN" "112")
    '("mende-kikakui" "G_UNICODE_SCRIPT_MENDE_KIKAKUI" "113")
    '("modi" "G_UNICODE_SCRIPT_MODI" "114")
    '("mro" "G_UNICODE_SCRIPT_MRO" "115")
    '("nabataean" "G_UNICODE_SCRIPT_NABATAEAN" "116")
    '("old-north-arabian" "G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN" "117")
    '("old-permic" "G_UNICODE_SCRIPT_OLD_PERMIC" "118")
    '("pahawh-hmong" "G_UNICODE_SCRIPT_PAHAWH_HMONG" "119")
    '("palmyrene" "G_UNICODE_SCRIPT_PALMYRENE" "120")
    '("pau-cin-hau" "G_UNICODE_SCRIPT_PAU_CIN_HAU" "121")
    '("psalter-pahlavi" "G_UNICODE_SCRIPT_PSALTER_PAHLAVI" "122")
    '("siddham" "G_UNICODE_SCRIPT_SIDDHAM" "123")
    '("tirhuta" "G_UNICODE_SCRIPT_TIRHUTA" "124")
    '("warang-citi" "G_UNICODE_SCRIPT_WARANG_CITI" "125")
    '("ahom" "G_UNICODE_SCRIPT_AHOM" "126")
    '("anatolian-hieroglyphs" "G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS" "127")
    '("hatran" "G_UNICODE_SCRIPT_HATRAN" "128")
    '("multani" "G_UNICODE_SCRIPT_MULTANI" "129")
    '("old-hungarian" "G_UNICODE_SCRIPT_OLD_HUNGARIAN" "130")
    '("signwriting" "G_UNICODE_SCRIPT_SIGNWRITING" "131")
    '("adlam" "G_UNICODE_SCRIPT_ADLAM" "132")
    '("bhaiksuki" "G_UNICODE_SCRIPT_BHAIKSUKI" "133")
    '("marchen" "G_UNICODE_SCRIPT_MARCHEN" "134")
    '("newa" "G_UNICODE_SCRIPT_NEWA" "135")
    '("osage" "G_UNICODE_SCRIPT_OSAGE" "136")
    '("tangut" "G_UNICODE_SCRIPT_TANGUT" "137")
    '("masaram-gondi" "G_UNICODE_SCRIPT_MASARAM_GONDI" "138")
    '("nushu" "G_UNICODE_SCRIPT_NUSHU" "139")
    '("soyombo" "G_UNICODE_SCRIPT_SOYOMBO" "140")
    '("zanabazar-square" "G_UNICODE_SCRIPT_ZANABAZAR_SQUARE" "141")
    '("dogra" "G_UNICODE_SCRIPT_DOGRA" "142")
    '("gunjala-gondi" "G_UNICODE_SCRIPT_GUNJALA_GONDI" "143")
    '("hanifi-rohingya" "G_UNICODE_SCRIPT_HANIFI_ROHINGYA" "144")
    '("makasar" "G_UNICODE_SCRIPT_MAKASAR" "145")
    '("medefaidrin" "G_UNICODE_SCRIPT_MEDEFAIDRIN" "146")
    '("old-sogdian" "G_UNICODE_SCRIPT_OLD_SOGDIAN" "147")
    '("sogdian" "G_UNICODE_SCRIPT_SOGDIAN" "148")
    '("elymaic" "G_UNICODE_SCRIPT_ELYMAIC" "149")
    '("nandinagari" "G_UNICODE_SCRIPT_NANDINAGARI" "150")
    '("nyiakeng-puachue-hmong" "G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG" "151")
    '("wancho" "G_UNICODE_SCRIPT_WANCHO" "152")
  )
)

;; Original typedef:
;; typedef enum {
;;   G_NORMALIZE_DEFAULT,
;;   G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT,
;;   G_NORMALIZE_DEFAULT_COMPOSE,
;;   G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE,
;;   G_NORMALIZE_ALL,
;;   G_NORMALIZE_NFKD = G_NORMALIZE_ALL,
;;   G_NORMALIZE_ALL_COMPOSE,
;;   G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE
;; } GNormalizeMode;

(define-enum-extended NormalizeMode
  (in-module "G")
  (c-name "GNormalizeMode")
  (values
    '("default" "G_NORMALIZE_DEFAULT" "0")
    '("nfd" "G_NORMALIZE_NFD" "0")
    '("default-compose" "G_NORMALIZE_DEFAULT_COMPOSE" "1")
    '("nfc" "G_NORMALIZE_NFC" "1")
    '("all" "G_NORMALIZE_ALL" "2")
    '("nfkd" "G_NORMALIZE_NFKD" "2")
    '("all-compose" "G_NORMALIZE_ALL_COMPOSE" "3")
    '("nfkc" "G_NORMALIZE_NFKC" "3")
  )
)

;; From gutils.h

;; Original typedef:
;; typedef enum {
;;   G_USER_DIRECTORY_DESKTOP,
;;   G_USER_DIRECTORY_DOCUMENTS,
;;   G_USER_DIRECTORY_DOWNLOAD,
;;   G_USER_DIRECTORY_MUSIC,
;;   G_USER_DIRECTORY_PICTURES,
;;   G_USER_DIRECTORY_PUBLIC_SHARE,
;;   G_USER_DIRECTORY_TEMPLATES,
;;   G_USER_DIRECTORY_VIDEOS,
;; 
;;   G_USER_N_DIRECTORIES
;; } GUserDirectory;

(define-enum-extended UserDirectory
  (in-module "G")
  (c-name "GUserDirectory")
  (values
    '("directory-desktop" "G_USER_DIRECTORY_DESKTOP" "0")
    '("directory-documents" "G_USER_DIRECTORY_DOCUMENTS" "1")
    '("directory-download" "G_USER_DIRECTORY_DOWNLOAD" "2")
    '("directory-music" "G_USER_DIRECTORY_MUSIC" "3")
    '("directory-pictures" "G_USER_DIRECTORY_PICTURES" "4")
    '("directory-public-share" "G_USER_DIRECTORY_PUBLIC_SHARE" "5")
    '("directory-templates" "G_USER_DIRECTORY_TEMPLATES" "6")
    '("directory-videos" "G_USER_DIRECTORY_VIDEOS" "7")
    '("n-directories" "G_USER_N_DIRECTORIES" "8")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_FORMAT_SIZE_DEFAULT     = 0,
;;   G_FORMAT_SIZE_LONG_FORMAT = 1 << 0,
;;   G_FORMAT_SIZE_IEC_UNITS   = 1 << 1,
;;   G_FORMAT_SIZE_BITS        = 1 << 2
;; } GFormatSizeFlags;

(define-flags-extended FormatSizeFlags
  (in-module "G")
  (c-name "GFormatSizeFlags")
  (values
    '("default" "G_FORMAT_SIZE_DEFAULT" "0x0")
    '("long-format" "G_FORMAT_SIZE_LONG_FORMAT" "1 << 0")
    '("iec-units" "G_FORMAT_SIZE_IEC_UNITS" "1 << 1")
    '("bits" "G_FORMAT_SIZE_BITS" "1 << 2")
  )
)

;; From gvariant.h

;; Original typedef:
;; typedef enum
;; {
;;   G_VARIANT_CLASS_BOOLEAN       = 'b',
;;   G_VARIANT_CLASS_BYTE          = 'y',
;;   G_VARIANT_CLASS_INT16         = 'n',
;;   G_VARIANT_CLASS_UINT16        = 'q',
;;   G_VARIANT_CLASS_INT32         = 'i',
;;   G_VARIANT_CLASS_UINT32        = 'u',
;;   G_VARIANT_CLASS_INT64         = 'x',
;;   G_VARIANT_CLASS_UINT64        = 't',
;;   G_VARIANT_CLASS_HANDLE        = 'h',
;;   G_VARIANT_CLASS_DOUBLE        = 'd',
;;   G_VARIANT_CLASS_STRING        = 's',
;;   G_VARIANT_CLASS_OBJECT_PATH   = 'o',
;;   G_VARIANT_CLASS_SIGNATURE     = 'g',
;;   G_VARIANT_CLASS_VARIANT       = 'v',
;;   G_VARIANT_CLASS_MAYBE         = 'm',
;;   G_VARIANT_CLASS_ARRAY         = 'a',
;;   G_VARIANT_CLASS_TUPLE         = '(',
;;   G_VARIANT_CLASS_DICT_ENTRY    = '{'
;; } GVariantClass;

(define-enum-extended VariantClass
  (in-module "G")
  (c-name "GVariantClass")
  (values
    '("boolean" "G_VARIANT_CLASS_BOOLEAN" "'b'")
    '("byte" "G_VARIANT_CLASS_BYTE" "'y'")
    '("int16" "G_VARIANT_CLASS_INT16" "'n'")
    '("uint16" "G_VARIANT_CLASS_UINT16" "'q'")
    '("int32" "G_VARIANT_CLASS_INT32" "'i'")
    '("uint32" "G_VARIANT_CLASS_UINT32" "'u'")
    '("int64" "G_VARIANT_CLASS_INT64" "'x'")
    '("uint64" "G_VARIANT_CLASS_UINT64" "'t'")
    '("handle" "G_VARIANT_CLASS_HANDLE" "'h'")
    '("double" "G_VARIANT_CLASS_DOUBLE" "'d'")
    '("string" "G_VARIANT_CLASS_STRING" "'s'")
    '("object-path" "G_VARIANT_CLASS_OBJECT_PATH" "'o'")
    '("signature" "G_VARIANT_CLASS_SIGNATURE" "'g'")
    '("variant" "G_VARIANT_CLASS_VARIANT" "'v'")
    '("maybe" "G_VARIANT_CLASS_MAYBE" "'m'")
    '("array" "G_VARIANT_CLASS_ARRAY" "'a'")
    '("tuple" "G_VARIANT_CLASS_TUPLE" "'('")
    '("dict-entry" "G_VARIANT_CLASS_DICT_ENTRY" "'{'")
  )
)

;; Original typedef:
;; typedef enum
;; {
;;   G_VARIANT_PARSE_ERROR_FAILED,
;;   G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED,
;;   G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE,
;;   G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED,
;;   G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END,
;;   G_VARIANT_PARSE_ERROR_INVALID_CHARACTER,
;;   G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING,
;;   G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH,
;;   G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE,
;;   G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING,
;;   G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE,
;;   G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE,
;;   G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG,
;;   G_VARIANT_PARSE_ERROR_TYPE_ERROR,
;;   G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN,
;;   G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD,
;;   G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
;;   G_VARIANT_PARSE_ERROR_VALUE_EXPECTED,
;;   G_VARIANT_PARSE_ERROR_RECURSION
;; } GVariantParseError;

(define-enum-extended VariantParseError
  (in-module "G")
  (c-name "GVariantParseError")
  (values
    '("failed" "G_VARIANT_PARSE_ERROR_FAILED" "0")
    '("basic-type-expected" "G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED" "1")
    '("cannot-infer-type" "G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE" "2")
    '("definite-type-expected" "G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED" "3")
    '("input-not-at-end" "G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END" "4")
    '("invalid-character" "G_VARIANT_PARSE_ERROR_INVALID_CHARACTER" "5")
    '("invalid-format-string" "G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING" "6")
    '("invalid-object-path" "G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH" "7")
    '("invalid-signature" "G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE" "8")
    '("invalid-type-string" "G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING" "9")
    '("no-common-type" "G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE" "10")
    '("number-out-of-range" "G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE" "11")
    '("number-too-big" "G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG" "12")
    '("type-error" "G_VARIANT_PARSE_ERROR_TYPE_ERROR" "13")
    '("unexpected-token" "G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN" "14")
    '("unknown-keyword" "G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD" "15")
    '("unterminated-string-constant" "G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT" "16")
    '("value-expected" "G_VARIANT_PARSE_ERROR_VALUE_EXPECTED" "17")
    '("recursion" "G_VARIANT_PARSE_ERROR_RECURSION" "18")
  )
)

;; From gwin32.h

;; Original typedef:
;; typedef enum
;; {
;;   G_WIN32_OS_ANY,
;;   G_WIN32_OS_WORKSTATION,
;;   G_WIN32_OS_SERVER,
;; } GWin32OSType;

(define-enum-extended Win32OSType
  (in-module "G")
  (c-name "GWin32OSType")
  (values
    '("any" "G_WIN32_OS_ANY" "0")
    '("workstation" "G_WIN32_OS_WORKSTATION" "1")
    '("server" "G_WIN32_OS_SERVER" "2")
  )
)

;; From gthread.h

;; Original typedef:
;; typedef enum
;; {
;;   G_THREAD_PRIORITY_LOW,
;;   G_THREAD_PRIORITY_NORMAL,
;;   G_THREAD_PRIORITY_HIGH,
;;   G_THREAD_PRIORITY_URGENT
;; } GThreadPriority GLIB_DEPRECATED_TYPE_IN_2_32;

(define-enum-extended ThreadPriority
  (in-module "G")
  (c-name "GThreadPriority")
  (values
    '("low" "G_THREAD_PRIORITY_LOW" "0")
    '("normal" "G_THREAD_PRIORITY_NORMAL" "1")
    '("high" "G_THREAD_PRIORITY_HIGH" "2")
    '("urgent" "G_THREAD_PRIORITY_URGENT" "3")
  )
)

