2 * This file is part of duit.
4 * duit 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 * duit 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 duit; 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 glib
.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
1139 * The GSource struct is an opaque data type representing
1142 public struct GSource
{}
1146 * The GSourceFuncs struct contains a table of functions used to handle
1147 * event sources in a generic manner.
1149 * Called before all the file descriptors are polled.
1150 * If the source can determine that it is ready here (without waiting for the
1151 * results of the poll() call) it should return TRUE.
1152 * It can also return a timeout_ value which should be the maximum timeout
1153 * (in milliseconds) which should be passed to the poll() call.
1154 * The actual timeout used will be -1 if all sources returned -1, or it will
1155 * be the minimum of all the timeout_ values returned which were >= 0.
1157 * Called after all the file descriptors are polled.
1158 * The source should return TRUE if it is ready to be dispatched.
1159 * Note that some time may have passed since the previous prepare function was
1160 * called, so the source should be checked again here.
1162 * Called to dispatch the event source, after it has returned TRUE in
1163 * either its prepare or its check function. The dispatch function is
1164 * passed in a callback function and data. The callback function may be
1165 * NULL if the source was never connected to a callback using
1166 * g_source_set_callback(). The dispatch function should call the
1167 * callback function with user_data and whatever additional parameters are
1168 * needed for this type of event source.
1170 * Called when the source is finalized.
1171 * For idle sources, the prepare and check functions always return TRUE to
1172 * indicate that the source is always ready to be processed.
1173 * The prepare function also returns a timeout value of 0 to ensure that the
1174 * poll() call doesn't block (since that would be time
1175 * wasted which could have been spent running the idle function).
1176 * For timeout sources, the prepare and check functions both return TRUE if the
1177 * timeout interval has expired. The prepare function also returns a timeout
1178 * value to ensure that the poll() call doesn't block too
1179 * long and miss the next timeout.
1180 * For file descriptor sources, the prepare function typically returns FALSE,
1181 * since it must wait until poll() has been called before
1182 * it knows whether any events need to be processed. It sets the returned
1183 * timeout to -1 to indicate that it doesn't mind how long the
1184 * poll() call blocks.
1185 * In the check function, it tests the results of the poll()
1186 * call to see if the required condition has been met, and returns TRUE if so.
1188 public struct GSourceFuncs
{}
1189 // int (*prepare) (GSource *source,
1190 // glib-The-Main-Event-Loop.html
1192 // glib-The-Main-Event-Loop.html
1193 // int (*check) (GSource *source);
1194 // glib-The-Main-Event-Loop.html
1195 // int (*dispatch) (GSource *source,
1196 // glib-The-Main-Event-Loop.html
1197 // GSourceFunc callback,
1198 // glib-The-Main-Event-Loop.html
1200 // glib-The-Main-Event-Loop.html
1201 // void (*finalize) (GSource *source); /+* Can be NULL +/
1202 // glib-The-Main-Event-Loop.html
1203 // /+* For use by gSourceSetClosure +/
1204 // glib-The-Main-Event-Loop.html
1205 // GSourceFunc closureCallback;
1206 // glib-The-Main-Event-Loop.html
1207 // GSourceDummyMarshal closureMarshal; /+* Really is of type GClosureMarshal +/
1208 // glib-The-Main-Event-Loop.html
1212 * The GSourceCallbackFuncs struct contains
1213 * functions for managing callback objects.
1215 * Called when a reference is added to the callback object.
1217 * Called when a reference to the callback object is dropped.
1219 * Called to extract the callback function and data from the callback object.
1221 public struct GSourceCallbackFuncs
{}
1222 // void (*ref) (void* cbData);
1223 // glib-The-Main-Event-Loop.html
1224 // void (*unref) (void* cbData);
1225 // glib-The-Main-Event-Loop.html
1226 // void (*get) (void* cbData,
1227 // glib-The-Main-Event-Loop.html
1229 // glib-The-Main-Event-Loop.html
1230 // GSourceFunc *func,
1231 // glib-The-Main-Event-Loop.html
1233 // glib-The-Main-Event-Loop.html
1238 * The GThreadPool struct represents a thread pool. It has six public
1239 * read-only members, but the underlying struct is bigger, so you must not copy
1242 * the function to execute in the threads of this pool
1243 * gpointeruser_data;
1244 * the user data for the threads of this pool
1245 * gbooleanexclusive;
1246 * are all threads exclusive to this pool
1248 public struct GThreadPool
{}
1250 // glib-Thread-Pools.html
1252 // glib-Thread-Pools.html
1254 // glib-Thread-Pools.html
1259 * The GAsyncQueue struct is an opaque data structure, which represents
1260 * an asynchronous queue. It should only be accessed through the
1261 * g_async_queue_* functions.
1263 public struct GAsyncQueue
{}
1268 * The GModule struct is an opaque data structure to represent a
1269 * Dynamically-Loaded Module.
1270 * It should only be accessed via the following functions.
1272 public struct GModule
{}
1276 * A set of functions used to perform memory allocation. The same GMemVTable must
1277 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
1278 * if it exists, should be prior to any use of GLib.
1280 * function to use for allocating memory.
1282 * function to use for reallocating memory.
1284 * function to use to free memory.
1286 * function to use for allocating zero-filled memory.
1288 * function to use for allocating memory without a default error handler.
1290 * function to use for reallocating memory without a default error handler.
1292 public struct GMemVTable
{}
1293 // void* (*malloc) (uint nBytes);
1294 // glib-Memory-Allocation.html
1295 // void* (*realloc) (void* mem,
1296 // glib-Memory-Allocation.html
1298 // glib-Memory-Allocation.html
1299 // void (*free) (void* mem);
1300 // glib-Memory-Allocation.html
1301 // /+* optional; set to NULL if not used ! +/
1302 // glib-Memory-Allocation.html
1303 // void* (*calloc) (uint nBlocks,
1304 // glib-Memory-Allocation.html
1305 // uint nBlockBytes);
1306 // glib-Memory-Allocation.html
1307 // void* (*tryMalloc) (uint nBytes);
1308 // glib-Memory-Allocation.html
1309 // void* (*tryRealloc) (void* mem,
1310 // glib-Memory-Allocation.html
1312 // glib-Memory-Allocation.html
1317 * A data structure representing an IO Channel. The fields should be considered
1318 * private and should only be accessed with the following functions.
1320 public struct GIOChannel
{}
1324 * A table of functions used to handle different types of GIOChannel in a
1327 public struct GIOFuncs
{}
1328 // GIOStatus (*ioRead) (GIOChannel *channel,
1329 // glib-IO-Channels.html
1331 // glib-IO-Channels.html
1333 // glib-IO-Channels.html
1335 // glib-IO-Channels.html
1337 // glib-IO-Channels.html
1338 // GIOStatus (*ioWrite) (GIOChannel *channel,
1339 // glib-IO-Channels.html
1341 // glib-IO-Channels.html
1343 // glib-IO-Channels.html
1344 // uint *bytesWritten,
1345 // glib-IO-Channels.html
1347 // glib-IO-Channels.html
1348 // GIOStatus (*ioSeek) (GIOChannel *channel,
1349 // glib-IO-Channels.html
1351 // glib-IO-Channels.html
1353 // glib-IO-Channels.html
1355 // glib-IO-Channels.html
1356 // GIOStatus (*ioClose) (GIOChannel *channel,
1357 // glib-IO-Channels.html
1359 // glib-IO-Channels.html
1360 // GSource* (*ioCreateWatch) (GIOChannel *channel,
1361 // glib-IO-Channels.html
1362 // GIOCondition condition);
1363 // glib-IO-Channels.html
1364 // void (*ioFree) (GIOChannel *channel);
1365 // glib-IO-Channels.html
1366 // GIOStatus (*ioSetFlags) (GIOChannel *channel,
1367 // glib-IO-Channels.html
1369 // glib-IO-Channels.html
1371 // glib-IO-Channels.html
1372 // GIOFlags (*ioGetFlags) (GIOChannel *channel);
1373 // glib-IO-Channels.html
1378 * The GError structure contains
1379 * information about an error that has occurred.
1381 * error domain, e.g. G_FILE_ERROR.
1383 * error code, e.g. G_FILE_ERROR_NOENT.
1385 * human-readable informative error message.
1387 public struct GError
1396 * The GIConv struct wraps an
1397 * iconv() conversion descriptor. It contains private data
1398 * and should only be accessed using the following functions.
1400 public struct GIConv
{}
1404 * Represents a precise time, with seconds and microseconds.
1405 * Similar to the struct timeval returned by
1406 * the gettimeofday() UNIX call.
1412 public struct GTimeVal
1421 * Represents a day between January 1, Year 1 and a few thousand years in
1422 * the future. None of its members should be accessed directly. If the
1423 * GDate is obtained from g_date_new(), it will
1424 * be safe to mutate but invalid and thus not safe for calendrical computations.
1425 * If it's declared on the stack, it will contain garbage so must be
1426 * initialized with g_date_clear(). g_date_clear() makes the date invalid
1427 * but sane. An invalid date doesn't represent a day, it's "empty." A
1428 * date becomes valid after you set it to a Julian day or you set a day,
1430 * guintjulian_days:32;
1431 * the Julian representation of the date
1433 * this bit is set if julian_days is valid
1435 * this is set if day, month and year are valid
1437 * the day of the day-month-year representation of the date, as
1439 public struct GDate
{}
1440 // uint julianDays : 32; /+* julian days representation - we use a
1441 // glib-Date-and-Time-Functions.html
1442 // * bitfield hoping that 64 bit platforms
1443 // glib-Date-and-Time-Functions.html
1444 // * will pack this whole struct inn one big
1445 // glib-Date-and-Time-Functions.html
1447 // glib-Date-and-Time-Functions.html
1449 // glib-Date-and-Time-Functions.html
1450 // uint julian : 1; /+* julian is valid +/
1451 // glib-Date-and-Time-Functions.html
1452 // uint dmy : 1; /+* dmy is valid +/
1453 // glib-Date-and-Time-Functions.html
1454 // /+* DMY representation +/
1455 // glib-Date-and-Time-Functions.html
1457 // glib-Date-and-Time-Functions.html
1459 // glib-Date-and-Time-Functions.html
1461 // glib-Date-and-Time-Functions.html
1466 * The GRand struct is an opaque data structure. It should only be
1467 * accessed through the g_rand_* functions.
1469 public struct GRand
{}
1473 * Associates a string with a bit flag.
1474 * Used in g_parse_debug_string().
1480 public struct GDebugKey
1489 * The data structure representing a lexical scanner.
1490 * You should set input_name after creating
1491 * the scanner, since it is used by the default message handler when
1492 * displaying warnings and errors. If you are scanning a file, the file
1493 * name would be a good choice.
1495 * max_parse_errors fields are not used.
1496 * If you need to associate extra data with the scanner you can place them here.
1497 * If you want to use your own message handler you can set the
1498 * msg_handler field. The type of the message
1499 * handler function is declared by GScannerMsgFunc.
1501 public struct GScanner
{}
1502 // /+* unused fields +/
1503 // glib-Lexical-Scanner.html
1505 // glib-Lexical-Scanner.html
1506 // uint maxParseErrors;
1507 // glib-Lexical-Scanner.html
1508 // /+* _Error() increments this field +/
1509 // glib-Lexical-Scanner.html
1510 // uint parseErrors;
1511 // glib-Lexical-Scanner.html
1512 // /+* name of input stream, featured by the defaulx message handler +/
1513 // glib-Lexical-Scanner.html
1515 // glib-Lexical-Scanner.html
1516 // /+* quarked data +/
1517 // glib-Lexical-Scanner.html
1519 // glib-Lexical-Scanner.html
1520 // /+* link into the scanner configuration +/
1521 // glib-Lexical-Scanner.html
1522 // GScannerConfig *config;
1523 // glib-Lexical-Scanner.html
1524 // /+* fields filled inn after _GetNextToken() +/
1525 // glib-Lexical-Scanner.html
1526 // GTokenType token;
1527 // glib-Lexical-Scanner.html
1528 // GTokenValue value;
1529 // glib-Lexical-Scanner.html
1531 // glib-Lexical-Scanner.html
1533 // glib-Lexical-Scanner.html
1534 // /+* fields filled inn after _PeekNextToken() +/
1535 // glib-Lexical-Scanner.html
1536 // GTokenType nextToken;
1537 // glib-Lexical-Scanner.html
1538 // GTokenValue nextValue;
1539 // glib-Lexical-Scanner.html
1541 // glib-Lexical-Scanner.html
1542 // uint nextPosition;
1543 // glib-Lexical-Scanner.html
1544 // /+* to be considered private +/
1545 // glib-Lexical-Scanner.html
1546 // GHashTable *symbolTable;
1547 // glib-Lexical-Scanner.html
1549 // glib-Lexical-Scanner.html
1551 // glib-Lexical-Scanner.html
1553 // glib-Lexical-Scanner.html
1555 // glib-Lexical-Scanner.html
1557 // glib-Lexical-Scanner.html
1558 // /+* handler funct for _Warn and _Error +/
1559 // glib-Lexical-Scanner.html
1560 // GScannerMsgFunc msgHandler;
1561 // glib-Lexical-Scanner.html
1565 * Specifies the GScanner settings.
1566 * cset_skip_characters specifies which characters
1567 * should be skipped by the scanner (the default is the whitespace characters:
1568 * space, tab, carriage-return and line-feed).
1569 * cset_identifier_first specifies the characters
1570 * which can start identifiers (the default is G_CSET_a_2_z, "_", and
1572 * cset_identifier_nth specifies the characters
1573 * which can be used in identifiers, after the first character (the default
1574 * is G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS,
1576 * cpair_comment_single specifies the characters
1577 * at the start and end of single-line comments. The default is "#\n" which
1578 * means that single-line comments start with a '#' and continue until a '\n'
1580 * case_sensitive specifies if symbols are
1581 * case sensitive (the default is FALSE).
1582 * skip_comment_multi specifies if multi-line
1583 * comments are skipped and not returned as tokens (the default is TRUE).
1584 * skip_comment_single specifies if single-line
1585 * comments are skipped and not returned as tokens (the default is TRUE).
1586 * scan_comment_multi specifies if multi-line
1587 * comments are recognized (the default is TRUE).
1588 * scan_identifier specifies if identifiers
1589 * are recognized (the default is TRUE).
1590 * scan_identifier_1char specifies if single-character
1591 * identifiers are recognized (the default is FALSE).
1592 * scan_identifier_NULL specifies if
1593 * NULL is reported as G_TOKEN_IDENTIFIER_NULL.
1594 * (the default is FALSE).
1595 * scan_symbols specifies if symbols are
1596 * recognized (the default is TRUE).
1597 * scan_binary specifies if binary numbers
1598 * are recognized (the default is FALSE).
1599 * scan_octal specifies if octal numbers
1600 * are recognized (the default is TRUE).
1601 * scan_float specifies if floating point numbers
1602 * are recognized (the default is TRUE).
1603 * scan_hex specifies if hexadecimal numbers
1604 * are recognized (the default is TRUE).
1605 * scan_hex_dollar specifies if '$' is recognized
1606 * as a prefix for hexadecimal numbers (the default is FALSE).
1607 * scan_string_sq specifies if strings can be
1608 * enclosed in single quotes (the default is TRUE).
1609 * scan_string_dq specifies if strings can be
1610 * enclosed in double quotes (the default is TRUE).
1611 * numbers_2_int specifies if binary, octal and
1612 * hexadecimal numbers are reported as G_TOKEN_INT (the default is TRUE).
1613 * int_2_float specifies if all numbers are
1614 * reported as G_TOKEN_FLOAT (the default is FALSE).
1615 * identifier_2_string specifies if identifiers
1616 * are reported as strings (the default is FALSE).
1617 * char_2_token specifies if characters
1618 * are reported by setting token = ch or as G_TOKEN_CHAR
1619 * (the default is TRUE).
1620 * symbol_2_token specifies if symbols
1621 * are reported by setting token = v_symbol or as
1622 * G_TOKEN_SYMBOL (the default is FALSE).
1623 * scope_0_fallback specifies if a symbol
1624 * is searched for in the default scope in addition to the current scope
1625 * (the default is FALSE).
1627 public struct GScannerConfig
{}
1628 // /+* Character sets
1629 // glib-Lexical-Scanner.html
1631 // glib-Lexical-Scanner.html
1632 // char *csetSkipCharacters; /+* default: " \t\n" +/
1633 // glib-Lexical-Scanner.html
1634 // char *csetIdentifierFirst;
1635 // glib-Lexical-Scanner.html
1636 // char *csetIdentifierNth;
1637 // glib-Lexical-Scanner.html
1638 // char *cpairCommentSingle; /+* default: "#\n" +/
1639 // glib-Lexical-Scanner.html
1640 // /+* Should symbol lookup work case sensitive?
1641 // glib-Lexical-Scanner.html
1643 // glib-Lexical-Scanner.html
1644 // uint caseSensitive : 1;
1645 // glib-Lexical-Scanner.html
1646 // /+* Boolean values to be adjusted "on the fly"
1647 // glib-Lexical-Scanner.html
1648 // * to configure scanning behaviour.
1649 // glib-Lexical-Scanner.html
1651 // glib-Lexical-Scanner.html
1652 // uint skipCommentMulti : 1; /+* C like comment +/
1653 // glib-Lexical-Scanner.html
1654 // uint skipCommentSingle : 1; /+* single line comment +/
1655 // glib-Lexical-Scanner.html
1656 // uint scanCommentMulti : 1; /+* scan multi line comments? +/
1657 // glib-Lexical-Scanner.html
1658 // uint scanIdentifier : 1;
1659 // glib-Lexical-Scanner.html
1660 // uint scanIdentifier1char : 1;
1661 // glib-Lexical-Scanner.html
1662 // uint scanIdentifierNULL : 1;
1663 // glib-Lexical-Scanner.html
1664 // uint scanSymbols : 1;
1665 // glib-Lexical-Scanner.html
1666 // uint scanBinary : 1;
1667 // glib-Lexical-Scanner.html
1668 // uint scanOctal : 1;
1669 // glib-Lexical-Scanner.html
1670 // uint scanFloat : 1;
1671 // glib-Lexical-Scanner.html
1672 // uint scanHex : 1; /+* `0x0ff0' +/
1673 // glib-Lexical-Scanner.html
1674 // uint scanHexDollar : 1; /+* `$0ff0' +/
1675 // glib-Lexical-Scanner.html
1676 // uint scanStringSq : 1; /+* string: 'anything' +/
1677 // glib-Lexical-Scanner.html
1678 // uint scanStringDq : 1; /+* string: "\\-escapes!\n" +/
1679 // glib-Lexical-Scanner.html
1680 // uint numbers2_Int : 1; /+* bin, octal, hex => int +/
1681 // glib-Lexical-Scanner.html
1682 // uint int2_Float : 1; /+* int => G_TOKEN_FLOAT? +/
1683 // glib-Lexical-Scanner.html
1684 // uint identifier2_String : 1;
1685 // glib-Lexical-Scanner.html
1686 // uint char2_Token : 1; /+* return G_TOKEN_CHAR? +/
1687 // glib-Lexical-Scanner.html
1688 // uint symbol2_Token : 1;
1689 // glib-Lexical-Scanner.html
1690 // uint scope0_Fallback : 1; /+* try scope 0 on lookups? +/
1691 // glib-Lexical-Scanner.html
1692 // uint storeInt64 : 1; /+* use value.vInt64 rather than vInt +/
1693 // glib-Lexical-Scanner.html
1694 // uint paddingDummy;
1695 // glib-Lexical-Scanner.html
1700 * The data structure used for automatic completion.
1702 * list of target items (strings or data structures).
1703 * GCompletionFuncfunc;
1704 * function which is called to get the string associated with a target
1706 public struct GCompletion
{}
1708 // glib-Automatic-String-Completion.html
1709 // GCompletionFunc func;
1710 // glib-Automatic-String-Completion.html
1712 // glib-Automatic-String-Completion.html
1714 // glib-Automatic-String-Completion.html
1715 // GCompletionStrncmpFunc strncmpFunc;
1716 // glib-Automatic-String-Completion.html
1721 * Opaque datatype that records a start time.
1723 public struct GTimer
{}
1727 * An opaque structure representing an opened directory.
1729 public struct GDir
{}
1733 * The GMappedFile represents a file mapping created with
1734 * g_mapped_file_new(). It has only private members and should
1735 * not be accessed directly.
1737 public struct GMappedFile
{}
1742 * A GOptionContext struct defines which options
1743 * are accepted by the commandline option parser. The struct has only private
1744 * fields and should not be directly accessed.
1746 public struct GOptionContext
{}
1750 * A GOptionEntry defines a single option.
1751 * To have an effect, they must be added to a GOptionGroup with
1752 * g_option_context_add_main_entries() or g_option_group_add_entries().
1753 * constgchar*long_name;
1754 * The long name of an option can be used to specify it
1756 public struct GOptionEntry
{}
1758 // glib-Commandline-option-parser.html
1760 // glib-Commandline-option-parser.html
1762 // glib-Commandline-option-parser.html
1764 // glib-Commandline-option-parser.html
1766 // glib-Commandline-option-parser.html
1767 // char *description;
1768 // glib-Commandline-option-parser.html
1769 // char *argDescription;
1770 // glib-Commandline-option-parser.html
1774 * A GOptionGroup struct defines the options in a single
1775 * group. The struct has only private fields and should not be directly accessed.
1776 * All options in a group share the same translation function. Libaries which
1777 * need to parse commandline options are expected to provide a function for
1778 * getting a GOptionGroup holding their options, which
1779 * the application can then add to its GOptionContext.
1781 public struct GOptionGroup
{}
1786 * A GPatternSpec is the 'compiled' form of a pattern.
1787 * This structure is opaque and its fields cannot be accessed directly.
1789 public struct GPatternSpec
{}
1794 * A parse context is used to parse a stream of bytes that you expect to
1795 * contain marked-up text. See g_markup_parse_context_new(),
1796 * GMarkupParser, and so on for more details.
1798 public struct GMarkupParseContext
{}
1802 * Any of the fields in GMarkupParser can be NULL, in which case they
1803 * will be ignored. Except for the error function, any of these
1804 * callbacks can set an error; in particular the
1805 * G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
1806 * and G_MARKUP_ERROR_INVALID_CONTENT errors are intended to be set
1807 * from these callbacks. If you set an error from a callback,
1808 * g_markup_parse_context_parse() will report that error back to its caller.
1810 * Callback to invoke when the opening tag of an element
1812 public struct GMarkupParser
{}
1813 // /+* Called for open tags <foo bar="baz"> +/
1814 // glib-Simple-XML-Subset-Parser.html
1815 // void (*startElement) (GMarkupParseContext *context,
1816 // glib-Simple-XML-Subset-Parser.html
1817 // char *elementName,
1818 // glib-Simple-XML-Subset-Parser.html
1819 // char **attributeNames,
1820 // glib-Simple-XML-Subset-Parser.html
1821 // char **attributeValues,
1822 // glib-Simple-XML-Subset-Parser.html
1824 // glib-Simple-XML-Subset-Parser.html
1826 // glib-Simple-XML-Subset-Parser.html
1827 // /+* Called for close tags </foo> +/
1828 // glib-Simple-XML-Subset-Parser.html
1829 // void (*endElement) (GMarkupParseContext *context,
1830 // glib-Simple-XML-Subset-Parser.html
1831 // char *elementName,
1832 // glib-Simple-XML-Subset-Parser.html
1834 // glib-Simple-XML-Subset-Parser.html
1836 // glib-Simple-XML-Subset-Parser.html
1837 // /+* Called for character data +/
1838 // glib-Simple-XML-Subset-Parser.html
1839 // /+* text is not nul-terminated +/
1840 // glib-Simple-XML-Subset-Parser.html
1841 // void (*text) (GMarkupParseContext *context,
1842 // glib-Simple-XML-Subset-Parser.html
1844 // glib-Simple-XML-Subset-Parser.html
1846 // glib-Simple-XML-Subset-Parser.html
1848 // glib-Simple-XML-Subset-Parser.html
1850 // glib-Simple-XML-Subset-Parser.html
1851 // /+* Called for strings that should be re-saved verbatim inn this same
1852 // glib-Simple-XML-Subset-Parser.html
1853 // * position, but are not otherwise interpretable. At the moment
1854 // glib-Simple-XML-Subset-Parser.html
1855 // * this includes comments and processing instructions.
1856 // glib-Simple-XML-Subset-Parser.html
1858 // glib-Simple-XML-Subset-Parser.html
1859 // /+* text is not nul-terminated. +/
1860 // glib-Simple-XML-Subset-Parser.html
1861 // void (*passthrough) (GMarkupParseContext *context,
1862 // glib-Simple-XML-Subset-Parser.html
1863 // char *passthroughText,
1864 // glib-Simple-XML-Subset-Parser.html
1866 // glib-Simple-XML-Subset-Parser.html
1868 // glib-Simple-XML-Subset-Parser.html
1870 // glib-Simple-XML-Subset-Parser.html
1871 // /+* Called on error, including one set by other
1872 // glib-Simple-XML-Subset-Parser.html
1873 // * methods inn the vtable. The GError should not be freed.
1874 // glib-Simple-XML-Subset-Parser.html
1876 // glib-Simple-XML-Subset-Parser.html
1877 // void (*error) (GMarkupParseContext *context,
1878 // glib-Simple-XML-Subset-Parser.html
1880 // glib-Simple-XML-Subset-Parser.html
1882 // glib-Simple-XML-Subset-Parser.html
1887 * The GKeyFile struct contains only private fields
1888 * and should not be used directly.
1890 public struct GKeyFile
{}
1896 * GMemChunk is deprecated and should not be used in newly-written code.
1897 * The GMemChunk struct is an opaque data structure representing a memory
1898 * chunk. It should be accessed only through the use of the following functions.
1900 public struct GMemChunk
{}
1905 * The GList struct is used for each element in a doubly-linked list.
1907 * holds the element's data, which can be a pointer to any kind of data,
1909 public struct GList
{}
1911 // glib-Doubly-Linked-Lists.html
1913 // glib-Doubly-Linked-Lists.html
1915 // glib-Doubly-Linked-Lists.html
1920 * The GSList struct is used for each element in the singly-linked list.
1922 * holds the element's data, which can be a pointer to any kind of data,
1924 public struct GSList
{}
1926 // glib-Singly-Linked-Lists.html
1928 // glib-Singly-Linked-Lists.html
1933 * Contains the public fields of a Queue.
1935 * a pointer to the first element of the queue.
1937 * a pointer to the last element of the queue.
1939 * the number of elements in the queue.
1941 public struct GQueue
{}
1943 // glib-Double-ended-Queues.html
1945 // glib-Double-ended-Queues.html
1947 // glib-Double-ended-Queues.html
1952 * Each piece of memory that is pushed onto the stack
1953 * is cast to a GTrashStack*.
1955 * pointer to the previous element of the stack,
1956 * gets stored in the first sizeof (gpointer)
1957 * bytes of the element.
1959 public struct GTrashStack
{}
1960 // GTrashStack *next;
1961 // glib-Trash-Stacks.html
1966 * The GHashTable struct is an opaque data structure to represent a
1968 * It should only be accessed via the following functions.
1970 public struct GHashTable
{}
1975 * The GString struct contains the public fields of a GString.
1976 * The str field points to the character data.
1977 * It may move as text is added.
1978 * The len field contains the length of the string,
1979 * not including the terminating nul byte.
1980 * The str field is nul-terminated and so can be used as an ordinary C
1981 * string. But it may be moved when text is appended or inserted into the
1984 public struct GString
1994 * An opaque data structure representing String Chunks.
1995 * It should only be accessed by using the following functions.
1997 public struct GStringChunk
{}
2002 * Contains the public fields of an Array.
2004 * a pointer to the element data. The data may be moved as elements are
2005 * added to the GArray.
2007 * the number of elements in the GArray.
2009 public struct GArray
2018 * Contains the public fields of a pointer array.
2020 * points to the array of pointers, which may be moved when the array grows.
2022 * number of pointers in the array.
2024 public struct GPtrArray
2033 * The GByteArray struct allows access to the public fields of a GByteArray.
2035 * a pointer to the element data. The data may be moved as elements are
2036 * added to the GByteArray.
2038 * the number of elements in the GByteArray.
2040 public struct GByteArray
2049 * The GTree struct is an opaque data structure representing a
2050 * Balanced Binary Tree.
2051 * It should be accessed only by using the following functions.
2053 public struct GTree
{}
2058 * The GNode struct represents one node in a
2060 * The data field contains the actual data of the node.
2062 * fields point to the node's siblings (a sibling is another GNode with the
2064 * The parent field points to the parent of the GNode,
2065 * or is NULL if the GNode is the root of the tree.
2066 * The children field points to the first child of the
2067 * GNode. The other children are accessed by using the
2068 * next pointer of each child.
2070 public struct GNode
{}
2072 // glib-N-ary-Trees.html
2074 // glib-N-ary-Trees.html
2076 // glib-N-ary-Trees.html
2078 // glib-N-ary-Trees.html
2080 // glib-N-ary-Trees.html
2085 * The GData struct is an opaque data structure to represent a
2087 * It should only be accessed via the following functions.
2089 public struct GData
{}
2094 * The GRelation struct is an opaque data structure to represent a
2096 * It should only be accessed via the following functions.
2098 public struct GRelation
{}
2102 * The GTuples struct is used to return records (or tuples) from the
2103 * GRelation by g_relation_select().
2104 * It only contains one public member - the number of records that matched.
2105 * To access the matched records, you must use g_tuples_index().
2107 * the number of records that matched.
2109 public struct GTuples
2117 * The GCache struct is an opaque data structure containing information about
2118 * a GCache. It should only be accessed via the following functions.
2120 public struct GCache
{}
2126 * GAllocator is deprecated and should not be used in newly-written code.
2127 * The GAllocator struct contains private data. and
2128 * should only be accessed using the following functions.
2130 public struct GAllocator
{}
2134 * Checks the version of the GLib library.
2135 * Returns TRUE if the version of the GLib header files is the same
2136 * as or newer than the passed-in version.
2137 * Example1.Checking the version of the GLib library
2138 * if (!GLIB_CHECK_VERSION (1, 2, 0))
2139 * g_error ("GLib version 1.2.0 or above is needed");
2141 * the major version number.
2143 * the minor version number.
2145 * the micro version number.
2148 // #define GLIB_CHECK_VERSION(major,minor,micro)
2152 * 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.
2153 * Creates a new GMainLoop for the default main loop.
2155 * set to TRUE to indicate that the loop is running. This is not
2156 * very important since calling g_main_run() will set this to TRUE anyway.
2161 // #define g_main_new(is_running)
2165 * 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.
2166 * Frees the memory allocated for the GMainLoop.
2171 // #define g_main_destroy(loop)
2175 * 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.
2176 * Runs a main loop until it stops running.
2181 // #define g_main_run(loop)
2185 * 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.
2186 * Stops the GMainLoop. If g_main_run() was called to run the GMainLoop,
2187 * it will now return.
2192 // #define g_main_quit(loop)
2196 * 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.
2197 * Checks if the main loop is running.
2201 * TRUE if the main loop is running.
2204 // #define g_main_is_running(loop)
2208 * 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.
2209 * Runs a single iteration for the default GMainContext.
2211 * set to TRUE if it should block (i.e. wait) until an event source
2212 * becomes ready. It will return after an event source has been processed.
2213 * If set to FALSE it will return immediately if no event source is ready to be
2216 * TRUE if more events are pending.
2219 // #define g_main_iteration(may_block)
2223 * 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.
2224 * Checks if any events are pending for the default GMainContext
2225 * (i.e. ready to be processed).
2227 * TRUE if any events are pending.
2230 // #define g_main_pending()
2234 * 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.
2235 * Sets the function to use for the handle polling of file descriptors
2236 * for the default main context.
2238 * the function to call to poll all file descriptors.
2241 // #define g_main_set_poll_func(func)
2244 * Allocates n_structs elements of type struct_type.
2245 * The returned pointer is cast to a pointer to the given type.
2246 * If n_structs is 0 it returns NULL.
2247 * Since the returned pointer is already casted to the right type,
2248 * it is normally unnecessary to cast it explicitly, and doing
2249 * so might hide memory allocation errors.
2251 * the type of the elements to allocate.
2253 * the number of elements to allocate.
2255 * a pointer to the allocated memory, cast to a pointer to struct_type.
2258 // #define g_new(struct_type, n_structs)
2261 * Allocates n_structs elements of type struct_type, initialized to 0's.
2262 * The returned pointer is cast to a pointer to the given type.
2263 * If n_structs is 0 it returns NULL.
2264 * Since the returned pointer is already casted to the right type,
2265 * it is normally unnecessary to cast it explicitly, and doing
2266 * so might hide memory allocation errors.
2268 * the type of the elements to allocate.
2270 * the number of elements to allocate.
2272 * a pointer to the allocated memory, cast to a pointer to struct_type.
2275 // #define g_new0(struct_type, n_structs)
2278 * Reallocates the memory pointed to by mem, so that it now has space for
2279 * n_structs elements of type struct_type. It returns the new address of
2280 * the memory, which may have been moved.
2282 * the type of the elements to allocate.
2284 * the currently allocated memory.
2286 * the number of elements to allocate.
2288 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2291 // #define g_renew(struct_type, mem, n_structs)
2294 * Attempts to allocate n_structs elements of type struct_type, and returns
2295 * NULL on failure. Contrast with g_new(), which aborts the program on failure.
2296 * The returned pointer is cast to a pointer to the given type.
2297 * If n_structs is 0 it returns NULL.
2299 * the type of the elements to allocate.
2301 * the number of elements to allocate.
2303 * a pointer to the allocated memory, cast to a pointer to struct_type.
2307 // #define g_try_new(struct_type, n_structs)
2310 * Attempts to allocate n_structs elements of type struct_type, initialized
2311 * to 0's, and returns NULL on failure. Contrast with g_new0(), which aborts
2312 * the program on failure.
2313 * The returned pointer is cast to a pointer to the given type.
2314 * If n_counts is 0 it returns NULL.
2316 * the type of the elements to allocate.
2318 * the number of elements to allocate.
2320 * a pointer to the allocated memory, cast to a pointer to struct_type.
2324 // #define g_try_new0(struct_type, n_structs)
2327 * Attempts to reallocate the memory pointed to by mem, so that it now has
2328 * space for n_structs elements of type struct_type, and returns NULL on
2329 * failure. Contrast with g_renew(), which aborts the program on failure.
2330 * It returns the new address of the memory, which may have been moved.
2332 * the type of the elements to allocate.
2334 * the currently allocated memory.
2336 * the number of elements to allocate.
2338 * a pointer to the new allocated memory, cast to a pointer to struct_type.
2342 // #define g_try_renew(struct_type, mem, n_structs)
2345 * Allocates size bytes on the stack; these bytes will be freed when the current
2346 * stack frame is cleaned up. This macro essentially just wraps the
2347 * alloca() function present on most UNIX variants.
2348 * Thus it provides the same advantages and pitfalls as alloca():
2349 * + alloca() is very fast, as on most systems it's implemented by just adjusting
2350 * the stack pointer register.
2351 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
2352 * blocks just build up and are released together at function end.
2353 * - Allocation sizes have to fit into the current stack frame. For instance in a
2354 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
2355 * so be sparse with alloca() uses.
2356 * - Allocation failure due to insufficient stack space is not indicated with a NULL
2357 * return like e.g. with malloc(). Instead, most systems probably handle it the same
2358 * way as out of stack space situations from infinite function recursion, i.e.
2359 * with a segmentation fault.
2360 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
2361 * Stack space allocated with alloca() in the same scope as a variable sized array
2362 * will be freed together with the variable sized array upon exit of that scope, and
2363 * not upon exit of the enclosing function scope.
2365 * number of bytes to allocate.
2367 * space for size bytes, allocated on the stack
2370 // #define g_alloca(size)
2373 * Wraps g_alloca() in a more typesafe manner.
2375 * Type of memory chunks to be allocated
2377 * Number of chunks to be allocated
2379 * Pointer to stack space for n_structs chunks of type struct_type
2382 // #define g_newa(struct_type, n_structs)
2385 * Copies a block of memory len bytes long, from src to dest.
2386 * The source and destination areas may overlap.
2387 * In order to use this function, you must include
2388 * string.h yourself, because this macro will
2389 * typically simply resolve to memmove() and GLib does not include
2392 * the destination address to copy the bytes to.
2394 * the source address to copy the bytes from.
2396 * the number of bytes to copy.
2399 // #define g_memmove(dest,src,len)
2402 * Returns from the current function if the expression is not true.
2403 * If the expression evaluates to FALSE, a critical message is logged and
2404 * the function returns. This can only be used in functions which do not return
2407 * the expression to check.
2410 // #define g_return_if_fail(expr)
2413 * Returns from the current function, returning the value val, if the expression
2415 * If the expression evaluates to FALSE, a critical message is logged and
2418 * the expression to check.
2420 * the value to return from the current function if the expression is not
2424 // #define g_return_val_if_fail(expr,val)
2427 * Logs a critical message and returns from the current function.
2428 * This can only be used in functions which do not return a value.
2431 // #define g_return_if_reached()
2434 * Logs a critical message and returns val.
2436 * the value to return from the current function.
2439 // #define g_return_val_if_reached(val)
2442 * Debugging macro to terminate the application if the assertion fails.
2443 * If the assertion fails (i.e. the expression is not true), an error message
2444 * is logged and the application is terminated.
2445 * The macro can be turned off in final releases of code by defining
2446 * G_DISABLE_ASSERT when compiling the application.
2448 * the expression to check.
2451 // #define g_assert(expr)
2454 * Debugging macro to terminate the application if it is ever reached.
2455 * If it is reached, an error message is logged and the application is terminated.
2456 * The macro can be turned off in final releases of code by defining
2457 * G_DISABLE_ASSERT when compiling the application.
2460 // #define g_assert_not_reached()
2463 * Inserts a breakpoint instruction into the code (on x86 machines only).
2466 // #define G_BREAKPOINT()
2469 * A convenience function/macro to log a normal message.
2471 * format string, followed by parameters to insert into the format string (as with printf())
2487 // #define g_message(...)
2490 * A convenience function/macro to log a warning message.
2491 * You can make warnings fatal at runtime by setting the G_DEBUG environment
2492 * variable (see Running GLib Applications).
2494 * format string, followed by parameters to insert into the format string (as with printf())
2510 // #define g_warning(...)
2513 * Logs a "critical warning" (G_LOG_LEVEL_CRITICAL). It's more or less
2514 * application-defined what constitutes a critical vs. a regular
2515 * warning. You could call g_log_set_always_fatal() to make critical
2516 * warnings exit the program, then use g_critical() for fatal errors, for
2518 * You can also make critical warnings fatal at runtime by setting
2519 * the G_DEBUG environment variable (see
2520 * Running GLib Applications).
2522 * format string, followed by parameters to insert into the format string (as with printf())
2538 // #define g_critical(...)
2541 * A convenience function/macro to log an error message.
2542 * Error messages are always fatal, resulting in a call to
2543 * abort() to terminate the application.
2544 * This function will result in a core dump; don't use it for errors you
2545 * expect. Using this function indicates a bug in your program, i.e. an
2546 * assertion failure.
2548 * format string, followed by parameters to insert into the format string (as with printf())
2564 // #define g_error(...)
2567 * A convenience function/macro to log a debug message.
2569 * format string, followed by parameters to insert into the format string (as with printf())
2586 // #define g_debug(...)
2589 * Removes leading and trailing whitespace from a string. See g_strchomp() and
2592 * a string to remove the leading and trailing whitespace from.
2595 // #define g_strstrip( string )
2598 * Skips to the next character in a UTF-8 string. The string must be
2599 * valid; this macro is as fast as possible, and has no error-checking.
2600 * You would use this macro to iterate over a string character by
2601 * character. The macro returns the start of the next UTF-8 character.
2602 * Before using this macro, use g_utf8_validate() to validate strings
2603 * that may contain invalid UTF-8.
2605 * Pointer to the start of a valid UTF-8 character.
2608 // #define g_utf8_next_char(p)
2611 * Marks a string for translation, gets replaced with the translated string
2614 * the string to be translated
2618 // #define _(String)
2621 * Like _(), but applies g_strip_context() to the translation. This has the
2622 * advantage that the string can be adorned with a prefix to guarantee
2623 * uniqueness and provide context to the translator.
2624 * One use case given in the gettext manual is GUI translation, where one could
2625 * e.g. disambiguate two "Open" menu entries as "File|Open" and "Printer|Open".
2626 * Another use case is the string "Russian" which may have to be translated
2627 * differently depending on whether it's the name of a character set or a
2628 * language. This could be solved by using "charset|Russian" and
2629 * "language|Russian".
2631 * the string to be translated, with a '|'-separated prefix which
2632 * must not be translated
2636 // #define Q_(String)
2639 * Marks a string for translation, gets replaced with the untranslated string
2640 * at runtime. This is useful in situations where the translated strings can't
2641 * be directly used, e.g. in string array initializers.
2643 * static const char *messages[] = {
2644 * N_("some very meaningful message"),
2645 * N_("and another one")
2647 * const char *string;
2650 * = index > 1 ? _("a default message") : gettext (messages[index]);
2655 * the string to be translated
2659 // #define N_(String)
2662 * Returns a random gboolean from rand_. This corresponds to a unbiased
2667 * a random gboolean.
2670 // #define g_rand_boolean(rand_)
2673 * Returns a random gboolean. This corresponds to a unbiased coin toss.
2675 * a random gboolean.
2678 // #define g_random_boolean()
2682 * 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.
2687 // #define g_scanner_freeze_symbol_table(scanner)
2691 * 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.
2696 // #define g_scanner_thaw_symbol_table(scanner)
2700 * 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.
2701 * Adds a symbol to the default scope.
2705 * the symbol to add.
2707 * the value of the symbol.
2710 // #define g_scanner_add_symbol( scanner, symbol, value )
2714 * 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.
2715 * Removes a symbol from the default scope.
2719 * the symbol to remove.
2722 // #define g_scanner_remove_symbol( scanner, symbol )
2726 * 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.
2727 * Calls a function for each symbol in the default scope.
2731 * the function to call with each symbol.
2733 * data to pass to the function.
2736 // #define g_scanner_foreach_symbol( scanner, func, data )
2739 * Provided for UNIX emulation on Windows; see documentation for pipe()
2740 * in any UNIX manual.
2742 * file descriptors, the first one for reading, the second one for writing.
2745 // #define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
2748 * On Windows, this macro defines a DllMain() function
2749 * that stores the actual DLL name that the code being compiled will be
2751 * On non-Windows platforms, expands to nothing.
2753 * empty or "static".
2755 * the name of the (pointer to the) char array where the DLL name
2756 * will be stored. If this is used, you must also include
2757 * windows.h. If you need a more complex DLL entry
2758 * point function, you cannot use this.
2761 // #define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
2764 * On Windows, this macro defines an expression which evaluates to TRUE
2765 * if the code is running on a version of Windows where the wide
2766 * character versions of the Win32 API functions, and the wide chaacter
2767 * versions of the C library functions work. (They are always present in
2768 * the DLLs, but don't work on Windows 9x and Me.)
2769 * On non-Windows platforms, it is not defined.
2773 // #define G_WIN32_HAVE_WIDECHAR_API() TRUE
2776 * On Windows, this macro defines an expression which evaluates to TRUE
2777 * if the code is running on an NT-based Windows operating system.
2778 * On non-Windows platforms, it is not defined.
2782 // #define G_WIN32_IS_NT_BASED() TRUE
2785 * A convenience macro to allocate a block of memory from the slice allocator.
2786 * It calls g_slice_alloc() with sizeof (type) and casts the returned pointer
2787 * to a pointer of the given type, avoiding a type cast in the source code.
2788 * Note that the underlying slice allocation mechanism can
2789 * be changed with the G_SLICE=always-malloc
2790 * environment variable.
2792 * the type to allocate, typically a structure name
2794 * a pointer to the allocated block, cast to a pointer to type.
2798 // #define g_slice_new(type)
2801 * A convenience macro to allocate a block of memory from the slice allocator
2802 * and set the memory to 0. It calls g_slice_alloc0() with sizeof (type) and
2803 * casts the returned pointer to a pointer of the given type, avoiding a type
2804 * cast in the source code.
2805 * Note that the underlying slice allocation mechanism can
2806 * be changed with the G_SLICE=always-malloc
2807 * environment variable.
2809 * the type to allocate, typically a structure name
2811 * a pointer to the allocated block, cast to a pointer to type.
2815 // #define g_slice_new0(type)
2818 * A convenience macro to free a block of memory that has been allocated
2819 * from the slice allocator. It calls g_slice_free1() using
2820 * sizeof (type) as the block size.
2821 * Note that the exact release behaviour can be changed with the
2822 * G_DEBUG=gc-friendly environment variable.
2824 * the type of the block to free, typically a structure name
2826 * a pointer to the block to free
2830 // #define g_slice_free(type, mem)
2833 * Frees a linked list of memory blocks of structure type type.
2834 * The memory blocks must be equal-sized, allocated via
2835 * g_slice_alloc() or g_slice_alloc0() and linked together by a
2836 * next pointer (similar to GSList). The name of the
2837 * next field in type is passed as third argument.
2838 * Note that the exact release behaviour can be changed with the
2839 * G_DEBUG=gc-friendly environment variable.
2841 * the type of the mem_chain blocks
2843 * a pointer to the first block of the chain
2845 * the field name of the next pointer in type
2848 * [Bonwick94] Jeff Bonwick, The slab allocator: An object-caching kernel
2849 * memory allocator. USENIX 1994, and
2850 * [Bonwick01] Bonwick and Jonathan Adams, Magazines and vmem: Extending the
2851 * slab allocator to many cpu's and arbitrary resources. USENIX 2001
2854 // #define g_slice_free_chain(type, mem_chain, next)
2858 * g_mem_chunk_create has been deprecated since version 2.10 and should not be used in newly-written code. Use the slice
2860 * A convenience macro for creating a new GMemChunk.
2861 * It calls g_mem_chunk_new(), using the given type to create the GMemChunk
2862 * name. The atom size is determined using sizeof(), and the
2863 * area size is calculated by multiplying the pre_alloc parameter with
2866 * the type of the atoms, typically a structure name.
2868 * the number of atoms to store in each block of memory.
2870 * the type of the GMemChunk.
2871 * G_ALLOC_AND_FREE is used if the atoms will be freed individually.
2872 * G_ALLOC_ONLY should be used if atoms will never be freed individually.
2873 * G_ALLOC_ONLY is quicker, since it does not need to track free atoms,
2874 * but it obviously wastes memory if you no longer need many of the atoms.
2876 * the new GMemChunk.
2879 // #define g_mem_chunk_create(type, pre_alloc, alloc_type)
2883 * g_chunk_new has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new() instead
2884 * A convenience macro to allocate an atom of memory from a GMemChunk.
2885 * It calls g_mem_chunk_alloc() and casts the returned atom to a pointer to
2886 * the given type, avoiding a type cast in the source code.
2888 * the type of the GMemChunk atoms, typically a structure name.
2892 * a pointer to the allocated atom, cast to a pointer to type.
2895 // #define g_chunk_new(type, chunk)
2899 * g_chunk_new0 has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_new0() instead
2900 * A convenience macro to allocate an atom of memory from a GMemChunk.
2901 * It calls g_mem_chunk_alloc0() and casts the returned atom to a pointer to
2902 * the given type, avoiding a type cast in the source code.
2904 * the type of the GMemChunk atoms, typically a structure name.
2908 * a pointer to the allocated atom, cast to a pointer to type.
2911 // #define g_chunk_new0(type, chunk)
2915 * g_chunk_free has been deprecated since version 2.10 and should not be used in newly-written code. Use g_slice_free() instead
2916 * A convenience macro to free an atom of memory from a GMemChunk.
2917 * It simply switches the arguments and calls g_mem_chunk_free()
2918 * It is included simply to complement the other convenience macros, g_chunk_new()
2919 * and g_chunk_new0().
2921 * a pointer to the atom to be freed.
2926 // #define g_chunk_free(mem, mem_chunk)
2929 * A convenience macro to gets the previous element in a GList.
2931 * an element in a GList.
2933 * the previous element, or NULL if there are no previous elements.
2936 // #define g_list_previous(list)
2939 * A convenience macro to gets the next element in a GList.
2941 * an element in a GList.
2943 * the next element, or NULL if there are no more elements.
2946 // #define g_list_next(list)
2949 * A convenience macro to gets the next element in a GSList.
2951 * an element in a GSList.
2953 * the next element, or NULL if there are no more elements.
2956 // #define g_slist_next(slist)
2960 * g_hash_table_freeze is deprecated and should not be used in newly-written code.
2961 * This function is deprecated and will be removed in the next major
2962 * release of GLib. It does nothing.
2967 // #define g_hash_table_freeze(hash_table)
2971 * g_hash_table_thaw is deprecated and should not be used in newly-written code.
2972 * This function is deprecated and will be removed in the next major
2973 * release of GLib. It does nothing.
2978 // #define g_hash_table_thaw(hash_table)
2981 * Adds the value on to the end of the array.
2982 * The array will grow in size automatically if necessary.
2984 * g_array_append_val() is a macro which uses a reference to the value
2985 * parameter v. This means that you cannot use it with literal values
2986 * such as "27". You must use variables.
2990 * the value to append to the GArray.
2995 // #define g_array_append_val(a,v)
2998 * Adds the value on to the start of the array.
2999 * The array will grow in size automatically if necessary.
3000 * This operation is slower than g_array_append_val() since the existing elements
3001 * in the array have to be moved to make space for the new element.
3003 * g_array_prepend_val() is a macro which uses a reference to the value
3004 * parameter v. This means that you cannot use it with literal values
3005 * such as "27". You must use variables.
3009 * the value to prepend to the GArray.
3014 // #define g_array_prepend_val(a,v)
3017 * Inserts an element into an array at the given index.
3019 * g_array_insert_val() is a macro which uses a reference to the value
3020 * parameter v. This means that you cannot use it with literal values
3021 * such as "27". You must use variables.
3025 * the index to place the element at.
3027 * the value to insert into the array.
3032 // #define g_array_insert_val(a,i,v)
3035 * Returns the element of a GArray at the given index.
3036 * The return value is cast to the given type.
3037 * Example6.Getting a pointer to an element in a GArray
3038 * EDayViewEvent *event;
3039 * /+* This gets a pointer to the 3rd element in the array of EDayViewEvent
3041 * event = g_array_index (events, EDayViewEvent, 3);
3045 * the type of the elements.
3047 * the index of the element to return.
3049 * the element of the GArray at the index given by i.
3052 // #define g_array_index(a,t,i)
3055 * Returns the pointer at the given index of the pointer array.
3059 * the index of the pointer to return.
3061 * the pointer at the given index.
3064 // #define g_ptr_array_index(array,index_)
3067 * Inserts a GNode as the last child of the given parent.
3069 * the GNode to place the new GNode under.
3071 * the GNode to insert.
3073 * the inserted GNode.
3076 // #define g_node_append(parent, node)
3079 * Inserts a new GNode at the given position.
3081 * the GNode to place the new GNode under.
3083 * the position to place the new GNode at.
3084 * If position is -1, the new GNode is inserted as the last child of parent.
3086 * the data for the new GNode.
3091 // #define g_node_insert_data(parent, position, data)
3094 * Inserts a new GNode before the given sibling.
3096 * the GNode to place the new GNode under.
3098 * the sibling GNode to place the new GNode before.
3100 * the data for the new GNode.
3105 // #define g_node_insert_data_before(parent, sibling, data)
3108 * Inserts a new GNode as the last child of the given parent.
3110 * the GNode to place the new GNode under.
3112 * the data for the new GNode.
3117 // #define g_node_append_data(parent, data)
3120 * Inserts a new GNode as the first child of the given parent.
3122 * the GNode to place the new GNode under.
3124 * the data for the new GNode.
3129 // #define g_node_prepend_data(parent, data)
3132 * Gets the first child of a GNode.
3136 * the last child of node, or NULL if node is NULL or has no children.
3139 // #define g_node_first_child(node)
3142 * Gets the next sibling of a GNode.
3146 * the next sibling of node, or NULL if node is NULL.
3149 // #define g_node_next_sibling(node)
3152 * Gets the previous sibling of a GNode.
3156 * the previous sibling of node, or NULL if node is NULL.
3159 // #define g_node_prev_sibling(node)
3162 * Returns TRUE if a GNode is a leaf node.
3166 * TRUE if the GNode is a leaf node (i.e. it has no children).
3169 // #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
3172 * Returns TRUE if a GNode is the root of a tree.
3176 * TRUE if the GNode is the root of a tree (i.e. it has no parent
3180 // #define G_NODE_IS_ROOT(node)
3183 * Sets the data corresponding to the given GQuark id.
3184 * Any previous data with the same key is removed, and its
3185 * destroy function is called.
3189 * the GQuark to identify the data element.
3191 * the data element, or NULL to remove any previous element
3192 * corresponding to q.
3195 // #define g_datalist_id_set_data(dl, q, d)
3198 * Removes an element, using its GQuark identifier.
3202 * the GQuark identifying the data element.
3205 // #define g_datalist_id_remove_data(dl, q)
3208 * Sets the data element corresponding to the given string identifier.
3212 * the string to identify the data element.
3214 * the data element, or NULL to remove any previous element
3215 * corresponding to k.
3218 // #define g_datalist_set_data(dl, k, d)
3221 * Sets the data element corresponding to the given string identifier, and the
3222 * function to be called when the data element is removed.
3226 * the string to identify the data element.
3228 * the data element, or NULL to remove any previous element corresponding to
3231 * the function to call when the data element is removed. This
3232 * function will be called with the data element and can be used to free any
3233 * memory allocated for it. If d is NULL, then f must also be NULL.
3236 // #define g_datalist_set_data_full(dl, k, d, f)
3239 * Gets a data element, using its string identifer.
3240 * This is slower than g_datalist_id_get_data() because the string is first
3241 * converted to a GQuark.
3245 * the string identifying a data element.
3247 * the data element, or NULL if it is not found.
3250 // #define g_datalist_get_data(dl, k)
3253 * Removes an element using its string identifier.
3254 * The data element's destroy function is called if it has been set.
3258 * the string identifying the data element.
3261 // #define g_datalist_remove_data(dl, k)
3264 * Removes an element, without calling its destroy notifier.
3268 * the string identifying the data element.
3271 // #define g_datalist_remove_no_notify(dl, k)
3274 * Sets the data element associated with the given GQuark id.
3275 * Any previous data with the same key is removed, and its destroy function
3278 * the location identifying the dataset.
3280 * the GQuark id to identify the data element.
3285 // #define g_dataset_id_set_data(l, k, d)
3288 * Removes a data element from a dataset.
3289 * The data element's destroy function is called if it has been set.
3291 * the location identifying the dataset.
3293 * the GQuark id identifying the data element.
3296 // #define g_dataset_id_remove_data(l, k)
3299 * Sets the data corresponding to the given string identifier.
3301 * the location identifying the dataset.
3303 * the string to identify the data element.
3308 // #define g_dataset_set_data(l, k, d)
3311 * Sets the data corresponding to the given string identifier, and the function
3312 * to call when the data element is destroyed.
3314 * the location identifying the dataset.
3316 * the string to identify the data element.
3320 * the function to call when the data element is removed. This
3321 * function will be called with the data element and can be used to free any
3322 * memory allocated for it.
3325 // #define g_dataset_set_data_full(l, k, d, f)
3328 * Gets the data element corresponding to a string.
3330 * the location identifying the dataset.
3332 * the string identifying the data element.
3334 * the data element corresponding to the string, or NULL if it is not
3338 // #define g_dataset_get_data(l, k)
3341 * Removes a data element corresponding to a string.
3342 * Its destroy function is called if it has been set.
3344 * the location identifying the dataset.
3346 * the string identifying the data element.
3349 // #define g_dataset_remove_data(l, k)
3352 * Removes an element, without calling its destroy notifier.
3354 * the location identifying the dataset.
3356 * the string identifying the data element.
3359 // #define g_dataset_remove_no_notify(l, k)
3362 * Specifies the type of function passed to g_main_context_set_poll_func().
3363 * The semantics of the function should match those of the
3364 * poll() system call.
3366 * an array of GPollFD elements.
3368 * the number of elements in ufds.
3370 * the maximum time to wait for an event of the file descriptors.
3371 * A negative value indicates an infinite timeout.
3373 * the number of GPollFD elements which have events or errors reported,
3374 * or -1 if an error occurred.
3376 // gint (*GPollFunc) (GPollFD *ufds, guint nfsd, gint timeout_);
3377 public typedef extern(C
) int function (GPollFD
*, uint, int) GPollFunc
;
3380 * The type of functions to be called when a child exists.
3382 * the process id of the child process
3384 * Status information about the child process,
3385 * see waitpid(2) for more information about this field
3387 * user data passed to g_child_watch_add()
3389 // void (*GChildWatchFunc) (GPid pid, gint status, gpointer data);
3390 public typedef extern(C
) void function (GPid
, int, void*) GChildWatchFunc
;
3393 * This is just a placeholder for GClosureMarshal, which cannot be used here
3394 * for dependency reasons.
3396 // void (*GSourceDummyMarshal) (void);
3397 public typedef extern(C
) void function () GSourceDummyMarshal
;
3400 * Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(),
3401 * g_idle_add(), and g_idle_add_full().
3403 * data passed to the function, set when the source was created with one
3404 * of the above functions.
3406 * it should return FALSE if the source should be removed.
3408 // gboolean (*GSourceFunc) (gpointer data);
3409 public typedef extern(C
) int function (void*) GSourceFunc
;
3412 * Specifies the type of the module initialization function.
3413 * If a module contains a function named g_module_check_init() it is called
3414 * automatically when the module is loaded. It is passed the GModule structure
3415 * and should return NULL on success or a string describing the initialization
3418 * the GModule corresponding to the module which has just been loaded.
3420 * NULL on success, or a string describing the initialization error.
3422 // const gchar* (*GModuleCheckInit) (GModule *module);
3423 public typedef extern(C
) char* function (GModule
*) GModuleCheckInit
;
3426 * Specifies the type of the module function called when it is unloaded.
3427 * If a module contains a function named g_module_unload() it is called
3428 * automatically when the module is unloaded.
3429 * It is passed the GModule structure.
3431 * the GModule about to be unloaded.
3433 // void (*GModuleUnload) (GModule *module);
3434 public typedef extern(C
) void function (GModule
*) GModuleUnload
;
3437 * Specifies the type of function passed to g_io_add_watch() or
3438 * g_io_add_watch_full(), which is called when the requested condition on a
3439 * GIOChannel is satisfied.
3441 * the GIOChannel event source.
3443 * the condition which has been satisfied.
3445 * user data set in g_io_add_watch() or g_io_add_watch_full().
3447 * the function should return FALSE if the event source should be
3450 // gboolean (*GIOFunc) (GIOChannel *source, GIOCondition condition, gpointer data);
3451 public typedef extern(C
) int function (GIOChannel
*, GIOCondition
, void*) GIOFunc
;
3454 * Specifies the type of the print handler functions.
3455 * These are called with the complete formatted string to output.
3457 * the message to be output.
3459 // void (*GPrintFunc) (const gchar *string);
3460 public typedef extern(C
) void function (char[]) GPrintFunc
;
3463 * Specifies the prototype of log handler functions.
3465 * the log domain of the message.
3467 * the log level of the message (including the fatal and recursion
3470 * the message to process.
3472 * user data, set in g_log_set_handler().
3474 // void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
3475 public typedef extern(C
) void function (char[], GLogLevelFlags
, char[], void*) GLogFunc
;
3478 * Declares a type of function which takes no arguments and has no return value.
3479 * It is used to specify the type function passed to g_atexit().
3481 // void (*GVoidFunc) (void);
3482 public typedef extern(C
) void function () GVoidFunc
;
3485 * Declares a type of function which takes an arbitrary data pointer argument
3486 * and has no return value. It is not currently used in GLib or GTK+.
3490 // void (*GFreeFunc) (gpointer data);
3491 public typedef extern(C
) void function (void*) GFreeFunc
;
3494 * Specifies the type of the message handler function.
3500 * TRUE if the message signals an error, FALSE if it
3501 * signals a warning.
3503 // void (*GScannerMsgFunc) (GScanner *scanner, gchar *message, gboolean error);
3504 public typedef extern(C
) void function (GScanner
*, char[], int) GScannerMsgFunc
;
3507 * Specifies the type of the function passed to g_completion_new().
3508 * It should return the string corresponding to the given target item.
3509 * This is used when you use data structures as GCompletion items.
3511 * the completion item.
3513 * the string corresponding to the item.
3515 // gchar* (*GCompletionFunc) (gpointer );
3516 public typedef extern(C
) char* function (void*) GCompletionFunc
;
3519 * Specifies the type of the function passed to g_completion_set_compare().
3520 * This is used when you use strings as GCompletion items.
3522 * string to compare with s2.
3524 * string to compare with s1.
3526 * maximal number of bytes to compare.
3528 * an integer less than, equal to, or greater than zero if the
3529 * first n bytes of s1 is found, respectively, to be less than, to match,
3530 * or to be greater than the first n bytes of s2.
3532 // gint (*GCompletionStrncmpFunc) (const gchar *s1, const gchar *s2, gsize n);
3533 public typedef extern(C
) int function (char[], char[], uint) GCompletionStrncmpFunc
;
3536 * Specifies the type of the setup function passed to g_spawn_async(),
3537 * g_spawn_sync() and g_spawn_async_with_pipes(). On POSIX platforms it
3538 * is called in the child after GLib has performed all the setup it plans
3539 * to perform but before calling exec(). On POSIX
3540 * actions taken in this function will thus only affect the child, not
3542 * On Windows the function is called in the parent. Its usefulness on
3543 * Windows is thus questionable. In many cases executing the child setup
3544 * function in the parent can have ill effects, and you should be very
3545 * careful when porting software to Windows that uses child setup
3548 * user data to pass to the function.
3550 // void (*GSpawnChildSetupFunc) (gpointer user_data);
3551 public typedef extern(C
) void function (void*) GSpawnChildSetupFunc
;
3554 * The type of function to be passed as callback for G_OPTION_ARG_CALLBACK
3557 * The name of the option being parsed. This will be either a
3558 * single dash followed by a single letter (for a short name) or two dashes
3559 * followed by a long option name.
3561 * The value to be parsed.
3563 * User data added to the GOptionGroup containing the option when it
3564 * was created with g_option_group_new()
3566 * A return location for errors. The error code G_OPTION_ERROR_FAILED
3567 * is intended to be used for errors in GOptionArgFunc callbacks.
3569 * TRUE if the option was successfully parsed, FALSE if an error
3570 * occurred, in which case error should be set with g_set_error()
3572 // gboolean (*GOptionArgFunc) (const gchar *option_name, const gchar *value, gpointer data, GError **error);
3573 public typedef extern(C
) int function (char[], char[], void*, GError
**) GOptionArgFunc
;
3576 * The type of functions which are used to translate user-visible
3577 * strings, for --help output.
3579 * the untranslated string
3581 * user data specified when installing the function, e.g.
3582 * in g_option_group_set_translate_func()
3584 * a translation of the string for the current locale.
3585 * The returned string is owned by GLib and must not be freed.
3587 // const gchar* (*GTranslateFunc) (const gchar *str, gpointer data);
3588 public typedef extern(C
) char* function (char[], void*) GTranslateFunc
;
3591 * The type of function that can be called before and after parsing.
3593 * The active GOptionContext
3595 * The group to which the function belongs
3597 * User data added to the GOptionGroup containing the option when it
3598 * was created with g_option_group_new()
3600 * A return location for error details
3602 * TRUE if the function completed successfully, FALSE if an error
3603 * occurred, in which case error should be set with g_set_error()
3605 // gboolean (*GOptionParseFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3606 public typedef extern(C
) int function (GOptionContext
*, GOptionGroup
*, void*, GError
**) GOptionParseFunc
;
3609 * The type of function to be used as callback when a parse error occurs.
3611 * The active GOptionContext
3613 * The group to which the function belongs
3615 * User data added to the GOptionGroup containing the option when it
3616 * was created with g_option_group_new()
3618 * The GError containing details about the parse error
3620 // void (*GOptionErrorFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error);
3621 public typedef extern(C
) void function (GOptionContext
*, GOptionGroup
*, void*, GError
**) GOptionErrorFunc
;
3624 * Specifies the type of a comparison function used to compare two
3625 * values. The function should return a negative integer if the first
3626 * value comes before the second, 0 if they are equal, or a positive
3627 * integer if the first value comes after the second.
3631 * a value to compare with.
3633 * negative value if a < b; zero if a = b; positive value
3636 // gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
3637 public typedef extern(C
) int function (void*, void*) GCompareFunc
;
3640 * Specifies the type of a comparison function used to compare two
3641 * values. The function should return a negative integer if the first
3642 * value comes before the second, 0 if they are equal, or a positive
3643 * integer if the first value comes after the second.
3647 * a value to compare with.
3649 * user data to pass to comparison function.
3651 * negative value if a < b; zero if a = b; positive value
3654 // gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
3655 public typedef extern(C
) int function (void*, void*, void*) GCompareDataFunc
;
3658 * Specifies the type of functions passed to g_list_foreach() and
3659 * g_slist_foreach().
3661 * the element's data.
3663 * user data passed to g_list_foreach() or g_slist_foreach().
3665 // void (*GFunc) (gpointer data, gpointer user_data);
3666 public typedef extern(C
) void function (void*, void*) GFunc
;
3669 * Specifies the type of the hash function which is passed to
3670 * g_hash_table_new() when a GHashTable is created.
3671 * The function is passed a key and should return a guint hash value.
3672 * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
3673 * hash functions which can be used when the key is a gpointer, gint, and
3674 * gchar* respectively.
3675 * FIXME: Need more here.
3676 * The hash values should be evenly distributed over a fairly large range?
3677 * The modulus is taken with the hash table size (a prime number)
3678 * to find the 'bucket' to place each key into.
3679 * The function should also be very fast, since it is called for each key
3684 * the hash value corresponding to the key.
3686 // guint (*GHashFunc) (gconstpointer key);
3687 public typedef extern(C
) uint function (void*) GHashFunc
;
3690 * Specifies the type of a function used to test two values for
3691 * equality. The function should return TRUE if both values are equal and
3696 * a value to compare with.
3698 * TRUE if a = b; FALSE otherwise.
3700 // gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b);
3701 public typedef extern(C
) int function (void*, void*) GEqualFunc
;
3704 * Specifies the type of the function passed to g_hash_table_foreach().
3705 * It is called with each key/value pair, together with the user_data parameter
3706 * which is passed to g_hash_table_foreach().
3710 * the value corresponding to the key.
3712 * user data passed to g_hash_table_foreach().
3714 // void (*GHFunc) (gpointer key, gpointer value, gpointer user_data);
3715 public typedef extern(C
) void function (void*, void*, void*) GHFunc
;
3718 * Specifies the type of the function passed to g_hash_table_foreach_remove().
3719 * It is called with each key/value pair, together with the user_data parameter
3720 * passed to g_hash_table_foreach_remove().
3721 * It should return TRUE if the key/value pair should be removed from the
3726 * the value associated with the key.
3728 * user data passed to g_hash_table_remove().
3730 * TRUE if the key/value pair should be removed from the GHashTable.
3732 // gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data);
3733 public typedef extern(C
) int function (void*, void*, void*) GHRFunc
;
3736 * Specifies the type of function passed to g_tree_traverse().
3737 * It is passed the key and value of each node, together with
3738 * the user_data parameter passed to g_tree_traverse().
3739 * If the function returns TRUE, the traversal is stopped.
3741 * a key of a GTree node.
3743 * the value corresponding to the key.
3745 * user data passed to g_tree_traverse().
3747 * TRUE to stop the traversal.
3749 // gboolean (*GTraverseFunc) (gpointer key, gpointer value, gpointer data);
3750 public typedef extern(C
) int function (void*, void*, void*) GTraverseFunc
;
3753 * A function of this signature is used to copy the node data when doing a deep-copy
3756 * A pointer to the data which should be copied.
3760 * A pointer to the copy.
3763 // gpointer (*GCopyFunc) (gconstpointer src, gpointer data);
3764 public typedef extern(C
) void* function (void*, void*) GCopyFunc
;
3767 * Specifies the type of function passed to g_node_traverse().
3768 * The function is called with each of the nodes visited, together with the
3769 * user data passed to g_node_traverse().
3770 * If the function returns TRUE, then the traversal is stopped.
3774 * user data passed to g_node_traverse().
3776 * TRUE to stop the traversal.
3778 // gboolean (*GNodeTraverseFunc) (GNode *node, gpointer data);
3779 public typedef extern(C
) int function (GNode
*, void*) GNodeTraverseFunc
;
3782 * Specifies the type of function passed to g_node_children_foreach().
3783 * The function is called with each child node, together with the user data
3784 * passed to g_node_children_foreach().
3788 * user data passed to g_node_children_foreach().
3790 // void (*GNodeForeachFunc) (GNode *node, gpointer data);
3791 public typedef extern(C
) void function (GNode
*, void*) GNodeForeachFunc
;
3794 * Specifies the type of function which is called when a data element is
3795 * destroyed. It is passed the pointer to the data element and should free
3796 * any memory and resources allocated for it.
3800 // void (*GDestroyNotify) (gpointer data);
3801 public typedef extern(C
) void function (void*) GDestroyNotify
;
3804 * Specifies the type of function passed to g_dataset_foreach().
3805 * It is called with each GQuark id and associated data element,
3806 * together with the user_data parameter supplied to g_dataset_foreach().
3808 * the GQuark id to identifying the data element.
3812 * user data passed to g_dataset_foreach().
3814 // void (*GDataForeachFunc) (GQuark key_id, gpointer data, gpointer user_data);
3815 public typedef extern(C
) void function (GQuark
, void*, void*) GDataForeachFunc
;
3818 * Specifies the type of the value_destroy_func and key_destroy_func functions
3819 * passed to g_cache_new().
3820 * The functions are passed a pointer to the GCache key or GCache value and
3821 * should free any memory and other resources associated with it.
3823 * the GCache value to destroy.
3825 // void (*GCacheDestroyFunc) (gpointer value);
3826 public typedef extern(C
) void function (void*) GCacheDestroyFunc
;
3829 * Specifies the type of the key_dup_func function passed to g_cache_new().
3830 * The function is passed a key (not a value as the prototype implies) and
3831 * should return a duplicate of the key.
3833 * the GCache key to destroy (not a GCache value as it seems).
3835 * a copy of the GCache key.
3837 // gpointer (*GCacheDupFunc) (gpointer value);
3838 public typedef extern(C
) void* function (void*) GCacheDupFunc
;
3841 * Specifies the type of the value_new_func function passed to g_cache_new().
3842 * It is passed a GCache key and should create the value corresponding to the
3847 * a new GCache value corresponding to the key.
3849 // gpointer (*GCacheNewFunc) (gpointer key);
3850 public typedef extern(C
) void* function (void*) GCacheNewFunc
;
3852 * A union holding the value of the token.
3854 public struct GTokenValue