2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 module gtkc
.glibtypes
;
25 /* The GLib Basic Types */
26 public alias int gint
;
27 public alias uint guint
;
28 public alias int gboolean
;
29 public alias void* gpointer
;
30 public alias void* gconstpointer
;
31 public alias char gchar
;
32 public alias char guchar
;
33 public alias short gshort
;
34 public alias ushort gushort
;
35 public alias int glong
;
36 public alias uint gulong
;
37 public alias byte gint8
;
38 public alias byte guint8
;
39 public alias short gint16
;
40 public alias ushort guint16
;
41 public alias int gint32
;
42 public alias long gint64
;
43 public alias uint guint32
;
44 public alias ulong guint64
;
45 public alias float gfloat
;
46 public alias double gdouble
;
47 public alias uint gsize
;
48 public alias int gssize
;
49 public alias void* va_list
;
50 public alias dchar unichar
;
51 public alias wchar unichar2
;
52 //public alias dchar gunichar;
53 //public alias wchar gunichar2;
54 public alias int time_t
;
57 const uint G_MAXUINT
= 4294967295;
62 * A type which is used to hold a process identification.
63 * On Unix, processes are identified by a process id (an
64 * integer), while Windows uses process handles (which are
67 public alias int GPid
;
70 * typedef guint32 gunichar;
71 * A type which can hold any UCS-4 character code.
73 public alias uint gunichar
;
76 * typedef guint16 gunichar2;
77 * A type which can hold any UTF-16 code
80 public alias ushort gunichar2
;
83 * typedef gint32 GTime;
84 * Simply a replacement for time_t. It has been deprected
85 * since it is not equivalent to time_t
86 * on 64-bit platforms with a 64-bit time_t.
87 * Unrelated to GTimer.
88 * Note that GTime is defined to always be a 32bit integer,
89 * unlike time_t which may be 64bit on some systems.
90 * Therefore, GTime will overflow in the year 2038, and
91 * you cannot use the address of a GTime variable as argument
92 * to the UNIX time() function. Instead, do the following:
96 * gtime = (GTime)ttime;
98 public alias int GTime
;
101 * typedef guint8 GDateDay; /+* day of the month +/
102 * Integer representing a day of the month; between 1 and
103 * 31. G_DATE_BAD_DAY represents an invalid day of the month.
105 public alias byte GDateDay
;
108 * typedef guint16 GDateYear;
109 * Integer representing a year; G_DATE_BAD_YEAR is the invalid
110 * value. The year must be 1 or higher; negative (BC) years are not
111 * allowed. The year is represented with four digits.
113 public alias ushort GDateYear
;
116 * typedef guint32 GQuark;
117 * A GQuark is an integer which uniquely identifies a particular string.
119 public alias uint GQuark
;
121 * Flags passed to g_module_open(). Note that these flags are
122 * not supported on all platforms.
124 * specifies that symbols are only resolved when needed.
126 public enum GModuleFlags
132 alias GModuleFlags ModuleFlags
;
135 * An enumeration specifying the base position for a g_io_channel_seek_position()
138 * the current position in the file.
140 * the start of the file.
142 * the end of the file.
144 public enum GSeekType
150 alias GSeekType SeekType
;
153 * Stati returned by most of the GIOFuncs functions.
161 * Resource temporarily unavailable.
163 public enum GIOStatus
170 alias GIOStatus IOStatus
;
173 * Error codes returned by GIOChannel operations.
174 * G_IO_CHANNEL_ERROR_FBIG
176 * G_IO_CHANNEL_ERROR_INVAL
178 * G_IO_CHANNEL_ERROR_IO
180 * G_IO_CHANNEL_ERROR_ISDIR
181 * File is a directory.
182 * G_IO_CHANNEL_ERROR_NOSPC
183 * No space left on device.
184 * G_IO_CHANNEL_ERROR_NXIO
185 * No such device or address.
186 * G_IO_CHANNEL_ERROR_OVERFLOW
187 * Value too large for defined datatype.
188 * G_IO_CHANNEL_ERROR_PIPE
190 * G_IO_CHANNEL_ERROR_FAILED
193 public enum GIOChannelError
195 /+* Derived from errno +/
196 G_IO_CHANNEL_ERROR_FBIG
,
197 G_IO_CHANNEL_ERROR_INVAL
,
198 G_IO_CHANNEL_ERROR_IO
,
199 G_IO_CHANNEL_ERROR_ISDIR
,
200 G_IO_CHANNEL_ERROR_NOSPC
,
201 G_IO_CHANNEL_ERROR_NXIO
,
202 G_IO_CHANNEL_ERROR_OVERFLOW
,
203 G_IO_CHANNEL_ERROR_PIPE
,
205 G_IO_CHANNEL_ERROR_FAILED
207 alias GIOChannelError IOChannelError
;
210 * A bitwise combination representing a condition to watch for on an event
213 * There is data to read.
215 * Data can be written (without blocking).
217 * There is urgent data to read.
221 * Hung up (the connection has been broken, usually for pipes
223 public enum GIOCondition
232 alias GIOCondition IOCondition
;
235 * Specifies properties of a GIOChannel. Some of the flags can only
236 * be read with g_io_channel_get_flags(), but not changed with
237 * g_io_channel_set_flags().
239 * turns on append mode, corresponds to O_APPEND (see the
245 IS_READABLE
= 1 << 2, /+* Read only flag +/
246 IS_WRITEABLE
= 1 << 3, /+* Read only flag +/
247 IS_SEEKABLE
= 1 << 4, /+* Read only flag +/
250 SET_MASK
= APPEND | NONBLOCK
252 alias GIOFlags IOFlags
;
255 * GIOError is only used by the deprecated functions g_io_channel_read(),
256 * g_io_channel_write(), and g_io_channel_seek().
260 * an EAGAIN error occurred
262 * an EINVAL error occurred
264 * another error occurred
273 alias GIOError IOError
;
276 * Flags specifying the level of log messages.
278 public enum GLogLevelFlags
281 G_LOG_FLAG_RECURSION
= 1 << 0,
282 G_LOG_FLAG_FATAL
= 1 << 1,
283 /+* GLib log levels +/
284 G_LOG_LEVEL_ERROR
= 1 << 2, /+* always fatal +/
285 G_LOG_LEVEL_CRITICAL
= 1 << 3,
286 G_LOG_LEVEL_WARNING
= 1 << 4,
287 G_LOG_LEVEL_MESSAGE
= 1 << 5,
288 G_LOG_LEVEL_INFO
= 1 << 6,
289 G_LOG_LEVEL_DEBUG
= 1 << 7,
290 G_LOG_LEVEL_MASK
= ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL
)
292 alias GLogLevelFlags LogLevelFlags
;
295 * Error codes returned by character set conversion routines.
296 * G_CONVERT_ERROR_NO_CONVERSION
297 * Conversion between the requested character sets
299 * G_CONVERT_ERROR_ILLEGAL_SEQUENCE
300 * Invalid byte sequence in conversion input.
301 * G_CONVERT_ERROR_FAILED
302 * Conversion failed for some reason.
303 * G_CONVERT_ERROR_PARTIAL_INPUT
304 * Partial character sequence at end of input.
305 * G_CONVERT_ERROR_BAD_URI
307 * G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
308 * Pathname is not an absolute path.
310 public enum GConvertError
319 alias GConvertError ConvertError
;
322 * These are the possible character classifications from the
323 * Unicode specification.
324 * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html.
326 * General category "Other, Control" (Cc)
328 * General category "Other, Format" (Cf)
329 * G_UNICODE_UNASSIGNED
330 * General category "Other, Not Assigned" (Cn)
331 * G_UNICODE_PRIVATE_USE
332 * General category "Other, Private Use" (Co)
333 * G_UNICODE_SURROGATE
334 * General category "Other, Surrogate" (Cs)
335 * G_UNICODE_LOWERCASE_LETTER
336 * General category "Letter, Lowercase" (Ll)
337 * G_UNICODE_MODIFIER_LETTER
338 * General category "Letter, Modifier" (Lm)
339 * G_UNICODE_OTHER_LETTER
340 * General category "Letter, Other" (Lo)
341 * G_UNICODE_TITLECASE_LETTER
342 * General category "Letter, Titlecase" (Lt)
343 * G_UNICODE_UPPERCASE_LETTER
344 * General category "Letter, Uppercase" (Lu)
345 * G_UNICODE_COMBINING_MARK
346 * General category "Mark, Spacing Combining" (Mc)
347 * G_UNICODE_ENCLOSING_MARK
348 * General category "Mark, Enclosing" (Me)
349 * G_UNICODE_NON_SPACING_MARK
350 * General category "Mark, Nonspacing" (Mn)
351 * G_UNICODE_DECIMAL_NUMBER
352 * General category "Number, Decimal Digit" (Nd)
353 * G_UNICODE_LETTER_NUMBER
354 * General category "Number, Letter" (Nl)
355 * G_UNICODE_OTHER_NUMBER
356 * General category "Number, Other" (No)
357 * G_UNICODE_CONNECT_PUNCTUATION
358 * General category "Punctuation, Connector" (Pc)
359 * G_UNICODE_DASH_PUNCTUATION
360 * General category "Punctuation, Dash" (Pd)
361 * G_UNICODE_CLOSE_PUNCTUATION
362 * General category "Punctuation, Close" (Pe)
363 * G_UNICODE_FINAL_PUNCTUATION
364 * General category "Punctuation, Final quote" (Pf)
365 * G_UNICODE_INITIAL_PUNCTUATION
366 * General category "Punctuation, Initial quote" (Pi)
367 * G_UNICODE_OTHER_PUNCTUATION
368 * General category "Punctuation, Other" (Po)
369 * G_UNICODE_OPEN_PUNCTUATION
370 * General category "Punctuation, Open" (Ps)
371 * G_UNICODE_CURRENCY_SYMBOL
372 * General category "Symbol, Currency" (Sc)
373 * G_UNICODE_MODIFIER_SYMBOL
374 * General category "Symbol, Modifier" (Sk)
375 * G_UNICODE_MATH_SYMBOL
376 * General category "Symbol, Math" (Sm)
377 * G_UNICODE_OTHER_SYMBOL
378 * General category "Symbol, Other" (So)
379 * G_UNICODE_LINE_SEPARATOR
380 * General category "Separator, Line" (Zl)
381 * G_UNICODE_PARAGRAPH_SEPARATOR
382 * General category "Separator, Paragraph" (Zp)
383 * G_UNICODE_SPACE_SEPARATOR
384 * General category "Separator, Space" (Zs)
386 public enum GUnicodeType
419 alias GUnicodeType UnicodeType
;
422 * These are the possible line break classifications.
423 * The five Hangul types were added in Unicode 4.1, so, has been
424 * introduced in GLib 2.10. Note that new types may be added in the future.
425 * Applications should be ready to handle unknown values.
426 * They may be regarded as G_UNICODE_BREAK_UNKNOWN.
427 * See http://www.unicode.org/unicode/reports/tr14/.
429 public enum GUnicodeBreakType
468 alias GUnicodeBreakType UnicodeBreakType
;
471 * The GUnicodeScript enumeration identifies different writing
472 * systems. The values correspond to the names as defined in the
473 * Unicode standard. The enumeration has been added in GLib 2.14.
474 * Note that new types may be added in the future. Applications
475 * should be ready to handle unknown values.
476 * See Unicode Standard Annex
478 * G_UNICODE_SCRIPT_INVALID_CODE
479 * a value never returned from g_unichar_get_script()
480 * G_UNICODE_SCRIPT_COMMON
482 public enum GUnicodeScript
485 COMMON
= 0, /+* Zyyy +/
486 INHERITED
, /+* Qaai +/
488 ARMENIAN
, /+* Armn +/
490 BOPOMOFO
, /+* Bopo +/
491 CHEROKEE
, /+* Cher +/
493 CYRILLIC
, /+* Cyrl (Cyrs) +/
495 DEVANAGARI
, /+* Deva +/
496 ETHIOPIC
, /+* Ethi +/
497 GEORGIAN
, /+* Geor (Geon, Geoa) +/
500 GUJARATI
, /+* Gujr +/
501 GURMUKHI
, /+* Guru +/
505 HIRAGANA
, /+* Hira +/
507 KATAKANA
, /+* Kana +/
510 LATIN
, /+* Latn (Latf, Latg) +/
511 MALAYALAM
, /+* Mlym +/
512 MONGOLIAN
, /+* Mong +/
515 OLD_ITALIC
, /+* Ital +/
519 SYRIAC
, /+* Syrc (Syrj, Syrn, Syre) +/
525 CANADIAN_ABORIGINAL
, /+* Cans +/
530 TAGBANWA
, /+* Tagb +/
531 /+* Unicode-4.0 additions +/
537 LINEAR_B
, /+* Linb +/
539 UGARITIC
, /+* Ugar +/
540 /+* Unicode-4.1 additions +/
541 NEW_TAI_LUE
, /+* Talu +/
542 BUGINESE
, /+* Bugi +/
543 GLAGOLITIC
, /+* Glag +/
544 TIFINAGH
, /+* Tfng +/
545 SYLOTI_NAGRI
, /+* Sylo +/
546 OLD_PERSIAN
, /+* Xpeo +/
547 KHAROSHTHI
, /+* Khar +/
548 /+* Unicode-5.0 additions +/
550 BALINESE
, /+* Bali +/
551 CUNEIFORM
, /+* Xsux +/
552 PHOENICIAN
, /+* Phnx +/
553 PHAGS_PA
, /+* Phag +/
556 alias GUnicodeScript UnicodeScript
;
559 * Defines how a Unicode string is transformed in a canonical
560 * form, standardizing such issues as whether a character with an accent is
561 * represented as a base character and combining accent or as a single precomposed
562 * character. Unicode strings should generally be normalized before comparing them.
563 * G_NORMALIZE_DEFAULT
564 * standardize differences that do not affect the
566 public enum GNormalizeMode
571 NFC
= DEFAULT_COMPOSE
,
577 alias GNormalizeMode NormalizeMode
;
580 * This enumeration isn't used in the API, but may be useful if you need
581 * to mark a number as a day, month, or year.
595 alias GDateDMY DateDMY
;
598 * Enumeration representing a month; values are G_DATE_JANUARY,
599 * G_DATE_FEBRUARY, etc. G_DATE_BAD_MONTH is the invalid value.
627 public enum GDateMonth
643 alias GDateMonth DateMonth
;
646 * Enumeration representing a day of the week; G_DATE_MONDAY,
647 * G_DATE_TUESDAY, etc. G_DATE_BAD_WEEKDAY is an invalid weekday.
665 public enum GDateWeekday
676 alias GDateWeekday DateWeekday
;
679 * The possible types of token returned from each g_scanner_get_next_token() call.
681 * the end of the file.
686 * G_TOKEN_RIGHT_CURLY
689 public enum GTokenType
716 alias GTokenType TokenType
;
719 * The possible errors, used in the v_error field
720 * of GTokenValue, when the token is a G_TOKEN_ERROR.
724 * unexpected end of file.
725 * G_ERR_UNEXP_EOF_IN_STRING
726 * unterminated string constant.
727 * G_ERR_UNEXP_EOF_IN_COMMENT
728 * unterminated comment.
729 * G_ERR_NON_DIGIT_IN_CONST
730 * non-digit character in a number.
732 * digit beyond radix in a number.
734 * non-decimal floating point number.
735 * G_ERR_FLOAT_MALFORMED
736 * malformed floating point number.
738 public enum GErrorType
743 UNEXP_EOF_IN_COMMENT
,
749 alias GErrorType ErrorType
;
752 * Error codes returned by spawning processes.
754 * Fork failed due to lack of memory.
756 * Read or select on pipes failed.
757 * G_SPAWN_ERROR_CHDIR
758 * Changing to working directory failed.
759 * G_SPAWN_ERROR_ACCES
760 * execv() returned EACCES.
762 * execv() returned EPERM.
764 * execv() returned E2BIG.
765 * G_SPAWN_ERROR_NOEXEC
766 * execv() returned ENOEXEC.
767 * G_SPAWN_ERROR_NAMETOOLONG
768 * execv() returned ENAMETOOLONG.
769 * G_SPAWN_ERROR_NOENT
770 * execv() returned ENOENT.
771 * G_SPAWN_ERROR_NOMEM
772 * execv() returned ENOMEM.
773 * G_SPAWN_ERROR_NOTDIR
774 * execv() returned ENOTDIR.
776 * execv() returned ELOOP.
777 * G_SPAWN_ERROR_TXTBUSY
778 * execv() returned ETXTBUSY.
780 * execv() returned EIO.
781 * G_SPAWN_ERROR_NFILE
782 * execv() returned ENFILE.
783 * G_SPAWN_ERROR_MFILE
784 * execv() returned EMFILE.
785 * G_SPAWN_ERROR_INVAL
786 * execv() returned EINVAL.
787 * G_SPAWN_ERROR_ISDIR
788 * execv() returned EISDIR.
789 * G_SPAWN_ERROR_LIBBAD
790 * execv() returned ELIBBAD.
791 * G_SPAWN_ERROR_FAILED
792 * Some other fatal failure, error->message should explain.
794 public enum GSpawnError
796 FORK
, /+* fork failed due to lack of memory +/
797 READ
, /+* read or select on pipes failed +/
798 CHDIR
, /+* changing to working dir failed +/
799 ACCES
, /+* execv() returned EACCES +/
800 PERM
, /+* execv() returned EPERM +/
801 TOO_BIG
, /+* execv() returned E2BIG +/
802 NOEXEC
, /+* execv() returned ENOEXEC +/
803 NAMETOOLONG
, /+* "" "" ENAMETOOLONG +/
804 NOENT
, /+* "" "" ENOENT +/
805 NOMEM
, /+* "" "" ENOMEM +/
806 NOTDIR
, /+* "" "" ENOTDIR +/
807 LOOP
, /+* "" "" ELOOP +/
808 TXTBUSY
, /+* "" "" ETXTBUSY +/
810 NFILE
, /+* "" "" ENFILE +/
811 MFILE
, /+* "" "" EMFLE +/
812 INVAL
, /+* "" "" EINVAL +/
813 ISDIR
, /+* "" "" EISDIR +/
814 LIBBAD
, /+* "" "" ELIBBAD +/
815 FAILED
/+* other fatal failure, error->message
819 alias GSpawnError SpawnError
;
822 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
823 * G_SPAWN_LEAVE_DESCRIPTORS_OPEN
824 * the parent's open file descriptors will be
826 public enum GSpawnFlags
828 LEAVE_DESCRIPTORS_OPEN
= 1 << 0,
829 DO_NOT_REAP_CHILD
= 1 << 1,
830 /+* look for argv[0] inn the path i.e. use execvp() +/
831 SEARCH_PATH
= 1 << 2,
832 /+* Dump output to /dev/null +/
833 STDOUT_TO_DEV_NULL
= 1 << 3,
834 STDERR_TO_DEV_NULL
= 1 << 4,
835 CHILD_INHERITS_STDIN
= 1 << 5,
836 FILE_AND_ARGV_ZERO
= 1 << 6
838 alias GSpawnFlags SpawnFlags
;
841 * Values corresponding to errno codes returned from file operations
842 * on UNIX. Unlike errno codes, GFileError values are available on
843 * all systems, even Windows. The exact meaning of each code depends on what
844 * sort of file operation you were performing; the UNIX documentation
845 * gives more details. The following error code descriptions come
846 * from the GNU C Library manual, and are under the copyright
848 * It's not very portable to make detailed assumptions about exactly
849 * which errors will be returned from a given operation. Some errors
850 * don't occur on some systems, etc., sometimes there are subtle
851 * differences in when a system will report a given error, etc.
853 * Operation not permitted; only the owner of the
855 public enum GFileError
883 alias GFileError FileError
;
886 * A test to perform on a file using g_file_test().
887 * G_FILE_TEST_IS_REGULAR
888 * TRUE if the file is a regular file (not a symlink or directory)
889 * G_FILE_TEST_IS_SYMLINK
890 * TRUE if the file is a symlink.
892 * TRUE if the file is a directory.
893 * G_FILE_TEST_IS_EXECUTABLE
894 * TRUE if the file is executable.
896 * TRUE if the file exists. It may or may not be a regular file.
898 public enum GFileTest
903 IS_EXECUTABLE
= 1 << 3,
906 alias GFileTest FileTest
;
909 * Error codes returned by shell functions.
910 * G_SHELL_ERROR_BAD_QUOTING
911 * Mismatched or otherwise mangled quoting.
912 * G_SHELL_ERROR_EMPTY_STRING
913 * String to be parsed was empty.
914 * G_SHELL_ERROR_FAILED
917 public enum GShellError
919 /+* mismatched or otherwise mangled quoting +/
920 G_SHELL_ERROR_BAD_QUOTING
,
921 /+* string to be parsed was empty +/
922 G_SHELL_ERROR_EMPTY_STRING
,
925 alias GShellError ShellError
;
928 * Error codes returned by option parsing.
929 * G_OPTION_ERROR_UNKNOWN_OPTION
930 * An option was not known to the parser.
932 public enum GOptionError
938 alias GOptionError OptionError
;
941 * The GOptionArg enum values determine which type of extra argument the
942 * options expect to find. If an option expects an extra argument, it
943 * can be specified in several ways; with a short option:
944 * -x arg, with a long option: --name arg
945 * or combined in a single argument: --name=arg.
947 * No extra argument. This is useful for simple flags.
948 * G_OPTION_ARG_STRING
949 * The option takes a string argument.
951 * The option takes an integer argument.
952 * G_OPTION_ARG_CALLBACK
953 * The option provides a callback to parse the
955 public enum GOptionArg
967 alias GOptionArg OptionArg
;
970 * Flags which modify individual options.
971 * G_OPTION_FLAG_HIDDEN
972 * The option doesn't appear in --help
974 public enum GOptionFlags
981 OPTIONAL_ARG
= 1 << 5,
984 alias GOptionFlags OptionFlags
;
987 * Error codes returned by markup parsing.
988 * G_MARKUP_ERROR_BAD_UTF8
989 * text being parsed was not valid UTF-8
990 * G_MARKUP_ERROR_EMPTY
991 * document contained nothing, or only whitespace
992 * G_MARKUP_ERROR_PARSE
993 * document was ill-formed
994 * G_MARKUP_ERROR_UNKNOWN_ELEMENT
995 * error should be set by GMarkupParser functions; element wasn't known
996 * G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE
997 * error should be set by GMarkupParser functions; attribute wasn't known
998 * G_MARKUP_ERROR_INVALID_CONTENT
999 * error should be set by GMarkupParser functions; something was wrong with contents of the document, e.g. invalid attribute value
1001 public enum GMarkupError
1006 /+* These three are primarily intended for specific GMarkupParser
1007 * implementations to set.
1013 alias GMarkupError MarkupError
;
1016 * Flags that affect the behaviour of the parser.
1017 * G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG
1018 * flag you should not use.
1019 * G_MARKUP_TREAT_CDATA_AS_TEXT
1020 * When this flag is set, CDATA marked
1022 public enum GMarkupParseFlags
1024 DO_NOT_USE_THIS_UNSUPPORTED_FLAG
= 1 << 0,
1025 TREAT_CDATA_AS_TEXT
= 1 << 1
1027 alias GMarkupParseFlags MarkupParseFlags
;
1030 * Error codes returned by key file parsing.
1031 * G_KEY_FILE_ERROR_UNKNOWN_ENCODING
1032 * the text being parsed was in an unknown encoding
1033 * G_KEY_FILE_ERROR_PARSE
1034 * document was ill-formed
1035 * G_KEY_FILE_ERROR_NOT_FOUND
1036 * the file was not found
1037 * G_KEY_FILE_ERROR_KEY_NOT_FOUND
1038 * a requested key was not found
1039 * G_KEY_FILE_ERROR_GROUP_NOT_FOUND
1040 * a requested group was not found
1041 * G_KEY_FILE_ERROR_INVALID_VALUE
1042 * a value could not be parsed
1044 public enum GKeyFileError
1053 alias GKeyFileError KeyFileError
;
1056 * Flags which influence the parsing.
1058 * No flags, default behaviour
1059 * G_KEY_FILE_KEEP_COMMENTS
1060 * Use this flag if you plan to write the (possibly modified)
1062 public enum GKeyFileFlags
1065 KEEP_COMMENTS
= 1 << 0,
1066 KEEP_TRANSLATIONS
= 1 << 1
1068 alias GKeyFileFlags KeyFileFlags
;
1071 * Specifies the type of traveral performed by g_tree_traverse(),
1072 * g_node_traverse() and g_node_find().
1074 * vists a node's left child first, then the node itself, then its
1076 public enum GTraverseType
1083 alias GTraverseType TraverseType
;
1086 * Specifies which nodes are visited during several of the tree functions,
1087 * including g_node_traverse() and g_node_find().
1089 * only leaf nodes should be visited. This name has been
1091 public enum GTraverseFlags
1094 NON_LEAVES
= 1 << 1,
1095 ALL
= LEAVES | NON_LEAVES
,
1098 NON_LEAFS
= NON_LEAVES
1100 alias GTraverseFlags TraverseFlags
;
1105 * The GMainLoop struct is an opaque data type
1106 * representing the main event loop of a GLib or GTK+ application.
1108 public struct GMainLoop
{}
1112 * The GMainContext struct is an opaque data type
1113 * representing a set of sources to be handled in a main loop.
1115 public struct GMainContext
{}
1120 * the file descriptor to poll (or a HANDLE on Win32 platforms).
1122 * a bitwise combination of flags from GIOCondition, specifying which
1123 * events should be polled for. Typically for reading from a file descriptor
1124 * you would use G_IO_IN | G_IO_HUP | G_IO_ERR, and for writing you would use
1125 * G_IO_OUT | G_IO_ERR.
1127 * a bitwise combination of flags from GIOCondition, returned from the
1128 * poll() function to indicate which events occurred.
1130 public struct GPollFD
{}
1131 // #if defined (G_OS_WIN32) GLIB_SIZEOF_VOID_P == 8
1132 // glib-The-Main-Event-Loop.html
1134 // glib-The-Main-Event-Loop.html
1136 // glib-The-Main-Event-Loop.html
1138 // glib-The-Main-Event-Loop.html
1140 // glib-The-Main-Event-Loop.html
1142 // glib-The-Main-Event-Loop.html
1144 // glib-The-Main-Event-Loop.html
1148 * The GSource struct is an opaque data type representing
1151 public struct GSource
{}
1155 * The GSourceFuncs struct contains a table of functions used to handle
1156 * event sources in a generic manner.
1158 * Called before all the file descriptors are polled.
1159 * If the source can determine that it is ready here (without waiting for the
1160 * results of the poll() call) it should return TRUE.
1161 * It can also return a timeout_ value which should be the maximum timeout
1162 * (in milliseconds) which should be passed to the poll() call.
1163 * The actual timeout used will be -1 if all sources returned -1, or it will
1164 * be the minimum of all the timeout_ values returned which were >= 0.
1166 * Called after all the file descriptors are polled.
1167 * The source should return TRUE if it is ready to be dispatched.
1168 * Note that some time may have passed since the previous prepare function was
1169 * called, so the source should be checked again here.
1171 * Called to dispatch the event source, after it has returned TRUE in
1172 * either its prepare or its check function. The dispatch function is
1173 * passed in a callback function and data. The callback function may be
1174 * NULL if the source was never connected to a callback using
1175 * g_source_set_callback(). The dispatch function should call the
1176 * callback function with user_data and whatever additional parameters are
1177 * needed for this type of event source.
1179 * Called when the source is finalized.
1180 * For idle sources, the prepare and check functions always return TRUE to
1181 * indicate that the source is always ready to be processed.
1182 * The prepare function also returns a timeout value of 0 to ensure that the
1183 * poll() call doesn't block (since that would be time
1184 * wasted which could have been spent running the idle function).
1185 * For timeout sources, the prepare and check functions both return TRUE if the
1186 * timeout interval has expired. The prepare function also returns a timeout
1187 * value to ensure that the poll() call doesn't block too
1188 * long and miss the next timeout.
1189 * For file descriptor sources, the prepare function typically returns FALSE,
1190 * since it must wait until poll() has been called before
1191 * it knows whether any events need to be processed. It sets the returned
1192 * timeout to -1 to indicate that it doesn't mind how long the
1193 * poll() call blocks.
1194 * In the check function, it tests the results of the poll()
1195 * call to see if the required condition has been met, and returns TRUE if so.
1197 public struct GSourceFuncs
{}
1198 // int (*prepare) (GSource *source,
1199 // glib-The-Main-Event-Loop.html
1201 // glib-The-Main-Event-Loop.html
1202 // int (*check) (GSource *source);
1203 // glib-The-Main-Event-Loop.html
1204 // int (*dispatch) (GSource *source,
1205 // glib-The-Main-Event-Loop.html
1206 // GSourceFunc callback,
1207 // glib-The-Main-Event-Loop.html
1209 // glib-The-Main-Event-Loop.html
1210 // void (*finalize) (GSource *source); /+* Can be NULL +/
1211 // glib-The-Main-Event-Loop.html
1212 // /+* For use by gSourceSetClosure +/
1213 // glib-The-Main-Event-Loop.html
1214 // GSourceFunc closureCallback;
1215 // glib-The-Main-Event-Loop.html
1216 // GSourceDummyMarshal closureMarshal; /+* Really is of type GClosureMarshal +/
1217 // glib-The-Main-Event-Loop.html
1221 * The GSourceCallbackFuncs struct contains
1222 * functions for managing callback objects.
1224 * Called when a reference is added to the callback object.
1226 * Called when a reference to the callback object is dropped.
1228 * Called to extract the callback function and data from the callback object.
1230 public struct GSourceCallbackFuncs
{}
1231 // void (*doref) (void* cbData);
1232 // glib-The-Main-Event-Loop.html
1233 // void (*unref) (void* cbData);
1234 // glib-The-Main-Event-Loop.html
1235 // void (*get) (void* cbData,
1236 // glib-The-Main-Event-Loop.html
1238 // glib-The-Main-Event-Loop.html
1239 // GSourceFunc *func,
1240 // glib-The-Main-Event-Loop.html
1242 // glib-The-Main-Event-Loop.html
1247 * The GThreadPool struct represents a thread pool. It has six public
1248 * read-only members, but the underlying struct is bigger, so you must not copy
1251 * the function to execute in the threads of this pool
1252 * gpointeruser_data;
1253 * the user data for the threads of this pool
1254 * gbooleanexclusive;
1255 * are all threads exclusive to this pool
1257 public struct GThreadPool
{}
1259 // glib-Thread-Pools.html
1261 // glib-Thread-Pools.html
1263 // glib-Thread-Pools.html
1268 * The GAsyncQueue struct is an opaque data structure, which represents
1269 * an asynchronous queue. It should only be accessed through the
1270 * g_async_queue_* functions.
1272 public struct GAsyncQueue
{}
1277 * The GModule struct is an opaque data structure to represent a
1278 * Dynamically-Loaded Module.
1279 * It should only be accessed via the following functions.
1281 public struct GModule
{}
1285 * A set of functions used to perform memory allocation. The same GMemVTable must
1286 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
1287 * if it exists, should be prior to any use of GLib.
1289 * function to use for allocating memory.
1291 * function to use for reallocating memory.
1293 * function to use to free memory.
1295 * function to use for allocating zero-filled memory.
1297 * function to use for allocating memory without a default error handler.
1299 * function to use for reallocating memory without a default error handler.
1301 public struct GMemVTable
{}
1302 // void* (*malloc) (uint nBytes);
1303 // glib-Memory-Allocation.html
1304 // void* (*realloc) (void* mem,
1305 // glib-Memory-Allocation.html
1307 // glib-Memory-Allocation.html
1308 // void (*free) (void* mem);
1309 // glib-Memory-Allocation.html
1310 // /+* optional; set to NULL if not used ! +/
1311 // glib-Memory-Allocation.html
1312 // void* (*calloc) (uint nBlocks,
1313 // glib-Memory-Allocation.html
1314 // uint nBlockBytes);
1315 // glib-Memory-Allocation.html
1316 // void* (*tryMalloc) (uint nBytes);
1317 // glib-Memory-Allocation.html
1318 // void* (*tryRealloc) (void* mem,
1319 // glib-Memory-Allocation.html
1321 // glib-Memory-Allocation.html
1326 * A data structure representing an IO Channel. The fields should be considered
1327 * private and should only be accessed with the following functions.
1329 public struct GIOChannel
{}
1333 * A table of functions used to handle different types of GIOChannel in a
1336 public struct GIOFuncs
{}
1337 // GIOStatus (*ioRead) (GIOChannel *channel,
1338 // glib-IO-Channels.html
1340 // glib-IO-Channels.html
1342 // glib-IO-Channels.html
1344 // glib-IO-Channels.html
1346 // glib-IO-Channels.html
1347 // GIOStatus (*ioWrite) (GIOChannel *channel,
1348 // glib-IO-Channels.html
1350 // glib-IO-Channels.html
1352 // glib-IO-Channels.html
1353 // uint *bytesWritten,
1354 // glib-IO-Channels.html
1356 // glib-IO-Channels.html
1357 // GIOStatus (*ioSeek) (GIOChannel *channel,
1358 // glib-IO-Channels.html
1360 // glib-IO-Channels.html
1362 // glib-IO-Channels.html
1364 // glib-IO-Channels.html
1365 // GIOStatus (*ioClose) (GIOChannel *channel,
1366 // glib-IO-Channels.html
1368 // glib-IO-Channels.html
1369 // GSource* (*ioCreateWatch) (GIOChannel *channel,
1370 // glib-IO-Channels.html
1371 // GIOCondition condition);
1372 // glib-IO-Channels.html
1373 // void (*ioFree) (GIOChannel *channel);
1374 // glib-IO-Channels.html
1375 // GIOStatus (*ioSetFlags) (GIOChannel *channel,
1376 // glib-IO-Channels.html
1378 // glib-IO-Channels.html
1380 // glib-IO-Channels.html
1381 // GIOFlags (*ioGetFlags) (GIOChannel *channel);
1382 // glib-IO-Channels.html
1387 * The GError structure contains
1388 * information about an error that has occurred.
1390 * error domain, e.g. G_FILE_ERROR.
1392 * error code, e.g. G_FILE_ERROR_NOENT.
1394 * human-readable informative error message.
1396 public struct GError
1405 * The GIConv struct wraps an
1406 * iconv() conversion descriptor. It contains private data
1407 * and should only be accessed using the following functions.
1409 public struct GIConv
{}
1413 * Represents a precise time, with seconds and microseconds.
1414 * Similar to the struct timeval returned by
1415 * the gettimeofday() UNIX call.
1421 public struct GTimeVal
1430 * Represents a day between January 1, Year 1 and a few thousand years in
1431 * the future. None of its members should be accessed directly. If the
1432 * GDate is obtained from g_date_new(), it will
1433 * be safe to mutate but invalid and thus not safe for calendrical computations.
1434 * If it's declared on the stack, it will contain garbage so must be
1435 * initialized with g_date_clear(). g_date_clear() makes the date invalid
1436 * but sane. An invalid date doesn't represent a day, it's "empty." A
1437 * date becomes valid after you set it to a Julian day or you set a day,
1439 * guintjulian_days:32;
1440 * the Julian representation of the date
1442 * this bit is set if julian_days is valid
1444 * this is set if day, month and year are valid
1446 * the day of the day-month-year representation of the date, as
1448 public struct GDate
{}
1449 // uint julianDays : 32; /+* julian days representation - we use a
1450 // glib-Date-and-Time-Functions.html
1451 // * bitfield hoping that 64 bit platforms
1452 // glib-Date-and-Time-Functions.html
1453 // * will pack this whole struct inn one big
1454 // glib-Date-and-Time-Functions.html
1456 // glib-Date-and-Time-Functions.html
1458 // glib-Date-and-Time-Functions.html
1459 // uint julian : 1; /+* julian is valid +/
1460 // glib-Date-and-Time-Functions.html
1461 // uint dmy : 1; /+* dmy is valid +/
1462 // glib-Date-and-Time-Functions.html
1463 // /+* DMY representation +/
1464 // glib-Date-and-Time-Functions.html
1466 // glib-Date-and-Time-Functions.html
1468 // glib-Date-and-Time-Functions.html
1470 // glib-Date-and-Time-Functions.html
1475 * The GRand struct is an opaque data structure. It should only be
1476 * accessed through the g_rand_* functions.
1478 public struct GRand
{}
1482 * Associates a string with a bit flag.
1483 * Used in g_parse_debug_string().
1489 public struct GDebugKey
1498 * The data structure representing a lexical scanner.
1499 * You should set input_name after creating
1500 * the scanner, since it is used by the default message handler when
1501 * displaying warnings and errors. If you are scanning a file, the file
1502 * name would be a good choice.
1504 * max_parse_errors fields are not used.
1505 * If you need to associate extra data with the scanner you can place them here.
1506 * If you want to use your own message handler you can set the
1507 * msg_handler field. The type of the message
1508 * handler function is declared by GScannerMsgFunc.
1510 public struct GScanner
{}
1511 // /+* unused fields +/
1512 // glib-Lexical-Scanner.html
1514 // glib-Lexical-Scanner.html
1515 // uint maxParseErrors;
1516 // glib-Lexical-Scanner.html
1517 // /+* _Error() increments this field +/
1518 // glib-Lexical-Scanner.html
1519 // uint parseErrors;
1520 // glib-Lexical-Scanner.html
1521 // /+* name of input stream, featured by the defaulx message handler +/
1522 // glib-Lexical-Scanner.html
1524 // glib-Lexical-Scanner.html
1525 // /+* quarked data +/
1526 // glib-Lexical-Scanner.html
1528 // glib-Lexical-Scanner.html
1529 // /+* link into the scanner configuration +/
1530 // glib-Lexical-Scanner.html
1531 // GScannerConfig *config;
1532 // glib-Lexical-Scanner.html
1533 // /+* fields filled inn after _GetNextToken() +/
1534 // glib-Lexical-Scanner.html
1535 // GTokenType token;
1536 // glib-Lexical-Scanner.html
1537 // GTokenValue value;
1538 // glib-Lexical-Scanner.html
1540 // glib-Lexical-Scanner.html
1542 // glib-Lexical-Scanner.html
1543 // /+* fields filled inn after _PeekNextToken() +/
1544 // glib-Lexical-Scanner.html
1545 // GTokenType nextToken;
1546 // glib-Lexical-Scanner.html
1547 // GTokenValue nextValue;
1548 // glib-Lexical-Scanner.html
1550 // glib-Lexical-Scanner.html
1551 // uint nextPosition;
1552 // glib-Lexical-Scanner.html
1553 // /+* to be considered private +/
1554 // glib-Lexical-Scanner.html
1555 // GHashTable *symbolTable;
1556 // glib-Lexical-Scanner.html
1558 // glib-Lexical-Scanner.html
1560 // glib-Lexical-Scanner.html
1562 // glib-Lexical-Scanner.html
1564 // glib-Lexical-Scanner.html
1566 // glib-Lexical-Scanner.html
1567 // /+* handler funct for _Warn and _Error +/
1568 // glib-Lexical-Scanner.html
1569 // GScannerMsgFunc msgHandler;
1570 // glib-Lexical-Scanner.html
1574 * Specifies the GScanner settings.
1575 * cset_skip_characters specifies which characters
1576 * should be skipped by the scanner (the default is the whitespace characters:
1577 * space, tab, carriage-return and line-feed).
1578 * cset_identifier_first specifies the characters
1579 * which can start identifiers (the default is G_CSET_a_2_z, "_", and
1581 * cset_identifier_nth specifies the characters
1582 * which can be used in identifiers, after the first character (the default
1583 * is G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS,
1585 * cpair_comment_single specifies the characters
1586 * at the start and end of single-line comments. The default is "#\n" which
1587 * means that single-line comments start with a '#' and continue until a '\n'
1589 * case_sensitive specifies if symbols are
1590 * case sensitive (the default is FALSE).
1591 * skip_comment_multi specifies if multi-line
1592 * comments are skipped and not returned as tokens (the default is TRUE).
1593 * skip_comment_single specifies if single-line
1594 * comments are skipped and not returned as tokens (the default is TRUE).
1595 * scan_comment_multi specifies if multi-line
1596 * comments are recognized (the default is TRUE).
1597 * scan_identifier specifies if identifiers
1598 * are recognized (the default is TRUE).
1599 * scan_identifier_1char specifies if single-character
1600 * identifiers are recognized (the default is FALSE).
1601 * scan_identifier_NULL specifies if
1602 * NULL is reported as G_TOKEN_IDENTIFIER_NULL.
1603 * (the default is FALSE).
1604 * scan_symbols specifies if symbols are
1605 * recognized (the default is TRUE).
1606 * scan_binary specifies if binary numbers
1607 * are recognized (the default is FALSE).
1608 * scan_octal specifies if octal numbers
1609 * are recognized (the default is TRUE).
1610 * scan_float specifies if floating point numbers
1611 * are recognized (the default is TRUE).
1612 * scan_hex specifies if hexadecimal numbers
1613 * are recognized (the default is TRUE).
1614 * scan_hex_dollar specifies if '$' is recognized
1615 * as a prefix for hexadecimal numbers (the default is FALSE).
1616 * scan_string_sq specifies if strings can be
1617 * enclosed in single quotes (the default is TRUE).
1618 * scan_string_dq specifies if strings can be
1619 * enclosed in double quotes (the default is TRUE).
1620 * numbers_2_int specifies if binary, octal and
1621 * hexadecimal numbers are reported as G_TOKEN_INT (the default is TRUE).
1622 * int_2_float specifies if all numbers are
1623 * reported as G_TOKEN_FLOAT (the default is FALSE).
1624 * identifier_2_string specifies if identifiers
1625 * are reported as strings (the default is FALSE).
1626 * char_2_token specifies if characters
1627 * are reported by setting token = ch or as G_TOKEN_CHAR
1628 * (the default is TRUE).
1629 * symbol_2_token specifies if symbols
1630 * are reported by setting token = v_symbol or as
1631 * G_TOKEN_SYMBOL (the default is FALSE).
1632 * scope_0_fallback specifies if a symbol
1633 * is searched for in the default scope in addition to the current scope
1634 * (the default is FALSE).
1636 public struct GScannerConfig
{}
1637 // /+* Character sets
1638 // glib-Lexical-Scanner.html
1640 // glib-Lexical-Scanner.html
1641 // char *csetSkipCharacters; /+* default: " \t\n" +/
1642 // glib-Lexical-Scanner.html
1643 // char *csetIdentifierFirst;
1644 // glib-Lexical-Scanner.html
1645 // char *csetIdentifierNth;
1646 // glib-Lexical-Scanner.html
1647 // char *cpairCommentSingle; /+* default: "#\n" +/
1648 // glib-Lexical-Scanner.html
1649 // /+* Should symbol lookup work case sensitive?
1650 // glib-Lexical-Scanner.html
1652 // glib-Lexical-Scanner.html
1653 // uint caseSensitive : 1;
1654 // glib-Lexical-Scanner.html
1655 // /+* Boolean values to be adjusted "on the fly"
1656 // glib-Lexical-Scanner.html
1657 // * to configure scanning behaviour.
1658 // glib-Lexical-Scanner.html
1660 // glib-Lexical-Scanner.html
1661 // uint skipCommentMulti : 1; /+* C like comment +/
1662 // glib-Lexical-Scanner.html
1663 // uint skipCommentSingle : 1; /+* single line comment +/
1664 // glib-Lexical-Scanner.html
1665 // uint scanCommentMulti : 1; /+* scan multi line comments? +/
1666 // glib-Lexical-Scanner.html
1667 // uint scanIdentifier : 1;
1668 // glib-Lexical-Scanner.html
1669 // uint scanIdentifier1char : 1;
1670 // glib-Lexical-Scanner.html
1671 // uint scanIdentifierNULL : 1;
1672 // glib-Lexical-Scanner.html
1673 // uint scanSymbols : 1;
1674 // glib-Lexical-Scanner.html
1675 // uint scanBinary : 1;
1676 // glib-Lexical-Scanner.html
1677 // uint scanOctal : 1;
1678 // glib-Lexical-Scanner.html
1679 // uint scanFloat : 1;
1680 // glib-Lexical-Scanner.html
1681 // uint scanHex : 1; /+* `0x0ff0' +/
1682 // glib-Lexical-Scanner.html
1683 // uint scanHexDollar : 1; /+* `$0ff0' +/
1684 // glib-Lexical-Scanner.html
1685 // uint scanStringSq : 1; /+* string: 'anything' +/
1686 // glib-Lexical-Scanner.html
1687 // uint scanStringDq : 1; /+* string: "\\-escapes!\n" +/
1688 // glib-Lexical-Scanner.html
1689 // uint numbers2_Int : 1; /+* bin, octal, hex => int +/
1690 // glib-Lexical-Scanner.html
1691 // uint int2_Float : 1; /+* int => G_TOKEN_FLOAT? +/
1692 // glib-Lexical-Scanner.html
1693 // uint identifier2_String : 1;
1694 // glib-Lexical-Scanner.html
1695 // uint char2_Token : 1; /+* return G_TOKEN_CHAR? +/
1696 // glib-Lexical-Scanner.html
1697 // uint symbol2_Token : 1;
1698 // glib-Lexical-Scanner.html
1699 // uint scope0_Fallback : 1; /+* try scope 0 on lookups? +/
1700 // glib-Lexical-Scanner.html
1701 // uint storeInt64 : 1; /+* use value.vInt64 rather than vInt +/
1702 // glib-Lexical-Scanner.html
1703 // uint paddingDummy;
1704 // glib-Lexical-Scanner.html
1709 * The data structure used for automatic completion.
1711 * list of target items (strings or data structures).
1712 * GCompletionFuncfunc;
1713 * function which is called to get the string associated with a target
1715 public struct GCompletion
{}
1717 // glib-Automatic-String-Completion.html
1718 // GCompletionFunc func;
1719 // glib-Automatic-String-Completion.html
1721 // glib-Automatic-String-Completion.html
1723 // glib-Automatic-String-Completion.html
1724 // GCompletionStrncmpFunc strncmpFunc;
1725 // glib-Automatic-String-Completion.html
1730 * Opaque datatype that records a start time.
1732 public struct GTimer
{}
1736 * An opaque structure representing an opened directory.
1738 public struct GDir
{}
1742 * The GMappedFile represents a file mapping created with
1743 * g_mapped_file_new(). It has only private members and should
1744 * not be accessed directly.
1746 public struct GMappedFile
{}
1751 * A GOptionContext struct defines which options
1752 * are accepted by the commandline option parser. The struct has only private
1753 * fields and should not be directly accessed.
1755 public struct GOptionContext
{}
1759 * A GOptionEntry defines a single option.
1760 * To have an effect, they must be added to a GOptionGroup with
1761 * g_option_context_add_main_entries() or g_option_group_add_entries().
1762 * constgchar*long_name;
1763 * The long name of an option can be used to specify it
1765 public struct GOptionEntry
{}
1767 // glib-Commandline-option-parser.html
1769 // glib-Commandline-option-parser.html
1771 // glib-Commandline-option-parser.html
1773 // glib-Commandline-option-parser.html
1775 // glib-Commandline-option-parser.html
1776 // char *description;
1777 // glib-Commandline-option-parser.html
1778 // char *argDescription;
1779 // glib-Commandline-option-parser.html
1783 * A GOptionGroup struct defines the options in a single
1784 * group. The struct has only private fields and should not be directly accessed.
1785 * All options in a group share the same translation function. Libaries which
1786 * need to parse commandline options are expected to provide a function for
1787 * getting a GOptionGroup holding their options, which
1788 * the application can then add to its GOptionContext.
1790 public struct GOptionGroup
{}
1795 * A GPatternSpec is the 'compiled' form of a pattern.
1796 * This structure is opaque and its fields cannot be accessed directly.
1798 public struct GPatternSpec
{}
1803 * A parse context is used to parse a stream of bytes that you expect to
1804 * contain marked-up text. See g_markup_parse_context_new(),
1805 * GMarkupParser, and so on for more details.
1807 public struct GMarkupParseContext
{}
1811 * Any of the fields in GMarkupParser can be NULL, in which case they
1812 * will be ignored. Except for the error function, any of these
1813 * callbacks can set an error; in particular the
1814 * G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
1815 * and G_MARKUP_ERROR_INVALID_CONTENT errors are intended to be set
1816 * from these callbacks. If you set an error from a callback,
1817 * g_markup_parse_context_parse() will report that error back to its caller.
1819 * Callback to invoke when the opening tag of an element
1821 public struct GMarkupParser
{}
1822 // /+* Called for open tags <foo bar="baz"> +/
1823 // glib-Simple-XML-Subset-Parser.html
1824 // void (*startElement) (GMarkupParseContext *context,
1825 // glib-Simple-XML-Subset-Parser.html
1826 // char *elementName,
1827 // glib-Simple-XML-Subset-Parser.html
1828 // char **attributeNames,
1829 // glib-Simple-XML-Subset-Parser.html
1830 // char **attributeValues,
1831 // glib-Simple-XML-Subset-Parser.html
1833 // glib-Simple-XML-Subset-Parser.html
1835 // glib-Simple-XML-Subset-Parser.html
1836 // /+* Called for close tags </foo> +/
1837 // glib-Simple-XML-Subset-Parser.html
1838 // void (*endElement) (GMarkupParseContext *context,
1839 // glib-Simple-XML-Subset-Parser.html
1840 // char *elementName,
1841 // glib-Simple-XML-Subset-Parser.html
1843 // glib-Simple-XML-Subset-Parser.html
1845 // glib-Simple-XML-Subset-Parser.html
1846 // /+* Called for character data +/
1847 // glib-Simple-XML-Subset-Parser.html
1848 // /+* text is not nul-terminated +/
1849 // glib-Simple-XML-Subset-Parser.html
1850 // void (*text) (GMarkupParseContext *context,
1851 // glib-Simple-XML-Subset-Parser.html
1853 // glib-Simple-XML-Subset-Parser.html
1855 // glib-Simple-XML-Subset-Parser.html
1857 // glib-Simple-XML-Subset-Parser.html
1859 // glib-Simple-XML-Subset-Parser.html
1860 // /+* Called for strings that should be re-saved verbatim inn this same
1861 // glib-Simple-XML-Subset-Parser.html
1862 // * position, but are not otherwise interpretable. At the moment
1863 // glib-Simple-XML-Subset-Parser.html
1864 // * this includes comments and processing instructions.
1865 // glib-Simple-XML-Subset-Parser.html
1867 // glib-Simple-XML-Subset-Parser.html
1868 // /+* text is not nul-terminated. +/
1869 // glib-Simple-XML-Subset-Parser.html
1870 // void (*passthrough) (GMarkupParseContext *context,
1871 // glib-Simple-XML-Subset-Parser.html
1872 // char *passthroughText,
1873 // glib-Simple-XML-Subset-Parser.html
1875 // glib-Simple-XML-Subset-Parser.html
1877 // glib-Simple-XML-Subset-Parser.html
1879 // glib-Simple-XML-Subset-Parser.html
1880 // /+* Called on error, including one set by other
1881 // glib-Simple-XML-Subset-Parser.html
1882 // * methods inn the vtable. The GError should not be freed.
1883 // glib-Simple-XML-Subset-Parser.html
1885 // glib-Simple-XML-Subset-Parser.html
1886 // void (*error) (GMarkupParseContext *context,
1887 // glib-Simple-XML-Subset-Parser.html
1889 // glib-Simple-XML-Subset-Parser.html
1891 // glib-Simple-XML-Subset-Parser.html
1896 * The GKeyFile struct contains only private fields
1897 * and should not be used directly.
1899 public struct GKeyFile
{}
1905 * GMemChunk is deprecated and should not be used in newly-written code.
1906 * The GMemChunk struct is an opaque data structure representing a memory
1907 * chunk. It should be accessed only through the use of the following functions.
1909 public struct GMemChunk
{}
1914 * The GList struct is used for each element in a doubly-linked list.
1916 * holds the element's data, which can be a pointer to any kind of data,
1918 public struct GList
{}
1920 // glib-Doubly-Linked-Lists.html
1922 // glib-Doubly-Linked-Lists.html
1924 // glib-Doubly-Linked-Lists.html
1929 * The GSList struct is used for each element in the singly-linked list.
1931 * holds the element's data, which can be a pointer to any kind of data,
1933 public struct GSList
{}
1935 // glib-Singly-Linked-Lists.html
1937 // glib-Singly-Linked-Lists.html
1942 * Contains the public fields of a Queue.
1944 * a pointer to the first element of the queue.
1946 * a pointer to the last element of the queue.
1948 * the number of elements in the queue.
1950 public struct GQueue
{}
1952 // glib-Double-ended-Queues.html
1954 // glib-Double-ended-Queues.html
1956 // glib-Double-ended-Queues.html
1961 * Each piece of memory that is pushed onto the stack
1962 * is cast to a GTrashStack*.
1964 * pointer to the previous element of the stack,
1965 * gets stored in the first sizeof (gpointer)
1966 * bytes of the element.
1968 public struct GTrashStack
{}
1969 // GTrashStack *next;
1970 // glib-Trash-Stacks.html
1975 * The GHashTable struct is an opaque data structure to represent a
1977 * It should only be accessed via the following functions.
1979 public struct GHashTable
{}
1984 * The GString struct contains the public fields of a GString.
1985 * The str field points to the character data.
1986 * It may move as text is added.
1987 * The len field contains the length of the string,
1988 * not including the terminating nul byte.
1989 * The str field is nul-terminated and so can be used as an ordinary C
1990 * string. But it may be moved when text is appended or inserted into the
1993 public struct GString
2003 * An opaque data structure representing String Chunks.
2004 * It should only be accessed by using the following functions.
2006 public struct GStringChunk
{}
2011 * Contains the public fields of an Array.
2013 * a pointer to the element data. The data may be moved as elements are
2014 * added to the GArray.
2016 * the number of elements in the GArray.
2018 public struct GArray
2027 * Contains the public fields of a pointer array.
2029 * points to the array of pointers, which may be moved when the array grows.
2031 * number of pointers in the array.
2033 public struct GPtrArray
2042 * The GByteArray struct allows access to the public fields of a GByteArray.
2044 * a pointer to the element data. The data may be moved as elements are
2045 * added to the GByteArray.
2047 * the number of elements in the GByteArray.
2049 public struct GByteArray
2058 * The GTree struct is an opaque data structure representing a
2059 * Balanced Binary Tree.
2060 * It should be accessed only by using the following functions.
2062 public struct GTree
{}
2067 * The GNode struct represents one node in a
2069 * The data field contains the actual data of the node.
2071 * fields point to the node's siblings (a sibling is another GNode with the
2073 * The parent field points to the parent of the GNode,
2074 * or is NULL if the GNode is the root of the tree.
2075 * The children field points to the first child of the
2076 * GNode. The other children are accessed by using the
2077 * next pointer of each child.
2079 public struct GNode
{}
2081 // glib-N-ary-Trees.html
2083 // glib-N-ary-Trees.html
2085 // glib-N-ary-Trees.html
2087 // glib-N-ary-Trees.html
2089 // glib-N-ary-Trees.html
2094 * The GData struct is an opaque data structure to represent a
2096 * It should only be accessed via the following functions.
2098 public struct GData
{}
2103 * The GRelation struct is an opaque data structure to represent a
2105 * It should only be accessed via the following functions.
2107 public struct GRelation
{}
2111 * The GTuples struct is used to return records (or tuples) from the
2112 * GRelation by g_relation_select().
2113 * It only contains one public member - the number of records that matched.
2114 * To access the matched records, you must use g_tuples_index().
2116 * the number of records that matched.
2118 public struct GTuples
2126 * The GCache struct is an opaque data structure containing information about
2127 * a GCache. It should only be accessed via the following functions.
2129 public struct GCache
{}
2135 * GAllocator is deprecated and should not be used in newly-written code.
2136 * The GAllocator struct contains private data. and
2137 * should only be accessed using the following functions.
2139 public struct GAllocator
{}
2143 * Checks the version of the GLib library.
2144 * Returns TRUE if the version of the GLib header files is the same
2145 * as or newer than the passed-in version.
2146 * Example1.Checking the version of the GLib library
2147 * if (!GLIB_CHECK_VERSION (1, 2, 0))
2148 * g_error ("GLib version 1.2.0 or above is needed");
2150 * the major version number.
2152 * the minor version number.
2154 * the micro version number.
2157 // #define GLIB_CHECK_VERSION(major,minor,micro)
2161 * g_main_new has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_new() instead.
2162 * Creates a new GMainLoop for the default main loop.
2164 * set to TRUE to indicate that the loop is running. This is not
2165 * very important since calling g_main_run() will set this to TRUE anyway.
2170 // #define g_main_new(is_running)
2174 * g_main_destroy has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_unref() instead.
2175 * Frees the memory allocated for the GMainLoop.
2180 // #define g_main_destroy(loop)
2184 * g_main_run has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_run() instead.
2185 * Runs a main loop until it stops running.
2190 // #define g_main_run(loop)
2194 * g_main_quit has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_loop_quit() instead.
2195 * Stops the GMainLoop. If g_main_run() was called to run the GMainLoop,
2196 * it will now return.
2201 // #define g_main_quit(loop)
2205 * g_main_is_running has been deprecated since version 2.2 and should not be used in newly-written code. USe g_main_loop_is_running() instead.
2206 * Checks if the main loop is running.
2210 * TRUE if the main loop is running.
2213 // #define g_main_is_running(loop)
2217 * g_main_iteration has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_iteration() instead.
2218 * Runs a single iteration for the default GMainContext.
2220 * set to TRUE if it should block (i.e. wait) until an event source
2221 * becomes ready. It will return after an event source has been processed.
2222 * If set to FALSE it will return immediately if no event source is ready to be
2225 * TRUE if more events are pending.
2228 // #define g_main_iteration(may_block)
2232 * g_main_pending has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_pending() instead.
2233 * Checks if any events are pending for the default GMainContext
2234 * (i.e. ready to be processed).
2236 * TRUE if any events are pending.
2239 // #define g_main_pending()
2243 * g_main_set_poll_func has been deprecated since version 2.2 and should not be used in newly-written code. Use g_main_context_set_poll_func() instead.
2244 * Sets the function to use for the handle polling of file descriptors
2245 * for the default main context.
2247 * the function to call to poll all file descriptors.
2250 // #define g_main_set_poll_func(func)
2253 * Allocates n_structs elements of type struct_type.
2254 * The returned pointer is cast to a pointer to the given type.
2255 * If n_structs is 0 it returns NULL.
2256 * Since the returned pointer is already casted to the right type,
2257 * it is normally unnecessary to cast it explicitly, and doing
2258 * so might hide memory allocation errors.
2260 * the type of the elements to allocate.
2262 * the number of elements to allocate.
2264 * a pointer to the allocated memory, cast to a pointer to struct_type.
2267 // #define g_new(struct_type, n_structs)
2270 * Allocates n_structs elements of type struct_type, initialized to 0's.
2271 * The returned pointer is cast to a pointer to the given type.
2272 * If n_structs is 0 it returns NULL.
2273 * Since the returned pointer is already casted to the right type,
2274 * it is normally unnecessary to cast it explicitly, and doing
2275 * so might hide memory allocation errors.
2277 * the type of the elements to allocate.
2279 * the number of elements to allocate.
2281 * a pointer to the allocated memory, cast to a pointer to struct_type.
2284 // #define g_new0(struct_type, n_structs)
2287 * Reallocates the memory pointed to by mem, so that it now has space for
2288 * n_structs elements of type struct_type. It returns the new address of
2289 * the memory, which may have been moved.
2291 * the type of the elements to allocate.
2293 * the currently allocated memory.
2295 * the number of elements to allocate.
2297 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2300 // #define g_renew(struct_type, mem, n_structs)
2303 * Attempts to allocate n_structs elements of type struct_type, and returns
2304 * NULL on failure. Contrast with g_new(), which aborts the program on failure.
2305 * The returned pointer is cast to a pointer to the given type.
2306 * If n_structs is 0 it returns NULL.
2308 * the type of the elements to allocate.
2310 * the number of elements to allocate.
2312 * a pointer to the allocated memory, cast to a pointer to struct_type.
2316 // #define g_try_new(struct_type, n_structs)
2319 * Attempts to allocate n_structs elements of type struct_type, initialized
2320 * to 0's, and returns NULL on failure. Contrast with g_new0(), which aborts
2321 * the program on failure.
2322 * The returned pointer is cast to a pointer to the given type.
2323 * If n_counts is 0 it returns NULL.
2325 * the type of the elements to allocate.
2327 * the number of elements to allocate.
2329 * a pointer to the allocated memory, cast to a pointer to struct_type.
2333 // #define g_try_new0(struct_type, n_structs)
2336 * Attempts to reallocate the memory pointed to by mem, so that it now has
2337 * space for n_structs elements of type struct_type, and returns NULL on
2338 * failure. Contrast with g_renew(), which aborts the program on failure.
2339 * It returns the new address of the memory, which may have been moved.
2341 * the type of the elements to allocate.
2343 * the currently allocated memory.
2345 * the number of elements to allocate.
2347 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2351 // #define g_try_renew(struct_type, mem, n_structs)
2354 * Allocates size bytes on the stack; these bytes will be freed when the current
2355 * stack frame is cleaned up. This macro essentially just wraps the
2356 * alloca() function present on most UNIX variants.
2357 * Thus it provides the same advantages and pitfalls as alloca():
2358 * + alloca() is very fast, as on most systems it's implemented by just adjusting
2359 * the stack pointer register.
2360 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
2361 * blocks just build up and are released together at function end.
2362 * - Allocation sizes have to fit into the current stack frame. For instance in a
2363 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
2364 * so be sparse with alloca() uses.
2365 * - Allocation failure due to insufficient stack space is not indicated with a NULL
2366 * return like e.g. with malloc(). Instead, most systems probably handle it the same
2367 * way as out of stack space situations from infinite function recursion, i.e.
2368 * with a segmentation fault.
2369 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
2370 * Stack space allocated with alloca() in the same scope as a variable sized array
2371 * will be freed together with the variable sized array upon exit of that scope, and
2372 * not upon exit of the enclosing function scope.
2374 * number of bytes to allocate.
2376 * space for size bytes, allocated on the stack
2379 // #define g_alloca(size)
2382 * Wraps g_alloca() in a more typesafe manner.
2384 * Type of memory chunks to be allocated
2386 * Number of chunks to be allocated
2388 * Pointer to stack space for n_structs chunks of type struct_type
2391 // #define g_newa(struct_type, n_structs)
2394 * Copies a block of memory len bytes long, from src to dest.
2395 * The source and destination areas may overlap.
2396 * In order to use this function, you must include
2397 * string.h yourself, because this macro will
2398 * typically simply resolve to memmove() and GLib does not include
2401 * the destination address to copy the bytes to.
2403 * the source address to copy the bytes from.
2405 * the number of bytes to copy.
2408 // #define g_memmove(dest,src,len)
2411 * Returns from the current function if the expression is not true.
2412 * If the expression evaluates to FALSE, a critical message is logged and
2413 * the function returns. This can only be used in functions which do not return
2416 * the expression to check.
2419 // #define g_return_if_fail(expr)
2422 * Returns from the current function, returning the value val, if the expression
2424 * If the expression evaluates to FALSE, a critical message is logged and
2427 * the expression to check.
2429 * the value to return from the current function if the expression is not
2433 // #define g_return_val_if_fail(expr,val)
2436 * Logs a critical message and returns from the current function.
2437 * This can only be used in functions which do not return a value.
2440 // #define g_return_if_reached()
2443 * Logs a critical message and returns val.
2445 * the value to return from the current function.
2448 // #define g_return_val_if_reached(val)
2451 * Debugging macro to terminate the application if the assertion fails.
2452 * If the assertion fails (i.e. the expression is not true), an error message
2453 * is logged and the application is terminated.
2454 * The macro can be turned off in final releases of code by defining
2455 * G_DISABLE_ASSERT when compiling the application.
2457 * the expression to check.
2460 // #define g_assert(expr)
2463 * Debugging macro to terminate the application if it is ever reached.
2464 * If it is reached, an error message is logged and the application is terminated.
2465 * The macro can be turned off in final releases of code by defining
2466 * G_DISABLE_ASSERT when compiling the application.
2469 // #define g_assert_not_reached()
2472 * Inserts a breakpoint instruction into the code (on x86 machines only).
2475 // #define G_BREAKPOINT()
2478 * A convenience function/macro to log a normal message.
2480 * format string, followed by parameters to insert into the format string (as with printf())
2483 // #define g_message(...)
2486 * A convenience function/macro to log a warning message.
2487 * You can make warnings fatal at runtime by setting the G_DEBUG environment
2488 * variable (see Running GLib Applications).
2490 * format string, followed by parameters to insert into the format string (as with printf())
2493 // #define g_warning(...)
2496 * Logs a "critical warning" (G_LOG_LEVEL_CRITICAL). It's more or less
2497 * application-defined what constitutes a critical vs. a regular
2498 * warning. You could call g_log_set_always_fatal() to make critical
2499 * warnings exit the program, then use g_critical() for fatal errors, for
2501 * You can also make critical warnings fatal at runtime by setting
2502 * the G_DEBUG environment variable (see
2503 * Running GLib Applications).
2505 * format string, followed by parameters to insert into the format string (as with printf())
2508 // #define g_critical(...)
2511 * A convenience function/macro to log an error message.
2512 * Error messages are always fatal, resulting in a call to
2513 * abort() to terminate the application.
2514 * This function will result in a core dump; don't use it for errors you
2515 * expect. Using this function indicates a bug in your program, i.e. an
2516 * assertion failure.
2518 * format string, followed by parameters to insert into the format string (as with printf())
2521 // #define g_error(...)
2524 * A convenience function/macro to log a debug message.
2526 * format string, followed by parameters to insert into the format string (as with printf())
2530 // #define g_debug(...)
2533 * Removes leading and trailing whitespace from a string. See g_strchomp() and
2536 * a string to remove the leading and trailing whitespace from.
2539 // #define g_strstrip( string )
2542 * Skips to the next character in a UTF-8 string. The string must be
2543 * valid; this macro is as fast as possible, and has no error-checking.
2544 * You would use this macro to iterate over a string character by
2545 * character. The macro returns the start of the next UTF-8 character.
2546 * Before using this macro, use g_utf8_validate() to validate strings
2547 * that may contain invalid UTF-8.
2549 * Pointer to the start of a valid UTF-8 character.
2552 // #define g_utf8_next_char(p)
2555 * Marks a string for translation, gets replaced with the translated string
2558 * the string to be translated
2562 // #define _(String)
2565 * Like _(), but applies g_strip_context() to the translation. This has the
2566 * advantage that the string can be adorned with a prefix to guarantee
2567 * uniqueness and provide context to the translator.
2568 * One use case given in the gettext manual is GUI translation, where one could
2569 * e.g. disambiguate two "Open" menu entries as "File|Open" and "Printer|Open".
2570 * Another use case is the string "Russian" which may have to be translated
2571 * differently depending on whether it's the name of a character set or a
2572 * language. This could be solved by using "charset|Russian" and
2573 * "language|Russian".
2575 * the string to be translated, with a '|'-separated prefix which
2576 * must not be translated
2580 // #define Q_(String)
2583 * Marks a string for translation, gets replaced with the untranslated string
2584 * at runtime. This is useful in situations where the translated strings can't
2585 * be directly used, e.g. in string array initializers.
2587 * static const char *messages[] = {
2588 * N_("some very meaningful message"),
2589 * N_("and another one")
2591 * const char *string;
2594 * = index > 1 ? _("a default message") : gettext (messages[index]);
2599 * the string to be translated
2603 // #define N_(String)
2606 * Returns a random gboolean from rand_. This corresponds to a unbiased
2611 * a random gboolean.
2614 // #define g_rand_boolean(rand_)
2617 * Returns a random gboolean. This corresponds to a unbiased coin toss.
2619 * a random gboolean.
2622 // #define g_random_boolean()
2626 * g_scanner_freeze_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.
2627 * There is no reason to use this macro, since it does nothing.
2632 // #define g_scanner_freeze_symbol_table(scanner)
2636 * g_scanner_thaw_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.
2637 * There is no reason to use this macro, since it does nothing.
2642 // #define g_scanner_thaw_symbol_table(scanner)
2646 * g_scanner_add_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_add_symbol() instead.
2647 * Adds a symbol to the default scope.
2651 * the symbol to add.
2653 * the value of the symbol.
2656 // #define g_scanner_add_symbol( scanner, symbol, value )
2660 * g_scanner_remove_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_remove_symbol() instead.
2661 * Removes a symbol from the default scope.
2665 * the symbol to remove.
2668 // #define g_scanner_remove_symbol( scanner, symbol )
2672 * g_scanner_foreach_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_foreach_symbol() instead.
2673 * Calls a function for each symbol in the default scope.
2677 * the function to call with each symbol.
2679 * data to pass to the function.
2682 // #define g_scanner_foreach_symbol( scanner, func, data )
2685 * Provided for UNIX emulation on Windows; see documentation for pipe()
2686 * in any UNIX manual.
2688 * file descriptors, the first one for reading, the second one for writing.
2691 // #define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
2694 * On Windows, this macro defines a DllMain() function
2695 * that stores the actual DLL name that the code being compiled will be
2697 * On non-Windows platforms, expands to nothing.
2699 * empty or "static".
2701 * the name of the (pointer to the) char array where the DLL name
2702 * will be stored. If this is used, you must also include
2703 * windows.h. If you need a more complex DLL entry
2704 * point function, you cannot use this.
2707 // #define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
2710 * On Windows, this macro defines an expression which evaluates to TRUE
2711 * if the code is running on a version of Windows where the wide
2712 * character versions of the Win32 API functions, and the wide chaacter
2713 * versions of the C library functions work. (They are always present in
2714 * the DLLs, but don't work on Windows 9x and Me.)
2715 * On non-Windows platforms, it is not defined.
2719 // #define G_WIN32_HAVE_WIDECHAR_API() TRUE
2722 * On Windows, this macro defines an expression which evaluates to TRUE
2723 * if the code is running on an NT-based Windows operating system.
2724 * On non-Windows platforms, it is not defined.
2728 // #define G_WIN32_IS_NT_BASED() TRUE
2731 * A convenience macro to allocate a block of memory from the slice allocator.
2732 * It calls g_slice_alloc() with sizeof (type) and casts the returned pointer
2733 * to a pointer of the given type, avoiding a type cast in the source code.
2734 * Note that the underlying slice allocation mechanism can
2735 * be changed with the G_SLICE=always-malloc
2736 * environment variable.
2738 * the type to allocate, typically a structure name
2740 * a pointer to the allocated block, cast to a pointer to type.
2744 // #define g_slice_new(type)
2747 * A convenience macro to allocate a block of memory from the slice allocator
2748 * and set the memory to 0. It calls g_slice_alloc0() with sizeof (type) and
2749 * casts the returned pointer to a pointer of the given type, avoiding a type
2750 * cast in the source code.
2751 * Note that the underlying slice allocation mechanism can
2752 * be changed with the G_SLICE=always-malloc
2753 * environment variable.
2755 * the type to allocate, typically a structure name
2757 * a pointer to the allocated block, cast to a pointer to type.
2761 // #define g_slice_new0(type)
2764 * A convenience macro to free a block of memory that has been allocated
2765 * from the slice allocator. It calls g_slice_free1() using
2766 * sizeof (type) as the block size.
2767 * Note that the exact release behaviour can be changed with the
2768 * G_DEBUG=gc-friendly environment variable,
2769 * also see G_SLICE for related debugging options.
2771 * the type of the block to free, typically a structure name
2773 * a pointer to the block to free
2777 // #define g_slice_free(type, mem)
2780 * Frees a linked list of memory blocks of structure type type.
2781 * The memory blocks must be equal-sized, allocated via
2782 * g_slice_alloc() or g_slice_alloc0() and linked together by a
2783 * next pointer (similar to GSList). The name of the
2784 * next field in type is passed as third argument.
2785 * Note that the exact release behaviour can be changed with the
2786 * G_DEBUG=gc-friendly environment variable,
2787 * also see G_SLICE for related debugging options.
2789 * the type of the mem_chain blocks
2791 * a pointer to the first block of the chain
2793 * the field name of the next pointer in type
2796 * [Bonwick94] Jeff Bonwick, The slab allocator: An object-caching kernel
2797 * memory allocator. USENIX 1994, and
2798 * [Bonwick01] Bonwick and Jonathan Adams, Magazines and vmem: Extending the
2799 * slab allocator to many cpu's and arbitrary resources. USENIX 2001
2802 // #define g_slice_free_chain(type, mem_chain, next)
2806 * g_mem_chunk_create has been deprecated since version 2.10 and should not be used in newly-written code. Use the slice
2808 * A convenience macro for creating a new GMemChunk.
2809 * It calls g_mem_chunk_new(), using the given type to create the GMemChunk
2810 * name. The atom size is determined using sizeof(), and the
2811 * area size is calculated by multiplying the pre_alloc parameter with
2814 * the type of the atoms, typically a structure name.
2816 * the number of atoms to store in each block of memory.
2818 * the type of the GMemChunk.
2819 * G_ALLOC_AND_FREE is used if the atoms will be freed individually.
2820 * G_ALLOC_ONLY should be used if atoms will never be freed individually.
2821 * G_ALLOC_ONLY is quicker, since it does not need to track free atoms,
2822 * but it obviously wastes memory if you no longer need many of the atoms.
2824 * the new GMemChunk.
2827 // #define g_mem_chunk_create(type, pre_alloc, alloc_type)
2831 * g_chunk_new has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new() instead
2832 * A convenience macro to allocate an atom of memory from a GMemChunk.
2833 * It calls g_mem_chunk_alloc() and casts the returned atom to a pointer to
2834 * the given type, avoiding a type cast in the source code.
2836 * the type of the GMemChunk atoms, typically a structure name.
2840 * a pointer to the allocated atom, cast to a pointer to type.
2843 // #define g_chunk_new(type, chunk)
2847 * g_chunk_new0 has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new0() instead
2848 * A convenience macro to allocate an atom of memory from a GMemChunk.
2849 * It calls g_mem_chunk_alloc0() and casts the returned atom to a pointer to
2850 * the given type, avoiding a type cast in the source code.
2852 * the type of the GMemChunk atoms, typically a structure name.
2856 * a pointer to the allocated atom, cast to a pointer to type.
2859 // #define g_chunk_new0(type, chunk)
2863 * g_chunk_free has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_free() instead
2864 * A convenience macro to free an atom of memory from a GMemChunk.
2865 * It simply switches the arguments and calls g_mem_chunk_free()
2866 * It is included simply to complement the other convenience macros, g_chunk_new()
2867 * and g_chunk_new0().
2869 * a pointer to the atom to be freed.
2874 // #define g_chunk_free(mem, mem_chunk)
2877 * A convenience macro to gets the previous element in a GList.
2879 * an element in a GList.
2881 * the previous element, or NULL if there are no previous elements.
2884 // #define g_list_previous(list)
2887 * A convenience macro to gets the next element in a GList.
2889 * an element in a GList.
2891 * the next element, or NULL if there are no more elements.
2894 // #define g_list_next(list)
2897 * A convenience macro to gets the next element in a GSList.
2899 * an element in a GSList.
2901 * the next element, or NULL if there are no more elements.
2904 // #define g_slist_next(slist)
2908 * g_hash_table_freeze is deprecated and should not be used in newly-written code.
2909 * This function is deprecated and will be removed in the next major
2910 * release of GLib. It does nothing.
2915 // #define g_hash_table_freeze(hash_table)
2919 * g_hash_table_thaw is deprecated and should not be used in newly-written code.
2920 * This function is deprecated and will be removed in the next major
2921 * release of GLib. It does nothing.
2926 // #define g_hash_table_thaw(hash_table)
2929 * Adds the value on to the end of the array.
2930 * The array will grow in size automatically if necessary.
2932 * g_array_append_val() is a macro which uses a reference to the value
2933 * parameter v. This means that you cannot use it with literal values
2934 * such as "27". You must use variables.
2938 * the value to append to the GArray.
2943 // #define g_array_append_val(a,v)
2946 * Adds the value on to the start of the array.
2947 * The array will grow in size automatically if necessary.
2948 * This operation is slower than g_array_append_val() since the existing elements
2949 * in the array have to be moved to make space for the new element.
2951 * g_array_prepend_val() is a macro which uses a reference to the value
2952 * parameter v. This means that you cannot use it with literal values
2953 * such as "27". You must use variables.
2957 * the value to prepend to the GArray.
2962 // #define g_array_prepend_val(a,v)
2965 * Inserts an element into an array at the given index.
2967 * g_array_insert_val() is a macro which uses a reference to the value
2968 * parameter v. This means that you cannot use it with literal values
2969 * such as "27". You must use variables.
2973 * the index to place the element at.
2975 * the value to insert into the array.
2980 // #define g_array_insert_val(a,i,v)
2983 * Returns the element of a GArray at the given index.
2984 * The return value is cast to the given type.
2985 * Example6.Getting a pointer to an element in a GArray
2986 * EDayViewEvent *event;
2987 * /+* This gets a pointer to the 3rd element in the array of EDayViewEvent
2989 * event = g_array_index (events, EDayViewEvent, 3);
2993 * the type of the elements.
2995 * the index of the element to return.
2997 * the element of the GArray at the index given by i.
3000 // #define g_array_index(a,t,i)
3003 * Returns the pointer at the given index of the pointer array.
3007 * the index of the pointer to return.
3009 * the pointer at the given index.
3012 // #define g_ptr_array_index(array,index_)
3015 * Inserts a GNode as the last child of the given parent.
3017 * the GNode to place the new GNode under.
3019 * the GNode to insert.
3021 * the inserted GNode.
3024 // #define g_node_append(parent, node)
3027 * Inserts a new GNode at the given position.
3029 * the GNode to place the new GNode under.
3031 * the position to place the new GNode at.
3032 * If position is -1, the new GNode is inserted as the last child of parent.
3034 * the data for the new GNode.
3039 // #define g_node_insert_data(parent, position, data)
3042 * Inserts a new GNode before the given sibling.
3044 * the GNode to place the new GNode under.
3046 * the sibling GNode to place the new GNode before.
3048 * the data for the new GNode.
3053 // #define g_node_insert_data_before(parent, sibling, data)
3056 * Inserts a new GNode as the last child of the given parent.
3058 * the GNode to place the new GNode under.
3060 * the data for the new GNode.
3065 // #define g_node_append_data(parent, data)
3068 * Inserts a new GNode as the first child of the given parent.
3070 * the GNode to place the new GNode under.
3072 * the data for the new GNode.
3077 // #define g_node_prepend_data(parent, data)
3080 * Gets the first child of a GNode.
3084 * the last child of node, or NULL if node is NULL or has no children.
3087 // #define g_node_first_child(node)
3090 * Gets the next sibling of a GNode.
3094 * the next sibling of node, or NULL if node is NULL.
3097 // #define g_node_next_sibling(node)
3100 * Gets the previous sibling of a GNode.
3104 * the previous sibling of node, or NULL if node is NULL.
3107 // #define g_node_prev_sibling(node)
3110 * Returns TRUE if a GNode is a leaf node.
3114 * TRUE if the GNode is a leaf node (i.e. it has no children).
3117 // #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
3120 * Returns TRUE if a GNode is the root of a tree.
3124 * TRUE if the GNode is the root of a tree (i.e. it has no parent
3128 // #define G_NODE_IS_ROOT(node)
3131 * Sets the data corresponding to the given GQuark id.
3132 * Any previous data with the same key is removed, and its
3133 * destroy function is called.
3137 * the GQuark to identify the data element.
3139 * the data element, or NULL to remove any previous element
3140 * corresponding to q.
3143 // #define g_datalist_id_set_data(dl, q, d)
3146 * Removes an element, using its GQuark identifier.
3150 * the GQuark identifying the data element.
3153 // #define g_datalist_id_remove_data(dl, q)
3156 * Sets the data element corresponding to the given string identifier.
3160 * the string to identify the data element.
3162 * the data element, or NULL to remove any previous element
3163 * corresponding to k.
3166 // #define g_datalist_set_data(dl, k, d)
3169 * Sets the data element corresponding to the given string identifier, and the
3170 * function to be called when the data element is removed.
3174 * the string to identify the data element.
3176 * the data element, or NULL to remove any previous element corresponding to
3179 * the function to call when the data element is removed. This
3180 * function will be called with the data element and can be used to free any
3181 * memory allocated for it. If d is NULL, then f must also be NULL.
3184 // #define g_datalist_set_data_full(dl, k, d, f)
3187 * Gets a data element, using its string identifer.
3188 * This is slower than g_datalist_id_get_data() because the string is first
3189 * converted to a GQuark.
3193 * the string identifying a data element.
3195 * the data element, or NULL if it is not found.
3198 // #define g_datalist_get_data(dl, k)
3201 * Removes an element using its string identifier.
3202 * The data element's destroy function is called if it has been set.
3206 * the string identifying the data element.
3209 // #define g_datalist_remove_data(dl, k)
3212 * Removes an element, without calling its destroy notifier.
3216 * the string identifying the data element.
3219 // #define g_datalist_remove_no_notify(dl, k)
3222 * Sets the data element associated with the given GQuark id.
3223 * Any previous data with the same key is removed, and its destroy function
3226 * the location identifying the dataset.
3228 * the GQuark id to identify the data element.
3233 // #define g_dataset_id_set_data(l, k, d)
3236 * Removes a data element from a dataset.
3237 * The data element's destroy function is called if it has been set.
3239 * the location identifying the dataset.
3241 * the GQuark id identifying the data element.
3244 // #define g_dataset_id_remove_data(l, k)
3247 * Sets the data corresponding to the given string identifier.
3249 * the location identifying the dataset.
3251 * the string to identify the data element.
3256 // #define g_dataset_set_data(l, k, d)
3259 * Sets the data corresponding to the given string identifier, and the function
3260 * to call when the data element is destroyed.
3262 * the location identifying the dataset.
3264 * the string to identify the data element.
3268 * the function to call when the data element is removed. This
3269 * function will be called with the data element and can be used to free any
3270 * memory allocated for it.
3273 // #define g_dataset_set_data_full(l, k, d, f)
3276 * Gets the data element corresponding to a string.
3278 * the location identifying the dataset.
3280 * the string identifying the data element.
3282 * the data element corresponding to the string, or NULL if it is not
3286 // #define g_dataset_get_data(l, k)
3289 * Removes a data element corresponding to a string.
3290 * Its destroy function is called if it has been set.
3292 * the location identifying the dataset.
3294 * the string identifying the data element.
3297 // #define g_dataset_remove_data(l, k)
3300 * Removes an element, without calling its destroy notifier.
3302 * the location identifying the dataset.
3304 * the string identifying the data element.
3307 // #define g_dataset_remove_no_notify(l, k)
3310 * Specifies the type of function passed to g_main_context_set_poll_func().
3311 * The semantics of the function should match those of the
3312 * poll() system call.
3314 * an array of GPollFD elements.
3316 * the number of elements in ufds.
3318 * the maximum time to wait for an event of the file descriptors.
3319 * A negative value indicates an infinite timeout.
3321 * the number of GPollFD elements which have events or errors reported,
3322 * or -1 if an error occurred.
3324 // gint (*GPollFunc) (GPollFD *ufds, guint nfsd, gint timeout_);
3325 public typedef extern(C
) int function (GPollFD
*, uint, int) GPollFunc
;
3328 * The type of functions to be called when a child exists.
3330 * the process id of the child process
3332 * Status information about the child process,
3333 * see waitpid(2) for more information about this field
3335 * user data passed to g_child_watch_add()
3337 // void (*GChildWatchFunc) (GPid pid, gint status, gpointer data);
3338 public typedef extern(C
) void function (GPid
, int, void*) GChildWatchFunc
;
3341 * This is just a placeholder for GClosureMarshal, which cannot be used here
3342 * for dependency reasons.
3344 // void (*GSourceDummyMarshal) (void);
3345 public typedef extern(C
) void function () GSourceDummyMarshal
;
3348 * Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(),
3349 * g_idle_add(), and g_idle_add_full().
3351 * data passed to the function, set when the source was created with one
3352 * of the above functions.
3354 * it should return FALSE if the source should be removed.
3356 // gboolean (*GSourceFunc) (gpointer data);
3357 public typedef extern(C
) int function (void*) GSourceFunc
;
3360 * Specifies the type of the module initialization function.
3361 * If a module contains a function named g_module_check_init() it is called
3362 * automatically when the module is loaded. It is passed the GModule structure
3363 * and should return NULL on success or a string describing the initialization
3366 * the GModule corresponding to the module which has just been loaded.
3368 * NULL on success, or a string describing the initialization error.
3370 // const gchar* (*GModuleCheckInit) (GModule *module);
3371 public typedef extern(C
) char* function (GModule
*) GModuleCheckInit
;
3374 * Specifies the type of the module function called when it is unloaded.
3375 * If a module contains a function named g_module_unload() it is called
3376 * automatically when the module is unloaded.
3377 * It is passed the GModule structure.
3379 * the GModule about to be unloaded.
3381 // void (*GModuleUnload) (GModule *module);
3382 public typedef extern(C
) void function (GModule
*) GModuleUnload
;
3385 * Specifies the type of function passed to g_io_add_watch() or
3386 * g_io_add_watch_full(), which is called when the requested condition on a
3387 * GIOChannel is satisfied.
3389 * the GIOChannel event source.
3391 * the condition which has been satisfied.
3393 * user data set in g_io_add_watch() or g_io_add_watch_full().
3395 * the function should return FALSE if the event source should be
3398 // gboolean (*GIOFunc) (GIOChannel *source, GIOCondition condition, gpointer data);
3399 public typedef extern(C
) int function (GIOChannel
*, GIOCondition
, void*) GIOFunc
;
3402 * Specifies the type of the print handler functions.
3403 * These are called with the complete formatted string to output.
3405 * the message to be output.
3407 // void (*GPrintFunc) (const gchar *string);
3408 public typedef extern(C
) void function (char[]) GPrintFunc
;
3411 * Specifies the prototype of log handler functions.
3413 * the log domain of the message.
3415 * the log level of the message (including the fatal and recursion
3418 * the message to process.
3420 * user data, set in g_log_set_handler().
3422 // void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
3423 public typedef extern(C
) void function (char[], GLogLevelFlags
, char[], void*) GLogFunc
;
3426 * Declares a type of function which takes no arguments and has no return value.
3427 * It is used to specify the type function passed to g_atexit().
3429 // void (*GVoidFunc) (void);
3430 public typedef extern(C
) void function () GVoidFunc
;
3433 * Declares a type of function which takes an arbitrary data pointer argument
3434 * and has no return value. It is not currently used in GLib or GTK+.
3438 // void (*GFreeFunc) (gpointer data);
3439 public typedef extern(C
) void function (void*) GFreeFunc
;
3442 * Specifies the type of the message handler function.
3448 * TRUE if the message signals an error, FALSE if it
3449 * signals a warning.
3451 // void (*GScannerMsgFunc) (GScanner *scanner, gchar *message, gboolean error);
3452 public typedef extern(C
) void function (GScanner
*, char[], int) GScannerMsgFunc
;
3455 * Specifies the type of the function passed to g_completion_new().
3456 * It should return the string corresponding to the given target item.
3457 * This is used when you use data structures as GCompletion items.
3459 * the completion item.
3461 * the string corresponding to the item.
3463 // gchar* (*GCompletionFunc) (gpointer );
3464 public typedef extern(C
) char* function (void*) GCompletionFunc
;
3467 * Specifies the type of the function passed to g_completion_set_compare().
3468 * This is used when you use strings as GCompletion items.
3470 * string to compare with s2.
3472 * string to compare with s1.
3474 * maximal number of bytes to compare.
3476 * an integer less than, equal to, or greater than zero if the
3477 * first n bytes of s1 is found, respectively, to be less than, to match,
3478 * or to be greater than the first n bytes of s2.
3480 // gint (*GCompletionStrncmpFunc) (const gchar *s1, const gchar *s2, gsize n);
3481 public typedef extern(C
) int function (char[], char[], uint) GCompletionStrncmpFunc
;
3484 * Specifies the type of the setup function passed to g_spawn_async(),
3485 * g_spawn_sync() and g_spawn_async_with_pipes(). On POSIX platforms it
3486 * is called in the child after GLib has performed all the setup it plans
3487 * to perform but before calling exec(). On POSIX
3488 * actions taken in this function will thus only affect the child, not
3490 * On Windows the function is called in the parent. Its usefulness on
3491 * Windows is thus questionable. In many cases executing the child setup
3492 * function in the parent can have ill effects, and you should be very
3493 * careful when porting software to Windows that uses child setup
3496 * user data to pass to the function.
3498 // void (*GSpawnChildSetupFunc) (gpointer user_data);
3499 public typedef extern(C
) void function (void*) GSpawnChildSetupFunc
;
3502 * The type of function to be passed as callback for G_OPTION_ARG_CALLBACK
3505 * The name of the option being parsed. This will be either a
3506 * single dash followed by a single letter (for a short name) or two dashes
3507 * followed by a long option name.
3509 * The value to be parsed.
3511 * User data added to the GOptionGroup containing the option when it
3512 * was created with g_option_group_new()
3514 * A return location for errors. The error code G_OPTION_ERROR_FAILED
3515 * is intended to be used for errors in GOptionArgFunc callbacks.
3517 * TRUE if the option was successfully parsed, FALSE if an error
3518 * occurred, in which case error should be set with g_set_error()
3520 // gboolean (*GOptionArgFunc) (const gchar *option_name, const gchar *value, gpointer data, GError **error);
3521 public typedef extern(C
) int function (char[], char[], void*, GError
**) GOptionArgFunc
;
3524 * The type of functions which are used to translate user-visible
3525 * strings, for --help output.
3527 * the untranslated string
3529 * user data specified when installing the function, e.g.
3530 * in g_option_group_set_translate_func()
3532 * a translation of the string for the current locale.
3533 * The returned string is owned by GLib and must not be freed.
3535 // const gchar* (*GTranslateFunc) (const gchar *str, gpointer data);
3536 public typedef extern(C
) char* function (char[], void*) GTranslateFunc
;
3539 * The type of function that can be called before and after parsing.
3541 * The active GOptionContext
3543 * The group to which the function belongs
3545 * User data added to the GOptionGroup containing the option when it
3546 * was created with g_option_group_new()
3548 * A return location for error details
3550 * TRUE if the function completed successfully, FALSE if an error
3551 * occurred, in which case error should be set with g_set_error()
3553 // gboolean (*GOptionParseFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3554 public typedef extern(C
) int function (GOptionContext
*, GOptionGroup
*, void*, GError
**) GOptionParseFunc
;
3557 * The type of function to be used as callback when a parse error occurs.
3559 * The active GOptionContext
3561 * The group to which the function belongs
3563 * User data added to the GOptionGroup containing the option when it
3564 * was created with g_option_group_new()
3566 * The GError containing details about the parse error
3568 // void (*GOptionErrorFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3569 public typedef extern(C
) void function (GOptionContext
*, GOptionGroup
*, void*, GError
**) GOptionErrorFunc
;
3572 * Specifies the type of a comparison function used to compare two
3573 * values. The function should return a negative integer if the first
3574 * value comes before the second, 0 if they are equal, or a positive
3575 * integer if the first value comes after the second.
3579 * a value to compare with.
3581 * negative value if a < b; zero if a = b; positive value
3584 // gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
3585 public typedef extern(C
) int function (void*, void*) GCompareFunc
;
3588 * Specifies the type of a comparison function used to compare two
3589 * values. The function should return a negative integer if the first
3590 * value comes before the second, 0 if they are equal, or a positive
3591 * integer if the first value comes after the second.
3595 * a value to compare with.
3597 * user data to pass to comparison function.
3599 * negative value if a < b; zero if a = b; positive value
3602 // gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
3603 public typedef extern(C
) int function (void*, void*, void*) GCompareDataFunc
;
3606 * Specifies the type of functions passed to g_list_foreach() and
3607 * g_slist_foreach().
3609 * the element's data.
3611 * user data passed to g_list_foreach() or g_slist_foreach().
3613 // void (*GFunc) (gpointer data, gpointer user_data);
3614 public typedef extern(C
) void function (void*, void*) GFunc
;
3617 * Specifies the type of the hash function which is passed to
3618 * g_hash_table_new() when a GHashTable is created.
3619 * The function is passed a key and should return a guint hash value.
3620 * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
3621 * hash functions which can be used when the key is a gpointer, gint, and
3622 * gchar* respectively.
3623 * FIXME: Need more here.
3624 * The hash values should be evenly distributed over a fairly large range?
3625 * The modulus is taken with the hash table size (a prime number)
3626 * to find the 'bucket' to place each key into.
3627 * The function should also be very fast, since it is called for each key
3632 * the hash value corresponding to the key.
3634 // guint (*GHashFunc) (gconstpointer key);
3635 public typedef extern(C
) uint function (void*) GHashFunc
;
3638 * Specifies the type of a function used to test two values for
3639 * equality. The function should return TRUE if both values are equal and
3644 * a value to compare with.
3646 * TRUE if a = b; FALSE otherwise.
3648 // gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b);
3649 public typedef extern(C
) int function (void*, void*) GEqualFunc
;
3652 * Specifies the type of the function passed to g_hash_table_foreach().
3653 * It is called with each key/value pair, together with the user_data parameter
3654 * which is passed to g_hash_table_foreach().
3658 * the value corresponding to the key.
3660 * user data passed to g_hash_table_foreach().
3662 // void (*GHFunc) (gpointer key, gpointer value, gpointer user_data);
3663 public typedef extern(C
) void function (void*, void*, void*) GHFunc
;
3666 * Specifies the type of the function passed to g_hash_table_foreach_remove().
3667 * It is called with each key/value pair, together with the user_data parameter
3668 * passed to g_hash_table_foreach_remove().
3669 * It should return TRUE if the key/value pair should be removed from the
3674 * the value associated with the key.
3676 * user data passed to g_hash_table_remove().
3678 * TRUE if the key/value pair should be removed from the GHashTable.
3680 // gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data);
3681 public typedef extern(C
) int function (void*, void*, void*) GHRFunc
;
3684 * Specifies the type of function passed to g_tree_traverse().
3685 * It is passed the key and value of each node, together with
3686 * the user_data parameter passed to g_tree_traverse().
3687 * If the function returns TRUE, the traversal is stopped.
3689 * a key of a GTree node.
3691 * the value corresponding to the key.
3693 * user data passed to g_tree_traverse().
3695 * TRUE to stop the traversal.
3697 // gboolean (*GTraverseFunc) (gpointer key, gpointer value, gpointer data);
3698 public typedef extern(C
) int function (void*, void*, void*) GTraverseFunc
;
3701 * A function of this signature is used to copy the node data when doing a deep-copy
3704 * A pointer to the data which should be copied.
3708 * A pointer to the copy.
3711 // gpointer (*GCopyFunc) (gconstpointer src, gpointer data);
3712 public typedef extern(C
) void* function (void*, void*) GCopyFunc
;
3715 * Specifies the type of function passed to g_node_traverse().
3716 * The function is called with each of the nodes visited, together with the
3717 * user data passed to g_node_traverse().
3718 * If the function returns TRUE, then the traversal is stopped.
3722 * user data passed to g_node_traverse().
3724 * TRUE to stop the traversal.
3726 // gboolean (*GNodeTraverseFunc) (GNode *node, gpointer data);
3727 public typedef extern(C
) int function (GNode
*, void*) GNodeTraverseFunc
;
3730 * Specifies the type of function passed to g_node_children_foreach().
3731 * The function is called with each child node, together with the user data
3732 * passed to g_node_children_foreach().
3736 * user data passed to g_node_children_foreach().
3738 // void (*GNodeForeachFunc) (GNode *node, gpointer data);
3739 public typedef extern(C
) void function (GNode
*, void*) GNodeForeachFunc
;
3742 * Specifies the type of function which is called when a data element is
3743 * destroyed. It is passed the pointer to the data element and should free
3744 * any memory and resources allocated for it.
3748 // void (*GDestroyNotify) (gpointer data);
3749 public typedef extern(C
) void function (void*) GDestroyNotify
;
3752 * Specifies the type of function passed to g_dataset_foreach().
3753 * It is called with each GQuark id and associated data element,
3754 * together with the user_data parameter supplied to g_dataset_foreach().
3756 * the GQuark id to identifying the data element.
3760 * user data passed to g_dataset_foreach().
3762 // void (*GDataForeachFunc) (GQuark key_id, gpointer data, gpointer user_data);
3763 public typedef extern(C
) void function (GQuark
, void*, void*) GDataForeachFunc
;
3766 * Specifies the type of the value_destroy_func and key_destroy_func functions
3767 * passed to g_cache_new().
3768 * The functions are passed a pointer to the GCache key or GCache value and
3769 * should free any memory and other resources associated with it.
3771 * the GCache value to destroy.
3773 // void (*GCacheDestroyFunc) (gpointer value);
3774 public typedef extern(C
) void function (void*) GCacheDestroyFunc
;
3777 * Specifies the type of the key_dup_func function passed to g_cache_new().
3778 * The function is passed a key (not a value as the prototype implies) and
3779 * should return a duplicate of the key.
3781 * the GCache key to destroy (not a GCache value as it seems).
3783 * a copy of the GCache key.
3785 // gpointer (*GCacheDupFunc) (gpointer value);
3786 public typedef extern(C
) void* function (void*) GCacheDupFunc
;
3789 * Specifies the type of the value_new_func function passed to g_cache_new().
3790 * It is passed a GCache key and should create the value corresponding to the
3795 * a new GCache value corresponding to the key.
3797 // gpointer (*GCacheNewFunc) (gpointer key);
3798 public typedef extern(C
) void* function (void*) GCacheNewFunc
;
3800 * A union holding the value of the token.
3802 public struct GTokenValue