-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | GLib bindings
--   
--   Bindings for GLib, autogenerated by haskell-gi.
@package gi-glib
@version 2.0.17

module GI.GLib.Constants

-- | No description available in the introspection data.
pattern WIN32_MSG_HANDLE :: () => () => Int32

-- | A macro that should be defined by the user prior to including the
--   glib.h header. The definition should be one of the predefined GLib
--   version macros: GLIB_VERSION_2_26,
--   GLIB_VERSION_2_28,...
--   
--   This macro defines the earliest version of GLib that the package is
--   required to be able to compile against.
--   
--   If the compiler is configured to warn about the use of deprecated
--   functions, then using functions that were deprecated in version
--   VERSION_MIN_REQUIRED or earlier will cause warnings (but using
--   functions deprecated in later releases will not).
--   
--   Since: 2.32
pattern VERSION_MIN_REQUIRED :: () => () => Int32

-- | No description available in the introspection data.
pattern VA_COPY_AS_ARRAY :: () => () => Int32

-- | Number of microseconds in one second (1 million). This macro is
--   provided for code readability.
pattern USEC_PER_SEC :: () => () => Int32

-- | Subcomponent delimiter characters as defined in RFC 3986. Includes
--   "!$&'()*+,;=".
pattern URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS :: () => () => Text

-- | Generic delimiters characters as defined in RFC 3986. Includes
--   ":/?#[]@".
pattern URI_RESERVED_CHARS_GENERIC_DELIMITERS :: () => () => Text

-- | The maximum length (in codepoints) of a compatibility or canonical
--   decomposition of a single Unicode character.
--   
--   This is as defined by Unicode 6.1.
--   
--   Since: 2.32
pattern UNICHAR_MAX_DECOMPOSITION_LENGTH :: () => () => Int32

-- | Evaluates to a time span of one second.
--   
--   Since: 2.26
pattern TIME_SPAN_SECOND :: () => () => Int64

-- | Evaluates to a time span of one minute.
--   
--   Since: 2.26
pattern TIME_SPAN_MINUTE :: () => () => Int64

-- | Evaluates to a time span of one millisecond.
--   
--   Since: 2.26
pattern TIME_SPAN_MILLISECOND :: () => () => Int64

-- | Evaluates to a time span of one hour.
--   
--   Since: 2.26
pattern TIME_SPAN_HOUR :: () => () => Int64

-- | Evaluates to a time span of one day.
--   
--   Since: 2.26
pattern TIME_SPAN_DAY :: () => () => Int64

-- | Creates a unique temporary directory for each unit test and uses
--   g_set_user_dirs() to set XDG directories to point into
--   subdirectories of it for the duration of the unit test. The directory
--   tree is cleaned up after the test finishes successfully. Note that
--   this doesn’t take effect until testRun is called, so calls to
--   (for example) g_get_user_home_dir() will return the
--   system-wide value when made in a test program’s main()
--   function.
--   
--   The following functions will return subdirectories of the temporary
--   directory when this option is used. The specific subdirectory paths in
--   use are not guaranteed to be stable API — always use a getter function
--   to retrieve them.
--   
--   
--   
- getHomeDir
--   
- getUserCacheDir
--   
- getSystemConfigDirs
--   
- getUserConfigDir
--   
- getSystemDataDirs
--   
- getUserDataDir
--   
- getUserRuntimeDir
--   
--   
--   The subdirectories may not be created by the test harness; as with
--   normal calls to functions like getUserCacheDir, the caller must
--   be prepared to create the directory if it doesn’t exist.
--   
--   Since: 2.60
pattern TEST_OPTION_ISOLATE_DIRS :: () => () => Text

-- | No description available in the introspection data.
pattern SYSDEF_MSG_PEEK :: () => () => Int32

-- | No description available in the introspection data.
pattern SYSDEF_MSG_OOB :: () => () => Int32

-- | No description available in the introspection data.
pattern SYSDEF_MSG_DONTROUTE :: () => () => Int32

-- | No description available in the introspection data.
pattern SYSDEF_AF_UNIX :: () => () => Int32

-- | No description available in the introspection data.
pattern SYSDEF_AF_INET6 :: () => () => Int32

-- | No description available in the introspection data.
pattern SYSDEF_AF_INET :: () => () => Int32

-- | The standard delimiters, used in strdelimit.
pattern STR_DELIMITERS :: () => () => Text

-- | The square root of two.
pattern SQRT2 :: () => () => Double

-- | Use this macro as the return value of a SourceFunc to remove
--   the Source from the main loop.
--   
--   Since: 2.32
pattern SOURCE_REMOVE :: () => () => Bool

-- | Use this macro as the return value of a SourceFunc to leave the
--   Source in the main loop.
--   
--   Since: 2.32
pattern SOURCE_CONTINUE :: () => () => Bool

-- | No description available in the introspection data.
pattern SIZEOF_VOID_P :: () => () => Int32

-- | No description available in the introspection data.
pattern SIZEOF_SSIZE_T :: () => () => Int32

-- | No description available in the introspection data.
pattern SIZEOF_SIZE_T :: () => () => Int32

-- | No description available in the introspection data.
pattern SIZEOF_LONG :: () => () => Int32

-- | The search path separator as a string. This is ":" on UNIX machines
--   and ";" under Windows.
pattern SEARCHPATH_SEPARATOR_S :: () => () => Text

-- | The search path separator character. This is ':' on UNIX machines and
--   ';' under Windows.
pattern SEARCHPATH_SEPARATOR :: () => () => Int32

-- | Use this for very low priority background tasks.
--   
--   It is not used within GLib or GTK+.
pattern PRIORITY_LOW :: () => () => Int32

-- | Use this for high priority idle functions.
--   
--   GTK+ uses PRIORITY_HIGH_IDLE + 10 for resizing operations, and
--   PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done
--   to ensure that any pending resizes are processed before any pending
--   redraws, so that widgets are not redrawn twice unnecessarily.)
pattern PRIORITY_HIGH_IDLE :: () => () => Int32

-- | Use this for high priority event sources.
--   
--   It is not used within GLib or GTK+.
pattern PRIORITY_HIGH :: () => () => Int32

-- | Use this for default priority idle functions.
--   
--   In GLib this priority is used when adding idle functions with
--   g_idle_add().
pattern PRIORITY_DEFAULT_IDLE :: () => () => Int32

-- | Use this for default priority event sources.
--   
--   In GLib this priority is used when adding timeout functions with
--   g_timeout_add(). In GDK this priority is used for
--   events from the X server.
pattern PRIORITY_DEFAULT :: () => () => Int32

-- | A format specifier that can be used in printf()-style
--   format strings when printing the fd member of a
--   PollFD.
pattern POLLFD_FORMAT :: () => () => Text

-- | Pi divided by 4.
pattern PI_4 :: () => () => Double

-- | Pi divided by 2.
pattern PI_2 :: () => () => Double

-- | A format specifier that can be used in printf()-style
--   format strings when printing a GPid.
--   
--   Since: 2.50
pattern PID_FORMAT :: () => () => Text

-- | The value of pi (ratio of circle's circumference to its diameter).
pattern PI :: () => () => Double

-- | Specifies one of the possible types of byte order (currently unused).
--   See G_BYTE_ORDER.
pattern PDP_ENDIAN :: () => () => Int32

-- | If a long option in the main group has this name, it is not treated as
--   a regular option. Instead it collects all non-option arguments which
--   would otherwise be left in argv. The option must be of type
--   OptionArgCallback, OptionArgStringArray or
--   OptionArgFilenameArray.
--   
--   Using OPTION_REMAINING instead of simply scanning argv
--   for leftover arguments has the advantage that GOption takes care of
--   necessary encoding conversions for strings or filenames.
--   
--   Since: 2.6
pattern OPTION_REMAINING :: () => () => Text

-- | No description available in the introspection data.
pattern MODULE_SUFFIX :: () => () => Text

-- | The minor version number of the GLib library.
--   
--   Like gtk_minor_version, but from the headers used at
--   application compile time, rather than from the library linked against
--   at application run time.
pattern MINOR_VERSION :: () => () => Int32

-- | The minimum value which can be held in a gint8.
--   
--   Since: 2.4
pattern MININT8 :: () => () => Int8

-- | The minimum value which can be held in a gint64.
pattern MININT64 :: () => () => Int64

-- | The minimum value which can be held in a gint32.
--   
--   Since: 2.4
pattern MININT32 :: () => () => Int32

-- | The minimum value which can be held in a gint16.
--   
--   Since: 2.4
pattern MININT16 :: () => () => Int16

-- | The micro version number of the GLib library.
--   
--   Like gtk_micro_version, but from the headers used at
--   application compile time, rather than from the library linked against
--   at application run time.
pattern MICRO_VERSION :: () => () => Int32

-- | The maximum value which can be held in a guint8.
--   
--   Since: 2.4
pattern MAXUINT8 :: () => () => Word8

-- | The maximum value which can be held in a guint64.
pattern MAXUINT64 :: () => () => Word64

-- | The maximum value which can be held in a guint32.
--   
--   Since: 2.4
pattern MAXUINT32 :: () => () => Word32

-- | The maximum value which can be held in a guint16.
--   
--   Since: 2.4
pattern MAXUINT16 :: () => () => Word16

-- | The maximum value which can be held in a gint8.
--   
--   Since: 2.4
pattern MAXINT8 :: () => () => Int8

-- | The maximum value which can be held in a gint64.
pattern MAXINT64 :: () => () => Int64

-- | The maximum value which can be held in a gint32.
--   
--   Since: 2.4
pattern MAXINT32 :: () => () => Int32

-- | The maximum value which can be held in a gint16.
--   
--   Since: 2.4
pattern MAXINT16 :: () => () => Int16

-- | The major version number of the GLib library.
--   
--   Like glib_major_version, but from the headers used at
--   application compile time, rather than from the library linked against
--   at application run time.
pattern MAJOR_VERSION :: () => () => Int32

-- | Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib.
--   Higher bits can be used for user-defined log levels.
pattern LOG_LEVEL_USER_SHIFT :: () => () => Int32

-- | GLib log levels that are considered fatal by default.
--   
--   This is not used if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
pattern LOG_FATAL_MASK :: () => () => Int32

-- | Defines the log domain. See Log Domains.
--   
--   Libraries should define this so that any messages which they log can
--   be differentiated from messages from other libraries and application
--   code. But be careful not to define it in any public header files.
--   
--   Log domains must be unique, and it is recommended that they are the
--   application or library name, optionally followed by a hyphen and a
--   sub-domain name. For example, bloatpad or
--   bloatpad-io.
--   
--   If undefined, it defaults to the default Nothing (or
--   "") log domain; this is not advisable, as it cannot be
--   filtered against using the G_MESSAGES_DEBUG environment
--   variable.
--   
--   For example, GTK+ uses this in its Makefile.am: >
--   >AM_CPPFLAGS = -DG_LOG_DOMAIN="Gtk"
--   
--   Applications can choose to leave it as the default Nothing (or
--   "") domain. However, defining the domain offers the same
--   advantages as above.
pattern LOG_DOMAIN :: () => () => Int8

-- | Multiplying the base 2 exponent by this number yields the base 10
--   exponent.
pattern LOG_2_BASE_10 :: () => () => Double

-- | The natural logarithm of 2.
pattern LN2 :: () => () => Double

-- | The natural logarithm of 10.
pattern LN10 :: () => () => Double

-- | Specifies one of the possible types of byte order. See
--   G_BYTE_ORDER.
pattern LITTLE_ENDIAN :: () => () => Int32

-- | The value of the KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
--   entries representing links to documents.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_TYPE_LINK :: () => () => Text

-- | The value of the KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
--   entries representing directories.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_TYPE_DIRECTORY :: () => () => Text

-- | The value of the KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
--   entries representing applications.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_TYPE_APPLICATION :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   giving the version of the Desktop Entry Specification used for the
--   desktop entry file.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_VERSION :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   giving the URL to access. It is only valid for desktop entries with
--   the Link type.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_URL :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   giving the type of the desktop entry. Usually
--   KEY_FILE_DESKTOP_TYPE_APPLICATION,
--   KEY_FILE_DESKTOP_TYPE_LINK, or
--   KEY_FILE_DESKTOP_TYPE_DIRECTORY.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_TYPE :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   giving the file name of a binary on disk used to determine if the
--   program is actually installed. It is only valid for desktop entries
--   with the Application type.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_TRY_EXEC :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a boolean
--   stating whether the program should be run in a terminal window. It is
--   only valid for desktop entries with the Application type.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_TERMINAL :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is string
--   identifying the WM class or name hint of a window that the application
--   will create, which can be used to emulate Startup Notification with
--   older applications.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a boolean
--   stating whether the application supports the Startup Notification
--   Protocol Specification.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   containing the working directory to run the program in. It is only
--   valid for desktop entries with the Application type.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_PATH :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a list of
--   strings identifying the environments that should display the desktop
--   entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a boolean
--   stating whether the desktop entry should be shown in menus.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_NO_DISPLAY :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a list of
--   strings identifying the environments that should not display the
--   desktop entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a localized
--   string giving the specific name of the desktop entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_NAME :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a list of
--   strings giving the MIME types supported by this desktop entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_MIME_TYPE :: () => () => Text

-- | No description available in the introspection data.
pattern KEY_FILE_DESKTOP_KEY_KEYWORDS :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a localized
--   string giving the name of the icon to be displayed for the desktop
--   entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_ICON :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a boolean
--   stating whether the desktop entry has been deleted by the user.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_HIDDEN :: () => () => Text

-- | No description available in the introspection data.
pattern KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a localized
--   string giving the generic name of the desktop entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_GENERIC_NAME :: () => () => Text

-- | No description available in the introspection data.
pattern KEY_FILE_DESKTOP_KEY_FULLNAME :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   giving the command line to execute. It is only valid for desktop
--   entries with the Application type.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_EXEC :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a boolean
--   set to true if the application is D-Bus activatable.
--   
--   Since: 2.38
pattern KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a localized
--   string giving the tooltip for the desktop entry.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_COMMENT :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a list of
--   strings giving the categories in which the desktop entry should be
--   shown in a menu.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_CATEGORIES :: () => () => Text

-- | A key under KEY_FILE_DESKTOP_GROUP, whose value is a string
--   list giving the available application actions.
--   
--   Since: 2.38
pattern KEY_FILE_DESKTOP_KEY_ACTIONS :: () => () => Text

-- | The name of the main group of a desktop entry file, as defined in the
--   Desktop Entry Specification. Consult the specification for more
--   details about the meanings of the keys below.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_GROUP :: () => () => Text

-- | No description available in the introspection data.
pattern KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX :: () => () => Text

-- | The bias by which exponents in single-precision floats are offset.
pattern IEEE754_FLOAT_BIAS :: () => () => Int32

-- | The bias by which exponents in double-precision floats are offset.
pattern IEEE754_DOUBLE_BIAS :: () => () => Int32

-- | The position of the first bit which is not reserved for internal use
--   be the Hook implementation, i.e. 1 <<
--   G_HOOK_FLAG_USER_SHIFT is the first bit which can be used for
--   application-defined flags.
pattern HOOK_FLAG_USER_SHIFT :: () => () => Int32

-- | No description available in the introspection data.
pattern HAVE_ISO_VARARGS :: () => () => Int32

-- | No description available in the introspection data.
pattern HAVE_GROWING_STACK :: () => () => Int32

-- | Defined to 1 if gcc-style visibility handling is supported.
pattern HAVE_GNUC_VISIBILITY :: () => () => Int32

-- | No description available in the introspection data.
pattern HAVE_GNUC_VARARGS :: () => () => Int32

-- | No description available in the introspection data.
pattern HAVE_GINT64 :: () => () => Int32

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type guintptr.
--   
--   Since: 2.22
pattern GUINTPTR_FORMAT :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type guint64. See also
--   GINT16_FORMAT.
--   
--   Some platforms do not support scanning and printing 64-bit integers,
--   even though the types are supported. On such platforms
--   GUINT64_FORMAT is not defined. Note that
--   scanf() may not support 64-bit integers, even if
--   GINT64_FORMAT is defined. Due to its weak error handling,
--   scanf() is not recommended for parsing anyway;
--   consider using asciiStrtoull instead.
pattern GUINT64_FORMAT :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type guint32. See also
--   GINT16_FORMAT.
pattern GUINT32_FORMAT :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type guint16. See also
--   GINT16_FORMAT
pattern GUINT16_FORMAT :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gssize. It is a
--   string literal.
--   
--   Since: 2.6
pattern GSSIZE_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gssize. See also
--   GINT16_FORMAT.
--   
--   Since: 2.6
pattern GSSIZE_FORMAT :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gsize. It is a
--   string literal.
--   
--   Since: 2.6
pattern GSIZE_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gsize. See also
--   GINT16_FORMAT.
--   
--   Since: 2.6
pattern GSIZE_FORMAT :: () => () => Text

-- | Expands to "" on all modern compilers, and to PRETTY_FUNCTION
--   on gcc version 2.x. Don't use it.

-- | Deprecated: (Since version 2.16)Use G_STRFUNC()
--   instead
pattern GNUC_PRETTY_FUNCTION :: () => () => Text

-- | Expands to "" on all modern compilers, and to FUNCTION on gcc
--   version 2.x. Don't use it.

-- | Deprecated: (Since version 2.16)Use G_STRFUNC()
--   instead
pattern GNUC_FUNCTION :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gintptr or
--   guintptr. It is a string literal.
--   
--   Since: 2.22
pattern GINTPTR_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gintptr.
--   
--   Since: 2.22
pattern GINTPTR_FORMAT :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gint64 or
--   guint64. It is a string literal.
--   
--   Some platforms do not support printing 64-bit integers, even though
--   the types are supported. On such platforms GINT64_MODIFIER is
--   not defined.
--   
--   Since: 2.4
pattern GINT64_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gint64. See also
--   GINT16_FORMAT.
--   
--   Some platforms do not support scanning and printing 64-bit integers,
--   even though the types are supported. On such platforms
--   GINT64_FORMAT is not defined. Note that scanf()
--   may not support 64-bit integers, even if GINT64_FORMAT is
--   defined. Due to its weak error handling, scanf() is
--   not recommended for parsing anyway; consider using
--   asciiStrtoull instead.
pattern GINT64_FORMAT :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gint32 or
--   guint32. It is a string literal. See also
--   GINT16_MODIFIER.
--   
--   Since: 2.4
pattern GINT32_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gint32. See also
--   GINT16_FORMAT.
pattern GINT32_FORMAT :: () => () => Text

-- | The platform dependent length modifier for conversion specifiers for
--   scanning and printing values of type gint16 or
--   guint16. It is a string literal, but doesn't include
--   the percent-sign, such that you can add precision and length modifiers
--   between percent-sign and conversion specifier and append a conversion
--   specifier.
--   
--   The following example prints "0x7b";
--   
--   
C code
--   
--   
--   gint16 value = 123;
--   g_print ("%#" G_GINT16_MODIFIER "x", value);
--   
--   
--   Since: 2.4
pattern GINT16_MODIFIER :: () => () => Text

-- | This is the platform dependent conversion specifier for scanning and
--   printing values of type gint16. It is a string
--   literal, but doesn't include the percent-sign, such that you can add
--   precision and length modifiers between percent-sign and conversion
--   specifier.
--   
--   
C code
--   
--   
--   gint16 in;
--   gint32 out;
--   sscanf ("42", "%" G_GINT16_FORMAT, &in)
--   out = in * 1000;
--   g_print ("%" G_GINT32_FORMAT, out);
--   
pattern GINT16_FORMAT :: () => () => Text

-- | The base of natural logarithms.
pattern E :: () => () => Double

-- | The directory separator as a string. This is "/" on UNIX machines and
--   "\" under Windows.
pattern DIR_SEPARATOR_S :: () => () => Text

-- | The directory separator character. This is '/' on UNIX machines and
--   '\' under Windows.
pattern DIR_SEPARATOR :: () => () => Int32

-- | Represents an invalid year.
pattern DATE_BAD_YEAR :: () => () => Int32

-- | Represents an invalid Julian day number.
pattern DATE_BAD_JULIAN :: () => () => Int32

-- | Represents an invalid GDateDay.
pattern DATE_BAD_DAY :: () => () => Int32

-- | A bitmask that restricts the possible flags passed to
--   datalistSetFlags. Passing a flags value where flags &
--   ~G_DATALIST_FLAGS_MASK != 0 is an error.
pattern DATALIST_FLAGS_MASK :: () => () => Int32

-- | The set of lowercase ASCII alphabet characters. Used for specifying
--   valid identifier characters in ScannerConfig.
pattern CSET_a_2_z :: () => () => Text

-- | The set of ASCII digits. Used for specifying valid identifier
--   characters in ScannerConfig.
pattern CSET_DIGITS :: () => () => Text

-- | The set of uppercase ASCII alphabet characters. Used for specifying
--   valid identifier characters in ScannerConfig.
pattern CSET_A_2_Z :: () => () => Text

-- | Specifies one of the possible types of byte order. See
--   G_BYTE_ORDER.
pattern BIG_ENDIAN :: () => () => Int32

-- | A good size for a buffer to be passed into asciiDtostr. It is
--   guaranteed to be enough for all output of that function on systems
--   with 64bit IEEE-compatible doubles.
--   
--   The typical usage would be something like:
--   
--   
C code
--   
--   
--   char buf[G_ASCII_DTOSTR_BUF_SIZE];
--   
--   fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value));
--   
pattern ASCII_DTOSTR_BUF_SIZE :: () => () => Int32

-- | No description available in the introspection data.
pattern ANALYZER_ANALYZING :: () => () => Int32

module GI.GLib.Enums

-- | Error codes returned by bookmark file parsing.
data BookmarkFileError

-- | URI was ill-formed
BookmarkFileErrorInvalidUri :: BookmarkFileError

-- | a requested field was not found
BookmarkFileErrorInvalidValue :: BookmarkFileError

-- | a requested application did not register a bookmark
BookmarkFileErrorAppNotRegistered :: BookmarkFileError

-- | a requested URI was not found
BookmarkFileErrorUriNotFound :: BookmarkFileError

-- | document was ill formed
BookmarkFileErrorRead :: BookmarkFileError

-- | the text being parsed was in an unknown encoding
BookmarkFileErrorUnknownEncoding :: BookmarkFileError

-- | an error occurred while writing
BookmarkFileErrorWrite :: BookmarkFileError

-- | requested file was not found
BookmarkFileErrorFileNotFound :: BookmarkFileError

-- | Catch-all for unknown values
AnotherBookmarkFileError :: Int -> BookmarkFileError

-- | Catch exceptions of type BookmarkFileError. This is a
--   specialized version of catchGErrorJustDomain.
catchBookmarkFileError :: IO a -> (BookmarkFileError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type BookmarkFileError. This is a
--   specialized version of handleGErrorJustDomain.
handleBookmarkFileError :: (BookmarkFileError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The hashing algorithm to be used by Checksum when performing
--   the digest of some data.
--   
--   Note that the ChecksumType enumeration may be extended at a
--   later date to include new hashing algorithm types.
--   
--   Since: 2.16
data ChecksumType

-- | Use the MD5 hashing algorithm
ChecksumTypeMd5 :: ChecksumType

-- | Use the SHA-1 hashing algorithm
ChecksumTypeSha1 :: ChecksumType

-- | Use the SHA-256 hashing algorithm
ChecksumTypeSha256 :: ChecksumType

-- | Use the SHA-512 hashing algorithm (Since: 2.36)
ChecksumTypeSha512 :: ChecksumType

-- | Use the SHA-384 hashing algorithm (Since: 2.51)
ChecksumTypeSha384 :: ChecksumType

-- | Catch-all for unknown values
AnotherChecksumType :: Int -> ChecksumType

-- | Error codes returned by character set conversion routines.
data ConvertError

-- | Conversion between the requested character sets is not supported.
ConvertErrorNoConversion :: ConvertError

-- | Invalid byte sequence in conversion input; or the character sequence
--   could not be represented in the target character set.
ConvertErrorIllegalSequence :: ConvertError

-- | Conversion failed for some reason.
ConvertErrorFailed :: ConvertError

-- | Partial character sequence at end of input.
ConvertErrorPartialInput :: ConvertError

-- | URI is invalid.
ConvertErrorBadUri :: ConvertError

-- | Pathname is not an absolute path.
ConvertErrorNotAbsolutePath :: ConvertError

-- | No memory available. Since: 2.40
ConvertErrorNoMemory :: ConvertError

-- | An embedded NUL character is present in conversion output where a
--   NUL-terminated string is expected. Since: 2.56
ConvertErrorEmbeddedNul :: ConvertError

-- | Catch-all for unknown values
AnotherConvertError :: Int -> ConvertError

-- | Catch exceptions of type ConvertError. This is a specialized
--   version of catchGErrorJustDomain.
catchConvertError :: IO a -> (ConvertError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type ConvertError. This is a specialized
--   version of handleGErrorJustDomain.
handleConvertError :: (ConvertError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | This enumeration isn't used in the API, but may be useful if you need
--   to mark a number as a day, month, or year.
data DateDMY

-- | a day
DateDMYDay :: DateDMY

-- | a month
DateDMYMonth :: DateDMY

-- | a year
DateDMYYear :: DateDMY

-- | Catch-all for unknown values
AnotherDateDMY :: Int -> DateDMY

-- | Enumeration representing a month; values are
--   G_DATE_JANUARY, G_DATE_FEBRUARY, etc.
--   G_DATE_BAD_MONTH is the invalid value.
data DateMonth

-- | invalid value
DateMonthBadMonth :: DateMonth

-- | January
DateMonthJanuary :: DateMonth

-- | February
DateMonthFebruary :: DateMonth

-- | March
DateMonthMarch :: DateMonth

-- | April
DateMonthApril :: DateMonth

-- | May
DateMonthMay :: DateMonth

-- | June
DateMonthJune :: DateMonth

-- | July
DateMonthJuly :: DateMonth

-- | August
DateMonthAugust :: DateMonth

-- | September
DateMonthSeptember :: DateMonth

-- | October
DateMonthOctober :: DateMonth

-- | November
DateMonthNovember :: DateMonth

-- | December
DateMonthDecember :: DateMonth

-- | Catch-all for unknown values
AnotherDateMonth :: Int -> DateMonth

-- | Enumeration representing a day of the week;
--   G_DATE_MONDAY, G_DATE_TUESDAY, etc.
--   G_DATE_BAD_WEEKDAY is an invalid weekday.
data DateWeekday

-- | invalid value
DateWeekdayBadWeekday :: DateWeekday

-- | Monday
DateWeekdayMonday :: DateWeekday

-- | Tuesday
DateWeekdayTuesday :: DateWeekday

-- | Wednesday
DateWeekdayWednesday :: DateWeekday

-- | Thursday
DateWeekdayThursday :: DateWeekday

-- | Friday
DateWeekdayFriday :: DateWeekday

-- | Saturday
DateWeekdaySaturday :: DateWeekday

-- | Sunday
DateWeekdaySunday :: DateWeekday

-- | Catch-all for unknown values
AnotherDateWeekday :: Int -> DateWeekday

-- | The possible errors, used in the vError field of
--   TokenValue, when the token is a TokenTypeError.
data ErrorType

-- | unknown error
ErrorTypeUnknown :: ErrorType

-- | unexpected end of file
ErrorTypeUnexpEof :: ErrorType

-- | unterminated string constant
ErrorTypeUnexpEofInString :: ErrorType

-- | unterminated comment
ErrorTypeUnexpEofInComment :: ErrorType

-- | non-digit character in a number
ErrorTypeNonDigitInConst :: ErrorType

-- | digit beyond radix in a number
ErrorTypeDigitRadix :: ErrorType

-- | non-decimal floating point number
ErrorTypeFloatRadix :: ErrorType

-- | malformed floating point number
ErrorTypeFloatMalformed :: ErrorType

-- | Catch-all for unknown values
AnotherErrorType :: Int -> ErrorType

-- | Values corresponding to errno codes returned from file
--   operations on UNIX. Unlike errno codes, GFileError
--   values are available on all systems, even Windows. The exact meaning
--   of each code depends on what sort of file operation you were
--   performing; the UNIX documentation gives more details. The following
--   error code descriptions come from the GNU C Library manual, and are
--   under the copyright of that manual.
--   
--   It's not very portable to make detailed assumptions about exactly
--   which errors will be returned from a given operation. Some errors
--   don't occur on some systems, etc., sometimes there are subtle
--   differences in when a system will report a given error, etc.
data FileError

-- | Operation not permitted; only the owner of the file (or other
--   resource) or processes with special privileges can perform the
--   operation.
FileErrorExist :: FileError

-- | File is a directory; you cannot open a directory for writing, or
--   create or remove hard links to it.
FileErrorIsdir :: FileError

-- | Permission denied; the file permissions do not allow the attempted
--   operation.
FileErrorAcces :: FileError

-- | Filename too long.
FileErrorNametoolong :: FileError

-- | No such file or directory. This is a "file doesn't exist" error for
--   ordinary files that are referenced in contexts where they are expected
--   to already exist.
FileErrorNoent :: FileError

-- | A file that isn't a directory was specified when a directory is
--   required.
FileErrorNotdir :: FileError

-- | No such device or address. The system tried to use the device
--   represented by a file you specified, and it couldn't find the device.
--   This can mean that the device file was installed incorrectly, or that
--   the physical device is missing or not correctly attached to the
--   computer.
FileErrorNxio :: FileError

-- | The underlying file system of the specified file does not support
--   memory mapping.
FileErrorNodev :: FileError

-- | The directory containing the new link can't be modified because it's
--   on a read-only file system.
FileErrorRofs :: FileError

-- | Text file busy.
FileErrorTxtbsy :: FileError

-- | You passed in a pointer to bad memory. (GLib won't reliably return
--   this, don't pass in pointers to bad memory.)
FileErrorFault :: FileError

-- | Too many levels of symbolic links were encountered in looking up a
--   file name. This often indicates a cycle of symbolic links.
FileErrorLoop :: FileError

-- | No space left on device; write operation on a file failed because the
--   disk is full.
FileErrorNospc :: FileError

-- | No memory available. The system cannot allocate more virtual memory
--   because its capacity is full.
FileErrorNomem :: FileError

-- | The current process has too many files open and can't open any more.
--   Duplicate descriptors do count toward this limit.
FileErrorMfile :: FileError

-- | There are too many distinct file openings in the entire system.
FileErrorNfile :: FileError

-- | Bad file descriptor; for example, I/O on a descriptor that has been
--   closed or reading from a descriptor open only for writing (or vice
--   versa).
FileErrorBadf :: FileError

-- | Invalid argument. This is used to indicate various kinds of problems
--   with passing the wrong argument to a library function.
FileErrorInval :: FileError

-- | Broken pipe; there is no process reading from the other end of a pipe.
--   Every library function that returns this error code also generates a
--   'SIGPIPE' signal; this signal terminates the program if not handled or
--   blocked. Thus, your program will never actually see this code unless
--   it has handled or blocked 'SIGPIPE'.
FileErrorPipe :: FileError

-- | Resource temporarily unavailable; the call might work if you try again
--   later.
FileErrorAgain :: FileError

-- | Interrupted function call; an asynchronous signal occurred and
--   prevented completion of the call. When this happens, you should try
--   the call again.
FileErrorIntr :: FileError

-- | Input/output error; usually used for physical read or write errors.
--   i.e. the disk or other physical device hardware is returning errors.
FileErrorIo :: FileError

-- | Operation not permitted; only the owner of the file (or other
--   resource) or processes with special privileges can perform the
--   operation.
FileErrorPerm :: FileError

-- | Function not implemented; this indicates that the system is missing
--   some functionality.
FileErrorNosys :: FileError

-- | Does not correspond to a UNIX error code; this is the standard "failed
--   for unspecified reason" error code present in all GError error
--   code enumerations. Returned if no specific code applies.
FileErrorFailed :: FileError

-- | Catch-all for unknown values
AnotherFileError :: Int -> FileError

-- | Catch exceptions of type FileError. This is a specialized
--   version of catchGErrorJustDomain.
catchFileError :: IO a -> (FileError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type FileError. This is a specialized
--   version of handleGErrorJustDomain.
handleFileError :: (FileError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Error codes returned by IOChannel operations.
data IOChannelError

-- | File too large.
IOChannelErrorFbig :: IOChannelError

-- | Invalid argument.
IOChannelErrorInval :: IOChannelError

-- | IO error.
IOChannelErrorIo :: IOChannelError

-- | File is a directory.
IOChannelErrorIsdir :: IOChannelError

-- | No space left on device.
IOChannelErrorNospc :: IOChannelError

-- | No such device or address.
IOChannelErrorNxio :: IOChannelError

-- | Value too large for defined datatype.
IOChannelErrorOverflow :: IOChannelError

-- | Broken pipe.
IOChannelErrorPipe :: IOChannelError

-- | Some other error.
IOChannelErrorFailed :: IOChannelError

-- | Catch-all for unknown values
AnotherIOChannelError :: Int -> IOChannelError

-- | Catch exceptions of type IOChannelError. This is a specialized
--   version of catchGErrorJustDomain.
catchIOChannelError :: IO a -> (IOChannelError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type IOChannelError. This is a specialized
--   version of handleGErrorJustDomain.
handleIOChannelError :: (IOChannelError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | IOError is only used by the deprecated functions
--   iOChannelRead, iOChannelWrite, and iOChannelSeek.
data IOError

-- | no error
IOErrorNone :: IOError

-- | an EAGAIN error occurred
IOErrorAgain :: IOError

-- | an EINVAL error occurred
IOErrorInval :: IOError

-- | another error occurred
IOErrorUnknown :: IOError

-- | Catch-all for unknown values
AnotherIOError :: Int -> IOError

-- | Stati returned by most of the IOFuncs functions.
data IOStatus

-- | An error occurred.
IOStatusError :: IOStatus

-- | Success.
IOStatusNormal :: IOStatus

-- | End of file.
IOStatusEof :: IOStatus

-- | Resource temporarily unavailable.
IOStatusAgain :: IOStatus

-- | Catch-all for unknown values
AnotherIOStatus :: Int -> IOStatus

-- | Error codes returned by key file parsing.
data KeyFileError

-- | the text being parsed was in an unknown encoding
KeyFileErrorUnknownEncoding :: KeyFileError

-- | document was ill-formed
KeyFileErrorParse :: KeyFileError

-- | the file was not found
KeyFileErrorNotFound :: KeyFileError

-- | a requested key was not found
KeyFileErrorKeyNotFound :: KeyFileError

-- | a requested group was not found
KeyFileErrorGroupNotFound :: KeyFileError

-- | a value could not be parsed
KeyFileErrorInvalidValue :: KeyFileError

-- | Catch-all for unknown values
AnotherKeyFileError :: Int -> KeyFileError

-- | Catch exceptions of type KeyFileError. This is a specialized
--   version of catchGErrorJustDomain.
catchKeyFileError :: IO a -> (KeyFileError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type KeyFileError. This is a specialized
--   version of handleGErrorJustDomain.
handleKeyFileError :: (KeyFileError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Return values from GLogWriterFuncs to indicate whether
--   the given log entry was successfully handled by the writer, or whether
--   there was an error in handling it (and hence a fallback writer should
--   be used).
--   
--   If a LogWriterFunc ignores a log entry, it should return
--   LogWriterOutputHandled.
--   
--   Since: 2.50
data LogWriterOutput

-- | Log writer has handled the log entry.
LogWriterOutputHandled :: LogWriterOutput

-- | Log writer could not handle the log entry.
LogWriterOutputUnhandled :: LogWriterOutput

-- | Catch-all for unknown values
AnotherLogWriterOutput :: Int -> LogWriterOutput

-- | Error codes returned by markup parsing.
data MarkupError

-- | text being parsed was not valid UTF-8
MarkupErrorBadUtf8 :: MarkupError

-- | document contained nothing, or only whitespace
MarkupErrorEmpty :: MarkupError

-- | document was ill-formed
MarkupErrorParse :: MarkupError

-- | error should be set by MarkupParser functions; element wasn't
--   known
MarkupErrorUnknownElement :: MarkupError

-- | error should be set by MarkupParser functions; attribute wasn't
--   known
MarkupErrorUnknownAttribute :: MarkupError

-- | error should be set by MarkupParser functions; content was
--   invalid
MarkupErrorInvalidContent :: MarkupError

-- | error should be set by MarkupParser functions; a required
--   attribute was missing
MarkupErrorMissingAttribute :: MarkupError

-- | Catch-all for unknown values
AnotherMarkupError :: Int -> MarkupError

-- | Catch exceptions of type MarkupError. This is a specialized
--   version of catchGErrorJustDomain.
catchMarkupError :: IO a -> (MarkupError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type MarkupError. This is a specialized
--   version of handleGErrorJustDomain.
handleMarkupError :: (MarkupError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Defines how a Unicode string is transformed in a canonical form,
--   standardizing such issues as whether a character with an accent is
--   represented as a base character and combining accent or as a single
--   precomposed character. Unicode strings should generally be normalized
--   before comparing them.
data NormalizeMode

-- | standardize differences that do not affect the text content, such as
--   the above-mentioned accent representation
NormalizeModeDefault :: NormalizeMode

-- | another name for NormalizeModeDefault
NormalizeModeNfd :: NormalizeMode

-- | like NormalizeModeDefault, but with composed forms rather than
--   a maximally decomposed form
NormalizeModeDefaultCompose :: NormalizeMode

-- | another name for NormalizeModeDefaultCompose
NormalizeModeNfc :: NormalizeMode

-- | beyond NormalizeModeDefault also standardize the
--   "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to
--   the standard forms (in this case DIGIT THREE). Formatting information
--   may be lost but for most text operations such characters should be
--   considered the same
NormalizeModeAll :: NormalizeMode

-- | another name for NormalizeModeAll
NormalizeModeNfkd :: NormalizeMode

-- | like NormalizeModeAll, but with composed forms rather than a
--   maximally decomposed form
NormalizeModeAllCompose :: NormalizeMode

-- | another name for NormalizeModeAllCompose
NormalizeModeNfkc :: NormalizeMode

-- | Catch-all for unknown values
AnotherNormalizeMode :: Int -> NormalizeMode

-- | Error codes returned by functions converting a string to a number.
--   
--   Since: 2.54
data NumberParserError

-- | String was not a valid number.
NumberParserErrorInvalid :: NumberParserError

-- | String was a number, but out of bounds.
NumberParserErrorOutOfBounds :: NumberParserError

-- | Catch-all for unknown values
AnotherNumberParserError :: Int -> NumberParserError

-- | Catch exceptions of type NumberParserError. This is a
--   specialized version of catchGErrorJustDomain.
catchNumberParserError :: IO a -> (NumberParserError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type NumberParserError. This is a
--   specialized version of handleGErrorJustDomain.
handleNumberParserError :: (NumberParserError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The possible statuses of a one-time initialization function controlled
--   by a Once struct.
--   
--   Since: 2.4
data OnceStatus

-- | the function has not been called yet.
OnceStatusNotcalled :: OnceStatus

-- | the function call is currently in progress.
OnceStatusProgress :: OnceStatus

-- | the function has been called.
OnceStatusReady :: OnceStatus

-- | Catch-all for unknown values
AnotherOnceStatus :: Int -> OnceStatus

-- | The OptionArg enum values determine which type of extra
--   argument the options expect to find. If an option expects an extra
--   argument, it can be specified in several ways; with a short option:
--   -x arg, with a long option: --name arg or combined
--   in a single argument: --name=arg.
data OptionArg

-- | No extra argument. This is useful for simple flags.
OptionArgNone :: OptionArg

-- | The option takes a string argument.
OptionArgString :: OptionArg

-- | The option takes an integer argument.
OptionArgInt :: OptionArg

-- | The option provides a callback (of type OptionArgFunc) to parse
--   the extra argument.
OptionArgCallback :: OptionArg

-- | The option takes a filename as argument.
OptionArgFilename :: OptionArg

-- | The option takes a string argument, multiple uses of the option are
--   collected into an array of strings.
OptionArgStringArray :: OptionArg

-- | The option takes a filename as argument, multiple uses of the option
--   are collected into an array of strings.
OptionArgFilenameArray :: OptionArg

-- | The option takes a double argument. The argument can be formatted
--   either for the user's locale or for the "C" locale. Since 2.12
OptionArgDouble :: OptionArg

-- | The option takes a 64-bit integer. Like OptionArgInt but for
--   larger numbers. The number can be in decimal base, or in hexadecimal
--   (when prefixed with 0x, for example, 0xffffffff).
--   Since 2.12
OptionArgInt64 :: OptionArg

-- | Catch-all for unknown values
AnotherOptionArg :: Int -> OptionArg

-- | Error codes returned by option parsing.
data OptionError

-- | An option was not known to the parser. This error will only be
--   reported, if the parser hasn't been instructed to ignore unknown
--   options, see optionContextSetIgnoreUnknownOptions.
OptionErrorUnknownOption :: OptionError

-- | A value couldn't be parsed.
OptionErrorBadValue :: OptionError

-- | A OptionArgFunc callback failed.
OptionErrorFailed :: OptionError

-- | Catch-all for unknown values
AnotherOptionError :: Int -> OptionError

-- | Catch exceptions of type OptionError. This is a specialized
--   version of catchGErrorJustDomain.
catchOptionError :: IO a -> (OptionError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type OptionError. This is a specialized
--   version of handleGErrorJustDomain.
handleOptionError :: (OptionError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Error codes returned by regular expressions functions.
--   
--   Since: 2.14
data RegexError

-- | Compilation of the regular expression failed.
RegexErrorCompile :: RegexError

-- | Optimization of the regular expression failed.
RegexErrorOptimize :: RegexError

-- | Replacement failed due to an ill-formed replacement string.
RegexErrorReplace :: RegexError

-- | The match process failed.
RegexErrorMatch :: RegexError

-- | Internal error of the regular expression engine. Since 2.16
RegexErrorInternal :: RegexError

-- | "\" at end of pattern. Since 2.16
RegexErrorStrayBackslash :: RegexError

-- | "\c" at end of pattern. Since 2.16
RegexErrorMissingControlChar :: RegexError

-- | Unrecognized character follows "\". Since 2.16
RegexErrorUnrecognizedEscape :: RegexError

-- | Numbers out of order in "{}" quantifier. Since 2.16
RegexErrorQuantifiersOutOfOrder :: RegexError

-- | Number too big in "{}" quantifier. Since 2.16
RegexErrorQuantifierTooBig :: RegexError

-- | Missing terminating "]" for character class. Since 2.16
RegexErrorUnterminatedCharacterClass :: RegexError

-- | Invalid escape sequence in character class. Since 2.16
RegexErrorInvalidEscapeInCharacterClass :: RegexError

-- | Range out of order in character class. Since 2.16
RegexErrorRangeOutOfOrder :: RegexError

-- | Nothing to repeat. Since 2.16
RegexErrorNothingToRepeat :: RegexError

-- | Unrecognized character after "(?", "(?<" or "(?P". Since 2.16
RegexErrorUnrecognizedCharacter :: RegexError

-- | POSIX named classes are supported only within a class. Since 2.16
RegexErrorPosixNamedClassOutsideClass :: RegexError

-- | Missing terminating ")" or ")" without opening "(". Since 2.16
RegexErrorUnmatchedParenthesis :: RegexError

-- | Reference to non-existent subpattern. Since 2.16
RegexErrorInexistentSubpatternReference :: RegexError

-- | Missing terminating ")" after comment. Since 2.16
RegexErrorUnterminatedComment :: RegexError

-- | Regular expression too large. Since 2.16
RegexErrorExpressionTooLarge :: RegexError

-- | Failed to get memory. Since 2.16
RegexErrorMemoryError :: RegexError

-- | Lookbehind assertion is not fixed length. Since 2.16
RegexErrorVariableLengthLookbehind :: RegexError

-- | Malformed number or name after "(?(". Since 2.16
RegexErrorMalformedCondition :: RegexError

-- | Conditional group contains more than two branches. Since 2.16
RegexErrorTooManyConditionalBranches :: RegexError

-- | Assertion expected after "(?(". Since 2.16
RegexErrorAssertionExpected :: RegexError

-- | Unknown POSIX class name. Since 2.16
RegexErrorUnknownPosixClassName :: RegexError

-- | POSIX collating elements are not supported. Since 2.16
RegexErrorPosixCollatingElementsNotSupported :: RegexError

-- | Character value in "\x{...}" sequence is too large. Since 2.16
RegexErrorHexCodeTooLarge :: RegexError

-- | Invalid condition "(?(0)". Since 2.16
RegexErrorInvalidCondition :: RegexError

-- | \C not allowed in lookbehind assertion. Since 2.16
RegexErrorSingleByteMatchInLookbehind :: RegexError

-- | Recursive call could loop indefinitely. Since 2.16
RegexErrorInfiniteLoop :: RegexError

-- | Missing terminator in subpattern name. Since 2.16
RegexErrorMissingSubpatternNameTerminator :: RegexError

-- | Two named subpatterns have the same name. Since 2.16
RegexErrorDuplicateSubpatternName :: RegexError

-- | Malformed "\P" or "\p" sequence. Since 2.16
RegexErrorMalformedProperty :: RegexError

-- | Unknown property name after "\P" or "\p". Since 2.16
RegexErrorUnknownProperty :: RegexError

-- | Subpattern name is too long (maximum 32 characters). Since 2.16
RegexErrorSubpatternNameTooLong :: RegexError

-- | Too many named subpatterns (maximum 10,000). Since 2.16
RegexErrorTooManySubpatterns :: RegexError

-- | Octal value is greater than "\377". Since 2.16
RegexErrorInvalidOctalValue :: RegexError

-- | "DEFINE" group contains more than one branch. Since 2.16
RegexErrorTooManyBranchesInDefine :: RegexError

-- | Repeating a "DEFINE" group is not allowed. This error is never raised.
--   Since: 2.16 Deprecated: 2.34
RegexErrorDefineRepetion :: RegexError

-- | Inconsistent newline options. Since 2.16
RegexErrorInconsistentNewlineOptions :: RegexError

-- | "\g" is not followed by a braced, angle-bracketed, or quoted name or
--   number, or by a plain number. Since: 2.16
RegexErrorMissingBackReference :: RegexError

-- | relative reference must not be zero. Since: 2.34
RegexErrorInvalidRelativeReference :: RegexError

-- | the backtracing control verb used does not allow an argument. Since:
--   2.34
RegexErrorBacktrackingControlVerbArgumentForbidden :: RegexError

-- | unknown backtracing control verb. Since: 2.34
RegexErrorUnknownBacktrackingControlVerb :: RegexError

-- | number is too big in escape sequence. Since: 2.34
RegexErrorNumberTooBig :: RegexError

-- | Missing subpattern name. Since: 2.34
RegexErrorMissingSubpatternName :: RegexError

-- | Missing digit. Since 2.34
RegexErrorMissingDigit :: RegexError

-- | In JavaScript compatibility mode, "[" is an invalid data character.
--   Since: 2.34
RegexErrorInvalidDataCharacter :: RegexError

-- | different names for subpatterns of the same number are not allowed.
--   Since: 2.34
RegexErrorExtraSubpatternName :: RegexError

-- | the backtracing control verb requires an argument. Since: 2.34
RegexErrorBacktrackingControlVerbArgumentRequired :: RegexError

-- | "\c" must be followed by an ASCII character. Since: 2.34
RegexErrorInvalidControlChar :: RegexError

-- | "\k" is not followed by a braced, angle-bracketed, or quoted name.
--   Since: 2.34
RegexErrorMissingName :: RegexError

-- | "\N" is not supported in a class. Since: 2.34
RegexErrorNotSupportedInClass :: RegexError

-- | too many forward references. Since: 2.34
RegexErrorTooManyForwardReferences :: RegexError

-- | the name is too long in "(*MARK)", "(*PRUNE)", "(*SKIP)", or
--   "(*THEN)". Since: 2.34
RegexErrorNameTooLong :: RegexError

-- | the character value in the \u sequence is too large. Since: 2.34
RegexErrorCharacterValueTooLarge :: RegexError

-- | Catch-all for unknown values
AnotherRegexError :: Int -> RegexError

-- | Catch exceptions of type RegexError. This is a specialized
--   version of catchGErrorJustDomain.
catchRegexError :: IO a -> (RegexError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type RegexError. This is a specialized
--   version of handleGErrorJustDomain.
handleRegexError :: (RegexError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | An enumeration specifying the base position for a
--   iOChannelSeekPosition operation.
data SeekType

-- | the current position in the file.
SeekTypeCur :: SeekType

-- | the start of the file.
SeekTypeSet :: SeekType

-- | the end of the file.
SeekTypeEnd :: SeekType

-- | Catch-all for unknown values
AnotherSeekType :: Int -> SeekType

-- | Error codes returned by shell functions.
data ShellError

-- | Mismatched or otherwise mangled quoting.
ShellErrorBadQuoting :: ShellError

-- | String to be parsed was empty.
ShellErrorEmptyString :: ShellError

-- | Some other error.
ShellErrorFailed :: ShellError

-- | Catch-all for unknown values
AnotherShellError :: Int -> ShellError

-- | Catch exceptions of type ShellError. This is a specialized
--   version of catchGErrorJustDomain.
catchShellError :: IO a -> (ShellError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type ShellError. This is a specialized
--   version of handleGErrorJustDomain.
handleShellError :: (ShellError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | No description available in the introspection data.
data SliceConfig

-- | No description available in the introspection data.
SliceConfigAlwaysMalloc :: SliceConfig

-- | No description available in the introspection data.
SliceConfigBypassMagazines :: SliceConfig

-- | No description available in the introspection data.
SliceConfigWorkingSetMsecs :: SliceConfig

-- | No description available in the introspection data.
SliceConfigColorIncrement :: SliceConfig

-- | No description available in the introspection data.
SliceConfigChunkSizes :: SliceConfig

-- | No description available in the introspection data.
SliceConfigContentionCounter :: SliceConfig

-- | Catch-all for unknown values
AnotherSliceConfig :: Int -> SliceConfig

-- | Error codes returned by spawning processes.
data SpawnError

-- | Fork failed due to lack of memory.
SpawnErrorFork :: SpawnError

-- | Read or select on pipes failed.
SpawnErrorRead :: SpawnError

-- | Changing to working directory failed.
SpawnErrorChdir :: SpawnError

-- | execv() returned EACCES
SpawnErrorAcces :: SpawnError

-- | execv() returned EPERM
SpawnErrorPerm :: SpawnError

-- | execv() returned E2BIG
SpawnErrorTooBig :: SpawnError

-- | deprecated alias for SpawnErrorTooBig
SpawnError2big :: SpawnError

-- | execv() returned ENOEXEC
SpawnErrorNoexec :: SpawnError

-- | execv() returned ENAMETOOLONG
SpawnErrorNametoolong :: SpawnError

-- | execv() returned ENOENT
SpawnErrorNoent :: SpawnError

-- | execv() returned ENOMEM
SpawnErrorNomem :: SpawnError

-- | execv() returned ENOTDIR
SpawnErrorNotdir :: SpawnError

-- | execv() returned ELOOP
SpawnErrorLoop :: SpawnError

-- | execv() returned ETXTBUSY
SpawnErrorTxtbusy :: SpawnError

-- | execv() returned EIO
SpawnErrorIo :: SpawnError

-- | execv() returned ENFILE
SpawnErrorNfile :: SpawnError

-- | execv() returned EMFILE
SpawnErrorMfile :: SpawnError

-- | execv() returned EINVAL
SpawnErrorInval :: SpawnError

-- | execv() returned EISDIR
SpawnErrorIsdir :: SpawnError

-- | execv() returned ELIBBAD
SpawnErrorLibbad :: SpawnError

-- | Some other fatal failure, error->message should explain.
SpawnErrorFailed :: SpawnError

-- | Catch-all for unknown values
AnotherSpawnError :: Int -> SpawnError

-- | Catch exceptions of type SpawnError. This is a specialized
--   version of catchGErrorJustDomain.
catchSpawnError :: IO a -> (SpawnError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type SpawnError. This is a specialized
--   version of handleGErrorJustDomain.
handleSpawnError :: (SpawnError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The type of file to return the filename for, when used with
--   g_test_build_filename().
--   
--   These two options correspond rather directly to the 'dist' and 'built'
--   terminology that automake uses and are explicitly used to distinguish
--   between the 'srcdir' and 'builddir' being separate. All files in your
--   project should either be dist (in the EXTRA_DIST or
--   dist_schema_DATA sense, in which case they will always be in
--   the srcdir) or built (in the BUILT_SOURCES sense, in which
--   case they will always be in the builddir).
--   
--   Note: as a general rule of automake, files that are generated only as
--   part of the build-from-git process (but then are distributed with the
--   tarball) always go in srcdir (even if doing a srcdir != builddir build
--   from git) and are considered as distributed files.
--   
--   Since: 2.38
data TestFileType

-- | a file that was included in the distribution tarball
TestFileTypeDist :: TestFileType

-- | a file that was built on the compiling machine
TestFileTypeBuilt :: TestFileType

-- | Catch-all for unknown values
AnotherTestFileType :: Int -> TestFileType

-- | No description available in the introspection data.
data TestLogType

-- | No description available in the introspection data.
TestLogTypeNone :: TestLogType

-- | No description available in the introspection data.
TestLogTypeError :: TestLogType

-- | No description available in the introspection data.
TestLogTypeStartBinary :: TestLogType

-- | No description available in the introspection data.
TestLogTypeListCase :: TestLogType

-- | No description available in the introspection data.
TestLogTypeSkipCase :: TestLogType

-- | No description available in the introspection data.
TestLogTypeStartCase :: TestLogType

-- | No description available in the introspection data.
TestLogTypeStopCase :: TestLogType

-- | No description available in the introspection data.
TestLogTypeMinResult :: TestLogType

-- | No description available in the introspection data.
TestLogTypeMaxResult :: TestLogType

-- | No description available in the introspection data.
TestLogTypeMessage :: TestLogType

-- | No description available in the introspection data.
TestLogTypeStartSuite :: TestLogType

-- | No description available in the introspection data.
TestLogTypeStopSuite :: TestLogType

-- | Catch-all for unknown values
AnotherTestLogType :: Int -> TestLogType

-- | No description available in the introspection data.
data TestResult

-- | No description available in the introspection data.
TestResultSuccess :: TestResult

-- | No description available in the introspection data.
TestResultSkipped :: TestResult

-- | No description available in the introspection data.
TestResultFailure :: TestResult

-- | No description available in the introspection data.
TestResultIncomplete :: TestResult

-- | Catch-all for unknown values
AnotherTestResult :: Int -> TestResult

-- | Possible errors of thread related functions.
data ThreadError

-- | a thread couldn't be created due to resource shortage. Try again
--   later.
ThreadErrorThreadErrorAgain :: ThreadError

-- | Catch-all for unknown values
AnotherThreadError :: Int -> ThreadError

-- | Catch exceptions of type ThreadError. This is a specialized
--   version of catchGErrorJustDomain.
catchThreadError :: IO a -> (ThreadError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type ThreadError. This is a specialized
--   version of handleGErrorJustDomain.
handleThreadError :: (ThreadError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Disambiguates a given time in two ways.
--   
--   First, specifies if the given time is in universal or local time.
--   
--   Second, if the time is in local time, specifies if it is local
--   standard time or local daylight time. This is important for the case
--   where the same local time occurs twice (during daylight savings time
--   transitions, for example).
data TimeType

-- | the time is in local standard time
TimeTypeStandard :: TimeType

-- | the time is in local daylight time
TimeTypeDaylight :: TimeType

-- | the time is in UTC
TimeTypeUniversal :: TimeType

-- | Catch-all for unknown values
AnotherTimeType :: Int -> TimeType

-- | The possible types of token returned from each
--   scannerGetNextToken call.
data TokenType

-- | the end of the file
TokenTypeEof :: TokenType

-- | a '(' character
TokenTypeLeftParen :: TokenType

-- | a ')' character
TokenTypeRightParen :: TokenType

-- | a '{' character
TokenTypeLeftCurly :: TokenType

-- | a '}' character
TokenTypeRightCurly :: TokenType

-- | a '[' character
TokenTypeLeftBrace :: TokenType

-- | a ']' character
TokenTypeRightBrace :: TokenType

-- | a '=' character
TokenTypeEqualSign :: TokenType

-- | a ',' character
TokenTypeComma :: TokenType

-- | not a token
TokenTypeNone :: TokenType

-- | an error occurred
TokenTypeError :: TokenType

-- | a character
TokenTypeChar :: TokenType

-- | a binary integer
TokenTypeBinary :: TokenType

-- | an octal integer
TokenTypeOctal :: TokenType

-- | an integer
TokenTypeInt :: TokenType

-- | a hex integer
TokenTypeHex :: TokenType

-- | a floating point number
TokenTypeFloat :: TokenType

-- | a string
TokenTypeString :: TokenType

-- | a symbol
TokenTypeSymbol :: TokenType

-- | an identifier
TokenTypeIdentifier :: TokenType

-- | a null identifier
TokenTypeIdentifierNull :: TokenType

-- | one line comment
TokenTypeCommentSingle :: TokenType

-- | multi line comment
TokenTypeCommentMulti :: TokenType

-- | Catch-all for unknown values
AnotherTokenType :: Int -> TokenType

-- | Specifies the type of traveral performed by
--   g_tree_traverse(), g_node_traverse()
--   and g_node_find(). The different orders are
--   illustrated here:
--   
--   
--   
- In order: A, B, C, D, E, F, G, H, I
--   
- Pre order: F, B, A, D, C, E, G, I, H
--   
- Post order: A, C, E, D, B, H, I, G, F
--   
- Level order: F, B, G, A, D, I, C, E, H
--   
data TraverseType

-- | vists a node's left child first, then the node itself, then its right
--   child. This is the one to use if you want the output sorted according
--   to the compare function.
TraverseTypeInOrder :: TraverseType

-- | visits a node, then its children.
TraverseTypePreOrder :: TraverseType

-- | visits the node's children, then the node itself.
TraverseTypePostOrder :: TraverseType

-- | is not implemented for [balanced binary
--   trees][glib-Balanced-Binary-Trees]. For [n-ary
--   trees][glib-N-ary-Trees], it vists the root node first, then its
--   children, then its grandchildren, and so on. Note that this is less
--   efficient than the other orders.
TraverseTypeLevelOrder :: TraverseType

-- | Catch-all for unknown values
AnotherTraverseType :: Int -> TraverseType

-- | These are the possible line break classifications.
--   
--   Since new unicode versions may add new types here, applications should
--   be ready to handle unknown values. They may be regarded as
--   UnicodeBreakTypeUnknown.
--   
--   See Unicode Line Breaking Algorithm.
data UnicodeBreakType

-- | Mandatory Break (BK)
UnicodeBreakTypeMandatory :: UnicodeBreakType

-- | Carriage Return (CR)
UnicodeBreakTypeCarriageReturn :: UnicodeBreakType

-- | Line Feed (LF)
UnicodeBreakTypeLineFeed :: UnicodeBreakType

-- | Attached Characters and Combining Marks (CM)
UnicodeBreakTypeCombiningMark :: UnicodeBreakType

-- | Surrogates (SG)
UnicodeBreakTypeSurrogate :: UnicodeBreakType

-- | Zero Width Space (ZW)
UnicodeBreakTypeZeroWidthSpace :: UnicodeBreakType

-- | Inseparable (IN)
UnicodeBreakTypeInseparable :: UnicodeBreakType

-- | Non-breaking ("Glue") (GL)
UnicodeBreakTypeNonBreakingGlue :: UnicodeBreakType

-- | Contingent Break Opportunity (CB)
UnicodeBreakTypeContingent :: UnicodeBreakType

-- | Space (SP)
UnicodeBreakTypeSpace :: UnicodeBreakType

-- | Break Opportunity After (BA)
UnicodeBreakTypeAfter :: UnicodeBreakType

-- | Break Opportunity Before (BB)
UnicodeBreakTypeBefore :: UnicodeBreakType

-- | Break Opportunity Before and After (B2)
UnicodeBreakTypeBeforeAndAfter :: UnicodeBreakType

-- | Hyphen (HY)
UnicodeBreakTypeHyphen :: UnicodeBreakType

-- | Nonstarter (NS)
UnicodeBreakTypeNonStarter :: UnicodeBreakType

-- | Opening Punctuation (OP)
UnicodeBreakTypeOpenPunctuation :: UnicodeBreakType

-- | Closing Punctuation (CL)
UnicodeBreakTypeClosePunctuation :: UnicodeBreakType

-- | Ambiguous Quotation (QU)
UnicodeBreakTypeQuotation :: UnicodeBreakType

-- | Exclamation/Interrogation (EX)
UnicodeBreakTypeExclamation :: UnicodeBreakType

-- | Ideographic (ID)
UnicodeBreakTypeIdeographic :: UnicodeBreakType

-- | Numeric (NU)
UnicodeBreakTypeNumeric :: UnicodeBreakType

-- | Infix Separator (Numeric) (IS)
UnicodeBreakTypeInfixSeparator :: UnicodeBreakType

-- | Symbols Allowing Break After (SY)
UnicodeBreakTypeSymbol :: UnicodeBreakType

-- | Ordinary Alphabetic and Symbol Characters (AL)
UnicodeBreakTypeAlphabetic :: UnicodeBreakType

-- | Prefix (Numeric) (PR)
UnicodeBreakTypePrefix :: UnicodeBreakType

-- | Postfix (Numeric) (PO)
UnicodeBreakTypePostfix :: UnicodeBreakType

-- | Complex Content Dependent (South East Asian) (SA)
UnicodeBreakTypeComplexContext :: UnicodeBreakType

-- | Ambiguous (Alphabetic or Ideographic) (AI)
UnicodeBreakTypeAmbiguous :: UnicodeBreakType

-- | Unknown (XX)
UnicodeBreakTypeUnknown :: UnicodeBreakType

-- | Next Line (NL)
UnicodeBreakTypeNextLine :: UnicodeBreakType

-- | Word Joiner (WJ)
UnicodeBreakTypeWordJoiner :: UnicodeBreakType

-- | Hangul L Jamo (JL)
UnicodeBreakTypeHangulLJamo :: UnicodeBreakType

-- | Hangul V Jamo (JV)
UnicodeBreakTypeHangulVJamo :: UnicodeBreakType

-- | Hangul T Jamo (JT)
UnicodeBreakTypeHangulTJamo :: UnicodeBreakType

-- | Hangul LV Syllable (H2)
UnicodeBreakTypeHangulLvSyllable :: UnicodeBreakType

-- | Hangul LVT Syllable (H3)
UnicodeBreakTypeHangulLvtSyllable :: UnicodeBreakType

-- | Closing Parenthesis (CP). Since 2.28
UnicodeBreakTypeCloseParanthesis :: UnicodeBreakType

-- | Conditional Japanese Starter (CJ). Since: 2.32
UnicodeBreakTypeConditionalJapaneseStarter :: UnicodeBreakType

-- | Hebrew Letter (HL). Since: 2.32
UnicodeBreakTypeHebrewLetter :: UnicodeBreakType

-- | Regional Indicator (RI). Since: 2.36
UnicodeBreakTypeRegionalIndicator :: UnicodeBreakType

-- | Emoji Base (EB). Since: 2.50
UnicodeBreakTypeEmojiBase :: UnicodeBreakType

-- | Emoji Modifier (EM). Since: 2.50
UnicodeBreakTypeEmojiModifier :: UnicodeBreakType

-- | Zero Width Joiner (ZWJ). Since: 2.50
UnicodeBreakTypeZeroWidthJoiner :: UnicodeBreakType

-- | Catch-all for unknown values
AnotherUnicodeBreakType :: Int -> UnicodeBreakType

-- | The UnicodeScript enumeration identifies different writing
--   systems. The values correspond to the names as defined in the Unicode
--   standard. The enumeration has been added in GLib 2.14, and is
--   interchangeable with PangoScript.
--   
--   Note that new types may be added in the future. Applications should be
--   ready to handle unknown values. See Unicode Standard Annex #24:
--   Script names.
data UnicodeScript

-- | a value never returned from unicharGetScript
UnicodeScriptInvalidCode :: UnicodeScript

-- | a character used by multiple different scripts
UnicodeScriptCommon :: UnicodeScript

-- | a mark glyph that takes its script from the base glyph to which it is
--   attached
UnicodeScriptInherited :: UnicodeScript

-- | Arabic
UnicodeScriptArabic :: UnicodeScript

-- | Armenian
UnicodeScriptArmenian :: UnicodeScript

-- | Bengali
UnicodeScriptBengali :: UnicodeScript

-- | Bopomofo
UnicodeScriptBopomofo :: UnicodeScript

-- | Cherokee
UnicodeScriptCherokee :: UnicodeScript

-- | Coptic
UnicodeScriptCoptic :: UnicodeScript

-- | Cyrillic
UnicodeScriptCyrillic :: UnicodeScript

-- | Deseret
UnicodeScriptDeseret :: UnicodeScript

-- | Devanagari
UnicodeScriptDevanagari :: UnicodeScript

-- | Ethiopic
UnicodeScriptEthiopic :: UnicodeScript

-- | Georgian
UnicodeScriptGeorgian :: UnicodeScript

-- | Gothic
UnicodeScriptGothic :: UnicodeScript

-- | Greek
UnicodeScriptGreek :: UnicodeScript

-- | Gujarati
UnicodeScriptGujarati :: UnicodeScript

-- | Gurmukhi
UnicodeScriptGurmukhi :: UnicodeScript

-- | Han
UnicodeScriptHan :: UnicodeScript

-- | Hangul
UnicodeScriptHangul :: UnicodeScript

-- | Hebrew
UnicodeScriptHebrew :: UnicodeScript

-- | Hiragana
UnicodeScriptHiragana :: UnicodeScript

-- | Kannada
UnicodeScriptKannada :: UnicodeScript

-- | Katakana
UnicodeScriptKatakana :: UnicodeScript

-- | Khmer
UnicodeScriptKhmer :: UnicodeScript

-- | Lao
UnicodeScriptLao :: UnicodeScript

-- | Latin
UnicodeScriptLatin :: UnicodeScript

-- | Malayalam
UnicodeScriptMalayalam :: UnicodeScript

-- | Mongolian
UnicodeScriptMongolian :: UnicodeScript

-- | Myanmar
UnicodeScriptMyanmar :: UnicodeScript

-- | Ogham
UnicodeScriptOgham :: UnicodeScript

-- | Old Italic
UnicodeScriptOldItalic :: UnicodeScript

-- | Oriya
UnicodeScriptOriya :: UnicodeScript

-- | Runic
UnicodeScriptRunic :: UnicodeScript

-- | Sinhala
UnicodeScriptSinhala :: UnicodeScript

-- | Syriac
UnicodeScriptSyriac :: UnicodeScript

-- | Tamil
UnicodeScriptTamil :: UnicodeScript

-- | Telugu
UnicodeScriptTelugu :: UnicodeScript

-- | Thaana
UnicodeScriptThaana :: UnicodeScript

-- | Thai
UnicodeScriptThai :: UnicodeScript

-- | Tibetan
UnicodeScriptTibetan :: UnicodeScript

-- | Canadian Aboriginal
UnicodeScriptCanadianAboriginal :: UnicodeScript

-- | Yi
UnicodeScriptYi :: UnicodeScript

-- | Tagalog
UnicodeScriptTagalog :: UnicodeScript

-- | Hanunoo
UnicodeScriptHanunoo :: UnicodeScript

-- | Buhid
UnicodeScriptBuhid :: UnicodeScript

-- | Tagbanwa
UnicodeScriptTagbanwa :: UnicodeScript

-- | Braille
UnicodeScriptBraille :: UnicodeScript

-- | Cypriot
UnicodeScriptCypriot :: UnicodeScript

-- | Limbu
UnicodeScriptLimbu :: UnicodeScript

-- | Osmanya
UnicodeScriptOsmanya :: UnicodeScript

-- | Shavian
UnicodeScriptShavian :: UnicodeScript

-- | Linear B
UnicodeScriptLinearB :: UnicodeScript

-- | Tai Le
UnicodeScriptTaiLe :: UnicodeScript

-- | Ugaritic
UnicodeScriptUgaritic :: UnicodeScript

-- | New Tai Lue
UnicodeScriptNewTaiLue :: UnicodeScript

-- | Buginese
UnicodeScriptBuginese :: UnicodeScript

-- | Glagolitic
UnicodeScriptGlagolitic :: UnicodeScript

-- | Tifinagh
UnicodeScriptTifinagh :: UnicodeScript

-- | Syloti Nagri
UnicodeScriptSylotiNagri :: UnicodeScript

-- | Old Persian
UnicodeScriptOldPersian :: UnicodeScript

-- | Kharoshthi
UnicodeScriptKharoshthi :: UnicodeScript

-- | an unassigned code point
UnicodeScriptUnknown :: UnicodeScript

-- | Balinese
UnicodeScriptBalinese :: UnicodeScript

-- | Cuneiform
UnicodeScriptCuneiform :: UnicodeScript

-- | Phoenician
UnicodeScriptPhoenician :: UnicodeScript

-- | Phags-pa
UnicodeScriptPhagsPa :: UnicodeScript

-- | N'Ko
UnicodeScriptNko :: UnicodeScript

-- | Kayah Li. Since 2.16.3
UnicodeScriptKayahLi :: UnicodeScript

-- | Lepcha. Since 2.16.3
UnicodeScriptLepcha :: UnicodeScript

-- | Rejang. Since 2.16.3
UnicodeScriptRejang :: UnicodeScript

-- | Sundanese. Since 2.16.3
UnicodeScriptSundanese :: UnicodeScript

-- | Saurashtra. Since 2.16.3
UnicodeScriptSaurashtra :: UnicodeScript

-- | Cham. Since 2.16.3
UnicodeScriptCham :: UnicodeScript

-- | Ol Chiki. Since 2.16.3
UnicodeScriptOlChiki :: UnicodeScript

-- | Vai. Since 2.16.3
UnicodeScriptVai :: UnicodeScript

-- | Carian. Since 2.16.3
UnicodeScriptCarian :: UnicodeScript

-- | Lycian. Since 2.16.3
UnicodeScriptLycian :: UnicodeScript

-- | Lydian. Since 2.16.3
UnicodeScriptLydian :: UnicodeScript

-- | Avestan. Since 2.26
UnicodeScriptAvestan :: UnicodeScript

-- | Bamum. Since 2.26
UnicodeScriptBamum :: UnicodeScript

-- | Egyptian Hieroglpyhs. Since 2.26
UnicodeScriptEgyptianHieroglyphs :: UnicodeScript

-- | Imperial Aramaic. Since 2.26
UnicodeScriptImperialAramaic :: UnicodeScript

-- | Inscriptional Pahlavi. Since 2.26
UnicodeScriptInscriptionalPahlavi :: UnicodeScript

-- | Inscriptional Parthian. Since 2.26
UnicodeScriptInscriptionalParthian :: UnicodeScript

-- | Javanese. Since 2.26
UnicodeScriptJavanese :: UnicodeScript

-- | Kaithi. Since 2.26
UnicodeScriptKaithi :: UnicodeScript

-- | Lisu. Since 2.26
UnicodeScriptLisu :: UnicodeScript

-- | Meetei Mayek. Since 2.26
UnicodeScriptMeeteiMayek :: UnicodeScript

-- | Old South Arabian. Since 2.26
UnicodeScriptOldSouthArabian :: UnicodeScript

-- | Old Turkic. Since 2.28
UnicodeScriptOldTurkic :: UnicodeScript

-- | Samaritan. Since 2.26
UnicodeScriptSamaritan :: UnicodeScript

-- | Tai Tham. Since 2.26
UnicodeScriptTaiTham :: UnicodeScript

-- | Tai Viet. Since 2.26
UnicodeScriptTaiViet :: UnicodeScript

-- | Batak. Since 2.28
UnicodeScriptBatak :: UnicodeScript

-- | Brahmi. Since 2.28
UnicodeScriptBrahmi :: UnicodeScript

-- | Mandaic. Since 2.28
UnicodeScriptMandaic :: UnicodeScript

-- | Chakma. Since: 2.32
UnicodeScriptChakma :: UnicodeScript

-- | Meroitic Cursive. Since: 2.32
UnicodeScriptMeroiticCursive :: UnicodeScript

-- | Meroitic Hieroglyphs. Since: 2.32
UnicodeScriptMeroiticHieroglyphs :: UnicodeScript

-- | Miao. Since: 2.32
UnicodeScriptMiao :: UnicodeScript

-- | Sharada. Since: 2.32
UnicodeScriptSharada :: UnicodeScript

-- | Sora Sompeng. Since: 2.32
UnicodeScriptSoraSompeng :: UnicodeScript

-- | Takri. Since: 2.32
UnicodeScriptTakri :: UnicodeScript

-- | Bassa. Since: 2.42
UnicodeScriptBassaVah :: UnicodeScript

-- | Caucasian Albanian. Since: 2.42
UnicodeScriptCaucasianAlbanian :: UnicodeScript

-- | Duployan. Since: 2.42
UnicodeScriptDuployan :: UnicodeScript

-- | Elbasan. Since: 2.42
UnicodeScriptElbasan :: UnicodeScript

-- | Grantha. Since: 2.42
UnicodeScriptGrantha :: UnicodeScript

-- | Kjohki. Since: 2.42
UnicodeScriptKhojki :: UnicodeScript

-- | Khudawadi, Sindhi. Since: 2.42
UnicodeScriptKhudawadi :: UnicodeScript

-- | Linear A. Since: 2.42
UnicodeScriptLinearA :: UnicodeScript

-- | Mahajani. Since: 2.42
UnicodeScriptMahajani :: UnicodeScript

-- | Manichaean. Since: 2.42
UnicodeScriptManichaean :: UnicodeScript

-- | Mende Kikakui. Since: 2.42
UnicodeScriptMendeKikakui :: UnicodeScript

-- | Modi. Since: 2.42
UnicodeScriptModi :: UnicodeScript

-- | Mro. Since: 2.42
UnicodeScriptMro :: UnicodeScript

-- | Nabataean. Since: 2.42
UnicodeScriptNabataean :: UnicodeScript

-- | Old North Arabian. Since: 2.42
UnicodeScriptOldNorthArabian :: UnicodeScript

-- | Old Permic. Since: 2.42
UnicodeScriptOldPermic :: UnicodeScript

-- | Pahawh Hmong. Since: 2.42
UnicodeScriptPahawhHmong :: UnicodeScript

-- | Palmyrene. Since: 2.42
UnicodeScriptPalmyrene :: UnicodeScript

-- | Pau Cin Hau. Since: 2.42
UnicodeScriptPauCinHau :: UnicodeScript

-- | Psalter Pahlavi. Since: 2.42
UnicodeScriptPsalterPahlavi :: UnicodeScript

-- | Siddham. Since: 2.42
UnicodeScriptSiddham :: UnicodeScript

-- | Tirhuta. Since: 2.42
UnicodeScriptTirhuta :: UnicodeScript

-- | Warang Citi. Since: 2.42
UnicodeScriptWarangCiti :: UnicodeScript

-- | Ahom. Since: 2.48
UnicodeScriptAhom :: UnicodeScript

-- | Anatolian Hieroglyphs. Since: 2.48
UnicodeScriptAnatolianHieroglyphs :: UnicodeScript

-- | Hatran. Since: 2.48
UnicodeScriptHatran :: UnicodeScript

-- | Multani. Since: 2.48
UnicodeScriptMultani :: UnicodeScript

-- | Old Hungarian. Since: 2.48
UnicodeScriptOldHungarian :: UnicodeScript

-- | Signwriting. Since: 2.48
UnicodeScriptSignwriting :: UnicodeScript

-- | Adlam. Since: 2.50
UnicodeScriptAdlam :: UnicodeScript

-- | Bhaiksuki. Since: 2.50
UnicodeScriptBhaiksuki :: UnicodeScript

-- | Marchen. Since: 2.50
UnicodeScriptMarchen :: UnicodeScript

-- | Newa. Since: 2.50
UnicodeScriptNewa :: UnicodeScript

-- | Osage. Since: 2.50
UnicodeScriptOsage :: UnicodeScript

-- | Tangut. Since: 2.50
UnicodeScriptTangut :: UnicodeScript

-- | Masaram Gondi. Since: 2.54
UnicodeScriptMasaramGondi :: UnicodeScript

-- | Nushu. Since: 2.54
UnicodeScriptNushu :: UnicodeScript

-- | Soyombo. Since: 2.54
UnicodeScriptSoyombo :: UnicodeScript

-- | Zanabazar Square. Since: 2.54
UnicodeScriptZanabazarSquare :: UnicodeScript

-- | Dogra. Since: 2.58
UnicodeScriptDogra :: UnicodeScript

-- | Gunjala Gondi. Since: 2.58
UnicodeScriptGunjalaGondi :: UnicodeScript

-- | Hanifi Rohingya. Since: 2.58
UnicodeScriptHanifiRohingya :: UnicodeScript

-- | Makasar. Since: 2.58
UnicodeScriptMakasar :: UnicodeScript

-- | Medefaidrin. Since: 2.58
UnicodeScriptMedefaidrin :: UnicodeScript

-- | Old Sogdian. Since: 2.58
UnicodeScriptOldSogdian :: UnicodeScript

-- | Sogdian. Since: 2.58
UnicodeScriptSogdian :: UnicodeScript

-- | Catch-all for unknown values
AnotherUnicodeScript :: Int -> UnicodeScript

-- | These are the possible character classifications from the Unicode
--   specification. See Unicode Character Database.
data UnicodeType

-- | General category "Other, Control" (Cc)
UnicodeTypeControl :: UnicodeType

-- | General category "Other, Format" (Cf)
UnicodeTypeFormat :: UnicodeType

-- | General category "Other, Not Assigned" (Cn)
UnicodeTypeUnassigned :: UnicodeType

-- | General category "Other, Private Use" (Co)
UnicodeTypePrivateUse :: UnicodeType

-- | General category "Other, Surrogate" (Cs)
UnicodeTypeSurrogate :: UnicodeType

-- | General category "Letter, Lowercase" (Ll)
UnicodeTypeLowercaseLetter :: UnicodeType

-- | General category "Letter, Modifier" (Lm)
UnicodeTypeModifierLetter :: UnicodeType

-- | General category "Letter, Other" (Lo)
UnicodeTypeOtherLetter :: UnicodeType

-- | General category "Letter, Titlecase" (Lt)
UnicodeTypeTitlecaseLetter :: UnicodeType

-- | General category "Letter, Uppercase" (Lu)
UnicodeTypeUppercaseLetter :: UnicodeType

-- | General category "Mark, Spacing" (Mc)
UnicodeTypeSpacingMark :: UnicodeType

-- | General category "Mark, Enclosing" (Me)
UnicodeTypeEnclosingMark :: UnicodeType

-- | General category "Mark, Nonspacing" (Mn)
UnicodeTypeNonSpacingMark :: UnicodeType

-- | General category "Number, Decimal Digit" (Nd)
UnicodeTypeDecimalNumber :: UnicodeType

-- | General category "Number, Letter" (Nl)
UnicodeTypeLetterNumber :: UnicodeType

-- | General category "Number, Other" (No)
UnicodeTypeOtherNumber :: UnicodeType

-- | General category "Punctuation, Connector" (Pc)
UnicodeTypeConnectPunctuation :: UnicodeType

-- | General category "Punctuation, Dash" (Pd)
UnicodeTypeDashPunctuation :: UnicodeType

-- | General category "Punctuation, Close" (Pe)
UnicodeTypeClosePunctuation :: UnicodeType

-- | General category "Punctuation, Final quote" (Pf)
UnicodeTypeFinalPunctuation :: UnicodeType

-- | General category "Punctuation, Initial quote" (Pi)
UnicodeTypeInitialPunctuation :: UnicodeType

-- | General category "Punctuation, Other" (Po)
UnicodeTypeOtherPunctuation :: UnicodeType

-- | General category "Punctuation, Open" (Ps)
UnicodeTypeOpenPunctuation :: UnicodeType

-- | General category "Symbol, Currency" (Sc)
UnicodeTypeCurrencySymbol :: UnicodeType

-- | General category "Symbol, Modifier" (Sk)
UnicodeTypeModifierSymbol :: UnicodeType

-- | General category "Symbol, Math" (Sm)
UnicodeTypeMathSymbol :: UnicodeType

-- | General category "Symbol, Other" (So)
UnicodeTypeOtherSymbol :: UnicodeType

-- | General category "Separator, Line" (Zl)
UnicodeTypeLineSeparator :: UnicodeType

-- | General category "Separator, Paragraph" (Zp)
UnicodeTypeParagraphSeparator :: UnicodeType

-- | General category "Separator, Space" (Zs)
UnicodeTypeSpaceSeparator :: UnicodeType

-- | Catch-all for unknown values
AnotherUnicodeType :: Int -> UnicodeType

-- | These are logical ids for special directories which are defined
--   depending on the platform used. You should use
--   getUserSpecialDir to retrieve the full path associated to the
--   logical id.
--   
--   The UserDirectory enumeration can be extended at later date.
--   Not every platform has a directory for every logical id in this
--   enumeration.
--   
--   Since: 2.14
data UserDirectory

-- | the user's Desktop directory
UserDirectoryDirectoryDesktop :: UserDirectory

-- | the user's Documents directory
UserDirectoryDirectoryDocuments :: UserDirectory

-- | the user's Downloads directory
UserDirectoryDirectoryDownload :: UserDirectory

-- | the user's Music directory
UserDirectoryDirectoryMusic :: UserDirectory

-- | the user's Pictures directory
UserDirectoryDirectoryPictures :: UserDirectory

-- | the user's shared directory
UserDirectoryDirectoryPublicShare :: UserDirectory

-- | the user's Templates directory
UserDirectoryDirectoryTemplates :: UserDirectory

-- | the user's Movies directory
UserDirectoryDirectoryVideos :: UserDirectory

-- | the number of enum values
UserDirectoryNDirectories :: UserDirectory

-- | Catch-all for unknown values
AnotherUserDirectory :: Int -> UserDirectory

-- | The range of possible top-level types of GVariant instances.
--   
--   Since: 2.24
data VariantClass

-- | The GVariant is a boolean.
VariantClassBoolean :: VariantClass

-- | The GVariant is a byte.
VariantClassByte :: VariantClass

-- | The GVariant is a signed 16 bit integer.
VariantClassInt16 :: VariantClass

-- | The GVariant is an unsigned 16 bit integer.
VariantClassUint16 :: VariantClass

-- | The GVariant is a signed 32 bit integer.
VariantClassInt32 :: VariantClass

-- | The GVariant is an unsigned 32 bit integer.
VariantClassUint32 :: VariantClass

-- | The GVariant is a signed 64 bit integer.
VariantClassInt64 :: VariantClass

-- | The GVariant is an unsigned 64 bit integer.
VariantClassUint64 :: VariantClass

-- | The GVariant is a file handle index.
VariantClassHandle :: VariantClass

-- | The GVariant is a double precision floating point value.
VariantClassDouble :: VariantClass

-- | The GVariant is a normal string.
VariantClassString :: VariantClass

-- | The GVariant is a D-Bus object path string.
VariantClassObjectPath :: VariantClass

-- | The GVariant is a D-Bus signature string.
VariantClassSignature :: VariantClass

-- | The GVariant is a variant.
VariantClassVariant :: VariantClass

-- | The GVariant is a maybe-typed value.
VariantClassMaybe :: VariantClass

-- | The GVariant is an array.
VariantClassArray :: VariantClass

-- | The GVariant is a tuple.
VariantClassTuple :: VariantClass

-- | The GVariant is a dictionary entry.
VariantClassDictEntry :: VariantClass

-- | Catch-all for unknown values
AnotherVariantClass :: Int -> VariantClass

-- | Error codes returned by parsing text-format GVariants.
data VariantParseError

-- | generic error (unused)
VariantParseErrorFailed :: VariantParseError

-- | a non-basic VariantType was given where a basic type was
--   expected
VariantParseErrorBasicTypeExpected :: VariantParseError

-- | cannot infer the VariantType
VariantParseErrorCannotInferType :: VariantParseError

-- | an indefinite VariantType was given where a definite type was
--   expected
VariantParseErrorDefiniteTypeExpected :: VariantParseError

-- | extra data after parsing finished
VariantParseErrorInputNotAtEnd :: VariantParseError

-- | invalid character in number or unicode escape
VariantParseErrorInvalidCharacter :: VariantParseError

-- | not a valid GVariant format string
VariantParseErrorInvalidFormatString :: VariantParseError

-- | not a valid object path
VariantParseErrorInvalidObjectPath :: VariantParseError

-- | not a valid type signature
VariantParseErrorInvalidSignature :: VariantParseError

-- | not a valid GVariant type string
VariantParseErrorInvalidTypeString :: VariantParseError

-- | could not find a common type for array entries
VariantParseErrorNoCommonType :: VariantParseError

-- | the numerical value is out of range of the given type
VariantParseErrorNumberOutOfRange :: VariantParseError

-- | the numerical value is out of range for any type
VariantParseErrorNumberTooBig :: VariantParseError

-- | cannot parse as variant of the specified type
VariantParseErrorTypeError :: VariantParseError

-- | an unexpected token was encountered
VariantParseErrorUnexpectedToken :: VariantParseError

-- | an unknown keyword was encountered
VariantParseErrorUnknownKeyword :: VariantParseError

-- | unterminated string constant
VariantParseErrorUnterminatedStringConstant :: VariantParseError

-- | no value given
VariantParseErrorValueExpected :: VariantParseError

-- | Catch-all for unknown values
AnotherVariantParseError :: Int -> VariantParseError

-- | Catch exceptions of type VariantParseError. This is a
--   specialized version of catchGErrorJustDomain.
catchVariantParseError :: IO a -> (VariantParseError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type VariantParseError. This is a
--   specialized version of handleGErrorJustDomain.
handleVariantParseError :: (VariantParseError -> GErrorMessage -> IO a) -> IO a -> IO a
instance GHC.Classes.Eq GI.GLib.Enums.BookmarkFileError
instance GHC.Show.Show GI.GLib.Enums.BookmarkFileError
instance GHC.Classes.Eq GI.GLib.Enums.ChecksumType
instance GHC.Show.Show GI.GLib.Enums.ChecksumType
instance GHC.Classes.Eq GI.GLib.Enums.ConvertError
instance GHC.Show.Show GI.GLib.Enums.ConvertError
instance GHC.Classes.Eq GI.GLib.Enums.DateDMY
instance GHC.Show.Show GI.GLib.Enums.DateDMY
instance GHC.Classes.Eq GI.GLib.Enums.DateMonth
instance GHC.Show.Show GI.GLib.Enums.DateMonth
instance GHC.Classes.Eq GI.GLib.Enums.DateWeekday
instance GHC.Show.Show GI.GLib.Enums.DateWeekday
instance GHC.Classes.Eq GI.GLib.Enums.ErrorType
instance GHC.Show.Show GI.GLib.Enums.ErrorType
instance GHC.Classes.Eq GI.GLib.Enums.FileError
instance GHC.Show.Show GI.GLib.Enums.FileError
instance GHC.Classes.Eq GI.GLib.Enums.IOChannelError
instance GHC.Show.Show GI.GLib.Enums.IOChannelError
instance GHC.Classes.Eq GI.GLib.Enums.IOError
instance GHC.Show.Show GI.GLib.Enums.IOError
instance GHC.Classes.Eq GI.GLib.Enums.IOStatus
instance GHC.Show.Show GI.GLib.Enums.IOStatus
instance GHC.Classes.Eq GI.GLib.Enums.KeyFileError
instance GHC.Show.Show GI.GLib.Enums.KeyFileError
instance GHC.Classes.Eq GI.GLib.Enums.LogWriterOutput
instance GHC.Show.Show GI.GLib.Enums.LogWriterOutput
instance GHC.Classes.Eq GI.GLib.Enums.MarkupError
instance GHC.Show.Show GI.GLib.Enums.MarkupError
instance GHC.Classes.Eq GI.GLib.Enums.NormalizeMode
instance GHC.Show.Show GI.GLib.Enums.NormalizeMode
instance GHC.Classes.Eq GI.GLib.Enums.NumberParserError
instance GHC.Show.Show GI.GLib.Enums.NumberParserError
instance GHC.Classes.Eq GI.GLib.Enums.OnceStatus
instance GHC.Show.Show GI.GLib.Enums.OnceStatus
instance GHC.Classes.Eq GI.GLib.Enums.OptionArg
instance GHC.Show.Show GI.GLib.Enums.OptionArg
instance GHC.Classes.Eq GI.GLib.Enums.OptionError
instance GHC.Show.Show GI.GLib.Enums.OptionError
instance GHC.Classes.Eq GI.GLib.Enums.RegexError
instance GHC.Show.Show GI.GLib.Enums.RegexError
instance GHC.Classes.Eq GI.GLib.Enums.SeekType
instance GHC.Show.Show GI.GLib.Enums.SeekType
instance GHC.Classes.Eq GI.GLib.Enums.ShellError
instance GHC.Show.Show GI.GLib.Enums.ShellError
instance GHC.Classes.Eq GI.GLib.Enums.SliceConfig
instance GHC.Show.Show GI.GLib.Enums.SliceConfig
instance GHC.Classes.Eq GI.GLib.Enums.SpawnError
instance GHC.Show.Show GI.GLib.Enums.SpawnError
instance GHC.Classes.Eq GI.GLib.Enums.TestFileType
instance GHC.Show.Show GI.GLib.Enums.TestFileType
instance GHC.Classes.Eq GI.GLib.Enums.TestLogType
instance GHC.Show.Show GI.GLib.Enums.TestLogType
instance GHC.Classes.Eq GI.GLib.Enums.TestResult
instance GHC.Show.Show GI.GLib.Enums.TestResult
instance GHC.Classes.Eq GI.GLib.Enums.ThreadError
instance GHC.Show.Show GI.GLib.Enums.ThreadError
instance GHC.Classes.Eq GI.GLib.Enums.TimeType
instance GHC.Show.Show GI.GLib.Enums.TimeType
instance GHC.Classes.Eq GI.GLib.Enums.TokenType
instance GHC.Show.Show GI.GLib.Enums.TokenType
instance GHC.Classes.Eq GI.GLib.Enums.TraverseType
instance GHC.Show.Show GI.GLib.Enums.TraverseType
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeBreakType
instance GHC.Show.Show GI.GLib.Enums.UnicodeBreakType
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeScript
instance GHC.Show.Show GI.GLib.Enums.UnicodeScript
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeType
instance GHC.Show.Show GI.GLib.Enums.UnicodeType
instance GHC.Classes.Eq GI.GLib.Enums.UserDirectory
instance GHC.Show.Show GI.GLib.Enums.UserDirectory
instance GHC.Classes.Eq GI.GLib.Enums.VariantClass
instance GHC.Show.Show GI.GLib.Enums.VariantClass
instance GHC.Classes.Eq GI.GLib.Enums.VariantParseError
instance GHC.Show.Show GI.GLib.Enums.VariantParseError
instance GHC.Enum.Enum GI.GLib.Enums.BookmarkFileError
instance GHC.Classes.Ord GI.GLib.Enums.BookmarkFileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.BookmarkFileError
instance GHC.Enum.Enum GI.GLib.Enums.ChecksumType
instance GHC.Classes.Ord GI.GLib.Enums.ChecksumType
instance GHC.Enum.Enum GI.GLib.Enums.ConvertError
instance GHC.Classes.Ord GI.GLib.Enums.ConvertError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ConvertError
instance GHC.Enum.Enum GI.GLib.Enums.DateDMY
instance GHC.Classes.Ord GI.GLib.Enums.DateDMY
instance GHC.Enum.Enum GI.GLib.Enums.DateMonth
instance GHC.Classes.Ord GI.GLib.Enums.DateMonth
instance GHC.Enum.Enum GI.GLib.Enums.DateWeekday
instance GHC.Classes.Ord GI.GLib.Enums.DateWeekday
instance GHC.Enum.Enum GI.GLib.Enums.ErrorType
instance GHC.Classes.Ord GI.GLib.Enums.ErrorType
instance GHC.Enum.Enum GI.GLib.Enums.FileError
instance GHC.Classes.Ord GI.GLib.Enums.FileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.FileError
instance GHC.Enum.Enum GI.GLib.Enums.IOChannelError
instance GHC.Classes.Ord GI.GLib.Enums.IOChannelError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.IOChannelError
instance GHC.Enum.Enum GI.GLib.Enums.IOError
instance GHC.Classes.Ord GI.GLib.Enums.IOError
instance GHC.Enum.Enum GI.GLib.Enums.IOStatus
instance GHC.Classes.Ord GI.GLib.Enums.IOStatus
instance GHC.Enum.Enum GI.GLib.Enums.KeyFileError
instance GHC.Classes.Ord GI.GLib.Enums.KeyFileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.KeyFileError
instance GHC.Enum.Enum GI.GLib.Enums.LogWriterOutput
instance GHC.Classes.Ord GI.GLib.Enums.LogWriterOutput
instance GHC.Enum.Enum GI.GLib.Enums.MarkupError
instance GHC.Classes.Ord GI.GLib.Enums.MarkupError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.MarkupError
instance GHC.Enum.Enum GI.GLib.Enums.NormalizeMode
instance GHC.Classes.Ord GI.GLib.Enums.NormalizeMode
instance GHC.Enum.Enum GI.GLib.Enums.NumberParserError
instance GHC.Classes.Ord GI.GLib.Enums.NumberParserError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.NumberParserError
instance GHC.Enum.Enum GI.GLib.Enums.OnceStatus
instance GHC.Classes.Ord GI.GLib.Enums.OnceStatus
instance GHC.Enum.Enum GI.GLib.Enums.OptionArg
instance GHC.Classes.Ord GI.GLib.Enums.OptionArg
instance GHC.Enum.Enum GI.GLib.Enums.OptionError
instance GHC.Classes.Ord GI.GLib.Enums.OptionError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.OptionError
instance GHC.Enum.Enum GI.GLib.Enums.RegexError
instance GHC.Classes.Ord GI.GLib.Enums.RegexError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.RegexError
instance GHC.Enum.Enum GI.GLib.Enums.SeekType
instance GHC.Classes.Ord GI.GLib.Enums.SeekType
instance GHC.Enum.Enum GI.GLib.Enums.ShellError
instance GHC.Classes.Ord GI.GLib.Enums.ShellError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ShellError
instance GHC.Enum.Enum GI.GLib.Enums.SliceConfig
instance GHC.Classes.Ord GI.GLib.Enums.SliceConfig
instance GHC.Enum.Enum GI.GLib.Enums.SpawnError
instance GHC.Classes.Ord GI.GLib.Enums.SpawnError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.SpawnError
instance GHC.Enum.Enum GI.GLib.Enums.TestFileType
instance GHC.Classes.Ord GI.GLib.Enums.TestFileType
instance GHC.Enum.Enum GI.GLib.Enums.TestLogType
instance GHC.Classes.Ord GI.GLib.Enums.TestLogType
instance GHC.Enum.Enum GI.GLib.Enums.TestResult
instance GHC.Classes.Ord GI.GLib.Enums.TestResult
instance GHC.Enum.Enum GI.GLib.Enums.ThreadError
instance GHC.Classes.Ord GI.GLib.Enums.ThreadError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ThreadError
instance GHC.Enum.Enum GI.GLib.Enums.TimeType
instance GHC.Classes.Ord GI.GLib.Enums.TimeType
instance GHC.Enum.Enum GI.GLib.Enums.TokenType
instance GHC.Classes.Ord GI.GLib.Enums.TokenType
instance GHC.Enum.Enum GI.GLib.Enums.TraverseType
instance GHC.Classes.Ord GI.GLib.Enums.TraverseType
instance GHC.Enum.Enum GI.GLib.Enums.UnicodeBreakType
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeBreakType
instance GHC.Enum.Enum GI.GLib.Enums.UnicodeScript
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeScript
instance GHC.Enum.Enum GI.GLib.Enums.UnicodeType
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeType
instance GHC.Enum.Enum GI.GLib.Enums.UserDirectory
instance GHC.Classes.Ord GI.GLib.Enums.UserDirectory
instance GHC.Enum.Enum GI.GLib.Enums.VariantClass
instance GHC.Classes.Ord GI.GLib.Enums.VariantClass
instance GHC.Enum.Enum GI.GLib.Enums.VariantParseError
instance GHC.Classes.Ord GI.GLib.Enums.VariantParseError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.VariantParseError

module GI.GLib.Flags

-- | No description available in the introspection data.
data AsciiType

-- | No description available in the introspection data.
AsciiTypeAlnum :: AsciiType

-- | No description available in the introspection data.
AsciiTypeAlpha :: AsciiType

-- | No description available in the introspection data.
AsciiTypeCntrl :: AsciiType

-- | No description available in the introspection data.
AsciiTypeDigit :: AsciiType

-- | No description available in the introspection data.
AsciiTypeGraph :: AsciiType

-- | No description available in the introspection data.
AsciiTypeLower :: AsciiType

-- | No description available in the introspection data.
AsciiTypePrint :: AsciiType

-- | No description available in the introspection data.
AsciiTypePunct :: AsciiType

-- | No description available in the introspection data.
AsciiTypeSpace :: AsciiType

-- | No description available in the introspection data.
AsciiTypeUpper :: AsciiType

-- | No description available in the introspection data.
AsciiTypeXdigit :: AsciiType

-- | Catch-all for unknown values
AnotherAsciiType :: Int -> AsciiType

-- | A test to perform on a file using fileTest.
data FileTest

-- | True if the file is a regular file (not a directory). Note that
--   this test will also return True if the tested file is a symlink
--   to a regular file.
FileTestIsRegular :: FileTest

-- | True if the file is a symlink.
FileTestIsSymlink :: FileTest

-- | True if the file is a directory.
FileTestIsDir :: FileTest

-- | True if the file is executable.
FileTestIsExecutable :: FileTest

-- | True if the file exists. It may or may not be a regular file.
FileTestExists :: FileTest

-- | Catch-all for unknown values
AnotherFileTest :: Int -> FileTest

-- | Flags to modify the format of the string returned by
--   formatSizeFull.
data FormatSizeFlags

-- | behave the same as formatSize
FormatSizeFlagsDefault :: FormatSizeFlags

-- | include the exact number of bytes as part of the returned string. For
--   example, "45.6 kB (45,612 bytes)".
FormatSizeFlagsLongFormat :: FormatSizeFlags

-- | use IEC (base 1024) units with "KiB"-style suffixes. IEC units should
--   only be used for reporting things with a strong "power of 2" basis,
--   like RAM sizes or RAID stripe sizes. Network and storage sizes should
--   be reported in the normal SI units.
FormatSizeFlagsIecUnits :: FormatSizeFlags

-- | set the size as a quantity in bits, rather than bytes, and return
--   units in bits. For example, ‘Mb’ rather than ‘MB’.
FormatSizeFlagsBits :: FormatSizeFlags

-- | Catch-all for unknown values
AnotherFormatSizeFlags :: Int -> FormatSizeFlags

-- | Flags used internally in the Hook implementation.
data HookFlagMask

-- | set if the hook has not been destroyed
HookFlagMaskActive :: HookFlagMask

-- | set if the hook is currently being run
HookFlagMaskInCall :: HookFlagMask

-- | A mask covering all bits reserved for hook flags; see
--   HOOK_FLAG_USER_SHIFT
HookFlagMaskMask :: HookFlagMask

-- | Catch-all for unknown values
AnotherHookFlagMask :: Int -> HookFlagMask

-- | A bitwise combination representing a condition to watch for on an
--   event source.
data IOCondition

-- | There is data to read.
IOConditionIn :: IOCondition

-- | Data can be written (without blocking).
IOConditionOut :: IOCondition

-- | There is urgent data to read.
IOConditionPri :: IOCondition

-- | Error condition.
IOConditionErr :: IOCondition

-- | Hung up (the connection has been broken, usually for pipes and
--   sockets).
IOConditionHup :: IOCondition

-- | Invalid request. The file descriptor is not open.
IOConditionNval :: IOCondition

-- | Catch-all for unknown values
AnotherIOCondition :: Int -> IOCondition

-- | Specifies properties of a IOChannel. Some of the flags can only
--   be read with iOChannelGetFlags, but not changed with
--   iOChannelSetFlags.
data IOFlags

-- | turns on append mode, corresponds to O_APPEND (see the
--   documentation of the UNIX open() syscall)
IOFlagsAppend :: IOFlags

-- | turns on nonblocking mode, corresponds to
--   O_NONBLOCK/O_NDELAY (see the
--   documentation of the UNIX open() syscall)
IOFlagsNonblock :: IOFlags

-- | indicates that the io channel is readable. This flag cannot be
--   changed.
IOFlagsIsReadable :: IOFlags

-- | indicates that the io channel is writable. This flag cannot be
--   changed.
IOFlagsIsWritable :: IOFlags

-- | a misspelled version of gIOFLAGISWRITABLE that existed
--   before the spelling was fixed in GLib 2.30. It is kept here for
--   compatibility reasons. Deprecated since 2.30
IOFlagsIsWriteable :: IOFlags

-- | indicates that the io channel is seekable, i.e. that
--   iOChannelSeekPosition can be used on it. This flag cannot be
--   changed.
IOFlagsIsSeekable :: IOFlags

-- | the mask that specifies all the valid flags.
IOFlagsMask :: IOFlags

-- | the mask of the flags that are returned from iOChannelGetFlags
IOFlagsGetMask :: IOFlags

-- | the mask of the flags that the user can modify with
--   iOChannelSetFlags
IOFlagsSetMask :: IOFlags

-- | Catch-all for unknown values
AnotherIOFlags :: Int -> IOFlags

-- | Flags which influence the parsing.
data KeyFileFlags

-- | No flags, default behaviour
KeyFileFlagsNone :: KeyFileFlags

-- | Use this flag if you plan to write the (possibly modified) contents of
--   the key file back to a file; otherwise all comments will be lost when
--   the key file is written back.
KeyFileFlagsKeepComments :: KeyFileFlags

-- | Use this flag if you plan to write the (possibly modified) contents of
--   the key file back to a file; otherwise only the translations for the
--   current language will be written back.
KeyFileFlagsKeepTranslations :: KeyFileFlags

-- | Catch-all for unknown values
AnotherKeyFileFlags :: Int -> KeyFileFlags

-- | Flags specifying the level of log messages.
--   
--   It is possible to change how GLib treats messages of the various
--   levels using g_log_set_handler() and
--   logSetFatalMask.
data LogLevelFlags

-- | internal flag
LogLevelFlagsFlagRecursion :: LogLevelFlags

-- | internal flag
LogLevelFlagsFlagFatal :: LogLevelFlags

-- | log level for errors, see g_error(). This level is
--   also used for messages produced by g_assert().
LogLevelFlagsLevelError :: LogLevelFlags

-- | log level for critical warning messages, see
--   g_critical(). This level is also used for messages
--   produced by g_return_if_fail() and
--   g_return_val_if_fail().
LogLevelFlagsLevelCritical :: LogLevelFlags

-- | log level for warnings, see g_warning()
LogLevelFlagsLevelWarning :: LogLevelFlags

-- | log level for messages, see g_message()
LogLevelFlagsLevelMessage :: LogLevelFlags

-- | log level for informational messages, see g_info()
LogLevelFlagsLevelInfo :: LogLevelFlags

-- | log level for debug messages, see g_debug()
LogLevelFlagsLevelDebug :: LogLevelFlags

-- | a mask including all log levels
LogLevelFlagsLevelMask :: LogLevelFlags

-- | Catch-all for unknown values
AnotherLogLevelFlags :: Int -> LogLevelFlags

-- | A mixed enumerated type and flags field. You must specify one type
--   (string, strdup, boolean, tristate). Additionally, you may optionally
--   bitwise OR the type with the flag MarkupCollectTypeOptional.
--   
--   It is likely that this enum will be extended in the future to support
--   other types.
data MarkupCollectType

-- | used to terminate the list of attributes to collect
MarkupCollectTypeInvalid :: MarkupCollectType

-- | collect the string pointer directly from the attribute_values[] array.
--   Expects a parameter of type (const char **). If
--   MarkupCollectTypeOptional is specified and the attribute isn't
--   present then the pointer will be set to Nothing
MarkupCollectTypeString :: MarkupCollectType

-- | as with MarkupCollectTypeString, but expects a parameter of
--   type (char **) and strdups the returned pointer. The pointer
--   must be freed with free
MarkupCollectTypeStrdup :: MarkupCollectType

-- | expects a parameter of type (gboolean *) and parses the attribute
--   value as a boolean. Sets False if the attribute isn't present.
--   Valid boolean values consist of (case-insensitive) "false", "f", "no",
--   "n", "0" and "true", "t", "yes", "y", "1"
MarkupCollectTypeBoolean :: MarkupCollectType

-- | as with MarkupCollectTypeBoolean, but in the case of a missing
--   attribute a value is set that compares equal to neither False
--   nor True G_MARKUP_COLLECT_OPTIONAL is implied
MarkupCollectTypeTristate :: MarkupCollectType

-- | can be bitwise ORed with the other fields. If present, allows the
--   attribute not to appear. A default value is set depending on what
--   value type is used
MarkupCollectTypeOptional :: MarkupCollectType

-- | Catch-all for unknown values
AnotherMarkupCollectType :: Int -> MarkupCollectType

-- | Flags that affect the behaviour of the parser.
data MarkupParseFlags

-- | flag you should not use
MarkupParseFlagsDoNotUseThisUnsupportedFlag :: MarkupParseFlags

-- | When this flag is set, CDATA marked sections are not passed literally
--   to the passthrough function of the parser. Instead,
--   the content of the section (without the <![CDATA[ and
--   ]]>) is passed to the text function. This
--   flag was added in GLib 2.12
MarkupParseFlagsTreatCdataAsText :: MarkupParseFlags

-- | Normally errors caught by GMarkup itself have line/column information
--   prefixed to them to let the caller know the location of the error.
--   When this flag is set the location information is also prefixed to
--   errors generated by the MarkupParser implementation functions
MarkupParseFlagsPrefixErrorPosition :: MarkupParseFlags

-- | Ignore (don't report) qualified attributes and tags, along with their
--   contents. A qualified attribute or tag is one that contains ':' in its
--   name (ie: is in another namespace). Since: 2.40.
MarkupParseFlagsIgnoreQualified :: MarkupParseFlags

-- | Catch-all for unknown values
AnotherMarkupParseFlags :: Int -> MarkupParseFlags

-- | Flags which modify individual options.
data OptionFlags

-- | No flags. Since: 2.42.
OptionFlagsNone :: OptionFlags

-- | The option doesn't appear in --help output.
OptionFlagsHidden :: OptionFlags

-- | The option appears in the main section of the --help output,
--   even if it is defined in a group.
OptionFlagsInMain :: OptionFlags

-- | For options of the OptionArgNone kind, this flag indicates that
--   the sense of the option is reversed.
OptionFlagsReverse :: OptionFlags

-- | For options of the OptionArgCallback kind, this flag indicates
--   that the callback does not take any argument (like a
--   OptionArgNone option). Since 2.8
OptionFlagsNoArg :: OptionFlags

-- | For options of the OptionArgCallback kind, this flag indicates
--   that the argument should be passed to the callback in the GLib
--   filename encoding rather than UTF-8. Since 2.8
OptionFlagsFilename :: OptionFlags

-- | For options of the OptionArgCallback kind, this flag indicates
--   that the argument supply is optional. If no argument is given then
--   data of GOptionParseFunc will be set to NULL. Since
--   2.8
OptionFlagsOptionalArg :: OptionFlags

-- | This flag turns off the automatic conflict resolution which prefixes
--   long option names with groupname- if there is a conflict.
--   This option should only be used in situations where aliasing is
--   necessary to model some legacy commandline interface. It is not safe
--   to use this option, unless all option groups are under your direct
--   control. Since 2.8.
OptionFlagsNoalias :: OptionFlags

-- | Catch-all for unknown values
AnotherOptionFlags :: Int -> OptionFlags

-- | Flags specifying compile-time options.
--   
--   Since: 2.14
data RegexCompileFlags

-- | Letters in the pattern match both upper- and lowercase letters. This
--   option can be changed within a pattern by a "(?i)" option setting.
RegexCompileFlagsCaseless :: RegexCompileFlags

-- | By default, GRegex treats the strings as consisting of a single line
--   of characters (even if it actually contains newlines). The "start of
--   line" metacharacter ("^") matches only at the start of the string,
--   while the "end of line" metacharacter ("$") matches only at the end of
--   the string, or before a terminating newline (unless
--   G_REGEX_DOLLAR_ENDONLY is set). When
--   G_REGEX_MULTILINE is set, the "start of line" and "end
--   of line" constructs match immediately following or immediately before
--   any newline in the string, respectively, as well as at the very start
--   and end. This can be changed within a pattern by a "(?m)" option
--   setting.
RegexCompileFlagsMultiline :: RegexCompileFlags

-- | A dot metacharacter (".") in the pattern matches all characters,
--   including newlines. Without it, newlines are excluded. This option can
--   be changed within a pattern by a ("?s") option setting.
RegexCompileFlagsDotall :: RegexCompileFlags

-- | Whitespace data characters in the pattern are totally ignored except
--   when escaped or inside a character class. Whitespace does not include
--   the VT character (code 11). In addition, characters between an
--   unescaped "#" outside a character class and the next newline
--   character, inclusive, are also ignored. This can be changed within a
--   pattern by a "(?x)" option setting.
RegexCompileFlagsExtended :: RegexCompileFlags

-- | The pattern is forced to be "anchored", that is, it is constrained to
--   match only at the first matching point in the string that is being
--   searched. This effect can also be achieved by appropriate constructs
--   in the pattern itself such as the "^" metacharacter.
RegexCompileFlagsAnchored :: RegexCompileFlags

-- | A dollar metacharacter ("$") in the pattern matches only at the end of
--   the string. Without this option, a dollar also matches immediately
--   before the final character if it is a newline (but not before any
--   other newlines). This option is ignored if
--   G_REGEX_MULTILINE is set.
RegexCompileFlagsDollarEndonly :: RegexCompileFlags

-- | Inverts the "greediness" of the quantifiers so that they are not
--   greedy by default, but become greedy if followed by "?". It can also
--   be set by a "(?U)" option setting within the pattern.
RegexCompileFlagsUngreedy :: RegexCompileFlags

-- | Usually strings must be valid UTF-8 strings, using this flag they are
--   considered as a raw sequence of bytes.
RegexCompileFlagsRaw :: RegexCompileFlags

-- | Disables the use of numbered capturing parentheses in the pattern. Any
--   opening parenthesis that is not followed by "?" behaves as if it were
--   followed by "?:" but named parentheses can still be used for capturing
--   (and they acquire numbers in the usual way).
RegexCompileFlagsNoAutoCapture :: RegexCompileFlags

-- | Optimize the regular expression. If the pattern will be used many
--   times, then it may be worth the effort to optimize it to improve the
--   speed of matches.
RegexCompileFlagsOptimize :: RegexCompileFlags

-- | Limits an unanchored pattern to match before (or at) the first
--   newline. Since: 2.34
RegexCompileFlagsFirstline :: RegexCompileFlags

-- | Names used to identify capturing subpatterns need not be unique. This
--   can be helpful for certain types of pattern when it is known that only
--   one instance of the named subpattern can ever be matched.
RegexCompileFlagsDupnames :: RegexCompileFlags

-- | Usually any newline character or character sequence is recognized. If
--   this option is set, the only recognized newline character is '\r'.
RegexCompileFlagsNewlineCr :: RegexCompileFlags

-- | Usually any newline character or character sequence is recognized. If
--   this option is set, the only recognized newline character is '\n'.
RegexCompileFlagsNewlineLf :: RegexCompileFlags

-- | Usually any newline character or character sequence is recognized. If
--   this option is set, the only recognized newline character sequence is
--   '\r\n'.
RegexCompileFlagsNewlineCrlf :: RegexCompileFlags

-- | Usually any newline character or character sequence is recognized. If
--   this option is set, the only recognized newline character sequences
--   are '\r', '\n', and '\r\n'. Since: 2.34
RegexCompileFlagsNewlineAnycrlf :: RegexCompileFlags

-- | Usually any newline character or character sequence is recognised. If
--   this option is set, then "\R" only recognizes the newline characters
--   '\r', '\n' and '\r\n'. Since: 2.34
RegexCompileFlagsBsrAnycrlf :: RegexCompileFlags

-- | Changes behaviour so that it is compatible with JavaScript rather than
--   PCRE. Since: 2.34
RegexCompileFlagsJavascriptCompat :: RegexCompileFlags

-- | Catch-all for unknown values
AnotherRegexCompileFlags :: Int -> RegexCompileFlags

-- | Flags specifying match-time options.
--   
--   Since: 2.14
data RegexMatchFlags

-- | The pattern is forced to be "anchored", that is, it is constrained to
--   match only at the first matching point in the string that is being
--   searched. This effect can also be achieved by appropriate constructs
--   in the pattern itself such as the "^" metacharacter.
RegexMatchFlagsAnchored :: RegexMatchFlags

-- | Specifies that first character of the string is not the beginning of a
--   line, so the circumflex metacharacter should not match before it.
--   Setting this without G_REGEX_MULTILINE (at compile
--   time) causes circumflex never to match. This option affects only the
--   behaviour of the circumflex metacharacter, it does not affect "\A".
RegexMatchFlagsNotbol :: RegexMatchFlags

-- | Specifies that the end of the subject string is not the end of a line,
--   so the dollar metacharacter should not match it nor (except in
--   multiline mode) a newline immediately before it. Setting this without
--   G_REGEX_MULTILINE (at compile time) causes dollar
--   never to match. This option affects only the behaviour of the dollar
--   metacharacter, it does not affect "\Z" or "\z".
RegexMatchFlagsNoteol :: RegexMatchFlags

-- | An empty string is not considered to be a valid match if this option
--   is set. If there are alternatives in the pattern, they are tried. If
--   all the alternatives match the empty string, the entire match fails.
--   For example, if the pattern "a?b?" is applied to a string not
--   beginning with "a" or "b", it matches the empty string at the start of
--   the string. With this flag set, this match is not valid, so GRegex
--   searches further into the string for occurrences of "a" or "b".
RegexMatchFlagsNotempty :: RegexMatchFlags

-- | Turns on the partial matching feature, for more documentation on
--   partial matching see matchInfoIsPartialMatch.
RegexMatchFlagsPartial :: RegexMatchFlags

-- | Overrides the newline definition set when creating a new Regex,
--   setting the '\r' character as line terminator.
RegexMatchFlagsNewlineCr :: RegexMatchFlags

-- | Overrides the newline definition set when creating a new Regex,
--   setting the '\n' character as line terminator.
RegexMatchFlagsNewlineLf :: RegexMatchFlags

-- | Overrides the newline definition set when creating a new Regex,
--   setting the '\r\n' characters sequence as line terminator.
RegexMatchFlagsNewlineCrlf :: RegexMatchFlags

-- | Overrides the newline definition set when creating a new Regex,
--   any Unicode newline sequence is recognised as a newline. These are
--   '\r', '\n' and '\rn', and the single characters U+000B LINE
--   TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE
--   SEPARATOR and U+2029 PARAGRAPH SEPARATOR.
RegexMatchFlagsNewlineAny :: RegexMatchFlags

-- | Overrides the newline definition set when creating a new Regex;
--   any '\r', '\n', or '\r\n' character sequence is recognized as a
--   newline. Since: 2.34
RegexMatchFlagsNewlineAnycrlf :: RegexMatchFlags

-- | Overrides the newline definition for "\R" set when creating a new
--   Regex; only '\r', '\n', or '\r\n' character sequences are
--   recognized as a newline by "\R". Since: 2.34
RegexMatchFlagsBsrAnycrlf :: RegexMatchFlags

-- | Overrides the newline definition for "\R" set when creating a new
--   Regex; any Unicode newline character or character sequence are
--   recognized as a newline by "\R". These are '\r', '\n' and '\rn', and
--   the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF),
--   U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH
--   SEPARATOR. Since: 2.34
RegexMatchFlagsBsrAny :: RegexMatchFlags

-- | An alias for G_REGEX_MATCH_PARTIAL. Since: 2.34
RegexMatchFlagsPartialSoft :: RegexMatchFlags

-- | Turns on the partial matching feature. In contrast to to
--   G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as
--   soon as a partial match is found, without continuing to search for a
--   possible complete match. See matchInfoIsPartialMatch for more
--   information. Since: 2.34
RegexMatchFlagsPartialHard :: RegexMatchFlags

-- | Like G_REGEX_MATCH_NOTEMPTY, but only applied to the
--   start of the matched string. For anchored patterns this can only
--   happen for pattern containing "\K". Since: 2.34
RegexMatchFlagsNotemptyAtstart :: RegexMatchFlags

-- | Catch-all for unknown values
AnotherRegexMatchFlags :: Int -> RegexMatchFlags

-- | Flags passed to spawnSync, spawnAsync and
--   spawnAsyncWithPipes.
data SpawnFlags

-- | no flags, default behaviour
SpawnFlagsDefault :: SpawnFlags

-- | the parent's open file descriptors will be inherited by the child;
--   otherwise all descriptors except stdin, stdout and stderr will be
--   closed before calling exec() in the child.
SpawnFlagsLeaveDescriptorsOpen :: SpawnFlags

-- | the child will not be automatically reaped; you must use
--   g_child_watch_add() yourself (or call
--   waitpid() or handle SIGCHLD yourself), or the
--   child will become a zombie.
SpawnFlagsDoNotReapChild :: SpawnFlags

-- | argv[0] need not be an absolute path, it will be looked for
--   in the user's PATH.
SpawnFlagsSearchPath :: SpawnFlags

-- | the child's standard output will be discarded, instead of going to the
--   same location as the parent's standard output.
SpawnFlagsStdoutToDevNull :: SpawnFlags

-- | the child's standard error will be discarded.
SpawnFlagsStderrToDevNull :: SpawnFlags

-- | the child will inherit the parent's standard input (by default, the
--   child's standard input is attached to /dev/null).
SpawnFlagsChildInheritsStdin :: SpawnFlags

-- | the first element of argv is the file to execute, while the
--   remaining elements are the actual argument vector to pass to the file.
--   Normally spawnAsyncWithPipes uses argv[0] as the file
--   to execute, and passes all of argv to the child.
SpawnFlagsFileAndArgvZero :: SpawnFlags

-- | if argv[0] is not an abolute path, it will be looked for in
--   the PATH from the passed child environment. Since: 2.34
SpawnFlagsSearchPathFromEnvp :: SpawnFlags

-- | create all pipes with the O_CLOEXEC flag set. Since: 2.40
SpawnFlagsCloexecPipes :: SpawnFlags

-- | Catch-all for unknown values
AnotherSpawnFlags :: Int -> SpawnFlags

-- | Flags to pass to testTrapSubprocess to control input and
--   output.
--   
--   Note that in contrast with testTrapFork, the default is to not
--   show stdout and stderr.
data TestSubprocessFlags

-- | If this flag is given, the child process will inherit the parent's
--   stdin. Otherwise, the child's stdin is redirected to
--   /dev/null.
TestSubprocessFlagsStdin :: TestSubprocessFlags

-- | If this flag is given, the child process will inherit the parent's
--   stdout. Otherwise, the child's stdout will not be visible, but it will
--   be captured to allow later tests with
--   g_test_trap_assert_stdout().
TestSubprocessFlagsStdout :: TestSubprocessFlags

-- | If this flag is given, the child process will inherit the parent's
--   stderr. Otherwise, the child's stderr will not be visible, but it will
--   be captured to allow later tests with
--   g_test_trap_assert_stderr().
TestSubprocessFlagsStderr :: TestSubprocessFlags

-- | Catch-all for unknown values
AnotherTestSubprocessFlags :: Int -> TestSubprocessFlags

-- | Test traps are guards around forked tests. These flags determine what
--   traps to set.

-- | Deprecated: TestTrapFlags is used only with
--   testTrapFork,which is deprecated. testTrapSubprocess
--   usesTestSubprocessFlags.
data TestTrapFlags

-- | Redirect stdout of the test child to /dev/null so it cannot
--   be observed on the console during test runs. The actual output is
--   still captured though to allow later tests with
--   g_test_trap_assert_stdout().
TestTrapFlagsSilenceStdout :: TestTrapFlags

-- | Redirect stderr of the test child to /dev/null so it cannot
--   be observed on the console during test runs. The actual output is
--   still captured though to allow later tests with
--   g_test_trap_assert_stderr().
TestTrapFlagsSilenceStderr :: TestTrapFlags

-- | If this flag is given, stdin of the child process is shared with stdin
--   of its parent process. It is redirected to /dev/null
--   otherwise.
TestTrapFlagsInheritStdin :: TestTrapFlags

-- | Catch-all for unknown values
AnotherTestTrapFlags :: Int -> TestTrapFlags

-- | Specifies which nodes are visited during several of the tree
--   functions, including g_node_traverse() and
--   g_node_find().
data TraverseFlags

-- | only leaf nodes should be visited. This name has been introduced in
--   2.6, for older version use TraverseFlagsLeafs.
TraverseFlagsLeaves :: TraverseFlags

-- | only non-leaf nodes should be visited. This name has been introduced
--   in 2.6, for older version use TraverseFlagsNonLeafs.
TraverseFlagsNonLeaves :: TraverseFlags

-- | all nodes should be visited.
TraverseFlagsAll :: TraverseFlags

-- | a mask of all traverse flags.
TraverseFlagsMask :: TraverseFlags

-- | identical to TraverseFlagsLeaves.
TraverseFlagsLeafs :: TraverseFlags

-- | identical to TraverseFlagsNonLeaves.
TraverseFlagsNonLeafs :: TraverseFlags

-- | Catch-all for unknown values
AnotherTraverseFlags :: Int -> TraverseFlags
instance GHC.Classes.Eq GI.GLib.Flags.AsciiType
instance GHC.Show.Show GI.GLib.Flags.AsciiType
instance GHC.Classes.Eq GI.GLib.Flags.FileTest
instance GHC.Show.Show GI.GLib.Flags.FileTest
instance GHC.Classes.Eq GI.GLib.Flags.FormatSizeFlags
instance GHC.Show.Show GI.GLib.Flags.FormatSizeFlags
instance GHC.Classes.Eq GI.GLib.Flags.HookFlagMask
instance GHC.Show.Show GI.GLib.Flags.HookFlagMask
instance GHC.Classes.Eq GI.GLib.Flags.IOCondition
instance GHC.Show.Show GI.GLib.Flags.IOCondition
instance GHC.Classes.Eq GI.GLib.Flags.IOFlags
instance GHC.Show.Show GI.GLib.Flags.IOFlags
instance GHC.Classes.Eq GI.GLib.Flags.KeyFileFlags
instance GHC.Show.Show GI.GLib.Flags.KeyFileFlags
instance GHC.Classes.Eq GI.GLib.Flags.LogLevelFlags
instance GHC.Show.Show GI.GLib.Flags.LogLevelFlags
instance GHC.Classes.Eq GI.GLib.Flags.MarkupCollectType
instance GHC.Show.Show GI.GLib.Flags.MarkupCollectType
instance GHC.Classes.Eq GI.GLib.Flags.MarkupParseFlags
instance GHC.Show.Show GI.GLib.Flags.MarkupParseFlags
instance GHC.Classes.Eq GI.GLib.Flags.OptionFlags
instance GHC.Show.Show GI.GLib.Flags.OptionFlags
instance GHC.Classes.Eq GI.GLib.Flags.RegexCompileFlags
instance GHC.Show.Show GI.GLib.Flags.RegexCompileFlags
instance GHC.Classes.Eq GI.GLib.Flags.RegexMatchFlags
instance GHC.Show.Show GI.GLib.Flags.RegexMatchFlags
instance GHC.Classes.Eq GI.GLib.Flags.SpawnFlags
instance GHC.Show.Show GI.GLib.Flags.SpawnFlags
instance GHC.Classes.Eq GI.GLib.Flags.TestSubprocessFlags
instance GHC.Show.Show GI.GLib.Flags.TestSubprocessFlags
instance GHC.Classes.Eq GI.GLib.Flags.TestTrapFlags
instance GHC.Show.Show GI.GLib.Flags.TestTrapFlags
instance GHC.Classes.Eq GI.GLib.Flags.TraverseFlags
instance GHC.Show.Show GI.GLib.Flags.TraverseFlags
instance GHC.Enum.Enum GI.GLib.Flags.AsciiType
instance GHC.Classes.Ord GI.GLib.Flags.AsciiType
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.AsciiType
instance GHC.Enum.Enum GI.GLib.Flags.FileTest
instance GHC.Classes.Ord GI.GLib.Flags.FileTest
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.FileTest
instance GHC.Enum.Enum GI.GLib.Flags.FormatSizeFlags
instance GHC.Classes.Ord GI.GLib.Flags.FormatSizeFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.FormatSizeFlags
instance GHC.Enum.Enum GI.GLib.Flags.HookFlagMask
instance GHC.Classes.Ord GI.GLib.Flags.HookFlagMask
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.HookFlagMask
instance GHC.Enum.Enum GI.GLib.Flags.IOCondition
instance GHC.Classes.Ord GI.GLib.Flags.IOCondition
instance Data.GI.Base.BasicTypes.BoxedFlags GI.GLib.Flags.IOCondition
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.IOCondition
instance GHC.Enum.Enum GI.GLib.Flags.IOFlags
instance GHC.Classes.Ord GI.GLib.Flags.IOFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.IOFlags
instance GHC.Enum.Enum GI.GLib.Flags.KeyFileFlags
instance GHC.Classes.Ord GI.GLib.Flags.KeyFileFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.KeyFileFlags
instance GHC.Enum.Enum GI.GLib.Flags.LogLevelFlags
instance GHC.Classes.Ord GI.GLib.Flags.LogLevelFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.LogLevelFlags
instance GHC.Enum.Enum GI.GLib.Flags.MarkupCollectType
instance GHC.Classes.Ord GI.GLib.Flags.MarkupCollectType
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.MarkupCollectType
instance GHC.Enum.Enum GI.GLib.Flags.MarkupParseFlags
instance GHC.Classes.Ord GI.GLib.Flags.MarkupParseFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.MarkupParseFlags
instance GHC.Enum.Enum GI.GLib.Flags.OptionFlags
instance GHC.Classes.Ord GI.GLib.Flags.OptionFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.OptionFlags
instance GHC.Enum.Enum GI.GLib.Flags.RegexCompileFlags
instance GHC.Classes.Ord GI.GLib.Flags.RegexCompileFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.RegexCompileFlags
instance GHC.Enum.Enum GI.GLib.Flags.RegexMatchFlags
instance GHC.Classes.Ord GI.GLib.Flags.RegexMatchFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.RegexMatchFlags
instance GHC.Enum.Enum GI.GLib.Flags.SpawnFlags
instance GHC.Classes.Ord GI.GLib.Flags.SpawnFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.SpawnFlags
instance GHC.Enum.Enum GI.GLib.Flags.TestSubprocessFlags
instance GHC.Classes.Ord GI.GLib.Flags.TestSubprocessFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TestSubprocessFlags
instance GHC.Enum.Enum GI.GLib.Flags.TestTrapFlags
instance GHC.Classes.Ord GI.GLib.Flags.TestTrapFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TestTrapFlags
instance GHC.Enum.Enum GI.GLib.Flags.TraverseFlags
instance GHC.Classes.Ord GI.GLib.Flags.TraverseFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TraverseFlags

-- | The GBookmarkFile structure contains only private data and
--   should not be directly accessed.
module GI.GLib.Structs.BookmarkFile

-- | Memory-managed wrapper type.
newtype BookmarkFile
BookmarkFile :: ManagedPtr BookmarkFile -> BookmarkFile

-- | A convenience alias for Nothing :: Maybe
--   BookmarkFile.
noBookmarkFile :: Maybe BookmarkFile

-- | Adds the application with name and
--   exec to the list of applications that have registered
--   a bookmark for uri into bookmark.
--   
--   Every bookmark inside a BookmarkFile must have at least an
--   application registered. Each application must provide a name, a
--   command line useful for launching the bookmark, the number of times
--   the bookmark has been registered by the application and the last time
--   the application registered this bookmark.
--   
--   If name is Nothing, the name of the application
--   will be the same returned by getApplicationName; if
--   exec is Nothing, the command line will be a
--   composition of the program name as returned by getPrgname and
--   the "%u" modifier, which will be expanded to the bookmark's URI.
--   
--   This function will automatically take care of updating the
--   registrations count and timestamping in case an application with the
--   same name had already registered a bookmark for
--   uri inside bookmark.
--   
--   If no bookmark for uri is found, one is created.
--   
--   Since: 2.12
bookmarkFileAddApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Maybe Text -> m ()

-- | Adds group to the list of groups to which the bookmark
--   for uri belongs to.
--   
--   If no bookmark for uri is found then it is created.
--   
--   Since: 2.12
bookmarkFileAddGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | No description available in the introspection data.
bookmarkFileErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Frees a BookmarkFile.
--   
--   Since: 2.12
bookmarkFileFree :: (HasCallStack, MonadIO m) => BookmarkFile -> m ()

-- | Gets the time the bookmark for uri was added to
--   bookmark
--   
--   In the event the URI cannot be found, -1 is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

-- | Gets the registration information of appName for the
--   bookmark for uri. See bookmarkFileSetAppInfo
--   for more information about the returned data.
--   
--   The string returned in appExec must be freed.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that
--   no application with name appName has registered a
--   bookmark for uri, False is returned and error
--   is set to G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In
--   the event that unquoting the command line fails, an error of the
--   G_SHELL_ERROR domain is set and False is
--   returned.
--   
--   Since: 2.12
bookmarkFileGetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, CLong)

-- | Retrieves the names of the applications that have registered the
--   bookmark for uri.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetApplications :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m [Text]

-- | Retrieves the description of the bookmark for uri.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetDescription :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Text

-- | Retrieves the list of group names of the bookmark for
--   uri.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   The returned array is Nothing terminated, so
--   length may optionally be Nothing.
--   
--   Since: 2.12
bookmarkFileGetGroups :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m [Text]

-- | Gets the icon of the bookmark for uri.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetIcon :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m (Text, Text)

-- | Gets whether the private flag of the bookmark for uri
--   is set.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that
--   the private flag cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.12
bookmarkFileGetIsPrivate :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m ()

-- | Retrieves the MIME type of the resource pointed by
--   uri.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that
--   the MIME type cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.12
bookmarkFileGetMimeType :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Text

-- | Gets the time when the bookmark for uri was last
--   modified.
--   
--   In the event the URI cannot be found, -1 is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

-- | Gets the number of bookmarks inside bookmark.
--   
--   Since: 2.12
bookmarkFileGetSize :: (HasCallStack, MonadIO m) => BookmarkFile -> m Int32

-- | Returns the title of the bookmark for uri.
--   
--   If uri is Nothing, the title of
--   bookmark is returned.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetTitle :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> m Text

-- | Returns all URIs of the bookmarks in the bookmark file
--   bookmark. The array of returned URIs will be
--   Nothing-terminated, so length may optionally be
--   Nothing.
--   
--   Since: 2.12
bookmarkFileGetUris :: (HasCallStack, MonadIO m) => BookmarkFile -> m [Text]

-- | Gets the time the bookmark for uri was last visited.
--   
--   In the event the URI cannot be found, -1 is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileGetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

-- | Checks whether the bookmark for uri inside
--   bookmark has been registered by application
--   name.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileHasApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Checks whether group appears in the list of groups to
--   which the bookmark for uri belongs to.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileHasGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Looks whether the desktop bookmark has an item with its URI set to
--   uri.
--   
--   Since: 2.12
bookmarkFileHasItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Bool

-- | Loads a bookmark file from memory into an empty BookmarkFile
--   structure. If the object cannot be created then error
--   is set to a BookmarkFileError.
--   
--   Since: 2.12
bookmarkFileLoadFromData :: (HasCallStack, MonadIO m) => BookmarkFile -> ByteString -> m ()

-- | This function looks for a desktop bookmark file named
--   file in the paths returned from getUserDataDir
--   and getSystemDataDirs, loads the file into
--   bookmark and returns the file's full path in
--   fullPath. If the file could not be loaded then
--   error is set to either a FileError or
--   BookmarkFileError.
--   
--   Since: 2.12
bookmarkFileLoadFromDataDirs :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m (Maybe [Char])

-- | Loads a desktop bookmark file into an empty BookmarkFile
--   structure. If the file could not be loaded then error
--   is set to either a FileError or BookmarkFileError.
--   
--   Since: 2.12
bookmarkFileLoadFromFile :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m ()

-- | Changes the URI of a bookmark item from oldUri to
--   newUri. Any existing bookmark for
--   newUri will be overwritten. If newUri
--   is Nothing, then the bookmark is removed.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
--   
--   Since: 2.12
bookmarkFileMoveItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> m ()

-- | Removes application registered with name from the list
--   of applications that have registered a bookmark for
--   uri inside bookmark.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that
--   no application with name appName has registered a
--   bookmark for uri, False is returned and error
--   is set to G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED.
--   
--   Since: 2.12
bookmarkFileRemoveApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Removes group from the list of groups to which the
--   bookmark for uri belongs to.
--   
--   In the event the URI cannot be found, False is returned and
--   error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event no
--   group was defined, False is returned and error
--   is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.12
bookmarkFileRemoveGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Removes the bookmark for uri from the bookmark file
--   bookmark.
--   
--   Since: 2.12
bookmarkFileRemoveItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m ()

-- | Sets the time the bookmark for uri was added into
--   bookmark.
--   
--   If no bookmark for uri is found then it is created.
--   
--   Since: 2.12
bookmarkFileSetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | Sets the meta-data of application name inside the list
--   of applications that have registered a bookmark for
--   uri inside bookmark.
--   
--   You should rarely use this function; use
--   bookmarkFileAddApplication and
--   bookmarkFileRemoveApplication instead.
--   
--   name can be any UTF-8 encoded string used to identify
--   an application. exec can have one of these two
--   modifiers: "%f", which will be expanded as the local file name
--   retrieved from the bookmark's URI; "%u", which will be expanded as the
--   bookmark's URI. The expansion is done automatically when retrieving
--   the stored command line using the bookmarkFileGetAppInfo
--   function. count is the number of times the application
--   has registered the bookmark; if is < 0, the current registration
--   count will be increased by one, if is 0, the application with
--   name will be removed from the list of registered
--   applications. stamp is the Unix time of the last
--   registration; if it is -1, the current time will be used.
--   
--   If you try to remove an application by setting its registration count
--   to zero, and no bookmark for uri is found,
--   False is returned and error is set to
--   G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, in the
--   event that no application name has registered a
--   bookmark for uri, False is returned and error
--   is set to G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED.
--   Otherwise, if no bookmark for uri is found, one is
--   created.
--   
--   Since: 2.12
bookmarkFileSetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> CLong -> m ()

-- | Sets description as the description of the bookmark
--   for uri.
--   
--   If uri is Nothing, the description of
--   bookmark is set.
--   
--   If a bookmark for uri cannot be found then it is
--   created.
--   
--   Since: 2.12
bookmarkFileSetDescription :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()

-- | Sets a list of group names for the item with URI uri.
--   Each previously set group name list is removed.
--   
--   If uri cannot be found then an item for it is created.
--   
--   Since: 2.12
bookmarkFileSetGroups :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe [Text] -> m ()

-- | Sets the icon for the bookmark for uri. If
--   href is Nothing, unsets the currently set icon.
--   href can either be a full URL for the icon file or the
--   icon name following the Icon Naming specification.
--   
--   If no bookmark for uri is found one is created.
--   
--   Since: 2.12
bookmarkFileSetIcon :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Text -> m ()

-- | Sets the private flag of the bookmark for uri.
--   
--   If a bookmark for uri cannot be found then it is
--   created.
--   
--   Since: 2.12
bookmarkFileSetIsPrivate :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Bool -> m ()

-- | Sets mimeType as the MIME type of the bookmark for
--   uri.
--   
--   If a bookmark for uri cannot be found then it is
--   created.
--   
--   Since: 2.12
bookmarkFileSetMimeType :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Sets the last time the bookmark for uri was last
--   modified.
--   
--   If no bookmark for uri is found then it is created.
--   
--   The "modified" time should only be set when the bookmark's meta-data
--   was actually changed. Every function of BookmarkFile that
--   modifies a bookmark also changes the modification time, except for
--   bookmarkFileSetVisited.
--   
--   Since: 2.12
bookmarkFileSetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | Sets title as the title of the bookmark for
--   uri inside the bookmark file bookmark.
--   
--   If uri is Nothing, the title of
--   bookmark is set.
--   
--   If a bookmark for uri cannot be found then it is
--   created.
--   
--   Since: 2.12
bookmarkFileSetTitle :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()

-- | Sets the time the bookmark for uri was last visited.
--   
--   If no bookmark for uri is found then it is created.
--   
--   The "visited" time should only be set if the bookmark was launched,
--   either using the command line retrieved by
--   bookmarkFileGetAppInfo or by the default application for the
--   bookmark's MIME type, retrieved using bookmarkFileGetMimeType.
--   Changing the "visited" time does not affect the "modified" time.
--   
--   Since: 2.12
bookmarkFileSetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | This function outputs bookmark as a string.
--   
--   Since: 2.12
bookmarkFileToData :: (HasCallStack, MonadIO m) => BookmarkFile -> m ByteString

-- | This function outputs bookmark into a file. The write
--   process is guaranteed to be atomic by using fileSetContents
--   internally.
--   
--   Since: 2.12
bookmarkFileToFile :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.BookmarkFile.BookmarkFile

-- | Contains the public fields of a GByteArray.
module GI.GLib.Structs.ByteArray

-- | Memory-managed wrapper type.
newtype ByteArray
ByteArray :: ManagedPtr ByteArray -> ByteArray

-- | Construct a ByteArray struct initialized to zero.
newZeroByteArray :: MonadIO m => m ByteArray

-- | A convenience alias for Nothing :: Maybe
--   ByteArray.
noByteArray :: Maybe ByteArray

-- | Frees the memory allocated by the ByteArray. If
--   freeSegment is True it frees the actual byte
--   data. If the reference count of array is greater than
--   one, the ByteArray wrapper is preserved but the size of
--   array will be set to zero.
byteArrayFree :: (HasCallStack, MonadIO m) => ByteString -> Bool -> m Word8

-- | Transfers the data from the ByteArray into a new immutable
--   Bytes.
--   
--   The ByteArray is freed unless the reference count of
--   array is greater than one, the ByteArray
--   wrapper is preserved but the size of array will be set
--   to zero.
--   
--   This is identical to using bytesNewTake and
--   byteArrayFree together.
--   
--   Since: 2.32
byteArrayFreeToBytes :: (HasCallStack, MonadIO m) => ByteString -> m Bytes

-- | Creates a new ByteArray with a reference count of 1.
byteArrayNew :: (HasCallStack, MonadIO m) => m ByteString

-- | Create byte array containing the data. The data will be owned by the
--   array and will be freed with free, i.e. it could be allocated
--   using strdup.
--   
--   Since: 2.32
byteArrayNewTake :: (HasCallStack, MonadIO m) => ByteString -> m ByteString

-- | Atomically decrements the reference count of array by
--   one. If the reference count drops to 0, all memory allocated by the
--   array is released. This function is thread-safe and may be called from
--   any thread.
--   
--   Since: 2.22
byteArrayUnref :: (HasCallStack, MonadIO m) => ByteString -> m ()

-- | Get the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get byteArray #data
--   
getByteArrayData :: MonadIO m => ByteArray -> m Word8

-- | Set the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set byteArray [ #data := value ]
--   
setByteArrayData :: MonadIO m => ByteArray -> Word8 -> m ()

-- | Get the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get byteArray #len
--   
getByteArrayLen :: MonadIO m => ByteArray -> m Word32

-- | Set the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set byteArray [ #len := value ]
--   
setByteArrayLen :: MonadIO m => ByteArray -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.ByteArray.ByteArray
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ByteArray.ByteArray tag

-- | A simple refcounted data type representing an immutable sequence of
--   zero or more bytes from an unspecified origin.
--   
--   The purpose of a Bytes is to keep the memory region that it
--   holds alive for as long as anyone holds a reference to the bytes. When
--   the last reference count is dropped, the memory is released. Multiple
--   unrelated callers can use byte data in the Bytes without
--   coordinating their activities, resting assured that the byte data will
--   not change or move while they hold a reference.
--   
--   A Bytes can come from many different origins that may have
--   different procedures for freeing the memory region. Examples are
--   memory from malloc, from memory slices, from a
--   MappedFile or memory from other allocators.
--   
--   Bytes work well as keys in HashTable. Use
--   bytesEqual and bytesHash as parameters to
--   g_hash_table_new() or
--   g_hash_table_new_full(). Bytes can also be used
--   as keys in a Tree by passing the bytesCompare function
--   to g_tree_new().
--   
--   The data pointed to by this bytes must not be modified. For a mutable
--   array of bytes see ByteArray. Use bytesUnrefToArray to
--   create a mutable array for a Bytes sequence. To create an
--   immutable Bytes from a mutable ByteArray, use the
--   byteArrayFreeToBytes function.
--   
--   Since: 2.32
module GI.GLib.Structs.Bytes

-- | Memory-managed wrapper type.
newtype Bytes
Bytes :: ManagedPtr Bytes -> Bytes

-- | A convenience alias for Nothing :: Maybe Bytes.
noBytes :: Maybe Bytes

-- | Compares the two Bytes values.
--   
--   This function can be used to sort GBytes instances in lexicographical
--   order.
--   
--   If bytes1 and bytes2 have different
--   length but the shorter one is a prefix of the longer one then the
--   shorter one is considered to be less than the longer one. Otherwise
--   the first byte where both differ is used for comparison. If
--   bytes1 has a smaller value at that position it is
--   considered less, otherwise greater than bytes2.
--   
--   Since: 2.32
bytesCompare :: (HasCallStack, MonadIO m) => Bytes -> Bytes -> m Int32

-- | Compares the two Bytes values being pointed to and returns
--   True if they are equal.
--   
--   This function can be passed to g_hash_table_new() as
--   the keyEqualFunc parameter, when using
--   non-Nothing Bytes pointers as keys in a
--   HashTable.
--   
--   Since: 2.32
bytesEqual :: (HasCallStack, MonadIO m) => Bytes -> Bytes -> m Bool

-- | Get the byte data in the Bytes. This data should not be
--   modified.
--   
--   This function will always return the same pointer for a given
--   Bytes.
--   
--   Nothing may be returned if size is 0. This is
--   not guaranteed, as the Bytes may represent an empty string with
--   data non-Nothing and size as 0.
--   Nothing will not be returned if size is
--   non-zero.
--   
--   Since: 2.32
bytesGetData :: (HasCallStack, MonadIO m) => Bytes -> m (Maybe ByteString)

-- | Get the size of the byte data in the Bytes.
--   
--   This function will always return the same value for a given
--   Bytes.
--   
--   Since: 2.32
bytesGetSize :: (HasCallStack, MonadIO m) => Bytes -> m Word64

-- | Creates an integer hash code for the byte data in the Bytes.
--   
--   This function can be passed to g_hash_table_new() as
--   the keyHashFunc parameter, when using
--   non-Nothing Bytes pointers as keys in a
--   HashTable.
--   
--   Since: 2.32
bytesHash :: (HasCallStack, MonadIO m) => Bytes -> m Word32

-- | Creates a new Bytes from data.
--   
--   data is copied. If size is 0,
--   data may be Nothing.
--   
--   Since: 2.32
bytesNew :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Bytes

-- | Creates a Bytes which is a subsection of another Bytes.
--   The offset + length may not be longer
--   than the size of bytes.
--   
--   A reference to bytes will be held by the newly created
--   Bytes until the byte data is no longer needed.
--   
--   Since 2.56, if offset is 0 and length
--   matches the size of bytes, then bytes
--   will be returned with the reference count incremented by 1. If
--   bytes is a slice of another Bytes, then the
--   resulting Bytes will reference the same Bytes instead of
--   bytes. This allows consumers to simplify the usage of
--   Bytes when asynchronously writing to streams.
--   
--   Since: 2.32
bytesNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> Word64 -> Word64 -> m Bytes

-- | Creates a new Bytes from data.
--   
--   After this call, data belongs to the bytes and may no
--   longer be modified by the caller. free will be called on
--   data when the bytes is no longer in use. Because of
--   this data must have been created by a call to
--   malloc, malloc0 or realloc or by one of the many
--   functions that wrap these calls (such as g_new(),
--   strdup, etc).
--   
--   For creating Bytes with memory from other allocators, see
--   g_bytes_new_with_free_func().
--   
--   data may be Nothing if size is
--   0.
--   
--   Since: 2.32
bytesNewTake :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Bytes

-- | Increase the reference count on bytes.
--   
--   Since: 2.32
bytesRef :: (HasCallStack, MonadIO m) => Bytes -> m Bytes

-- | Releases a reference on bytes. This may result in the
--   bytes being freed. If bytes is Nothing, it will
--   return immediately.
--   
--   Since: 2.32
bytesUnref :: (HasCallStack, MonadIO m) => Bytes -> m ()

-- | Unreferences the bytes, and returns a new mutable ByteArray
--   containing the same byte data.
--   
--   As an optimization, the byte data is transferred to the array without
--   copying if this was the last reference to bytes and bytes was created
--   with bytesNew, bytesNewTake or
--   byteArrayFreeToBytes. In all other cases the data is copied.
--   
--   Since: 2.32
bytesUnrefToArray :: (HasCallStack, MonadIO m) => Bytes -> m ByteString

-- | Unreferences the bytes, and returns a pointer the same byte data
--   contents.
--   
--   As an optimization, the byte data is returned without copying if this
--   was the last reference to bytes and bytes was created with
--   bytesNew, bytesNewTake or byteArrayFreeToBytes.
--   In all other cases the data is copied.
--   
--   Since: 2.32
bytesUnrefToData :: (HasCallStack, MonadIO m) => Bytes -> m ByteString
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Bytes.Bytes

-- | An opaque structure representing a checksumming operation. To create a
--   new GChecksum, use checksumNew. To free a GChecksum, use
--   checksumFree.
--   
--   Since: 2.16
module GI.GLib.Structs.Checksum

-- | Memory-managed wrapper type.
newtype Checksum
Checksum :: ManagedPtr Checksum -> Checksum

-- | A convenience alias for Nothing :: Maybe
--   Checksum.
noChecksum :: Maybe Checksum

-- | Copies a Checksum. If checksum has been closed,
--   by calling checksumGetString or
--   g_checksum_get_digest(), the copied checksum will be
--   closed as well.
--   
--   Since: 2.16
checksumCopy :: (HasCallStack, MonadIO m) => Checksum -> m Checksum

-- | Frees the memory allocated for checksum.
--   
--   Since: 2.16
checksumFree :: (HasCallStack, MonadIO m) => Checksum -> m ()

-- | Gets the digest as an hexadecimal string.
--   
--   Once this function has been called the Checksum can no longer
--   be updated with checksumUpdate.
--   
--   The hexadecimal characters will be lower case.
--   
--   Since: 2.16
checksumGetString :: (HasCallStack, MonadIO m) => Checksum -> m Text

-- | Creates a new Checksum, using the checksum algorithm
--   checksumType. If the checksumType is
--   not known, Nothing is returned. A Checksum can be used
--   to compute the checksum, or digest, of an arbitrary binary blob, using
--   different hashing algorithms.
--   
--   A Checksum works by feeding a binary blob through
--   checksumUpdate until there is data to be checked; the digest
--   can then be extracted using checksumGetString, which will
--   return the checksum as a hexadecimal string; or
--   g_checksum_get_digest(), which will return a vector of
--   raw bytes. Once either checksumGetString or
--   g_checksum_get_digest() have been called on a
--   Checksum, the checksum will be closed and it won't be possible
--   to call checksumUpdate on it anymore.
--   
--   Since: 2.16
checksumNew :: (HasCallStack, MonadIO m) => ChecksumType -> m Checksum

-- | Resets the state of the checksum back to its initial
--   state.
--   
--   Since: 2.18
checksumReset :: (HasCallStack, MonadIO m) => Checksum -> m ()

-- | Gets the length in bytes of digests of type
--   checksumType
--   
--   Since: 2.16
checksumTypeGetLength :: (HasCallStack, MonadIO m) => ChecksumType -> m Int64

-- | Feeds data into an existing Checksum. The
--   checksum must still be open, that is checksumGetString or
--   g_checksum_get_digest() must not have been called on
--   checksum.
--   
--   Since: 2.16
checksumUpdate :: (HasCallStack, MonadIO m) => Checksum -> ByteString -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Checksum.Checksum

-- | The Data struct is an opaque data structure to represent a
--   [Keyed Data List][glib-Keyed-Data-Lists]. It should only be accessed
--   via the following functions.
module GI.GLib.Structs.Data

-- | Memory-managed wrapper type.
newtype Data
Data :: ManagedPtr Data -> Data

-- | A convenience alias for Nothing :: Maybe Data.
noData :: Maybe Data
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Data.Data

-- | Associates a string with a bit flag. Used in parseDebugString.
module GI.GLib.Structs.DebugKey

-- | Memory-managed wrapper type.
newtype DebugKey
DebugKey :: ManagedPtr DebugKey -> DebugKey

-- | Construct a DebugKey struct initialized to zero.
newZeroDebugKey :: MonadIO m => m DebugKey

-- | A convenience alias for Nothing :: Maybe
--   DebugKey.
noDebugKey :: Maybe DebugKey

-- | Set the value of the “key” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #key
--   
clearDebugKeyKey :: MonadIO m => DebugKey -> m ()

-- | Get the value of the “key” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get debugKey #key
--   
getDebugKeyKey :: MonadIO m => DebugKey -> m (Maybe Text)

-- | Set the value of the “key” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set debugKey [ #key := value ]
--   
setDebugKeyKey :: MonadIO m => DebugKey -> CString -> m ()

-- | Get the value of the “value” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get debugKey #value
--   
getDebugKeyValue :: MonadIO m => DebugKey -> m Word32

-- | Set the value of the “value” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set debugKey [ #value := value ]
--   
setDebugKeyValue :: MonadIO m => DebugKey -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.DebugKey.DebugKey
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.DebugKey.DebugKey tag

-- | An opaque structure representing an opened directory.
module GI.GLib.Structs.Dir

-- | Memory-managed wrapper type.
newtype Dir
Dir :: ManagedPtr Dir -> Dir

-- | A convenience alias for Nothing :: Maybe Dir.
noDir :: Maybe Dir

-- | Closes the directory and deallocates all related resources.
dirClose :: (HasCallStack, MonadIO m) => Dir -> m ()

-- | Creates a subdirectory in the preferred directory for temporary files
--   (as returned by getTmpDir).
--   
--   tmpl should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, as the parameter to
--   g_mkstemp(). However, unlike these functions, the
--   template should only be a basename, no directory components are
--   allowed. If template is Nothing, a default template is used.
--   
--   Note that in contrast to g_mkdtemp() (and
--   mkdtemp()) tmpl is not modified, and
--   might thus be a read-only literal string.
--   
--   Since: 2.30
dirMakeTmp :: (HasCallStack, MonadIO m) => Maybe [Char] -> m [Char]

-- | Retrieves the name of another entry in the directory, or
--   Nothing. The order of entries returned from this function is
--   not defined, and may vary by file system or other operating-system
--   dependent factors.
--   
--   Nothing may also be returned in case of errors. On Unix, you
--   can check errno to find out if Nothing was returned
--   because of an error.
--   
--   On Unix, the '.' and '..' entries are omitted, and the returned name
--   is in the on-disk encoding.
--   
--   On Windows, as is true of all GLib functions which operate on
--   filenames, the returned name is in UTF-8.
dirReadName :: (HasCallStack, MonadIO m) => Dir -> m [Char]

-- | Resets the given directory. The next call to dirReadName will
--   return the first entry again.
dirRewind :: (HasCallStack, MonadIO m) => Dir -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Dir.Dir

-- | A GHashTableIter structure represents an iterator that can be used to
--   iterate over the elements of a HashTable. GHashTableIter
--   structures are typically allocated on the stack and then initialized
--   with hashTableIterInit.
module GI.GLib.Structs.HashTableIter

-- | Memory-managed wrapper type.
newtype HashTableIter
HashTableIter :: ManagedPtr HashTableIter -> HashTableIter

-- | Construct a HashTableIter struct initialized to zero.
newZeroHashTableIter :: MonadIO m => m HashTableIter

-- | A convenience alias for Nothing :: Maybe
--   HashTableIter.
noHashTableIter :: Maybe HashTableIter

-- | Initializes a key/value pair iterator and associates it with
--   hashTable. Modifying the hash table after calling this
--   function invalidates the returned iterator.
--   
--   
C code
--   
--   
--   GHashTableIter iter;
--   gpointer key, value;
--   
--   g_hash_table_iter_init (&iter, hash_table);
--   while (g_hash_table_iter_next (&iter, &key, &value))
--     {
--       // do something with key and value
--     }
--   
--   
--   Since: 2.16
hashTableIterInit :: (HasCallStack, MonadIO m) => HashTableIter -> Map (Ptr ()) (Ptr ()) -> m ()

-- | Advances iter and retrieves the key and/or value that
--   are now pointed to as a result of this advancement. If False is
--   returned, key and value are not set,
--   and the iterator becomes invalid.
--   
--   Since: 2.16
hashTableIterNext :: (HasCallStack, MonadIO m) => HashTableIter -> m (Bool, Ptr (), Ptr ())

-- | Removes the key/value pair currently pointed to by the iterator from
--   its associated HashTable. Can only be called after
--   hashTableIterNext returned True, and cannot be called
--   more than once for the same key/value pair.
--   
--   If the HashTable was created using
--   g_hash_table_new_full(), the key and value are freed
--   using the supplied destroy functions, otherwise you have to make sure
--   that any dynamically allocated values are freed yourself.
--   
--   It is safe to continue iterating the HashTable afterward:
--   
--   
C code
--   
--   
--   while (g_hash_table_iter_next (&iter, &key, &value))
--     {
--       if (condition)
--         g_hash_table_iter_remove (&iter);
--     }
--   
--   
--   Since: 2.16
hashTableIterRemove :: (HasCallStack, MonadIO m) => HashTableIter -> m ()

-- | Replaces the value currently pointed to by the iterator from its
--   associated HashTable. Can only be called after
--   hashTableIterNext returned True.
--   
--   If you supplied a valueDestroyFunc when creating the
--   HashTable, the old value is freed using that function.
--   
--   Since: 2.30
hashTableIterReplace :: (HasCallStack, MonadIO m) => HashTableIter -> Ptr () -> m ()

-- | Removes the key/value pair currently pointed to by the iterator from
--   its associated HashTable, without calling the key and value
--   destroy functions. Can only be called after hashTableIterNext
--   returned True, and cannot be called more than once for the same
--   key/value pair.
--   
--   Since: 2.16
hashTableIterSteal :: (HasCallStack, MonadIO m) => HashTableIter -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.HashTableIter.HashTableIter
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.HashTableIter.HashTableIter tag

-- | An opaque structure representing a HMAC operation. To create a new
--   GHmac, use g_hmac_new(). To free a GHmac, use
--   hmacUnref.
--   
--   Since: 2.30
module GI.GLib.Structs.Hmac

-- | Memory-managed wrapper type.
newtype Hmac
Hmac :: ManagedPtr Hmac -> Hmac

-- | A convenience alias for Nothing :: Maybe Hmac.
noHmac :: Maybe Hmac

-- | Gets the digest from checksum as a raw binary array
--   and places it into buffer. The size of the digest
--   depends on the type of checksum.
--   
--   Once this function has been called, the Hmac is closed and can
--   no longer be updated with checksumUpdate.
--   
--   Since: 2.30
hmacGetDigest :: (HasCallStack, MonadIO m) => Hmac -> ByteString -> m ()

-- | Gets the HMAC as an hexadecimal string.
--   
--   Once this function has been called the Hmac can no longer be
--   updated with hmacUpdate.
--   
--   The hexadecimal characters will be lower case.
--   
--   Since: 2.30
hmacGetString :: (HasCallStack, MonadIO m) => Hmac -> m Text

-- | Atomically decrements the reference count of hmac by
--   one.
--   
--   If the reference count drops to 0, all keys and values will be
--   destroyed, and all memory allocated by the hash table is released.
--   This function is MT-safe and may be called from any thread. Frees the
--   memory allocated for hmac.
--   
--   Since: 2.30
hmacUnref :: (HasCallStack, MonadIO m) => Hmac -> m ()

-- | Feeds data into an existing Hmac.
--   
--   The HMAC must still be open, that is hmacGetString or
--   hmacGetDigest must not have been called on
--   hmac.
--   
--   Since: 2.30
hmacUpdate :: (HasCallStack, MonadIO m) => Hmac -> ByteString -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Hmac.Hmac

-- | A data structure representing an IO Channel. The fields should be
--   considered private and should only be accessed with the following
--   functions.
module GI.GLib.Structs.IOChannel

-- | Memory-managed wrapper type.
newtype IOChannel
IOChannel :: ManagedPtr IOChannel -> IOChannel

-- | Construct a IOChannel struct initialized to zero.
newZeroIOChannel :: MonadIO m => m IOChannel

-- | A convenience alias for Nothing :: Maybe
--   IOChannel.
noIOChannel :: Maybe IOChannel

-- | Close an IO channel. Any pending data to be written will be flushed,
--   ignoring errors. The channel will not be freed until the last
--   reference is dropped using iOChannelUnref.

-- | Deprecated: (Since version 2.2)Use iOChannelShutdown
--   instead.
iOChannelClose :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Converts an errno error number to a IOChannelError.
iOChannelErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m IOChannelError

-- | No description available in the introspection data.
iOChannelErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Flushes the write buffer for the GIOChannel.
iOChannelFlush :: (HasCallStack, MonadIO m) => IOChannel -> m IOStatus

-- | This function returns a IOCondition depending on whether there
--   is data to be read/space to write data in the internal buffers in the
--   IOChannel. Only the flags IOConditionIn and
--   IOConditionOut may be set.
iOChannelGetBufferCondition :: (HasCallStack, MonadIO m) => IOChannel -> m [IOCondition]

-- | Gets the buffer size.
iOChannelGetBufferSize :: (HasCallStack, MonadIO m) => IOChannel -> m Word64

-- | Returns whether channel is buffered.
iOChannelGetBuffered :: (HasCallStack, MonadIO m) => IOChannel -> m Bool

-- | Returns whether the file/socket/whatever associated with
--   channel will be closed when channel
--   receives its final unref and is destroyed. The default value of this
--   is True for channels created by g_io_channel_new_file (), and
--   False for all other channels.
iOChannelGetCloseOnUnref :: (HasCallStack, MonadIO m) => IOChannel -> m Bool

-- | Gets the encoding for the input/output of the channel. The internal
--   encoding is always UTF-8. The encoding Nothing makes the
--   channel safe for binary data.
iOChannelGetEncoding :: (HasCallStack, MonadIO m) => IOChannel -> m Text

-- | Gets the current flags for a IOChannel, including read-only
--   flags such as IOFlagsIsReadable.
--   
--   The values of the flags IOFlagsIsReadable and
--   IOFlagsIsWritable are cached for internal use by the channel
--   when it is created. If they should change at some later point (e.g.
--   partial shutdown of a socket with the UNIX shutdown()
--   function), the user should immediately call iOChannelGetFlags
--   to update the internal values of these flags.
iOChannelGetFlags :: (HasCallStack, MonadIO m) => IOChannel -> m [IOFlags]

-- | This returns the string that IOChannel uses to determine where
--   in the file a line break occurs. A value of Nothing indicates
--   autodetection.
iOChannelGetLineTerm :: (HasCallStack, MonadIO m) => IOChannel -> Int32 -> m Text

-- | Initializes a IOChannel struct.
--   
--   This is called by each of the above functions when creating a
--   IOChannel, and so is not often needed by the application
--   programmer (unless you are creating a new type of IOChannel).
iOChannelInit :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Open a file filename as a IOChannel using mode
--   mode. This channel will be closed when the last
--   reference to it is dropped, so there is no need to call
--   iOChannelClose (though doing so will not cause problems, as
--   long as no attempt is made to access the channel after it is closed).
iOChannelNewFile :: (HasCallStack, MonadIO m) => [Char] -> Text -> m IOChannel

-- | Reads data from a IOChannel.

-- | Deprecated: (Since version 2.2)Use iOChannelReadChars
--   instead.
iOChannelRead :: (HasCallStack, MonadIO m) => IOChannel -> Text -> Word64 -> Word64 -> m IOError

-- | Replacement for iOChannelRead with the new API.
iOChannelReadChars :: (HasCallStack, MonadIO m) => IOChannel -> ByteString -> m (IOStatus, ByteString, Word64)

-- | Reads a line, including the terminating character(s), from a
--   IOChannel into a newly-allocated string.
--   strReturn will contain allocated memory if the return
--   is IOStatusNormal.
iOChannelReadLine :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, Text, Word64, Word64)

-- | Reads all the remaining data from the file.
iOChannelReadToEnd :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, ByteString)

-- | Reads a Unicode character from channel. This function
--   cannot be called on a channel with Nothing encoding.
iOChannelReadUnichar :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, Char)

-- | Increments the reference count of a IOChannel.
iOChannelRef :: (HasCallStack, MonadIO m) => IOChannel -> m IOChannel

-- | Sets the current position in the IOChannel, similar to the
--   standard library function fseek().

-- | Deprecated: (Since version 2.2)Use iOChannelSeekPosition
--   instead.
iOChannelSeek :: (HasCallStack, MonadIO m) => IOChannel -> Int64 -> SeekType -> m IOError

-- | Replacement for iOChannelSeek with the new API.
iOChannelSeekPosition :: (HasCallStack, MonadIO m) => IOChannel -> Int64 -> SeekType -> m IOStatus

-- | Sets the buffer size.
iOChannelSetBufferSize :: (HasCallStack, MonadIO m) => IOChannel -> Word64 -> m ()

-- | The buffering state can only be set if the channel's encoding is
--   Nothing. For any other encoding, the channel must be buffered.
--   
--   A buffered channel can only be set unbuffered if the channel's
--   internal buffers have been flushed. Newly created channels or channels
--   which have returned IOStatusEof not require such a flush. For
--   write-only channels, a call to g_io_channel_flush () is sufficient.
--   For all other channels, the buffers may be flushed by a call to
--   g_io_channel_seek_position (). This includes the possibility of
--   seeking with seek type SeekTypeCur and an offset of zero. Note
--   that this means that socket-based channels cannot be set unbuffered
--   once they have had data read from them.
--   
--   On unbuffered channels, it is safe to mix read and write calls from
--   the new and old APIs, if this is necessary for maintaining old code.
--   
--   The default state of the channel is buffered.
iOChannelSetBuffered :: (HasCallStack, MonadIO m) => IOChannel -> Bool -> m ()

-- | Whether to close the channel on the final unref of the
--   IOChannel data structure. The default value of this is
--   True for channels created by g_io_channel_new_file (), and
--   False for all other channels.
--   
--   Setting this flag to True for a channel you have already closed
--   can cause problems when the final reference to the IOChannel is
--   dropped.
iOChannelSetCloseOnUnref :: (HasCallStack, MonadIO m) => IOChannel -> Bool -> m ()

-- | Sets the encoding for the input/output of the channel. The internal
--   encoding is always UTF-8. The default encoding for the external file
--   is UTF-8.
--   
--   The encoding Nothing is safe to use with binary data.
--   
--   The encoding can only be set if one of the following conditions is
--   true:
--   
--   
--   
- The channel was just created, and has not been written to or read
--   from yet.
--   
- The channel is write-only.
--   
- The channel is a file, and the file pointer was just repositioned
--   by a call to iOChannelSeekPosition. (This flushes all the
--   internal buffers.)
--   
- The current encoding is Nothing or UTF-8.
--   
- One of the (new API) read functions has just returned
--   IOStatusEof (or, in the case of iOChannelReadToEnd,
--   IOStatusNormal).
--   
- One of the functions iOChannelReadChars or
--   iOChannelReadUnichar has returned IOStatusAgain or
--   IOStatusError. This may be useful in the case of
--   ConvertErrorIllegalSequence. Returning one of these statuses
--   from iOChannelReadLine,
--   g_io_channel_read_line_string(), or
--   iOChannelReadToEnd does not guarantee that the encoding can be
--   changed.
--   
--   
--   Channels which do not meet one of the above conditions cannot call
--   iOChannelSeekPosition with an offset of SeekTypeCur,
--   and, if they are "seekable", cannot call iOChannelWriteChars
--   after calling one of the API "read" functions.
iOChannelSetEncoding :: (HasCallStack, MonadIO m) => IOChannel -> Maybe Text -> m IOStatus

-- | Sets the (writeable) flags in channel to
--   (flags & IOFlagsSetMask).
iOChannelSetFlags :: (HasCallStack, MonadIO m) => IOChannel -> [IOFlags] -> m IOStatus

-- | This sets the string that IOChannel uses to determine where in
--   the file a line break occurs.
iOChannelSetLineTerm :: (HasCallStack, MonadIO m) => IOChannel -> Maybe Text -> Int32 -> m ()

-- | Close an IO channel. Any pending data to be written will be flushed if
--   flush is True. The channel will not be freed
--   until the last reference is dropped using iOChannelUnref.
iOChannelShutdown :: (HasCallStack, MonadIO m) => IOChannel -> Bool -> m IOStatus

-- | Returns the file descriptor of the IOChannel.
--   
--   On Windows this function returns the file descriptor or socket of the
--   IOChannel.
iOChannelUnixGetFd :: (HasCallStack, MonadIO m) => IOChannel -> m Int32

-- | Creates a new IOChannel given a file descriptor. On UNIX
--   systems this works for plain files, pipes, and sockets.
--   
--   The returned IOChannel has a reference count of 1.
--   
--   The default encoding for IOChannel is UTF-8. If your
--   application is reading output from a command using via pipe, you may
--   need to set the encoding to the encoding of the current locale (see
--   getCharset) with the iOChannelSetEncoding function. By
--   default, the fd passed will not be closed when the final reference to
--   the IOChannel data structure is dropped.
--   
--   If you want to read raw binary data without interpretation, then call
--   the iOChannelSetEncoding function with Nothing for the
--   encoding argument.
--   
--   This function is available in GLib on Windows, too, but you should
--   avoid using it on Windows. The domain of file descriptors and sockets
--   overlap. There is no way for GLib to know which one you mean in case
--   the argument you pass to this function happens to be both a valid file
--   descriptor and socket. If that happens a warning is issued, and GLib
--   assumes that it is the file descriptor you mean.
iOChannelUnixNew :: (HasCallStack, MonadIO m) => Int32 -> m IOChannel

-- | Decrements the reference count of a IOChannel.
iOChannelUnref :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Writes data to a IOChannel.

-- | Deprecated: (Since version 2.2)Use iOChannelWriteChars
--   instead.
iOChannelWrite :: (HasCallStack, MonadIO m) => IOChannel -> Text -> Word64 -> Word64 -> m IOError

-- | Replacement for iOChannelWrite with the new API.
--   
--   On seekable channels with encodings other than Nothing or
--   UTF-8, generic mixing of reading and writing is not allowed. A call to
--   g_io_channel_write_chars () may only be made on a channel from which
--   data has been read in the cases described in the documentation for
--   g_io_channel_set_encoding ().
iOChannelWriteChars :: (HasCallStack, MonadIO m) => IOChannel -> Ptr Word8 -> Int64 -> m (IOStatus, Word64)

-- | Writes a Unicode character to channel. This function
--   cannot be called on a channel with Nothing encoding.
iOChannelWriteUnichar :: (HasCallStack, MonadIO m) => IOChannel -> Char -> m IOStatus
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.IOChannel.IOChannel
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.IOChannel.IOChannel tag

-- | The GKeyFile struct contains only private data and should not be
--   accessed directly.
module GI.GLib.Structs.KeyFile

-- | Memory-managed wrapper type.
newtype KeyFile
KeyFile :: ManagedPtr KeyFile -> KeyFile

-- | A convenience alias for Nothing :: Maybe KeyFile.
noKeyFile :: Maybe KeyFile

-- | No description available in the introspection data.
keyFileErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Returns the value associated with key under
--   groupName as a boolean.
--   
--   If key cannot be found then False is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value
--   associated with key cannot be interpreted as a boolean
--   then False is returned and error is set to
--   G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.6
keyFileGetBoolean :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ()

-- | Returns the values associated with key under
--   groupName as booleans.
--   
--   If key cannot be found then Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the
--   values associated with key cannot be interpreted as
--   booleans then Nothing is returned and error is
--   set to G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.6
keyFileGetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Bool]

-- | Retrieves a comment above key from
--   groupName. If key is Nothing
--   then comment will be read from above
--   groupName. If both key and
--   groupName are Nothing, then
--   comment will be read from above the first group in the
--   file.
--   
--   Note that the returned string does not include the '#' comment
--   markers, but does include any whitespace after them (on each line). It
--   includes the line breaks between lines, but does not include the final
--   line break.
--   
--   Since: 2.6
keyFileGetComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Text -> m Text

-- | Returns the value associated with key under
--   groupName as a double. If groupName is
--   Nothing, the start_group is used.
--   
--   If key cannot be found then 0.0 is returned and
--   error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value
--   associated with key cannot be interpreted as a double
--   then 0.0 is returned and error is set to
--   G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.12
keyFileGetDouble :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Double

-- | Returns the values associated with key under
--   groupName as doubles.
--   
--   If key cannot be found then Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the
--   values associated with key cannot be interpreted as
--   doubles then Nothing is returned and error is
--   set to G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.12
keyFileGetDoubleList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Double]

-- | Returns all groups in the key file loaded with
--   keyFile. The array of returned groups will be
--   Nothing-terminated, so length may optionally be
--   Nothing.
--   
--   Since: 2.6
keyFileGetGroups :: (HasCallStack, MonadIO m) => KeyFile -> m ([Text], Word64)

-- | Returns the value associated with key under
--   groupName as a signed 64-bit integer. This is similar
--   to keyFileGetInteger but can return 64-bit results without
--   truncation.
--   
--   Since: 2.26
keyFileGetInt64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Int64

-- | Returns the value associated with key under
--   groupName as an integer.
--   
--   If key cannot be found then 0 is returned and
--   error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value
--   associated with key cannot be interpreted as an
--   integer, or is out of range for a gint, then 0 is
--   returned and error is set to
--   G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.6
keyFileGetInteger :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Int32

-- | Returns the values associated with key under
--   groupName as integers.
--   
--   If key cannot be found then Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the
--   values associated with key cannot be interpreted as
--   integers, or are out of range for gint, then
--   Nothing is returned and error is set to
--   G_KEY_FILE_ERROR_INVALID_VALUE.
--   
--   Since: 2.6
keyFileGetIntegerList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Int32]

-- | Returns all keys for the group name groupName. The
--   array of returned keys will be Nothing-terminated, so
--   length may optionally be Nothing. In the event
--   that the groupName cannot be found, Nothing is
--   returned and error is set to
--   G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
--   
--   Since: 2.6
keyFileGetKeys :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ([Text], Word64)

-- | Returns the actual locale which the result of
--   keyFileGetLocaleString or keyFileGetLocaleStringList
--   came from.
--   
--   If calling keyFileGetLocaleString or
--   keyFileGetLocaleStringList with exactly the same
--   keyFile, groupName,
--   key and locale, the result of those
--   functions will have originally been tagged with the locale that is the
--   result of this function.
--   
--   Since: 2.56
keyFileGetLocaleForKey :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m (Maybe Text)

-- | Returns the value associated with key under
--   groupName translated in the given
--   locale if available. If locale is
--   Nothing then the current locale is assumed.
--   
--   If locale is to be non-Nothing, or if the
--   current locale will change over the lifetime of the KeyFile, it
--   must be loaded with KeyFileFlagsKeepTranslations in order to
--   load strings for all locales.
--   
--   If key cannot be found then Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value
--   associated with key cannot be interpreted or no
--   suitable translation can be found then the untranslated value is
--   returned.
--   
--   Since: 2.6
keyFileGetLocaleString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m Text

-- | Returns the values associated with key under
--   groupName translated in the given
--   locale if available. If locale is
--   Nothing then the current locale is assumed.
--   
--   If locale is to be non-Nothing, or if the
--   current locale will change over the lifetime of the KeyFile, it
--   must be loaded with KeyFileFlagsKeepTranslations in order to
--   load strings for all locales.
--   
--   If key cannot be found then Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values
--   associated with key cannot be interpreted or no
--   suitable translations can be found then the untranslated values are
--   returned. The returned array is Nothing-terminated, so
--   length may optionally be Nothing.
--   
--   Since: 2.6
keyFileGetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m ([Text], Word64)

-- | Returns the name of the start group of the file.
--   
--   Since: 2.6
keyFileGetStartGroup :: (HasCallStack, MonadIO m) => KeyFile -> m Text

-- | Returns the string value associated with key under
--   groupName. Unlike keyFileGetValue, this
--   function handles escape sequences like \s.
--   
--   In the event the key cannot be found, Nothing is returned and
--   error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the
--   groupName cannot be found, Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
--   
--   Since: 2.6
keyFileGetString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Text

-- | Returns the values associated with key under
--   groupName.
--   
--   In the event the key cannot be found, Nothing is returned and
--   error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the
--   groupName cannot be found, Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
--   
--   Since: 2.6
keyFileGetStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ([Text], Word64)

-- | Returns the value associated with key under
--   groupName as an unsigned 64-bit integer. This is
--   similar to keyFileGetInteger but can return large positive
--   results without truncation.
--   
--   Since: 2.26
keyFileGetUint64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Word64

-- | Returns the raw value associated with key under
--   groupName. Use keyFileGetString to retrieve an
--   unescaped UTF-8 string.
--   
--   In the event the key cannot be found, Nothing is returned and
--   error is set to
--   G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the
--   groupName cannot be found, Nothing is returned
--   and error is set to
--   G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
--   
--   Since: 2.6
keyFileGetValue :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Text

-- | Looks whether the key file has the group groupName.
--   
--   Since: 2.6
keyFileHasGroup :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m Bool

-- | Loads a key file from the data in bytes into an empty
--   KeyFile structure. If the object cannot be created then
--   error is set to a KeyFileError.
--   
--   Since: 2.50
keyFileLoadFromBytes :: (HasCallStack, MonadIO m) => KeyFile -> Bytes -> [KeyFileFlags] -> m ()

-- | Loads a key file from memory into an empty KeyFile structure.
--   If the object cannot be created then error is set to a
--   KeyFileError.
--   
--   Since: 2.6
keyFileLoadFromData :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Word64 -> [KeyFileFlags] -> m ()

-- | This function looks for a key file named file in the
--   paths returned from getUserDataDir and
--   getSystemDataDirs, loads the file into keyFile
--   and returns the file's full path in fullPath. If the
--   file could not be loaded then an error is set to
--   either a FileError or KeyFileError.
--   
--   Since: 2.6
keyFileLoadFromDataDirs :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [KeyFileFlags] -> m [Char]

-- | This function looks for a key file named file in the
--   paths specified in searchDirs, loads the file into
--   keyFile and returns the file's full path in
--   fullPath.
--   
--   If the file could not be found in any of the
--   searchDirs, KeyFileErrorNotFound is returned.
--   If the file is found but the OS returns an error when opening or
--   reading the file, a G_FILE_ERROR is returned. If there
--   is a problem parsing the file, a G_KEY_FILE_ERROR is
--   returned.
--   
--   Since: 2.14
keyFileLoadFromDirs :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [[Char]] -> [KeyFileFlags] -> m [Char]

-- | Loads a key file into an empty KeyFile structure.
--   
--   If the OS returns an error when opening or reading the file, a
--   G_FILE_ERROR is returned. If there is a problem
--   parsing the file, a G_KEY_FILE_ERROR is returned.
--   
--   This function will never return a KeyFileErrorNotFound error.
--   If the file is not found, FileErrorNoent is
--   returned.
--   
--   Since: 2.6
keyFileLoadFromFile :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [KeyFileFlags] -> m ()

-- | Creates a new empty KeyFile object. Use
--   keyFileLoadFromFile, keyFileLoadFromData,
--   keyFileLoadFromDirs or keyFileLoadFromDataDirs to read
--   an existing key file.
--   
--   Since: 2.6
keyFileNew :: (HasCallStack, MonadIO m) => m KeyFile

-- | Removes a comment above key from
--   groupName. If key is Nothing
--   then comment will be removed above
--   groupName. If both key and
--   groupName are Nothing, then
--   comment will be removed above the first group in the
--   file.
--   
--   Since: 2.6
keyFileRemoveComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Maybe Text -> m ()

-- | Removes the specified group, groupName, from the key
--   file.
--   
--   Since: 2.6
keyFileRemoveGroup :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ()

-- | Removes key in groupName from the key
--   file.
--   
--   Since: 2.6
keyFileRemoveKey :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ()

-- | Writes the contents of keyFile to
--   filename using fileSetContents.
--   
--   This function can fail for any of the reasons that
--   fileSetContents may fail.
--   
--   Since: 2.40
keyFileSaveToFile :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ()

-- | Associates a new boolean value with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.6
keyFileSetBoolean :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Bool -> m ()

-- | Associates a list of boolean values with key under
--   groupName. If key cannot be found then
--   it is created. If groupName is Nothing, the
--   start_group is used.
--   
--   Since: 2.6
keyFileSetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Bool] -> m ()

-- | Places a comment above key from
--   groupName.
--   
--   If key is Nothing then comment
--   will be written above groupName. If both
--   key and groupName are Nothing,
--   then comment will be written above the first group in
--   the file.
--   
--   Note that this function prepends a '#' comment marker to each line of
--   comment.
--   
--   Since: 2.6
keyFileSetComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Maybe Text -> Text -> m ()

-- | Associates a new double value with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.12
keyFileSetDouble :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Double -> m ()

-- | Associates a list of double values with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.12
keyFileSetDoubleList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Double] -> m ()

-- | Associates a new integer value with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.26
keyFileSetInt64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Int64 -> m ()

-- | Associates a new integer value with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.6
keyFileSetInteger :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Int32 -> m ()

-- | Associates a list of integer values with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.6
keyFileSetIntegerList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Int32] -> m ()

-- | Sets the character which is used to separate values in lists.
--   Typically ';' or ',' are used as separators. The default list
--   separator is ';'.
--   
--   Since: 2.6
keyFileSetListSeparator :: (HasCallStack, MonadIO m) => KeyFile -> Int8 -> m ()

-- | Associates a string value for key and
--   locale under groupName. If the
--   translation for key cannot be found then it is
--   created.
--   
--   Since: 2.6
keyFileSetLocaleString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> Text -> m ()

-- | Associates a list of string values for key and
--   locale under groupName. If the
--   translation for key cannot be found then it is
--   created.
--   
--   Since: 2.6
keyFileSetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> [Text] -> Word64 -> m ()

-- | Associates a new string value with key under
--   groupName. If key cannot be found then
--   it is created. If groupName cannot be found then it is
--   created. Unlike keyFileSetValue, this function handles
--   characters that need escaping, such as newlines.
--   
--   Since: 2.6
keyFileSetString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> m ()

-- | Associates a list of string values for key under
--   groupName. If key cannot be found then
--   it is created. If groupName cannot be found then it is
--   created.
--   
--   Since: 2.6
keyFileSetStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Text] -> Word64 -> m ()

-- | Associates a new integer value with key under
--   groupName. If key cannot be found then
--   it is created.
--   
--   Since: 2.26
keyFileSetUint64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Word64 -> m ()

-- | Associates a new value with key under
--   groupName.
--   
--   If key cannot be found then it is created. If
--   groupName cannot be found then it is created. To set
--   an UTF-8 string which may contain characters that need escaping (such
--   as newlines or spaces), use keyFileSetString.
--   
--   Since: 2.6
keyFileSetValue :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> m ()

-- | This function outputs keyFile as a string.
--   
--   Note that this function never reports an error, so it is safe to pass
--   Nothing as error.
--   
--   Since: 2.6
keyFileToData :: (HasCallStack, MonadIO m) => KeyFile -> m (Text, Word64)

-- | Decreases the reference count of keyFile by 1. If the
--   reference count reaches zero, frees the key file and all its allocated
--   memory.
--   
--   Since: 2.32
keyFileUnref :: (HasCallStack, MonadIO m) => KeyFile -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.KeyFile.KeyFile

-- | Structure representing a single field in a structured log entry. See
--   g_log_structured() for details.
--   
--   Log fields may contain arbitrary values, including binary with
--   embedded nul bytes. If the field contains a string, the string must be
--   UTF-8 encoded and have a trailing nul byte. Otherwise,
--   length must be set to a non-negative value.
--   
--   Since: 2.50
module GI.GLib.Structs.LogField

-- | Memory-managed wrapper type.
newtype LogField
LogField :: ManagedPtr LogField -> LogField

-- | Construct a LogField struct initialized to zero.
newZeroLogField :: MonadIO m => m LogField

-- | A convenience alias for Nothing :: Maybe
--   LogField.
noLogField :: Maybe LogField

-- | Set the value of the “key” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #key
--   
clearLogFieldKey :: MonadIO m => LogField -> m ()

-- | Get the value of the “key” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get logField #key
--   
getLogFieldKey :: MonadIO m => LogField -> m (Maybe Text)

-- | Set the value of the “key” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set logField [ #key := value ]
--   
setLogFieldKey :: MonadIO m => LogField -> CString -> m ()

-- | Get the value of the “length” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get logField #length
--   
getLogFieldLength :: MonadIO m => LogField -> m Int64

-- | Set the value of the “length” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set logField [ #length := value ]
--   
setLogFieldLength :: MonadIO m => LogField -> Int64 -> m ()

-- | Set the value of the “value” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #value
--   
clearLogFieldValue :: MonadIO m => LogField -> m ()

-- | Get the value of the “value” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get logField #value
--   
getLogFieldValue :: MonadIO m => LogField -> m (Ptr ())

-- | Set the value of the “value” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set logField [ #value := value ]
--   
setLogFieldValue :: MonadIO m => LogField -> Ptr () -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.LogField.LogField
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.LogField.LogField tag

-- | The GMainLoop struct is an opaque data type representing the
--   main event loop of a GLib or GTK+ application.
module GI.GLib.Structs.MainLoop

-- | Memory-managed wrapper type.
newtype MainLoop
MainLoop :: ManagedPtr MainLoop -> MainLoop

-- | A convenience alias for Nothing :: Maybe
--   MainLoop.
noMainLoop :: Maybe MainLoop

-- | Returns the MainContext of loop.
mainLoopGetContext :: (HasCallStack, MonadIO m) => MainLoop -> m MainContext

-- | Checks to see if the main loop is currently being run via
--   mainLoopRun.
mainLoopIsRunning :: (HasCallStack, MonadIO m) => MainLoop -> m Bool

-- | Creates a new MainLoop structure.
mainLoopNew :: (HasCallStack, MonadIO m) => Maybe MainContext -> Bool -> m MainLoop

-- | Stops a MainLoop from running. Any calls to mainLoopRun
--   for the loop will return.
--   
--   Note that sources that have already been dispatched when
--   mainLoopQuit is called will still be executed.
mainLoopQuit :: (HasCallStack, MonadIO m) => MainLoop -> m ()

-- | Increases the reference count on a MainLoop object by one.
mainLoopRef :: (HasCallStack, MonadIO m) => MainLoop -> m MainLoop

-- | Runs a main loop until mainLoopQuit is called on the loop. If
--   this is called for the thread of the loop's MainContext, it
--   will process events from the loop, otherwise it will simply wait.
mainLoopRun :: (HasCallStack, MonadIO m) => MainLoop -> m ()

-- | Decreases the reference count on a MainLoop object by one. If
--   the result is zero, free the loop and free all associated memory.
mainLoopUnref :: (HasCallStack, MonadIO m) => MainLoop -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.MainLoop.MainLoop

-- | The MappedFile represents a file mapping created with
--   mappedFileNew. It has only private members and should not be
--   accessed directly.
module GI.GLib.Structs.MappedFile

-- | Memory-managed wrapper type.
newtype MappedFile
MappedFile :: ManagedPtr MappedFile -> MappedFile

-- | A convenience alias for Nothing :: Maybe
--   MappedFile.
noMappedFile :: Maybe MappedFile

-- | This call existed before MappedFile had refcounting and is
--   currently exactly the same as mappedFileUnref.
--   
--   Since: 2.8

-- | Deprecated: (Since version 2.22)Use mappedFileUnref
--   instead.
mappedFileFree :: (HasCallStack, MonadIO m) => MappedFile -> m ()

-- | Creates a new Bytes which references the data mapped from
--   file. The mapped contents of the file must not be
--   modified after creating this bytes object, because a Bytes
--   should be immutable.
--   
--   Since: 2.34
mappedFileGetBytes :: (HasCallStack, MonadIO m) => MappedFile -> m Bytes

-- | Returns the contents of a MappedFile.
--   
--   Note that the contents may not be zero-terminated, even if the
--   MappedFile is backed by a text file.
--   
--   If the file is empty then Nothing is returned.
--   
--   Since: 2.8
mappedFileGetContents :: (HasCallStack, MonadIO m) => MappedFile -> m Text

-- | Returns the length of the contents of a MappedFile.
--   
--   Since: 2.8
mappedFileGetLength :: (HasCallStack, MonadIO m) => MappedFile -> m Word64

-- | Maps a file into memory. On UNIX, this is using the
--   mmap() function.
--   
--   If writable is True, the mapped buffer may be
--   modified, otherwise it is an error to modify the mapped buffer.
--   Modifications to the buffer are not visible to other processes mapping
--   the same file, and are not written back to the file.
--   
--   Note that modifications of the underlying file might affect the
--   contents of the MappedFile. Therefore, mapping should only be
--   used if the file will not be modified, or if all modifications of the
--   file are done atomically (e.g. using fileSetContents).
--   
--   If filename is the name of an empty, regular file, the
--   function will successfully return an empty MappedFile. In other
--   cases of size 0 (e.g. device files such as /dev/null),
--   error will be set to the FileError value
--   G_FILE_ERROR_INVAL.
--   
--   Since: 2.8
mappedFileNew :: (HasCallStack, MonadIO m) => [Char] -> Bool -> m MappedFile

-- | Maps a file into memory. On UNIX, this is using the
--   mmap() function.
--   
--   If writable is True, the mapped buffer may be
--   modified, otherwise it is an error to modify the mapped buffer.
--   Modifications to the buffer are not visible to other processes mapping
--   the same file, and are not written back to the file.
--   
--   Note that modifications of the underlying file might affect the
--   contents of the MappedFile. Therefore, mapping should only be
--   used if the file will not be modified, or if all modifications of the
--   file are done atomically (e.g. using fileSetContents).
--   
--   Since: 2.32
mappedFileNewFromFd :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m MappedFile

-- | Increments the reference count of file by one. It is
--   safe to call this function from any thread.
--   
--   Since: 2.22
mappedFileRef :: (HasCallStack, MonadIO m) => MappedFile -> m MappedFile

-- | Decrements the reference count of file by one. If the
--   reference count drops to 0, unmaps the buffer of file
--   and frees it.
--   
--   It is safe to call this function from any thread.
--   
--   Since 2.22
mappedFileUnref :: (HasCallStack, MonadIO m) => MappedFile -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.MappedFile.MappedFile

-- | The Node struct represents one node in a [n-ary
--   tree][glib-N-ary-Trees].
module GI.GLib.Structs.Node

-- | Memory-managed wrapper type.
newtype Node
Node :: ManagedPtr Node -> Node

-- | Construct a Node struct initialized to zero.
newZeroNode :: MonadIO m => m Node

-- | A convenience alias for Nothing :: Maybe Node.
noNode :: Maybe Node

-- | Gets the position of the first child of a Node which contains
--   the given data.
nodeChildIndex :: (HasCallStack, MonadIO m) => Node -> Ptr () -> m Int32

-- | Gets the position of a Node with respect to its siblings.
--   child must be a child of node. The
--   first child is numbered 0, the second 1, and so on.
nodeChildPosition :: (HasCallStack, MonadIO m) => Node -> Node -> m Int32

-- | Gets the depth of a Node.
--   
--   If node is Nothing the depth is 0. The root
--   node has a depth of 1. For the children of the root node the depth is
--   2. And so on.
nodeDepth :: (HasCallStack, MonadIO m) => Node -> m Word32

-- | Removes root and its children from the tree, freeing
--   any memory allocated.
nodeDestroy :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Returns True if node is an ancestor of
--   descendant. This is true if node is the parent of
--   descendant, or if node is the grandparent of
--   descendant etc.
nodeIsAncestor :: (HasCallStack, MonadIO m) => Node -> Node -> m Bool

-- | Gets the maximum height of all branches beneath a Node. This is
--   the maximum distance from the Node to all leaf nodes.
--   
--   If root is Nothing, 0 is returned. If
--   root has no children, 1 is returned. If
--   root has children, 2 is returned. And so on.
nodeMaxHeight :: (HasCallStack, MonadIO m) => Node -> m Word32

-- | Gets the number of children of a Node.
nodeNChildren :: (HasCallStack, MonadIO m) => Node -> m Word32

-- | Gets the number of nodes in a tree.
nodeNNodes :: (HasCallStack, MonadIO m) => Node -> [TraverseFlags] -> m Word32

-- | Reverses the order of the children of a Node. (It doesn't
--   change the order of the grandchildren.)
nodeReverseChildren :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Unlinks a Node from a tree, resulting in two separate trees.
nodeUnlink :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Set the value of the “children” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #children
--   
clearNodeChildren :: MonadIO m => Node -> m ()

-- | Get the value of the “children” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get node #children
--   
getNodeChildren :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “children” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set node [ #children := value ]
--   
setNodeChildren :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “data” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #data
--   
clearNodeData :: MonadIO m => Node -> m ()

-- | Get the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get node #data
--   
getNodeData :: MonadIO m => Node -> m (Ptr ())

-- | Set the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set node [ #data := value ]
--   
setNodeData :: MonadIO m => Node -> Ptr () -> m ()

-- | Set the value of the “next” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #next
--   
clearNodeNext :: MonadIO m => Node -> m ()

-- | Get the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get node #next
--   
getNodeNext :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set node [ #next := value ]
--   
setNodeNext :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “parent” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #parent
--   
clearNodeParent :: MonadIO m => Node -> m ()

-- | Get the value of the “parent” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get node #parent
--   
getNodeParent :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “parent” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set node [ #parent := value ]
--   
setNodeParent :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “prev” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #prev
--   
clearNodePrev :: MonadIO m => Node -> m ()

-- | Get the value of the “prev” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get node #prev
--   
getNodePrev :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “prev” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set node [ #prev := value ]
--   
setNodePrev :: MonadIO m => Node -> Ptr Node -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Node.Node
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Node.Node tag

-- | A Once struct controls a one-time initialization function. Any
--   one-time initialization function must have its own unique Once
--   struct.
--   
--   Since: 2.4
module GI.GLib.Structs.Once

-- | Memory-managed wrapper type.
newtype Once
Once :: ManagedPtr Once -> Once

-- | Construct a Once struct initialized to zero.
newZeroOnce :: MonadIO m => m Once

-- | A convenience alias for Nothing :: Maybe Once.
noOnce :: Maybe Once

-- | Function to be called when starting a critical initialization section.
--   The argument location must point to a static
--   0-initialized variable that will be set to a value other than 0 at the
--   end of the initialization section. In combination with
--   onceInitLeave and the unique address
--   valueLocation, it can be ensured that an
--   initialization section will be executed only once during a program's
--   life time, and that concurrent threads are blocked until
--   initialization completed. To be used in constructs like this:
--   
--   
C code
--   
--   
--   static gsize initialization_value = 0;
--   
--   if (g_once_init_enter (&initialization_value))
--     {
--       gsize setup_value = 42; // initialization code here
--   
--       g_once_init_leave (&initialization_value, setup_value);
--     }
--   
--   // use initialization_value here
--   
--   
--   Since: 2.14
onceInitEnter :: (HasCallStack, MonadIO m) => Ptr () -> m Bool

-- | Counterpart to onceInitEnter. Expects a location of a static
--   0-initialized initialization variable, and an initialization value
--   other than 0. Sets the variable to the initialization value, and
--   releases concurrent threads blocking in onceInitEnter on this
--   initialization variable.
--   
--   Since: 2.14
onceInitLeave :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m ()

-- | Set the value of the “retval” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #retval
--   
clearOnceRetval :: MonadIO m => Once -> m ()

-- | Get the value of the “retval” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get once #retval
--   
getOnceRetval :: MonadIO m => Once -> m (Ptr ())

-- | Set the value of the “retval” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set once [ #retval := value ]
--   
setOnceRetval :: MonadIO m => Once -> Ptr () -> m ()

-- | Get the value of the “status” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get once #status
--   
getOnceStatus :: MonadIO m => Once -> m OnceStatus

-- | Set the value of the “status” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set once [ #status := value ]
--   
setOnceStatus :: MonadIO m => Once -> OnceStatus -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Once.Once
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Once.Once tag

-- | A GOptionEntry struct defines a single option. To have an effect, they
--   must be added to a OptionGroup with
--   optionContextAddMainEntries or optionGroupAddEntries.
module GI.GLib.Structs.OptionEntry

-- | Memory-managed wrapper type.
newtype OptionEntry
OptionEntry :: ManagedPtr OptionEntry -> OptionEntry

-- | Construct a OptionEntry struct initialized to zero.
newZeroOptionEntry :: MonadIO m => m OptionEntry

-- | A convenience alias for Nothing :: Maybe
--   OptionEntry.
noOptionEntry :: Maybe OptionEntry

-- | Get the value of the “arg” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get optionEntry #arg
--   
getOptionEntryArg :: MonadIO m => OptionEntry -> m OptionArg

-- | Set the value of the “arg” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set optionEntry [ #arg := value ]
--   
setOptionEntryArg :: MonadIO m => OptionEntry -> OptionArg -> m ()

-- | Set the value of the “arg_data” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #argData
--   
clearOptionEntryArgData :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “arg_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get optionEntry #argData
--   
getOptionEntryArgData :: MonadIO m => OptionEntry -> m (Ptr ())

-- | Set the value of the “arg_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #argData := value ]
--   
setOptionEntryArgData :: MonadIO m => OptionEntry -> Ptr () -> m ()

-- | Set the value of the “arg_description” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #argDescription
--   
clearOptionEntryArgDescription :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “arg_description” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get optionEntry #argDescription
--   
getOptionEntryArgDescription :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “arg_description” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #argDescription := value ]
--   
setOptionEntryArgDescription :: MonadIO m => OptionEntry -> CString -> m ()

-- | Set the value of the “description” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #description
--   
clearOptionEntryDescription :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “description” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get optionEntry #description
--   
getOptionEntryDescription :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “description” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #description := value ]
--   
setOptionEntryDescription :: MonadIO m => OptionEntry -> CString -> m ()

-- | Get the value of the “flags” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get optionEntry #flags
--   
getOptionEntryFlags :: MonadIO m => OptionEntry -> m Int32

-- | Set the value of the “flags” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #flags := value ]
--   
setOptionEntryFlags :: MonadIO m => OptionEntry -> Int32 -> m ()

-- | Set the value of the “long_name” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #longName
--   
clearOptionEntryLongName :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “long_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get optionEntry #longName
--   
getOptionEntryLongName :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “long_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #longName := value ]
--   
setOptionEntryLongName :: MonadIO m => OptionEntry -> CString -> m ()

-- | Get the value of the “short_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get optionEntry #shortName
--   
getOptionEntryShortName :: MonadIO m => OptionEntry -> m Int8

-- | Set the value of the “short_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set optionEntry [ #shortName := value ]
--   
setOptionEntryShortName :: MonadIO m => OptionEntry -> Int8 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.OptionEntry.OptionEntry
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.OptionEntry.OptionEntry tag

-- | A GPatternSpec struct is the 'compiled' form of a pattern. This
--   structure is opaque and its fields cannot be accessed directly.
module GI.GLib.Structs.PatternSpec

-- | Memory-managed wrapper type.
newtype PatternSpec
PatternSpec :: ManagedPtr PatternSpec -> PatternSpec

-- | A convenience alias for Nothing :: Maybe
--   PatternSpec.
noPatternSpec :: Maybe PatternSpec

-- | Compares two compiled pattern specs and returns whether they will
--   match the same set of strings.
patternSpecEqual :: (HasCallStack, MonadIO m) => PatternSpec -> PatternSpec -> m Bool

-- | Frees the memory allocated for the PatternSpec.
patternSpecFree :: (HasCallStack, MonadIO m) => PatternSpec -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.PatternSpec.PatternSpec

-- | Represents a file descriptor, which events to poll for, and which
--   events occurred.
module GI.GLib.Structs.PollFD

-- | Memory-managed wrapper type.
newtype PollFD
PollFD :: ManagedPtr PollFD -> PollFD

-- | Construct a PollFD struct initialized to zero.
newZeroPollFD :: MonadIO m => m PollFD

-- | A convenience alias for Nothing :: Maybe PollFD.
noPollFD :: Maybe PollFD

-- | Get the value of the “events” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get pollFD #events
--   
getPollFDEvents :: MonadIO m => PollFD -> m Word16

-- | Set the value of the “events” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set pollFD [ #events := value ]
--   
setPollFDEvents :: MonadIO m => PollFD -> Word16 -> m ()

-- | Get the value of the “fd” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get pollFD #fd
--   
getPollFDFd :: MonadIO m => PollFD -> m Int32

-- | Set the value of the “fd” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set pollFD [ #fd := value ]
--   
setPollFDFd :: MonadIO m => PollFD -> Int32 -> m ()

-- | Get the value of the “revents” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get pollFD #revents
--   
getPollFDRevents :: MonadIO m => PollFD -> m Word16

-- | Set the value of the “revents” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set pollFD [ #revents := value ]
--   
setPollFDRevents :: MonadIO m => PollFD -> Word16 -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.PollFD.PollFD
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PollFD.PollFD tag

-- | Contains the public fields of a pointer array.
module GI.GLib.Structs.PtrArray

-- | Memory-managed wrapper type.
newtype PtrArray
PtrArray :: ManagedPtr PtrArray -> PtrArray

-- | Construct a PtrArray struct initialized to zero.
newZeroPtrArray :: MonadIO m => m PtrArray

-- | A convenience alias for Nothing :: Maybe
--   PtrArray.
noPtrArray :: Maybe PtrArray

-- | Get the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get ptrArray #len
--   
getPtrArrayLen :: MonadIO m => PtrArray -> m Word32

-- | Set the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set ptrArray [ #len := value ]
--   
setPtrArrayLen :: MonadIO m => PtrArray -> Word32 -> m ()

-- | Set the value of the “pdata” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #pdata
--   
clearPtrArrayPdata :: MonadIO m => PtrArray -> m ()

-- | Get the value of the “pdata” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get ptrArray #pdata
--   
getPtrArrayPdata :: MonadIO m => PtrArray -> m (Ptr ())

-- | Set the value of the “pdata” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set ptrArray [ #pdata := value ]
--   
setPtrArrayPdata :: MonadIO m => PtrArray -> Ptr () -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.PtrArray.PtrArray
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PtrArray.PtrArray tag

-- | The GRWLock struct is an opaque data structure to represent a
--   reader-writer lock. It is similar to a Mutex in that it allows
--   multiple threads to coordinate access to a shared resource.
--   
--   The difference to a mutex is that a reader-writer lock discriminates
--   between read-only ('reader') and full ('writer') access. While only
--   one thread at a time is allowed write access (by holding the 'writer'
--   lock via rWLockWriterLock), multiple threads can gain
--   simultaneous read-only access (by holding the 'reader' lock via
--   rWLockReaderLock).
--   
--   It is unspecified whether readers or writers have priority in
--   acquiring the lock when a reader already holds the lock and a writer
--   is queued to acquire it.
--   
--   Here is an example for an array with access functions:
--   
--   
C code
--   
--   
--   GRWLock lock;
--   GPtrArray *array;
--   
--   gpointer
--   my_array_get (guint index)
--   {
--     gpointer retval = NULL;
--   
--     if (!array)
--       return NULL;
--   
--     g_rw_lock_reader_lock (&lock);
--     if (index < array->len)
--       retval = g_ptr_array_index (array, index);
--     g_rw_lock_reader_unlock (&lock);
--   
--     return retval;
--   }
--   
--   void
--   my_array_set (guint index, gpointer data)
--   {
--     g_rw_lock_writer_lock (&lock);
--   
--     if (!array)
--       array = g_ptr_array_new ();
--   
--     if (index >= array->len)
--       g_ptr_array_set_size (array, index+1);
--     g_ptr_array_index (array, index) = data;
--   
--     g_rw_lock_writer_unlock (&lock);
--   }
--   
--   
--   This example shows an array which can be accessed by many readers (the
--   my_array_get() function) simultaneously, whereas the
--   writers (the my_array_set() function) will only be
--   allowed one at a time and only if no readers currently access the
--   array. This is because of the potentially dangerous resizing of the
--   array. Using these functions is fully multi-thread safe now.
--   
--   If a RWLock is allocated in static storage then it can be used
--   without initialisation. Otherwise, you should call rWLockInit
--   on it and rWLockClear when done.
--   
--   A GRWLock should only be accessed with the g_rw_lock_ functions.
--   
--   Since: 2.32
module GI.GLib.Structs.RWLock

-- | Memory-managed wrapper type.
newtype RWLock
RWLock :: ManagedPtr RWLock -> RWLock

-- | Construct a RWLock struct initialized to zero.
newZeroRWLock :: MonadIO m => m RWLock

-- | A convenience alias for Nothing :: Maybe RWLock.
noRWLock :: Maybe RWLock

-- | Frees the resources allocated to a lock with rWLockInit.
--   
--   This function should not be used with a RWLock that has been
--   statically allocated.
--   
--   Calling rWLockClear when any thread holds the lock leads to
--   undefined behaviour.
--   
--   Sine: 2.32
rWLockClear :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Initializes a RWLock so that it can be used.
--   
--   This function is useful to initialize a lock that has been allocated
--   on the stack, or as part of a larger structure. It is not necessary to
--   initialise a reader-writer lock that has been statically allocated.
--   
--   
C code
--   
--   
--     typedef struct {
--       GRWLock l;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_rw_lock_init (&b->l);
--   
--   
--   To undo the effect of rWLockInit when a lock is no longer
--   needed, use rWLockClear.
--   
--   Calling rWLockInit on an already initialized RWLock
--   leads to undefined behaviour.
--   
--   Since: 2.32
rWLockInit :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Obtain a read lock on rwLock. If another thread
--   currently holds the write lock on rwLock or blocks
--   waiting for it, the current thread will block. Read locks can be taken
--   recursively.
--   
--   It is implementation-defined how many threads are allowed to hold read
--   locks on the same lock simultaneously. If the limit is hit, or if a
--   deadlock is detected, a critical warning will be emitted.
--   
--   Since: 2.32
rWLockReaderLock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Tries to obtain a read lock on rwLock and returns
--   True if the read lock was successfully obtained. Otherwise it
--   returns False.
--   
--   Since: 2.32
rWLockReaderTrylock :: (HasCallStack, MonadIO m) => RWLock -> m Bool

-- | Release a read lock on rwLock.
--   
--   Calling rWLockReaderUnlock on a lock that is not held by the
--   current thread leads to undefined behaviour.
--   
--   Since: 2.32
rWLockReaderUnlock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Obtain a write lock on rwLock. If any thread already
--   holds a read or write lock on rwLock, the current
--   thread will block until all other threads have dropped their locks on
--   rwLock.
--   
--   Since: 2.32
rWLockWriterLock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Tries to obtain a write lock on rwLock. If any other
--   thread holds a read or write lock on rwLock, it
--   immediately returns False. Otherwise it locks
--   rwLock and returns True.
--   
--   Since: 2.32
rWLockWriterTrylock :: (HasCallStack, MonadIO m) => RWLock -> m Bool

-- | Release a write lock on rwLock.
--   
--   Calling rWLockWriterUnlock on a lock that is not held by the
--   current thread leads to undefined behaviour.
--   
--   Since: 2.32
rWLockWriterUnlock :: (HasCallStack, MonadIO m) => RWLock -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.RWLock.RWLock
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.RWLock.RWLock tag

-- | The GRand struct is an opaque data structure. It should only be
--   accessed through the g_rand_* functions.
module GI.GLib.Structs.Rand

-- | Memory-managed wrapper type.
newtype Rand
Rand :: ManagedPtr Rand -> Rand

-- | A convenience alias for Nothing :: Maybe Rand.
noRand :: Maybe Rand

-- | Returns the next random gdouble from
--   rand_ equally distributed over the range [0..1).
randDouble :: (HasCallStack, MonadIO m) => Rand -> m Double

-- | Returns the next random gdouble from
--   rand_ equally distributed over the range
--   [begin..end).
randDoubleRange :: (HasCallStack, MonadIO m) => Rand -> Double -> Double -> m Double

-- | Frees the memory allocated for the Rand.
randFree :: (HasCallStack, MonadIO m) => Rand -> m ()

-- | Returns the next random guint32 from
--   rand_ equally distributed over the range [0..2^32-1].
randInt :: (HasCallStack, MonadIO m) => Rand -> m Word32

-- | Returns the next random gint32 from
--   rand_ equally distributed over the range
--   [begin..end-1].
randIntRange :: (HasCallStack, MonadIO m) => Rand -> Int32 -> Int32 -> m Int32

-- | Sets the seed for the random number generator Rand to
--   seed.
randSetSeed :: (HasCallStack, MonadIO m) => Rand -> Word32 -> m ()

-- | Initializes the random number generator by an array of longs. Array
--   can be of arbitrary size, though only the first 624 values are taken.
--   This function is useful if you have many low entropy seeds, or if you
--   require more then 32 bits of actual entropy for your application.
--   
--   Since: 2.4
randSetSeedArray :: (HasCallStack, MonadIO m) => Rand -> Word32 -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Rand.Rand

-- | The GRecMutex struct is an opaque data structure to represent a
--   recursive mutex. It is similar to a Mutex with the difference
--   that it is possible to lock a GRecMutex multiple times in the same
--   thread without deadlock. When doing so, care has to be taken to unlock
--   the recursive mutex as often as it has been locked.
--   
--   If a RecMutex is allocated in static storage then it can be
--   used without initialisation. Otherwise, you should call
--   recMutexInit on it and recMutexClear when done.
--   
--   A GRecMutex should only be accessed with the g_rec_mutex_ functions.
--   
--   Since: 2.32
module GI.GLib.Structs.RecMutex

-- | Memory-managed wrapper type.
newtype RecMutex
RecMutex :: ManagedPtr RecMutex -> RecMutex

-- | Construct a RecMutex struct initialized to zero.
newZeroRecMutex :: MonadIO m => m RecMutex

-- | A convenience alias for Nothing :: Maybe
--   RecMutex.
noRecMutex :: Maybe RecMutex

-- | Frees the resources allocated to a recursive mutex with
--   recMutexInit.
--   
--   This function should not be used with a RecMutex that has been
--   statically allocated.
--   
--   Calling recMutexClear on a locked recursive mutex leads to
--   undefined behaviour.
--   
--   Sine: 2.32
recMutexClear :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Initializes a RecMutex so that it can be used.
--   
--   This function is useful to initialize a recursive mutex that has been
--   allocated on the stack, or as part of a larger structure.
--   
--   It is not necessary to initialise a recursive mutex that has been
--   statically allocated.
--   
--   
C code
--   
--   
--     typedef struct {
--       GRecMutex m;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_rec_mutex_init (&b->m);
--   
--   
--   Calling recMutexInit on an already initialized RecMutex
--   leads to undefined behaviour.
--   
--   To undo the effect of recMutexInit when a recursive mutex is no
--   longer needed, use recMutexClear.
--   
--   Since: 2.32
recMutexInit :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Locks recMutex. If recMutex is already
--   locked by another thread, the current thread will block until
--   recMutex is unlocked by the other thread. If
--   recMutex is already locked by the current thread, the
--   'lock count' of recMutex is increased. The mutex will
--   only become available again when it is unlocked as many times as it
--   has been locked.
--   
--   Since: 2.32
recMutexLock :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Tries to lock recMutex. If recMutex is
--   already locked by another thread, it immediately returns False.
--   Otherwise it locks recMutex and returns True.
--   
--   Since: 2.32
recMutexTrylock :: (HasCallStack, MonadIO m) => RecMutex -> m Bool

-- | Unlocks recMutex. If another thread is blocked in a
--   recMutexLock call for recMutex, it will become
--   unblocked and can lock recMutex itself.
--   
--   Calling recMutexUnlock on a recursive mutex that is not locked
--   by the current thread leads to undefined behaviour.
--   
--   Since: 2.32
recMutexUnlock :: (HasCallStack, MonadIO m) => RecMutex -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.RecMutex.RecMutex
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.RecMutex.RecMutex tag

-- | A GMatchInfo is an opaque struct used to return information about
--   matches.
module GI.GLib.Structs.MatchInfo

-- | Memory-managed wrapper type.
newtype MatchInfo
MatchInfo :: ManagedPtr MatchInfo -> MatchInfo

-- | A convenience alias for Nothing :: Maybe
--   MatchInfo.
noMatchInfo :: Maybe MatchInfo

-- | Returns a new string containing the text in
--   stringToExpand with references and escape sequences
--   expanded. References refer to the last match done with
--   string against regex and have the same
--   syntax used by regexReplace.
--   
--   The stringToExpand must be UTF-8 encoded even if
--   G_REGEX_RAW was passed to regexNew.
--   
--   The backreferences are extracted from the string passed to the match
--   function, so you cannot call this function after freeing the string.
--   
--   matchInfo may be Nothing in which case
--   stringToExpand must not contain references. For
--   instance "foo\n" does not refer to an actual pattern and '\n' merely
--   will be replaced with \n character, while to expand "\0" (whole match)
--   one needs the result of a match. Use regexCheckReplacement to
--   find out whether stringToExpand contains references.
--   
--   Since: 2.14
matchInfoExpandReferences :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Maybe Text)

-- | Retrieves the text matching the matchNum'th capturing
--   parentheses. 0 is the full text of the match, 1 is the first paren
--   set, 2 the second, and so on.
--   
--   If matchNum is a valid sub pattern but it didn't match
--   anything (e.g. sub pattern 1, matching "b" against "(a)?b") then an
--   empty string is returned.
--   
--   If the match was obtained using the DFA algorithm, that is using
--   regexMatchAll or regexMatchAllFull, the retrieved string
--   is not that of a set of parentheses but that of a matched substring.
--   Substrings are matched in reverse order of length, so 0 is the longest
--   match.
--   
--   The string is fetched from the string passed to the match function, so
--   you cannot call this function after freeing the string.
--   
--   Since: 2.14
matchInfoFetch :: (HasCallStack, MonadIO m) => MatchInfo -> Int32 -> m (Maybe Text)

-- | Bundles up pointers to each of the matching substrings from a match
--   and stores them in an array of gchar pointers. The first element in
--   the returned array is the match number 0, i.e. the entire matched
--   text.
--   
--   If a sub pattern didn't match anything (e.g. sub pattern 1, matching
--   "b" against "(a)?b") then an empty string is inserted.
--   
--   If the last match was obtained using the DFA algorithm, that is using
--   regexMatchAll or regexMatchAllFull, the retrieved
--   strings are not that matched by sets of parentheses but that of the
--   matched substring. Substrings are matched in reverse order of length,
--   so the first one is the longest match.
--   
--   The strings are fetched from the string passed to the match function,
--   so you cannot call this function after freeing the string.
--   
--   Since: 2.14
matchInfoFetchAll :: (HasCallStack, MonadIO m) => MatchInfo -> m [Text]

-- | Retrieves the text matching the capturing parentheses named
--   name.
--   
--   If name is a valid sub pattern name but it didn't
--   match anything (e.g. sub pattern "X", matching "b" against
--   "(?P<X>a)?b") then an empty string is returned.
--   
--   The string is fetched from the string passed to the match function, so
--   you cannot call this function after freeing the string.
--   
--   Since: 2.14
matchInfoFetchNamed :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Maybe Text)

-- | Retrieves the position in bytes of the capturing parentheses named
--   name.
--   
--   If name is a valid sub pattern name but it didn't
--   match anything (e.g. sub pattern "X", matching "b" against
--   "(?P<X>a)?b") then startPos and
--   endPos are set to -1 and True is returned.
--   
--   Since: 2.14
matchInfoFetchNamedPos :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Bool, Int32, Int32)

-- | Retrieves the position in bytes of the matchNum'th
--   capturing parentheses. 0 is the full text of the match, 1 is the first
--   paren set, 2 the second, and so on.
--   
--   If matchNum is a valid sub pattern but it didn't match
--   anything (e.g. sub pattern 1, matching "b" against "(a)?b") then
--   startPos and endPos are set to -1 and
--   True is returned.
--   
--   If the match was obtained using the DFA algorithm, that is using
--   regexMatchAll or regexMatchAllFull, the retrieved
--   position is not that of a set of parentheses but that of a matched
--   substring. Substrings are matched in reverse order of length, so 0 is
--   the longest match.
--   
--   Since: 2.14
matchInfoFetchPos :: (HasCallStack, MonadIO m) => MatchInfo -> Int32 -> m (Bool, Int32, Int32)

-- | If matchInfo is not Nothing, calls
--   matchInfoUnref; otherwise does nothing.
--   
--   Since: 2.14
matchInfoFree :: (HasCallStack, MonadIO m) => MatchInfo -> m ()

-- | Retrieves the number of matched substrings (including substring 0,
--   that is the whole matched text), so 1 is returned if the pattern has
--   no substrings in it and 0 is returned if the match failed.
--   
--   If the last match was obtained using the DFA algorithm, that is using
--   regexMatchAll or regexMatchAllFull, the retrieved count
--   is not that of the number of capturing parentheses but that of the
--   number of matched substrings.
--   
--   Since: 2.14
matchInfoGetMatchCount :: (HasCallStack, MonadIO m) => MatchInfo -> m Int32

-- | Returns Regex object used in matchInfo. It
--   belongs to Glib and must not be freed. Use regexRef if you need
--   to keep it after you free matchInfo object.
--   
--   Since: 2.14
matchInfoGetRegex :: (HasCallStack, MonadIO m) => MatchInfo -> m Regex

-- | Returns the string searched with matchInfo. This is
--   the string passed to regexMatch or regexReplace so you
--   may not free it before calling this function.
--   
--   Since: 2.14
matchInfoGetString :: (HasCallStack, MonadIO m) => MatchInfo -> m Text

-- | Usually if the string passed to g_regex_match*() matches as far as it
--   goes, but is too short to match the entire pattern, False is
--   returned. There are circumstances where it might be helpful to
--   distinguish this case from other cases in which there is no match.
--   
--   Consider, for example, an application where a human is required to
--   type in data for a field with specific formatting requirements. An
--   example might be a date in the form ddmmmyy, defined by the pattern
--   "^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$". If the
--   application sees the user’s keystrokes one by one, and can check that
--   what has been typed so far is potentially valid, it is able to raise
--   an error as soon as a mistake is made.
--   
--   GRegex supports the concept of partial matching by means of the
--   G_REGEX_MATCH_PARTIAL_SOFT and
--   G_REGEX_MATCH_PARTIAL_HARD flags. When they are used,
--   the return code for regexMatch or regexMatchFull is, as
--   usual, True for a complete match, False otherwise. But,
--   when these functions return False, you can check if the match
--   was partial calling matchInfoIsPartialMatch.
--   
--   The difference between G_REGEX_MATCH_PARTIAL_SOFT and
--   G_REGEX_MATCH_PARTIAL_HARD is that when a partial
--   match is encountered with G_REGEX_MATCH_PARTIAL_SOFT,
--   matching continues to search for a possible complete match, while with
--   G_REGEX_MATCH_PARTIAL_HARD matching stops at the
--   partial match. When both G_REGEX_MATCH_PARTIAL_SOFT
--   and G_REGEX_MATCH_PARTIAL_HARD are set, the latter
--   takes precedence.
--   
--   There were formerly some restrictions on the pattern for partial
--   matching. The restrictions no longer apply.
--   
--   See pcrepartial(3) for more information on partial matching.
--   
--   Since: 2.14
matchInfoIsPartialMatch :: (HasCallStack, MonadIO m) => MatchInfo -> m Bool

-- | Returns whether the previous match operation succeeded.
--   
--   Since: 2.14
matchInfoMatches :: (HasCallStack, MonadIO m) => MatchInfo -> m Bool

-- | Scans for the next match using the same parameters of the previous
--   call to regexMatchFull or regexMatch that returned
--   matchInfo.
--   
--   The match is done on the string passed to the match function, so you
--   cannot free it before calling this function.
--   
--   Since: 2.14
matchInfoNext :: (HasCallStack, MonadIO m) => MatchInfo -> m ()

-- | Increases reference count of matchInfo by 1.
--   
--   Since: 2.30
matchInfoRef :: (HasCallStack, MonadIO m) => MatchInfo -> m MatchInfo

-- | Decreases reference count of matchInfo by 1. When
--   reference count drops to zero, it frees all the memory associated with
--   the match_info structure.
--   
--   Since: 2.30
matchInfoUnref :: (HasCallStack, MonadIO m) => MatchInfo -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.MatchInfo.MatchInfo

-- | The g_regex_*() functions implement regular expression pattern
--   matching using syntax and semantics similar to Perl regular
--   expression.
--   
--   Some functions accept a startPosition argument,
--   setting it differs from just passing over a shortened string and
--   setting G_REGEX_MATCH_NOTBOL in the case of a pattern
--   that begins with any kind of lookbehind assertion. For example,
--   consider the pattern "\Biss\B" which finds occurrences of "iss" in the
--   middle of words. ("\B" matches only if the current position in the
--   subject is not a word boundary.) When applied to the string
--   "Mississipi" from the fourth byte, namely "issipi", it does not match,
--   because "\B" is always false at the start of the subject, which is
--   deemed to be a word boundary. However, if the entire string is passed
--   , but with startPosition set to 4, it finds the second
--   occurrence of "iss" because it is able to look behind the starting
--   point to discover that it is preceded by a letter.
--   
--   Note that, unless you set the G_REGEX_RAW flag, all
--   the strings passed to these functions must be encoded in UTF-8. The
--   lengths and the positions inside the strings are in bytes and not in
--   characters, so, for instance, "\xc3\xa0" (i.e. "à") is two bytes long
--   but it is treated as a single character. If you set
--   G_REGEX_RAW the strings can be non-valid UTF-8 strings
--   and a byte is treated as a character, so "\xc3\xa0" is two bytes and
--   two characters long.
--   
--   When matching a pattern, "\n" matches only against a "\n" character in
--   the string, and "\r" matches only a "\r" character. To match any
--   newline sequence use "\R". This particular group matches either the
--   two-character sequence CR + LF ("\r\n"), or one of the single
--   characters LF (linefeed, U+000A, "\n"), VT vertical tab, U+000B,
--   "\v"), FF (formfeed, U+000C, "\f"), CR (carriage return, U+000D,
--   "\r"), NEL (next line, U+0085), LS (line separator, U+2028), or PS
--   (paragraph separator, U+2029).
--   
--   The behaviour of the dot, circumflex, and dollar metacharacters are
--   affected by newline characters, the default is to recognize any
--   newline character (the same characters recognized by "\R"). This can
--   be changed with G_REGEX_NEWLINE_CR,
--   G_REGEX_NEWLINE_LF and
--   G_REGEX_NEWLINE_CRLF compile options, and with
--   G_REGEX_MATCH_NEWLINE_ANY,
--   G_REGEX_MATCH_NEWLINE_CR,
--   G_REGEX_MATCH_NEWLINE_LF and
--   G_REGEX_MATCH_NEWLINE_CRLF match options. These
--   settings are also relevant when compiling a pattern if
--   G_REGEX_EXTENDED is set, and an unescaped "#" outside
--   a character class is encountered. This indicates a comment that lasts
--   until after the next newline.
--   
--   When setting the RegexCompileFlagsJavascriptCompat flag,
--   pattern syntax and pattern matching is changed to be compatible with
--   the way that regular expressions work in JavaScript. More precisely, a
--   lonely ']' character in the pattern is a syntax error; the '\x' escape
--   only allows 0 to 2 hexadecimal digits, and you must use the '\u'
--   escape sequence with 4 hex digits to specify a unicode codepoint
--   instead of '\x' or 'x{....}'. If '\x' or '\u' are not followed by the
--   specified number of hex digits, they match 'x' and 'u' literally; also
--   '\U' always matches 'U' instead of being an error in the pattern.
--   Finally, pattern matching is modified so that back references to an
--   unset subpattern group produces a match with the empty string instead
--   of an error. See pcreapi(3) for more information.
--   
--   Creating and manipulating the same Regex structure from
--   different threads is not a problem as Regex does not modify its
--   internal state between creation and destruction, on the other hand
--   MatchInfo is not threadsafe.
--   
--   The regular expressions low-level functionalities are obtained through
--   the excellent PCRE library written by Philip Hazel.
--   
--   Since: 2.14
module GI.GLib.Structs.Regex

-- | Memory-managed wrapper type.
newtype Regex
Regex :: ManagedPtr Regex -> Regex

-- | A convenience alias for Nothing :: Maybe Regex.
noRegex :: Maybe Regex

-- | Checks whether replacement is a valid replacement
--   string (see regexReplace), i.e. that all escape sequences in it
--   are valid.
--   
--   If hasReferences is not Nothing then
--   replacement is checked for pattern references. For
--   instance, replacement text 'foo\n' does not contain references and may
--   be evaluated without information about actual match, but '\0\1' (whole
--   match followed by first subpattern) requires valid MatchInfo
--   object.
--   
--   Since: 2.14
regexCheckReplacement :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | No description available in the introspection data.
regexErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Escapes the nul characters in string to "\x00". It can
--   be used to compile a regex with embedded nul characters.
--   
--   For completeness, length can be -1 for a
--   nul-terminated string. In this case the output string will be of
--   course equal to string.
--   
--   Since: 2.30
regexEscapeNul :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Text

-- | Escapes the special characters used for regular expressions in
--   string, for instance "a.b*c" becomes "a\.b\*c". This
--   function is useful to dynamically generate regular expressions.
--   
--   string can contain nul characters that are replaced
--   with "\0", in this case remember to specify the correct length of
--   string in length.
--   
--   Since: 2.14
regexEscapeString :: (HasCallStack, MonadIO m) => [Text] -> m Text

-- | Returns the number of capturing subpatterns in the pattern.
--   
--   Since: 2.14
regexGetCaptureCount :: (HasCallStack, MonadIO m) => Regex -> m Int32

-- | Returns the compile options that regex was created
--   with.
--   
--   Depending on the version of PCRE that is used, this may or may not
--   include flags set by option expressions such as (?i) found at
--   the top-level within the compiled pattern.
--   
--   Since: 2.26
regexGetCompileFlags :: (HasCallStack, MonadIO m) => Regex -> m [RegexCompileFlags]

-- | Checks whether the pattern contains explicit CR or LF references.
--   
--   Since: 2.34
regexGetHasCrOrLf :: (HasCallStack, MonadIO m) => Regex -> m Bool

-- | Returns the match options that regex was created with.
--   
--   Since: 2.26
regexGetMatchFlags :: (HasCallStack, MonadIO m) => Regex -> m [RegexMatchFlags]

-- | Returns the number of the highest back reference in the pattern, or 0
--   if the pattern does not contain back references.
--   
--   Since: 2.14
regexGetMaxBackref :: (HasCallStack, MonadIO m) => Regex -> m Int32

-- | Gets the number of characters in the longest lookbehind assertion in
--   the pattern. This information is useful when doing multi-segment
--   matching using the partial matching facilities.
--   
--   Since: 2.38
regexGetMaxLookbehind :: (HasCallStack, MonadIO m) => Regex -> m Int32

-- | Gets the pattern string associated with regex, i.e. a
--   copy of the string passed to regexNew.
--   
--   Since: 2.14
regexGetPattern :: (HasCallStack, MonadIO m) => Regex -> m Text

-- | Retrieves the number of the subexpression named name.
--   
--   Since: 2.14
regexGetStringNumber :: (HasCallStack, MonadIO m) => Regex -> Text -> m Int32

-- | Scans for a match in string for the pattern in
--   regex. The matchOptions are combined
--   with the match options specified when the regex
--   structure was created, letting you have more flexibility in reusing
--   Regex structures.
--   
--   Unless RegexCompileFlagsRaw is specified in the options,
--   string must be valid UTF-8.
--   
--   A MatchInfo structure, used to get information on the match, is
--   stored in matchInfo if not Nothing. Note that
--   if matchInfo is not Nothing then it is created
--   even if the function returns False, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   To retrieve all the non-overlapping matches of the pattern in string
--   you can use matchInfoNext.
--   
--   
C code
--   
--   
--   static void
--   print_uppercase_words (const gchar *string)
--   {
--     // Print all uppercase-only words.
--     GRegex *regex;
--     GMatchInfo *match_info;
--    
--     regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
--     g_regex_match (regex, string, 0, &match_info);
--     while (g_match_info_matches (match_info))
--       {
--         gchar *word = g_match_info_fetch (match_info, 0);
--         g_print ("Found: %s\n", word);
--         g_free (word);
--         g_match_info_next (match_info, NULL);
--       }
--     g_match_info_free (match_info);
--     g_regex_unref (regex);
--   }
--   
--   
--   string is not copied and is used in MatchInfo
--   internally. If you use any MatchInfo method (except
--   matchInfoFree) after freeing or modifying
--   string then the behaviour is undefined.
--   
--   Since: 2.14
regexMatch :: (HasCallStack, MonadIO m) => Regex -> Text -> [RegexMatchFlags] -> m (Bool, MatchInfo)

-- | Using the standard algorithm for regular expression matching only the
--   longest match in the string is retrieved. This function uses a
--   different algorithm so it can retrieve all the possible matches. For
--   more documentation see regexMatchAllFull.
--   
--   A MatchInfo structure, used to get information on the match, is
--   stored in matchInfo if not Nothing. Note that
--   if matchInfo is not Nothing then it is created
--   even if the function returns False, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   string is not copied and is used in MatchInfo
--   internally. If you use any MatchInfo method (except
--   matchInfoFree) after freeing or modifying
--   string then the behaviour is undefined.
--   
--   Since: 2.14
regexMatchAll :: (HasCallStack, MonadIO m) => Regex -> Text -> [RegexMatchFlags] -> m (Bool, MatchInfo)

-- | Using the standard algorithm for regular expression matching only the
--   longest match in the string is retrieved, it is not
--   possible to obtain all the available matches. For instance matching
--   "<a> <b> <c>" against the pattern "<.*>" you
--   get "<a> <b> <c>".
--   
--   This function uses a different algorithm (called DFA, i.e.
--   deterministic finite automaton), so it can retrieve all the possible
--   matches, all starting at the same point in the string. For instance
--   matching "<a> <b> <c>" against the pattern
--   "<.*>;" you would obtain three matches: "<a> <b>
--   <c>", "<a> <b>" and "<a>".
--   
--   The number of matched strings is retrieved using
--   matchInfoGetMatchCount. To obtain the matched strings and their
--   position you can use, respectively, matchInfoFetch and
--   matchInfoFetchPos. Note that the strings are returned in
--   reverse order of length; that is, the longest matching string is given
--   first.
--   
--   Note that the DFA algorithm is slower than the standard one and it is
--   not able to capture substrings, so backreferences do not work.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting G_REGEX_MATCH_NOTBOL in
--   the case of a pattern that begins with any kind of lookbehind
--   assertion, such as "\b".
--   
--   Unless RegexCompileFlagsRaw is specified in the options,
--   string must be valid UTF-8.
--   
--   A MatchInfo structure, used to get information on the match, is
--   stored in matchInfo if not Nothing. Note that
--   if matchInfo is not Nothing then it is created
--   even if the function returns False, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   string is not copied and is used in MatchInfo
--   internally. If you use any MatchInfo method (except
--   matchInfoFree) after freeing or modifying
--   string then the behaviour is undefined.
--   
--   Since: 2.14
regexMatchAllFull :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> m MatchInfo

-- | Scans for a match in string for the pattern in
--   regex. The matchOptions are combined
--   with the match options specified when the regex
--   structure was created, letting you have more flexibility in reusing
--   Regex structures.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting G_REGEX_MATCH_NOTBOL in
--   the case of a pattern that begins with any kind of lookbehind
--   assertion, such as "\b".
--   
--   Unless RegexCompileFlagsRaw is specified in the options,
--   string must be valid UTF-8.
--   
--   A MatchInfo structure, used to get information on the match, is
--   stored in matchInfo if not Nothing. Note that
--   if matchInfo is not Nothing then it is created
--   even if the function returns False, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   string is not copied and is used in MatchInfo
--   internally. If you use any MatchInfo method (except
--   matchInfoFree) after freeing or modifying
--   string then the behaviour is undefined.
--   
--   To retrieve all the non-overlapping matches of the pattern in string
--   you can use matchInfoNext.
--   
--   
C code
--   
--   
--   static void
--   print_uppercase_words (const gchar *string)
--   {
--     // Print all uppercase-only words.
--     GRegex *regex;
--     GMatchInfo *match_info;
--     GError *error = NULL;
--     
--     regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
--     g_regex_match_full (regex, string, -1, 0, 0, &match_info, &error);
--     while (g_match_info_matches (match_info))
--       {
--         gchar *word = g_match_info_fetch (match_info, 0);
--         g_print ("Found: %s\n", word);
--         g_free (word);
--         g_match_info_next (match_info, &error);
--       }
--     g_match_info_free (match_info);
--     g_regex_unref (regex);
--     if (error != NULL)
--       {
--         g_printerr ("Error while matching: %s\n", error->message);
--         g_error_free (error);
--       }
--   }
--   
--   
--   Since: 2.14
regexMatchFull :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> m MatchInfo

-- | Scans for a match in string for
--   pattern.
--   
--   This function is equivalent to regexMatch but it does not
--   require to compile the pattern with regexNew, avoiding some
--   lines of code when you need just to do a match without extracting
--   substrings, capture counts, and so on.
--   
--   If this function is to be called on the same pattern
--   more than once, it's more efficient to compile the pattern once with
--   regexNew and then use regexMatch.
--   
--   Since: 2.14
regexMatchSimple :: (HasCallStack, MonadIO m) => Text -> Text -> [RegexCompileFlags] -> [RegexMatchFlags] -> m Bool

-- | Compiles the regular expression to an internal form, and does the
--   initial setup of the Regex structure.
--   
--   Since: 2.14
regexNew :: (HasCallStack, MonadIO m) => Text -> [RegexCompileFlags] -> [RegexMatchFlags] -> m (Maybe Regex)

-- | Increases reference count of regex by 1.
--   
--   Since: 2.14
regexRef :: (HasCallStack, MonadIO m) => Regex -> m Regex

-- | Replaces all occurrences of the pattern in regex with
--   the replacement text. Backreferences of the form '\number' or
--   '\g<number>' in the replacement text are interpolated by the
--   number-th captured subexpression of the match, '\g<name>' refers
--   to the captured subexpression with the given name. '\0' refers to the
--   complete match, but '\0' followed by a number is the octal
--   representation of a character. To include a literal '\' in the
--   replacement, write '\\'.
--   
--   There are also escapes that changes the case of the following text:
--   
--   
--   
- \l: Convert to lower case the next character
--   
- \u: Convert to upper case the next character
--   
- \L: Convert to lower case till \E
--   
- \U: Convert to upper case till \E
--   
- \E: End case modification
--   
--   
--   If you do not need to use backreferences use
--   regexReplaceLiteral.
--   
--   The replacement string must be UTF-8 encoded even if
--   G_REGEX_RAW was passed to regexNew. If you want
--   to use not UTF-8 encoded stings you can use
--   regexReplaceLiteral.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting G_REGEX_MATCH_NOTBOL in
--   the case of a pattern that begins with any kind of lookbehind
--   assertion, such as "\b".
--   
--   Since: 2.14
regexReplace :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> Text -> [RegexMatchFlags] -> m Text

-- | Replaces all occurrences of the pattern in regex with
--   the replacement text. replacement is replaced
--   literally, to include backreferences use regexReplace.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting G_REGEX_MATCH_NOTBOL in
--   the case of a pattern that begins with any kind of lookbehind
--   assertion, such as "\b".
--   
--   Since: 2.14
regexReplaceLiteral :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> Text -> [RegexMatchFlags] -> m Text

-- | Breaks the string on the pattern, and returns an array of the tokens.
--   If the pattern contains capturing parentheses, then the text for each
--   of the substrings will also be returned. If the pattern does not match
--   anywhere in the string, then the whole string is returned as the first
--   token.
--   
--   As a special case, the result of splitting the empty string "" is an
--   empty vector, not a vector containing a single string. The reason for
--   this special case is that being able to represent a empty vector is
--   typically more useful than consistent handling of empty elements. If
--   you do need to represent empty elements, you'll need to check for the
--   empty string before calling this function.
--   
--   A pattern that can match empty strings splits string
--   into separate characters wherever it matches the empty string between
--   characters. For example splitting "ab c" using as a separator "\s*",
--   you will get "a", "b" and "c".
--   
--   Since: 2.14
regexSplit :: (HasCallStack, MonadIO m) => Regex -> Text -> [RegexMatchFlags] -> m [Text]

-- | Breaks the string on the pattern, and returns an array of the tokens.
--   If the pattern contains capturing parentheses, then the text for each
--   of the substrings will also be returned. If the pattern does not match
--   anywhere in the string, then the whole string is returned as the first
--   token.
--   
--   As a special case, the result of splitting the empty string "" is an
--   empty vector, not a vector containing a single string. The reason for
--   this special case is that being able to represent a empty vector is
--   typically more useful than consistent handling of empty elements. If
--   you do need to represent empty elements, you'll need to check for the
--   empty string before calling this function.
--   
--   A pattern that can match empty strings splits string
--   into separate characters wherever it matches the empty string between
--   characters. For example splitting "ab c" using as a separator "\s*",
--   you will get "a", "b" and "c".
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting G_REGEX_MATCH_NOTBOL in
--   the case of a pattern that begins with any kind of lookbehind
--   assertion, such as "\b".
--   
--   Since: 2.14
regexSplitFull :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> Int32 -> m [Text]

-- | Breaks the string on the pattern, and returns an array of the tokens.
--   If the pattern contains capturing parentheses, then the text for each
--   of the substrings will also be returned. If the pattern does not match
--   anywhere in the string, then the whole string is returned as the first
--   token.
--   
--   This function is equivalent to regexSplit but it does not
--   require to compile the pattern with regexNew, avoiding some
--   lines of code when you need just to do a split without extracting
--   substrings, capture counts, and so on.
--   
--   If this function is to be called on the same pattern
--   more than once, it's more efficient to compile the pattern once with
--   regexNew and then use regexSplit.
--   
--   As a special case, the result of splitting the empty string "" is an
--   empty vector, not a vector containing a single string. The reason for
--   this special case is that being able to represent a empty vector is
--   typically more useful than consistent handling of empty elements. If
--   you do need to represent empty elements, you'll need to check for the
--   empty string before calling this function.
--   
--   A pattern that can match empty strings splits string
--   into separate characters wherever it matches the empty string between
--   characters. For example splitting "ab c" using as a separator "\s*",
--   you will get "a", "b" and "c".
--   
--   Since: 2.14
regexSplitSimple :: (HasCallStack, MonadIO m) => Text -> Text -> [RegexCompileFlags] -> [RegexMatchFlags] -> m [Text]

-- | Decreases reference count of regex by 1. When
--   reference count drops to zero, it frees all the memory associated with
--   the regex structure.
--   
--   Since: 2.14
regexUnref :: (HasCallStack, MonadIO m) => Regex -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Regex.Regex

-- | Specifies the Scanner parser configuration. Most settings can
--   be changed during the parsing phase and will affect the lexical
--   parsing of the next unpeeked token.
module GI.GLib.Structs.ScannerConfig

-- | Memory-managed wrapper type.
newtype ScannerConfig
ScannerConfig :: ManagedPtr ScannerConfig -> ScannerConfig

-- | Construct a ScannerConfig struct initialized to zero.
newZeroScannerConfig :: MonadIO m => m ScannerConfig

-- | A convenience alias for Nothing :: Maybe
--   ScannerConfig.
noScannerConfig :: Maybe ScannerConfig

-- | Get the value of the “case_sensitive” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #caseSensitive
--   
getScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “case_sensitive” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #caseSensitive := value ]
--   
setScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “char_2_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #char2Token
--   
getScannerConfigChar2Token :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “char_2_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #char2Token := value ]
--   
setScannerConfigChar2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Set the value of the “cpair_comment_single” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #cpairCommentSingle
--   
clearScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “cpair_comment_single” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #cpairCommentSingle
--   
getScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “cpair_comment_single” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #cpairCommentSingle := value ]
--   
setScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “cset_identifier_first” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #csetIdentifierFirst
--   
clearScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “cset_identifier_first” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #csetIdentifierFirst
--   
getScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “cset_identifier_first” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #csetIdentifierFirst := value ]
--   
setScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “cset_identifier_nth” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #csetIdentifierNth
--   
clearScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “cset_identifier_nth” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #csetIdentifierNth
--   
getScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “cset_identifier_nth” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #csetIdentifierNth := value ]
--   
setScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “cset_skip_characters” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #csetSkipCharacters
--   
clearScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “cset_skip_characters” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #csetSkipCharacters
--   
getScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “cset_skip_characters” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #csetSkipCharacters := value ]
--   
setScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Get the value of the “identifier_2_string” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #identifier2String
--   
getScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “identifier_2_string” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #identifier2String := value ]
--   
setScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “int_2_float” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #int2Float
--   
getScannerConfigInt2Float :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “int_2_float” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #int2Float := value ]
--   
setScannerConfigInt2Float :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “numbers_2_int” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #numbers2Int
--   
getScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “numbers_2_int” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #numbers2Int := value ]
--   
setScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_binary” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanBinary
--   
getScannerConfigScanBinary :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_binary” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanBinary := value ]
--   
setScannerConfigScanBinary :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_comment_multi” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanCommentMulti
--   
getScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_comment_multi” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanCommentMulti := value ]
--   
setScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_float” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanFloat
--   
getScannerConfigScanFloat :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_float” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanFloat := value ]
--   
setScannerConfigScanFloat :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_hex” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanHex
--   
getScannerConfigScanHex :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_hex” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanHex := value ]
--   
setScannerConfigScanHex :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_hex_dollar” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanHexDollar
--   
getScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_hex_dollar” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanHexDollar := value ]
--   
setScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_identifier” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanIdentifier
--   
getScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_identifier” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanIdentifier := value ]
--   
setScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_identifier_1char” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanIdentifier1char
--   
getScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_identifier_1char” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanIdentifier1char := value ]
--   
setScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_identifier_NULL” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanIdentifierNULL
--   
getScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_identifier_NULL” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanIdentifierNULL := value ]
--   
setScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_octal” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanOctal
--   
getScannerConfigScanOctal :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_octal” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanOctal := value ]
--   
setScannerConfigScanOctal :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_string_dq” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanStringDq
--   
getScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_string_dq” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanStringDq := value ]
--   
setScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_string_sq” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanStringSq
--   
getScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_string_sq” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanStringSq := value ]
--   
setScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scan_symbols” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scanSymbols
--   
getScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scan_symbols” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scanSymbols := value ]
--   
setScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “scope_0_fallback” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #scope0Fallback
--   
getScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “scope_0_fallback” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #scope0Fallback := value ]
--   
setScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “skip_comment_multi” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #skipCommentMulti
--   
getScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “skip_comment_multi” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #skipCommentMulti := value ]
--   
setScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “skip_comment_single” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #skipCommentSingle
--   
getScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “skip_comment_single” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #skipCommentSingle := value ]
--   
setScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “store_int64” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #storeInt64
--   
getScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “store_int64” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #storeInt64 := value ]
--   
setScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “symbol_2_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scannerConfig #symbol2Token
--   
getScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “symbol_2_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scannerConfig [ #symbol2Token := value ]
--   
setScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.ScannerConfig.ScannerConfig
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ScannerConfig.ScannerConfig tag

-- | The Sequence struct is an opaque data type representing a
--   [sequence][glib-Sequences] data type.
module GI.GLib.Structs.Sequence

-- | Memory-managed wrapper type.
newtype Sequence
Sequence :: ManagedPtr Sequence -> Sequence

-- | A convenience alias for Nothing :: Maybe
--   Sequence.
noSequence :: Maybe Sequence

-- | Adds a new item to the end of seq.
--   
--   Since: 2.14
sequenceAppend :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> m SequenceIter

-- | Frees the memory allocated for seq. If
--   seq has a data destroy function associated with it,
--   that function is called on all items in seq.
--   
--   Since: 2.14
sequenceFree :: (HasCallStack, MonadIO m) => Sequence -> m ()

-- | Returns the data that iter points to.
--   
--   Since: 2.14
sequenceGet :: (HasCallStack, MonadIO m) => SequenceIter -> m (Ptr ())

-- | Returns the begin iterator for seq.
--   
--   Since: 2.14
sequenceGetBeginIter :: (HasCallStack, MonadIO m) => Sequence -> m SequenceIter

-- | Returns the end iterator for seg
--   
--   Since: 2.14
sequenceGetEndIter :: (HasCallStack, MonadIO m) => Sequence -> m SequenceIter

-- | Returns the iterator at position pos. If
--   pos is negative or larger than the number of items in
--   seq, the end iterator is returned.
--   
--   Since: 2.14
sequenceGetIterAtPos :: (HasCallStack, MonadIO m) => Sequence -> Int32 -> m SequenceIter

-- | Returns the length of seq. Note that this method is
--   O(h) where `h' is the height of the tree. It is thus more efficient to
--   use sequenceIsEmpty when comparing the length to zero.
--   
--   Since: 2.14
sequenceGetLength :: (HasCallStack, MonadIO m) => Sequence -> m Int32

-- | Inserts a new item just before the item pointed to by
--   iter.
--   
--   Since: 2.14
sequenceInsertBefore :: (HasCallStack, MonadIO m) => SequenceIter -> Ptr () -> m SequenceIter

-- | Returns True if the sequence contains zero items.
--   
--   This function is functionally identical to checking the result of
--   sequenceGetLength being equal to zero. However this function is
--   implemented in O(1) running time.
--   
--   Since: 2.48
sequenceIsEmpty :: (HasCallStack, MonadIO m) => Sequence -> m Bool

-- | Moves the item pointed to by src to the position
--   indicated by dest. After calling this function
--   dest will point to the position immediately after
--   src. It is allowed for src and
--   dest to point into different sequences.
--   
--   Since: 2.14
sequenceMove :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()

-- | Inserts the (begin, end) range at the
--   destination pointed to by dest. The
--   begin and end iters must point into
--   the same sequence. It is allowed for dest to point to
--   a different sequence than the one pointed into by
--   begin and end.
--   
--   If dest is Nothing, the range indicated by
--   begin and end is removed from the
--   sequence. If dest points to a place within the
--   (begin, end) range, the range does not
--   move.
--   
--   Since: 2.14
sequenceMoveRange :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> SequenceIter -> m ()

-- | Adds a new item to the front of seq
--   
--   Since: 2.14
sequencePrepend :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> m SequenceIter

-- | Finds an iterator somewhere in the range (begin,
--   end). This iterator will be close to the middle of the
--   range, but is not guaranteed to be exactly in the middle.
--   
--   The begin and end iterators must both
--   point to the same sequence and begin must come before
--   or be equal to end in the sequence.
--   
--   Since: 2.14
sequenceRangeGetMidpoint :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m SequenceIter

-- | Removes the item pointed to by iter. It is an error to
--   pass the end iterator to this function.
--   
--   If the sequence has a data destroy function associated with it, this
--   function is called on the data for the removed item.
--   
--   Since: 2.14
sequenceRemove :: (HasCallStack, MonadIO m) => SequenceIter -> m ()

-- | Removes all items in the (begin, end)
--   range.
--   
--   If the sequence has a data destroy function associated with it, this
--   function is called on the data for the removed items.
--   
--   Since: 2.14
sequenceRemoveRange :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()

-- | Changes the data for the item pointed to by iter to be
--   data. If the sequence has a data destroy function
--   associated with it, that function is called on the existing data that
--   iter pointed to.
--   
--   Since: 2.14
sequenceSet :: (HasCallStack, MonadIO m) => SequenceIter -> Ptr () -> m ()

-- | Swaps the items pointed to by a and b.
--   It is allowed for a and b to point
--   into difference sequences.
--   
--   Since: 2.14
sequenceSwap :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Sequence.Sequence

-- | The SequenceIter struct is an opaque data type representing an
--   iterator pointing into a Sequence.
module GI.GLib.Structs.SequenceIter

-- | Memory-managed wrapper type.
newtype SequenceIter
SequenceIter :: ManagedPtr SequenceIter -> SequenceIter

-- | A convenience alias for Nothing :: Maybe
--   SequenceIter.
noSequenceIter :: Maybe SequenceIter

-- | Returns a negative number if a comes before
--   b, 0 if they are equal, and a positive number if
--   a comes after b.
--   
--   The a and b iterators must point into
--   the same sequence.
--   
--   Since: 2.14
sequenceIterCompare :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m Int32

-- | Returns the position of iter
--   
--   Since: 2.14
sequenceIterGetPosition :: (HasCallStack, MonadIO m) => SequenceIter -> m Int32

-- | Returns the Sequence that iter points into.
--   
--   Since: 2.14
sequenceIterGetSequence :: (HasCallStack, MonadIO m) => SequenceIter -> m Sequence

-- | Returns whether iter is the begin iterator
--   
--   Since: 2.14
sequenceIterIsBegin :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool

-- | Returns whether iter is the end iterator
--   
--   Since: 2.14
sequenceIterIsEnd :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool

-- | Returns the SequenceIter which is delta
--   positions away from iter. If iter is
--   closer than -delta positions to the beginning of the
--   sequence, the begin iterator is returned. If iter is
--   closer than delta positions to the end of the
--   sequence, the end iterator is returned.
--   
--   Since: 2.14
sequenceIterMove :: (HasCallStack, MonadIO m) => SequenceIter -> Int32 -> m SequenceIter

-- | Returns an iterator pointing to the next position after
--   iter. If iter is the end iterator, the
--   end iterator is returned.
--   
--   Since: 2.14
sequenceIterNext :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter

-- | Returns an iterator pointing to the previous position before
--   iter. If iter is the begin iterator,
--   the begin iterator is returned.
--   
--   Since: 2.14
sequenceIterPrev :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.SequenceIter.SequenceIter

-- | A type corresponding to the appropriate struct type for the
--   stat() system call, depending on the platform and/or
--   compiler being used.
--   
--   See g_stat() for more information.
module GI.GLib.Structs.StatBuf

-- | Memory-managed wrapper type.
newtype StatBuf
StatBuf :: ManagedPtr StatBuf -> StatBuf

-- | A convenience alias for Nothing :: Maybe StatBuf.
noStatBuf :: Maybe StatBuf
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.StatBuf.StatBuf

module GI.GLib.Callbacks

-- | Type for the callback on the (unwrapped) C side.
type C_ChildWatchFunc = Int32 -> Int32 -> Ptr () -> IO ()

-- | Prototype of a GChildWatchSource callback, called when
--   a child process has exited. To interpret status, see
--   the documentation for spawnCheckExitStatus.
type ChildWatchFunc = Int32 " /@pid@/: the process id of the child process " -> Int32 " /@status@/: Status information about the child process, encoded in a platform-specific manner " -> IO ()

-- | Prototype of a GChildWatchSource callback, called when
--   a child process has exited. To interpret status, see
--   the documentation for spawnCheckExitStatus.
type ChildWatchFunc_WithClosures = Int32 " /@pid@/: the process id of the child process " -> Int32 " /@status@/: Status information about the child process, encoded in a platform-specific manner " -> Ptr () " /@userData@/: user data passed to @/g_child_watch_add()/@ " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ChildWatchFunc :: ChildWatchFunc -> ChildWatchFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ChildWatchFunc :: (HasCallStack, MonadIO m) => FunPtr C_ChildWatchFunc -> Int32 -> Int32 -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_ChildWatchFunc :: ChildWatchFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_ChildWatchFunc.
mk_ChildWatchFunc :: C_ChildWatchFunc -> IO (FunPtr C_ChildWatchFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ChildWatchFunc.
noChildWatchFunc :: Maybe ChildWatchFunc

-- | A convenience synonym for Nothing :: Maybe
--   ChildWatchFunc_WithClosures.
noChildWatchFunc_WithClosures :: Maybe ChildWatchFunc_WithClosures

-- | Wrap a ChildWatchFunc into a C_ChildWatchFunc.
wrap_ChildWatchFunc :: Maybe (Ptr (FunPtr C_ChildWatchFunc)) -> ChildWatchFunc_WithClosures -> C_ChildWatchFunc

-- | Type for the callback on the (unwrapped) C side.
type C_ClearHandleFunc = Word32 -> IO ()

-- | Specifies the type of function passed to
--   g_clear_handle_id(). The implementation is expected to
--   free the resource identified by handleId; for
--   instance, if handleId is a Source ID,
--   sourceRemove can be used.
--   
--   Since: 2.56
type ClearHandleFunc = Word32 " /@handleId@/: the handle ID to clear " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ClearHandleFunc :: (HasCallStack, MonadIO m) => FunPtr C_ClearHandleFunc -> Word32 -> m ()

-- | Wrap the callback into a Closure.
genClosure_ClearHandleFunc :: ClearHandleFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_ClearHandleFunc.
mk_ClearHandleFunc :: C_ClearHandleFunc -> IO (FunPtr C_ClearHandleFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ClearHandleFunc.
noClearHandleFunc :: Maybe ClearHandleFunc

-- | Wrap a ClearHandleFunc into a C_ClearHandleFunc.
wrap_ClearHandleFunc :: Maybe (Ptr (FunPtr C_ClearHandleFunc)) -> ClearHandleFunc -> C_ClearHandleFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CompareDataFunc = Ptr () -> Ptr () -> Ptr () -> IO Int32

-- | Specifies the type of a comparison function used to compare two
--   values. The function should return a negative integer if the first
--   value comes before the second, 0 if they are equal, or a positive
--   integer if the first value comes after the second.
type CompareDataFunc = Ptr () " /@a@/: a value " -> Ptr () " /@b@/: a value to compare with " -> IO Int32 " __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive value if /@a@/ > /@b@/ "

-- | Specifies the type of a comparison function used to compare two
--   values. The function should return a negative integer if the first
--   value comes before the second, 0 if they are equal, or a positive
--   integer if the first value comes after the second.
type CompareDataFunc_WithClosures = Ptr () " /@a@/: a value " -> Ptr () " /@b@/: a value to compare with " -> Ptr () " /@userData@/: user data " -> IO Int32 " __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive value if /@a@/ > /@b@/ "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CompareDataFunc :: CompareDataFunc -> CompareDataFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CompareDataFunc :: (HasCallStack, MonadIO m) => FunPtr C_CompareDataFunc -> Ptr () -> Ptr () -> Ptr () -> m Int32

-- | Wrap the callback into a Closure.
genClosure_CompareDataFunc :: CompareDataFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_CompareDataFunc.
mk_CompareDataFunc :: C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CompareDataFunc.
noCompareDataFunc :: Maybe CompareDataFunc

-- | A convenience synonym for Nothing :: Maybe
--   CompareDataFunc_WithClosures.
noCompareDataFunc_WithClosures :: Maybe CompareDataFunc_WithClosures

-- | Wrap a CompareDataFunc into a C_CompareDataFunc.
wrap_CompareDataFunc :: Maybe (Ptr (FunPtr C_CompareDataFunc)) -> CompareDataFunc_WithClosures -> C_CompareDataFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CompareFunc = Ptr () -> Ptr () -> IO Int32

-- | Specifies the type of a comparison function used to compare two
--   values. The function should return a negative integer if the first
--   value comes before the second, 0 if they are equal, or a positive
--   integer if the first value comes after the second.
type CompareFunc = Ptr () " /@a@/: a value " -> Ptr () " /@b@/: a value to compare with " -> IO Int32 " __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive value if /@a@/ > /@b@/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CompareFunc :: (HasCallStack, MonadIO m) => FunPtr C_CompareFunc -> Ptr () -> Ptr () -> m Int32

-- | Wrap the callback into a Closure.
genClosure_CompareFunc :: CompareFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_CompareFunc.
mk_CompareFunc :: C_CompareFunc -> IO (FunPtr C_CompareFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CompareFunc.
noCompareFunc :: Maybe CompareFunc

-- | Wrap a CompareFunc into a C_CompareFunc.
wrap_CompareFunc :: Maybe (Ptr (FunPtr C_CompareFunc)) -> CompareFunc -> C_CompareFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CopyFunc = Ptr () -> Ptr () -> IO (Ptr ())

-- | A function of this signature is used to copy the node data when doing
--   a deep-copy of a tree.
--   
--   Since: 2.4
type CopyFunc = Ptr () " /@src@/: A pointer to the data which should be copied " -> Ptr () " /@data@/: Additional data " -> IO (Ptr ()) " __Returns:__ A pointer to the copy "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CopyFunc :: (HasCallStack, MonadIO m) => FunPtr C_CopyFunc -> Ptr () -> Ptr () -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_CopyFunc :: CopyFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_CopyFunc.
mk_CopyFunc :: C_CopyFunc -> IO (FunPtr C_CopyFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CopyFunc.
noCopyFunc :: Maybe CopyFunc

-- | Wrap a CopyFunc into a C_CopyFunc.
wrap_CopyFunc :: Maybe (Ptr (FunPtr C_CopyFunc)) -> CopyFunc -> C_CopyFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DataForeachFunc = Word32 -> Ptr () -> Ptr () -> IO ()

-- | Specifies the type of function passed to datasetForeach. It is
--   called with each GQuark id and associated data
--   element, together with the userData parameter supplied
--   to datasetForeach.
type DataForeachFunc = Word32 " /@keyId@/: the @/GQuark/@ id to identifying the data element. " -> Ptr () " /@data@/: the data element. " -> IO ()

-- | Specifies the type of function passed to datasetForeach. It is
--   called with each GQuark id and associated data
--   element, together with the userData parameter supplied
--   to datasetForeach.
type DataForeachFunc_WithClosures = Word32 " /@keyId@/: the @/GQuark/@ id to identifying the data element. " -> Ptr () " /@data@/: the data element. " -> Ptr () " /@userData@/: user data passed to 'GI.GLib.Functions.datasetForeach'. " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DataForeachFunc :: DataForeachFunc -> DataForeachFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DataForeachFunc :: (HasCallStack, MonadIO m) => FunPtr C_DataForeachFunc -> Word32 -> Ptr () -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_DataForeachFunc :: DataForeachFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_DataForeachFunc.
mk_DataForeachFunc :: C_DataForeachFunc -> IO (FunPtr C_DataForeachFunc)

-- | A convenience synonym for Nothing :: Maybe
--   DataForeachFunc.
noDataForeachFunc :: Maybe DataForeachFunc

-- | A convenience synonym for Nothing :: Maybe
--   DataForeachFunc_WithClosures.
noDataForeachFunc_WithClosures :: Maybe DataForeachFunc_WithClosures

-- | Wrap a DataForeachFunc into a C_DataForeachFunc.
wrap_DataForeachFunc :: Maybe (Ptr (FunPtr C_DataForeachFunc)) -> DataForeachFunc_WithClosures -> C_DataForeachFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DestroyNotify = Ptr () -> IO ()

-- | Specifies the type of function which is called when a data element is
--   destroyed. It is passed the pointer to the data element and should
--   free any memory and resources allocated for it.
type DestroyNotify = Ptr () " /@data@/: the data element. " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DestroyNotify :: (HasCallStack, MonadIO m) => FunPtr C_DestroyNotify -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_DestroyNotify :: DestroyNotify -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_DestroyNotify.
mk_DestroyNotify :: C_DestroyNotify -> IO (FunPtr C_DestroyNotify)

-- | A convenience synonym for Nothing :: Maybe
--   DestroyNotify.
noDestroyNotify :: Maybe DestroyNotify

-- | Wrap a DestroyNotify into a C_DestroyNotify.
wrap_DestroyNotify :: Maybe (Ptr (FunPtr C_DestroyNotify)) -> DestroyNotify -> C_DestroyNotify

-- | Type for the callback on the (unwrapped) C side.
type C_DuplicateFunc = Ptr () -> Ptr () -> IO (Ptr ())

-- | The type of functions that are used to 'duplicate' an object. What
--   this means depends on the context, it could just be incrementing the
--   reference count, if data is a ref-counted object.
type DuplicateFunc = Ptr () " /@data@/: the data to duplicate " -> IO (Ptr ()) " __Returns:__ a duplicate of data "

-- | The type of functions that are used to 'duplicate' an object. What
--   this means depends on the context, it could just be incrementing the
--   reference count, if data is a ref-counted object.
type DuplicateFunc_WithClosures = Ptr () " /@data@/: the data to duplicate " -> Ptr () " /@userData@/: user data that was specified in @/g_datalist_id_dup_data()/@ " -> IO (Ptr ()) " __Returns:__ a duplicate of data "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DuplicateFunc :: DuplicateFunc -> DuplicateFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DuplicateFunc :: (HasCallStack, MonadIO m) => FunPtr C_DuplicateFunc -> Ptr () -> Ptr () -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_DuplicateFunc :: DuplicateFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_DuplicateFunc.
mk_DuplicateFunc :: C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)

-- | A convenience synonym for Nothing :: Maybe
--   DuplicateFunc.
noDuplicateFunc :: Maybe DuplicateFunc

-- | A convenience synonym for Nothing :: Maybe
--   DuplicateFunc_WithClosures.
noDuplicateFunc_WithClosures :: Maybe DuplicateFunc_WithClosures

-- | Wrap a DuplicateFunc into a C_DuplicateFunc.
wrap_DuplicateFunc :: Maybe (Ptr (FunPtr C_DuplicateFunc)) -> DuplicateFunc_WithClosures -> C_DuplicateFunc

-- | Type for the callback on the (unwrapped) C side.
type C_EqualFunc = Ptr () -> Ptr () -> IO CInt

-- | Specifies the type of a function used to test two values for equality.
--   The function should return True if both values are equal and
--   False otherwise.
type EqualFunc = Ptr () " /@a@/: a value " -> Ptr () " /@b@/: a value to compare with " -> IO Bool " __Returns:__ 'True' if /@a@/ = /@b@/; 'False' otherwise "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_EqualFunc :: (HasCallStack, MonadIO m) => FunPtr C_EqualFunc -> Ptr () -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_EqualFunc :: EqualFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_EqualFunc.
mk_EqualFunc :: C_EqualFunc -> IO (FunPtr C_EqualFunc)

-- | A convenience synonym for Nothing :: Maybe
--   EqualFunc.
noEqualFunc :: Maybe EqualFunc

-- | Wrap a EqualFunc into a C_EqualFunc.
wrap_EqualFunc :: Maybe (Ptr (FunPtr C_EqualFunc)) -> EqualFunc -> C_EqualFunc

-- | Type for the callback on the (unwrapped) C side.
type C_FreeFunc = Ptr () -> IO ()

-- | Declares a type of function which takes an arbitrary data pointer
--   argument and has no return value. It is not currently used in GLib or
--   GTK+.
type FreeFunc = Ptr () " /@data@/: a data pointer " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_FreeFunc :: (HasCallStack, MonadIO m) => FunPtr C_FreeFunc -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_FreeFunc :: FreeFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_FreeFunc.
mk_FreeFunc :: C_FreeFunc -> IO (FunPtr C_FreeFunc)

-- | A convenience synonym for Nothing :: Maybe
--   FreeFunc.
noFreeFunc :: Maybe FreeFunc

-- | Wrap a FreeFunc into a C_FreeFunc.
wrap_FreeFunc :: Maybe (Ptr (FunPtr C_FreeFunc)) -> FreeFunc -> C_FreeFunc

-- | Type for the callback on the (unwrapped) C side.
type C_Func = Ptr () -> Ptr () -> IO ()

-- | Specifies the type of functions passed to
--   g_list_foreach() and
--   g_slist_foreach().
type Func = Ptr () " /@data@/: the element\'s data " -> IO ()

-- | Specifies the type of functions passed to
--   g_list_foreach() and
--   g_slist_foreach().
type Func_WithClosures = Ptr () " /@data@/: the element\'s data " -> Ptr () " /@userData@/: user data passed to @/g_list_foreach()/@ or @/g_slist_foreach()/@ " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_Func :: Func -> Func_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_Func :: (HasCallStack, MonadIO m) => FunPtr C_Func -> Ptr () -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_Func :: Func -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_Func.
mk_Func :: C_Func -> IO (FunPtr C_Func)

-- | A convenience synonym for Nothing :: Maybe
--   Func.
noFunc :: Maybe Func

-- | A convenience synonym for Nothing :: Maybe
--   Func_WithClosures.
noFunc_WithClosures :: Maybe Func_WithClosures

-- | Wrap a Func into a C_Func.
wrap_Func :: Maybe (Ptr (FunPtr C_Func)) -> Func_WithClosures -> C_Func

-- | Type for the callback on the (unwrapped) C side.
type C_HFunc = Ptr () -> Ptr () -> Ptr () -> IO ()

-- | Specifies the type of the function passed to
--   g_hash_table_foreach(). It is called with each
--   key/value pair, together with the userData parameter
--   which is passed to g_hash_table_foreach().
type HFunc = Ptr () " /@key@/: a key " -> Ptr () " /@value@/: the value corresponding to the key " -> IO ()

-- | Specifies the type of the function passed to
--   g_hash_table_foreach(). It is called with each
--   key/value pair, together with the userData parameter
--   which is passed to g_hash_table_foreach().
type HFunc_WithClosures = Ptr () " /@key@/: a key " -> Ptr () " /@value@/: the value corresponding to the key " -> Ptr () " /@userData@/: user data passed to @/g_hash_table_foreach()/@ " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HFunc :: HFunc -> HFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HFunc :: (HasCallStack, MonadIO m) => FunPtr C_HFunc -> Ptr () -> Ptr () -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_HFunc :: HFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HFunc.
mk_HFunc :: C_HFunc -> IO (FunPtr C_HFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HFunc.
noHFunc :: Maybe HFunc

-- | A convenience synonym for Nothing :: Maybe
--   HFunc_WithClosures.
noHFunc_WithClosures :: Maybe HFunc_WithClosures

-- | Wrap a HFunc into a C_HFunc.
wrap_HFunc :: Maybe (Ptr (FunPtr C_HFunc)) -> HFunc_WithClosures -> C_HFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HRFunc = Ptr () -> Ptr () -> Ptr () -> IO CInt

-- | Specifies the type of the function passed to
--   g_hash_table_foreach_remove(). It is called with each
--   key/value pair, together with the userData parameter
--   passed to g_hash_table_foreach_remove(). It should
--   return True if the key/value pair should be removed from the
--   HashTable.
type HRFunc = Ptr () " /@key@/: a key " -> Ptr () " /@value@/: the value associated with the key " -> IO Bool " __Returns:__ 'True' if the key\/value pair should be removed from the 'GI.GLib.Structs.HashTable.HashTable' "

-- | Specifies the type of the function passed to
--   g_hash_table_foreach_remove(). It is called with each
--   key/value pair, together with the userData parameter
--   passed to g_hash_table_foreach_remove(). It should
--   return True if the key/value pair should be removed from the
--   HashTable.
type HRFunc_WithClosures = Ptr () " /@key@/: a key " -> Ptr () " /@value@/: the value associated with the key " -> Ptr () " /@userData@/: user data passed to 'GI.GLib.Functions.hashTableRemove' " -> IO Bool " __Returns:__ 'True' if the key\/value pair should be removed from the 'GI.GLib.Structs.HashTable.HashTable' "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HRFunc :: HRFunc -> HRFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HRFunc :: (HasCallStack, MonadIO m) => FunPtr C_HRFunc -> Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_HRFunc :: HRFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HRFunc.
mk_HRFunc :: C_HRFunc -> IO (FunPtr C_HRFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HRFunc.
noHRFunc :: Maybe HRFunc

-- | A convenience synonym for Nothing :: Maybe
--   HRFunc_WithClosures.
noHRFunc_WithClosures :: Maybe HRFunc_WithClosures

-- | Wrap a HRFunc into a C_HRFunc.
wrap_HRFunc :: Maybe (Ptr (FunPtr C_HRFunc)) -> HRFunc_WithClosures -> C_HRFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HashFunc = Ptr () -> IO Word32

-- | Specifies the type of the hash function which is passed to
--   g_hash_table_new() when a HashTable is created.
--   
--   The function is passed a key and should return a guint
--   hash value. The functions directHash, intHash and
--   strHash provide hash functions which can be used when the key
--   is a gpointer, gint*, and
--   gchar* respectively.
--   
--   directHash is also the appropriate hash function for keys of
--   the form GINT_TO_POINTER (n) (or similar macros).
--   
--   A good hash functions should produce hash values that are evenly
--   distributed over a fairly large range. The modulus is taken with the
--   hash table size (a prime number) to find the 'bucket' to place each
--   key into. The function should also be very fast, since it is called
--   for each key lookup.
--   
--   Note that the hash functions provided by GLib have these qualities,
--   but are not particularly robust against manufactured keys that cause
--   hash collisions. Therefore, you should consider choosing a more secure
--   hash function when using a GHashTable with keys that originate in
--   untrusted data (such as HTTP requests). Using strHash in that
--   situation might make your application vulerable to Algorithmic
--   Complexity Attacks.
--   
--   The key to choosing a good hash is unpredictability. Even
--   cryptographic hashes are very easy to find collisions for when the
--   remainder is taken modulo a somewhat predictable prime number. There
--   must be an element of randomness that an attacker is unable to guess.
type HashFunc = Ptr () " /@key@/: a key " -> IO Word32 " __Returns:__ the hash value corresponding to the key "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HashFunc :: (HasCallStack, MonadIO m) => FunPtr C_HashFunc -> Ptr () -> m Word32

-- | Wrap the callback into a Closure.
genClosure_HashFunc :: HashFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HashFunc.
mk_HashFunc :: C_HashFunc -> IO (FunPtr C_HashFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HashFunc.
noHashFunc :: Maybe HashFunc

-- | Wrap a HashFunc into a C_HashFunc.
wrap_HashFunc :: Maybe (Ptr (FunPtr C_HashFunc)) -> HashFunc -> C_HashFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookCheckFunc = Ptr () -> IO CInt

-- | Defines the type of a hook function that can be invoked by
--   hookListInvokeCheck.
type HookCheckFunc = Ptr () " /@data@/: the data field of the 'GI.GLib.Structs.Hook.Hook' is passed to the hook function here " -> IO Bool " __Returns:__ 'False' if the 'GI.GLib.Structs.Hook.Hook' should be destroyed "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookCheckFunc :: (HasCallStack, MonadIO m) => FunPtr C_HookCheckFunc -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_HookCheckFunc :: HookCheckFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookCheckFunc.
mk_HookCheckFunc :: C_HookCheckFunc -> IO (FunPtr C_HookCheckFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HookCheckFunc.
noHookCheckFunc :: Maybe HookCheckFunc

-- | Wrap a HookCheckFunc into a C_HookCheckFunc.
wrap_HookCheckFunc :: Maybe (Ptr (FunPtr C_HookCheckFunc)) -> HookCheckFunc -> C_HookCheckFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookCheckMarshaller = Ptr Hook -> Ptr () -> IO CInt

-- | Defines the type of function used by
--   g_hook_list_marshal_check().
type HookCheckMarshaller = Hook " /@hook@/: a 'GI.GLib.Structs.Hook.Hook' " -> Ptr () " /@marshalData@/: user data " -> IO Bool " __Returns:__ 'False' if /@hook@/ should be destroyed "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookCheckMarshaller :: (HasCallStack, MonadIO m) => FunPtr C_HookCheckMarshaller -> Hook -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_HookCheckMarshaller :: HookCheckMarshaller -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookCheckMarshaller.
mk_HookCheckMarshaller :: C_HookCheckMarshaller -> IO (FunPtr C_HookCheckMarshaller)

-- | A convenience synonym for Nothing :: Maybe
--   HookCheckMarshaller.
noHookCheckMarshaller :: Maybe HookCheckMarshaller

-- | Wrap a HookCheckMarshaller into a C_HookCheckMarshaller.
wrap_HookCheckMarshaller :: Maybe (Ptr (FunPtr C_HookCheckMarshaller)) -> HookCheckMarshaller -> C_HookCheckMarshaller

-- | Type for the callback on the (unwrapped) C side.
type C_HookCompareFunc = Ptr Hook -> Ptr Hook -> IO Int32

-- | Defines the type of function used to compare Hook elements in
--   g_hook_insert_sorted().
type HookCompareFunc = Hook " /@newHook@/: the 'GI.GLib.Structs.Hook.Hook' being inserted " -> Hook " /@sibling@/: the 'GI.GLib.Structs.Hook.Hook' to compare with /@newHook@/ " -> IO Int32 " __Returns:__ a value \<= 0 if /@newHook@/ should be before /@sibling@/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookCompareFunc :: (HasCallStack, MonadIO m) => FunPtr C_HookCompareFunc -> Hook -> Hook -> m Int32

-- | Wrap the callback into a Closure.
genClosure_HookCompareFunc :: HookCompareFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookCompareFunc.
mk_HookCompareFunc :: C_HookCompareFunc -> IO (FunPtr C_HookCompareFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HookCompareFunc.
noHookCompareFunc :: Maybe HookCompareFunc

-- | Wrap a HookCompareFunc into a C_HookCompareFunc.
wrap_HookCompareFunc :: Maybe (Ptr (FunPtr C_HookCompareFunc)) -> HookCompareFunc -> C_HookCompareFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookFinalizeFunc = Ptr HookList -> Ptr Hook -> IO ()

-- | Defines the type of function to be called when a hook in a list of
--   hooks gets finalized.
type HookFinalizeFunc = HookList " /@hookList@/: a 'GI.GLib.Structs.HookList.HookList' " -> Hook " /@hook@/: the hook in /@hookList@/ that gets finalized " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookFinalizeFunc :: (HasCallStack, MonadIO m) => FunPtr C_HookFinalizeFunc -> HookList -> Hook -> m ()

-- | Wrap the callback into a Closure.
genClosure_HookFinalizeFunc :: HookFinalizeFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookFinalizeFunc.
mk_HookFinalizeFunc :: C_HookFinalizeFunc -> IO (FunPtr C_HookFinalizeFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HookFinalizeFunc.
noHookFinalizeFunc :: Maybe HookFinalizeFunc

-- | Wrap a HookFinalizeFunc into a C_HookFinalizeFunc.
wrap_HookFinalizeFunc :: Maybe (Ptr (FunPtr C_HookFinalizeFunc)) -> HookFinalizeFunc -> C_HookFinalizeFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookFindFunc = Ptr Hook -> Ptr () -> IO CInt

-- | Defines the type of the function passed to
--   g_hook_find().
type HookFindFunc = Hook " /@hook@/: a 'GI.GLib.Structs.Hook.Hook' " -> Ptr () " /@data@/: user data passed to @/g_hook_find_func()/@ " -> IO Bool " __Returns:__ 'True' if the required 'GI.GLib.Structs.Hook.Hook' has been found "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookFindFunc :: (HasCallStack, MonadIO m) => FunPtr C_HookFindFunc -> Hook -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_HookFindFunc :: HookFindFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookFindFunc.
mk_HookFindFunc :: C_HookFindFunc -> IO (FunPtr C_HookFindFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HookFindFunc.
noHookFindFunc :: Maybe HookFindFunc

-- | Wrap a HookFindFunc into a C_HookFindFunc.
wrap_HookFindFunc :: Maybe (Ptr (FunPtr C_HookFindFunc)) -> HookFindFunc -> C_HookFindFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookFunc = Ptr () -> IO ()

-- | Defines the type of a hook function that can be invoked by
--   hookListInvoke.
type HookFunc = Ptr () " /@data@/: the data field of the 'GI.GLib.Structs.Hook.Hook' is passed to the hook function here " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookFunc :: (HasCallStack, MonadIO m) => FunPtr C_HookFunc -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_HookFunc :: HookFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookFunc.
mk_HookFunc :: C_HookFunc -> IO (FunPtr C_HookFunc)

-- | A convenience synonym for Nothing :: Maybe
--   HookFunc.
noHookFunc :: Maybe HookFunc

-- | Wrap a HookFunc into a C_HookFunc.
wrap_HookFunc :: Maybe (Ptr (FunPtr C_HookFunc)) -> HookFunc -> C_HookFunc

-- | Type for the callback on the (unwrapped) C side.
type C_HookMarshaller = Ptr Hook -> Ptr () -> IO ()

-- | Defines the type of function used by
--   g_hook_list_marshal().
type HookMarshaller = Hook " /@hook@/: a 'GI.GLib.Structs.Hook.Hook' " -> Ptr () " /@marshalData@/: user data " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_HookMarshaller :: (HasCallStack, MonadIO m) => FunPtr C_HookMarshaller -> Hook -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_HookMarshaller :: HookMarshaller -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_HookMarshaller.
mk_HookMarshaller :: C_HookMarshaller -> IO (FunPtr C_HookMarshaller)

-- | A convenience synonym for Nothing :: Maybe
--   HookMarshaller.
noHookMarshaller :: Maybe HookMarshaller

-- | Wrap a HookMarshaller into a C_HookMarshaller.
wrap_HookMarshaller :: Maybe (Ptr (FunPtr C_HookMarshaller)) -> HookMarshaller -> C_HookMarshaller

-- | Type for the callback on the (unwrapped) C side.
type C_IOFunc = Ptr IOChannel -> CUInt -> Ptr () -> IO CInt

-- | Specifies the type of function passed to
--   g_io_add_watch() or ioAddWatch, which is called
--   when the requested condition on a IOChannel is satisfied.
type IOFunc = IOChannel " /@source@/: the 'GI.GLib.Structs.IOChannel.IOChannel' event source " -> [IOCondition] " /@condition@/: the condition which has been satisfied " -> Ptr () " /@data@/: user data set in @/g_io_add_watch()/@ or 'GI.GLib.Functions.ioAddWatch' " -> IO Bool " __Returns:__ the function should return 'False' if the event source should be removed "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFunc :: (HasCallStack, MonadIO m) => FunPtr C_IOFunc -> IOChannel -> [IOCondition] -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_IOFunc :: IOFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_IOFunc.
mk_IOFunc :: C_IOFunc -> IO (FunPtr C_IOFunc)

-- | A convenience synonym for Nothing :: Maybe
--   IOFunc.
noIOFunc :: Maybe IOFunc

-- | Wrap a IOFunc into a C_IOFunc.
wrap_IOFunc :: Maybe (Ptr (FunPtr C_IOFunc)) -> IOFunc -> C_IOFunc

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoCloseFieldCallback = Ptr IOChannel -> Ptr (Ptr GError) -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoCloseFieldCallback = IOChannel -> IO IOStatus " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoCloseFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoCloseFieldCallback -> IOChannel -> m IOStatus

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoCloseFieldCallback.
mk_IOFuncsIoCloseFieldCallback :: C_IOFuncsIoCloseFieldCallback -> IO (FunPtr C_IOFuncsIoCloseFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoCloseFieldCallback.
noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoCreateWatchFieldCallback = Ptr IOChannel -> CUInt -> IO (Ptr Source)

-- | No description available in the introspection data.
type IOFuncsIoCreateWatchFieldCallback = IOChannel -> [IOCondition] -> IO Source

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoCreateWatchFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoCreateWatchFieldCallback -> IOChannel -> [IOCondition] -> m Source

-- | Wrap the callback into a Closure.
genClosure_IOFuncsIoCreateWatchFieldCallback :: IOFuncsIoCreateWatchFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoCreateWatchFieldCallback.
mk_IOFuncsIoCreateWatchFieldCallback :: C_IOFuncsIoCreateWatchFieldCallback -> IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoCreateWatchFieldCallback.
noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback

-- | Wrap a IOFuncsIoCreateWatchFieldCallback into a
--   C_IOFuncsIoCreateWatchFieldCallback.
wrap_IOFuncsIoCreateWatchFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback)) -> IOFuncsIoCreateWatchFieldCallback -> C_IOFuncsIoCreateWatchFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoFreeFieldCallback = Ptr IOChannel -> IO ()

-- | No description available in the introspection data.
type IOFuncsIoFreeFieldCallback = IOChannel -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoFreeFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoFreeFieldCallback -> IOChannel -> m ()

-- | Wrap the callback into a Closure.
genClosure_IOFuncsIoFreeFieldCallback :: IOFuncsIoFreeFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoFreeFieldCallback.
mk_IOFuncsIoFreeFieldCallback :: C_IOFuncsIoFreeFieldCallback -> IO (FunPtr C_IOFuncsIoFreeFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoFreeFieldCallback.
noIOFuncsIoFreeFieldCallback :: Maybe IOFuncsIoFreeFieldCallback

-- | Wrap a IOFuncsIoFreeFieldCallback into a
--   C_IOFuncsIoFreeFieldCallback.
wrap_IOFuncsIoFreeFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback)) -> IOFuncsIoFreeFieldCallback -> C_IOFuncsIoFreeFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoGetFlagsFieldCallback = Ptr IOChannel -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoGetFlagsFieldCallback = IOChannel -> IO [IOFlags]

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoGetFlagsFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoGetFlagsFieldCallback -> IOChannel -> m [IOFlags]

-- | Wrap the callback into a Closure.
genClosure_IOFuncsIoGetFlagsFieldCallback :: IOFuncsIoGetFlagsFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoGetFlagsFieldCallback.
mk_IOFuncsIoGetFlagsFieldCallback :: C_IOFuncsIoGetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoGetFlagsFieldCallback.
noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback

-- | Wrap a IOFuncsIoGetFlagsFieldCallback into a
--   C_IOFuncsIoGetFlagsFieldCallback.
wrap_IOFuncsIoGetFlagsFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback)) -> IOFuncsIoGetFlagsFieldCallback -> C_IOFuncsIoGetFlagsFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoReadFieldCallback = Ptr IOChannel -> CString -> Word64 -> Word64 -> Ptr (Ptr GError) -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoReadFieldCallback = IOChannel -> Text -> Word64 -> Word64 -> IO IOStatus " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoReadFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoReadFieldCallback -> IOChannel -> Text -> Word64 -> Word64 -> m IOStatus

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoReadFieldCallback.
mk_IOFuncsIoReadFieldCallback :: C_IOFuncsIoReadFieldCallback -> IO (FunPtr C_IOFuncsIoReadFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoReadFieldCallback.
noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoReadFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoSeekFieldCallback = Ptr IOChannel -> Int64 -> CUInt -> Ptr (Ptr GError) -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoSeekFieldCallback = IOChannel -> Int64 -> SeekType -> IO IOStatus " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoSeekFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoSeekFieldCallback -> IOChannel -> Int64 -> SeekType -> m IOStatus

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoSeekFieldCallback.
mk_IOFuncsIoSeekFieldCallback :: C_IOFuncsIoSeekFieldCallback -> IO (FunPtr C_IOFuncsIoSeekFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoSeekFieldCallback.
noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoSetFlagsFieldCallback = Ptr IOChannel -> CUInt -> Ptr (Ptr GError) -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoSetFlagsFieldCallback = IOChannel -> [IOFlags] -> IO IOStatus " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoSetFlagsFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoSetFlagsFieldCallback -> IOChannel -> [IOFlags] -> m IOStatus

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoSetFlagsFieldCallback.
mk_IOFuncsIoSetFlagsFieldCallback :: C_IOFuncsIoSetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoSetFlagsFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoSetFlagsFieldCallback.
noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoWriteFieldCallback = Ptr IOChannel -> CString -> Word64 -> Word64 -> Ptr (Ptr GError) -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoWriteFieldCallback = IOChannel -> Text -> Word64 -> Word64 -> IO IOStatus " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOFuncsIoWriteFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_IOFuncsIoWriteFieldCallback -> IOChannel -> Text -> Word64 -> Word64 -> m IOStatus

-- | Generate a function pointer callable from C code, from a
--   C_IOFuncsIoWriteFieldCallback.
mk_IOFuncsIoWriteFieldCallback :: C_IOFuncsIoWriteFieldCallback -> IO (FunPtr C_IOFuncsIoWriteFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   IOFuncsIoWriteFieldCallback.
noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_LogFunc = CString -> CInt -> CString -> Ptr () -> IO ()

-- | Specifies the prototype of log handler functions.
--   
--   The default log handler, logDefaultHandler, automatically
--   appends a new-line character to message when printing
--   it. It is advised that any custom log handler functions behave
--   similarly, so that logging calls in user code do not need modifying to
--   add a new-line character to the message if the log handler is changed.
--   
--   This is not used if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
type LogFunc = Text " /@logDomain@/: the log domain of the message " -> [LogLevelFlags] " /@logLevel@/: the log level of the message (including the fatal and recursion flags) " -> Text " /@message@/: the message to process " -> IO ()

-- | Specifies the prototype of log handler functions.
--   
--   The default log handler, logDefaultHandler, automatically
--   appends a new-line character to message when printing
--   it. It is advised that any custom log handler functions behave
--   similarly, so that logging calls in user code do not need modifying to
--   add a new-line character to the message if the log handler is changed.
--   
--   This is not used if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
type LogFunc_WithClosures = Text " /@logDomain@/: the log domain of the message " -> [LogLevelFlags] " /@logLevel@/: the log level of the message (including the fatal and recursion flags) " -> Text " /@message@/: the message to process " -> Ptr () " /@userData@/: user data, set in @/g_log_set_handler()/@ " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_LogFunc :: LogFunc -> LogFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_LogFunc :: (HasCallStack, MonadIO m) => FunPtr C_LogFunc -> Text -> [LogLevelFlags] -> Text -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_LogFunc :: LogFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_LogFunc.
mk_LogFunc :: C_LogFunc -> IO (FunPtr C_LogFunc)

-- | A convenience synonym for Nothing :: Maybe
--   LogFunc.
noLogFunc :: Maybe LogFunc

-- | A convenience synonym for Nothing :: Maybe
--   LogFunc_WithClosures.
noLogFunc_WithClosures :: Maybe LogFunc_WithClosures

-- | Wrap a LogFunc into a C_LogFunc.
wrap_LogFunc :: Maybe (Ptr (FunPtr C_LogFunc)) -> LogFunc_WithClosures -> C_LogFunc

-- | Type for the callback on the (unwrapped) C side.
type C_LogWriterFunc = CInt -> Ptr LogField -> Word64 -> Ptr () -> IO CUInt

-- | Writer function for log entries. A log entry is a collection of one or
--   more GLogFields, using the standard
--   <https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
--   field names from journal specification>. See
--   g_log_structured() for more information.
--   
--   Writer functions must ignore fields which they do not recognise,
--   unless they can write arbitrary binary output, as field values may be
--   arbitrary binary.
--   
--   logLevel is guaranteed to be included in
--   fields as the PRIORITY field, but is provided
--   separately for convenience of deciding whether or where to output the
--   log entry.
--   
--   Writer functions should return LogWriterOutputHandled if they
--   handled the log message successfully or if they deliberately ignored
--   it. If there was an error handling the message (for example, if the
--   writer function is meant to send messages to a remote logging server
--   and there is a network error), it should return
--   LogWriterOutputUnhandled. This allows writer functions to be
--   chained and fall back to simpler handlers in case of failure.
--   
--   Since: 2.50
type LogWriterFunc = [LogLevelFlags] " /@logLevel@/: log level of the message " -> [LogField] " /@fields@/: fields forming the message " -> IO LogWriterOutput " __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully; 'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise "

-- | Writer function for log entries. A log entry is a collection of one or
--   more GLogFields, using the standard
--   <https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
--   field names from journal specification>. See
--   g_log_structured() for more information.
--   
--   Writer functions must ignore fields which they do not recognise,
--   unless they can write arbitrary binary output, as field values may be
--   arbitrary binary.
--   
--   logLevel is guaranteed to be included in
--   fields as the PRIORITY field, but is provided
--   separately for convenience of deciding whether or where to output the
--   log entry.
--   
--   Writer functions should return LogWriterOutputHandled if they
--   handled the log message successfully or if they deliberately ignored
--   it. If there was an error handling the message (for example, if the
--   writer function is meant to send messages to a remote logging server
--   and there is a network error), it should return
--   LogWriterOutputUnhandled. This allows writer functions to be
--   chained and fall back to simpler handlers in case of failure.
--   
--   Since: 2.50
type LogWriterFunc_WithClosures = [LogLevelFlags] " /@logLevel@/: log level of the message " -> [LogField] " /@fields@/: fields forming the message " -> Ptr () " /@userData@/: user data passed to 'GI.GLib.Functions.logSetWriterFunc' " -> IO LogWriterOutput " __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully; 'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_LogWriterFunc :: LogWriterFunc -> LogWriterFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_LogWriterFunc :: (HasCallStack, MonadIO m) => FunPtr C_LogWriterFunc -> [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Wrap the callback into a Closure.
genClosure_LogWriterFunc :: LogWriterFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_LogWriterFunc.
mk_LogWriterFunc :: C_LogWriterFunc -> IO (FunPtr C_LogWriterFunc)

-- | A convenience synonym for Nothing :: Maybe
--   LogWriterFunc.
noLogWriterFunc :: Maybe LogWriterFunc

-- | A convenience synonym for Nothing :: Maybe
--   LogWriterFunc_WithClosures.
noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures

-- | Wrap a LogWriterFunc into a C_LogWriterFunc.
wrap_LogWriterFunc :: Maybe (Ptr (FunPtr C_LogWriterFunc)) -> LogWriterFunc_WithClosures -> C_LogWriterFunc

-- | Type for the callback on the (unwrapped) C side.
type C_MarkupParserEndElementFieldCallback = Ptr MarkupParseContext -> CString -> Ptr () -> Ptr (Ptr GError) -> IO ()

-- | No description available in the introspection data.
type MarkupParserEndElementFieldCallback = MarkupParseContext -> Text -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | No description available in the introspection data.
type MarkupParserEndElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Ptr () -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MarkupParserEndElementFieldCallback :: MarkupParserEndElementFieldCallback -> MarkupParserEndElementFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MarkupParserEndElementFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MarkupParserEndElementFieldCallback -> MarkupParseContext -> Text -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_MarkupParserEndElementFieldCallback.
mk_MarkupParserEndElementFieldCallback :: C_MarkupParserEndElementFieldCallback -> IO (FunPtr C_MarkupParserEndElementFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserEndElementFieldCallback.
noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserEndElementFieldCallback_WithClosures.
noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures

-- | Type for the callback on the (unwrapped) C side.
type C_MarkupParserErrorFieldCallback = Ptr MarkupParseContext -> Ptr GError -> Ptr () -> IO ()

-- | No description available in the introspection data.
type MarkupParserErrorFieldCallback = MarkupParseContext -> GError -> IO ()

-- | No description available in the introspection data.
type MarkupParserErrorFieldCallback_WithClosures = MarkupParseContext -> GError -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MarkupParserErrorFieldCallback :: MarkupParserErrorFieldCallback -> MarkupParserErrorFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MarkupParserErrorFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MarkupParserErrorFieldCallback -> MarkupParseContext -> GError -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_MarkupParserErrorFieldCallback :: MarkupParserErrorFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MarkupParserErrorFieldCallback.
mk_MarkupParserErrorFieldCallback :: C_MarkupParserErrorFieldCallback -> IO (FunPtr C_MarkupParserErrorFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserErrorFieldCallback.
noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserErrorFieldCallback_WithClosures.
noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures

-- | Wrap a MarkupParserErrorFieldCallback into a
--   C_MarkupParserErrorFieldCallback.
wrap_MarkupParserErrorFieldCallback :: Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback)) -> MarkupParserErrorFieldCallback_WithClosures -> C_MarkupParserErrorFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MarkupParserPassthroughFieldCallback = Ptr MarkupParseContext -> CString -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO ()

-- | No description available in the introspection data.
type MarkupParserPassthroughFieldCallback = MarkupParseContext -> Text -> Word64 -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | No description available in the introspection data.
type MarkupParserPassthroughFieldCallback_WithClosures = MarkupParseContext -> Text -> Word64 -> Ptr () -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MarkupParserPassthroughFieldCallback :: MarkupParserPassthroughFieldCallback -> MarkupParserPassthroughFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MarkupParserPassthroughFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MarkupParserPassthroughFieldCallback -> MarkupParseContext -> Text -> Word64 -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_MarkupParserPassthroughFieldCallback.
mk_MarkupParserPassthroughFieldCallback :: C_MarkupParserPassthroughFieldCallback -> IO (FunPtr C_MarkupParserPassthroughFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserPassthroughFieldCallback.
noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserPassthroughFieldCallback

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserPassthroughFieldCallback_WithClosures.
noMarkupParserPassthroughFieldCallback_WithClosures :: Maybe MarkupParserPassthroughFieldCallback_WithClosures

-- | Type for the callback on the (unwrapped) C side.
type C_MarkupParserStartElementFieldCallback = Ptr MarkupParseContext -> CString -> CString -> CString -> Ptr () -> Ptr (Ptr GError) -> IO ()

-- | No description available in the introspection data.
type MarkupParserStartElementFieldCallback = MarkupParseContext -> Text -> Text -> Text -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | No description available in the introspection data.
type MarkupParserStartElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Text -> Text -> Ptr () -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MarkupParserStartElementFieldCallback :: MarkupParserStartElementFieldCallback -> MarkupParserStartElementFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MarkupParserStartElementFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MarkupParserStartElementFieldCallback -> MarkupParseContext -> Text -> Text -> Text -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_MarkupParserStartElementFieldCallback.
mk_MarkupParserStartElementFieldCallback :: C_MarkupParserStartElementFieldCallback -> IO (FunPtr C_MarkupParserStartElementFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserStartElementFieldCallback.
noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserStartElementFieldCallback_WithClosures.
noMarkupParserStartElementFieldCallback_WithClosures :: Maybe MarkupParserStartElementFieldCallback_WithClosures

-- | Type for the callback on the (unwrapped) C side.
type C_MarkupParserTextFieldCallback = Ptr MarkupParseContext -> CString -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO ()

-- | No description available in the introspection data.
type MarkupParserTextFieldCallback = MarkupParseContext -> Text -> Word64 -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | No description available in the introspection data.
type MarkupParserTextFieldCallback_WithClosures = MarkupParseContext -> Text -> Word64 -> Ptr () -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MarkupParserTextFieldCallback :: MarkupParserTextFieldCallback -> MarkupParserTextFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MarkupParserTextFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MarkupParserTextFieldCallback -> MarkupParseContext -> Text -> Word64 -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_MarkupParserTextFieldCallback.
mk_MarkupParserTextFieldCallback :: C_MarkupParserTextFieldCallback -> IO (FunPtr C_MarkupParserTextFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserTextFieldCallback.
noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback

-- | A convenience synonym for Nothing :: Maybe
--   MarkupParserTextFieldCallback_WithClosures.
noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableCallocFieldCallback = Word64 -> Word64 -> IO (Ptr ())

-- | No description available in the introspection data.
type MemVTableCallocFieldCallback = Word64 -> Word64 -> IO (Ptr ())

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableCallocFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableCallocFieldCallback -> Word64 -> Word64 -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_MemVTableCallocFieldCallback :: MemVTableCallocFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableCallocFieldCallback.
mk_MemVTableCallocFieldCallback :: C_MemVTableCallocFieldCallback -> IO (FunPtr C_MemVTableCallocFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableCallocFieldCallback.
noMemVTableCallocFieldCallback :: Maybe MemVTableCallocFieldCallback

-- | Wrap a MemVTableCallocFieldCallback into a
--   C_MemVTableCallocFieldCallback.
wrap_MemVTableCallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback)) -> MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableFreeFieldCallback = Ptr () -> IO ()

-- | No description available in the introspection data.
type MemVTableFreeFieldCallback = Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableFreeFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableFreeFieldCallback -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_MemVTableFreeFieldCallback :: MemVTableFreeFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableFreeFieldCallback.
mk_MemVTableFreeFieldCallback :: C_MemVTableFreeFieldCallback -> IO (FunPtr C_MemVTableFreeFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableFreeFieldCallback.
noMemVTableFreeFieldCallback :: Maybe MemVTableFreeFieldCallback

-- | Wrap a MemVTableFreeFieldCallback into a
--   C_MemVTableFreeFieldCallback.
wrap_MemVTableFreeFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableFreeFieldCallback)) -> MemVTableFreeFieldCallback -> C_MemVTableFreeFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableMallocFieldCallback = Word64 -> IO (Ptr ())

-- | No description available in the introspection data.
type MemVTableMallocFieldCallback = Word64 -> IO (Ptr ())

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableMallocFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableMallocFieldCallback -> Word64 -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_MemVTableMallocFieldCallback :: MemVTableMallocFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableMallocFieldCallback.
mk_MemVTableMallocFieldCallback :: C_MemVTableMallocFieldCallback -> IO (FunPtr C_MemVTableMallocFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableMallocFieldCallback.
noMemVTableMallocFieldCallback :: Maybe MemVTableMallocFieldCallback

-- | Wrap a MemVTableMallocFieldCallback into a
--   C_MemVTableMallocFieldCallback.
wrap_MemVTableMallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableMallocFieldCallback)) -> MemVTableMallocFieldCallback -> C_MemVTableMallocFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableReallocFieldCallback = Ptr () -> Word64 -> IO (Ptr ())

-- | No description available in the introspection data.
type MemVTableReallocFieldCallback = Ptr () -> Word64 -> IO (Ptr ())

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableReallocFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableReallocFieldCallback -> Ptr () -> Word64 -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_MemVTableReallocFieldCallback :: MemVTableReallocFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableReallocFieldCallback.
mk_MemVTableReallocFieldCallback :: C_MemVTableReallocFieldCallback -> IO (FunPtr C_MemVTableReallocFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableReallocFieldCallback.
noMemVTableReallocFieldCallback :: Maybe MemVTableReallocFieldCallback

-- | Wrap a MemVTableReallocFieldCallback into a
--   C_MemVTableReallocFieldCallback.
wrap_MemVTableReallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableReallocFieldCallback)) -> MemVTableReallocFieldCallback -> C_MemVTableReallocFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableTryMallocFieldCallback = Word64 -> IO (Ptr ())

-- | No description available in the introspection data.
type MemVTableTryMallocFieldCallback = Word64 -> IO (Ptr ())

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableTryMallocFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableTryMallocFieldCallback -> Word64 -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_MemVTableTryMallocFieldCallback :: MemVTableTryMallocFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableTryMallocFieldCallback.
mk_MemVTableTryMallocFieldCallback :: C_MemVTableTryMallocFieldCallback -> IO (FunPtr C_MemVTableTryMallocFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableTryMallocFieldCallback.
noMemVTableTryMallocFieldCallback :: Maybe MemVTableTryMallocFieldCallback

-- | Wrap a MemVTableTryMallocFieldCallback into a
--   C_MemVTableTryMallocFieldCallback.
wrap_MemVTableTryMallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback)) -> MemVTableTryMallocFieldCallback -> C_MemVTableTryMallocFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_MemVTableTryReallocFieldCallback = Ptr () -> Word64 -> IO (Ptr ())

-- | No description available in the introspection data.
type MemVTableTryReallocFieldCallback = Ptr () -> Word64 -> IO (Ptr ())

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_MemVTableTryReallocFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_MemVTableTryReallocFieldCallback -> Ptr () -> Word64 -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_MemVTableTryReallocFieldCallback :: MemVTableTryReallocFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_MemVTableTryReallocFieldCallback.
mk_MemVTableTryReallocFieldCallback :: C_MemVTableTryReallocFieldCallback -> IO (FunPtr C_MemVTableTryReallocFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   MemVTableTryReallocFieldCallback.
noMemVTableTryReallocFieldCallback :: Maybe MemVTableTryReallocFieldCallback

-- | Wrap a MemVTableTryReallocFieldCallback into a
--   C_MemVTableTryReallocFieldCallback.
wrap_MemVTableTryReallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback)) -> MemVTableTryReallocFieldCallback -> C_MemVTableTryReallocFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_NodeForeachFunc = Ptr Node -> Ptr () -> IO ()

-- | Specifies the type of function passed to
--   g_node_children_foreach(). The function is called with
--   each child node, together with the user data passed to
--   g_node_children_foreach().
type NodeForeachFunc = Node " /@node@/: a 'GI.GLib.Structs.Node.Node'. " -> Ptr () " /@data@/: user data passed to @/g_node_children_foreach()/@. " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_NodeForeachFunc :: (HasCallStack, MonadIO m) => FunPtr C_NodeForeachFunc -> Node -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_NodeForeachFunc :: NodeForeachFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_NodeForeachFunc.
mk_NodeForeachFunc :: C_NodeForeachFunc -> IO (FunPtr C_NodeForeachFunc)

-- | A convenience synonym for Nothing :: Maybe
--   NodeForeachFunc.
noNodeForeachFunc :: Maybe NodeForeachFunc

-- | Wrap a NodeForeachFunc into a C_NodeForeachFunc.
wrap_NodeForeachFunc :: Maybe (Ptr (FunPtr C_NodeForeachFunc)) -> NodeForeachFunc -> C_NodeForeachFunc

-- | Type for the callback on the (unwrapped) C side.
type C_NodeTraverseFunc = Ptr Node -> Ptr () -> IO CInt

-- | Specifies the type of function passed to
--   g_node_traverse(). The function is called with each of
--   the nodes visited, together with the user data passed to
--   g_node_traverse(). If the function returns
--   True, then the traversal is stopped.
type NodeTraverseFunc = Node " /@node@/: a 'GI.GLib.Structs.Node.Node'. " -> Ptr () " /@data@/: user data passed to @/g_node_traverse()/@. " -> IO Bool " __Returns:__ 'True' to stop the traversal. "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_NodeTraverseFunc :: (HasCallStack, MonadIO m) => FunPtr C_NodeTraverseFunc -> Node -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_NodeTraverseFunc :: NodeTraverseFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_NodeTraverseFunc.
mk_NodeTraverseFunc :: C_NodeTraverseFunc -> IO (FunPtr C_NodeTraverseFunc)

-- | A convenience synonym for Nothing :: Maybe
--   NodeTraverseFunc.
noNodeTraverseFunc :: Maybe NodeTraverseFunc

-- | Wrap a NodeTraverseFunc into a C_NodeTraverseFunc.
wrap_NodeTraverseFunc :: Maybe (Ptr (FunPtr C_NodeTraverseFunc)) -> NodeTraverseFunc -> C_NodeTraverseFunc

-- | Type for the callback on the (unwrapped) C side.
type C_OptionArgFunc = CString -> CString -> Ptr () -> Ptr (Ptr GError) -> IO CInt

-- | The type of function to be passed as callback for
--   OptionArgCallback options.
type OptionArgFunc = Text " /@optionName@/: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name. " -> Text " /@value@/: The value to be parsed. " -> Ptr () " /@data@/: User data added to the 'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' " -> IO () " __Returns:__ 'True' if the option was successfully parsed, 'False' if an error occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_OptionArgFunc :: (HasCallStack, MonadIO m) => FunPtr C_OptionArgFunc -> Text -> Text -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_OptionArgFunc.
mk_OptionArgFunc :: C_OptionArgFunc -> IO (FunPtr C_OptionArgFunc)

-- | A convenience synonym for Nothing :: Maybe
--   OptionArgFunc.
noOptionArgFunc :: Maybe OptionArgFunc

-- | Type for the callback on the (unwrapped) C side.
type C_OptionErrorFunc = Ptr OptionContext -> Ptr OptionGroup -> Ptr () -> Ptr (Ptr GError) -> IO ()

-- | The type of function to be used as callback when a parse error occurs.
type OptionErrorFunc = OptionContext " /@context@/: The active 'GI.GLib.Structs.OptionContext.OptionContext' " -> OptionGroup " /@group@/: The group to which the function belongs " -> Ptr () " /@data@/: User data added to the 'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' " -> IO () " /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_OptionErrorFunc :: (HasCallStack, MonadIO m) => FunPtr C_OptionErrorFunc -> OptionContext -> OptionGroup -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_OptionErrorFunc.
mk_OptionErrorFunc :: C_OptionErrorFunc -> IO (FunPtr C_OptionErrorFunc)

-- | A convenience synonym for Nothing :: Maybe
--   OptionErrorFunc.
noOptionErrorFunc :: Maybe OptionErrorFunc

-- | Type for the callback on the (unwrapped) C side.
type C_OptionParseFunc = Ptr OptionContext -> Ptr OptionGroup -> Ptr () -> Ptr (Ptr GError) -> IO CInt

-- | The type of function that can be called before and after parsing.
type OptionParseFunc = OptionContext " /@context@/: The active 'GI.GLib.Structs.OptionContext.OptionContext' " -> OptionGroup " /@group@/: The group to which the function belongs " -> Ptr () " /@data@/: User data added to the 'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' " -> IO () " __Returns:__ 'True' if the function completed successfully, 'False' if an error occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_OptionParseFunc :: (HasCallStack, MonadIO m) => FunPtr C_OptionParseFunc -> OptionContext -> OptionGroup -> Ptr () -> m ()

-- | Generate a function pointer callable from C code, from a
--   C_OptionParseFunc.
mk_OptionParseFunc :: C_OptionParseFunc -> IO (FunPtr C_OptionParseFunc)

-- | A convenience synonym for Nothing :: Maybe
--   OptionParseFunc.
noOptionParseFunc :: Maybe OptionParseFunc

-- | Type for the callback on the (unwrapped) C side.
type C_PollFunc = Ptr PollFD -> Word32 -> Int32 -> IO Int32

-- | Specifies the type of function passed to
--   g_main_context_set_poll_func(). The semantics of the
--   function should match those of the poll() system call.
type PollFunc = PollFD " /@ufds@/: an array of 'GI.GLib.Structs.PollFD.PollFD' elements " -> Word32 " /@nfsd@/: the number of elements in /@ufds@/ " -> Int32 " /@timeout_@/: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout. " -> IO Int32 " __Returns:__ the number of 'GI.GLib.Structs.PollFD.PollFD' elements which have events or errors reported, or -1 if an error occurred. "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_PollFunc :: (HasCallStack, MonadIO m) => FunPtr C_PollFunc -> PollFD -> Word32 -> Int32 -> m Int32

-- | Wrap the callback into a Closure.
genClosure_PollFunc :: PollFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_PollFunc.
mk_PollFunc :: C_PollFunc -> IO (FunPtr C_PollFunc)

-- | A convenience synonym for Nothing :: Maybe
--   PollFunc.
noPollFunc :: Maybe PollFunc

-- | Wrap a PollFunc into a C_PollFunc.
wrap_PollFunc :: Maybe (Ptr (FunPtr C_PollFunc)) -> PollFunc -> C_PollFunc

-- | Type for the callback on the (unwrapped) C side.
type C_PrintFunc = CString -> IO ()

-- | Specifies the type of the print handler functions. These are called
--   with the complete formatted string to output.
type PrintFunc = Text " /@string@/: the message to output " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_PrintFunc :: (HasCallStack, MonadIO m) => FunPtr C_PrintFunc -> Text -> m ()

-- | Wrap the callback into a Closure.
genClosure_PrintFunc :: PrintFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_PrintFunc.
mk_PrintFunc :: C_PrintFunc -> IO (FunPtr C_PrintFunc)

-- | A convenience synonym for Nothing :: Maybe
--   PrintFunc.
noPrintFunc :: Maybe PrintFunc

-- | Wrap a PrintFunc into a C_PrintFunc.
wrap_PrintFunc :: Maybe (Ptr (FunPtr C_PrintFunc)) -> PrintFunc -> C_PrintFunc

-- | Type for the callback on the (unwrapped) C side.
type C_RegexEvalCallback = Ptr MatchInfo -> Ptr String -> Ptr () -> IO CInt

-- | Specifies the type of the function passed to
--   g_regex_replace_eval(). It is called for each
--   occurrence of the pattern in the string passed to
--   g_regex_replace_eval(), and it should append the
--   replacement to result.
--   
--   Since: 2.14
type RegexEvalCallback = MatchInfo " /@matchInfo@/: the 'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match. Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you need the 'GI.GLib.Structs.Regex.Regex' or the matched string. " -> String " /@result@/: a 'GI.GLib.Structs.String.String' containing the new string " -> IO Bool " __Returns:__ 'False' to continue the replacement process, 'True' to stop it "

-- | Specifies the type of the function passed to
--   g_regex_replace_eval(). It is called for each
--   occurrence of the pattern in the string passed to
--   g_regex_replace_eval(), and it should append the
--   replacement to result.
--   
--   Since: 2.14
type RegexEvalCallback_WithClosures = MatchInfo " /@matchInfo@/: the 'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match. Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you need the 'GI.GLib.Structs.Regex.Regex' or the matched string. " -> String " /@result@/: a 'GI.GLib.Structs.String.String' containing the new string " -> Ptr () " /@userData@/: user data passed to @/g_regex_replace_eval()/@ " -> IO Bool " __Returns:__ 'False' to continue the replacement process, 'True' to stop it "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_RegexEvalCallback :: RegexEvalCallback -> RegexEvalCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_RegexEvalCallback :: (HasCallStack, MonadIO m) => FunPtr C_RegexEvalCallback -> MatchInfo -> String -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_RegexEvalCallback :: RegexEvalCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_RegexEvalCallback.
mk_RegexEvalCallback :: C_RegexEvalCallback -> IO (FunPtr C_RegexEvalCallback)

-- | A convenience synonym for Nothing :: Maybe
--   RegexEvalCallback.
noRegexEvalCallback :: Maybe RegexEvalCallback

-- | A convenience synonym for Nothing :: Maybe
--   RegexEvalCallback_WithClosures.
noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures

-- | Wrap a RegexEvalCallback into a C_RegexEvalCallback.
wrap_RegexEvalCallback :: Maybe (Ptr (FunPtr C_RegexEvalCallback)) -> RegexEvalCallback_WithClosures -> C_RegexEvalCallback

-- | Type for the callback on the (unwrapped) C side.
type C_ScannerMsgFunc = Ptr Scanner -> CString -> CInt -> IO ()

-- | Specifies the type of the message handler function.
type ScannerMsgFunc = Scanner " /@scanner@/: a 'GI.GLib.Structs.Scanner.Scanner' " -> Text " /@message@/: the message " -> Bool " /@error@/: 'True' if the message signals an error, 'False' if it signals a warning. " -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ScannerMsgFunc :: (HasCallStack, MonadIO m) => FunPtr C_ScannerMsgFunc -> Scanner -> Text -> Bool -> m ()

-- | Wrap the callback into a Closure.
genClosure_ScannerMsgFunc :: ScannerMsgFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_ScannerMsgFunc.
mk_ScannerMsgFunc :: C_ScannerMsgFunc -> IO (FunPtr C_ScannerMsgFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ScannerMsgFunc.
noScannerMsgFunc :: Maybe ScannerMsgFunc

-- | Wrap a ScannerMsgFunc into a C_ScannerMsgFunc.
wrap_ScannerMsgFunc :: Maybe (Ptr (FunPtr C_ScannerMsgFunc)) -> ScannerMsgFunc -> C_ScannerMsgFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SequenceIterCompareFunc = Ptr SequenceIter -> Ptr SequenceIter -> Ptr () -> IO Int32

-- | A SequenceIterCompareFunc is a function used to compare
--   iterators. It must return zero if the iterators compare equal, a
--   negative value if a comes before b,
--   and a positive value if b comes before
--   a.
type SequenceIterCompareFunc = SequenceIter " /@a@/: a 'GI.GLib.Structs.SequenceIter.SequenceIter' " -> SequenceIter " /@b@/: a 'GI.GLib.Structs.SequenceIter.SequenceIter' " -> Ptr () " /@data@/: user data " -> IO Int32 " __Returns:__ zero if the iterators are equal, a negative value if /@a@/ comes before /@b@/, and a positive value if /@b@/ comes before /@a@/. "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SequenceIterCompareFunc :: (HasCallStack, MonadIO m) => FunPtr C_SequenceIterCompareFunc -> SequenceIter -> SequenceIter -> Ptr () -> m Int32

-- | Wrap the callback into a Closure.
genClosure_SequenceIterCompareFunc :: SequenceIterCompareFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SequenceIterCompareFunc.
mk_SequenceIterCompareFunc :: C_SequenceIterCompareFunc -> IO (FunPtr C_SequenceIterCompareFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SequenceIterCompareFunc.
noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc

-- | Wrap a SequenceIterCompareFunc into a
--   C_SequenceIterCompareFunc.
wrap_SequenceIterCompareFunc :: Maybe (Ptr (FunPtr C_SequenceIterCompareFunc)) -> SequenceIterCompareFunc -> C_SequenceIterCompareFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SourceCallbackFuncsRefFieldCallback = Ptr () -> IO ()

-- | No description available in the introspection data.
type SourceCallbackFuncsRefFieldCallback = Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceCallbackFuncsRefFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_SourceCallbackFuncsRefFieldCallback -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_SourceCallbackFuncsRefFieldCallback :: SourceCallbackFuncsRefFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceCallbackFuncsRefFieldCallback.
mk_SourceCallbackFuncsRefFieldCallback :: C_SourceCallbackFuncsRefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsRefFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   SourceCallbackFuncsRefFieldCallback.
noSourceCallbackFuncsRefFieldCallback :: Maybe SourceCallbackFuncsRefFieldCallback

-- | Wrap a SourceCallbackFuncsRefFieldCallback into a
--   C_SourceCallbackFuncsRefFieldCallback.
wrap_SourceCallbackFuncsRefFieldCallback :: Maybe (Ptr (FunPtr C_SourceCallbackFuncsRefFieldCallback)) -> SourceCallbackFuncsRefFieldCallback -> C_SourceCallbackFuncsRefFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SourceCallbackFuncsUnrefFieldCallback = Ptr () -> IO ()

-- | No description available in the introspection data.
type SourceCallbackFuncsUnrefFieldCallback = Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceCallbackFuncsUnrefFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_SourceCallbackFuncsUnrefFieldCallback -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_SourceCallbackFuncsUnrefFieldCallback :: SourceCallbackFuncsUnrefFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceCallbackFuncsUnrefFieldCallback.
mk_SourceCallbackFuncsUnrefFieldCallback :: C_SourceCallbackFuncsUnrefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   SourceCallbackFuncsUnrefFieldCallback.
noSourceCallbackFuncsUnrefFieldCallback :: Maybe SourceCallbackFuncsUnrefFieldCallback

-- | Wrap a SourceCallbackFuncsUnrefFieldCallback into a
--   C_SourceCallbackFuncsUnrefFieldCallback.
wrap_SourceCallbackFuncsUnrefFieldCallback :: Maybe (Ptr (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)) -> SourceCallbackFuncsUnrefFieldCallback -> C_SourceCallbackFuncsUnrefFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SourceDummyMarshal = IO ()

-- | This is just a placeholder for GClosureMarshal, which
--   cannot be used here for dependency reasons.
type SourceDummyMarshal = IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceDummyMarshal :: (HasCallStack, MonadIO m) => FunPtr C_SourceDummyMarshal -> m ()

-- | Wrap the callback into a Closure.
genClosure_SourceDummyMarshal :: SourceDummyMarshal -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceDummyMarshal.
mk_SourceDummyMarshal :: C_SourceDummyMarshal -> IO (FunPtr C_SourceDummyMarshal)

-- | A convenience synonym for Nothing :: Maybe
--   SourceDummyMarshal.
noSourceDummyMarshal :: Maybe SourceDummyMarshal

-- | Wrap a SourceDummyMarshal into a C_SourceDummyMarshal.
wrap_SourceDummyMarshal :: Maybe (Ptr (FunPtr C_SourceDummyMarshal)) -> SourceDummyMarshal -> C_SourceDummyMarshal

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFunc = Ptr () -> IO CInt

-- | Specifies the type of function passed to
--   g_timeout_add(), timeoutAdd,
--   g_idle_add(), and idleAdd.
--   
--   When calling sourceSetCallback, you may need to cast a function
--   of a different type to this type. Use G_SOURCE_FUNC()
--   to avoid warnings about incompatible function types.
type SourceFunc = IO Bool " __Returns:__ 'False' if the source should be removed. 'GI.GLib.Constants.SOURCE_CONTINUE' and 'GI.GLib.Constants.SOURCE_REMOVE' are more memorable names for the return value. "

-- | Specifies the type of function passed to
--   g_timeout_add(), timeoutAdd,
--   g_idle_add(), and idleAdd.
--   
--   When calling sourceSetCallback, you may need to cast a function
--   of a different type to this type. Use G_SOURCE_FUNC()
--   to avoid warnings about incompatible function types.
type SourceFunc_WithClosures = Ptr () " /@userData@/: data passed to the function, set when the source was created with one of the above functions " -> IO Bool " __Returns:__ 'False' if the source should be removed. 'GI.GLib.Constants.SOURCE_CONTINUE' and 'GI.GLib.Constants.SOURCE_REMOVE' are more memorable names for the return value. "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SourceFunc :: SourceFunc -> SourceFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceFunc -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_SourceFunc :: SourceFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceFunc.
mk_SourceFunc :: C_SourceFunc -> IO (FunPtr C_SourceFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFunc.
noSourceFunc :: Maybe SourceFunc

-- | A convenience synonym for Nothing :: Maybe
--   SourceFunc_WithClosures.
noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures

-- | Wrap a SourceFunc into a C_SourceFunc.
wrap_SourceFunc :: Maybe (Ptr (FunPtr C_SourceFunc)) -> SourceFunc_WithClosures -> C_SourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFuncsCheckFieldCallback = Ptr Source -> IO CInt

-- | No description available in the introspection data.
type SourceFuncsCheckFieldCallback = Source -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsCheckFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsCheckFieldCallback -> Source -> m Bool

-- | Wrap the callback into a Closure.
genClosure_SourceFuncsCheckFieldCallback :: SourceFuncsCheckFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsCheckFieldCallback.
mk_SourceFuncsCheckFieldCallback :: C_SourceFuncsCheckFieldCallback -> IO (FunPtr C_SourceFuncsCheckFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsCheckFieldCallback.
noSourceFuncsCheckFieldCallback :: Maybe SourceFuncsCheckFieldCallback

-- | Wrap a SourceFuncsCheckFieldCallback into a
--   C_SourceFuncsCheckFieldCallback.
wrap_SourceFuncsCheckFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback)) -> SourceFuncsCheckFieldCallback -> C_SourceFuncsCheckFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFuncsFinalizeFieldCallback = Ptr Source -> IO ()

-- | No description available in the introspection data.
type SourceFuncsFinalizeFieldCallback = Source -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsFinalizeFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsFinalizeFieldCallback -> Source -> m ()

-- | Wrap the callback into a Closure.
genClosure_SourceFuncsFinalizeFieldCallback :: SourceFuncsFinalizeFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsFinalizeFieldCallback.
mk_SourceFuncsFinalizeFieldCallback :: C_SourceFuncsFinalizeFieldCallback -> IO (FunPtr C_SourceFuncsFinalizeFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsFinalizeFieldCallback.
noSourceFuncsFinalizeFieldCallback :: Maybe SourceFuncsFinalizeFieldCallback

-- | Wrap a SourceFuncsFinalizeFieldCallback into a
--   C_SourceFuncsFinalizeFieldCallback.
wrap_SourceFuncsFinalizeFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback)) -> SourceFuncsFinalizeFieldCallback -> C_SourceFuncsFinalizeFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFuncsPrepareFieldCallback = Ptr Source -> Int32 -> IO CInt

-- | No description available in the introspection data.
type SourceFuncsPrepareFieldCallback = Source -> Int32 -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsPrepareFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsPrepareFieldCallback -> Source -> Int32 -> m Bool

-- | Wrap the callback into a Closure.
genClosure_SourceFuncsPrepareFieldCallback :: SourceFuncsPrepareFieldCallback -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsPrepareFieldCallback.
mk_SourceFuncsPrepareFieldCallback :: C_SourceFuncsPrepareFieldCallback -> IO (FunPtr C_SourceFuncsPrepareFieldCallback)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsPrepareFieldCallback.
noSourceFuncsPrepareFieldCallback :: Maybe SourceFuncsPrepareFieldCallback

-- | Wrap a SourceFuncsPrepareFieldCallback into a
--   C_SourceFuncsPrepareFieldCallback.
wrap_SourceFuncsPrepareFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback)) -> SourceFuncsPrepareFieldCallback -> C_SourceFuncsPrepareFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SpawnChildSetupFunc = Ptr () -> IO ()

-- | Specifies the type of the setup function passed to spawnAsync,
--   spawnSync and spawnAsyncWithPipes, which can, in very
--   limited ways, be used to affect the child's execution.
--   
--   On POSIX platforms, the function is called in the child after GLib has
--   performed all the setup it plans to perform, but before calling
--   exec(). Actions taken in this function will only
--   affect the child, not the parent.
--   
--   On Windows, the function is called in the parent. Its usefulness on
--   Windows is thus questionable. In many cases executing the child setup
--   function in the parent can have ill effects, and you should be very
--   careful when porting software to Windows that uses child setup
--   functions.
--   
--   However, even on POSIX, you are extremely limited in what you can
--   safely do from a SpawnChildSetupFunc, because any mutexes that
--   were held by other threads in the parent process at the time of the
--   fork() will still be locked in the child process, and
--   they will never be unlocked (since the threads that held them don't
--   exist in the child). POSIX allows only async-signal-safe functions
--   (see signal(7)) to be called in the child between
--   fork() and exec(), which drastically
--   limits the usefulness of child setup functions.
--   
--   In particular, it is not safe to call any function which may call
--   malloc(), which includes POSIX functions such as
--   setenv(). If you need to set up the child environment
--   differently from the parent, you should use getEnviron,
--   environSetenv, and environUnsetenv, and then pass the
--   complete environment list to the g_spawn... function.
type SpawnChildSetupFunc = IO ()

-- | Specifies the type of the setup function passed to spawnAsync,
--   spawnSync and spawnAsyncWithPipes, which can, in very
--   limited ways, be used to affect the child's execution.
--   
--   On POSIX platforms, the function is called in the child after GLib has
--   performed all the setup it plans to perform, but before calling
--   exec(). Actions taken in this function will only
--   affect the child, not the parent.
--   
--   On Windows, the function is called in the parent. Its usefulness on
--   Windows is thus questionable. In many cases executing the child setup
--   function in the parent can have ill effects, and you should be very
--   careful when porting software to Windows that uses child setup
--   functions.
--   
--   However, even on POSIX, you are extremely limited in what you can
--   safely do from a SpawnChildSetupFunc, because any mutexes that
--   were held by other threads in the parent process at the time of the
--   fork() will still be locked in the child process, and
--   they will never be unlocked (since the threads that held them don't
--   exist in the child). POSIX allows only async-signal-safe functions
--   (see signal(7)) to be called in the child between
--   fork() and exec(), which drastically
--   limits the usefulness of child setup functions.
--   
--   In particular, it is not safe to call any function which may call
--   malloc(), which includes POSIX functions such as
--   setenv(). If you need to set up the child environment
--   differently from the parent, you should use getEnviron,
--   environSetenv, and environUnsetenv, and then pass the
--   complete environment list to the g_spawn... function.
type SpawnChildSetupFunc_WithClosures = Ptr () " /@userData@/: user data to pass to the function. " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SpawnChildSetupFunc :: SpawnChildSetupFunc -> SpawnChildSetupFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SpawnChildSetupFunc :: (HasCallStack, MonadIO m) => FunPtr C_SpawnChildSetupFunc -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_SpawnChildSetupFunc :: SpawnChildSetupFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_SpawnChildSetupFunc.
mk_SpawnChildSetupFunc :: C_SpawnChildSetupFunc -> IO (FunPtr C_SpawnChildSetupFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SpawnChildSetupFunc.
noSpawnChildSetupFunc :: Maybe SpawnChildSetupFunc

-- | A convenience synonym for Nothing :: Maybe
--   SpawnChildSetupFunc_WithClosures.
noSpawnChildSetupFunc_WithClosures :: Maybe SpawnChildSetupFunc_WithClosures

-- | Wrap a SpawnChildSetupFunc into a C_SpawnChildSetupFunc.
wrap_SpawnChildSetupFunc :: Maybe (Ptr (FunPtr C_SpawnChildSetupFunc)) -> SpawnChildSetupFunc_WithClosures -> C_SpawnChildSetupFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TestDataFunc = Ptr () -> IO ()

-- | The type used for test case functions that take an extra pointer
--   argument.
--   
--   Since: 2.28
type TestDataFunc = IO ()

-- | The type used for test case functions that take an extra pointer
--   argument.
--   
--   Since: 2.28
type TestDataFunc_WithClosures = Ptr () " /@userData@/: the data provided when registering the test " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TestDataFunc :: TestDataFunc -> TestDataFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TestDataFunc :: (HasCallStack, MonadIO m) => FunPtr C_TestDataFunc -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_TestDataFunc :: TestDataFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TestDataFunc.
mk_TestDataFunc :: C_TestDataFunc -> IO (FunPtr C_TestDataFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TestDataFunc.
noTestDataFunc :: Maybe TestDataFunc

-- | A convenience synonym for Nothing :: Maybe
--   TestDataFunc_WithClosures.
noTestDataFunc_WithClosures :: Maybe TestDataFunc_WithClosures

-- | Wrap a TestDataFunc into a C_TestDataFunc.
wrap_TestDataFunc :: Maybe (Ptr (FunPtr C_TestDataFunc)) -> TestDataFunc_WithClosures -> C_TestDataFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TestFixtureFunc = Ptr () -> Ptr () -> IO ()

-- | The type used for functions that operate on test fixtures. This is
--   used for the fixture setup and teardown functions as well as for the
--   testcases themselves.
--   
--   userData is a pointer to the data that was given when
--   registering the test case.
--   
--   fixture will be a pointer to the area of memory
--   allocated by the test framework, of the size requested. If the
--   requested size was zero then fixture will be equal to
--   userData.
--   
--   Since: 2.28
type TestFixtureFunc = Ptr () " /@fixture@/: the test fixture " -> IO ()

-- | The type used for functions that operate on test fixtures. This is
--   used for the fixture setup and teardown functions as well as for the
--   testcases themselves.
--   
--   userData is a pointer to the data that was given when
--   registering the test case.
--   
--   fixture will be a pointer to the area of memory
--   allocated by the test framework, of the size requested. If the
--   requested size was zero then fixture will be equal to
--   userData.
--   
--   Since: 2.28
type TestFixtureFunc_WithClosures = Ptr () " /@fixture@/: the test fixture " -> Ptr () " /@userData@/: the data provided when registering the test " -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TestFixtureFunc :: TestFixtureFunc -> TestFixtureFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TestFixtureFunc :: (HasCallStack, MonadIO m) => FunPtr C_TestFixtureFunc -> Ptr () -> Ptr () -> m ()

-- | Wrap the callback into a Closure.
genClosure_TestFixtureFunc :: TestFixtureFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TestFixtureFunc.
mk_TestFixtureFunc :: C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TestFixtureFunc.
noTestFixtureFunc :: Maybe TestFixtureFunc

-- | A convenience synonym for Nothing :: Maybe
--   TestFixtureFunc_WithClosures.
noTestFixtureFunc_WithClosures :: Maybe TestFixtureFunc_WithClosures

-- | Wrap a TestFixtureFunc into a C_TestFixtureFunc.
wrap_TestFixtureFunc :: Maybe (Ptr (FunPtr C_TestFixtureFunc)) -> TestFixtureFunc_WithClosures -> C_TestFixtureFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TestFunc = IO ()

-- | The type used for test case functions.
--   
--   Since: 2.28
type TestFunc = IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TestFunc :: (HasCallStack, MonadIO m) => FunPtr C_TestFunc -> m ()

-- | Wrap the callback into a Closure.
genClosure_TestFunc :: TestFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TestFunc.
mk_TestFunc :: C_TestFunc -> IO (FunPtr C_TestFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TestFunc.
noTestFunc :: Maybe TestFunc

-- | Wrap a TestFunc into a C_TestFunc.
wrap_TestFunc :: Maybe (Ptr (FunPtr C_TestFunc)) -> TestFunc -> C_TestFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TestLogFatalFunc = CString -> CInt -> CString -> Ptr () -> IO CInt

-- | Specifies the prototype of fatal log handler functions.
--   
--   Since: 2.22
type TestLogFatalFunc = Text " /@logDomain@/: the log domain of the message " -> [LogLevelFlags] " /@logLevel@/: the log level of the message (including the fatal and recursion flags) " -> Text " /@message@/: the message to process " -> IO Bool " __Returns:__ 'True' if the program should abort, 'False' otherwise "

-- | Specifies the prototype of fatal log handler functions.
--   
--   Since: 2.22
type TestLogFatalFunc_WithClosures = Text " /@logDomain@/: the log domain of the message " -> [LogLevelFlags] " /@logLevel@/: the log level of the message (including the fatal and recursion flags) " -> Text " /@message@/: the message to process " -> Ptr () " /@userData@/: user data, set in @/g_test_log_set_fatal_handler()/@ " -> IO Bool " __Returns:__ 'True' if the program should abort, 'False' otherwise "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TestLogFatalFunc :: TestLogFatalFunc -> TestLogFatalFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TestLogFatalFunc :: (HasCallStack, MonadIO m) => FunPtr C_TestLogFatalFunc -> Text -> [LogLevelFlags] -> Text -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_TestLogFatalFunc :: TestLogFatalFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TestLogFatalFunc.
mk_TestLogFatalFunc :: C_TestLogFatalFunc -> IO (FunPtr C_TestLogFatalFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TestLogFatalFunc.
noTestLogFatalFunc :: Maybe TestLogFatalFunc

-- | A convenience synonym for Nothing :: Maybe
--   TestLogFatalFunc_WithClosures.
noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures

-- | Wrap a TestLogFatalFunc into a C_TestLogFatalFunc.
wrap_TestLogFatalFunc :: Maybe (Ptr (FunPtr C_TestLogFatalFunc)) -> TestLogFatalFunc_WithClosures -> C_TestLogFatalFunc

-- | Type for the callback on the (unwrapped) C side.
type C_ThreadFunc = Ptr () -> IO (Ptr ())

-- | Specifies the type of the func functions passed to
--   g_thread_new() or g_thread_try_new().
type ThreadFunc = Ptr () " /@data@/: data passed to the thread " -> IO (Ptr ()) " __Returns:__ the return value of the thread "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ThreadFunc :: (HasCallStack, MonadIO m) => FunPtr C_ThreadFunc -> Ptr () -> m (Ptr ())

-- | Wrap the callback into a Closure.
genClosure_ThreadFunc :: ThreadFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_ThreadFunc.
mk_ThreadFunc :: C_ThreadFunc -> IO (FunPtr C_ThreadFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ThreadFunc.
noThreadFunc :: Maybe ThreadFunc

-- | Wrap a ThreadFunc into a C_ThreadFunc.
wrap_ThreadFunc :: Maybe (Ptr (FunPtr C_ThreadFunc)) -> ThreadFunc -> C_ThreadFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TranslateFunc = CString -> Ptr () -> IO CString

-- | The type of functions which are used to translate user-visible
--   strings, for <option>--help</option> output.
type TranslateFunc = Text " /@str@/: the untranslated string " -> Ptr () " /@data@/: user data specified when installing the function, e.g. in 'GI.GLib.Structs.OptionGroup.optionGroupSetTranslateFunc' " -> IO Text " __Returns:__ a translation of the string for the current locale. The returned string is owned by GLib and must not be freed. "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TranslateFunc :: (HasCallStack, MonadIO m) => FunPtr C_TranslateFunc -> Text -> Ptr () -> m Text

-- | Wrap the callback into a Closure.
genClosure_TranslateFunc :: TranslateFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TranslateFunc.
mk_TranslateFunc :: C_TranslateFunc -> IO (FunPtr C_TranslateFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TranslateFunc.
noTranslateFunc :: Maybe TranslateFunc

-- | Wrap a TranslateFunc into a C_TranslateFunc.
wrap_TranslateFunc :: Maybe (Ptr (FunPtr C_TranslateFunc)) -> TranslateFunc -> C_TranslateFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TraverseFunc = Ptr () -> Ptr () -> Ptr () -> IO CInt

-- | Specifies the type of function passed to
--   g_tree_traverse(). It is passed the key and value of
--   each node, together with the userData parameter passed
--   to g_tree_traverse(). If the function returns
--   True, the traversal is stopped.
type TraverseFunc = Ptr () " /@key@/: a key of a 'GI.GLib.Structs.Tree.Tree' node " -> Ptr () " /@value@/: the value corresponding to the key " -> Ptr () " /@data@/: user data passed to @/g_tree_traverse()/@ " -> IO Bool " __Returns:__ 'True' to stop the traversal "

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TraverseFunc :: (HasCallStack, MonadIO m) => FunPtr C_TraverseFunc -> Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_TraverseFunc :: TraverseFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_TraverseFunc.
mk_TraverseFunc :: C_TraverseFunc -> IO (FunPtr C_TraverseFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TraverseFunc.
noTraverseFunc :: Maybe TraverseFunc

-- | Wrap a TraverseFunc into a C_TraverseFunc.
wrap_TraverseFunc :: Maybe (Ptr (FunPtr C_TraverseFunc)) -> TraverseFunc -> C_TraverseFunc

-- | Type for the callback on the (unwrapped) C side.
type C_UnixFDSourceFunc = Int32 -> CUInt -> Ptr () -> IO CInt

-- | The type of functions to be called when a UNIX fd watch source
--   triggers.
type UnixFDSourceFunc = Int32 " /@fd@/: the fd that triggered the event " -> [IOCondition] " /@condition@/: the IO conditions reported on /@fd@/ " -> IO Bool " __Returns:__ 'False' if the source should be removed "

-- | The type of functions to be called when a UNIX fd watch source
--   triggers.
type UnixFDSourceFunc_WithClosures = Int32 " /@fd@/: the fd that triggered the event " -> [IOCondition] " /@condition@/: the IO conditions reported on /@fd@/ " -> Ptr () " /@userData@/: user data passed to @/g_unix_fd_add()/@ " -> IO Bool " __Returns:__ 'False' if the source should be removed "

-- | A simple wrapper that ignores the closure arguments.
drop_closures_UnixFDSourceFunc :: UnixFDSourceFunc -> UnixFDSourceFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_UnixFDSourceFunc :: (HasCallStack, MonadIO m) => FunPtr C_UnixFDSourceFunc -> Int32 -> [IOCondition] -> Ptr () -> m Bool

-- | Wrap the callback into a Closure.
genClosure_UnixFDSourceFunc :: UnixFDSourceFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_UnixFDSourceFunc.
mk_UnixFDSourceFunc :: C_UnixFDSourceFunc -> IO (FunPtr C_UnixFDSourceFunc)

-- | A convenience synonym for Nothing :: Maybe
--   UnixFDSourceFunc.
noUnixFDSourceFunc :: Maybe UnixFDSourceFunc

-- | A convenience synonym for Nothing :: Maybe
--   UnixFDSourceFunc_WithClosures.
noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures

-- | Wrap a UnixFDSourceFunc into a C_UnixFDSourceFunc.
wrap_UnixFDSourceFunc :: Maybe (Ptr (FunPtr C_UnixFDSourceFunc)) -> UnixFDSourceFunc_WithClosures -> C_UnixFDSourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_VoidFunc = IO ()

-- | Declares a type of function which takes no arguments and has no return
--   value. It is used to specify the type function passed to
--   atexit.
type VoidFunc = IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_VoidFunc :: (HasCallStack, MonadIO m) => FunPtr C_VoidFunc -> m ()

-- | Wrap the callback into a Closure.
genClosure_VoidFunc :: VoidFunc -> IO Closure

-- | Generate a function pointer callable from C code, from a
--   C_VoidFunc.
mk_VoidFunc :: C_VoidFunc -> IO (FunPtr C_VoidFunc)

-- | A convenience synonym for Nothing :: Maybe
--   VoidFunc.
noVoidFunc :: Maybe VoidFunc

-- | Wrap a VoidFunc into a C_VoidFunc.
wrap_VoidFunc :: Maybe (Ptr (FunPtr C_VoidFunc)) -> VoidFunc -> C_VoidFunc

-- | The GSourceFuncs struct contains a table of functions used to
--   handle event sources in a generic manner.
--   
--   For idle sources, the prepare and check functions always return
--   True to indicate that the source is always ready to be
--   processed. The prepare function also returns a timeout value of 0 to
--   ensure that the poll() call doesn't block (since that
--   would be time wasted which could have been spent running the idle
--   function).
--   
--   For timeout sources, the prepare and check functions both return
--   True if the timeout interval has expired. The prepare function
--   also returns a timeout value to ensure that the poll()
--   call doesn't block too long and miss the next timeout.
--   
--   For file descriptor sources, the prepare function typically returns
--   False, since it must wait until poll() has been
--   called before it knows whether any events need to be processed. It
--   sets the returned timeout to -1 to indicate that it doesn't mind how
--   long the poll() call blocks. In the check function, it
--   tests the results of the poll() call to see if the
--   required condition has been met, and returns True if so.
module GI.GLib.Structs.SourceFuncs

-- | Memory-managed wrapper type.
newtype SourceFuncs
SourceFuncs :: ManagedPtr SourceFuncs -> SourceFuncs

-- | Construct a SourceFuncs struct initialized to zero.
newZeroSourceFuncs :: MonadIO m => m SourceFuncs

-- | A convenience alias for Nothing :: Maybe
--   SourceFuncs.
noSourceFuncs :: Maybe SourceFuncs

-- | Set the value of the “check” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #check
--   
clearSourceFuncsCheck :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “check” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get sourceFuncs #check
--   
getSourceFuncsCheck :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsCheckFieldCallback)

-- | Set the value of the “check” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set sourceFuncs [ #check := value ]
--   
setSourceFuncsCheck :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsCheckFieldCallback -> m ()

-- | Set the value of the “finalize” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #finalize
--   
clearSourceFuncsFinalize :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “finalize” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get sourceFuncs #finalize
--   
getSourceFuncsFinalize :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsFinalizeFieldCallback)

-- | Set the value of the “finalize” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set sourceFuncs [ #finalize := value ]
--   
setSourceFuncsFinalize :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsFinalizeFieldCallback -> m ()

-- | Set the value of the “prepare” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #prepare
--   
clearSourceFuncsPrepare :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “prepare” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get sourceFuncs #prepare
--   
getSourceFuncsPrepare :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsPrepareFieldCallback)

-- | Set the value of the “prepare” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set sourceFuncs [ #prepare := value ]
--   
setSourceFuncsPrepare :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsPrepareFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.SourceFuncs.SourceFuncs
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.SourceFuncs.SourceFuncs tag

-- | The GSourceCallbackFuncs struct contains functions for
--   managing callback objects.
module GI.GLib.Structs.SourceCallbackFuncs

-- | Memory-managed wrapper type.
newtype SourceCallbackFuncs
SourceCallbackFuncs :: ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs

-- | Construct a SourceCallbackFuncs struct initialized to zero.
newZeroSourceCallbackFuncs :: MonadIO m => m SourceCallbackFuncs

-- | A convenience alias for Nothing :: Maybe
--   SourceCallbackFuncs.
noSourceCallbackFuncs :: Maybe SourceCallbackFuncs

-- | Set the value of the “ref” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ref
--   
clearSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m ()

-- | Get the value of the “ref” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get sourceCallbackFuncs #ref
--   
getSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m (Maybe SourceCallbackFuncsRefFieldCallback)

-- | Set the value of the “ref” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set sourceCallbackFuncs [ #ref := value ]
--   
setSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> FunPtr C_SourceCallbackFuncsRefFieldCallback -> m ()

-- | Set the value of the “unref” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #unref
--   
clearSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m ()

-- | Get the value of the “unref” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get sourceCallbackFuncs #unref
--   
getSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m (Maybe SourceCallbackFuncsUnrefFieldCallback)

-- | Set the value of the “unref” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set sourceCallbackFuncs [ #unref := value ]
--   
setSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> FunPtr C_SourceCallbackFuncsUnrefFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs tag

-- | Contains the public fields of a [Queue][glib-Double-ended-Queues].
module GI.GLib.Structs.Queue

-- | Memory-managed wrapper type.
newtype Queue
Queue :: ManagedPtr Queue -> Queue

-- | Construct a Queue struct initialized to zero.
newZeroQueue :: MonadIO m => m Queue

-- | A convenience alias for Nothing :: Maybe Queue.
noQueue :: Maybe Queue

-- | Removes all the elements in queue. If queue elements
--   contain dynamically-allocated memory, they should be freed first.
--   
--   Since: 2.14
queueClear :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Convenience method, which frees all the memory used by a Queue,
--   and calls the provided freeFunc on each item in the
--   Queue.
--   
--   Since: 2.60
queueClearFull :: (HasCallStack, MonadIO m) => Queue -> Maybe DestroyNotify -> m ()

-- | Frees the memory allocated for the Queue. Only call this
--   function if queue was created with
--   g_queue_new(). If queue elements contain
--   dynamically-allocated memory, they should be freed first.
--   
--   If queue elements contain dynamically-allocated memory, you should
--   either use queueFreeFull or free them manually first.
queueFree :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Convenience method, which frees all the memory used by a Queue,
--   and calls the specified destroy function on every element's data.
--   
--   freeFunc should not modify the queue (eg, by removing
--   the freed element from it).
--   
--   Since: 2.32
queueFreeFull :: (HasCallStack, MonadIO m) => Queue -> DestroyNotify -> m ()

-- | Returns the number of items in queue.
--   
--   Since: 2.4
queueGetLength :: (HasCallStack, MonadIO m) => Queue -> m Word32

-- | Returns the position of the first element in queue
--   which contains data.
--   
--   Since: 2.4
queueIndex :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Int32

-- | A statically-allocated Queue must be initialized with this
--   function before it can be used. Alternatively you can initialize it
--   with G_QUEUE_INIT. It is not necessary to initialize
--   queues created with g_queue_new().
--   
--   Since: 2.14
queueInit :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Returns True if the queue is empty.
queueIsEmpty :: (HasCallStack, MonadIO m) => Queue -> m Bool

-- | Returns the first element of the queue.
queuePeekHead :: (HasCallStack, MonadIO m) => Queue -> m (Ptr ())

-- | Returns the n'th element of queue.
--   
--   Since: 2.4
queuePeekNth :: (HasCallStack, MonadIO m) => Queue -> Word32 -> m (Ptr ())

-- | Returns the last element of the queue.
queuePeekTail :: (HasCallStack, MonadIO m) => Queue -> m (Ptr ())

-- | Removes the first element of the queue and returns its data.
queuePopHead :: (HasCallStack, MonadIO m) => Queue -> m (Ptr ())

-- | Removes the n'th element of queue and
--   returns its data.
--   
--   Since: 2.4
queuePopNth :: (HasCallStack, MonadIO m) => Queue -> Word32 -> m (Ptr ())

-- | Removes the last element of the queue and returns its data.
queuePopTail :: (HasCallStack, MonadIO m) => Queue -> m (Ptr ())

-- | Adds a new element at the head of the queue.
queuePushHead :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m ()

-- | Inserts a new element into queue at the given
--   position.
--   
--   Since: 2.4
queuePushNth :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> Int32 -> m ()

-- | Adds a new element at the tail of the queue.
queuePushTail :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m ()

-- | Removes the first element in queue that contains
--   data.
--   
--   Since: 2.4
queueRemove :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Bool

-- | Remove all elements whose data equals data from
--   queue.
--   
--   Since: 2.4
queueRemoveAll :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Word32

-- | Reverses the order of the items in queue.
--   
--   Since: 2.4
queueReverse :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Set the value of the “head” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #head
--   
clearQueueHead :: MonadIO m => Queue -> m ()

-- | Get the value of the “head” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get queue #head
--   
getQueueHead :: MonadIO m => Queue -> m [Ptr ()]

-- | Set the value of the “head” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set queue [ #head := value ]
--   
setQueueHead :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()

-- | Get the value of the “length” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get queue #length
--   
getQueueLength :: MonadIO m => Queue -> m Word32

-- | Set the value of the “length” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set queue [ #length := value ]
--   
setQueueLength :: MonadIO m => Queue -> Word32 -> m ()

-- | Set the value of the “tail” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #tail
--   
clearQueueTail :: MonadIO m => Queue -> m ()

-- | Get the value of the “tail” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get queue #tail
--   
getQueueTail :: MonadIO m => Queue -> m [Ptr ()]

-- | Set the value of the “tail” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set queue [ #tail := value ]
--   
setQueueTail :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Queue.Queue
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Queue.Queue tag

-- | A GOptionGroup struct defines the options in a single group.
--   The struct has only private fields and should not be directly
--   accessed.
--   
--   All options in a group share the same translation function. Libraries
--   which need to parse commandline options are expected to provide a
--   function for getting a GOptionGroup holding their options,
--   which the application can then add to its OptionContext.
module GI.GLib.Structs.OptionGroup

-- | Memory-managed wrapper type.
newtype OptionGroup
OptionGroup :: ManagedPtr OptionGroup -> OptionGroup

-- | A convenience alias for Nothing :: Maybe
--   OptionGroup.
noOptionGroup :: Maybe OptionGroup

-- | Adds the options specified in entries to
--   group.
--   
--   Since: 2.6
optionGroupAddEntries :: (HasCallStack, MonadIO m) => OptionGroup -> OptionEntry -> m ()

-- | Frees a OptionGroup. Note that you must not free groups which
--   have been added to a OptionContext.
--   
--   Since: 2.6

-- | Deprecated: (Since version 2.44)Use optionGroupUnref
--   instead.
optionGroupFree :: (HasCallStack, MonadIO m) => OptionGroup -> m ()

-- | Creates a new OptionGroup.
--   
--   Since: 2.6
optionGroupNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> Ptr () -> Maybe DestroyNotify -> m OptionGroup

-- | Increments the reference count of group by one.
--   
--   Since: 2.44
optionGroupRef :: (HasCallStack, MonadIO m) => OptionGroup -> m OptionGroup

-- | Sets the function which is used to translate user-visible strings, for
--   --help output. Different groups can use different
--   GTranslateFuncs. If func is
--   Nothing, strings are not translated.
--   
--   If you are using gettext(), you only need to set the
--   translation domain, see optionGroupSetTranslationDomain.
--   
--   Since: 2.6
optionGroupSetTranslateFunc :: (HasCallStack, MonadIO m) => OptionGroup -> Maybe TranslateFunc -> m ()

-- | A convenience function to use gettext() for
--   translating user-visible strings.
--   
--   Since: 2.6
optionGroupSetTranslationDomain :: (HasCallStack, MonadIO m) => OptionGroup -> Text -> m ()

-- | Decrements the reference count of group by one. If the
--   reference count drops to 0, the group will be freed.
--   and all memory allocated by the group is released.
--   
--   Since: 2.44
optionGroupUnref :: (HasCallStack, MonadIO m) => OptionGroup -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.OptionGroup.OptionGroup

-- | A GOptionContext struct defines which options are accepted by
--   the commandline option parser. The struct has only private fields and
--   should not be directly accessed.
module GI.GLib.Structs.OptionContext

-- | Memory-managed wrapper type.
newtype OptionContext
OptionContext :: ManagedPtr OptionContext -> OptionContext

-- | A convenience alias for Nothing :: Maybe
--   OptionContext.
noOptionContext :: Maybe OptionContext

-- | Adds a OptionGroup to the context, so that
--   parsing with context will recognize the options in the
--   group. Note that this will take ownership of the group
--   and thus the group should not be freed.
--   
--   Since: 2.6
optionContextAddGroup :: (HasCallStack, MonadIO m) => OptionContext -> OptionGroup -> m ()

-- | A convenience function which creates a main group if it doesn't exist,
--   adds the entries to it and sets the translation
--   domain.
--   
--   Since: 2.6
optionContextAddMainEntries :: (HasCallStack, MonadIO m) => OptionContext -> OptionEntry -> Maybe Text -> m ()

-- | Frees context and all the groups which have been added to it.
--   
--   Please note that parsed arguments need to be freed separately (see
--   OptionEntry).
--   
--   Since: 2.6
optionContextFree :: (HasCallStack, MonadIO m) => OptionContext -> m ()

-- | Returns the description. See optionContextSetDescription.
--   
--   Since: 2.12
optionContextGetDescription :: (HasCallStack, MonadIO m) => OptionContext -> m Text

-- | Returns a formatted, translated help text for the given context. To
--   obtain the text produced by --help, call
--   g_option_context_get_help (context, TRUE, NULL). To obtain
--   the text produced by --help-all, call
--   g_option_context_get_help (context, FALSE, NULL). To obtain
--   the help text for an option group, call g_option_context_get_help
--   (context, FALSE, group).
--   
--   Since: 2.14
optionContextGetHelp :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> Maybe OptionGroup -> m Text

-- | Returns whether automatic --help generation is turned on for
--   context. See optionContextSetHelpEnabled.
--   
--   Since: 2.6
optionContextGetHelpEnabled :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns whether unknown options are ignored or not. See
--   optionContextSetIgnoreUnknownOptions.
--   
--   Since: 2.6
optionContextGetIgnoreUnknownOptions :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns a pointer to the main group of context.
--   
--   Since: 2.6
optionContextGetMainGroup :: (HasCallStack, MonadIO m) => OptionContext -> m OptionGroup

-- | Returns whether strict POSIX code is enabled.
--   
--   See optionContextSetStrictPosix for more information.
--   
--   Since: 2.44
optionContextGetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns the summary. See optionContextSetSummary.
--   
--   Since: 2.12
optionContextGetSummary :: (HasCallStack, MonadIO m) => OptionContext -> m Text

-- | Parses the command line arguments, recognizing options which have been
--   added to context. A side-effect of calling this
--   function is that setPrgname will be called.
--   
--   If the parsing is successful, any parsed arguments are removed from
--   the array and argc and argv are
--   updated accordingly. A '--' option is stripped from
--   argv unless there are unparsed options before and
--   after it, or some of the options after it start with '-'. In case of
--   an error, argc and argv are left
--   unmodified.
--   
--   If automatic --help support is enabled (see
--   optionContextSetHelpEnabled), and the argv
--   array contains one of the recognized help options, this function will
--   produce help output to stdout and call exit (0).
--   
--   Note that function depends on the [current locale][setlocale] for
--   automatic character set conversion of string and filename arguments.
--   
--   Since: 2.6
optionContextParse :: (HasCallStack, MonadIO m) => OptionContext -> Maybe [Text] -> m (Maybe [Text])

-- | Parses the command line arguments.
--   
--   This function is similar to optionContextParse except that it
--   respects the normal memory rules when dealing with a strv instead of
--   assuming that the passed-in array is the argv of the main function.
--   
--   In particular, strings that are removed from the arguments list will
--   be freed using free.
--   
--   On Windows, the strings are expected to be in UTF-8. This is in
--   contrast to optionContextParse which expects them to be in the
--   system codepage, which is how they are passed as argv
--   to main(). See
--   g_win32_get_command_line() for a solution.
--   
--   This function is useful if you are trying to use OptionContext
--   with GApplication.
--   
--   Since: 2.40
optionContextParseStrv :: (HasCallStack, MonadIO m) => OptionContext -> [Text] -> m [Text]

-- | Adds a string to be displayed in --help output after the list
--   of options. This text often includes a bug reporting address.
--   
--   Note that the summary is translated (see
--   optionContextSetTranslateFunc).
--   
--   Since: 2.12
optionContextSetDescription :: (HasCallStack, MonadIO m) => OptionContext -> Maybe Text -> m ()

-- | Enables or disables automatic generation of --help output. By
--   default, optionContextParse recognizes --help,
--   -h, -?, --help-all and
--   --help-groupname and creates suitable output to stdout.
--   
--   Since: 2.6
optionContextSetHelpEnabled :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()

-- | Sets whether to ignore unknown options or not. If an argument is
--   ignored, it is left in the argv array after parsing.
--   By default, optionContextParse treats unknown options as error.
--   
--   This setting does not affect non-option arguments (i.e. arguments
--   which don't start with a dash). But note that GOption cannot reliably
--   determine whether a non-option belongs to a preceding unknown option.
--   
--   Since: 2.6
optionContextSetIgnoreUnknownOptions :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()

-- | Sets a OptionGroup as main group of the
--   context. This has the same effect as calling
--   optionContextAddGroup, the only difference is that the options
--   in the main group are treated differently when generating
--   --help output.
--   
--   Since: 2.6
optionContextSetMainGroup :: (HasCallStack, MonadIO m) => OptionContext -> OptionGroup -> m ()

-- | Sets strict POSIX mode.
--   
--   By default, this mode is disabled.
--   
--   In strict POSIX mode, the first non-argument parameter encountered
--   (eg: filename) terminates argument processing. Remaining arguments are
--   treated as non-options and are not attempted to be parsed.
--   
--   If strict POSIX mode is disabled then parsing is done in the GNU way
--   where option arguments can be freely mixed with non-options.
--   
--   As an example, consider "ls foo -l". With GNU style parsing, this will
--   list "foo" in long mode. In strict POSIX style, this will list the
--   files named "foo" and "-l".
--   
--   It may be useful to force strict POSIX mode when creating "verb style"
--   command line tools. For example, the "gsettings" command line tool
--   supports the global option "--schemadir" as well as many subcommands
--   ("get", "set", etc.) which each have their own set of arguments. Using
--   strict POSIX mode will allow parsing the global options up to the verb
--   name while leaving the remaining options to be parsed by the relevant
--   subcommand (which can be determined by examining the verb name, which
--   should be present in argv[1] after parsing).
--   
--   Since: 2.44
optionContextSetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()

-- | Adds a string to be displayed in --help output before the
--   list of options. This is typically a summary of the program
--   functionality.
--   
--   Note that the summary is translated (see
--   optionContextSetTranslateFunc and
--   optionContextSetTranslationDomain).
--   
--   Since: 2.12
optionContextSetSummary :: (HasCallStack, MonadIO m) => OptionContext -> Maybe Text -> m ()

-- | Sets the function which is used to translate the contexts user-visible
--   strings, for --help output. If func is
--   Nothing, strings are not translated.
--   
--   Note that option groups have their own translation functions, this
--   function only affects the parameterString (see
--   g_option_context_new()), the summary (see
--   optionContextSetSummary) and the description (see
--   optionContextSetDescription).
--   
--   If you are using gettext(), you only need to set the
--   translation domain, see optionContextSetTranslationDomain.
--   
--   Since: 2.12
optionContextSetTranslateFunc :: (HasCallStack, MonadIO m) => OptionContext -> Maybe TranslateFunc -> m ()

-- | A convenience function to use gettext() for
--   translating user-visible strings.
--   
--   Since: 2.12
optionContextSetTranslationDomain :: (HasCallStack, MonadIO m) => OptionContext -> Text -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.OptionContext.OptionContext

-- | A set of functions used to perform memory allocation. The same
--   MemVTable must be used for all allocations in the same program;
--   a call to memSetVtable, if it exists, should be prior to any
--   use of GLib.
--   
--   This functions related to this has been deprecated in 2.46, and no
--   longer work.
module GI.GLib.Structs.MemVTable

-- | Memory-managed wrapper type.
newtype MemVTable
MemVTable :: ManagedPtr MemVTable -> MemVTable

-- | Construct a MemVTable struct initialized to zero.
newZeroMemVTable :: MonadIO m => m MemVTable

-- | A convenience alias for Nothing :: Maybe
--   MemVTable.
noMemVTable :: Maybe MemVTable

-- | Set the value of the “calloc” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #calloc
--   
clearMemVTableCalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “calloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get memVTable #calloc
--   
getMemVTableCalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableCallocFieldCallback)

-- | Set the value of the “calloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set memVTable [ #calloc := value ]
--   
setMemVTableCalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableCallocFieldCallback -> m ()

-- | Set the value of the “free” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #free
--   
clearMemVTableFree :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “free” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get memVTable #free
--   
getMemVTableFree :: MonadIO m => MemVTable -> m (Maybe MemVTableFreeFieldCallback)

-- | Set the value of the “free” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set memVTable [ #free := value ]
--   
setMemVTableFree :: MonadIO m => MemVTable -> FunPtr C_MemVTableFreeFieldCallback -> m ()

-- | Set the value of the “malloc” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #malloc
--   
clearMemVTableMalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “malloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get memVTable #malloc
--   
getMemVTableMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableMallocFieldCallback)

-- | Set the value of the “malloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set memVTable [ #malloc := value ]
--   
setMemVTableMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableMallocFieldCallback -> m ()

-- | Set the value of the “realloc” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #realloc
--   
clearMemVTableRealloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “realloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get memVTable #realloc
--   
getMemVTableRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableReallocFieldCallback)

-- | Set the value of the “realloc” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set memVTable [ #realloc := value ]
--   
setMemVTableRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableReallocFieldCallback -> m ()

-- | Set the value of the “try_malloc” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #tryMalloc
--   
clearMemVTableTryMalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “try_malloc” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get memVTable #tryMalloc
--   
getMemVTableTryMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryMallocFieldCallback)

-- | Set the value of the “try_malloc” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set memVTable [ #tryMalloc := value ]
--   
setMemVTableTryMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryMallocFieldCallback -> m ()

-- | Set the value of the “try_realloc” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #tryRealloc
--   
clearMemVTableTryRealloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “try_realloc” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get memVTable #tryRealloc
--   
getMemVTableTryRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryReallocFieldCallback)

-- | Set the value of the “try_realloc” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set memVTable [ #tryRealloc := value ]
--   
setMemVTableTryRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryReallocFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.MemVTable.MemVTable
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.MemVTable.MemVTable tag

-- | Any of the fields in MarkupParser can be Nothing, in
--   which case they will be ignored. Except for the error
--   function, any of these callbacks can set an error; in particular the
--   MarkupErrorUnknownElement, MarkupErrorUnknownAttribute,
--   and MarkupErrorInvalidContent errors are intended to be set
--   from these callbacks. If you set an error from a callback,
--   markupParseContextParse will report that error back to its
--   caller.
module GI.GLib.Structs.MarkupParser

-- | Memory-managed wrapper type.
newtype MarkupParser
MarkupParser :: ManagedPtr MarkupParser -> MarkupParser

-- | Construct a MarkupParser struct initialized to zero.
newZeroMarkupParser :: MonadIO m => m MarkupParser

-- | A convenience alias for Nothing :: Maybe
--   MarkupParser.
noMarkupParser :: Maybe MarkupParser

-- | Set the value of the “end_element” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #endElement
--   
clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “end_element” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get markupParser #endElement
--   
getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)

-- | Set the value of the “end_element” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set markupParser [ #endElement := value ]
--   
setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserEndElementFieldCallback -> m ()

-- | Set the value of the “error” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #error
--   
clearMarkupParserError :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “error” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get markupParser #error
--   
getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)

-- | Set the value of the “error” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set markupParser [ #error := value ]
--   
setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m ()

-- | Set the value of the “passthrough” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #passthrough
--   
clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “passthrough” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get markupParser #passthrough
--   
getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe MarkupParserPassthroughFieldCallback_WithClosures)

-- | Set the value of the “passthrough” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set markupParser [ #passthrough := value ]
--   
setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserPassthroughFieldCallback -> m ()

-- | Set the value of the “start_element” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #startElement
--   
clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “start_element” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get markupParser #startElement
--   
getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)

-- | Set the value of the “start_element” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set markupParser [ #startElement := value ]
--   
setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserStartElementFieldCallback -> m ()

-- | Set the value of the “text” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #text
--   
clearMarkupParserText :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “text” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get markupParser #text
--   
getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe MarkupParserTextFieldCallback_WithClosures)

-- | Set the value of the “text” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set markupParser [ #text := value ]
--   
setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.MarkupParser.MarkupParser
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.MarkupParser.MarkupParser tag

-- | A parse context is used to parse a stream of bytes that you expect to
--   contain marked-up text.
--   
--   See markupParseContextNew, MarkupParser, and so on for
--   more details.
module GI.GLib.Structs.MarkupParseContext

-- | Memory-managed wrapper type.
newtype MarkupParseContext
MarkupParseContext :: ManagedPtr MarkupParseContext -> MarkupParseContext

-- | A convenience alias for Nothing :: Maybe
--   MarkupParseContext.
noMarkupParseContext :: Maybe MarkupParseContext

-- | Signals to the MarkupParseContext that all data has been fed
--   into the parse context with markupParseContextParse.
--   
--   This function reports an error if the document isn't complete, for
--   example if elements are still open.
markupParseContextEndParse :: (HasCallStack, MonadIO m) => MarkupParseContext -> m ()

-- | Frees a MarkupParseContext.
--   
--   This function can't be called from inside one of the
--   MarkupParser functions or while a subparser is pushed.
markupParseContextFree :: (HasCallStack, MonadIO m) => MarkupParseContext -> m ()

-- | Retrieves the name of the currently open element.
--   
--   If called from the start_element or end_element handlers this will
--   give the element_name as passed to those functions. For the parent
--   elements, see
--   g_markup_parse_context_get_element_stack().
--   
--   Since: 2.2
markupParseContextGetElement :: (HasCallStack, MonadIO m) => MarkupParseContext -> m Text

-- | Returns the user_data associated with context.
--   
--   This will either be the user_data that was provided to
--   markupParseContextNew or to the most recent call of
--   markupParseContextPush.
--   
--   Since: 2.18
markupParseContextGetUserData :: (HasCallStack, MonadIO m) => MarkupParseContext -> m (Ptr ())

-- | Creates a new parse context. A parse context is used to parse
--   marked-up documents. You can feed any number of documents into a
--   context, as long as no errors occur; once an error occurs, the parse
--   context can't continue to parse text (you have to free it and create a
--   new parse context).
markupParseContextNew :: (HasCallStack, MonadIO m) => MarkupParser -> [MarkupParseFlags] -> Ptr () -> DestroyNotify -> m MarkupParseContext

-- | Feed some data to the MarkupParseContext.
--   
--   The data need not be valid UTF-8; an error will be signaled if it's
--   invalid. The data need not be an entire document; you can feed a
--   document into the parser incrementally, via multiple calls to this
--   function. Typically, as you receive data from a network connection or
--   file, you feed each received chunk of data into this function,
--   aborting the process if an error occurs. Once an error is reported, no
--   further data may be fed to the MarkupParseContext; all errors
--   are fatal.
markupParseContextParse :: (HasCallStack, MonadIO m) => MarkupParseContext -> Text -> Int64 -> m ()

-- | Completes the process of a temporary sub-parser redirection.
--   
--   This function exists to collect the user_data allocated by a matching
--   call to markupParseContextPush. It must be called in the
--   end_element handler corresponding to the start_element handler during
--   which markupParseContextPush was called. You must not call this
--   function from the error callback -- the userData is
--   provided directly to the callback in that case.
--   
--   This function is not intended to be directly called by users
--   interested in invoking subparsers. Instead, it is intended to be used
--   by the subparsers themselves to implement a higher-level interface.
--   
--   Since: 2.18
markupParseContextPop :: (HasCallStack, MonadIO m) => MarkupParseContext -> m (Ptr ())

-- | Temporarily redirects markup data to a sub-parser.
--   
--   This function may only be called from the start_element handler of a
--   MarkupParser. It must be matched with a corresponding call to
--   markupParseContextPop in the matching end_element handler
--   (except in the case that the parser aborts due to an error).
--   
--   All tags, text and other data between the matching tags is redirected
--   to the subparser given by parser.
--   userData is used as the user_data for that parser.
--   userData is also passed to the error callback in the
--   event that an error occurs. This includes errors that occur in
--   subparsers of the subparser.
--   
--   The end tag matching the start tag for which this call was made is
--   handled by the previous parser (which is given its own user_data)
--   which is why markupParseContextPop is provided to allow "one
--   last access" to the userData provided to this
--   function. In the case of error, the userData provided
--   here is passed directly to the error callback of the subparser and
--   markupParseContextPop should not be called. In either case, if
--   userData was allocated then it ought to be freed from
--   both of these locations.
--   
--   This function is not intended to be directly called by users
--   interested in invoking subparsers. Instead, it is intended to be used
--   by the subparsers themselves to implement a higher-level interface.
--   
--   As an example, see the following implementation of a simple parser
--   that counts the number of tags encountered.
--   
--   
C code
--   
--   
--   typedef struct
--   {
--     gint tag_count;
--   } CounterData;
--   
--   static void
--   counter_start_element (GMarkupParseContext  *context,
--                          const gchar          *element_name,
--                          const gchar         **attribute_names,
--                          const gchar         **attribute_values,
--                          gpointer              user_data,
--                          GError              **error)
--   {
--     CounterData *data = user_data;
--   
--     data->tag_count++;
--   }
--   
--   static void
--   counter_error (GMarkupParseContext *context,
--                  GError              *error,
--                  gpointer             user_data)
--   {
--     CounterData *data = user_data;
--   
--     g_slice_free (CounterData, data);
--   }
--   
--   static GMarkupParser counter_subparser =
--   {
--     counter_start_element,
--     NULL,
--     NULL,
--     NULL,
--     counter_error
--   };
--   
--   
--   In order to allow this parser to be easily used as a subparser, the
--   following interface is provided:
--   
--   
C code
--   
--   
--   void
--   start_counting (GMarkupParseContext *context)
--   {
--     CounterData *data = g_slice_new (CounterData);
--   
--     data->tag_count = 0;
--     g_markup_parse_context_push (context, &counter_subparser, data);
--   }
--   
--   gint
--   end_counting (GMarkupParseContext *context)
--   {
--     CounterData *data = g_markup_parse_context_pop (context);
--     int result;
--   
--     result = data->tag_count;
--     g_slice_free (CounterData, data);
--   
--     return result;
--   }
--   
--   
--   The subparser would then be used as follows:
--   
--   
C code
--   
--   
--   static void start_element (context, element_name, ...)
--   {
--     if (strcmp (element_name, "count-these") == 0)
--       start_counting (context);
--   
--     // else, handle other tags...
--   }
--   
--   static void end_element (context, element_name, ...)
--   {
--     if (strcmp (element_name, "count-these") == 0)
--       g_print ("Counted %d tags\n", end_counting (context));
--   
--     // else, handle other tags...
--   }
--   
--   
--   Since: 2.18
markupParseContextPush :: (HasCallStack, MonadIO m) => MarkupParseContext -> MarkupParser -> Ptr () -> m ()

-- | Increases the reference count of context.
--   
--   Since: 2.36
markupParseContextRef :: (HasCallStack, MonadIO m) => MarkupParseContext -> m MarkupParseContext

-- | Decreases the reference count of context. When its
--   reference count drops to 0, it is freed.
--   
--   Since: 2.36
markupParseContextUnref :: (HasCallStack, MonadIO m) => MarkupParseContext -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.MarkupParseContext.MarkupParseContext

-- | A table of functions used to handle different types of
--   IOChannel in a generic way.
module GI.GLib.Structs.IOFuncs

-- | Memory-managed wrapper type.
newtype IOFuncs
IOFuncs :: ManagedPtr IOFuncs -> IOFuncs

-- | Construct a IOFuncs struct initialized to zero.
newZeroIOFuncs :: MonadIO m => m IOFuncs

-- | A convenience alias for Nothing :: Maybe IOFuncs.
noIOFuncs :: Maybe IOFuncs

-- | Set the value of the “io_close” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ioClose
--   
clearIOFuncsIoClose :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_close” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioClose
--   
getIOFuncsIoClose :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCloseFieldCallback)

-- | Set the value of the “io_close” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioClose := value ]
--   
setIOFuncsIoClose :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCloseFieldCallback -> m ()

-- | Set the value of the “io_create_watch” field to
--   Nothing. When overloading is enabled, this is equivalent
--   to
--   
--   
--   clear #ioCreateWatch
--   
clearIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_create_watch” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioCreateWatch
--   
getIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCreateWatchFieldCallback)

-- | Set the value of the “io_create_watch” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioCreateWatch := value ]
--   
setIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCreateWatchFieldCallback -> m ()

-- | Set the value of the “io_free” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ioFree
--   
clearIOFuncsIoFree :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_free” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioFree
--   
getIOFuncsIoFree :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoFreeFieldCallback)

-- | Set the value of the “io_free” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioFree := value ]
--   
setIOFuncsIoFree :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoFreeFieldCallback -> m ()

-- | Set the value of the “io_get_flags” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #ioGetFlags
--   
clearIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_get_flags” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioGetFlags
--   
getIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoGetFlagsFieldCallback)

-- | Set the value of the “io_get_flags” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioGetFlags := value ]
--   
setIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoGetFlagsFieldCallback -> m ()

-- | Set the value of the “io_read” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ioRead
--   
clearIOFuncsIoRead :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_read” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioRead
--   
getIOFuncsIoRead :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoReadFieldCallback)

-- | Set the value of the “io_read” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioRead := value ]
--   
setIOFuncsIoRead :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoReadFieldCallback -> m ()

-- | Set the value of the “io_seek” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ioSeek
--   
clearIOFuncsIoSeek :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_seek” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioSeek
--   
getIOFuncsIoSeek :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSeekFieldCallback)

-- | Set the value of the “io_seek” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioSeek := value ]
--   
setIOFuncsIoSeek :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSeekFieldCallback -> m ()

-- | Set the value of the “io_set_flags” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #ioSetFlags
--   
clearIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_set_flags” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioSetFlags
--   
getIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSetFlagsFieldCallback)

-- | Set the value of the “io_set_flags” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioSetFlags := value ]
--   
setIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSetFlagsFieldCallback -> m ()

-- | Set the value of the “io_write” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #ioWrite
--   
clearIOFuncsIoWrite :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “io_write” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get iOFuncs #ioWrite
--   
getIOFuncsIoWrite :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoWriteFieldCallback)

-- | Set the value of the “io_write” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set iOFuncs [ #ioWrite := value ]
--   
setIOFuncsIoWrite :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoWriteFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.IOFuncs.IOFuncs
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.IOFuncs.IOFuncs tag

-- | The HookList struct represents a list of hook functions.
module GI.GLib.Structs.HookList

-- | Memory-managed wrapper type.
newtype HookList
HookList :: ManagedPtr HookList -> HookList

-- | Construct a HookList struct initialized to zero.
newZeroHookList :: MonadIO m => m HookList

-- | A convenience alias for Nothing :: Maybe
--   HookList.
noHookList :: Maybe HookList

-- | Removes all the Hook elements from a HookList.
hookListClear :: (HasCallStack, MonadIO m) => HookList -> m ()

-- | Initializes a HookList. This must be called before the
--   HookList is used.
hookListInit :: (HasCallStack, MonadIO m) => HookList -> Word32 -> m ()

-- | Calls all of the Hook functions in a HookList.
hookListInvoke :: (HasCallStack, MonadIO m) => HookList -> Bool -> m ()

-- | Calls all of the Hook functions in a HookList. Any
--   function which returns False is removed from the
--   HookList.
hookListInvokeCheck :: (HasCallStack, MonadIO m) => HookList -> Bool -> m ()

-- | Set the value of the “dummy3” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #dummy3
--   
clearHookListDummy3 :: MonadIO m => HookList -> m ()

-- | Get the value of the “dummy3” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hookList #dummy3
--   
getHookListDummy3 :: MonadIO m => HookList -> m (Ptr ())

-- | Set the value of the “dummy3” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hookList [ #dummy3 := value ]
--   
setHookListDummy3 :: MonadIO m => HookList -> Ptr () -> m ()

-- | Set the value of the “finalize_hook” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #finalizeHook
--   
clearHookListFinalizeHook :: MonadIO m => HookList -> m ()

-- | Get the value of the “finalize_hook” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get hookList #finalizeHook
--   
getHookListFinalizeHook :: MonadIO m => HookList -> m (Maybe HookFinalizeFunc)

-- | Set the value of the “finalize_hook” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set hookList [ #finalizeHook := value ]
--   
setHookListFinalizeHook :: MonadIO m => HookList -> FunPtr C_HookFinalizeFunc -> m ()

-- | Get the value of the “hook_size” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get hookList #hookSize
--   
getHookListHookSize :: MonadIO m => HookList -> m Word32

-- | Set the value of the “hook_size” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set hookList [ #hookSize := value ]
--   
setHookListHookSize :: MonadIO m => HookList -> Word32 -> m ()

-- | Set the value of the “hooks” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #hooks
--   
clearHookListHooks :: MonadIO m => HookList -> m ()

-- | Get the value of the “hooks” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hookList #hooks
--   
getHookListHooks :: MonadIO m => HookList -> m (Maybe Hook)

-- | Set the value of the “hooks” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hookList [ #hooks := value ]
--   
setHookListHooks :: MonadIO m => HookList -> Ptr Hook -> m ()

-- | Get the value of the “is_setup” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get hookList #isSetup
--   
getHookListIsSetup :: MonadIO m => HookList -> m Word32

-- | Set the value of the “is_setup” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set hookList [ #isSetup := value ]
--   
setHookListIsSetup :: MonadIO m => HookList -> Word32 -> m ()

-- | Get the value of the “seq_id” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hookList #seqId
--   
getHookListSeqId :: MonadIO m => HookList -> m CULong

-- | Set the value of the “seq_id” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hookList [ #seqId := value ]
--   
setHookListSeqId :: MonadIO m => HookList -> CULong -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.HookList.HookList
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.HookList.HookList tag

-- | The Hook struct represents a single hook function in a
--   HookList.
module GI.GLib.Structs.Hook

-- | Memory-managed wrapper type.
newtype Hook
Hook :: ManagedPtr Hook -> Hook

-- | Construct a Hook struct initialized to zero.
newZeroHook :: MonadIO m => m Hook

-- | A convenience alias for Nothing :: Maybe Hook.
noHook :: Maybe Hook

-- | Compares the ids of two Hook elements, returning a negative
--   value if the second id is greater than the first.
hookCompareIds :: (HasCallStack, MonadIO m) => Hook -> Hook -> m Int32

-- | Destroys a Hook, given its ID.
hookDestroy :: (HasCallStack, MonadIO m) => HookList -> CULong -> m Bool

-- | Removes one Hook from a HookList, marking it inactive
--   and calling hookUnref on it.
hookDestroyLink :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Calls the HookList finalizeHook function if it
--   exists, and frees the memory allocated for the Hook.
hookFree :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Inserts a Hook into a HookList, before a given
--   Hook.
hookInsertBefore :: (HasCallStack, MonadIO m) => HookList -> Maybe Hook -> Hook -> m ()

-- | Prepends a Hook on the start of a HookList.
hookPrepend :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Decrements the reference count of a Hook. If the reference
--   count falls to 0, the Hook is removed from the HookList
--   and hookFree is called to free it.
hookUnref :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Set the value of the “data” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #data
--   
clearHookData :: MonadIO m => Hook -> m ()

-- | Get the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get hook #data
--   
getHookData :: MonadIO m => Hook -> m (Ptr ())

-- | Set the value of the “data” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set hook [ #data := value ]
--   
setHookData :: MonadIO m => Hook -> Ptr () -> m ()

-- | Set the value of the “destroy” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #destroy
--   
clearHookDestroy :: MonadIO m => Hook -> m ()

-- | Get the value of the “destroy” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hook #destroy
--   
getHookDestroy :: MonadIO m => Hook -> m (Maybe DestroyNotify)

-- | Set the value of the “destroy” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hook [ #destroy := value ]
--   
setHookDestroy :: MonadIO m => Hook -> FunPtr C_DestroyNotify -> m ()

-- | Get the value of the “flags” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hook #flags
--   
getHookFlags :: MonadIO m => Hook -> m Word32

-- | Set the value of the “flags” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hook [ #flags := value ]
--   
setHookFlags :: MonadIO m => Hook -> Word32 -> m ()

-- | Set the value of the “func” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #func
--   
clearHookFunc :: MonadIO m => Hook -> m ()

-- | Get the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get hook #func
--   
getHookFunc :: MonadIO m => Hook -> m (Ptr ())

-- | Set the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set hook [ #func := value ]
--   
setHookFunc :: MonadIO m => Hook -> Ptr () -> m ()

-- | Get the value of the “hook_id” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get hook #hookId
--   
getHookHookId :: MonadIO m => Hook -> m CULong

-- | Set the value of the “hook_id” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set hook [ #hookId := value ]
--   
setHookHookId :: MonadIO m => Hook -> CULong -> m ()

-- | Set the value of the “next” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #next
--   
clearHookNext :: MonadIO m => Hook -> m ()

-- | Get the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get hook #next
--   
getHookNext :: MonadIO m => Hook -> m (Maybe Hook)

-- | Set the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set hook [ #next := value ]
--   
setHookNext :: MonadIO m => Hook -> Ptr Hook -> m ()

-- | Set the value of the “prev” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #prev
--   
clearHookPrev :: MonadIO m => Hook -> m ()

-- | Get the value of the “prev” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get hook #prev
--   
getHookPrev :: MonadIO m => Hook -> m (Maybe Hook)

-- | Set the value of the “prev” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set hook [ #prev := value ]
--   
setHookPrev :: MonadIO m => Hook -> Ptr Hook -> m ()

-- | Get the value of the “ref_count” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get hook #refCount
--   
getHookRefCount :: MonadIO m => Hook -> m Word32

-- | Set the value of the “ref_count” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set hook [ #refCount := value ]
--   
setHookRefCount :: MonadIO m => Hook -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Hook.Hook
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Hook.Hook tag

-- | The GString struct contains the public fields of a GString.
module GI.GLib.Structs.String

-- | Memory-managed wrapper type.
newtype String
String :: ManagedPtr String -> String

-- | Construct a String struct initialized to zero.
newZeroString :: MonadIO m => m String

-- | A convenience alias for Nothing :: Maybe String.
noString :: Maybe String

-- | Adds a string onto the end of a String, expanding it if
--   necessary.
stringAppend :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Adds a byte onto the end of a String, expanding it if
--   necessary.
stringAppendC :: (HasCallStack, MonadIO m) => String -> Int8 -> m String

-- | Appends len bytes of val to
--   string.
--   
--   If len is positive, val may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that val has at least
--   len addressable bytes.
--   
--   If len is negative, val must be
--   nul-terminated and len is considered to request the
--   entire string length. This makes stringAppendLen equivalent to
--   stringAppend.
stringAppendLen :: (HasCallStack, MonadIO m) => String -> Text -> Int64 -> m String

-- | Converts a Unicode character into UTF-8, and appends it to the string.
stringAppendUnichar :: (HasCallStack, MonadIO m) => String -> Char -> m String

-- | Appends unescaped to string, escaped
--   any characters that are reserved in URIs using URI-style escape
--   sequences.
--   
--   Since: 2.16
stringAppendUriEscaped :: (HasCallStack, MonadIO m) => String -> Text -> Text -> Bool -> m String

-- | Converts all uppercase ASCII letters to lowercase ASCII letters.
stringAsciiDown :: (HasCallStack, MonadIO m) => String -> m String

-- | Converts all lowercase ASCII letters to uppercase ASCII letters.
stringAsciiUp :: (HasCallStack, MonadIO m) => String -> m String

-- | Copies the bytes from a string into a String, destroying any
--   previous contents. It is rather like the standard
--   strcpy() function, except that you do not have to
--   worry about having enough space to copy the string.
stringAssign :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Converts a String to lowercase.

-- | Deprecated: (Since version 2.2)This function uses the
--   locale-specific tolower() function, which is almost
--   never the right thing. Use stringAsciiDown or
--   utf8Strdown instead.
stringDown :: (HasCallStack, MonadIO m) => String -> m String

-- | Compares two strings for equality, returning True if they are
--   equal. For use with HashTable.
stringEqual :: (HasCallStack, MonadIO m) => String -> String -> m Bool

-- | Removes len bytes from a String, starting at
--   position pos. The rest of the String is shifted
--   down to fill the gap.
stringErase :: (HasCallStack, MonadIO m) => String -> Int64 -> Int64 -> m String

-- | Frees the memory allocated for the String. If
--   freeSegment is True it also frees the character
--   data. If it's False, the caller gains ownership of the buffer
--   and must free it after use with free.
stringFree :: (HasCallStack, MonadIO m) => String -> Bool -> m (Maybe Text)

-- | Transfers ownership of the contents of string to a
--   newly allocated Bytes. The String structure itself is
--   deallocated, and it is therefore invalid to use string
--   after invoking this function.
--   
--   Note that while String ensures that its buffer always has a
--   trailing nul character (not reflected in its "len"), the returned
--   Bytes does not include this extra nul; i.e. it has length
--   exactly equal to the "len" member.
--   
--   Since: 2.34
stringFreeToBytes :: (HasCallStack, MonadIO m) => String -> m Bytes

-- | Creates a hash code for str; for use with
--   HashTable.
stringHash :: (HasCallStack, MonadIO m) => String -> m Word32

-- | Inserts a copy of a string into a String, expanding it if
--   necessary.
stringInsert :: (HasCallStack, MonadIO m) => String -> Int64 -> Text -> m String

-- | Inserts a byte into a String, expanding it if necessary.
stringInsertC :: (HasCallStack, MonadIO m) => String -> Int64 -> Int8 -> m String

-- | Inserts len bytes of val into
--   string at pos.
--   
--   If len is positive, val may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that val has at least
--   len addressable bytes.
--   
--   If len is negative, val must be
--   nul-terminated and len is considered to request the
--   entire string length.
--   
--   If pos is -1, bytes are inserted at the end of the
--   string.
stringInsertLen :: (HasCallStack, MonadIO m) => String -> Int64 -> Text -> Int64 -> m String

-- | Converts a Unicode character into UTF-8, and insert it into the string
--   at the given position.
stringInsertUnichar :: (HasCallStack, MonadIO m) => String -> Int64 -> Char -> m String

-- | Overwrites part of a string, lengthening it if necessary.
--   
--   Since: 2.14
stringOverwrite :: (HasCallStack, MonadIO m) => String -> Word64 -> Text -> m String

-- | Overwrites part of a string, lengthening it if necessary. This
--   function will work with embedded nuls.
--   
--   Since: 2.14
stringOverwriteLen :: (HasCallStack, MonadIO m) => String -> Word64 -> Text -> Int64 -> m String

-- | Adds a string on to the start of a String, expanding it if
--   necessary.
stringPrepend :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Adds a byte onto the start of a String, expanding it if
--   necessary.
stringPrependC :: (HasCallStack, MonadIO m) => String -> Int8 -> m String

-- | Prepends len bytes of val to
--   string.
--   
--   If len is positive, val may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that val has at least
--   len addressable bytes.
--   
--   If len is negative, val must be
--   nul-terminated and len is considered to request the
--   entire string length. This makes stringPrependLen equivalent to
--   stringPrepend.
stringPrependLen :: (HasCallStack, MonadIO m) => String -> Text -> Int64 -> m String

-- | Converts a Unicode character into UTF-8, and prepends it to the
--   string.
stringPrependUnichar :: (HasCallStack, MonadIO m) => String -> Char -> m String

-- | Sets the length of a String. If the length is less than the
--   current length, the string will be truncated. If the length is greater
--   than the current length, the contents of the newly added area are
--   undefined. (However, as always, string->str[string->len] will be
--   a nul byte.)
stringSetSize :: (HasCallStack, MonadIO m) => String -> Word64 -> m String

-- | Cuts off the end of the GString, leaving the first len
--   bytes.
stringTruncate :: (HasCallStack, MonadIO m) => String -> Word64 -> m String

-- | Converts a String to uppercase.

-- | Deprecated: (Since version 2.2)This function uses the
--   locale-specific toupper() function, which is almost
--   never the right thing. Use stringAsciiUp or utf8Strup
--   instead.
stringUp :: (HasCallStack, MonadIO m) => String -> m String

-- | Get the value of the “allocated_len” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get string #allocatedLen
--   
getStringAllocatedLen :: MonadIO m => String -> m Word64

-- | Set the value of the “allocated_len” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set string [ #allocatedLen := value ]
--   
setStringAllocatedLen :: MonadIO m => String -> Word64 -> m ()

-- | Get the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get string #len
--   
getStringLen :: MonadIO m => String -> m Word64

-- | Set the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set string [ #len := value ]
--   
setStringLen :: MonadIO m => String -> Word64 -> m ()

-- | Set the value of the “str” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #str
--   
clearStringStr :: MonadIO m => String -> m ()

-- | Get the value of the “str” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get string #str
--   
getStringStr :: MonadIO m => String -> m (Maybe Text)

-- | Set the value of the “str” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set string [ #str := value ]
--   
setStringStr :: MonadIO m => String -> CString -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.String.String
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.String.String tag

-- | An opaque data structure representing String Chunks. It should only be
--   accessed by using the following functions.
module GI.GLib.Structs.StringChunk

-- | Memory-managed wrapper type.
newtype StringChunk
StringChunk :: ManagedPtr StringChunk -> StringChunk

-- | A convenience alias for Nothing :: Maybe
--   StringChunk.
noStringChunk :: Maybe StringChunk

-- | Frees all strings contained within the StringChunk. After
--   calling stringChunkClear it is not safe to access any of the
--   strings which were contained within it.
--   
--   Since: 2.14
stringChunkClear :: (HasCallStack, MonadIO m) => StringChunk -> m ()

-- | Frees all memory allocated by the StringChunk. After calling
--   stringChunkFree it is not safe to access any of the strings
--   which were contained within it.
stringChunkFree :: (HasCallStack, MonadIO m) => StringChunk -> m ()

-- | Adds a copy of string to the StringChunk. It
--   returns a pointer to the new copy of the string in the
--   StringChunk. The characters in the string can be changed, if
--   necessary, though you should not change anything after the end of the
--   string.
--   
--   Unlike stringChunkInsertConst, this function does not check for
--   duplicates. Also strings added with stringChunkInsert will not
--   be searched by stringChunkInsertConst when looking for
--   duplicates.
stringChunkInsert :: (HasCallStack, MonadIO m) => StringChunk -> Text -> m Text

-- | Adds a copy of string to the StringChunk,
--   unless the same string has already been added to the
--   StringChunk with stringChunkInsertConst.
--   
--   This function is useful if you need to copy a large number of strings
--   but do not want to waste space storing duplicates. But you must
--   remember that there may be several pointers to the same string, and so
--   any changes made to the strings should be done very carefully.
--   
--   Note that stringChunkInsertConst will not return a pointer to a
--   string added with stringChunkInsert, even if they do match.
stringChunkInsertConst :: (HasCallStack, MonadIO m) => StringChunk -> Text -> m Text

-- | Adds a copy of the first len bytes of
--   string to the StringChunk. The copy is
--   nul-terminated.
--   
--   Since this function does not stop at nul bytes, it is the caller's
--   responsibility to ensure that string has at least
--   len addressable bytes.
--   
--   The characters in the returned string can be changed, if necessary,
--   though you should not change anything after the end of the string.
--   
--   Since: 2.4
stringChunkInsertLen :: (HasCallStack, MonadIO m) => StringChunk -> Text -> Int64 -> m Text
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.StringChunk.StringChunk

-- | An opaque structure representing a test case.
module GI.GLib.Structs.TestCase

-- | Memory-managed wrapper type.
newtype TestCase
TestCase :: ManagedPtr TestCase -> TestCase

-- | A convenience alias for Nothing :: Maybe
--   TestCase.
noTestCase :: Maybe TestCase
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TestCase.TestCase

-- | No description available in the introspection data.
module GI.GLib.Structs.TestConfig

-- | Memory-managed wrapper type.
newtype TestConfig
TestConfig :: ManagedPtr TestConfig -> TestConfig

-- | Construct a TestConfig struct initialized to zero.
newZeroTestConfig :: MonadIO m => m TestConfig

-- | A convenience alias for Nothing :: Maybe
--   TestConfig.
noTestConfig :: Maybe TestConfig

-- | Get the value of the “test_initialized” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testInitialized
--   
getTestConfigTestInitialized :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_initialized” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testInitialized := value ]
--   
setTestConfigTestInitialized :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “test_perf” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testPerf
--   
getTestConfigTestPerf :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_perf” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testPerf := value ]
--   
setTestConfigTestPerf :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “test_quick” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testQuick
--   
getTestConfigTestQuick :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_quick” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testQuick := value ]
--   
setTestConfigTestQuick :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “test_quiet” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testQuiet
--   
getTestConfigTestQuiet :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_quiet” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testQuiet := value ]
--   
setTestConfigTestQuiet :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “test_undefined” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testUndefined
--   
getTestConfigTestUndefined :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_undefined” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testUndefined := value ]
--   
setTestConfigTestUndefined :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “test_verbose” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testConfig #testVerbose
--   
getTestConfigTestVerbose :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “test_verbose” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testConfig [ #testVerbose := value ]
--   
setTestConfigTestVerbose :: MonadIO m => TestConfig -> Bool -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TestConfig.TestConfig
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestConfig.TestConfig tag

-- | No description available in the introspection data.
module GI.GLib.Structs.TestLogBuffer

-- | Memory-managed wrapper type.
newtype TestLogBuffer
TestLogBuffer :: ManagedPtr TestLogBuffer -> TestLogBuffer

-- | Construct a TestLogBuffer struct initialized to zero.
newZeroTestLogBuffer :: MonadIO m => m TestLogBuffer

-- | A convenience alias for Nothing :: Maybe
--   TestLogBuffer.
noTestLogBuffer :: Maybe TestLogBuffer

-- | Internal function for gtester to free test log messages, no ABI
--   guarantees provided.
testLogBufferFree :: (HasCallStack, MonadIO m) => TestLogBuffer -> m ()

-- | Internal function for gtester to decode test log messages, no ABI
--   guarantees provided.
testLogBufferPush :: (HasCallStack, MonadIO m) => TestLogBuffer -> Word32 -> Word8 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TestLogBuffer.TestLogBuffer
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestLogBuffer.TestLogBuffer tag

-- | No description available in the introspection data.
module GI.GLib.Structs.TestLogMsg

-- | Memory-managed wrapper type.
newtype TestLogMsg
TestLogMsg :: ManagedPtr TestLogMsg -> TestLogMsg

-- | Construct a TestLogMsg struct initialized to zero.
newZeroTestLogMsg :: MonadIO m => m TestLogMsg

-- | A convenience alias for Nothing :: Maybe
--   TestLogMsg.
noTestLogMsg :: Maybe TestLogMsg

-- | Internal function for gtester to free test log messages, no ABI
--   guarantees provided.
testLogMsgFree :: (HasCallStack, MonadIO m) => TestLogMsg -> m ()

-- | Get the value of the “log_type” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testLogMsg #logType
--   
getTestLogMsgLogType :: MonadIO m => TestLogMsg -> m TestLogType

-- | Set the value of the “log_type” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testLogMsg [ #logType := value ]
--   
setTestLogMsgLogType :: MonadIO m => TestLogMsg -> TestLogType -> m ()

-- | Get the value of the “n_nums” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get testLogMsg #nNums
--   
getTestLogMsgNNums :: MonadIO m => TestLogMsg -> m Word32

-- | Set the value of the “n_nums” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set testLogMsg [ #nNums := value ]
--   
setTestLogMsgNNums :: MonadIO m => TestLogMsg -> Word32 -> m ()

-- | Get the value of the “n_strings” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get testLogMsg #nStrings
--   
getTestLogMsgNStrings :: MonadIO m => TestLogMsg -> m Word32

-- | Set the value of the “n_strings” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set testLogMsg [ #nStrings := value ]
--   
setTestLogMsgNStrings :: MonadIO m => TestLogMsg -> Word32 -> m ()

-- | Set the value of the “strings” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #strings
--   
clearTestLogMsgStrings :: MonadIO m => TestLogMsg -> m ()

-- | Get the value of the “strings” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get testLogMsg #strings
--   
getTestLogMsgStrings :: MonadIO m => TestLogMsg -> m (Maybe Text)

-- | Set the value of the “strings” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set testLogMsg [ #strings := value ]
--   
setTestLogMsgStrings :: MonadIO m => TestLogMsg -> CString -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TestLogMsg.TestLogMsg
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestLogMsg.TestLogMsg tag

-- | An opaque structure representing a test suite.
module GI.GLib.Structs.TestSuite

-- | Memory-managed wrapper type.
newtype TestSuite
TestSuite :: ManagedPtr TestSuite -> TestSuite

-- | A convenience alias for Nothing :: Maybe
--   TestSuite.
noTestSuite :: Maybe TestSuite

-- | Adds testCase to suite.
--   
--   Since: 2.16
testSuiteAdd :: (HasCallStack, MonadIO m) => TestSuite -> TestCase -> m ()

-- | Adds nestedsuite to suite.
--   
--   Since: 2.16
testSuiteAddSuite :: (HasCallStack, MonadIO m) => TestSuite -> TestSuite -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TestSuite.TestSuite

-- | The Thread struct represents a running thread. This struct is
--   returned by g_thread_new() or
--   g_thread_try_new(). You can obtain the Thread
--   struct representing the current thread by calling threadSelf.
--   
--   GThread is refcounted, see threadRef and threadUnref.
--   The thread represented by it holds a reference while it is running,
--   and threadJoin consumes the reference that it is given, so it
--   is normally not necessary to manage GThread references explicitly.
--   
--   The structure is opaque -- none of its fields may be directly
--   accessed.
module GI.GLib.Structs.Thread

-- | Memory-managed wrapper type.
newtype Thread
Thread :: ManagedPtr Thread -> Thread

-- | A convenience alias for Nothing :: Maybe Thread.
noThread :: Maybe Thread

-- | No description available in the introspection data.
threadErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Terminates the current thread.
--   
--   If another thread is waiting for us using threadJoin then the
--   waiting thread will be woken up and get retval as the
--   return value of threadJoin.
--   
--   Calling threadExit with a parameter retval is
--   equivalent to returning retval from the function
--   func, as given to g_thread_new().
--   
--   You must only call threadExit from a thread that you created
--   yourself with g_thread_new() or related APIs. You must
--   not call this function from a thread created with another threading
--   library or or from within a ThreadPool.
threadExit :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Waits until thread finishes, i.e. the function
--   func, as given to g_thread_new(),
--   returns or threadExit is called. If thread has
--   already terminated, then threadJoin returns immediately.
--   
--   Any thread can wait for any other thread by calling threadJoin,
--   not just its 'creator'. Calling threadJoin from multiple
--   threads for the same thread leads to undefined
--   behaviour.
--   
--   The value returned by func or given to
--   threadExit is returned by this function.
--   
--   threadJoin consumes the reference to the passed-in
--   thread. This will usually cause the Thread
--   struct and associated resources to be freed. Use threadRef to
--   obtain an extra reference if you want to keep the GThread alive beyond
--   the threadJoin call.
threadJoin :: (HasCallStack, MonadIO m) => Thread -> m (Ptr ())

-- | Increase the reference count on thread.
--   
--   Since: 2.32
threadRef :: (HasCallStack, MonadIO m) => Thread -> m Thread

-- | This function returns the Thread corresponding to the current
--   thread. Note that this function does not increase the reference count
--   of the returned struct.
--   
--   This function will return a Thread even for threads that were
--   not created by GLib (i.e. those created by other threading APIs). This
--   may be useful for thread identification purposes (i.e. comparisons)
--   but you must not use GLib functions (such as threadJoin) on
--   these threads.
threadSelf :: (HasCallStack, MonadIO m) => m Thread

-- | Decrease the reference count on thread, possibly
--   freeing all resources associated with it.
--   
--   Note that each thread holds a reference to its Thread while it
--   is running, so it is safe to drop your own reference to it if you
--   don't need it anymore.
--   
--   Since: 2.32
threadUnref :: (HasCallStack, MonadIO m) => Thread -> m ()

-- | Causes the calling thread to voluntarily relinquish the CPU, so that
--   other threads can run.
--   
--   This function is often used as a method to make busy wait less evil.
threadYield :: (HasCallStack, MonadIO m) => m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Thread.Thread

-- | The ThreadPool struct represents a thread pool. It has three
--   public read-only members, but the underlying struct is bigger, so you
--   must not copy this struct.
module GI.GLib.Structs.ThreadPool

-- | Memory-managed wrapper type.
newtype ThreadPool
ThreadPool :: ManagedPtr ThreadPool -> ThreadPool

-- | Construct a ThreadPool struct initialized to zero.
newZeroThreadPool :: MonadIO m => m ThreadPool

-- | A convenience alias for Nothing :: Maybe
--   ThreadPool.
noThreadPool :: Maybe ThreadPool

-- | Frees all resources allocated for pool.
--   
--   If immediate is True, no new task is processed
--   for pool. Otherwise pool is not freed
--   before the last task is processed. Note however, that no thread of
--   this pool is interrupted while processing a task. Instead at least all
--   still running threads can finish their tasks before the
--   pool is freed.
--   
--   If wait_ is True, the functions does not return
--   before all tasks to be processed (dependent on
--   immediate, whether all or only the currently running)
--   are ready. Otherwise the function returns immediately.
--   
--   After calling this function pool must not be used
--   anymore.
threadPoolFree :: (HasCallStack, MonadIO m) => ThreadPool -> Bool -> Bool -> m ()

-- | This function will return the maximum interval that a
--   thread will wait in the thread pool for new tasks before being
--   stopped.
--   
--   If this function returns 0, threads waiting in the thread pool for new
--   work are not stopped.
--   
--   Since: 2.10
threadPoolGetMaxIdleTime :: (HasCallStack, MonadIO m) => m Word32

-- | Returns the maximal number of threads for pool.
threadPoolGetMaxThreads :: (HasCallStack, MonadIO m) => ThreadPool -> m Int32

-- | Returns the maximal allowed number of unused threads.
threadPoolGetMaxUnusedThreads :: (HasCallStack, MonadIO m) => m Int32

-- | Returns the number of threads currently running in
--   pool.
threadPoolGetNumThreads :: (HasCallStack, MonadIO m) => ThreadPool -> m Word32

-- | Returns the number of currently unused threads.
threadPoolGetNumUnusedThreads :: (HasCallStack, MonadIO m) => m Word32

-- | Moves the item to the front of the queue of unprocessed items, so that
--   it will be processed next.
--   
--   Since: 2.46
threadPoolMoveToFront :: (HasCallStack, MonadIO m) => ThreadPool -> Ptr () -> m Bool

-- | Inserts data into the list of tasks to be executed by
--   pool.
--   
--   When the number of currently running threads is lower than the maximal
--   allowed number of threads, a new thread is started (or reused) with
--   the properties given to g_thread_pool_new().
--   Otherwise, data stays in the queue until a thread in
--   this pool finishes its previous task and processes
--   data.
--   
--   error can be Nothing to ignore errors, or
--   non-Nothing to report errors. An error can only occur when a
--   new thread couldn't be created. In that case data is
--   simply appended to the queue of work to do.
--   
--   Before version 2.32, this function did not return a success status.
threadPoolPush :: (HasCallStack, MonadIO m) => ThreadPool -> Ptr () -> m ()

-- | This function will set the maximum interval that a
--   thread waiting in the pool for new tasks can be idle for before being
--   stopped. This function is similar to calling
--   threadPoolStopUnusedThreads on a regular timeout, except this
--   is done on a per thread basis.
--   
--   By setting interval to 0, idle threads will not be
--   stopped.
--   
--   The default value is 15000 (15 seconds).
--   
--   Since: 2.10
threadPoolSetMaxIdleTime :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Sets the maximal allowed number of threads for pool. A
--   value of -1 means that the maximal number of threads is unlimited. If
--   pool is an exclusive thread pool, setting the maximal
--   number of threads to -1 is not allowed.
--   
--   Setting maxThreads to 0 means stopping all work for
--   pool. It is effectively frozen until
--   maxThreads is set to a non-zero value again.
--   
--   A thread is never terminated while calling func, as
--   supplied by g_thread_pool_new(). Instead the maximal
--   number of threads only has effect for the allocation of new threads in
--   threadPoolPush. A new thread is allocated, whenever the number
--   of currently running threads in pool is smaller than
--   the maximal number.
--   
--   error can be Nothing to ignore errors, or
--   non-Nothing to report errors. An error can only occur when a
--   new thread couldn't be created.
--   
--   Before version 2.32, this function did not return a success status.
threadPoolSetMaxThreads :: (HasCallStack, MonadIO m) => ThreadPool -> Int32 -> m ()

-- | Sets the maximal number of unused threads to
--   maxThreads. If maxThreads is -1, no
--   limit is imposed on the number of unused threads.
--   
--   The default value is 2.
threadPoolSetMaxUnusedThreads :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Stops all currently unused threads. This does not change the maximal
--   number of unused threads. This function can be used to regularly stop
--   all unused threads e.g. from g_timeout_add().
threadPoolStopUnusedThreads :: (HasCallStack, MonadIO m) => m ()

-- | Returns the number of tasks still unprocessed in pool.
threadPoolUnprocessed :: (HasCallStack, MonadIO m) => ThreadPool -> m Word32

-- | Get the value of the “exclusive” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get threadPool #exclusive
--   
getThreadPoolExclusive :: MonadIO m => ThreadPool -> m Bool

-- | Set the value of the “exclusive” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set threadPool [ #exclusive := value ]
--   
setThreadPoolExclusive :: MonadIO m => ThreadPool -> Bool -> m ()

-- | Set the value of the “func” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #func
--   
clearThreadPoolFunc :: MonadIO m => ThreadPool -> m ()

-- | Get the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get threadPool #func
--   
getThreadPoolFunc :: MonadIO m => ThreadPool -> m (Maybe Func_WithClosures)

-- | Set the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set threadPool [ #func := value ]
--   
setThreadPoolFunc :: MonadIO m => ThreadPool -> FunPtr C_Func -> m ()

-- | Set the value of the “user_data” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #userData
--   
clearThreadPoolUserData :: MonadIO m => ThreadPool -> m ()

-- | Get the value of the “user_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get threadPool #userData
--   
getThreadPoolUserData :: MonadIO m => ThreadPool -> m (Ptr ())

-- | Set the value of the “user_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set threadPool [ #userData := value ]
--   
setThreadPoolUserData :: MonadIO m => ThreadPool -> Ptr () -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.ThreadPool.ThreadPool
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ThreadPool.ThreadPool tag

-- | The GSource struct is an opaque data type representing an
--   event source.
module GI.GLib.Structs.Source

-- | Memory-managed wrapper type.
newtype Source
Source :: ManagedPtr Source -> Source

-- | Construct a Source struct initialized to zero.
newZeroSource :: MonadIO m => m Source

-- | A convenience alias for Nothing :: Maybe Source.
noSource :: Maybe Source

-- | Adds childSource to source as a
--   "polled" source; when source is added to a
--   MainContext, childSource will be automatically
--   added with the same priority, when childSource is
--   triggered, it will cause source to dispatch (in
--   addition to calling its own callback), and when source
--   is destroyed, it will destroy childSource as well.
--   (source will also still be dispatched if its own
--   prepare/check functions indicate that it is ready.)
--   
--   If you don't need childSource to do anything on its
--   own when it triggers, you can call
--   g_source_set_dummy_callback() on it to set a callback
--   that does nothing (except return True if appropriate).
--   
--   source will hold a reference on
--   childSource while childSource is
--   attached to it.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   Since: 2.28
sourceAddChildSource :: (HasCallStack, MonadIO m) => Source -> Source -> m ()

-- | Adds a file descriptor to the set of file descriptors polled for this
--   source. This is usually combined with sourceNew to add an event
--   source. The event source's check function will typically test the
--   revents field in the PollFD struct and return
--   True if events need to be processed.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   Using this API forces the linear scanning of event sources on each
--   main loop iteration. Newly-written event sources should try to use
--   sourceAddUnixFd instead of this API.
sourceAddPoll :: (HasCallStack, MonadIO m) => Source -> PollFD -> m ()

-- | Monitors fd for the IO events in
--   events.
--   
--   The tag returned by this function can be used to remove or modify the
--   monitoring of the fd using sourceRemoveUnixFd or
--   sourceModifyUnixFd.
--   
--   It is not necessary to remove the fd before destroying the source; it
--   will be cleaned up automatically.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   Since: 2.36
sourceAddUnixFd :: (HasCallStack, MonadIO m) => Source -> Int32 -> [IOCondition] -> m (Ptr ())

-- | Adds a Source to a context so that it will be
--   executed within that context. Remove it by calling
--   sourceDestroy.
sourceAttach :: (HasCallStack, MonadIO m) => Source -> Maybe MainContext -> m Word32

-- | Removes a source from its MainContext, if any, and mark it as
--   destroyed. The source cannot be subsequently added to another context.
--   It is safe to call this on sources which have already been removed
--   from their context.
sourceDestroy :: (HasCallStack, MonadIO m) => Source -> m ()

-- | Checks whether a source is allowed to be called recursively. see
--   sourceSetCanRecurse.
sourceGetCanRecurse :: (HasCallStack, MonadIO m) => Source -> m Bool

-- | Gets the MainContext with which the source is associated.
--   
--   You can call this on a source that has been destroyed, provided that
--   the MainContext it was attached to still exists (in which case
--   it will return that MainContext). In particular, you can always
--   call this function on the source returned from
--   mainCurrentSource. But calling this function on a source whose
--   MainContext has been destroyed is an error.
sourceGetContext :: (HasCallStack, MonadIO m) => Source -> m (Maybe MainContext)

-- | This function ignores source and is otherwise the same
--   as getCurrentTime.

-- | Deprecated: (Since version 2.28)use sourceGetTime
--   instead
sourceGetCurrentTime :: (HasCallStack, MonadIO m) => Source -> TimeVal -> m ()

-- | Returns the numeric ID for a particular source. The ID of a source is
--   a positive integer which is unique within a particular main loop
--   context. The reverse mapping from ID to source is done by
--   mainContextFindSourceById.
--   
--   You can only call this function while the source is associated to a
--   MainContext instance; calling this function before
--   sourceAttach or after sourceDestroy yields undefined
--   behavior. The ID returned is unique within the MainContext
--   instance passed to sourceAttach.
sourceGetId :: (HasCallStack, MonadIO m) => Source -> m Word32

-- | Gets a name for the source, used in debugging and profiling. The name
--   may be NULL if it has never been set with
--   sourceSetName.
--   
--   Since: 2.26
sourceGetName :: (HasCallStack, MonadIO m) => Source -> m Text

-- | Gets the priority of a source.
sourceGetPriority :: (HasCallStack, MonadIO m) => Source -> m Int32

-- | Gets the "ready time" of source, as set by
--   sourceSetReadyTime.
--   
--   Any time before the current monotonic time (including 0) is an
--   indication that the source will fire immediately.
sourceGetReadyTime :: (HasCallStack, MonadIO m) => Source -> m Int64

-- | Gets the time to be used when checking this source. The advantage of
--   calling this function over calling getMonotonicTime directly is
--   that when checking multiple sources, GLib can cache a single value
--   instead of having to repeatedly get the system monotonic time.
--   
--   The time here is the system monotonic time, if available, or some
--   other reasonable alternative otherwise. See getMonotonicTime.
--   
--   Since: 2.28
sourceGetTime :: (HasCallStack, MonadIO m) => Source -> m Int64

-- | Returns whether source has been destroyed.
--   
--   This is important when you operate upon your objects from within idle
--   handlers, but may have freed the object before the dispatch of your
--   idle handler.
--   
--   
C code
--   
--   
--   static gboolean
--   idle_callback (gpointer data)
--   {
--     SomeWidget *self = data;
--      
--     GDK_THREADS_ENTER ();
--     // do stuff with self
--     self->idle_id = 0;
--     GDK_THREADS_LEAVE ();
--      
--     return G_SOURCE_REMOVE;
--   }
--    
--   static void
--   some_widget_do_stuff_later (SomeWidget *self)
--   {
--     self->idle_id = g_idle_add (idle_callback, self);
--   }
--    
--   static void
--   some_widget_finalize (GObject *object)
--   {
--     SomeWidget *self = SOME_WIDGET (object);
--      
--     if (self->idle_id)
--       g_source_remove (self->idle_id);
--      
--     G_OBJECT_CLASS (parent_class)->finalize (object);
--   }
--   
--   
--   This will fail in a multi-threaded application if the widget is
--   destroyed before the idle handler fires due to the use after free in
--   the callback. A solution, to this particular problem, is to check to
--   if the source has already been destroy within the callback.
--   
--   
C code
--   
--   
--   static gboolean
--   idle_callback (gpointer data)
--   {
--     SomeWidget *self = data;
--     
--     GDK_THREADS_ENTER ();
--     if (!g_source_is_destroyed (g_main_current_source ()))
--       {
--         // do stuff with self
--       }
--     GDK_THREADS_LEAVE ();
--     
--     return FALSE;
--   }
--   
--   
--   Calls to this function from a thread other than the one acquired by
--   the MainContext the Source is attached to are typically
--   redundant, as the source could be destroyed immediately after this
--   function returns. However, once a source is destroyed it cannot be
--   un-destroyed, so this function can be used for opportunistic checks
--   from any thread.
--   
--   Since: 2.12
sourceIsDestroyed :: (HasCallStack, MonadIO m) => Source -> m Bool

-- | Updates the event mask to watch for the fd identified by
--   tag.
--   
--   tag is the tag returned from sourceAddUnixFd.
--   
--   If you want to remove a fd, don't set its event mask to zero. Instead,
--   call sourceRemoveUnixFd.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   Since: 2.36
sourceModifyUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> [IOCondition] -> m ()

-- | Creates a new Source structure. The size is specified to allow
--   creating structures derived from Source that contain additional
--   data. The size passed in must be at least sizeof (GSource).
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed.
sourceNew :: (HasCallStack, MonadIO m) => SourceFuncs -> Word32 -> m Source

-- | Queries the events reported for the fd corresponding to
--   tag on source during the last poll.
--   
--   The return value of this function is only defined when the function is
--   called from the check or dispatch functions for
--   source.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   Since: 2.36
sourceQueryUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> m [IOCondition]

-- | Increases the reference count on a source by one.
sourceRef :: (HasCallStack, MonadIO m) => Source -> m Source

-- | Removes the source with the given ID from the default main context.
--   You must use sourceDestroy for sources added to a non-default
--   main context.
--   
--   The ID of a Source is given by sourceGetId, or will be
--   returned by the functions sourceAttach,
--   g_idle_add(), idleAdd,
--   g_timeout_add(), timeoutAdd,
--   g_child_watch_add(), childWatchAdd,
--   g_io_add_watch(), and ioAddWatch.
--   
--   It is a programmer error to attempt to remove a non-existent source.
--   
--   More specifically: source IDs can be reissued after a source has been
--   destroyed and therefore it is never valid to use this function with a
--   source ID which may have already been removed. An example is when
--   scheduling an idle to run in another thread with
--   g_idle_add(): the idle may already have run and been
--   removed by the time this function is called on its (now invalid)
--   source ID. This source ID may have been reissued, leading to the
--   operation being performed against the wrong source.
sourceRemove :: (HasCallStack, MonadIO m) => Word32 -> m Bool

-- | Removes a source from the default main loop context given the source
--   functions and user data. If multiple sources exist with the same
--   source functions and user data, only one will be destroyed.
sourceRemoveByFuncsUserData :: (HasCallStack, MonadIO m) => SourceFuncs -> Ptr () -> m Bool

-- | Removes a source from the default main loop context given the user
--   data for the callback. If multiple sources exist with the same user
--   data, only one will be destroyed.
sourceRemoveByUserData :: (HasCallStack, MonadIO m) => Ptr () -> m Bool

-- | Detaches childSource from source and
--   destroys it.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   Since: 2.28
sourceRemoveChildSource :: (HasCallStack, MonadIO m) => Source -> Source -> m ()

-- | Removes a file descriptor from the set of file descriptors polled for
--   this source.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
sourceRemovePoll :: (HasCallStack, MonadIO m) => Source -> PollFD -> m ()

-- | Reverses the effect of a previous call to sourceAddUnixFd.
--   
--   You only need to call this if you want to remove an fd from being
--   watched while keeping the same source around. In the normal case you
--   will just want to destroy the source.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   Since: 2.36
sourceRemoveUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> m ()

-- | Sets the callback function for a source. The callback for a source is
--   called from the source's dispatch function.
--   
--   The exact type of func depends on the type of source;
--   ie. you should not count on func being called with
--   data as its first parameter. Cast func
--   with G_SOURCE_FUNC() to avoid warnings about
--   incompatible function types.
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle memory management of data.
--   
--   Typically, you won't use this function. Instead use functions specific
--   to the type of source you are using, such as
--   g_idle_add() or g_timeout_add().
--   
--   It is safe to call this function multiple times on a source which has
--   already been attached to a context. The changes will take effect for
--   the next time the source is dispatched after this call returns.
sourceSetCallback :: (HasCallStack, MonadIO m) => Source -> SourceFunc -> m ()

-- | Sets the callback function storing the data as a refcounted callback
--   "object". This is used internally. Note that calling
--   sourceSetCallbackIndirect assumes an initial reference count on
--   callbackData, and thus
--   callbackFuncs->unref will eventually be called once
--   more than callbackFuncs->ref.
--   
--   It is safe to call this function multiple times on a source which has
--   already been attached to a context. The changes will take effect for
--   the next time the source is dispatched after this call returns.
sourceSetCallbackIndirect :: (HasCallStack, MonadIO m) => Source -> Ptr () -> SourceCallbackFuncs -> m ()

-- | Sets whether a source can be called recursively. If
--   canRecurse is True, then while the source is
--   being dispatched then this source will be processed normally.
--   Otherwise, all processing of this source is blocked until the dispatch
--   function returns.
sourceSetCanRecurse :: (HasCallStack, MonadIO m) => Source -> Bool -> m ()

-- | Sets the source functions (can be used to override default
--   implementations) of an unattached source.
--   
--   Since: 2.12
sourceSetFuncs :: (HasCallStack, MonadIO m) => Source -> SourceFuncs -> m ()

-- | Sets a name for the source, used in debugging and profiling. The name
--   defaults to NULL.
--   
--   The source name should describe in a human-readable way what the
--   source does. For example, "X11 event queue" or "GTK+ repaint idle
--   handler" or whatever it is.
--   
--   It is permitted to call this function multiple times, but is not
--   recommended due to the potential performance impact. For example, one
--   could change the name in the "check" function of a SourceFuncs
--   to include details like the event type in the source name.
--   
--   Use caution if changing the name while another thread may be accessing
--   it with sourceGetName; that function does not copy the value,
--   and changing the value will free it while the other thread may be
--   attempting to use it.
--   
--   Since: 2.26
sourceSetName :: (HasCallStack, MonadIO m) => Source -> Text -> m ()

-- | Sets the name of a source using its ID.
--   
--   This is a convenience utility to set source names from the return
--   value of g_idle_add(),
--   g_timeout_add(), etc.
--   
--   It is a programmer error to attempt to set the name of a non-existent
--   source.
--   
--   More specifically: source IDs can be reissued after a source has been
--   destroyed and therefore it is never valid to use this function with a
--   source ID which may have already been removed. An example is when
--   scheduling an idle to run in another thread with
--   g_idle_add(): the idle may already have run and been
--   removed by the time this function is called on its (now invalid)
--   source ID. This source ID may have been reissued, leading to the
--   operation being performed against the wrong source.
--   
--   Since: 2.26
sourceSetNameById :: (HasCallStack, MonadIO m) => Word32 -> Text -> m ()

-- | Sets the priority of a source. While the main loop is being run, a
--   source will be dispatched if it is ready to be dispatched and no
--   sources at a higher (numerically smaller) priority are ready to be
--   dispatched.
--   
--   A child source always has the same priority as its parent. It is not
--   permitted to change the priority of a source once it has been added as
--   a child of another source.
sourceSetPriority :: (HasCallStack, MonadIO m) => Source -> Int32 -> m ()

-- | Sets a Source to be dispatched when the given monotonic time is
--   reached (or passed). If the monotonic time is in the past (as it
--   always will be if readyTime is 0) then the source will
--   be dispatched immediately.
--   
--   If readyTime is -1 then the source is never woken up
--   on the basis of the passage of time.
--   
--   Dispatching the source does not reset the ready time. You should do so
--   yourself, from the source dispatch function.
--   
--   Note that if you have a pair of sources where the ready time of one
--   suggests that it will be delivered first but the priority for the
--   other suggests that it would be delivered first, and the ready time
--   for both sources is reached during the same main context iteration,
--   then the order of dispatch is undefined.
--   
--   It is a no-op to call this function on a Source which has
--   already been destroyed with sourceDestroy.
--   
--   This API is only intended to be used by implementations of
--   Source. Do not call this API on a Source that you did
--   not create.
--   
--   Since: 2.36
sourceSetReadyTime :: (HasCallStack, MonadIO m) => Source -> Int64 -> m ()

-- | Decreases the reference count of a source by one. If the resulting
--   reference count is zero the source and associated memory will be
--   destroyed.
sourceUnref :: (HasCallStack, MonadIO m) => Source -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Source.Source
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Source.Source tag

-- | Represents a day between January 1, Year 1 and a few thousand years in
--   the future. None of its members should be accessed directly.
--   
--   If the Date-struct is obtained from dateNew, it will be
--   safe to mutate but invalid and thus not safe for calendrical
--   computations.
--   
--   If it's declared on the stack, it will contain garbage so must be
--   initialized with dateClear. dateClear makes the date
--   invalid but sane. An invalid date doesn't represent a day, it's
--   "empty." A date becomes valid after you set it to a Julian day or you
--   set a day, month, and year.
module GI.GLib.Structs.Date

-- | Memory-managed wrapper type.
newtype Date
Date :: ManagedPtr Date -> Date

-- | Construct a Date struct initialized to zero.
newZeroDate :: MonadIO m => m Date

-- | A convenience alias for Nothing :: Maybe Date.
noDate :: Maybe Date

-- | Increments a date some number of days. To move forward by weeks, add
--   weeks*7 days. The date must be valid.
dateAddDays :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Increments a date by some number of months. If the day of the month is
--   greater than 28, this routine may change the day of the month (because
--   the destination month may not have the current day in it). The date
--   must be valid.
dateAddMonths :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Increments a date by some number of years. If the date is February 29,
--   and the destination year is not a leap year, the date will be changed
--   to February 28. The date must be valid.
dateAddYears :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | If date is prior to minDate, sets
--   date equal to minDate. If
--   date falls after maxDate, sets
--   date equal to maxDate. Otherwise,
--   date is unchanged. Either of minDate
--   and maxDate may be Nothing. All
--   non-Nothing dates must be valid.
dateClamp :: (HasCallStack, MonadIO m) => Date -> Date -> Date -> m ()

-- | Initializes one or more Date structs to a sane but invalid
--   state. The cleared dates will not represent an existing date, but will
--   not contain garbage. Useful to init a date declared on the stack.
--   Validity can be tested with dateValid.
dateClear :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | qsort()-style comparison function for dates. Both
--   dates must be valid.
dateCompare :: (HasCallStack, MonadIO m) => Date -> Date -> m Int32

-- | Copies a GDate to a newly-allocated GDate. If the input was invalid
--   (as determined by dateValid), the invalid state will be copied
--   as is into the new object.
--   
--   Since: 2.56
dateCopy :: (HasCallStack, MonadIO m) => Date -> m Date

-- | Computes the number of days between two dates. If
--   date2 is prior to date1, the returned
--   value is negative. Both dates must be valid.
dateDaysBetween :: (HasCallStack, MonadIO m) => Date -> Date -> m Int32

-- | Frees a Date returned from dateNew.
dateFree :: (HasCallStack, MonadIO m) => Date -> m ()

-- | Returns the day of the month. The date must be valid.
dateGetDay :: (HasCallStack, MonadIO m) => Date -> m Word8

-- | Returns the day of the year, where Jan 1 is the first day of the year.
--   The date must be valid.
dateGetDayOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the number of days in a month, taking leap years into account.
dateGetDaysInMonth :: (HasCallStack, MonadIO m) => DateMonth -> Word16 -> m Word8

-- | Returns the week of the year, where weeks are interpreted according to
--   ISO 8601.
--   
--   Since: 2.6
dateGetIso8601WeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the Julian day or "serial number" of the Date. The
--   Julian day is simply the number of days since January 1, Year 1; i.e.,
--   January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,
--   etc. The date must be valid.
dateGetJulian :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the week of the year, where weeks are understood to start on
--   Monday. If the date is before the first Monday of the year, return 0.
--   The date must be valid.
dateGetMondayWeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the number of weeks in the year, where weeks are taken to
--   start on Monday. Will be 52 or 53. The date must be valid. (Years
--   always have 52 7-day periods, plus 1 or 2 extra days depending on
--   whether it's a leap year. This function is basically telling you how
--   many Mondays are in the year, i.e. there are 53 Mondays if one of the
--   extra days happens to be a Monday.)
dateGetMondayWeeksInYear :: (HasCallStack, MonadIO m) => Word16 -> m Word8

-- | Returns the month of the year. The date must be valid.
dateGetMonth :: (HasCallStack, MonadIO m) => Date -> m DateMonth

-- | Returns the week of the year during which this date falls, if weeks
--   are understood to begin on Sunday. The date must be valid. Can return
--   0 if the day is before the first Sunday of the year.
dateGetSundayWeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the number of weeks in the year, where weeks are taken to
--   start on Sunday. Will be 52 or 53. The date must be valid. (Years
--   always have 52 7-day periods, plus 1 or 2 extra days depending on
--   whether it's a leap year. This function is basically telling you how
--   many Sundays are in the year, i.e. there are 53 Sundays if one of the
--   extra days happens to be a Sunday.)
dateGetSundayWeeksInYear :: (HasCallStack, MonadIO m) => Word16 -> m Word8

-- | Returns the day of the week for a Date. The date must be valid.
dateGetWeekday :: (HasCallStack, MonadIO m) => Date -> m DateWeekday

-- | Returns the year of a Date. The date must be valid.
dateGetYear :: (HasCallStack, MonadIO m) => Date -> m Word16

-- | Returns True if the date is on the first of a month. The date
--   must be valid.
dateIsFirstOfMonth :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns True if the date is the last day of the month. The date
--   must be valid.
dateIsLastOfMonth :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns True if the year is a leap year.
--   
--   For the purposes of this function, leap year is every year divisible
--   by 4 unless that year is divisible by 100. If it is divisible by 100
--   it would be a leap year only if that year is also divisible by 400.
dateIsLeapYear :: (HasCallStack, MonadIO m) => Word16 -> m Bool

-- | Allocates a Date and initializes it to a sane state. The new
--   date will be cleared (as if you'd called dateClear) but invalid
--   (it won't represent an existing day). Free the return value with
--   dateFree.
dateNew :: (HasCallStack, MonadIO m) => m Date

-- | Like dateNew, but also sets the value of the date. Assuming the
--   day-month-year triplet you pass in represents an existing day, the
--   returned date will be valid.
dateNewDmy :: (HasCallStack, MonadIO m) => Word8 -> DateMonth -> Word16 -> m Date

-- | Like dateNew, but also sets the value of the date. Assuming the
--   Julian day number you pass in is valid (greater than 0, less than an
--   unreasonably large number), the returned date will be valid.
dateNewJulian :: (HasCallStack, MonadIO m) => Word32 -> m Date

-- | Checks if date1 is less than or equal to
--   date2, and swap the values if this is not the case.
dateOrder :: (HasCallStack, MonadIO m) => Date -> Date -> m ()

-- | Sets the day of the month for a Date. If the resulting
--   day-month-year triplet is invalid, the date will be invalid.
dateSetDay :: (HasCallStack, MonadIO m) => Date -> Word8 -> m ()

-- | Sets the value of a Date from a day, month, and year. The
--   day-month-year triplet must be valid; if you aren't sure it is, call
--   dateValidDmy to check before you set it.
dateSetDmy :: (HasCallStack, MonadIO m) => Date -> Word8 -> DateMonth -> Word16 -> m ()

-- | Sets the value of a Date from a Julian day number.
dateSetJulian :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Sets the month of the year for a Date. If the resulting
--   day-month-year triplet is invalid, the date will be invalid.
dateSetMonth :: (HasCallStack, MonadIO m) => Date -> DateMonth -> m ()

-- | Parses a user-inputted string str, and try to figure
--   out what date it represents, taking the [current locale][setlocale]
--   into account. If the string is successfully parsed, the date will be
--   valid after the call. Otherwise, it will be invalid. You should check
--   using dateValid to see whether the parsing succeeded.
--   
--   This function is not appropriate for file formats and the like; it
--   isn't very precise, and its exact behavior varies with the locale.
--   It's intended to be a heuristic routine that guesses what the user
--   means by a given string (and it does work pretty well in that
--   capacity).
dateSetParse :: (HasCallStack, MonadIO m) => Date -> Text -> m ()

-- | Sets the value of a date from a GTime value. The time
--   to date conversion is done using the user's current timezone.

-- | Deprecated: (Since version 2.10)Use dateSetTimeT
--   instead.
dateSetTime :: (HasCallStack, MonadIO m) => Date -> Int32 -> m ()

-- | Sets the value of a date to the date corresponding to a time specified
--   as a time_t. The time to date conversion is done using the user's
--   current timezone.
--   
--   To set the value of a date to the current day, you could write:
--   
--   
C code
--   
--   
--   time_t now = time (NULL);
--   if (now == (time_t) -1)
--     // handle the error
--   g_date_set_time_t (date, now);
--   
--   
--   Since: 2.10
dateSetTimeT :: (HasCallStack, MonadIO m) => Date -> CLong -> m ()

-- | Sets the value of a date from a TimeVal value. Note that the
--   tvUsec member is ignored, because Date can't
--   make use of the additional precision.
--   
--   The time to date conversion is done using the user's current timezone.
--   
--   Since: 2.10
dateSetTimeVal :: (HasCallStack, MonadIO m) => Date -> TimeVal -> m ()

-- | Sets the year for a Date. If the resulting day-month-year
--   triplet is invalid, the date will be invalid.
dateSetYear :: (HasCallStack, MonadIO m) => Date -> Word16 -> m ()

-- | Generates a printed representation of the date, in a
--   [locale][setlocale]-specific way. Works just like the platform's C
--   library strftime() function, but only accepts
--   date-related formats; time-related formats give undefined results.
--   Date must be valid. Unlike strftime() (which uses the
--   locale encoding), works on a UTF-8 format string and stores a UTF-8
--   result.
--   
--   This function does not provide any conversion specifiers in addition
--   to those implemented by the platform's C library. For example, don't
--   expect that using dateStrftime would make the %F provided by
--   the C99 strftime() work on Windows where the C library
--   only complies to C89.
dateStrftime :: (HasCallStack, MonadIO m) => Text -> Word64 -> Text -> Date -> m Word64

-- | Moves a date some number of days into the past. To move by weeks, just
--   move by weeks*7 days. The date must be valid.
dateSubtractDays :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Moves a date some number of months into the past. If the current day
--   of the month doesn't exist in the destination month, the day of the
--   month may change. The date must be valid.
dateSubtractMonths :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Moves a date some number of years into the past. If the current day
--   doesn't exist in the destination year (i.e. it's February 29 and you
--   move to a non-leap-year) then the day is changed to February 29. The
--   date must be valid.
dateSubtractYears :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Fills in the date-related bits of a struct tm using the
--   date value. Initializes the non-date parts with
--   something sane but meaningless.
dateToStructTm :: (HasCallStack, MonadIO m) => Date -> Ptr () -> m ()

-- | Returns True if the Date represents an existing day. The
--   date must not contain garbage; it should have been initialized with
--   dateClear if it wasn't allocated by one of the dateNew
--   variants.
dateValid :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns True if the day of the month is valid (a day is valid
--   if it's between 1 and 31 inclusive).
dateValidDay :: (HasCallStack, MonadIO m) => Word8 -> m Bool

-- | Returns True if the day-month-year triplet forms a valid,
--   existing day in the range of days Date understands (Year 1 or
--   later, no more than a few thousand years in the future).
dateValidDmy :: (HasCallStack, MonadIO m) => Word8 -> DateMonth -> Word16 -> m Bool

-- | Returns True if the Julian day is valid. Anything greater than
--   zero is basically a valid Julian, though there is a 32-bit limit.
dateValidJulian :: (HasCallStack, MonadIO m) => Word32 -> m Bool

-- | Returns True if the month value is valid. The 12
--   DateMonth enumeration values are the only valid months.
dateValidMonth :: (HasCallStack, MonadIO m) => DateMonth -> m Bool

-- | Returns True if the weekday is valid. The seven
--   DateWeekday enumeration values are the only valid weekdays.
dateValidWeekday :: (HasCallStack, MonadIO m) => DateWeekday -> m Bool

-- | Returns True if the year is valid. Any year greater than 0 is
--   valid, though there is a 16-bit limit to what Date will
--   understand.
dateValidYear :: (HasCallStack, MonadIO m) => Word16 -> m Bool

-- | Get the value of the “day” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get date #day
--   
getDateDay :: MonadIO m => Date -> m Word32

-- | Set the value of the “day” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set date [ #day := value ]
--   
setDateDay :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “dmy” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get date #dmy
--   
getDateDmy :: MonadIO m => Date -> m Word32

-- | Set the value of the “dmy” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set date [ #dmy := value ]
--   
setDateDmy :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “julian” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get date #julian
--   
getDateJulian :: MonadIO m => Date -> m Word32

-- | Set the value of the “julian” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set date [ #julian := value ]
--   
setDateJulian :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “julian_days” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get date #julianDays
--   
getDateJulianDays :: MonadIO m => Date -> m Word32

-- | Set the value of the “julian_days” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set date [ #julianDays := value ]
--   
setDateJulianDays :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “month” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get date #month
--   
getDateMonth :: MonadIO m => Date -> m Word32

-- | Set the value of the “month” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set date [ #month := value ]
--   
setDateMonth :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “year” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get date #year
--   
getDateYear :: MonadIO m => Date -> m Word32

-- | Set the value of the “year” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set date [ #year := value ]
--   
setDateYear :: MonadIO m => Date -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.Date.Date
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Date.Date tag

-- | The GAsyncQueue struct is an opaque data structure which represents an
--   asynchronous queue. It should only be accessed through the
--   g_async_queue_* functions.
module GI.GLib.Structs.AsyncQueue

-- | Memory-managed wrapper type.
newtype AsyncQueue
AsyncQueue :: ManagedPtr AsyncQueue -> AsyncQueue

-- | A convenience alias for Nothing :: Maybe
--   AsyncQueue.
noAsyncQueue :: Maybe AsyncQueue

-- | Returns the length of the queue.
--   
--   Actually this function returns the number of data items in the queue
--   minus the number of waiting threads, so a negative value means waiting
--   threads, and a positive value means available entries in the
--   queue. A return value of 0 could mean n entries in the
--   queue and n threads waiting. This can happen due to locking of the
--   queue or due to scheduling.
asyncQueueLength :: (HasCallStack, MonadIO m) => AsyncQueue -> m Int32

-- | Returns the length of the queue.
--   
--   Actually this function returns the number of data items in the queue
--   minus the number of waiting threads, so a negative value means waiting
--   threads, and a positive value means available entries in the
--   queue. A return value of 0 could mean n entries in the
--   queue and n threads waiting. This can happen due to locking of the
--   queue or due to scheduling.
--   
--   This function must be called while holding the queue's
--   lock.
asyncQueueLengthUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m Int32

-- | Acquires the queue's lock. If another thread is
--   already holding the lock, this call will block until the lock becomes
--   available.
--   
--   Call asyncQueueUnlock to drop the lock again.
--   
--   While holding the lock, you can only call the
--   g_async_queue_*_unlocked() functions on
--   queue. Otherwise, deadlock may occur.
asyncQueueLock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Pops data from the queue. If queue is
--   empty, this function blocks until data becomes available.
asyncQueuePop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Pops data from the queue. If queue is
--   empty, this function blocks until data becomes available.
--   
--   This function must be called while holding the queue's
--   lock.
asyncQueuePopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Pushes the data into the queue.
--   data must not be Nothing.
asyncQueuePush :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Pushes the item into the queue.
--   item must not be Nothing. In contrast to
--   asyncQueuePush, this function pushes the new item ahead of the
--   items already in the queue, so that it will be the next one to be
--   popped off the queue.
--   
--   Since: 2.46
asyncQueuePushFront :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Pushes the item into the queue.
--   item must not be Nothing. In contrast to
--   asyncQueuePushUnlocked, this function pushes the new item ahead
--   of the items already in the queue, so that it will be the next one to
--   be popped off the queue.
--   
--   This function must be called while holding the queue's
--   lock.
--   
--   Since: 2.46
asyncQueuePushFrontUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Pushes the data into the queue.
--   data must not be Nothing.
--   
--   This function must be called while holding the queue's
--   lock.
asyncQueuePushUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Increases the reference count of the asynchronous
--   queue by 1.

-- | Deprecated: (Since version 2.8)Reference counting is done
--   atomically.so g_async_queue_ref() can be used
--   regardless of the queue'slock.
asyncQueueRefUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Remove an item from the queue.
--   
--   Since: 2.46
asyncQueueRemove :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool

-- | Remove an item from the queue.
--   
--   This function must be called while holding the queue's
--   lock.
--   
--   Since: 2.46
asyncQueueRemoveUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool

-- | Pops data from the queue. If the queue is empty,
--   blocks until endTime or until data becomes available.
--   
--   If no data is received before endTime, Nothing
--   is returned.
--   
--   To easily calculate endTime, a combination of
--   getCurrentTime and timeValAdd can be used.

-- | Deprecated: use asyncQueueTimeoutPop.
asyncQueueTimedPop :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())

-- | Pops data from the queue. If the queue is empty,
--   blocks until endTime or until data becomes available.
--   
--   If no data is received before endTime, Nothing
--   is returned.
--   
--   To easily calculate endTime, a combination of
--   getCurrentTime and timeValAdd can be used.
--   
--   This function must be called while holding the queue's
--   lock.

-- | Deprecated: use asyncQueueTimeoutPopUnlocked.
asyncQueueTimedPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())

-- | Pops data from the queue. If the queue is empty,
--   blocks for timeout microseconds, or until data becomes
--   available.
--   
--   If no data is received before the timeout, Nothing is returned.
asyncQueueTimeoutPop :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())

-- | Pops data from the queue. If the queue is empty,
--   blocks for timeout microseconds, or until data becomes
--   available.
--   
--   If no data is received before the timeout, Nothing is returned.
--   
--   This function must be called while holding the queue's
--   lock.
asyncQueueTimeoutPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())

-- | Tries to pop data from the queue. If no data is
--   available, Nothing is returned.
asyncQueueTryPop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Tries to pop data from the queue. If no data is
--   available, Nothing is returned.
--   
--   This function must be called while holding the queue's
--   lock.
asyncQueueTryPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Releases the queue's lock.
--   
--   Calling this function when you have not acquired the with
--   asyncQueueLock leads to undefined behaviour.
asyncQueueUnlock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Decreases the reference count of the asynchronous
--   queue by 1.
--   
--   If the reference count went to 0, the queue will be
--   destroyed and the memory allocated will be freed. So you are not
--   allowed to use the queue afterwards, as it might have
--   disappeared. You do not need to hold the lock to call this function.
asyncQueueUnref :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Decreases the reference count of the asynchronous
--   queue by 1 and releases the lock. This function must
--   be called while holding the queue's lock. If the
--   reference count went to 0, the queue will be destroyed
--   and the memory allocated will be freed.

-- | Deprecated: (Since version 2.8)Reference counting is done
--   atomically.so asyncQueueUnref can be used regardless of the
--   queue'slock.
asyncQueueUnrefAndUnlock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.AsyncQueue.AsyncQueue

module GI.GLib.Functions

-- | A wrapper for the POSIX access() function. This
--   function is used to test a pathname for one or several of read, write
--   or execute permissions, or just existence.
--   
--   On Windows, the file protection mechanism is not at all POSIX-like,
--   and the underlying function in the C library only checks the FAT-style
--   READONLY attribute, and does not look at the ACL of a file at all.
--   This function is this in practise almost useless on Windows. Software
--   that needs to handle file permissions on Windows more exactly should
--   use the Win32 API.
--   
--   See your C library manual for more details about
--   access().
--   
--   Since: 2.8
access :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | Determines the numeric value of a character as a decimal digit.
--   Differs from unicharDigitValue because it takes a char, so
--   there's no worry about sign extension if characters are signed.
asciiDigitValue :: (HasCallStack, MonadIO m) => Int8 -> m Int32

-- | Converts a gdouble to a string, using the '.' as
--   decimal point.
--   
--   This function generates enough precision that converting the string
--   back using asciiStrtod gives the same machine-number (on
--   machines with IEEE compatible 64bit doubles). It is guaranteed that
--   the size of the resulting string will never be larger than
--   gASCIIDTOSTRBUFSIZE bytes, including the terminating
--   nul character, which is always added.
asciiDtostr :: (HasCallStack, MonadIO m) => Text -> Int32 -> Double -> m Text

-- | Converts a gdouble to a string, using the '.' as
--   decimal point. To format the number you pass in a
--   printf()-style format string. Allowed conversion
--   specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'.
--   
--   The returned buffer is guaranteed to be nul-terminated.
--   
--   If you just want to want to serialize the value into a string, use
--   asciiDtostr.
asciiFormatd :: (HasCallStack, MonadIO m) => Text -> Int32 -> Text -> Double -> m Text

-- | Compare two strings, ignoring the case of ASCII characters.
--   
--   Unlike the BSD strcasecmp() function, this only
--   recognizes standard ASCII letters and ignores the locale, treating all
--   non-ASCII bytes as if they are not letters.
--   
--   This function should be used only on strings that are known to be in
--   encodings where the bytes corresponding to ASCII letters always
--   represent themselves. This includes UTF-8 and the ISO-8859-* charsets,
--   but not for instance double-byte encodings like the Windows Codepage
--   932, where the trailing bytes of double-byte characters include all
--   ASCII letters. If you compare two CP932 strings using this function,
--   you will get false matches.
--   
--   Both s1 and s2 must be
--   non-Nothing.
asciiStrcasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> m Int32

-- | Converts all upper case ASCII letters to lower case ASCII letters.
asciiStrdown :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | A convenience function for converting a string to a signed number.
--   
--   This function assumes that str contains only a number
--   of the given base that is within inclusive bounds
--   limited by min and max. If this is
--   true, then the converted number is stored in outNum.
--   An empty string is not a valid input. A string with leading or
--   trailing whitespace is also an invalid input.
--   
--   base can be between 2 and 36 inclusive. Hexadecimal
--   numbers must not be prefixed with "0x" or "0X". Such a problem does
--   not exist for octal numbers, since they were usually prefixed with a
--   zero which does not change the value of the parsed number.
--   
--   Parsing failures result in an error with the
--   G_NUMBER_PARSER_ERROR domain. If the input is invalid,
--   the error code will be NumberParserErrorInvalid. If the parsed
--   number is out of bounds - NumberParserErrorOutOfBounds.
--   
--   See asciiStrtoll if you have more complex needs such as parsing
--   a string which starts with a number, but then has other characters.
--   
--   Since: 2.54
asciiStringToSigned :: (HasCallStack, MonadIO m) => Text -> Word32 -> Int64 -> Int64 -> m Int64

-- | A convenience function for converting a string to an unsigned number.
--   
--   This function assumes that str contains only a number
--   of the given base that is within inclusive bounds
--   limited by min and max. If this is
--   true, then the converted number is stored in outNum.
--   An empty string is not a valid input. A string with leading or
--   trailing whitespace is also an invalid input. A string with a leading
--   sign (- or +) is not a valid input for the unsigned
--   parser.
--   
--   base can be between 2 and 36 inclusive. Hexadecimal
--   numbers must not be prefixed with "0x" or "0X". Such a problem does
--   not exist for octal numbers, since they were usually prefixed with a
--   zero which does not change the value of the parsed number.
--   
--   Parsing failures result in an error with the
--   G_NUMBER_PARSER_ERROR domain. If the input is invalid,
--   the error code will be NumberParserErrorInvalid. If the parsed
--   number is out of bounds - NumberParserErrorOutOfBounds.
--   
--   See asciiStrtoull if you have more complex needs such as
--   parsing a string which starts with a number, but then has other
--   characters.
--   
--   Since: 2.54
asciiStringToUnsigned :: (HasCallStack, MonadIO m) => Text -> Word32 -> Word64 -> Word64 -> m Word64

-- | Compare s1 and s2, ignoring the case
--   of ASCII characters and any characters after the first
--   n in each string.
--   
--   Unlike the BSD strcasecmp() function, this only
--   recognizes standard ASCII letters and ignores the locale, treating all
--   non-ASCII characters as if they are not letters.
--   
--   The same warning as in asciiStrcasecmp applies: Use this
--   function only on strings known to be in encodings where bytes
--   corresponding to ASCII letters always represent themselves.
asciiStrncasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> Word64 -> m Int32

-- | Converts a string to a gdouble value.
--   
--   This function behaves like the standard strtod()
--   function does in the C locale. It does this without actually changing
--   the current locale, since that would not be thread-safe. A limitation
--   of the implementation is that this function will still accept
--   localized versions of infinities and NANs.
--   
--   This function is typically used when reading configuration files or
--   other non-user input that should be locale independent. To handle
--   input from the user you should normally use the locale-sensitive
--   system strtod() function.
--   
--   To convert from a gdouble to a string in a
--   locale-insensitive way, use asciiDtostr.
--   
--   If the correct value would cause overflow, plus or minus
--   HUGE_VAL is returned (according to the sign of the
--   value), and ERANGE is stored in errno.
--   If the correct value would cause underflow, zero is returned and
--   ERANGE is stored in errno.
--   
--   This function resets errno before calling
--   strtod() so that you can reliably detect overflow and
--   underflow.
asciiStrtod :: (HasCallStack, MonadIO m) => Text -> m (Double, Text)

-- | Converts a string to a gint64 value. This function
--   behaves like the standard strtoll() function does in
--   the C locale. It does this without actually changing the current
--   locale, since that would not be thread-safe.
--   
--   This function is typically used when reading configuration files or
--   other non-user input that should be locale independent. To handle
--   input from the user you should normally use the locale-sensitive
--   system strtoll() function.
--   
--   If the correct value would cause overflow, MAXINT64 or
--   MININT64 is returned, and ERANGE is stored in
--   errno. If the base is outside the valid range, zero is
--   returned, and EINVAL is stored in errno. If the
--   string conversion fails, zero is returned, and endptr
--   returns nptr (if endptr is
--   non-Nothing).
--   
--   Since: 2.12
asciiStrtoll :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Int64, Text)

-- | Converts a string to a guint64 value. This function
--   behaves like the standard strtoull() function does in
--   the C locale. It does this without actually changing the current
--   locale, since that would not be thread-safe.
--   
--   Note that input with a leading minus sign (-) is accepted,
--   and will return the negation of the parsed number, unless that would
--   overflow a guint64. Critically, this means you cannot
--   assume that a short fixed length input will never result in a low
--   return value, as the input could have a leading -.
--   
--   This function is typically used when reading configuration files or
--   other non-user input that should be locale independent. To handle
--   input from the user you should normally use the locale-sensitive
--   system strtoull() function.
--   
--   If the correct value would cause overflow, MAXUINT64 is
--   returned, and ERANGE is stored in errno. If the base
--   is outside the valid range, zero is returned, and EINVAL is
--   stored in errno. If the string conversion fails, zero is
--   returned, and endptr returns nptr (if
--   endptr is non-Nothing).
--   
--   Since: 2.2
asciiStrtoull :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Word64, Text)

-- | Converts all lower case ASCII letters to upper case ASCII letters.
asciiStrup :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Convert a character to ASCII lower case.
--   
--   Unlike the standard C library tolower() function, this
--   only recognizes standard ASCII letters and ignores the locale,
--   returning all non-ASCII characters unchanged, even if they are lower
--   case letters in a particular character set. Also unlike the standard
--   library function, this takes and returns a char, not an int, so don't
--   call it on EOF but no need to worry about casting to
--   guchar before passing a possibly non-ASCII character
--   in.
asciiTolower :: (HasCallStack, MonadIO m) => Int8 -> m Int8

-- | Convert a character to ASCII upper case.
--   
--   Unlike the standard C library toupper() function, this
--   only recognizes standard ASCII letters and ignores the locale,
--   returning all non-ASCII characters unchanged, even if they are upper
--   case letters in a particular character set. Also unlike the standard
--   library function, this takes and returns a char, not an int, so don't
--   call it on EOF but no need to worry about casting to
--   guchar before passing a possibly non-ASCII character
--   in.
asciiToupper :: (HasCallStack, MonadIO m) => Int8 -> m Int8

-- | Determines the numeric value of a character as a hexidecimal digit.
--   Differs from unicharXdigitValue because it takes a char, so
--   there's no worry about sign extension if characters are signed.
asciiXdigitValue :: (HasCallStack, MonadIO m) => Int8 -> m Int32

-- | No description available in the introspection data.
assertWarning :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> m ()

-- | No description available in the introspection data.
assertionMessage :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> m ()

-- | No description available in the introspection data.
assertionMessageCmpstr :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Text -> Text -> Text -> m ()

-- | No description available in the introspection data.
assertionMessageError :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> GError -> Word32 -> Int32 -> m ()

-- | Specifies a function to be called at normal program termination.
--   
--   Since GLib 2.8.2, on Windows atexit actually is a preprocessor
--   macro that maps to a call to the atexit() function in
--   the C library. This means that in case the code that calls
--   atexit, i.e. atexit(), is in a DLL, the
--   function will be called when the DLL is detached from the program.
--   This typically makes more sense than that the function is called when
--   the GLib DLL is detached, which happened earlier when atexit
--   was a function in the GLib DLL.
--   
--   The behaviour of atexit() in the context of
--   dynamically loaded modules is not formally specified and varies
--   wildly.
--   
--   On POSIX systems, calling atexit (or atexit())
--   in a dynamically loaded module which is unloaded before the program
--   terminates might well cause a crash at program exit.
--   
--   Some POSIX systems implement atexit() like Windows,
--   and have each dynamically loaded module maintain an own atexit chain
--   that is called when the module is unloaded.
--   
--   On other POSIX systems, before a dynamically loaded module is
--   unloaded, the registered atexit functions (if any) residing in that
--   module are called, regardless where the code that registered them
--   resided. This is presumably the most robust approach.
--   
--   As can be seen from the above, for portability it's best to avoid
--   calling atexit (or atexit()) except in the main
--   executable of a program.

-- | Deprecated: (Since version 2.32)It is best to avoid
--   atexit.
atexit :: (HasCallStack, MonadIO m) => VoidFunc -> m ()

-- | Atomically adds val to the value of
--   atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic += val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Before version 2.30, this function did not return a value (but
--   atomicIntExchangeAndAdd did, and had the same meaning).
--   
--   Since: 2.4
atomicIntAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Performs an atomic bitwise 'and' of the value of
--   atomic and val, storing the result
--   back in atomic.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic &= val; return tmp; }.
--   
--   Since: 2.30
atomicIntAnd :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Compares atomic to oldval and, if
--   equal, sets it to newval. If atomic
--   was not equal to oldval then no change occurs.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of { if (*atomic ==
--   oldval) { *atomic = newval; return TRUE; } else return FALSE; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.4
atomicIntCompareAndExchange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> m Bool

-- | Decrements the value of atomic by 1.
--   
--   Think of this operation as an atomic version of { *atomic -= 1;
--   return (*atomic == 0); }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.4
atomicIntDecAndTest :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | This function existed before atomicIntAdd returned the prior
--   value of the integer (which it now does). It is retained only for
--   compatibility reasons. Don't use this function in new code.
--   
--   Since: 2.4

-- | Deprecated: (Since version 2.30)Use atomicIntAdd
--   instead.
atomicIntExchangeAndAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Gets the current value of atomic.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   Since: 2.4
atomicIntGet :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Increments the value of atomic by 1.
--   
--   Think of this operation as an atomic version of { *atomic += 1;
--   }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.4
atomicIntInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Performs an atomic bitwise 'or' of the value of atomic
--   and val, storing the result back in
--   atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic |= val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicIntOr :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Sets the value of atomic to newval.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   Since: 2.4
atomicIntSet :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Performs an atomic bitwise 'xor' of the value of
--   atomic and val, storing the result
--   back in atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic ^= val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicIntXor :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Atomically adds val to the value of
--   atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic += val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicPointerAdd :: (HasCallStack, MonadIO m) => Ptr () -> Int64 -> m Int64

-- | Performs an atomic bitwise 'and' of the value of
--   atomic and val, storing the result
--   back in atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic &= val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicPointerAnd :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m Word64

-- | Compares atomic to oldval and, if
--   equal, sets it to newval. If atomic
--   was not equal to oldval then no change occurs.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of { if (*atomic ==
--   oldval) { *atomic = newval; return TRUE; } else return FALSE; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.4
atomicPointerCompareAndExchange :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Gets the current value of atomic.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   Since: 2.4
atomicPointerGet :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Performs an atomic bitwise 'or' of the value of atomic
--   and val, storing the result back in
--   atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic |= val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicPointerOr :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m Word64

-- | Sets the value of atomic to newval.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   Since: 2.4
atomicPointerSet :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m ()

-- | Performs an atomic bitwise 'xor' of the value of
--   atomic and val, storing the result
--   back in atomic.
--   
--   Think of this operation as an atomic version of { tmp = *atomic;
--   *atomic ^= val; return tmp; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Since: 2.30
atomicPointerXor :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m Word64

-- | Atomically acquires a reference on the data pointed by
--   memBlock.
--   
--   Since: 2.58
atomicRcBoxAcquire :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Allocates blockSize bytes of memory, and adds atomic
--   reference counting semantics to it.
--   
--   The data will be freed when its reference count drops to zero.
--   
--   The allocated data is guaranteed to be suitably aligned for any
--   built-in type.
--   
--   Since: 2.58
atomicRcBoxAlloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates blockSize bytes of memory, and adds atomic
--   referenc counting semantics to it.
--   
--   The contents of the returned data is set to zero.
--   
--   The data will be freed when its reference count drops to zero.
--   
--   The allocated data is guaranteed to be suitably aligned for any
--   built-in type.
--   
--   Since: 2.58
atomicRcBoxAlloc0 :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates a new block of data with atomit reference counting
--   semantics, and copies blockSize bytes of
--   memBlock into it.
--   
--   Since: 2.58
atomicRcBoxDup :: (HasCallStack, MonadIO m) => Word64 -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   memBlock.
--   
--   Since: 2.58
atomicRcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m Word64

-- | Atomically releases a reference on the data pointed by
--   memBlock.
--   
--   If the reference was the last one, it will free the resources
--   allocated for memBlock.
--   
--   Since: 2.58
atomicRcBoxRelease :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Atomically releases a reference on the data pointed by
--   memBlock.
--   
--   If the reference was the last one, it will call
--   clearFunc to clear the contents of
--   memBlock, and then will free the resources allocated
--   for memBlock.
--   
--   Since: 2.58
atomicRcBoxReleaseFull :: (HasCallStack, MonadIO m) => Ptr () -> DestroyNotify -> m ()

-- | Atomically compares the current value of arc with
--   val.
--   
--   Since: 2.58
atomicRefCountCompare :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Atomically decreases the reference count.
--   
--   Since: 2.58
atomicRefCountDec :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Atomically increases the reference count.
--   
--   Since: 2.58
atomicRefCountInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Initializes a reference count variable.
--   
--   Since: 2.58
atomicRefCountInit :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Decode a sequence of Base-64 encoded text into binary data. Note that
--   the returned binary data is not necessarily zero-terminated, so it
--   should not be used as a character string.
--   
--   Since: 2.12
base64Decode :: (HasCallStack, MonadIO m) => Text -> m ByteString

-- | Decode a sequence of Base-64 encoded text into binary data by
--   overwriting the input data.
--   
--   Since: 2.20
base64DecodeInplace :: (HasCallStack, MonadIO m) => ByteString -> m (Word8, ByteString)

-- | Encode a sequence of binary data into its Base-64 stringified
--   representation.
--   
--   Since: 2.12
base64Encode :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Text

-- | Gets the name of the file without any leading directory components. It
--   returns a pointer into the given file name string.

-- | Deprecated: (Since version 2.2)Use pathGetBasename instead,
--   but notice that pathGetBasename allocates new memory for the
--   returned string, unlike this function which returns a pointer into the
--   argument.
basename :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Sets the indicated lockBit in address.
--   If the bit is already set, this call will block until bitUnlock
--   unsets the corresponding bit.
--   
--   Attempting to lock on two different bits within the same integer is
--   not supported and will very probably cause deadlocks.
--   
--   The value of the bit that is set is (1u << bit).
--   If bit is not between 0 and 31 then the result is
--   undefined.
--   
--   This function accesses address atomically. All other
--   accesses to address must be atomic in order for this
--   function to work reliably.
--   
--   Since: 2.24
bitLock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Find the position of the first bit set in mask,
--   searching from (but not including) nthBit upwards.
--   Bits are numbered from 0 (least significant) to
--   sizeof(gulong) * 8 - 1 (31 or 63, usually). To start
--   searching from the 0th bit, set nthBit to -1.
bitNthLsf :: (HasCallStack, MonadIO m) => CULong -> Int32 -> m Int32

-- | Find the position of the first bit set in mask,
--   searching from (but not including) nthBit downwards.
--   Bits are numbered from 0 (least significant) to
--   sizeof(gulong) * 8 - 1 (31 or 63, usually). To start
--   searching from the last bit, set nthBit to -1 or
--   GLIB_SIZEOF_LONG * 8.
bitNthMsf :: (HasCallStack, MonadIO m) => CULong -> Int32 -> m Int32

-- | Gets the number of bits used to hold number, e.g. if
--   number is 4, 3 bits are needed.
bitStorage :: (HasCallStack, MonadIO m) => CULong -> m Word32

-- | Sets the indicated lockBit in address,
--   returning True if successful. If the bit is already set,
--   returns False immediately.
--   
--   Attempting to lock on two different bits within the same integer is
--   not supported.
--   
--   The value of the bit that is set is (1u << bit).
--   If bit is not between 0 and 31 then the result is
--   undefined.
--   
--   This function accesses address atomically. All other
--   accesses to address must be atomic in order for this
--   function to work reliably.
--   
--   Since: 2.24
bitTrylock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Clears the indicated lockBit in
--   address. If another thread is currently blocked in
--   bitLock on this same bit then it will be woken up.
--   
--   This function accesses address atomically. All other
--   accesses to address must be atomic in order for this
--   function to work reliably.
--   
--   Since: 2.24
bitUnlock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Behaves exactly like g_build_filename(), but takes the
--   path elements as a string array, instead of varargs. This function is
--   mainly meant for language bindings.
--   
--   Since: 2.8
buildFilenamev :: (HasCallStack, MonadIO m) => [[Char]] -> m [Char]

-- | Behaves exactly like g_build_path(), but takes the
--   path elements as a string array, instead of varargs. This function is
--   mainly meant for language bindings.
--   
--   Since: 2.8
buildPathv :: (HasCallStack, MonadIO m) => Text -> [[Char]] -> m [Char]

-- | Gets the canonical file name from filename. All triple
--   slashes are turned into single slashes, and all .. and
--   .s resolved against relativeTo.
--   
--   Symlinks are not followed, and the returned path is guaranteed to be
--   absolute.
--   
--   If filename is an absolute path,
--   relativeTo is ignored. Otherwise,
--   relativeTo will be prepended to
--   filename to make it absolute.
--   relativeTo must be an absolute path, or
--   Nothing. If relativeTo is Nothing, it'll
--   fallback to getCurrentDir.
--   
--   This function never fails, and will canonicalize file paths even if
--   they don't exist.
--   
--   No file system I/O is done.
--   
--   Since: 2.58
canonicalizeFilename :: (HasCallStack, MonadIO m) => [Char] -> Maybe [Char] -> m [Char]

-- | A wrapper for the POSIX chdir() function. The function
--   changes the current directory of the process to path.
--   
--   See your C library manual for more details about
--   chdir().
--   
--   Since: 2.8
chdir :: (HasCallStack, MonadIO m) => [Char] -> m Int32

-- | Checks that the GLib library in use is compatible with the given
--   version. Generally you would pass in the constants
--   MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION as
--   the three arguments to this function; that produces a check that the
--   library in use is compatible with the version of GLib the application
--   or module was compiled against.
--   
--   Compatibility is defined by two things: first the version of the
--   running library is newer than the version
--   requiredMajor.required_minor.requiredMicro.
--   Second the running library must be binary compatible with the version
--   requiredMajor.required_minor.requiredMicro
--   (same major version.)
--   
--   Since: 2.6
checkVersion :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> Word32 -> m Text

-- | Sets a function to be called when the child indicated by
--   pid exits, at the priority priority.
--   
--   If you obtain pid from spawnAsync or
--   spawnAsyncWithPipes you will need to pass
--   G_SPAWN_DO_NOT_REAP_CHILD as flag to the spawn
--   function for the child watching to work.
--   
--   In many programs, you will want to call spawnCheckExitStatus in
--   the callback to determine whether or not the child exited
--   successfully.
--   
--   Also, note that on platforms where GPid must be
--   explicitly closed (see spawnClosePid) pid must
--   not be closed while the source is still active. Typically, you should
--   invoke spawnClosePid in the callback function for the source.
--   
--   GLib supports only a single callback per process id. On POSIX
--   platforms, the same restrictions mentioned for
--   childWatchSourceNew apply to this function.
--   
--   This internally creates a main loop source using
--   childWatchSourceNew and attaches it to the main loop context
--   using sourceAttach. You can do these steps manually if you need
--   greater control.
--   
--   Since: 2.4
childWatchAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> ChildWatchFunc -> m Word32

-- | Creates a new child_watch source.
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed.
--   
--   Note that child watch sources can only be used in conjunction with
--   g_spawn... when the SpawnFlagsDoNotReapChild flag is
--   used.
--   
--   Note that on platforms where GPid must be explicitly
--   closed (see spawnClosePid) pid must not be
--   closed while the source is still active. Typically, you will want to
--   call spawnClosePid in the callback function for the source.
--   
--   On POSIX platforms, the following restrictions apply to this API due
--   to limitations in POSIX process interfaces:
--   
--   
--   
- pid must be a child of this process
--   
- pid must be positive
--   
- the application must not call waitpid with a non-positive
--   first argument, for instance in another thread
--   
- the application must not wait for pid to exit by
--   any other mechanism, including waitpid(pid, ...) or a second
--   child-watch source for the same pid
--   
- the application must not ignore SIGCHILD
--   
--   
--   If any of those conditions are not met, this and related APIs will not
--   work correctly. This can often be diagnosed via a GLib warning stating
--   that ECHILD was received by waitpid.
--   
--   Calling waitpid for specific processes other than
--   pid remains a valid thing to do.
--   
--   Since: 2.4
childWatchSourceNew :: (HasCallStack, MonadIO m) => Int32 -> m Source

-- | If err or *err is Nothing, does
--   nothing. Otherwise, calls errorFree on *err and
--   sets *err to Nothing.
clearError :: (HasCallStack, MonadIO m) => m ()

-- | This wraps the close() call; in case of error,
--   errno will be preserved, but the error will also be
--   stored as a GError in error.
--   
--   Besides using GError, there is another major reason to prefer
--   this function over the call provided by the system; on Unix, it will
--   attempt to correctly handle EINTR, which has
--   platform-specific semantics.
--   
--   Since: 2.36
close :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Computes the checksum for a binary data. This is a
--   convenience wrapper for checksumNew, checksumGetString
--   and checksumFree.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.34
computeChecksumForBytes :: (HasCallStack, MonadIO m) => ChecksumType -> Bytes -> m Text

-- | Computes the checksum for a binary data of
--   length. This is a convenience wrapper for
--   checksumNew, checksumGetString and checksumFree.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.16
computeChecksumForData :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> m Text

-- | Computes the checksum of a string.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.16
computeChecksumForString :: (HasCallStack, MonadIO m) => ChecksumType -> Text -> Int64 -> m Text

-- | Computes the HMAC for a binary data. This is a
--   convenience wrapper for g_hmac_new(),
--   hmacGetString and hmacUnref.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.50
computeHmacForBytes :: (HasCallStack, MonadIO m) => ChecksumType -> Bytes -> Bytes -> m Text

-- | Computes the HMAC for a binary data of
--   length. This is a convenience wrapper for
--   g_hmac_new(), hmacGetString and
--   hmacUnref.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.30
computeHmacForData :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> ByteString -> m Text

-- | Computes the HMAC for a string.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   Since: 2.30
computeHmacForString :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> Text -> Int64 -> m Text

-- | Converts a string from one character set to another.
--   
--   Note that you should use g_iconv() for streaming
--   conversions. Despite the fact that bytesRead can
--   return information about partial characters, the g_convert_...
--   functions are not generally suitable for streaming. If the underlying
--   converter maintains internal state, then this won't be preserved
--   across successive calls to convert,
--   g_convert_with_iconv() or convertWithFallback.
--   (An example of this is the GNU C converter for CP1255 which does not
--   emit a base character until it knows that the next character is not a
--   mark that could combine with the base character.)
--   
--   Using extensions such as "//TRANSLIT" may not work (or may not work
--   well) on many platforms. Consider using strToAscii instead.
convert :: (HasCallStack, MonadIO m) => ByteString -> Text -> Text -> m (ByteString, Word64)

-- | No description available in the introspection data.
convertErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Converts a string from one character set to another, possibly
--   including fallback sequences for characters not representable in the
--   output. Note that it is not guaranteed that the specification for the
--   fallback sequences in fallback will be honored. Some
--   systems may do an approximate conversion from
--   fromCodeset to toCodeset in their
--   iconv() functions, in which case GLib will simply
--   return that approximate conversion.
--   
--   Note that you should use g_iconv() for streaming
--   conversions. Despite the fact that bytesRead can
--   return information about partial characters, the g_convert_...
--   functions are not generally suitable for streaming. If the underlying
--   converter maintains internal state, then this won't be preserved
--   across successive calls to convert,
--   g_convert_with_iconv() or convertWithFallback.
--   (An example of this is the GNU C converter for CP1255 which does not
--   emit a base character until it knows that the next character is not a
--   mark that could combine with the base character.)
convertWithFallback :: (HasCallStack, MonadIO m) => ByteString -> Text -> Text -> Text -> m (ByteString, Word64)

-- | Calls the given function for each data element of the datalist. The
--   function is called with each data element's GQuark id
--   and data, together with the given userData parameter.
--   Note that this function is NOT thread-safe. So unless
--   datalist can be protected from any modifications
--   during invocation of this function, it should not be called.
--   
--   func can make changes to datalist, but
--   the iteration will not reflect changes made during the
--   datalistForeach call, other than skipping over elements that
--   are removed.
datalistForeach :: (HasCallStack, MonadIO m) => Data -> DataForeachFunc -> m ()

-- | Gets a data element, using its string identifier. This is slower than
--   datalistIdGetData because it compares strings.
datalistGetData :: (HasCallStack, MonadIO m) => Data -> Text -> m (Ptr ())

-- | Gets flags values packed in together with the datalist. See
--   datalistSetFlags.
--   
--   Since: 2.8
datalistGetFlags :: (HasCallStack, MonadIO m) => Data -> m Word32

-- | Retrieves the data element corresponding to keyId.
datalistIdGetData :: (HasCallStack, MonadIO m) => Data -> Word32 -> m (Ptr ())

-- | Turns on flag values for a data list. This function is used to keep a
--   small number of boolean flags in an object with a data list without
--   using any additional space. It is not generally useful except in
--   circumstances where space is very tight. (It is used in the base
--   GObject type, for example.)
--   
--   Since: 2.8
datalistSetFlags :: (HasCallStack, MonadIO m) => Data -> Word32 -> m ()

-- | Turns off flag values for a data list. See datalistUnsetFlags
--   
--   Since: 2.8
datalistUnsetFlags :: (HasCallStack, MonadIO m) => Data -> Word32 -> m ()

-- | Destroys the dataset, freeing all memory allocated, and calling any
--   destroy functions set for data elements.
datasetDestroy :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Calls the given function for each data element which is associated
--   with the given location. Note that this function is NOT thread-safe.
--   So unless datasetLocation can be protected from any
--   modifications during invocation of this function, it should not be
--   called.
--   
--   func can make changes to the dataset, but the
--   iteration will not reflect changes made during the
--   datasetForeach call, other than skipping over elements that are
--   removed.
datasetForeach :: (HasCallStack, MonadIO m) => Ptr () -> DataForeachFunc -> m ()

-- | Gets the data element corresponding to a GQuark.
datasetIdGetData :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())

-- | This is a variant of dgettext that allows specifying a locale
--   category instead of always using LC_MESSAGES. See
--   dgettext for more information about how this functions differs
--   from calling dcgettext() directly.
--   
--   Since: 2.26
dcgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Int32 -> m Text

-- | This function is a wrapper of dgettext() which does
--   not translate the message if the default domain as set with
--   textdomain() has no translations for the current
--   locale.
--   
--   The advantage of using this function over dgettext()
--   proper is that libraries using this function (like GTK+) will not use
--   translations if the application using the library does not have
--   translations for the current locale. This results in a consistent
--   English-only interface instead of one having partial translations. For
--   this feature to work, the call to textdomain() and
--   setlocale() should precede any dgettext
--   invocations. For GTK+, it means calling textdomain()
--   before gtk_init or its variants.
--   
--   This function disables translations if and only if upon its first call
--   all the following conditions hold:
--   
--   
--   
- domain is not Nothing
--   
- textdomain() has been called to set a default text
--   domain
--   
- there is no translations available for the default text domain and
--   the current locale
--   
- current locale is not "C" or any English locales (those starting
--   with "en_")
--   
--   
--   Note that this behavior may not be desired for example if an
--   application has its untranslated messages in a language other than
--   English. In those cases the application should call
--   textdomain() after initializing GTK+.
--   
--   Applications should normally not use this function directly, but use
--   the _() macro for translations.
--   
--   Since: 2.18
dgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m Text

-- | Compares two gpointer arguments and returns
--   True if they are equal. It can be passed to
--   g_hash_table_new() as the keyEqualFunc
--   parameter, when using opaque pointers compared by pointer value as
--   keys in a HashTable.
--   
--   This equality function is also appropriate for keys that are integers
--   stored in pointers, such as GINT_TO_POINTER (n).
directEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a gpointer to a hash value. It can be passed to
--   g_hash_table_new() as the hashFunc
--   parameter, when using opaque pointers compared by pointer value as
--   keys in a HashTable.
--   
--   This hash function is also appropriate for keys that are integers
--   stored in pointers, such as GINT_TO_POINTER (n).
directHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | This function is a wrapper of dngettext() which does
--   not translate the message if the default domain as set with
--   textdomain() has no translations for the current
--   locale.
--   
--   See dgettext for details of how this differs from
--   dngettext() proper.
--   
--   Since: 2.18
dngettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Text -> CULong -> m Text

-- | Compares the two gdouble values being pointed to and
--   returns True if they are equal. It can be passed to
--   g_hash_table_new() as the keyEqualFunc
--   parameter, when using non-Nothing pointers to doubles as keys
--   in a HashTable.
--   
--   Since: 2.22
doubleEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a gdouble to a hash value. It
--   can be passed to g_hash_table_new() as the
--   hashFunc parameter, It can be passed to
--   g_hash_table_new() as the hashFunc
--   parameter, when using non-Nothing pointers to doubles as keys
--   in a HashTable.
--   
--   Since: 2.22
doubleHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | This function is a variant of dgettext which supports a
--   disambiguating message context. GNU gettext uses the '\004' character
--   to separate the message context and message id in
--   msgctxtid. If 0 is passed as
--   msgidoffset, this function will fall back to trying to
--   use the deprecated convention of using "|" as a separation character.
--   
--   This uses dgettext internally. See that functions for
--   differences with dgettext() proper.
--   
--   Applications should normally not use this function directly, but use
--   the C_() macro for translations with context.
--   
--   Since: 2.16
dpgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Word64 -> m Text

-- | This function is a variant of dgettext which supports a
--   disambiguating message context. GNU gettext uses the '\004' character
--   to separate the message context and message id in
--   msgctxtid.
--   
--   This uses dgettext internally. See that functions for
--   differences with dgettext() proper.
--   
--   This function differs from C_() in that it is not a
--   macro and thus you may use non-string-literals as context and msgid
--   arguments.
--   
--   Since: 2.18
dpgettext2 :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Text -> m Text

-- | Returns the value of the environment variable variable
--   in the provided list envp.
--   
--   Since: 2.32
environGetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> m [Char]

-- | Sets the environment variable variable in the provided
--   list envp to value.
--   
--   Since: 2.32
environSetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> [Char] -> Bool -> m [[Char]]

-- | Removes the environment variable variable from the
--   provided environment envp.
--   
--   Since: 2.32
environUnsetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> m [[Char]]

-- | Gets a FileError constant based on the passed-in
--   errNo. For example, if you pass in EEXIST
--   this function returns G_FILE_ERROR_EXIST. Unlike
--   errno values, you can portably assume that all
--   FileError values will exist.
--   
--   Normally a FileError value goes into a GError returned
--   from a function that manipulates files. So you would use
--   fileErrorFromErrno when constructing a GError.
fileErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m FileError

-- | No description available in the introspection data.
fileErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Reads an entire file into allocated memory, with good error checking.
--   
--   If the call was successful, it returns True and sets
--   contents to the file contents and
--   length to the length of the file contents in bytes.
--   The string stored in contents will be nul-terminated,
--   so for text files you can pass Nothing for the
--   length argument. If the call was not successful, it
--   returns False and sets error. The error domain
--   is G_FILE_ERROR. Possible error codes are those in the
--   FileError enumeration. In the error case,
--   contents is set to Nothing and
--   length is set to zero.
fileGetContents :: (HasCallStack, MonadIO m) => [Char] -> m ByteString

-- | Opens a file for writing in the preferred directory for temporary
--   files (as returned by getTmpDir).
--   
--   tmpl should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, as the parameter to
--   g_mkstemp(). However, unlike these functions, the
--   template should only be a basename, no directory components are
--   allowed. If template is Nothing, a default template is used.
--   
--   Note that in contrast to g_mkstemp() (and
--   mkstemp()) tmpl is not modified, and
--   might thus be a read-only literal string.
--   
--   Upon success, and if nameUsed is non-Nothing,
--   the actual name used is returned in nameUsed. This
--   string should be freed with free when not needed any longer.
--   The returned name is in the GLib file name encoding.
fileOpenTmp :: (HasCallStack, MonadIO m) => Maybe [Char] -> m (Int32, [Char])

-- | Reads the contents of the symbolic link filename like
--   the POSIX readlink() function. The returned string is
--   in the encoding used for filenames. Use filenameToUtf8 to
--   convert it to UTF-8.
--   
--   Since: 2.4
fileReadLink :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Writes all of contents to a file named
--   filename, with good error checking. If a file called
--   filename already exists it will be overwritten.
--   
--   This write is atomic in the sense that it is first written to a
--   temporary file which is then renamed to the final name. Notes:
--   
--   
--   
- On UNIX, if filename already exists hard links to
--   filename will break. Also since the file is recreated,
--   existing permissions, access control lists, metadata etc. may be lost.
--   If filename is a symbolic link, the link itself will
--   be replaced, not the linked file.
--   
- On UNIX, if filename already exists and is
--   non-empty, and if the system supports it (via a journalling filesystem
--   or equivalent), the fsync() call (or equivalent) will
--   be used to ensure atomic replacement: filename will
--   contain either its old contents or contents, even in
--   the face of system power loss, the disk being unsafely removed,
--   etc.
--   
- On UNIX, if filename does not already exist or is
--   empty, there is a possibility that system power loss etc. after
--   calling this function will leave filename empty or
--   full of NUL bytes, depending on the underlying filesystem.
--   
- On Windows renaming a file will not remove an existing file with
--   the new name, so on Windows there is a race condition between the
--   existing file being removed and the temporary file being renamed.
--   
- On Windows there is no way to remove a file that is open to some
--   process, or mapped into memory. Thus, this function will fail if
--   filename already exists and is open.
--   
--   
--   If the call was successful, it returns True. If the call was
--   not successful, it returns False and sets
--   error. The error domain is
--   G_FILE_ERROR. Possible error codes are those in the
--   FileError enumeration.
--   
--   Note that the name for the temporary file is constructed by appending
--   up to 7 characters to filename.
--   
--   Since: 2.8
fileSetContents :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> m ()

-- | Returns True if any of the tests in the bitfield
--   test are True. For example,
--   (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) will return
--   True if the file exists; the check whether it's a directory
--   doesn't matter since the existence test is True. With the
--   current set of available tests, there's no point passing in more than
--   one test at a time.
--   
--   Apart from FileTestIsSymlink all tests follow symbolic links,
--   so for a symbolic link to a regular file fileTest will return
--   True for both FileTestIsSymlink and
--   FileTestIsRegular.
--   
--   Note, that for a dangling symbolic link fileTest will return
--   True for FileTestIsSymlink and False for all
--   other flags.
--   
--   You should never use fileTest to test whether it is safe to
--   perform an operation, because there is always the possibility of the
--   condition changing before you actually perform the operation. For
--   example, you might think you could use FileTestIsSymlink to
--   know whether it is safe to write to a file without being tricked into
--   writing into a different location. It doesn't work!
--   
--   
C code
--   
--   
--   // DON'T DO THIS
--   if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK))
--     {
--       fd = g_open (filename, O_WRONLY);
--       // write to fd
--     }
--   
--   
--   Another thing to note is that FileTestExists and
--   FileTestIsExecutable are implemented using the
--   access() system call. This usually doesn't matter, but
--   if your program is setuid or setgid it means that these tests will
--   give you the answer for the real user ID and group ID, rather than the
--   effective user ID and group ID.
--   
--   On Windows, there are no symlinks, so testing for
--   FileTestIsSymlink will always return False. Testing for
--   FileTestIsExecutable will just check that the file exists and
--   its name indicates that it is executable, checking for well-known
--   extensions and those listed in the PATHEXT environment
--   variable.
fileTest :: (HasCallStack, MonadIO m) => [Char] -> [FileTest] -> m Bool

-- | Returns the display basename for the particular filename, guaranteed
--   to be valid UTF-8. The display name might not be identical to the
--   filename, for instance there might be problems converting it to UTF-8,
--   and some files can be translated in the display.
--   
--   If GLib cannot make sense of the encoding of filename,
--   as a last resort it replaces unknown characters with U+FFFD, the
--   Unicode replacement character. You can search the result for the UTF-8
--   encoding of this character (which is "\357\277\275" in octal notation)
--   to find out if filename was in an invalid encoding.
--   
--   You must pass the whole absolute pathname to this functions so that
--   translation of well known locations can be done.
--   
--   This function is preferred over filenameDisplayName if you know
--   the whole path, as it allows translation.
--   
--   Since: 2.6
filenameDisplayBasename :: (HasCallStack, MonadIO m) => [Char] -> m Text

-- | Converts a filename into a valid UTF-8 string. The conversion is not
--   necessarily reversible, so you should keep the original around and use
--   the return value of this function only for display purposes. Unlike
--   filenameToUtf8, the result is guaranteed to be
--   non-Nothing even if the filename actually isn't in the GLib
--   file name encoding.
--   
--   If GLib cannot make sense of the encoding of filename,
--   as a last resort it replaces unknown characters with U+FFFD, the
--   Unicode replacement character. You can search the result for the UTF-8
--   encoding of this character (which is "\357\277\275" in octal notation)
--   to find out if filename was in an invalid encoding.
--   
--   If you know the whole pathname of the file you should use
--   filenameDisplayBasename, since that allows location-based
--   translation of filenames.
--   
--   Since: 2.6
filenameDisplayName :: (HasCallStack, MonadIO m) => [Char] -> m Text

-- | Converts an escaped ASCII-encoded URI to a local filename in the
--   encoding used for filenames.
filenameFromUri :: (HasCallStack, MonadIO m) => Text -> m ([Char], Maybe Text)

-- | Converts a string from UTF-8 to the encoding GLib uses for filenames.
--   Note that on Windows GLib uses UTF-8 for filenames; on other
--   platforms, this function indirectly depends on the [current
--   locale][setlocale].
--   
--   The input string shall not contain nul characters even if the
--   len argument is positive. A nul character found inside
--   the string will result in error ConvertErrorIllegalSequence. If
--   the filename encoding is not UTF-8 and the conversion output contains
--   a nul character, the error ConvertErrorEmbeddedNul is set and
--   the function returns Nothing.
filenameFromUtf8 :: (HasCallStack, MonadIO m) => Text -> Int64 -> m ([Char], Word64, Word64)

-- | Converts an absolute filename to an escaped ASCII-encoded URI, with
--   the path component following Section 3.3. of RFC 2396.
filenameToUri :: (HasCallStack, MonadIO m) => [Char] -> Maybe Text -> m Text

-- | Converts a string which is in the encoding used by GLib for filenames
--   into a UTF-8 string. Note that on Windows GLib uses UTF-8 for
--   filenames; on other platforms, this function indirectly depends on the
--   [current locale][setlocale].
--   
--   The input string shall not contain nul characters even if the
--   len argument is positive. A nul character found inside
--   the string will result in error ConvertErrorIllegalSequence. If
--   the source encoding is not UTF-8 and the conversion output contains a
--   nul character, the error ConvertErrorEmbeddedNul is set and the
--   function returns Nothing. Use convert to produce output
--   that may contain embedded nul characters.
filenameToUtf8 :: (HasCallStack, MonadIO m) => [Char] -> Int64 -> m (Text, Word64, Word64)

-- | Locates the first executable named program in the
--   user's path, in the same way that execvp() would
--   locate it. Returns an allocated string with the absolute path name, or
--   Nothing if the program is not found in the path. If
--   program is already an absolute path, returns a copy of
--   program if program exists and is
--   executable, and Nothing otherwise.
--   
--   On Windows, if program does not have a file type
--   suffix, tries with the suffixes .exe, .cmd, .bat and .com, and the
--   suffixes in the PATHEXT environment variable.
--   
--   On Windows, it looks for the file in the same way as
--   CreateProcess() would. This means first in the
--   directory where the executing program was loaded from, then in the
--   current directory, then in the Windows 32-bit system directory, then
--   in the Windows directory, and finally in the directories in the
--   PATH environment variable. If the program is found, the
--   return value contains the full name including the type suffix.
findProgramInPath :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Formats a size (for example the size of a file) into a human readable
--   string. Sizes are rounded to the nearest size prefix (kB, MB, GB) and
--   are displayed rounded to the nearest tenth. E.g. the file size 3292528
--   bytes will be converted into the string "3.2 MB". The returned string
--   is UTF-8, and may use a non-breaking space to separate the number and
--   units, to ensure they aren’t separated when line wrapped.
--   
--   The prefix units base is 1000 (i.e. 1 kB is 1000 bytes).
--   
--   This string should be freed with free when not needed any
--   longer.
--   
--   See formatSizeFull for more options about how the size might be
--   formatted.
--   
--   Since: 2.30
formatSize :: (HasCallStack, MonadIO m) => Word64 -> m Text

-- | Formats a size (for example the size of a file) into a human readable
--   string. Sizes are rounded to the nearest size prefix (KB, MB, GB) and
--   are displayed rounded to the nearest tenth. E.g. the file size 3292528
--   bytes will be converted into the string "3.1 MB".
--   
--   The prefix units base is 1024 (i.e. 1 KB is 1024 bytes).
--   
--   This string should be freed with free when not needed any
--   longer.
--   
--   Since: 2.16

-- | Deprecated: (Since version 2.30)This function is broken due to its
--   use of SI suffixes to denote IEC units. Use formatSize
--   instead.
formatSizeForDisplay :: (HasCallStack, MonadIO m) => Int64 -> m Text

-- | Formats a size.
--   
--   This function is similar to formatSize but allows for flags
--   that modify the output. See FormatSizeFlags.
--   
--   Since: 2.30
formatSizeFull :: (HasCallStack, MonadIO m) => Word64 -> [FormatSizeFlags] -> m Text

-- | Frees the memory pointed to by mem.
--   
--   If mem is Nothing it simply returns, so there
--   is no need to check mem against Nothing before
--   calling this function.
free :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Gets a human-readable name for the application, as set by
--   setApplicationName. This name should be localized if possible,
--   and is intended for display to the user. Contrast with
--   getPrgname, which gets a non-localized name. If
--   setApplicationName has not been called, returns the result of
--   getPrgname (which may be Nothing if setPrgname
--   has also not been called).
--   
--   Since: 2.2
getApplicationName :: (HasCallStack, MonadIO m) => m Text

-- | Obtains the character set for the [current locale][setlocale]; you
--   might use this character set as an argument to convert, to
--   convert from the current locale's encoding to some other encoding.
--   (Frequently localeToUtf8 and localeFromUtf8 are nice
--   shortcuts, though.)
--   
--   On Windows the character set returned by this function is the
--   so-called system default ANSI code-page. That is the character set
--   used by the "narrow" versions of C library and Win32 functions that
--   handle file names. It might be different from the character set used
--   by the C library's current locale.
--   
--   On Linux, the character set is found by consulting
--   nl_langinfo() if available. If not, the environment
--   variables LC_ALL, LC_CTYPE, LANG and
--   CHARSET are queried in order.
--   
--   The return value is True if the locale's encoding is UTF-8, in
--   that case you can perhaps avoid calling convert.
--   
--   The string returned in charset is not allocated, and
--   should not be freed.
getCharset :: (HasCallStack, MonadIO m) => m (Bool, Text)

-- | Gets the character set for the current locale.
getCodeset :: (HasCallStack, MonadIO m) => m Text

-- | Gets the current directory.
--   
--   The returned string should be freed when no longer needed. The
--   encoding of the returned string is system defined. On Windows, it is
--   always UTF-8.
--   
--   Since GLib 2.40, this function will return the value of the "PWD"
--   environment variable if it is set and it happens to be the same as the
--   current directory. This can make a difference in the case that the
--   current directory is the target of a symbolic link.
getCurrentDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Equivalent to the UNIX gettimeofday() function, but
--   portable.
--   
--   You may find getRealTime to be more convenient.
getCurrentTime :: (HasCallStack, MonadIO m) => TimeVal -> m ()

-- | Gets the list of environment variables for the current process.
--   
--   The list is Nothing terminated and each item in the list is of
--   the form 'NAME=VALUE'.
--   
--   This is equivalent to direct access to the 'environ' global variable,
--   except portable.
--   
--   The return value is freshly allocated and it should be freed with
--   strfreev when it is no longer needed.
--   
--   Since: 2.28
getEnviron :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Determines the preferred character sets used for filenames. The first
--   character set from the charsets is the filename
--   encoding, the subsequent character sets are used when trying to
--   generate a displayable representation of a filename, see
--   filenameDisplayName.
--   
--   On Unix, the character sets are determined by consulting the
--   environment variables G_FILENAME_ENCODING and
--   G_BROKEN_FILENAMES. On Windows, the character set used in the
--   GLib API is always UTF-8 and said environment variables have no
--   effect.
--   
--   G_FILENAME_ENCODING may be set to a comma-separated list of
--   character set names. The special token "@locale" is taken to mean the
--   character set for the [current locale][setlocale]. If
--   G_FILENAME_ENCODING is not set, but
--   G_BROKEN_FILENAMES is, the character set of the current
--   locale is taken as the filename encoding. If neither environment
--   variable is set, UTF-8 is taken as the filename encoding, but the
--   character set of the current locale is also put in the list of
--   encodings.
--   
--   The returned charsets belong to GLib and must not be
--   freed.
--   
--   Note that on Unix, regardless of the locale character set or
--   G_FILENAME_ENCODING value, the actual file names present on a
--   system might be in any random encoding or just gibberish.
--   
--   Since: 2.6
getFilenameCharsets :: (HasCallStack, MonadIO m) => m (Bool, [Text])

-- | Gets the current user's home directory.
--   
--   As with most UNIX tools, this function will return the value of the
--   HOME environment variable if it is set to an existing
--   absolute path name, falling back to the passwd file in the
--   case that it is unset.
--   
--   If the path given in HOME is non-absolute, does not exist, or
--   is not a directory, the result is undefined.
--   
--   Before version 2.36 this function would ignore the HOME
--   environment variable, taking the value from the passwd
--   database instead. This was changed to increase the compatibility of
--   GLib with other programs (and the XDG basedir specification) and to
--   increase testability of programs based on GLib (by making it easier to
--   run them from test frameworks).
--   
--   If your program has a strong requirement for either the new or the old
--   behaviour (and if you don't wish to increase your GLib dependency to
--   ensure that the new behaviour is in effect) then you should either
--   directly check the HOME environment variable yourself or
--   unset it before calling any functions in GLib.
getHomeDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Return a name for the machine.
--   
--   The returned name is not necessarily a fully-qualified domain name, or
--   even present in DNS or some other name service at all. It need not
--   even be unique on your local network or site, but usually it is.
--   Callers should not rely on the return value having any specific
--   properties like uniqueness for security purposes. Even if the name of
--   the machine is changed while an application is running, the return
--   value from this function does not change. The returned string is owned
--   by GLib and should not be modified or freed. If no name can be
--   determined, a default fixed string "localhost" is returned.
--   
--   The encoding of the returned string is UTF-8.
--   
--   Since: 2.8
getHostName :: (HasCallStack, MonadIO m) => m Text

-- | Computes a list of applicable locale names, which can be used to e.g.
--   construct locale-dependent filenames or search paths. The returned
--   list is sorted from most desirable to least desirable and always
--   contains the default locale "C".
--   
--   For example, if LANGUAGE=de:en_US, then the returned list is "de",
--   "en_US", "en", "C".
--   
--   This function consults the environment variables LANGUAGE,
--   LC_ALL, LC_MESSAGES and LANG to find the
--   list of locales specified by the user.
--   
--   Since: 2.6
getLanguageNames :: (HasCallStack, MonadIO m) => m [Text]

-- | Computes a list of applicable locale names with a locale category
--   name, which can be used to construct the fallback locale-dependent
--   filenames or search paths. The returned list is sorted from most
--   desirable to least desirable and always contains the default locale
--   "C".
--   
--   This function consults the environment variables LANGUAGE,
--   LC_ALL, categoryName, and LANG to
--   find the list of locales specified by the user.
--   
--   getLanguageNames returns
--   g_get_language_names_with_category("LC_MESSAGES").
--   
--   Since: 2.58
getLanguageNamesWithCategory :: (HasCallStack, MonadIO m) => Text -> m [Text]

-- | Returns a list of derived variants of locale, which
--   can be used to e.g. construct locale-dependent filenames or search
--   paths. The returned list is sorted from most desirable to least
--   desirable. This function handles territory, charset and extra locale
--   modifiers.
--   
--   For example, if locale is "fr_BE", then the returned
--   list is "fr_BE", "fr".
--   
--   If you need the list of variants for the current locale, use
--   getLanguageNames.
--   
--   Since: 2.28
getLocaleVariants :: (HasCallStack, MonadIO m) => Text -> m [Text]

-- | Queries the system monotonic time.
--   
--   The monotonic clock will always increase and doesn't suffer
--   discontinuities when the user (or NTP) changes the system time. It may
--   or may not continue to tick during times where the machine is
--   suspended.
--   
--   We try to use the clock that corresponds as closely as possible to the
--   passage of time as measured by system calls such as
--   poll() but it may not always be possible to do this.
--   
--   Since: 2.28
getMonotonicTime :: (HasCallStack, MonadIO m) => m Int64

-- | Determine the approximate number of threads that the system will
--   schedule simultaneously for this process. This is intended to be used
--   as a parameter to g_thread_pool_new() for CPU bound
--   tasks and similar cases.
--   
--   Since: 2.36
getNumProcessors :: (HasCallStack, MonadIO m) => m Word32

-- | Gets the name of the program. This name should not be localized, in
--   contrast to getApplicationName.
--   
--   If you are using GApplication the program name is set
--   in g_application_run(). In case of GDK or GTK+ it is
--   set in gdk_init(), which is called by
--   gtk_init() and the
--   GtkApplication::startup handler. The program name is
--   found by taking the last component of argv[0].
getPrgname :: (HasCallStack, MonadIO m) => m Text

-- | Gets the real name of the user. This usually comes from the user's
--   entry in the passwd file. The encoding of the returned string
--   is system-defined. (On Windows, it is, however, always UTF-8.) If the
--   real user name cannot be determined, the string "Unknown" is returned.
getRealName :: (HasCallStack, MonadIO m) => m [Char]

-- | Queries the system wall-clock time.
--   
--   This call is functionally equivalent to getCurrentTime except
--   that the return value is often more convenient than dealing with a
--   TimeVal.
--   
--   You should only use this call if you are actually interested in the
--   real wall-clock time. getMonotonicTime is probably more useful
--   for measuring intervals.
--   
--   Since: 2.28
getRealTime :: (HasCallStack, MonadIO m) => m Int64

-- | Returns an ordered list of base directories in which to access
--   system-wide configuration information.
--   
--   On UNIX platforms this is determined using the mechanisms described in
--   the XDG Base Directory Specification. In this case the list of
--   directories retrieved will be XDG_CONFIG_DIRS.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_CONFIG_DIRS is defined. If XDG_CONFIG_DIRS is
--   undefined, the directory that contains application data for all users
--   is used instead. A typical path is C:\Documents and Settings\All
--   Users\Application Data. This folder is used for application data
--   that is not user specific. For example, an application can store a
--   spell-check dictionary, a database of clip art, or a log file in the
--   CSIDL_COMMON_APPDATA folder. This information will not roam and is
--   available to anyone using the computer.
--   
--   Since: 2.6
getSystemConfigDirs :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Returns an ordered list of base directories in which to access
--   system-wide application data.
--   
--   On UNIX platforms this is determined using the mechanisms described in
--   the XDG Base Directory Specification In this case the list of
--   directories retrieved will be XDG_DATA_DIRS.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_DATA_DIRS is defined. If XDG_DATA_DIRS is
--   undefined, the first elements in the list are the Application Data and
--   Documents folders for All Users. (These can be determined only on
--   Windows 2000 or later and are not present in the list on other Windows
--   versions.) See documentation for CSIDL_COMMON_APPDATA and
--   CSIDL_COMMON_DOCUMENTS.
--   
--   Then follows the "share" subfolder in the installation folder for the
--   package containing the DLL that calls this function, if it can be
--   determined.
--   
--   Finally the list contains the "share" subfolder in the installation
--   folder for GLib, and in the installation folder for the package the
--   application's .exe file belongs to.
--   
--   The installation folders above are determined by looking up the folder
--   where the module (DLL or EXE) in question is located. If the folder's
--   name is "bin", its parent is used, otherwise the folder itself.
--   
--   Note that on Windows the returned list can vary depending on where
--   this function is called.
--   
--   Since: 2.6
getSystemDataDirs :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Gets the directory to use for temporary files.
--   
--   On UNIX, this is taken from the TMPDIR environment variable.
--   If the variable is not set, P_tmpdir is used, as defined by
--   the system C library. Failing that, a hard-coded default of "/tmp" is
--   returned.
--   
--   On Windows, the TEMP environment variable is used, with the
--   root directory of the Windows installation (eg: "C:\") used as a
--   default.
--   
--   The encoding of the returned string is system-defined. On Windows, it
--   is always UTF-8. The return value is never Nothing or the empty
--   string.
getTmpDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Returns a base directory in which to store non-essential, cached data
--   specific to particular user.
--   
--   On UNIX platforms this is determined using the mechanisms described in
--   the XDG Base Directory Specification. In this case the
--   directory retrieved will be XDG_CACHE_HOME.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_CACHE_HOME is defined. If XDG_CACHE_HOME is
--   undefined, the directory that serves as a common repository for
--   temporary Internet files is used instead. A typical path is
--   C:\Documents and Settings\username\Local Settings\Temporary
--   Internet Files. See the documentation for
--   `CSIDL_INTERNET_CACHE`.
--   
--   Since: 2.6
getUserCacheDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Returns a base directory in which to store user-specific application
--   configuration information such as user preferences and settings.
--   
--   On UNIX platforms this is determined using the mechanisms described in
--   the XDG Base Directory Specification. In this case the
--   directory retrieved will be XDG_CONFIG_HOME.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_CONFIG_HOME is defined. If XDG_CONFIG_HOME is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the documentation for
--   `CSIDL_LOCAL_APPDATA`. Note that in this case on Windows it will
--   be the same as what getUserDataDir returns.
--   
--   Since: 2.6
getUserConfigDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Returns a base directory in which to access application data such as
--   icons that is customized for a particular user.
--   
--   On UNIX platforms this is determined using the mechanisms described in
--   the XDG Base Directory Specification. In this case the
--   directory retrieved will be XDG_DATA_HOME.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_DATA_HOME is defined. If XDG_DATA_HOME is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the documentation for
--   `CSIDL_LOCAL_APPDATA`. Note that in this case on Windows it will
--   be the same as what getUserConfigDir returns.
--   
--   Since: 2.6
getUserDataDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Gets the user name of the current user. The encoding of the returned
--   string is system-defined. On UNIX, it might be the preferred file name
--   encoding, or something else, and there is no guarantee that it is even
--   consistent on a machine. On Windows, it is always UTF-8.
getUserName :: (HasCallStack, MonadIO m) => m [Char]

-- | Returns a directory that is unique to the current user on the local
--   system.
--   
--   This is determined using the mechanisms described in the XDG Base
--   Directory Specification. This is the directory specified in the
--   XDG_RUNTIME_DIR environment variable. In the case that this
--   variable is not set, we return the value of getUserCacheDir,
--   after verifying that it exists.
--   
--   Since: 2.28
getUserRuntimeDir :: (HasCallStack, MonadIO m) => m [Char]

-- | Returns the full path of a special directory using its logical id.
--   
--   On UNIX this is done using the XDG special user directories. For
--   compatibility with existing practise,
--   UserDirectoryDirectoryDesktop falls back to
--   $HOME/Desktop when XDG special user directories have not been
--   set up.
--   
--   Depending on the platform, the user might be able to change the path
--   of the special directory without requiring the session to restart;
--   GLib will not reflect any change once the special directories are
--   loaded.
--   
--   Since: 2.14
getUserSpecialDir :: (HasCallStack, MonadIO m) => UserDirectory -> m [Char]

-- | Returns the value of an environment variable.
--   
--   On UNIX, the name and value are byte strings which might or might not
--   be in some consistent character set and encoding. On Windows, they are
--   in UTF-8. On Windows, in case the environment variable's value
--   contains references to other environment variables, they are expanded.
getenv :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Tests if hostname contains segments with an
--   ASCII-compatible encoding of an Internationalized Domain Name. If this
--   returns True, you should decode the hostname with
--   hostnameToUnicode before displaying it to the user.
--   
--   Note that a hostname might contain a mix of encoded and unencoded
--   segments, and so it is possible for hostnameIsNonAscii and
--   hostnameIsAsciiEncoded to both return True for a name.
--   
--   Since: 2.22
hostnameIsAsciiEncoded :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Tests if hostname is the string form of an IPv4 or
--   IPv6 address. (Eg, "192.168.0.1".)
--   
--   Since: 2.22
hostnameIsIpAddress :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Tests if hostname contains Unicode characters. If this
--   returns True, you need to encode the hostname with
--   hostnameToAscii before using it in non-IDN-aware contexts.
--   
--   Note that a hostname might contain a mix of encoded and unencoded
--   segments, and so it is possible for hostnameIsNonAscii and
--   hostnameIsAsciiEncoded to both return True for a name.
--   
--   Since: 2.22
hostnameIsNonAscii :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Converts hostname to its canonical ASCII form; an
--   ASCII-only string containing no uppercase letters and not ending with
--   a trailing dot.
--   
--   Since: 2.22
hostnameToAscii :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Converts hostname to its canonical presentation form;
--   a UTF-8 string in Unicode normalization form C, containing no
--   uppercase letters, no forbidden characters, and no ASCII-encoded
--   segments, and not ending with a trailing dot.
--   
--   Of course if hostname is not an internationalized
--   hostname, then the canonical presentation form will be entirely ASCII.
--   
--   Since: 2.22
hostnameToUnicode :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Adds a function to be called whenever there are no higher priority
--   events pending. If the function returns False it is
--   automatically removed from the list of event sources and will not be
--   called again.
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   data.
--   
--   This internally creates a main loop source using idleSourceNew
--   and attaches it to the global MainContext using
--   sourceAttach, so the callback will be invoked in whichever
--   thread is running that main context. You can do these steps manually
--   if you need greater control or to use a custom main context.
idleAdd :: (HasCallStack, MonadIO m) => Int32 -> SourceFunc -> m Word32

-- | Removes the idle function with the given data.
idleRemoveByData :: (HasCallStack, MonadIO m) => Ptr () -> m Bool

-- | Creates a new idle source.
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed. Note that the default priority for idle
--   sources is PRIORITY_DEFAULT_IDLE, as compared to other sources
--   which have a default priority of PRIORITY_DEFAULT.
idleSourceNew :: (HasCallStack, MonadIO m) => m Source

-- | Compares the two gint64 values being pointed to and
--   returns True if they are equal. It can be passed to
--   g_hash_table_new() as the keyEqualFunc
--   parameter, when using non-Nothing pointers to 64-bit integers
--   as keys in a HashTable.
--   
--   Since: 2.22
int64Equal :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a gint64 to a hash value.
--   
--   It can be passed to g_hash_table_new() as the
--   hashFunc parameter, when using non-Nothing
--   pointers to 64-bit integer values as keys in a HashTable.
--   
--   Since: 2.22
int64Hash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Compares the two gint values being pointed to and
--   returns True if they are equal. It can be passed to
--   g_hash_table_new() as the keyEqualFunc
--   parameter, when using non-Nothing pointers to integers as keys
--   in a HashTable.
--   
--   Note that this function acts on pointers to gint, not
--   on gint directly: if your hash table's keys are of the
--   form GINT_TO_POINTER (n), use directEqual instead.
intEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a gint to a hash value. It can
--   be passed to g_hash_table_new() as the
--   hashFunc parameter, when using non-Nothing
--   pointers to integer values as keys in a HashTable.
--   
--   Note that this function acts on pointers to gint, not
--   on gint directly: if your hash table's keys are of the
--   form GINT_TO_POINTER (n), use directHash instead.
intHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Returns a canonical representation for string.
--   Interned strings can be compared for equality by comparing the
--   pointers, instead of using strcmp().
--   internStaticString does not copy the string, therefore
--   string must not be freed or modified.
--   
--   Since: 2.10
internStaticString :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Returns a canonical representation for string.
--   Interned strings can be compared for equality by comparing the
--   pointers, instead of using strcmp().
--   
--   Since: 2.10
internString :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Adds the IOChannel into the default main loop context with the
--   given priority.
--   
--   This internally creates a main loop source using ioCreateWatch
--   and attaches it to the main loop context with sourceAttach. You
--   can do these steps manually if you need greater control.
ioAddWatch :: (HasCallStack, MonadIO m) => IOChannel -> Int32 -> [IOCondition] -> IOFunc -> m Word32

-- | Creates a Source that's dispatched when
--   condition is met for the given
--   channel. For example, if condition is
--   G_IO_IN, the source will be dispatched when there's
--   data available for reading.
--   
--   g_io_add_watch() is a simpler interface to this same
--   functionality, for the case where you want to add the source to the
--   default main loop context at the default priority.
--   
--   On Windows, polling a Source created to watch a channel for a
--   socket puts the socket in non-blocking mode. This is a side-effect of
--   the implementation and unavoidable.
ioCreateWatch :: (HasCallStack, MonadIO m) => IOChannel -> [IOCondition] -> m Source

-- | Gets the names of all variables set in the environment.
--   
--   Programs that want to be portable to Windows should typically use this
--   function and getenv instead of using the environ array from the
--   C library directly. On Windows, the strings in the environ array are
--   in system codepage encoding, while in most of the typical use cases
--   for environment variables in GLib-using programs you want the UTF-8
--   encoding that this function and getenv provide.
--   
--   Since: 2.8
listenv :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Converts a string from UTF-8 to the encoding used for strings by the C
--   runtime (usually the same as that used by the operating system) in the
--   [current locale][setlocale]. On Windows this means the system
--   codepage.
--   
--   The input string shall not contain nul characters even if the
--   len argument is positive. A nul character found inside
--   the string will result in error ConvertErrorIllegalSequence.
--   Use convert to convert input that may contain embedded nul
--   characters.
localeFromUtf8 :: (HasCallStack, MonadIO m) => Text -> Int64 -> m (ByteString, Word64)

-- | Converts a string which is in the encoding used for strings by the C
--   runtime (usually the same as that used by the operating system) in the
--   [current locale][setlocale] into a UTF-8 string.
--   
--   If the source encoding is not UTF-8 and the conversion output contains
--   a nul character, the error ConvertErrorEmbeddedNul is set and
--   the function returns Nothing. If the source encoding is UTF-8,
--   an embedded nul character is treated with the
--   ConvertErrorIllegalSequence error for backward compatibility
--   with earlier versions of this library. Use convert to produce
--   output that may contain embedded nul characters.
localeToUtf8 :: (HasCallStack, MonadIO m) => ByteString -> m (Text, Word64, Word64)

-- | The default log handler set up by GLib;
--   g_log_set_default_handler() allows to install an
--   alternate default log handler. This is used if no log handler has been
--   set for the particular log domain and log level combination. It
--   outputs the message to stderr or stdout and if the log level is fatal
--   it calls G_BREAKPOINT(). It automatically prints a
--   new-line character after the message, so one does not need to be
--   manually included in message.
--   
--   The behavior of this log handler can be influenced by a number of
--   environment variables:
--   
--   
--   
- G_MESSAGES_PREFIXED: A :-separated list of log levels for
--   which messages should be prefixed by the program name and PID of the
--   aplication.
--   
- G_MESSAGES_DEBUG: A space-separated list of log domains
--   for which debug and informational messages are printed. By default
--   these messages are not printed.
--   
--   
--   stderr is used for levels LogLevelFlagsLevelError,
--   LogLevelFlagsLevelCritical, LogLevelFlagsLevelWarning
--   and LogLevelFlagsLevelMessage. stdout is used for the rest.
--   
--   This has no effect if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
logDefaultHandler :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> Maybe Text -> Ptr () -> m ()

-- | Removes the log handler.
--   
--   This has no effect if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
logRemoveHandler :: (HasCallStack, MonadIO m) => Text -> Word32 -> m ()

-- | Sets the message levels which are always fatal, in any log domain.
--   When a message with any of these levels is logged the program
--   terminates. You can only set the levels defined by GLib to be fatal.
--   LogLevelFlagsLevelError is always fatal.
--   
--   You can also make some message levels fatal at runtime by setting the
--   G_DEBUG environment variable (see Running GLib
--   Applications).
--   
--   Libraries should not call this function, as it affects all messages
--   logged by a process, including those from other libraries.
--   
--   Structured log messages (using g_log_structured() and
--   logStructuredArray) are fatal only if the default log writer is
--   used; otherwise it is up to the writer function to determine which log
--   messages are fatal. See [Using Structured
--   Logging][using-structured-logging].
logSetAlwaysFatal :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> m [LogLevelFlags]

-- | Sets the log levels which are fatal in the given domain.
--   LogLevelFlagsLevelError is always fatal.
--   
--   This has no effect on structured log messages (using
--   g_log_structured() or logStructuredArray). To
--   change the fatal behaviour for specific log messages, programs must
--   install a custom log writer function using logSetWriterFunc.
--   See [Using Structured Logging][using-structured-logging].
--   
--   This function is mostly intended to be used with
--   LogLevelFlagsLevelCritical. You should typically not set
--   LogLevelFlagsLevelWarning, LogLevelFlagsLevelMessage,
--   LogLevelFlagsLevelInfo or LogLevelFlagsLevelDebug as
--   fatal except inside of test programs.
logSetFatalMask :: (HasCallStack, MonadIO m) => Text -> [LogLevelFlags] -> m [LogLevelFlags]

-- | Like g_log_set_handler(), but takes a destroy notify
--   for the userData.
--   
--   This has no effect if structured logging is enabled; see [Using
--   Structured Logging][using-structured-logging].
--   
--   Since: 2.46
logSetHandler :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> LogFunc -> m Word32

-- | Log a message with structured data. The message will be passed through
--   to the log writer set by the application using
--   logSetWriterFunc. If the message is fatal (i.e. its log level
--   is LogLevelFlagsLevelError), the program will be aborted at the
--   end of this function.
--   
--   See g_log_structured() for more documentation.
--   
--   This assumes that logLevel is already present in
--   fields (typically as the PRIORITY field).
--   
--   Since: 2.50
logStructuredArray :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> m ()

-- | Log a message with structured data, accepting the data within a
--   GVariant. This version is especially useful for use in other
--   languages, via introspection.
--   
--   The only mandatory item in the fields dictionary is
--   the "MESSAGE" which must contain the text shown to the user.
--   
--   The values in the fields dictionary are likely to be
--   of type String (G_VARIANT_TYPE_STRING). Array of bytes
--   (G_VARIANT_TYPE_BYTESTRING) is also supported. In this
--   case the message is handled as binary and will be forwarded to the log
--   writer as such. The size of the array should not be higher than
--   G_MAXSSIZE. Otherwise it will be truncated to this
--   size. For other types variantPrint will be used to convert the
--   value into a string.
--   
--   For more details on its usage and about the parameters, see
--   g_log_structured().
--   
--   Since: 2.50
logVariant :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> GVariant -> m ()

-- | Format a structured log message and output it to the default log
--   destination for the platform. On Linux, this is typically the systemd
--   journal, falling back to stdout or stderr if running
--   from the terminal or if output is being redirected to a file.
--   
--   Support for other platform-specific logging mechanisms may be added in
--   future. Distributors of GLib may modify this function to impose their
--   own (documented) platform-specific log writing policies.
--   
--   This is suitable for use as a LogWriterFunc, and is the default
--   writer used if no other is set using logSetWriterFunc.
--   
--   As with logDefaultHandler, this function drops debug and
--   informational messages unless their log domain (or all) is
--   listed in the space-separated G_MESSAGES_DEBUG environment
--   variable.
--   
--   Since: 2.50
logWriterDefault :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Format a structured log message as a string suitable for outputting to
--   the terminal (or elsewhere). This will include the values of all
--   fields it knows how to interpret, which includes MESSAGE and
--   GLIB_DOMAIN (see the documentation for
--   g_log_structured()). It does not include values from
--   unknown fields.
--   
--   The returned string does **not** have a trailing new-line character.
--   It is encoded in the character set of the current locale, which is not
--   necessarily UTF-8.
--   
--   Since: 2.50
logWriterFormatFields :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Bool -> m Text

-- | Check whether the given outputFd file descriptor is a
--   connection to the systemd journal, or something else (like a log file
--   or stdout or stderr).
--   
--   Invalid file descriptors are accepted and return False, which
--   allows for the following construct without needing any additional
--   error handling:
--   
--   
C code
--   
--   
--   is_journald = g_log_writer_is_journald (fileno (stderr));
--   
--   
--   Since: 2.50
logWriterIsJournald :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Format a structured log message and send it to the systemd journal as
--   a set of key–value pairs. All fields are sent to the journal, but if a
--   field has length zero (indicating program-specific data) then only its
--   key will be sent.
--   
--   This is suitable for use as a LogWriterFunc.
--   
--   If GLib has been compiled without systemd support, this function is
--   still defined, but will always return LogWriterOutputUnhandled.
--   
--   Since: 2.50
logWriterJournald :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Format a structured log message and print it to either stdout
--   or stderr, depending on its log level.
--   LogLevelFlagsLevelInfo and LogLevelFlagsLevelDebug
--   messages are sent to stdout; all other log levels are sent to
--   stderr. Only fields which are understood by this function are
--   included in the formatted string which is printed.
--   
--   If the output stream supports ANSI color escape sequences, they will
--   be used in the output.
--   
--   A trailing new-line character is added to the log message when it is
--   printed.
--   
--   This is suitable for use as a LogWriterFunc.
--   
--   Since: 2.50
logWriterStandardStreams :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Check whether the given outputFd file descriptor
--   supports ANSI color escape sequences. If so, they can safely be used
--   when formatting log messages.
--   
--   Since: 2.50
logWriterSupportsColor :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Returns the currently firing source for this thread.
--   
--   Since: 2.12
mainCurrentSource :: (HasCallStack, MonadIO m) => m Source

-- | Returns the depth of the stack of calls to mainContextDispatch
--   on any MainContext in the current thread. That is, when called
--   from the toplevel, it gives 0. When called from within a callback from
--   mainContextIteration (or mainLoopRun, etc.) it returns
--   1. When called from within a callback to a recursive call to
--   mainContextIteration, it returns 2. And so forth.
--   
--   This function is useful in a situation like the following: Imagine an
--   extremely simple "garbage collected" system.
--   
--   
C code
--   
--   
--   static GList *free_list;
--   
--   gpointer
--   allocate_memory (gsize size)
--   {
--     gpointer result = g_malloc (size);
--     free_list = g_list_prepend (free_list, result);
--     return result;
--   }
--   
--   void
--   free_allocated_memory (void)
--   {
--     GList *l;
--     for (l = free_list; l; l = l->next);
--       g_free (l->data);
--     g_list_free (free_list);
--     free_list = NULL;
--    }
--   
--   [...]
--   
--   while (TRUE);
--    {
--      g_main_context_iteration (NULL, TRUE);
--      free_allocated_memory();
--     }
--   
--   
--   This works from an application, however, if you want to do the same
--   thing from a library, it gets more difficult, since you no longer
--   control the main loop. You might think you can simply use an idle
--   function to make the call to free_allocated_memory(),
--   but that doesn't work, since the idle function could be called from a
--   recursive callback. This can be fixed by using mainDepth
--   
--   
C code
--   
--   
--   gpointer
--   allocate_memory (gsize size)
--   {
--     FreeListBlock *block = g_new (FreeListBlock, 1);
--     block->mem = g_malloc (size);
--     block->depth = g_main_depth ();
--     free_list = g_list_prepend (free_list, block);
--     return block->mem;
--   }
--   
--   void
--   free_allocated_memory (void)
--   {
--     GList *l;
--     
--     int depth = g_main_depth ();
--     for (l = free_list; l; );
--       {
--         GList *next = l->next;
--         FreeListBlock *block = l->data;
--         if (block->depth > depth)
--           {
--             g_free (block->mem);
--             g_free (block);
--             free_list = g_list_delete_link (free_list, l);
--           }
--                 
--         l = next;
--       }
--     }
--   
--   
--   There is a temptation to use mainDepth to solve problems with
--   reentrancy. For instance, while waiting for data to be received from
--   the network in response to a menu item, the menu item might be
--   selected again. It might seem that one could make the menu item's
--   callback return immediately and do nothing if mainDepth returns
--   a value greater than 1. However, this should be avoided since the user
--   then sees selecting the menu item do nothing. Furthermore, you'll find
--   yourself adding these checks all over your code, since there are
--   doubtless many, many things that the user could do. Instead, you can
--   use the following techniques:
--   
--   
--   
- Use gtk_widget_set_sensitive() or modal dialogs to
--   prevent the user from interacting with elements while the main loop is
--   recursing.
--   
- Avoid main loop recursion in situations where you can't handle
--   arbitrary callbacks. Instead, structure your code so that you simply
--   return to the main loop and then get called again when there is more
--   work to do.
--   
mainDepth :: (HasCallStack, MonadIO m) => m Int32

-- | Allocates nBytes bytes of memory. If
--   nBytes is 0 it returns Nothing.
malloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates nBytes bytes of memory, initialized to 0's.
--   If nBytes is 0 it returns Nothing.
malloc0 :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | This function is similar to malloc0, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
malloc0N :: (HasCallStack, MonadIO m) => Word64 -> Word64 -> m (Ptr ())

-- | This function is similar to malloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
mallocN :: (HasCallStack, MonadIO m) => Word64 -> Word64 -> m (Ptr ())

-- | No description available in the introspection data.
markupErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Escapes text so that the markup parser will parse it verbatim. Less
--   than, greater than, ampersand, etc. are replaced with the
--   corresponding entities. This function would typically be used when
--   writing out a file to be parsed with the markup parser.
--   
--   Note that this function doesn't protect whitespace and line endings
--   from being processed according to the XML rules for normalization of
--   line endings and attribute values.
--   
--   Note also that this function will produce character references in the
--   range of &x1; ... &x1f; for
--   all control sequences except for tabstop, newline and carriage return.
--   The character references in this range are not valid XML 1.0, but they
--   are valid XML 1.1 and will be accepted by the GMarkup parser.
markupEscapeText :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Checks whether the allocator used by malloc is the system's
--   malloc implementation. If it returns True memory allocated with
--   malloc() can be used interchangeable with memory
--   allocated using malloc. This function is useful for avoiding an
--   extra copy of allocated memory returned by a non-GLib-based API.

-- | Deprecated: (Since version 2.46)GLib always uses the system malloc,
--   so this function alwaysreturns True.
memIsSystemMalloc :: (HasCallStack, MonadIO m) => m Bool

-- | GLib used to support some tools for memory profiling, but this no
--   longer works. There are many other useful tools for memory profiling
--   these days which can be used instead.

-- | Deprecated: (Since version 2.46)Use other memory profiling tools
--   instead
memProfile :: (HasCallStack, MonadIO m) => m ()

-- | This function used to let you override the memory allocation function.
--   However, its use was incompatible with the use of global constructors
--   in GLib and GIO, because those use the GLib allocators before main is
--   reached. Therefore this function is now deprecated and is just a stub.

-- | Deprecated: (Since version 2.46)This function now does nothing. Use
--   other memoryprofiling tools instead
memSetVtable :: (HasCallStack, MonadIO m) => MemVTable -> m ()

-- | Allocates byteSize bytes of memory, and copies
--   byteSize bytes into it from mem. If
--   mem is Nothing it returns Nothing.
memdup :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())

-- | Create a directory if it doesn't already exist. Create intermediate
--   parent directories as needed, too.
--   
--   Since: 2.8
mkdirWithParents :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | Set the pointer at the specified location to Nothing.
nullifyPointer :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | No description available in the introspection data.
numberParserErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Prompts the user with [E]xit, [H]alt, show [S]tack trace or
--   [P]roceed. This function is intended to be used for debugging use
--   only. The following example shows how it can be used together with the
--   g_log() functions.
--   
--   
C code
--   
--   
--   #include <glib.h>
--   
--   static void
--   log_handler (const gchar   *log_domain,
--                GLogLevelFlags log_level,
--                const gchar   *message,
--                gpointer       user_data)
--   {
--     g_log_default_handler (log_domain, log_level, message, user_data);
--   
--     g_on_error_query (MY_PROGRAM_NAME);
--   }
--   
--   int
--   main (int argc, char *argv[])
--   {
--     g_log_set_handler (MY_LOG_DOMAIN,
--                        G_LOG_LEVEL_WARNING |
--                        G_LOG_LEVEL_ERROR |
--                        G_LOG_LEVEL_CRITICAL,
--                        log_handler,
--                        NULL);
--     ...
--   
--   
--   If "[E]xit" is selected, the application terminates with a call to
--   _exit(0).
--   
--   If "[S]tack" trace is selected, onErrorStackTrace is called.
--   This invokes gdb, which attaches to the current process and shows a
--   stack trace. The prompt is then shown again.
--   
--   If "[P]roceed" is selected, the function returns.
--   
--   This function may cause different actions on non-UNIX platforms.
onErrorQuery :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Invokes gdb, which attaches to the current process and shows a stack
--   trace. Called by onErrorQuery when the "[S]tack trace" option
--   is selected. You can get the current process's program name with
--   getPrgname, assuming that you have called
--   gtk_init() or gdk_init().
--   
--   This function may cause different actions on non-UNIX platforms.
onErrorStackTrace :: (HasCallStack, MonadIO m) => Text -> m ()

-- | No description available in the introspection data.
optionErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Parses a string containing debugging options into a
--   guint containing bit flags. This is used within GDK
--   and GTK+ to parse the debug options passed on the command line or
--   through environment variables.
--   
--   If string is equal to "all", all flags are set. Any
--   flags specified along with "all" in string are
--   inverted; thus, "all,foo,bar" or "foo,bar,all" sets all flags except
--   those corresponding to "foo" and "bar".
--   
--   If string is equal to "help", all the available keys
--   in keys are printed out to standard error.
parseDebugString :: (HasCallStack, MonadIO m) => Maybe Text -> [DebugKey] -> m Word32

-- | Gets the last component of the filename.
--   
--   If fileName ends with a directory separator it gets
--   the component before the last slash. If fileName
--   consists only of directory separators (and on Windows, possibly a
--   drive letter), a single separator is returned. If
--   fileName is empty, it gets ".".
pathGetBasename :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Gets the directory components of a file name. For example, the
--   directory component of /usr/bin/test is /usr/bin.
--   The directory component of / is /.
--   
--   If the file name has no directory components "." is returned. The
--   returned string should be freed when no longer needed.
pathGetDirname :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Returns True if the given fileName is an
--   absolute file name. Note that this is a somewhat vague concept on
--   Windows.
--   
--   On POSIX systems, an absolute file name is well-defined. It always
--   starts from the single root directory. For example "/usr/local".
--   
--   On Windows, the concepts of current drive and drive-specific current
--   directory introduce vagueness. This function interprets as an absolute
--   file name one that either begins with a directory separator such as
--   "\Users\tml" or begins with the root on a drive, for example
--   "C:\Windows". The first case also includes UNC paths such as
--   "\\myserver\docs\foo". In all cases, either slashes or backslashes are
--   accepted.
--   
--   Note that a file name relative to the current drive root does not
--   truly specify a file uniquely over time and across processes, as the
--   current drive is a per-process value and can be changed.
--   
--   File names relative the current directory on some specific drive, such
--   as "D:foo/bar", are not interpreted as absolute by this function, but
--   they obviously are not relative to the normal current directory as
--   returned by getcwd() or getCurrentDir either.
--   Such paths should be avoided, or need to be handled using
--   Windows-specific code.
pathIsAbsolute :: (HasCallStack, MonadIO m) => [Char] -> m Bool

-- | Returns a pointer into fileName after the root
--   component, i.e. after the "/" in UNIX or "C:\" under Windows. If
--   fileName is not an absolute path it returns
--   Nothing.
pathSkipRoot :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe [Char])

-- | Matches a string against a compiled pattern. Passing the correct
--   length of the string given is mandatory. The reversed string can be
--   omitted by passing Nothing, this is more efficient if the
--   reversed version of the string to be matched is not at hand, as
--   patternMatch will only construct it if the compiled pattern
--   requires reverse matches.
--   
--   Note that, if the user code will (possibly) match a string against a
--   multitude of patterns containing wildcards, chances are high that some
--   patterns will require a reversed string. In this case, it's more
--   efficient to provide the reversed string to avoid multiple
--   constructions thereof in the various calls to patternMatch.
--   
--   Note also that the reverse of a UTF-8 encoded string can in general
--   not be obtained by strreverse. This works only if the string
--   does not contain any multibyte characters. GLib offers the
--   utf8Strreverse function to reverse UTF-8 encoded strings.
patternMatch :: (HasCallStack, MonadIO m) => PatternSpec -> Word32 -> Text -> Maybe Text -> m Bool

-- | Matches a string against a pattern given as a string. If this function
--   is to be called in a loop, it's more efficient to compile the pattern
--   once with g_pattern_spec_new() and call
--   patternMatchString repeatedly.
patternMatchSimple :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Matches a string against a compiled pattern. If the string is to be
--   matched against more than one pattern, consider using
--   patternMatch instead while supplying the reversed string.
patternMatchString :: (HasCallStack, MonadIO m) => PatternSpec -> Text -> m Bool

-- | This is equivalent to g_bit_lock, but working on pointers (or other
--   pointer-sized values).
--   
--   For portability reasons, you may only lock on the bottom 32 bits of
--   the pointer.
--   
--   Since: 2.30
pointerBitLock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | This is equivalent to g_bit_trylock, but working on pointers (or other
--   pointer-sized values).
--   
--   For portability reasons, you may only lock on the bottom 32 bits of
--   the pointer.
--   
--   Since: 2.30
pointerBitTrylock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m Bool

-- | This is equivalent to g_bit_unlock, but working on pointers (or other
--   pointer-sized values).
--   
--   For portability reasons, you may only lock on the bottom 32 bits of
--   the pointer.
--   
--   Since: 2.30
pointerBitUnlock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | Polls fds, as with the poll() system
--   call, but portably. (On systems that don't have
--   poll(), it is emulated using
--   select().) This is used internally by
--   MainContext, but it can be called directly if you need to block
--   until a file descriptor is ready, but don't want to run the full main
--   loop.
--   
--   Each element of fds is a PollFD describing a
--   single file descriptor to poll. The fd field indicates
--   the file descriptor, and the events field indicates
--   the events to poll for. On return, the revents fields
--   will be filled with the events that actually occurred.
--   
--   On POSIX systems, the file descriptors in fds can be
--   any sort of file descriptor, but the situation is much more
--   complicated on Windows. If you need to use poll in code that
--   has to run on Windows, the easiest solution is to construct all of
--   your GPollFDs with
--   g_io_channel_win32_make_pollfd().
--   
--   Since: 2.20
poll :: (HasCallStack, MonadIO m) => PollFD -> Word32 -> Int32 -> m Int32

-- | If dest is Nothing, free src;
--   otherwise, moves src into *dest. The
--   error variable dest points to must be Nothing.
--   
--   src must be non-Nothing.
--   
--   Note that src is no longer valid after this call. If
--   you want to keep using the same GError*, you need to set it to
--   Nothing after calling this function on it.
propagateError :: (HasCallStack, MonadIO m) => GError -> m (Maybe GError)

-- | Gets the GQuark identifying the given (static) string.
--   If the string does not currently have an associated
--   GQuark, a new GQuark is created,
--   linked to the given string.
--   
--   Note that this function is identical to quarkFromString except
--   that if a new GQuark is created the string itself is
--   used rather than a copy. This saves memory, but can only be used if
--   the string will continue to exist until the program terminates. It can
--   be used with statically allocated strings in the main program, but not
--   with statically allocated memory in dynamically loaded modules, if you
--   expect to ever unload the module again (e.g. do not use this function
--   in GTK+ theme engines).
quarkFromStaticString :: (HasCallStack, MonadIO m) => Maybe Text -> m Word32

-- | Gets the GQuark identifying the given string. If the
--   string does not currently have an associated GQuark, a
--   new GQuark is created, using a copy of the string.
quarkFromString :: (HasCallStack, MonadIO m) => Maybe Text -> m Word32

-- | Gets the string associated with the given GQuark.
quarkToString :: (HasCallStack, MonadIO m) => Word32 -> m Text

-- | Gets the GQuark associated with the given string, or 0
--   if string is Nothing or it has no associated
--   GQuark.
--   
--   If you want the GQuark to be created if it doesn't already exist, use
--   quarkFromString or quarkFromStaticString.
quarkTryString :: (HasCallStack, MonadIO m) => Maybe Text -> m Word32

-- | Returns a random gdouble equally distributed over the
--   range [0..1).
randomDouble :: (HasCallStack, MonadIO m) => m Double

-- | Returns a random gdouble equally distributed over the
--   range [begin..end).
randomDoubleRange :: (HasCallStack, MonadIO m) => Double -> Double -> m Double

-- | Return a random guint32 equally distributed over the
--   range [0..2^32-1].
randomInt :: (HasCallStack, MonadIO m) => m Word32

-- | Returns a random gint32 equally distributed over the
--   range [begin..end-1].
randomIntRange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Sets the seed for the global random number generator, which is used by
--   the g_random_* functions, to seed.
randomSetSeed :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Acquires a reference on the data pointed by memBlock.
--   
--   Since: 2.58
rcBoxAcquire :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Allocates blockSize bytes of memory, and adds
--   reference counting semantics to it.
--   
--   The data will be freed when its reference count drops to zero.
--   
--   The allocated data is guaranteed to be suitably aligned for any
--   built-in type.
--   
--   Since: 2.58
rcBoxAlloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates blockSize bytes of memory, and adds
--   reference counting semantics to it.
--   
--   The contents of the returned data is set to zero.
--   
--   The data will be freed when its reference count drops to zero.
--   
--   The allocated data is guaranteed to be suitably aligned for any
--   built-in type.
--   
--   Since: 2.58
rcBoxAlloc0 :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates a new block of data with reference counting semantics, and
--   copies blockSize bytes of memBlock
--   into it.
--   
--   Since: 2.58
rcBoxDup :: (HasCallStack, MonadIO m) => Word64 -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   memBlock.
--   
--   Since: 2.58
rcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m Word64

-- | Releases a reference on the data pointed by memBlock.
--   
--   If the reference was the last one, it will free the resources
--   allocated for memBlock.
--   
--   Since: 2.58
rcBoxRelease :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Releases a reference on the data pointed by memBlock.
--   
--   If the reference was the last one, it will call
--   clearFunc to clear the contents of
--   memBlock, and then will free the resources allocated
--   for memBlock.
--   
--   Since: 2.58
rcBoxReleaseFull :: (HasCallStack, MonadIO m) => Ptr () -> DestroyNotify -> m ()

-- | Reallocates the memory pointed to by mem, so that it
--   now has space for nBytes bytes of memory. It returns
--   the new address of the memory, which may have been moved.
--   mem may be Nothing, in which case it's
--   considered to have zero-length. nBytes may be 0, in
--   which case Nothing will be returned and mem
--   will be freed unless it is Nothing.
realloc :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m (Ptr ())

-- | This function is similar to realloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
reallocN :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> Word64 -> m (Ptr ())

-- | Compares the current value of rc with
--   val.
--   
--   Since: 2.58
refCountCompare :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Decreases the reference count.
--   
--   Since: 2.58
refCountDec :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Increases the reference count.
--   
--   Since: 2.58
refCountInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Initializes a reference count variable.
--   
--   Since: 2.58
refCountInit :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Acquires a reference on a string.
--   
--   Since: 2.58
refStringAcquire :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Retrieves the length of str.
--   
--   Since: 2.58
refStringLength :: (HasCallStack, MonadIO m) => Text -> m Word64

-- | Creates a new reference counted string and copies the contents of
--   str into it.
--   
--   Since: 2.58
refStringNew :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Creates a new reference counted string and copies the content of
--   str into it.
--   
--   If you call this function multiple times with the same
--   str, or with the same contents of str,
--   it will return a new reference, instead of creating a new string.
--   
--   Since: 2.58
refStringNewIntern :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Creates a new reference counted string and copies the contents of
--   str into it, up to len bytes.
--   
--   Since this function does not stop at nul bytes, it is the caller's
--   responsibility to ensure that str has at least
--   len addressable bytes.
--   
--   Since: 2.58
refStringNewLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Releases a reference on a string; if it was the last reference, the
--   resources allocated by the string are freed as well.
--   
--   Since: 2.58
refStringRelease :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Resets the cache used for getUserSpecialDir, so that the latest
--   on-disk version is used. Call this only if you just changed the data
--   on disk yourself.
--   
--   Due to thread safety issues this may cause leaking of strings that
--   were previously returned from getUserSpecialDir that can't be
--   freed. We ensure to only leak the data for the directories that
--   actually changed value though.
--   
--   Since: 2.22
reloadUserSpecialDirsCache :: (HasCallStack, MonadIO m) => m ()

-- | A wrapper for the POSIX rmdir() function. The
--   rmdir() function deletes a directory from the
--   filesystem.
--   
--   See your C library manual for more details about how
--   rmdir() works on your system.
--   
--   Since: 2.6
rmdir :: (HasCallStack, MonadIO m) => [Char] -> m Int32

-- | Sets a human-readable name for the application. This name should be
--   localized if possible, and is intended for display to the user.
--   Contrast with setPrgname, which sets a non-localized name.
--   setPrgname will be called automatically by
--   gtk_init(), but setApplicationName will not.
--   
--   Note that for thread safety reasons, this function can only be called
--   once.
--   
--   The application name will be used in contexts such as error messages,
--   or when displaying an application's name in the task list.
--   
--   Since: 2.2
setApplicationName :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Does nothing if err is Nothing; if
--   err is non-Nothing, then *err
--   must be Nothing. A new GError is created and assigned to
--   *err. Unlike g_set_error(),
--   message is not a printf()-style format
--   string. Use this function if message contains text you
--   don't have control over, that could include printf()
--   escape sequences.
--   
--   Since: 2.18
setErrorLiteral :: (HasCallStack, MonadIO m) => Word32 -> Int32 -> Text -> m GError

-- | Sets the name of the program. This name should not be localized, in
--   contrast to setApplicationName.
--   
--   If you are using GApplication the program name is set
--   in g_application_run(). In case of GDK or GTK+ it is
--   set in gdk_init(), which is called by
--   gtk_init() and the
--   GtkApplication::startup handler. The program name is
--   found by taking the last component of argv[0].
--   
--   Note that for thread-safety reasons this function can only be called
--   once.
setPrgname :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Sets an environment variable. On UNIX, both the variable's name and
--   value can be arbitrary byte strings, except that the variable's name
--   cannot contain '='. On Windows, they should be in UTF-8.
--   
--   Note that on some systems, when variables are overwritten, the memory
--   used for the previous variables and its value isn't reclaimed.
--   
--   You should be mindful of the fact that environment variable handling
--   in UNIX is not thread-safe, and your program may crash if one thread
--   calls setenv while another thread is calling
--   getenv(). (And note that many functions, such as
--   gettext(), call getenv() internally.)
--   This function is only safe to use at the very start of your program,
--   before creating any other threads (or creating objects that create
--   worker threads of their own).
--   
--   If you need to set up the environment for a child process, you can use
--   getEnviron to get an environment array, modify that with
--   environSetenv and environUnsetenv, and then pass that
--   array directly to execvpe(), spawnAsync, or the
--   like.
--   
--   Since: 2.4
setenv :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> Bool -> m Bool

-- | No description available in the introspection data.
shellErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Parses a command line into an argument vector, in much the same way
--   the shell would, but without many of the expansions the shell would
--   perform (variable expansion, globs, operators, filename expansion,
--   etc. are not supported). The results are defined to be the same as
--   those you would get from a UNIX98 /bin/sh, as long as the input
--   contains none of the unsupported shell expansions. If the input does
--   contain such expansions, they are passed through literally. Possible
--   errors are those from the G_SHELL_ERROR domain. Free
--   the returned vector with strfreev.
shellParseArgv :: (HasCallStack, MonadIO m) => [Char] -> m (Int32, [[Char]])

-- | Quotes a string so that the shell (/bin/sh) will interpret the quoted
--   string to mean unquotedString. If you pass a filename
--   to the shell, for example, you should first quote it with this
--   function. The return value must be freed with free. The quoting
--   style used is undefined (single or double quotes may be used).
shellQuote :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Unquotes a string as the shell (/bin/sh) would. Only handles quotes;
--   if a string contains file globs, arithmetic operators, variables,
--   backticks, redirections, or other special-to-the-shell features, the
--   result will be different from the result a real shell would produce
--   (the variables, backticks, etc. will be passed through literally
--   instead of being expanded). This function is guaranteed to succeed if
--   applied to the result of shellQuote. If it fails, it returns
--   Nothing and sets the error. The quotedString
--   need not actually contain quoted or escaped text; shellUnquote
--   simply goes through the string and unquotes/unescapes anything that
--   the shell would. Both single and double quotes are handled, as are
--   escapes including escaped newlines. The return value must be freed
--   with free. Possible errors are in the
--   G_SHELL_ERROR domain.
--   
--   Shell quoting rules are a bit strange. Single quotes preserve the
--   literal string exactly. escape sequences are not allowed; not even \'
--   - if you want a ' in the quoted text, you have to do something like
--   'foo'\''bar'. Double quotes allow $, `, ", \, and newline to be
--   escaped with backslash. Otherwise double quotes preserve things
--   literally.
shellUnquote :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Allocates a block of memory from the slice allocator. The block
--   address handed out can be expected to be aligned to at least 1 *
--   sizeof (void*), though in general slices are 2 * sizeof (void*) bytes
--   aligned, if a malloc() fallback implementation is used
--   instead, the alignment may be reduced in a libc dependent fashion.
--   Note that the underlying slice allocation mechanism can be changed
--   with the [G_SLICE=always-malloc][G_SLICE] environment
--   variable.
--   
--   Since: 2.10
sliceAlloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates a block of memory via sliceAlloc and initializes the
--   returned memory to 0. Note that the underlying slice allocation
--   mechanism can be changed with the
--   [G_SLICE=always-malloc][G_SLICE] environment variable.
--   
--   Since: 2.10
sliceAlloc0 :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Allocates a block of memory from the slice allocator and copies
--   blockSize bytes into it from memBlock.
--   
--   memBlock must be non-Nothing if
--   blockSize is non-zero.
--   
--   Since: 2.14
sliceCopy :: (HasCallStack, MonadIO m) => Word64 -> Ptr () -> m (Ptr ())

-- | Frees a block of memory.
--   
--   The memory must have been allocated via sliceAlloc or
--   sliceAlloc0 and the blockSize has to match the
--   size specified upon allocation. Note that the exact release behaviour
--   can be changed with the [G_DEBUG=gc-friendly][G_DEBUG]
--   environment variable, also see [G_SLICE][G_SLICE] for related
--   debugging options.
--   
--   If memBlock is Nothing, this function does
--   nothing.
--   
--   Since: 2.10
sliceFree1 :: (HasCallStack, MonadIO m) => Word64 -> Ptr () -> m ()

-- | Frees a linked list of memory blocks of structure type
--   type.
--   
--   The memory blocks must be equal-sized, allocated via sliceAlloc
--   or sliceAlloc0 and linked together by a next
--   pointer (similar to SList). The offset of the
--   next field in each block is passed as third argument.
--   Note that the exact release behaviour can be changed with the
--   [G_DEBUG=gc-friendly][G_DEBUG] environment variable, also see
--   [G_SLICE][G_SLICE] for related debugging options.
--   
--   If memChain is Nothing, this function does
--   nothing.
--   
--   Since: 2.10
sliceFreeChainWithOffset :: (HasCallStack, MonadIO m) => Word64 -> Ptr () -> Word64 -> m ()

-- | No description available in the introspection data.
sliceGetConfig :: (HasCallStack, MonadIO m) => SliceConfig -> m Int64

-- | No description available in the introspection data.
sliceGetConfigState :: (HasCallStack, MonadIO m) => SliceConfig -> Int64 -> Word32 -> m Int64

-- | No description available in the introspection data.
sliceSetConfig :: (HasCallStack, MonadIO m) => SliceConfig -> Int64 -> m ()

-- | Gets the smallest prime number from a built-in array of primes which
--   is larger than num. This is used within GLib to
--   calculate the optimum size of a HashTable.
--   
--   The built-in array of primes ranges from 11 to 13845163 such that each
--   prime is approximately 1.5-2 times the previous prime.
spacedPrimesClosest :: (HasCallStack, MonadIO m) => Word32 -> m Word32

-- | See spawnAsyncWithPipes for a full description; this function
--   simply calls the spawnAsyncWithPipes without any pipes.
--   
--   You should call spawnClosePid on the returned child process
--   reference when you don't need it any more.
--   
--   If you are writing a GTK+ application, and the program you are
--   spawning is a graphical application too, then to ensure that the
--   spawned program opens its windows on the right screen, you may want to
--   use GdkAppLaunchContext,
--   GAppLaunchContext, or set the DISPLAY
--   environment variable.
--   
--   Note that the returned childPid on Windows is a handle
--   to the child process and not its identifier. Process handles and
--   process identifiers are different concepts on Windows.
spawnAsync :: (HasCallStack, MonadIO m) => Maybe [Char] -> [[Char]] -> Maybe [[Char]] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> m Int32

-- | Identical to spawnAsyncWithPipes but instead of creating pipes
--   for the stdin/stdout/stderr, you can pass existing file descriptors
--   into this function through the stdinFd,
--   stdoutFd and stderrFd parameters. The
--   following flags also have their behaviour slightly
--   tweaked as a result:
--   
--   SpawnFlagsStdoutToDevNull means that the child's standard
--   output will be discarded, instead of going to the same location as the
--   parent's standard output. If you use this flag,
--   standardOutput must be -1.
--   SpawnFlagsStderrToDevNull means that the child's standard error
--   will be discarded, instead of going to the same location as the
--   parent's standard error. If you use this flag,
--   standardError must be -1.
--   SpawnFlagsChildInheritsStdin means that the child will inherit
--   the parent's standard input (by default, the child's standard input is
--   attached to /dev/null). If you use this flag,
--   standardInput must be -1.
--   
--   It is valid to pass the same fd in multiple parameters (e.g. you can
--   pass a single fd for both stdout and stderr).
--   
--   Since: 2.58
spawnAsyncWithFds :: (HasCallStack, MonadIO m) => Maybe [Char] -> [Text] -> Maybe [Text] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Int32 -> Int32 -> Int32 -> m Int32

-- | Executes a child program asynchronously (your program will not block
--   waiting for the child to exit). The child program is specified by the
--   only argument that must be provided, argv.
--   argv should be a Nothing-terminated array of
--   strings, to be passed as the argument vector for the child. The first
--   string in argv is of course the name of the program to
--   execute. By default, the name of the program must be a full path. If
--   flags contains the SpawnFlagsSearchPath flag,
--   the PATH environment variable is used to search for the
--   executable. If flags contains the
--   SpawnFlagsSearchPathFromEnvp flag, the PATH variable
--   from envp is used to search for the executable. If
--   both the SpawnFlagsSearchPath and
--   SpawnFlagsSearchPathFromEnvp flags are set, the PATH
--   variable from envp takes precedence over the
--   environment variable.
--   
--   If the program name is not a full path and SpawnFlagsSearchPath
--   flag is not used, then the program will be run from the current
--   directory (or workingDirectory, if specified); this
--   might be unexpected or even dangerous in some cases when the current
--   directory is world-writable.
--   
--   On Windows, note that all the string or string vector arguments to
--   this function and the other g_spawn*() functions are in UTF-8, the
--   GLib file name encoding. Unicode characters that are not part of the
--   system codepage passed in these arguments will be correctly available
--   in the spawned program only if it uses wide character API to retrieve
--   its command line. For C programs built with Microsoft's tools it is
--   enough to make the program have a wmain() instead of
--   main(). wmain() has a wide character
--   argument vector as parameter.
--   
--   At least currently, mingw doesn't support wmain(), so
--   if you use mingw to develop the spawned program, it should call
--   g_win32_get_command_line() to get arguments in UTF-8.
--   
--   On Windows the low-level child process creation API
--   CreateProcess() doesn't use argument vectors, but a
--   command line. The C runtime library's spawn*() family of functions
--   (which spawnAsyncWithPipes eventually calls) paste the argument
--   vector elements together into a command line, and the C runtime
--   startup code does a corresponding reconstruction of an argument vector
--   from the command line, to be passed to main().
--   Complications arise when you have argument vector elements that
--   contain spaces or double quotes. The spawn*() functions don't
--   do any quoting or escaping, but on the other hand the startup code
--   does do unquoting and unescaping in order to enable receiving
--   arguments with embedded spaces or double quotes. To work around this
--   asymmetry, spawnAsyncWithPipes will do quoting and escaping on
--   argument vector elements that need it before calling the C runtime
--   spawn() function.
--   
--   The returned childPid on Windows is a handle to the
--   child process, not its identifier. Process handles and process
--   identifiers are different concepts on Windows.
--   
--   envp is a Nothing-terminated array of strings,
--   where each string has the form KEY=VALUE. This will become
--   the child's environment. If envp is Nothing,
--   the child inherits its parent's environment.
--   
--   flags should be the bitwise OR of any flags you want
--   to affect the function's behaviour. The
--   SpawnFlagsDoNotReapChild means that the child will not
--   automatically be reaped; you must use a child watch
--   (g_child_watch_add()) to be notified about the death
--   of the child process, otherwise it will stay around as a zombie
--   process until this process exits. Eventually you must call
--   spawnClosePid on the childPid, in order to free
--   resources which may be associated with the child process. (On Unix,
--   using a child watch is equivalent to calling waitpid()
--   or handling the SIGCHLD signal manually. On Windows,
--   calling spawnClosePid is equivalent to calling
--   CloseHandle() on the process handle returned in
--   childPid). See g_child_watch_add().
--   
--   Open UNIX file descriptors marked as FD_CLOEXEC will be
--   automatically closed in the child process.
--   SpawnFlagsLeaveDescriptorsOpen means that other open file
--   descriptors will be inherited by the child; otherwise all descriptors
--   except stdin/stdout/stderr will be closed before calling
--   exec() in the child. SpawnFlagsSearchPath means
--   that argv[0] need not be an absolute path, it will be
--   looked for in the PATH environment variable.
--   SpawnFlagsSearchPathFromEnvp means need not be an absolute
--   path, it will be looked for in the PATH variable from
--   envp. If both SpawnFlagsSearchPath and
--   SpawnFlagsSearchPathFromEnvp are used, the value from
--   envp takes precedence over the environment.
--   SpawnFlagsStdoutToDevNull means that the child's standard
--   output will be discarded, instead of going to the same location as the
--   parent's standard output. If you use this flag,
--   standardOutput must be Nothing.
--   SpawnFlagsStderrToDevNull means that the child's standard error
--   will be discarded, instead of going to the same location as the
--   parent's standard error. If you use this flag,
--   standardError must be Nothing.
--   SpawnFlagsChildInheritsStdin means that the child will inherit
--   the parent's standard input (by default, the child's standard input is
--   attached to /dev/null). If you use this flag,
--   standardInput must be Nothing.
--   SpawnFlagsFileAndArgvZero means that the first element of
--   argv is the file to execute, while the remaining
--   elements are the actual argument vector to pass to the file. Normally
--   spawnAsyncWithPipes uses argv[0] as the file to
--   execute, and passes all of argv to the child.
--   
--   childSetup and userData are a function
--   and user data. On POSIX platforms, the function is called in the child
--   after GLib has performed all the setup it plans to perform (including
--   creating pipes, closing file descriptors, etc.) but before calling
--   exec(). That is, childSetup is called
--   just before calling exec() in the child. Obviously
--   actions taken in this function will only affect the child, not the
--   parent.
--   
--   On Windows, there is no separate fork() and
--   exec() functionality. Child processes are created and
--   run with a single API call, CreateProcess(). There is
--   no sensible thing childSetup could be used for on
--   Windows so it is ignored and not called.
--   
--   If non-Nothing, childPid will on Unix be filled
--   with the child's process ID. You can use the process ID to send
--   signals to the child, or to use g_child_watch_add()
--   (or waitpid()) if you specified the
--   SpawnFlagsDoNotReapChild flag. On Windows,
--   childPid will be filled with a handle to the child
--   process only if you specified the SpawnFlagsDoNotReapChild
--   flag. You can then access the child process using the Win32 API, for
--   example wait for its termination with the WaitFor*() functions, or
--   examine its exit code with GetExitCodeProcess(). You
--   should close the handle with CloseHandle() or
--   spawnClosePid when you no longer need it.
--   
--   If non-Nothing, the standardInput,
--   standardOutput, standardError
--   locations will be filled with file descriptors for writing to the
--   child's standard input or reading from its standard output or standard
--   error. The caller of spawnAsyncWithPipes must close these file
--   descriptors when they are no longer in use. If these parameters are
--   Nothing, the corresponding pipe won't be created.
--   
--   If standardInput is Nothing, the child's
--   standard input is attached to /dev/null unless
--   SpawnFlagsChildInheritsStdin is set.
--   
--   If standardError is NULL, the child's standard error
--   goes to the same location as the parent's standard error unless
--   SpawnFlagsStderrToDevNull is set.
--   
--   If standardOutput is NULL, the child's standard output
--   goes to the same location as the parent's standard output unless
--   SpawnFlagsStdoutToDevNull is set.
--   
--   error can be Nothing to ignore errors, or
--   non-Nothing to report errors. If an error is set, the function
--   returns False. Errors are reported even if they occur in the
--   child (for example if the executable in argv[0] is not
--   found). Typically the message field of returned errors should
--   be displayed to users. Possible errors are those from the
--   G_SPAWN_ERROR domain.
--   
--   If an error occurs, childPid,
--   standardInput, standardOutput, and
--   standardError will not be filled with valid values.
--   
--   If childPid is not Nothing and an error does
--   not occur then the returned process reference must be closed using
--   spawnClosePid.
--   
--   On modern UNIX platforms, GLib can use an efficient process launching
--   codepath driven internally by posix_spawn(). This has
--   the advantage of avoiding the fork-time performance costs of cloning
--   the parent process address space, and avoiding associated memory
--   overcommit checks that are not relevant in the context of immediately
--   executing a distinct process. This optimized codepath will be used
--   provided that the following conditions are met:
--   
--   
--   
- SpawnFlagsDoNotReapChild is set
--   
- SpawnFlagsLeaveDescriptorsOpen is set
--   
- SpawnFlagsSearchPathFromEnvp is not set
--   
- workingDirectory is Nothing
--   
- childSetup is Nothing
--   
- The program is of a recognised binary format, or has a shebang.
--   Otherwise, GLib will have to execute the program through the shell,
--   which is not done using the optimized codepath.
--   
--   
--   If you are writing a GTK+ application, and the program you are
--   spawning is a graphical application too, then to ensure that the
--   spawned program opens its windows on the right screen, you may want to
--   use GdkAppLaunchContext,
--   GAppLaunchContext, or set the DISPLAY
--   environment variable.
spawnAsyncWithPipes :: (HasCallStack, MonadIO m) => Maybe [Char] -> [[Char]] -> Maybe [[Char]] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> m (Int32, Int32, Int32, Int32)

-- | Set error if exitStatus indicates the
--   child exited abnormally (e.g. with a nonzero exit code, or via a fatal
--   signal).
--   
--   The spawnSync and g_child_watch_add() family of
--   APIs return an exit status for subprocesses encoded in a
--   platform-specific way. On Unix, this is guaranteed to be in the same
--   format waitpid() returns, and on Windows it is
--   guaranteed to be the result of GetExitCodeProcess().
--   
--   Prior to the introduction of this function in GLib 2.34, interpreting
--   exitStatus required use of platform-specific APIs,
--   which is problematic for software using GLib as a cross-platform
--   layer.
--   
--   Additionally, many programs simply want to determine whether or not
--   the child exited successfully, and either propagate a GError or
--   print a message to standard error. In that common case, this function
--   can be used. Note that the error message in error will
--   contain human-readable information about the exit status.
--   
--   The domain and code of
--   error have special semantics in the case where the
--   process has an "exit code", as opposed to being killed by a signal. On
--   Unix, this happens if WIFEXITED() would be true of
--   exitStatus. On Windows, it is always the case.
--   
--   The special semantics are that the actual exit code will be the code
--   set in error, and the domain will be
--   G_SPAWN_EXIT_ERROR. This allows you to differentiate
--   between different exit codes.
--   
--   If the process was terminated by some means other than an exit status,
--   the domain will be G_SPAWN_ERROR, and the code will be
--   SpawnErrorFailed.
--   
--   This function just offers convenience; you can of course also check
--   the available platform via a macro such as G_OS_UNIX,
--   and use WIFEXITED() and WEXITSTATUS()
--   on exitStatus directly. Do not attempt to scan or
--   parse the error message string; it may be translated and/or change in
--   future versions of GLib.
--   
--   Since: 2.34
spawnCheckExitStatus :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | On some platforms, notably Windows, the GPid type
--   represents a resource which must be closed to prevent resource
--   leaking. spawnClosePid is provided for this purpose. It should
--   be used on all platforms, even though it doesn't do anything under
--   UNIX.
spawnClosePid :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | A simple version of spawnAsync that parses a command line with
--   shellParseArgv and passes it to spawnAsync. Runs a
--   command line in the background. Unlike spawnAsync, the
--   SpawnFlagsSearchPath flag is enabled, other flags are not. Note
--   that SpawnFlagsSearchPath can have security implications, so
--   consider using spawnAsync directly if appropriate. Possible
--   errors are those from shellParseArgv and spawnAsync.
--   
--   The same concerns on Windows apply as for spawnCommandLineSync.
spawnCommandLineAsync :: (HasCallStack, MonadIO m) => [Char] -> m ()

-- | A simple version of spawnSync with little-used parameters
--   removed, taking a command line instead of an argument vector. See
--   spawnSync for full details. commandLine will be
--   parsed by shellParseArgv. Unlike spawnSync, the
--   SpawnFlagsSearchPath flag is enabled. Note that
--   SpawnFlagsSearchPath can have security implications, so
--   consider using spawnSync directly if appropriate. Possible
--   errors are those from spawnSync and those from
--   shellParseArgv.
--   
--   If exitStatus is non-Nothing, the
--   platform-specific exit status of the child is stored there; see the
--   documentation of spawnCheckExitStatus for how to use and
--   interpret this.
--   
--   On Windows, please note the implications of shellParseArgv
--   parsing commandLine. Parsing is done according to Unix
--   shell rules, not Windows command interpreter rules. Space is a
--   separator, and backslashes are special. Thus you cannot simply pass a
--   commandLine containing canonical Windows paths, like
--   "c:\program files\app\app.exe", as the backslashes will be eaten, and
--   the space will act as a separator. You need to enclose such paths with
--   single quotes, like "'c:\program files\app\app.exe'
--   'e:\folder\argument.txt'".
spawnCommandLineSync :: (HasCallStack, MonadIO m) => [Char] -> m (ByteString, ByteString, Int32)

-- | No description available in the introspection data.
spawnErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | No description available in the introspection data.
spawnExitErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Executes a child synchronously (waits for the child to exit before
--   returning). All output from the child is stored in
--   standardOutput and standardError, if
--   those parameters are non-Nothing. Note that you must set the
--   SpawnFlagsStdoutToDevNull and SpawnFlagsStderrToDevNull
--   flags when passing Nothing for standardOutput
--   and standardError.
--   
--   If exitStatus is non-Nothing, the
--   platform-specific exit status of the child is stored there; see the
--   documentation of spawnCheckExitStatus for how to use and
--   interpret this. Note that it is invalid to pass
--   SpawnFlagsDoNotReapChild in flags, and on POSIX
--   platforms, the same restrictions as for childWatchSourceNew
--   apply.
--   
--   If an error occurs, no data is returned in
--   standardOutput, standardError, or
--   exitStatus.
--   
--   This function calls spawnAsyncWithPipes internally; see that
--   function for full details on the other parameters and details on how
--   these functions work on Windows.
spawnSync :: (HasCallStack, MonadIO m) => Maybe [Char] -> [[Char]] -> Maybe [[Char]] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> m (ByteString, ByteString, Int32)

-- | Copies a nul-terminated string into the dest buffer, include the
--   trailing nul, and return a pointer to the trailing nul byte. This is
--   useful for concatenating multiple strings together without having to
--   repeatedly scan for the end.
stpcpy :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Compares two strings for byte-by-byte equality and returns True
--   if they are equal. It can be passed to
--   g_hash_table_new() as the keyEqualFunc
--   parameter, when using non-Nothing strings as keys in a
--   HashTable.
--   
--   This function is typically used for hash table comparisons, but can be
--   used for general purpose comparisons of non-Nothing strings.
--   For a Nothing-safe string comparison function, see
--   strcmp0.
strEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Looks whether the string str begins with
--   prefix.
--   
--   Since: 2.2
strHasPrefix :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Looks whether the string str ends with
--   suffix.
--   
--   Since: 2.2
strHasSuffix :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Converts a string to a hash value.
--   
--   This function implements the widely used "djb" hash apparently posted
--   by Daniel Bernstein to comp.lang.c some time ago. The 32 bit unsigned
--   hash value starts at 5381 and for each byte 'c' in the string, is
--   updated: hash = hash * 33 + c. This function uses the signed
--   value of each byte.
--   
--   It can be passed to g_hash_table_new() as the
--   hashFunc parameter, when using non-Nothing
--   strings as keys in a HashTable.
--   
--   Note that this function may not be a perfect fit for all use cases.
--   For example, it produces some hash collisions with strings as short as
--   2.
strHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Determines if a string is pure ASCII. A string is pure ASCII if it
--   contains no bytes with the high bit set.
--   
--   Since: 2.40
strIsAscii :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if a search conducted for searchTerm should
--   match potentialHit.
--   
--   This function calls strTokenizeAndFold on both
--   searchTerm and potentialHit. ASCII
--   alternates are never taken for searchTerm but will be
--   taken for potentialHit according to the value of
--   acceptAlternates.
--   
--   A hit occurs when each folded token in searchTerm is a
--   prefix of a folded token from potentialHit.
--   
--   Depending on how you're performing the search, it will typically be
--   faster to call strTokenizeAndFold on each string in your corpus
--   and build an index on the returned folded tokens, then call
--   strTokenizeAndFold on the search term and perform lookups into
--   that index.
--   
--   As some examples, searching for ‘fred’ would match the potential hit
--   ‘Smith, Fred’ and also ‘Frédéric’. Searching for ‘Fréd’ would match
--   ‘Frédéric’ but not ‘Frederic’ (due to the one-directional nature of
--   accent matching). Searching ‘fo’ would match ‘Foo’ and ‘Bar Foo Baz’,
--   but not ‘SFO’ (because no word has ‘fo’ as a prefix).
--   
--   Since: 2.40
strMatchString :: (HasCallStack, MonadIO m) => Text -> Text -> Bool -> m Bool

-- | Transliterate str to plain ASCII.
--   
--   For best results, str should be in composed normalised
--   form.
--   
--   This function performs a reasonably good set of character
--   replacements. The particular set of replacements that is done may
--   change by version or even by runtime environment.
--   
--   If the source language of str is known, it can used to
--   improve the accuracy of the translation by passing it as
--   fromLocale. It should be a valid POSIX locale string
--   (of the form language[_territory][.codeset][@modifier]).
--   
--   If fromLocale is Nothing then the current
--   locale is used.
--   
--   If you want to do translation for no specific locale, and you want it
--   to be done independently of the currently locale, specify "C"
--   for fromLocale.
--   
--   Since: 2.40
strToAscii :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m Text

-- | Tokenises string and performs folding on each token.
--   
--   A token is a non-empty sequence of alphanumeric characters in the
--   source string, separated by non-alphanumeric characters. An
--   "alphanumeric" character for this purpose is one that matches
--   unicharIsalnum or unicharIsmark.
--   
--   Each token is then (Unicode) normalised and case-folded. If
--   asciiAlternates is non-Nothing and some of the
--   returned tokens contain non-ASCII characters, ASCII alternatives will
--   be generated.
--   
--   The number of ASCII alternatives that are generated and the method for
--   doing so is unspecified, but translitLocale (if
--   specified) may improve the transliteration if the language of the
--   source string is known.
--   
--   Since: 2.40
strTokenizeAndFold :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m ([Text], [Text])

-- | For each character in string, if the character is not
--   in validChars, replaces the character with
--   substitutor. Modifies string in place,
--   and return string itself, not a copy. The return value
--   is to allow nesting such as
--   
--   
C code
--   
--   
--   g_ascii_strup (g_strcanon (str, "abc", '?'))
--   
strcanon :: (HasCallStack, MonadIO m) => Text -> Text -> Int8 -> m Text

-- | A case-insensitive string comparison, corresponding to the standard
--   strcasecmp() function on platforms which support it.

-- | Deprecated: (Since version 2.2)See strncasecmp for a
--   discussion of why this function is deprecated and how to replace
--   it.
strcasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> m Int32

-- | Removes trailing whitespace from a string.
--   
--   This function doesn't allocate or reallocate any memory; it modifies
--   string in place. Therefore, it cannot be used on
--   statically allocated strings.
--   
--   The pointer to string is returned to allow the nesting
--   of functions.
--   
--   Also see strchug and g_strstrip().
strchomp :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Removes leading whitespace from a string, by moving the rest of the
--   characters forward.
--   
--   This function doesn't allocate or reallocate any memory; it modifies
--   string in place. Therefore, it cannot be used on
--   statically allocated strings.
--   
--   The pointer to string is returned to allow the nesting
--   of functions.
--   
--   Also see strchomp and g_strstrip().
strchug :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Compares str1 and str2 like
--   strcmp(). Handles Nothing gracefully by sorting
--   it before non-Nothing strings. Comparing two Nothing
--   pointers returns 0.
--   
--   Since: 2.16
strcmp0 :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> m Int32

-- | Replaces all escaped characters with their one byte equivalent.
--   
--   This function does the reverse conversion of strescape.
strcompress :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Converts any delimiter characters in string to
--   newDelimiter. Any characters in string
--   which are found in delimiters are changed to the
--   newDelimiter character. Modifies
--   string in place, and returns string
--   itself, not a copy. The return value is to allow nesting such as
--   
--   
C code
--   
--   
--   g_ascii_strup (g_strdelimit (str, "abc", '?'))
--   
strdelimit :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Int8 -> m Text

-- | Converts a string to lower case.

-- | Deprecated: (Since version 2.2)This function is totally broken for
--   the reasons discussedin the strncasecmp docs - use
--   asciiStrdown or utf8Strdowninstead.
strdown :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Duplicates a string. If str is Nothing it
--   returns Nothing. The returned string should be freed with
--   free when no longer needed.
strdup :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Returns a string corresponding to the given error code, e.g. "no such
--   process". Unlike strerror(), this always returns a
--   string in UTF-8 encoding, and the pointer is guaranteed to remain
--   valid for the lifetime of the process.
--   
--   Note that the string may be translated according to the current
--   locale.
--   
--   The value of errno will not be changed by this
--   function. However, it may be changed by intermediate function calls,
--   so you should save its value as soon as the call returns: > >
--   int saved_errno; > > ret = read (blah); > saved_errno =
--   errno; > > g_strerror (saved_errno);
strerror :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\'
--   and '"' in the string source by inserting a '\' before
--   them. Additionally all characters in the range 0x01-0x1F (everything
--   below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are
--   replaced with a '\' followed by their octal representation. Characters
--   supplied in exceptions are not escaped.
--   
--   strcompress does the reverse conversion.
strescape :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m Text

-- | Frees a Nothing-terminated array of strings, as well as each
--   string it contains.
--   
--   If strArray is Nothing, this function simply
--   returns.
strfreev :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | Creates a new String, initialized with the given string.
stringNew :: (HasCallStack, MonadIO m) => Maybe Text -> m String

-- | Creates a new String with len bytes of the
--   init buffer. Because a length is provided,
--   init need not be nul-terminated, and can contain
--   embedded nul bytes.
--   
--   Since this function does not stop at nul bytes, it is the caller's
--   responsibility to ensure that init has at least
--   len addressable bytes.
stringNewLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> m String

-- | Creates a new String, with enough space for
--   dflSize bytes. This is useful if you are going to add
--   a lot of text to the string and don't want it to be reallocated too
--   often.
stringSizedNew :: (HasCallStack, MonadIO m) => Word64 -> m String

-- | An auxiliary function for gettext() support (see
--   Q_()).
--   
--   Since: 2.4
stripContext :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Joins a number of strings together to form one long string, with the
--   optional separator inserted between each of them. The
--   returned string should be freed with free.
--   
--   If strArray has no items, the return value will be an
--   empty string. If strArray contains a single item,
--   separator will not appear in the resulting string.
strjoinv :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m Text

-- | Portability wrapper that calls strlcat() on systems
--   which have it, and emulates it otherwise. Appends nul-terminated
--   src string to dest, guaranteeing
--   nul-termination for dest. The total size of
--   dest won't exceed destSize.
--   
--   At most destSize - 1 characters will be copied. Unlike
--   strncat(), destSize is the full size
--   of dest, not the space left over. This function does not allocate
--   memory. It always nul-terminates (unless destSize == 0
--   or there were no nul characters in the destSize
--   characters of dest to start with).
--   
--   Caveat: this is supposedly a more secure alternative to
--   strcat() or strncat(), but for real
--   security g_strconcat() is harder to mess up.
strlcat :: (HasCallStack, MonadIO m) => Text -> Text -> Word64 -> m Word64

-- | Portability wrapper that calls strlcpy() on systems
--   which have it, and emulates strlcpy() otherwise.
--   Copies src to dest;
--   dest is guaranteed to be nul-terminated;
--   src must be nul-terminated; destSize
--   is the buffer size, not the number of bytes to copy.
--   
--   At most destSize - 1 characters will be copied. Always
--   nul-terminates (unless destSize is 0). This function
--   does not allocate memory. Unlike strncpy(), this
--   function doesn't pad dest (so it's often faster). It
--   returns the size of the attempted result, strlen (src), so if
--   retval >= destSize, truncation
--   occurred.
--   
--   Caveat: strlcpy() is supposedly more secure than
--   strcpy() or strncpy(), but if you
--   really want to avoid screwups, strdup is an even better idea.
strlcpy :: (HasCallStack, MonadIO m) => Text -> Text -> Word64 -> m Word64

-- | A case-insensitive string comparison, corresponding to the standard
--   strncasecmp() function on platforms which support it.
--   It is similar to strcasecmp except it only compares the first
--   n characters of the strings.

-- | Deprecated: (Since version 2.2)The problem with strncasecmp
--   is that it does the comparison by calling
--   toupper()/tolower(). These functions
--   are locale-specific and operate on single bytes. However, it is
--   impossible to handle things correctly from an internationalization
--   standpoint by operating on bytes, since characters may be multibyte.
--   Thus strncasecmp is broken if your string is guaranteed to be
--   ASCII, since it is locale-sensitive, and it's broken if your string is
--   localized, since it doesn't work on many encodings at all, including
--   UTF-8, EUC-JP, etc. There are therefore two replacement techniques:
--   asciiStrncasecmp, which only works on ASCII and is not
--   locale-sensitive, and utf8Casefold followed by
--   strcmp() on the resulting strings, which is good for
--   case-insensitive sorting of UTF-8.
strncasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> Word32 -> m Int32

-- | Duplicates the first n bytes of a string, returning a
--   newly-allocated buffer n + 1 bytes long which will
--   always be nul-terminated. If str is less than
--   n bytes long the buffer is padded with nuls. If
--   str is Nothing it returns Nothing. The
--   returned value should be freed when no longer needed.
--   
--   To copy a number of characters from a UTF-8 encoded string, use
--   utf8Strncpy instead.
strndup :: (HasCallStack, MonadIO m) => Text -> Word64 -> m Text

-- | Creates a new string length bytes long filled with
--   fillChar. The returned string should be freed when no
--   longer needed.
strnfill :: (HasCallStack, MonadIO m) => Word64 -> Int8 -> m Text

-- | Reverses all of the bytes in a string. For example, g_strreverse
--   ("abcdef") will result in "fedcba".
--   
--   Note that strreverse doesn't work on UTF-8 strings containing
--   multibyte characters. For that purpose, use utf8Strreverse.
strreverse :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Searches the string haystack for the last occurrence
--   of the string needle.
strrstr :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Searches the string haystack for the last occurrence
--   of the string needle, limiting the length of the
--   search to haystackLen.
strrstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m Text

-- | Returns a string describing the given signal, e.g. "Segmentation
--   fault". You should use this function in preference to
--   strsignal(), because it returns a string in UTF-8
--   encoding, and since not all platforms support the
--   strsignal() function.
strsignal :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | Searches the string haystack for the first occurrence
--   of the string needle, limiting the length of the
--   search to haystackLen.
strstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m Text

-- | Converts a string to a gdouble value. It calls the
--   standard strtod() function to handle the conversion,
--   but if the string is not completely converted it attempts the
--   conversion again with asciiStrtod, and returns the best match.
--   
--   This function should seldom be used. The normal situation when reading
--   numbers not for human consumption is to use asciiStrtod. Only
--   when you know that you must expect both locale formatted and C
--   formatted numbers should you use this. Make sure that you don't pass
--   strings such as comma separated lists of values, since the commas may
--   be interpreted as a decimal point in some locales, causing unexpected
--   results.
strtod :: (HasCallStack, MonadIO m) => Text -> m (Double, Text)

-- | Converts a string to upper case.

-- | Deprecated: (Since version 2.2)This function is totally broken for
--   the reasons discussed in the strncasecmp docs - use
--   asciiStrup or utf8Strup instead.
strup :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Checks if strv contains str.
--   strv must not be Nothing.
--   
--   Since: 2.44
strvContains :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Checks if strv1 and strv2 contain
--   exactly the same elements in exactly the same order. Elements are
--   compared using strEqual. To match independently of order, sort
--   the arrays first (using g_qsort_with_data() or
--   similar).
--   
--   Two empty arrays are considered equal. Neither strv1
--   not strv2 may be Nothing.
--   
--   Since: 2.60
strvEqual :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | No description available in the introspection data.
strvGetType :: (HasCallStack, MonadIO m) => m GType

-- | Returns the length of the given Nothing-terminated string array
--   strArray. strArray must not be
--   Nothing.
--   
--   Since: 2.6
strvLength :: (HasCallStack, MonadIO m) => Text -> m Word32

-- | Create a new test case, similar to
--   g_test_create_case(). However the test is assumed to
--   use no fixture, and test suites are automatically created on the fly
--   and added to the root fixture, based on the slash-separated portions
--   of testpath. The testData argument
--   will be passed as first argument to testFunc.
--   
--   If testpath includes the component "subprocess"
--   anywhere in it, the test will be skipped by default, and only run if
--   explicitly required via the -p command-line option or
--   testTrapSubprocess.
--   
--   No component of testpath may start with a dot
--   (.) if the TEST_OPTION_ISOLATE_DIRS option is being
--   used; and it is recommended to do so even if it isn’t.
--   
--   Since: 2.16
testAddDataFunc :: (HasCallStack, MonadIO m) => Text -> Ptr () -> TestDataFunc -> m ()

-- | Create a new test case, similar to
--   g_test_create_case(). However the test is assumed to
--   use no fixture, and test suites are automatically created on the fly
--   and added to the root fixture, based on the slash-separated portions
--   of testpath.
--   
--   If testpath includes the component "subprocess"
--   anywhere in it, the test will be skipped by default, and only run if
--   explicitly required via the -p command-line option or
--   testTrapSubprocess.
--   
--   No component of testpath may start with a dot
--   (.) if the TEST_OPTION_ISOLATE_DIRS option is being
--   used; and it is recommended to do so even if it isn’t.
--   
--   Since: 2.16
testAddFunc :: (HasCallStack, MonadIO m) => Text -> TestFunc -> m ()

-- | No description available in the introspection data.
testAssertExpectedMessagesInternal :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> m ()

-- | This function adds a message to test reports that associates a bug URI
--   with a test case. Bug URIs are constructed from a base URI set with
--   testBugBase and bugUriSnippet.
--   
--   Since: 2.16
testBug :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Specify the base URI for bug reports.
--   
--   The base URI is used to construct bug report messages for
--   g_test_message() when testBug is called.
--   Calling this function outside of a test case sets the default base URI
--   for all test cases. Calling it from within a test case changes the
--   base URI for the scope of the test case only. Bug URIs are constructed
--   by appending a bug specific URI portion to uriPattern,
--   or by replacing the special string '%s' within
--   uriPattern if that is present.
--   
--   Since: 2.16
testBugBase :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Indicates that a message with the given logDomain and
--   logLevel, with text matching pattern,
--   is expected to be logged. When this message is logged, it will not be
--   printed, and the test case will not abort.
--   
--   This API may only be used with the old logging API
--   (g_log() without G_LOG_USE_STRUCTURED
--   defined). It will not work with the structured logging API. See
--   [Testing for Messages][testing-for-messages].
--   
--   Use g_test_assert_expected_messages() to assert that
--   all previously-expected messages have been seen and suppressed.
--   
--   You can call this multiple times in a row, if multiple messages are
--   expected as a result of a single call. (The messages must appear in
--   the same order as the calls to testExpectMessage.)
--   
--   For example:
--   
--   
C code
--   
--   
--   // g_main_context_push_thread_default() should fail if the
--   // context is already owned by another thread.
--   g_test_expect_message (G_LOG_DOMAIN,
--                          G_LOG_LEVEL_CRITICAL,
--                          "assertion*acquired_context*failed");
--   g_main_context_push_thread_default (bad_context);
--   g_test_assert_expected_messages ();
--   
--   
--   Note that you cannot use this to test g_error()
--   messages, since g_error() intentionally never returns
--   even if the program doesn't abort; use testTrapSubprocess in
--   this case.
--   
--   If messages at LogLevelFlagsLevelDebug are emitted, but not
--   explicitly expected via testExpectMessage then they will be
--   ignored.
--   
--   Since: 2.34
testExpectMessage :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> Text -> m ()

-- | Indicates that a test failed. This function can be called multiple
--   times from the same test. You can use this function if your test
--   failed in a recoverable way.
--   
--   Do not use this function if the failure of a test could cause other
--   tests to malfunction.
--   
--   Calling this function will not stop the test from running, you need to
--   return from the test function yourself. So you can produce additional
--   diagnostic messages or even continue running the test.
--   
--   If not called from inside a test, this function does nothing.
--   
--   Since: 2.30
testFail :: (HasCallStack, MonadIO m) => m ()

-- | Returns whether a test has already failed. This will be the case when
--   testFail, testIncomplete or testSkip have been
--   called, but also if an assertion has failed.
--   
--   This can be useful to return early from a test if continuing after a
--   failed assertion might be harmful.
--   
--   The return value of this function is only meaningful if it is called
--   from inside a test function.
--   
--   Since: 2.38
testFailed :: (HasCallStack, MonadIO m) => m Bool

-- | Gets the pathname of the directory containing test files of the type
--   specified by fileType.
--   
--   This is approximately the same as calling g_test_build_filename("."),
--   but you don't need to free the return value.
--   
--   Since: 2.38
testGetDir :: (HasCallStack, MonadIO m) => TestFileType -> m [Char]

-- | Indicates that a test failed because of some incomplete functionality.
--   This function can be called multiple times from the same test.
--   
--   Calling this function will not stop the test from running, you need to
--   return from the test function yourself. So you can produce additional
--   diagnostic messages or even continue running the test.
--   
--   If not called from inside a test, this function does nothing.
--   
--   Since: 2.38
testIncomplete :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | No description available in the introspection data.
testLogTypeName :: (HasCallStack, MonadIO m) => TestLogType -> m Text

-- | This function enqueus a callback destroyFunc to be
--   executed during the next test case teardown phase. This is most useful
--   to auto destruct allocated test resources at the end of a test run.
--   Resources are released in reverse queue order, that means enqueueing
--   callback A before callback B will cause B() to be
--   called before A() during teardown.
--   
--   Since: 2.16
testQueueDestroy :: (HasCallStack, MonadIO m) => DestroyNotify -> Ptr () -> m ()

-- | Enqueue a pointer to be released with free during the next
--   teardown phase. This is equivalent to calling testQueueDestroy
--   with a destroy callback of free.
--   
--   Since: 2.16
testQueueFree :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Get a reproducible random floating point number, see
--   testRandInt for details on test case random numbers.
--   
--   Since: 2.16
testRandDouble :: (HasCallStack, MonadIO m) => m Double

-- | Get a reproducible random floating pointer number out of a specified
--   range, see testRandInt for details on test case random numbers.
--   
--   Since: 2.16
testRandDoubleRange :: (HasCallStack, MonadIO m) => Double -> Double -> m Double

-- | Get a reproducible random integer number.
--   
--   The random numbers generated by the g_test_rand_*() family of
--   functions change with every new test program start, unless the --seed
--   option is given when starting test programs.
--   
--   For individual test cases however, the random number generator is
--   reseeded, to avoid dependencies between tests and to make --seed
--   effective for all test cases.
--   
--   Since: 2.16
testRandInt :: (HasCallStack, MonadIO m) => m Int32

-- | Get a reproducible random integer number out of a specified range, see
--   testRandInt for details on test case random numbers.
--   
--   Since: 2.16
testRandIntRange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Runs all tests under the toplevel suite which can be retrieved with
--   g_test_get_root(). Similar to testRunSuite, the
--   test cases to be run are filtered according to test path arguments
--   (-p testpath and -s testpath) as parsed by
--   g_test_init(). testRunSuite or testRun
--   may only be called once in a program.
--   
--   In general, the tests and sub-suites within each suite are run in the
--   order in which they are defined. However, note that prior to GLib
--   2.36, there was a bug in the g_test_add_* functions which
--   caused them to create multiple suites with the same name, meaning that
--   if you created tests "/foo/simple", "/bar/simple", and
--   "/foo/using-bar" in that order, they would get run in that order
--   (since testRun would run the first "/foo" suite, then the
--   "/bar" suite, then the second "/foo" suite). As of 2.36, this bug is
--   fixed, and adding the tests in that order would result in a running
--   order of "/foo/simple", "/foo/using-bar", "/bar/simple". If this new
--   ordering is sub-optimal (because it puts more-complicated tests before
--   simpler ones, making it harder to figure out exactly what has failed),
--   you can fix it by changing the test paths to group tests by suite in a
--   way that will result in the desired running order. Eg, "/simple/foo",
--   "/simple/bar", "/complex/foo-using-bar".
--   
--   However, you should never make the actual result of a test depend on
--   the order that tests are run in. If you need to ensure that some
--   particular code runs before or after a given test case, use
--   g_test_add(), which lets you specify setup and
--   teardown functions.
--   
--   If all tests are skipped or marked as incomplete (expected failures),
--   this function will return 0 if producing TAP output, or 77 (treated as
--   "skip test" by Automake) otherwise.
--   
--   Since: 2.16
testRun :: (HasCallStack, MonadIO m) => m Int32

-- | Execute the tests within suite and all nested
--   GTestSuites. The test suites to be executed are
--   filtered according to test path arguments (-p testpath and
--   -s testpath) as parsed by g_test_init(). See
--   the testRun documentation for more information on the order
--   that tests are run in.
--   
--   testRunSuite or testRun may only be called once in a
--   program.
--   
--   Since: 2.16
testRunSuite :: (HasCallStack, MonadIO m) => TestSuite -> m Int32

-- | Changes the behaviour of g_assert_cmpstr(),
--   g_assert_cmpint(), g_assert_cmpuint(),
--   g_assert_cmphex(),
--   g_assert_cmpfloat(), g_assert_true(),
--   g_assert_false(), g_assert_null(),
--   g_assert_no_error(), g_assert_error(),
--   g_test_assert_expected_messages() and the various
--   g_test_trap_assert_*() macros to not abort to program, but instead
--   call testFail and continue. (This also changes the behavior of
--   testFail so that it will not cause the test program to abort
--   after completing the failed test.)
--   
--   Note that the g_assert_not_reached() and
--   g_assert() are not affected by this.
--   
--   This function can only be called after g_test_init().
--   
--   Since: 2.38
testSetNonfatalAssertions :: (HasCallStack, MonadIO m) => m ()

-- | Indicates that a test was skipped.
--   
--   Calling this function will not stop the test from running, you need to
--   return from the test function yourself. So you can produce additional
--   diagnostic messages or even continue running the test.
--   
--   If not called from inside a test, this function does nothing.
--   
--   Since: 2.38
testSkip :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | Returns True (after g_test_init() has been
--   called) if the test program is running under
--   testTrapSubprocess.
--   
--   Since: 2.38
testSubprocess :: (HasCallStack, MonadIO m) => m Bool

-- | Get the time since the last start of the timer with
--   testTimerStart.
--   
--   Since: 2.16
testTimerElapsed :: (HasCallStack, MonadIO m) => m Double

-- | Report the last result of testTimerElapsed.
--   
--   Since: 2.16
testTimerLast :: (HasCallStack, MonadIO m) => m Double

-- | Start a timing test. Call testTimerElapsed when the task is
--   supposed to be done. Call this function again to restart the timer.
--   
--   Since: 2.16
testTimerStart :: (HasCallStack, MonadIO m) => m ()

-- | No description available in the introspection data.
testTrapAssertions :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Word64 -> Text -> m ()

-- | Fork the current test program to execute a test case that might not
--   return or that might abort.
--   
--   If usecTimeout is non-0, the forked test case is
--   aborted and considered failing if its run time exceeds it.
--   
--   The forking behavior can be configured with the TestTrapFlags
--   flags.
--   
--   In the following example, the test code forks, the forked child
--   process produces some sample output and exits successfully. The
--   forking parent process then asserts successful child program
--   termination and validates child program outputs.
--   
--   
C code
--   
--   
--   static void
--   test_fork_patterns (void)
--   {
--     if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
--       {
--         g_print ("some stdout text: somagic17\n");
--         g_printerr ("some stderr text: semagic43\n");
--         exit (0); // successful test run
--       }
--     g_test_trap_assert_passed ();
--     g_test_trap_assert_stdout ("*somagic17*");
--     g_test_trap_assert_stderr ("*semagic43*");
--   }
--   
--   
--   Since: 2.16

-- | Deprecated: This function is implemented only on Unix platforms,and
--   is not always reliable due to problems inherent infork-without-exec.
--   Use testTrapSubprocess instead.
testTrapFork :: (HasCallStack, MonadIO m) => Word64 -> [TestTrapFlags] -> m Bool

-- | Check the result of the last testTrapSubprocess call.
--   
--   Since: 2.16
testTrapHasPassed :: (HasCallStack, MonadIO m) => m Bool

-- | Check the result of the last testTrapSubprocess call.
--   
--   Since: 2.16
testTrapReachedTimeout :: (HasCallStack, MonadIO m) => m Bool

-- | Respawns the test program to run only testPath in a
--   subprocess. This can be used for a test case that might not return, or
--   that might abort.
--   
--   If testPath is Nothing then the same test is
--   re-run in a subprocess. You can use testSubprocess to determine
--   whether the test is in a subprocess or not.
--   
--   testPath can also be the name of the parent test,
--   followed by "/subprocess/" and then a name for the specific
--   subtest (or just ending with "/subprocess" if the test only
--   has one child test); tests with names of this form will automatically
--   be skipped in the parent process.
--   
--   If usecTimeout is non-0, the test subprocess is
--   aborted and considered failing if its run time exceeds it.
--   
--   The subprocess behavior can be configured with the
--   TestSubprocessFlags flags.
--   
--   You can use methods such as
--   g_test_trap_assert_passed(),
--   g_test_trap_assert_failed(), and
--   g_test_trap_assert_stderr() to check the results of
--   the subprocess. (But note that
--   g_test_trap_assert_stdout() and
--   g_test_trap_assert_stderr() cannot be used if
--   testFlags specifies that the child should inherit the
--   parent stdout/stderr.)
--   
--   If your main () needs to behave differently in the
--   subprocess, you can call testSubprocess (after calling
--   g_test_init()) to see whether you are in a subprocess.
--   
--   The following example tests that calling
--   my_object_new(1000000) will abort with an error message.
--   
--   
C code
--   
--   
--   static void
--   test_create_large_object (void)
--   {
--     if (g_test_subprocess ())
--       {
--         my_object_new (1000000);
--         return;
--       }
--   
--     // Reruns this same test in a subprocess
--     g_test_trap_subprocess (NULL, 0, 0);
--     g_test_trap_assert_failed ();
--     g_test_trap_assert_stderr ("*ERROR*too large*");
--   }
--   
--   int
--   main (int argc, char **argv)
--   {
--     g_test_init (&argc, &argv, NULL);
--   
--     g_test_add_func ("/myobject/create_large_object",
--                      test_create_large_object);
--     return g_test_run ();
--   }
--   
--   
--   Since: 2.38
testTrapSubprocess :: (HasCallStack, MonadIO m) => Maybe Text -> Word64 -> [TestSubprocessFlags] -> m ()

-- | Sets a function to be called at regular intervals, with the given
--   priority. The function is called repeatedly until it returns
--   False, at which point the timeout is automatically destroyed
--   and the function will not be called again. The notify
--   function is called when the timeout is destroyed. The first call to
--   the function will be at the end of the first interval.
--   
--   Note that timeout functions may be delayed, due to the processing of
--   other event sources. Thus they should not be relied on for precise
--   timing. After each call to the timeout function, the time of the next
--   timeout is recalculated based on the current time and the given
--   interval (it does not try to 'catch up' time lost in delays).
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   data.
--   
--   This internally creates a main loop source using
--   timeoutSourceNew and attaches it to the global
--   MainContext using sourceAttach, so the callback will be
--   invoked in whichever thread is running that main context. You can do
--   these steps manually if you need greater control or to use a custom
--   main context.
--   
--   The interval given is in terms of monotonic time, not wall clock time.
--   See getMonotonicTime.
timeoutAdd :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

-- | Sets a function to be called at regular intervals, with
--   priority. The function is called repeatedly until it
--   returns False, at which point the timeout is automatically
--   destroyed and the function will not be called again.
--   
--   Unlike g_timeout_add(), this function operates at
--   whole second granularity. The initial starting point of the timer is
--   determined by the implementation and the implementation is expected to
--   group multiple timers together so that they fire all at the same time.
--   To allow this grouping, the interval to the first
--   timer is rounded and can deviate up to one second from the specified
--   interval. Subsequent timer iterations will generally run at the
--   specified interval.
--   
--   Note that timeout functions may be delayed, due to the processing of
--   other event sources. Thus they should not be relied on for precise
--   timing. After each call to the timeout function, the time of the next
--   timeout is recalculated based on the current time and the given
--   interval
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   data.
--   
--   If you want timing more precise than whole seconds, use
--   g_timeout_add() instead.
--   
--   The grouping of timers to fire at the same time results in a more
--   power and CPU efficient behavior so if your timer is in multiples of
--   seconds and you don't require the first timer exactly one second from
--   now, the use of g_timeout_add_seconds() is preferred
--   over g_timeout_add().
--   
--   This internally creates a main loop source using
--   timeoutSourceNewSeconds and attaches it to the main loop
--   context using sourceAttach. You can do these steps manually if
--   you need greater control.
--   
--   The interval given is in terms of monotonic time, not wall clock time.
--   See getMonotonicTime.
--   
--   Since: 2.14
timeoutAddSeconds :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

-- | Creates a new timeout source.
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed.
--   
--   The interval given is in terms of monotonic time, not wall clock time.
--   See getMonotonicTime.
timeoutSourceNew :: (HasCallStack, MonadIO m) => Word32 -> m Source

-- | Creates a new timeout source.
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed.
--   
--   The scheduling granularity/accuracy of this timeout source will be in
--   seconds.
--   
--   The interval given is in terms of monotonic time, not wall clock time.
--   See getMonotonicTime.
--   
--   Since: 2.14
timeoutSourceNewSeconds :: (HasCallStack, MonadIO m) => Word32 -> m Source

-- | Attempts to allocate nBytes, and returns
--   Nothing on failure. Contrast with malloc, which aborts
--   the program on failure.
tryMalloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | Attempts to allocate nBytes, initialized to 0's, and
--   returns Nothing on failure. Contrast with malloc0, which
--   aborts the program on failure.
--   
--   Since: 2.8
tryMalloc0 :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())

-- | This function is similar to tryMalloc0, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
tryMalloc0N :: (HasCallStack, MonadIO m) => Word64 -> Word64 -> m (Ptr ())

-- | This function is similar to tryMalloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
tryMallocN :: (HasCallStack, MonadIO m) => Word64 -> Word64 -> m (Ptr ())

-- | Attempts to realloc mem to a new size,
--   nBytes, and returns Nothing on failure.
--   Contrast with realloc, which aborts the program on failure.
--   
--   If mem is Nothing, behaves the same as
--   tryMalloc.
tryRealloc :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m (Ptr ())

-- | This function is similar to tryRealloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   Since: 2.24
tryReallocN :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> Word64 -> m (Ptr ())

-- | Determines the break type of c. c
--   should be a Unicode character (to derive a character from UTF-8
--   encoded text, use utf8GetChar). The break type is used to find
--   word and line breaks ("text boundaries"), Pango implements the Unicode
--   boundary resolution algorithms and normally you would use a function
--   such as pango_break() instead of caring about break
--   types yourself.
unicharBreakType :: (HasCallStack, MonadIO m) => Char -> m UnicodeBreakType

-- | Determines the canonical combining class of a Unicode character.
--   
--   Since: 2.14
unicharCombiningClass :: (HasCallStack, MonadIO m) => Char -> m Int32

-- | Performs a single composition step of the Unicode canonical
--   composition algorithm.
--   
--   This function includes algorithmic Hangul Jamo composition, but it is
--   not exactly the inverse of unicharDecompose. No composition can
--   have either of a or b equal to zero.
--   To be precise, this function composes if and only if there exists a
--   Primary Composite P which is canonically equivalent to the sequence
--   <a,b>. See the Unicode Standard
--   for the definition of Primary Composite.
--   
--   If a and b do not compose a new
--   character, ch is set to zero.
--   
--   See UAX#15 for details.
--   
--   Since: 2.30
unicharCompose :: (HasCallStack, MonadIO m) => Char -> Char -> Char -> m Bool

-- | Performs a single decomposition step of the Unicode canonical
--   decomposition algorithm.
--   
--   This function does not include compatibility decompositions. It does,
--   however, include algorithmic Hangul Jamo decomposition, as well as
--   'singleton' decompositions which replace a character by a single other
--   character. In the case of singletons *b will be set to
--   zero.
--   
--   If ch is not decomposable, *a is set
--   to ch and *b is set to zero.
--   
--   Note that the way Unicode decomposition pairs are defined, it is
--   guaranteed that b would not decompose further, but
--   a may itself decompose. To get the full canonical
--   decomposition for ch, one would need to recursively
--   call this function on a. Or use
--   g_unichar_fully_decompose().
--   
--   See UAX#15 for details.
--   
--   Since: 2.30
unicharDecompose :: (HasCallStack, MonadIO m) => Char -> Char -> Char -> m Bool

-- | Determines the numeric value of a character as a decimal digit.
unicharDigitValue :: (HasCallStack, MonadIO m) => Char -> m Int32

-- | In Unicode, some characters are "mirrored". This means that their
--   images are mirrored horizontally in text that is laid out from right
--   to left. For instance, "(" would become its mirror image, ")", in
--   right-to-left text.
--   
--   If ch has the Unicode mirrored property and there is
--   another unicode character that typically has a glyph that is the
--   mirror image of ch's glyph and
--   mirroredCh is set, it puts that character in the
--   address pointed to by mirroredCh. Otherwise the
--   original character is put.
--   
--   Since: 2.4
unicharGetMirrorChar :: (HasCallStack, MonadIO m) => Char -> Char -> m Bool

-- | Looks up the UnicodeScript for a particular character (as
--   defined by Unicode Standard Annex #24). No check is made for
--   ch being a valid Unicode character; if you pass in
--   invalid character, the result is undefined.
--   
--   This function is equivalent to
--   pango_script_for_unichar() and the two are
--   interchangeable.
--   
--   Since: 2.14
unicharGetScript :: (HasCallStack, MonadIO m) => Char -> m UnicodeScript

-- | Determines whether a character is alphanumeric. Given some UTF-8 text,
--   obtain a character value with utf8GetChar.
unicharIsalnum :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is alphabetic (i.e. a letter). Given
--   some UTF-8 text, obtain a character value with utf8GetChar.
unicharIsalpha :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is a control character. Given some
--   UTF-8 text, obtain a character value with utf8GetChar.
unicharIscntrl :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a given character is assigned in the Unicode standard.
unicharIsdefined :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is numeric (i.e. a digit). This covers
--   ASCII 0-9 and also digits in other languages/scripts. Given some UTF-8
--   text, obtain a character value with utf8GetChar.
unicharIsdigit :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is printable and not a space (returns
--   False for control characters, format characters, and spaces).
--   unicharIsprint is similar, but returns True for spaces.
--   Given some UTF-8 text, obtain a character value with
--   utf8GetChar.
unicharIsgraph :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is a lowercase letter. Given some UTF-8
--   text, obtain a character value with utf8GetChar.
unicharIslower :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is a mark (non-spacing mark, combining
--   mark, or enclosing mark in Unicode speak). Given some UTF-8 text,
--   obtain a character value with utf8GetChar.
--   
--   Note: in most cases where isalpha characters are allowed, ismark
--   characters should be allowed to as they are essential for writing most
--   European languages as well as many non-Latin scripts.
--   
--   Since: 2.14
unicharIsmark :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is printable. Unlike
--   unicharIsgraph, returns True for spaces. Given some
--   UTF-8 text, obtain a character value with utf8GetChar.
unicharIsprint :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is punctuation or a symbol. Given some
--   UTF-8 text, obtain a character value with utf8GetChar.
unicharIspunct :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is a space, tab, or line separator
--   (newline, carriage return, etc.). Given some UTF-8 text, obtain a
--   character value with utf8GetChar.
--   
--   (Note: don't use this to do word breaking; you have to use Pango or
--   equivalent to get word breaking right, the algorithm is fairly
--   complex.)
unicharIsspace :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a character is titlecase. Some characters in Unicode
--   which are composites, such as the DZ digraph have three case variants
--   instead of just two. The titlecase form is used at the beginning of a
--   word where only the first letter is capitalized. The titlecase form of
--   the DZ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.
unicharIstitle :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a character is uppercase.
unicharIsupper :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a character is typically rendered in a double-width
--   cell.
unicharIswide :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a character is typically rendered in a double-width cell
--   under legacy East Asian locales. If a character is wide according to
--   unicharIswide, then it is also reported wide with this
--   function, but the converse is not necessarily true. See the Unicode
--   Standard Annex #11 for details.
--   
--   If a character passes the unicharIswide test then it will also
--   pass this test, but not the other way around. Note that some
--   characters may pass both this test and unicharIszerowidth.
--   
--   Since: 2.12
unicharIswideCjk :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a character is a hexidecimal digit.
unicharIsxdigit :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines if a given character typically takes zero width when
--   rendered. The return value is True for all non-spacing and
--   enclosing marks (e.g., combining accents), format characters,
--   zero-width space, but not U+00AD SOFT HYPHEN.
--   
--   A typical use of this function is with one of unicharIswide or
--   unicharIswideCjk to determine the number of cells a string
--   occupies when displayed on a grid display (terminals). However, note
--   that not all terminals support zero-width rendering of zero-width
--   marks.
--   
--   Since: 2.14
unicharIszerowidth :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Converts a character to lower case.
unicharTolower :: (HasCallStack, MonadIO m) => Char -> m Char

-- | Converts a character to the titlecase.
unicharTotitle :: (HasCallStack, MonadIO m) => Char -> m Char

-- | Converts a character to uppercase.
unicharToupper :: (HasCallStack, MonadIO m) => Char -> m Char

-- | Classifies a Unicode character by type.
unicharType :: (HasCallStack, MonadIO m) => Char -> m UnicodeType

-- | Checks whether ch is a valid Unicode character. Some
--   possible integer values of ch will not be valid. 0 is
--   considered a valid character, though it's normally a string
--   terminator.
unicharValidate :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines the numeric value of a character as a hexidecimal digit.
unicharXdigitValue :: (HasCallStack, MonadIO m) => Char -> m Int32

-- | Computes the canonical decomposition of a Unicode character.

-- | Deprecated: (Since version 2.30)Use the more flexible
--   g_unichar_fully_decompose() instead.
unicodeCanonicalDecomposition :: (HasCallStack, MonadIO m) => Char -> Word64 -> m Char

-- | Computes the canonical ordering of a string in-place. This rearranges
--   decomposed characters in the string according to their combining
--   classes. See the Unicode manual for more information.
unicodeCanonicalOrdering :: (HasCallStack, MonadIO m) => Char -> Word64 -> m ()

-- | Looks up the Unicode script for iso15924. ISO 15924
--   assigns four-letter codes to scripts. For example, the code for Arabic
--   is 'Arab'. This function accepts four letter codes encoded as a
--   guint32 in a big-endian fashion. That is, the code
--   expected for Arabic is 0x41726162 (0x41 is ASCII code for 'A', 0x72 is
--   ASCII code for 'r', etc).
--   
--   See Codes for the representation of names of scripts for
--   details.
--   
--   Since: 2.30
unicodeScriptFromIso15924 :: (HasCallStack, MonadIO m) => Word32 -> m UnicodeScript

-- | Looks up the ISO 15924 code for script. ISO 15924
--   assigns four-letter codes to scripts. For example, the code for Arabic
--   is 'Arab'. The four letter codes are encoded as a
--   guint32 by this function in a big-endian fashion. That
--   is, the code returned for Arabic is 0x41726162 (0x41 is ASCII code for
--   'A', 0x72 is ASCII code for 'r', etc).
--   
--   See Codes for the representation of names of scripts for
--   details.
--   
--   Since: 2.30
unicodeScriptToIso15924 :: (HasCallStack, MonadIO m) => UnicodeScript -> m Word32

-- | No description available in the introspection data.
unixErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Sets a function to be called when the IO condition, as specified by
--   condition becomes true for fd.
--   
--   This is the same as g_unix_fd_add(), except that it
--   allows you to specify a non-default priority and a provide a
--   DestroyNotify for userData.
--   
--   Since: 2.36
unixFdAddFull :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> [IOCondition] -> UnixFDSourceFunc -> m Word32

-- | Creates a Source to watch for a particular IO condition on a
--   file descriptor.
--   
--   The source will never close the fd -- you must do it yourself.
--   
--   Since: 2.36
unixFdSourceNew :: (HasCallStack, MonadIO m) => Int32 -> [IOCondition] -> m Source

-- | Similar to the UNIX pipe() call, but on modern systems
--   like Linux uses the pipe2() system call, which
--   atomically creates a pipe with the configured flags. The only
--   supported flag currently is FD_CLOEXEC. If for example
--   you want to configure O_NONBLOCK, that must still be
--   done separately with fcntl().
--   
--   This function does not take O_CLOEXEC, it takes
--   FD_CLOEXEC as if for fcntl(); these
--   are different on Linux/glibc.
--   
--   Since: 2.30
unixOpenPipe :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Control the non-blocking state of the given file descriptor, according
--   to nonblock. On most systems this uses
--   O_NONBLOCK, but on some older ones may use
--   O_NDELAY.
--   
--   Since: 2.30
unixSetFdNonblocking :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m ()

-- | A convenience function for unixSignalSourceNew, which attaches
--   to the default MainContext. You can remove the watch using
--   sourceRemove.
--   
--   Since: 2.30
unixSignalAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> SourceFunc -> m Word32

-- | Create a Source that will be dispatched upon delivery of the
--   UNIX signal signum. In GLib versions before 2.36, only
--   SIGHUP, SIGINT, SIGTERM can be monitored.
--   In GLib 2.36, SIGUSR1 and SIGUSR2 were added. In
--   GLib 2.54, SIGWINCH was added.
--   
--   Note that unlike the UNIX default, all sources which have created a
--   watch will be dispatched, regardless of which underlying thread
--   invoked unixSignalSourceNew.
--   
--   For example, an effective use of this function is to handle
--   SIGTERM cleanly; flushing any outstanding files, and then
--   calling g_main_loop_quit (). It is not safe to do any of this a
--   regular UNIX signal handler; your handler may be invoked while
--   malloc() or another library function is running,
--   causing reentrancy if you attempt to use it from the handler. None of
--   the GLib/GObject API is safe against this kind of reentrancy.
--   
--   The interaction of this source when combined with native UNIX
--   functions like sigprocmask() is not defined.
--   
--   The source will not initially be associated with any
--   MainContext and must be added to one with sourceAttach
--   before it will be executed.
--   
--   Since: 2.30
unixSignalSourceNew :: (HasCallStack, MonadIO m) => Int32 -> m Source

-- | A wrapper for the POSIX unlink() function. The
--   unlink() function deletes a name from the filesystem.
--   If this was the last link to the file and no processes have it opened,
--   the diskspace occupied by the file is freed.
--   
--   See your C library manual for more details about
--   unlink(). Note that on Windows, it is in general not
--   possible to delete files that are open to some process, or mapped into
--   memory.
--   
--   Since: 2.6
unlink :: (HasCallStack, MonadIO m) => [Char] -> m Int32

-- | Removes an environment variable from the environment.
--   
--   Note that on some systems, when variables are overwritten, the memory
--   used for the previous variables and its value isn't reclaimed.
--   
--   You should be mindful of the fact that environment variable handling
--   in UNIX is not thread-safe, and your program may crash if one thread
--   calls unsetenv while another thread is calling
--   getenv(). (And note that many functions, such as
--   gettext(), call getenv() internally.)
--   This function is only safe to use at the very start of your program,
--   before creating any other threads (or creating objects that create
--   worker threads of their own).
--   
--   If you need to set up the environment for a child process, you can use
--   getEnviron to get an environment array, modify that with
--   environSetenv and environUnsetenv, and then pass that
--   array directly to execvpe(), spawnAsync, or the
--   like.
--   
--   Since: 2.4
unsetenv :: (HasCallStack, MonadIO m) => [Char] -> m ()

-- | Escapes a string for use in a URI.
--   
--   Normally all characters that are not "unreserved" (i.e. ASCII
--   alphanumerical characters plus dash, dot, underscore and tilde) are
--   escaped. But if you specify characters in
--   reservedCharsAllowed they are not escaped. This is
--   useful for the "reserved" characters in the URI specification, since
--   those are allowed unescaped in some portions of a URI.
--   
--   Since: 2.16
uriEscapeString :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Bool -> m Text

-- | Splits an URI list conforming to the text/uri-list mime type defined
--   in RFC 2483 into individual URIs, discarding any comments. The URIs
--   are not validated.
--   
--   Since: 2.6
uriListExtractUris :: (HasCallStack, MonadIO m) => Text -> m [Text]

-- | Gets the scheme portion of a URI string. RFC 3986 decodes the scheme
--   as: > >URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
--   
--   Common schemes include "file", "http", "svn+ssh", etc.
--   
--   Since: 2.16
uriParseScheme :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Unescapes a segment of an escaped string.
--   
--   If any of the characters in illegalCharacters or the
--   character zero appears as an escaped character in
--   escapedString then that is an error and Nothing
--   will be returned. This is useful it you want to avoid for instance
--   having a slash being expanded in an escaped path element, which might
--   confuse pathname handling.
--   
--   Since: 2.16
uriUnescapeSegment :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> Maybe Text -> m Text

-- | Unescapes a whole escaped string.
--   
--   If any of the characters in illegalCharacters or the
--   character zero appears as an escaped character in
--   escapedString then that is an error and Nothing
--   will be returned. This is useful it you want to avoid for instance
--   having a slash being expanded in an escaped path element, which might
--   confuse pathname handling.
--   
--   Since: 2.16
uriUnescapeString :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m Text

-- | Pauses the current thread for the given number of microseconds.
--   
--   There are 1 million microseconds per second (represented by the
--   USEC_PER_SEC macro). usleep may have limited precision,
--   depending on hardware and operating system; don't rely on the exact
--   length of the sleep.
usleep :: (HasCallStack, MonadIO m) => CULong -> m ()

-- | Converts a string into a form that is independent of case. The result
--   will not correspond to any particular case, but can be compared for
--   equality or ordered with the results of calling utf8Casefold on
--   other strings.
--   
--   Note that calling utf8Casefold followed by utf8Collate
--   is only an approximation to the correct linguistic case insensitive
--   ordering, though it is a fairly good one. Getting this exactly right
--   would require a more sophisticated collation function that takes case
--   sensitivity into account. GLib does not currently provide such a
--   function.
utf8Casefold :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Compares two strings for ordering using the linguistically correct
--   rules for the [current locale][setlocale]. When sorting a large number
--   of strings, it will be significantly faster to obtain collation keys
--   with utf8CollateKey and compare the keys with
--   strcmp() when sorting instead of sorting the original
--   strings.
utf8Collate :: (HasCallStack, MonadIO m) => Text -> Text -> m Int32

-- | Converts a string into a collation key that can be compared with other
--   collation keys produced by the same function using
--   strcmp().
--   
--   The results of comparing the collation keys of two strings with
--   strcmp() will always be the same as comparing the two
--   original keys with utf8Collate.
--   
--   Note that this function depends on the [current locale][setlocale].
utf8CollateKey :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Converts a string into a collation key that can be compared with other
--   collation keys produced by the same function using
--   strcmp().
--   
--   In order to sort filenames correctly, this function treats the dot '.'
--   as a special case. Most dictionary orderings seem to consider it
--   insignificant, thus producing the ordering "event.c"
--   "eventgenerator.c" "event.h" instead of "event.c" "event.h"
--   "eventgenerator.c". Also, we would like to treat numbers intelligently
--   so that "file1" "file10" "file5" is sorted as "file1" "file5"
--   "file10".
--   
--   Note that this function depends on the [current locale][setlocale].
--   
--   Since: 2.8
utf8CollateKeyForFilename :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Finds the start of the next UTF-8 character in the string after
--   p.
--   
--   p does not have to be at the beginning of a UTF-8
--   character. No check is made to see if the character found is actually
--   valid other than it starts with an appropriate byte.
--   
--   If end is Nothing, the return value will never
--   be Nothing: if the end of the string is reached, a pointer to
--   the terminating nul byte is returned. If end is
--   non-Nothing, the return value will be Nothing if the end
--   of the string is reached.
utf8FindNextChar :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m (Maybe Text)

-- | Given a position p with a UTF-8 encoded string
--   str, find the start of the previous UTF-8 character
--   starting before p. Returns Nothing if no UTF-8
--   characters are present in str before
--   p.
--   
--   p does not have to be at the beginning of a UTF-8
--   character. No check is made to see if the character found is actually
--   valid other than it starts with an appropriate byte.
utf8FindPrevChar :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Converts a sequence of bytes encoded as UTF-8 to a Unicode character.
--   
--   If p does not point to a valid UTF-8 encoded
--   character, results are undefined. If you are not sure that the bytes
--   are complete valid Unicode characters, you should use
--   utf8GetCharValidated instead.
utf8GetChar :: (HasCallStack, MonadIO m) => Text -> m Char

-- | Convert a sequence of bytes encoded as UTF-8 to a Unicode character.
--   This function checks for incomplete characters, for invalid characters
--   such as characters that are out of the range of Unicode, and for
--   overlong encodings of valid characters.
--   
--   Note that utf8GetCharValidated returns (gunichar)-2 if
--   maxLen is positive and any of the bytes in the first
--   UTF-8 character sequence are nul.
utf8GetCharValidated :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Char

-- | If the provided string is valid UTF-8, return a copy of it. If not,
--   return a copy in which bytes that could not be interpreted as valid
--   Unicode are replaced with the Unicode replacement character (U+FFFD).
--   
--   For example, this is an appropriate function to use if you have
--   received a string that was incorrectly declared to be UTF-8, and you
--   need a valid UTF-8 version of it that can be logged or displayed to
--   the user, with the assumption that it is close enough to ASCII or
--   UTF-8 to be mostly readable as-is.
--   
--   Since: 2.52
utf8MakeValid :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Converts a string into canonical form, standardizing such issues as
--   whether a character with an accent is represented as a base character
--   and combining accent or as a single precomposed character. The string
--   has to be valid UTF-8, otherwise Nothing is returned. You
--   should generally call utf8Normalize before comparing two
--   Unicode strings.
--   
--   The normalization mode NormalizeModeDefault only standardizes
--   differences that do not affect the text content, such as the
--   above-mentioned accent representation. NormalizeModeAll also
--   standardizes the "compatibility" characters in Unicode, such as
--   SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE).
--   Formatting information may be lost but for most text operations such
--   characters should be considered the same.
--   
--   NormalizeModeDefaultCompose and NormalizeModeAllCompose
--   are like NormalizeModeDefault and NormalizeModeAll, but
--   returned a result with composed forms rather than a maximally
--   decomposed form. This is often useful if you intend to convert the
--   string to a legacy encoding or pass it to a system with less capable
--   Unicode handling.
utf8Normalize :: (HasCallStack, MonadIO m) => Text -> Int64 -> NormalizeMode -> m Text

-- | Converts from an integer character offset to a pointer to a position
--   within the string.
--   
--   Since 2.10, this function allows to pass a negative
--   offset to step backwards. It is usually worth stepping
--   backwards from the end instead of forwards if offset
--   is in the last fourth of the string, since moving forward is about 3
--   times faster than moving backward.
--   
--   Note that this function doesn't abort when reaching the end of
--   str. Therefore you should be sure that
--   offset is within string boundaries before calling that
--   function. Call utf8Strlen when unsure. This limitation exists
--   as this function is called frequently during text rendering and
--   therefore has to be as fast as possible.
utf8OffsetToPointer :: (HasCallStack, MonadIO m) => Text -> CLong -> m Text

-- | Converts from a pointer to position within a string to a integer
--   character offset.
--   
--   Since 2.10, this function allows pos to be before
--   str, and returns a negative offset in this case.
utf8PointerToOffset :: (HasCallStack, MonadIO m) => Text -> Text -> m CLong

-- | Finds the previous UTF-8 character in the string before
--   p.
--   
--   p does not have to be at the beginning of a UTF-8
--   character. No check is made to see if the character found is actually
--   valid other than it starts with an appropriate byte. If
--   p might be the first character of the string, you must
--   use utf8FindPrevChar instead.
utf8PrevChar :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Finds the leftmost occurrence of the given Unicode character in a
--   UTF-8 encoded string, while limiting the search to len
--   bytes. If len is -1, allow unbounded search.
utf8Strchr :: (HasCallStack, MonadIO m) => Text -> Int64 -> Char -> m Text

-- | Converts all Unicode characters in the string that have a case to
--   lowercase. The exact manner that this is done depends on the current
--   locale, and may result in the number of characters in the string
--   changing.
utf8Strdown :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Computes the length of the string in characters, not including the
--   terminating nul character. If the max'th byte falls in
--   the middle of a character, the last (partial) character is not
--   counted.
utf8Strlen :: (HasCallStack, MonadIO m) => Text -> Int64 -> m CLong

-- | Like the standard C strncpy() function, but copies a
--   given number of characters instead of a given number of bytes. The
--   src string must be valid UTF-8 encoded text. (Use
--   utf8Validate on all text before trying to use UTF-8 utility
--   functions with it.)
--   
--   Note you must ensure dest is at least 4 *
--   n to fit the largest possible UTF-8 characters
utf8Strncpy :: (HasCallStack, MonadIO m) => Text -> Text -> Word64 -> m Text

-- | Find the rightmost occurrence of the given Unicode character in a
--   UTF-8 encoded string, while limiting the search to len
--   bytes. If len is -1, allow unbounded search.
utf8Strrchr :: (HasCallStack, MonadIO m) => Text -> Int64 -> Char -> m Text

-- | Reverses a UTF-8 string. str must be valid UTF-8
--   encoded text. (Use utf8Validate on all text before trying to
--   use UTF-8 utility functions with it.)
--   
--   This function is intended for programmatic uses of reversed strings.
--   It pays no attention to decomposed characters, combining marks, byte
--   order marks, directional indicators (LRM, LRO, etc) and similar
--   characters which might need special handling when reversing a string
--   for display purposes.
--   
--   Note that unlike strreverse, this function returns
--   newly-allocated memory, which should be freed with free when no
--   longer needed.
--   
--   Since: 2.2
utf8Strreverse :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Converts all Unicode characters in the string that have a case to
--   uppercase. The exact manner that this is done depends on the current
--   locale, and may result in the number of characters in the string
--   increasing. (For instance, the German ess-zet will be changed to SS.)
utf8Strup :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Copies a substring out of a UTF-8 encoded string. The substring will
--   contain endPos - startPos characters.
--   
--   Since: 2.30
utf8Substring :: (HasCallStack, MonadIO m) => Text -> CLong -> CLong -> m Text

-- | Validates UTF-8 encoded text. str is the text to
--   validate; if str is nul-terminated, then
--   maxLen can be -1, otherwise maxLen
--   should be the number of bytes to validate. If end is
--   non-Nothing, then the end of the valid range will be stored
--   there (i.e. the start of the first invalid character if some bytes
--   were invalid, or the end of the text being validated otherwise).
--   
--   Note that utf8Validate returns False if
--   maxLen is positive and any of the
--   maxLen bytes are nul.
--   
--   Returns True if all of str was valid. Many GLib
--   and GTK+ routines require valid UTF-8 as input; so data read from a
--   file or the network should be checked with utf8Validate before
--   doing anything else with it.
utf8Validate :: (HasCallStack, MonadIO m) => ByteString -> m (Bool, Text)

-- | Validates UTF-8 encoded text.
--   
--   As with utf8Validate, but maxLen must be set,
--   and hence this function will always return False if any of the
--   bytes of str are nul.
--   
--   Since: 2.60
utf8ValidateLen :: (HasCallStack, MonadIO m) => ByteString -> m (Bool, Text)

-- | Parses the string str and verify if it is a UUID.
--   
--   The function accepts the following syntax:
--   
--   
--   
- simple forms (e.g.
--   f81d4fae-7dec-11d0-a765-00a0c91e6bf6)
--   
--   
--   Note that hyphens are required within the UUID string itself, as per
--   the aforementioned RFC.
--   
--   Since: 2.52
uuidStringIsValid :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Generates a random UUID (RFC 4122 version 4) as a string.
--   
--   Since: 2.52
uuidStringRandom :: (HasCallStack, MonadIO m) => m Text

-- | No description available in the introspection data.
variantGetGtype :: (HasCallStack, MonadIO m) => m GType

-- | Represents a precise time, with seconds and microseconds. Similar to
--   the struct timeval returned by the gettimeofday() UNIX
--   system call.
--   
--   GLib is attempting to unify around the use of 64bit integers to
--   represent microsecond-precision time. As such, this type will be
--   removed from a future version of GLib. A consequence of using
--   glong for tv_sec is that on 32-bit systems
--   GTimeVal is subject to the year 2038 problem.
module GI.GLib.Structs.TimeVal

-- | Memory-managed wrapper type.
newtype TimeVal
TimeVal :: ManagedPtr TimeVal -> TimeVal

-- | Construct a TimeVal struct initialized to zero.
newZeroTimeVal :: MonadIO m => m TimeVal

-- | A convenience alias for Nothing :: Maybe TimeVal.
noTimeVal :: Maybe TimeVal

-- | Adds the given number of microseconds to time_.
--   microseconds can also be negative to decrease the
--   value of time_.
timeValAdd :: (HasCallStack, MonadIO m) => TimeVal -> CLong -> m ()

-- | Converts a string containing an ISO 8601 encoded date and time to a
--   TimeVal and puts it into time_.
--   
--   isoDate must include year, month, day, hours, minutes,
--   and seconds. It can optionally include fractions of a second and a
--   time zone indicator. (In the absence of any time zone indication, the
--   timestamp is assumed to be in local time.)
--   
--   Any leading or trailing space in isoDate is ignored.
--   
--   Since: 2.12
timeValFromIso8601 :: (HasCallStack, MonadIO m) => Text -> m (Bool, TimeVal)

-- | Converts time_ into an RFC 3339 encoded string,
--   relative to the Coordinated Universal Time (UTC). This is one of the
--   many formats allowed by ISO 8601.
--   
--   ISO 8601 allows a large number of date/time formats, with or without
--   punctuation and optional elements. The format returned by this
--   function is a complete date and time, with optional punctuation
--   included, the UTC time zone represented as "Z", and the
--   tvUsec part included if and only if it is nonzero,
--   i.e. either "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS.fffffZ".
--   
--   This corresponds to the Internet date/time format defined by RFC
--   3339, and to either of the two most-precise formats defined by the
--   W3C Note Date and Time Formats. Both of these documents are
--   profiles of ISO 8601.
--   
--   Use dateTimeFormat or g_strdup_printf() if a
--   different variation of ISO 8601 format is required.
--   
--   If time_ represents a date which is too large to fit
--   into a struct tm, Nothing will be returned. This is
--   platform dependent. Note also that since GTimeVal stores the
--   number of seconds as a glong, on 32-bit systems it is subject
--   to the year 2038 problem.
--   
--   The return value of timeValToIso8601 has been nullable since
--   GLib 2.54; before then, GLib would crash under the same conditions.
--   
--   Since: 2.12
timeValToIso8601 :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe Text)

-- | Get the value of the “tv_sec” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get timeVal #tvSec
--   
getTimeValTvSec :: MonadIO m => TimeVal -> m CLong

-- | Set the value of the “tv_sec” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set timeVal [ #tvSec := value ]
--   
setTimeValTvSec :: MonadIO m => TimeVal -> CLong -> m ()

-- | Get the value of the “tv_usec” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get timeVal #tvUsec
--   
getTimeValTvUsec :: MonadIO m => TimeVal -> m CLong

-- | Set the value of the “tv_usec” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set timeVal [ #tvUsec := value ]
--   
setTimeValTvUsec :: MonadIO m => TimeVal -> CLong -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TimeVal.TimeVal
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TimeVal.TimeVal tag

-- | GDateTime is an opaque structure whose members cannot be
--   accessed directly.
--   
--   Since: 2.26
module GI.GLib.Structs.DateTime

-- | Memory-managed wrapper type.
newtype DateTime
DateTime :: ManagedPtr DateTime -> DateTime

-- | A convenience alias for Nothing :: Maybe
--   DateTime.
noDateTime :: Maybe DateTime

-- | Creates a copy of datetime and adds the specified
--   timespan to the copy.
--   
--   Since: 2.26
dateTimeAdd :: (HasCallStack, MonadIO m) => DateTime -> Int64 -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of days to the copy. Add negative values to subtract days.
--   
--   Since: 2.26
dateTimeAddDays :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | Creates a new DateTime adding the specified values to the
--   current date and time in datetime. Add negative values
--   to subtract.
--   
--   Since: 2.26
dateTimeAddFull :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of hours. Add negative values to subtract hours.
--   
--   Since: 2.26
dateTimeAddHours :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | Creates a copy of datetime adding the specified number
--   of minutes. Add negative values to subtract minutes.
--   
--   Since: 2.26
dateTimeAddMinutes :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of months to the copy. Add negative values to subtract months.
--   
--   The day of the month of the resulting DateTime is clamped to
--   the number of days in the updated calendar month. For example, if
--   adding 1 month to 31st January 2018, the result would be 28th February
--   2018. In 2020 (a leap year), the result would be 29th February.
--   
--   Since: 2.26
dateTimeAddMonths :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of seconds. Add negative values to subtract seconds.
--   
--   Since: 2.26
dateTimeAddSeconds :: (HasCallStack, MonadIO m) => DateTime -> Double -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of weeks to the copy. Add negative values to subtract weeks.
--   
--   Since: 2.26
dateTimeAddWeeks :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | Creates a copy of datetime and adds the specified
--   number of years to the copy. Add negative values to subtract years.
--   
--   As with dateTimeAddMonths, if the resulting date would be 29th
--   February on a non-leap year, the day will be clamped to 28th February.
--   
--   Since: 2.26
dateTimeAddYears :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m DateTime

-- | A comparison function for GDateTimes that is suitable
--   as a CompareFunc. Both GDateTimes must be
--   non-Nothing.
--   
--   Since: 2.26
dateTimeCompare :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Int32

-- | Calculates the difference in time between end and
--   begin. The GTimeSpan that is returned
--   is effectively end - begin (ie:
--   positive if the first parameter is larger).
--   
--   Since: 2.26
dateTimeDifference :: (HasCallStack, MonadIO m) => DateTime -> DateTime -> m Int64

-- | Checks to see if dt1 and dt2 are
--   equal.
--   
--   Equal here means that they represent the same moment after converting
--   them to the same time zone.
--   
--   Since: 2.26
dateTimeEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Creates a newly allocated string representing the requested
--   format.
--   
--   The format strings understood by this function are a subset of the
--   strftime() format language as specified by C99. The
--   %D, %U and %W conversions are not supported, nor is the 'E' modifier.
--   The GNU extensions %k, %l, %s and %P are supported, however, as are
--   the '0', '_' and '-' modifiers.
--   
--   In contrast to strftime(), this function always
--   produces a UTF-8 string, regardless of the current locale. Note that
--   the rendering of many formats is locale-dependent and may not match
--   the strftime() output exactly.
--   
--   The following format specifiers are supported:
--   
--   
--   
- %a: the abbreviated weekday name according to the current
--   locale
--   
- %A: the full weekday name according to the current locale
--   
- %b: the abbreviated month name according to the current
--   locale
--   
- %B: the full month name according to the current locale
--   
- %c: the preferred date and time representation for the current
--   locale
--   
- %C: the century number (year/100) as a 2-digit integer
--   (00-99)
--   
- %d: the day of the month as a decimal number (range 01 to 31)
--   
- %e: the day of the month as a decimal number (range 1 to 31)
--   
- %F: equivalent to %Y-%m-%d (the ISO 8601 date
--   format)
--   
- %g: the last two digits of the ISO 8601 week-based year as a
--   decimal number (00-99). This works well with %V and %u.
--   
- %G: the ISO 8601 week-based year as a decimal number. This works
--   well with %V and %u.
--   
- %h: equivalent to %b
--   
- %H: the hour as a decimal number using a 24-hour clock (range 00
--   to 23)
--   
- %I: the hour as a decimal number using a 12-hour clock (range 01
--   to 12)
--   
- %j: the day of the year as a decimal number (range 001 to
--   366)
--   
- %k: the hour (24-hour clock) as a decimal number (range 0 to 23);
--   single digits are preceded by a blank
--   
- %l: the hour (12-hour clock) as a decimal number (range 1 to 12);
--   single digits are preceded by a blank
--   
- %m: the month as a decimal number (range 01 to 12)
--   
- %M: the minute as a decimal number (range 00 to 59)
--   
- %p: either "AM" or "PM" according to the given time value, or the
--   corresponding strings for the current locale. Noon is treated as "PM"
--   and midnight as "AM".
--   
- %P: like %p but lowercase: "am" or "pm" or a corresponding string
--   for the current locale
--   
- %r: the time in a.m. or p.m. notation
--   
- %R: the time in 24-hour notation (%H:%M)
--   
- %s: the number of seconds since the Epoch, that is, since
--   1970-01-01 00:00:00 UTC
--   
- %S: the second as a decimal number (range 00 to 60)
--   
- %t: a tab character
--   
- %T: the time in 24-hour notation with seconds (%H:%M:%S)
--   
- %u: the ISO 8601 standard day of the week as a decimal, range 1 to
--   7, Monday being 1. This works well with %G and %V.
--   
- %V: the ISO 8601 standard week number of the current year as a
--   decimal number, range 01 to 53, where week 1 is the first week that
--   has at least 4 days in the new year. See dateTimeGetWeekOfYear.
--   This works well with %G and %u.
--   
- %w: the day of the week as a decimal, range 0 to 6, Sunday being
--   0. This is not the ISO 8601 standard format -- use %u instead.
--   
- %x: the preferred date representation for the current locale
--   without the time
--   
- %X: the preferred time representation for the current locale
--   without the date
--   
- %y: the year as a decimal number without the century
--   
- %Y: the year as a decimal number including the century
--   
- %z: the time zone as an offset from UTC (+hhmm)
--   
- %:z: the time zone as an offset from UTC (+hh:mm). This is a
--   gnulib strftime() extension. Since: 2.38
--   
- %::z: the time zone as an offset from UTC (+hh:mm:ss). This is a
--   gnulib strftime() extension. Since: 2.38
--   
- %:::z: the time zone as an offset from UTC, with : to necessary
--   precision (e.g., -04, +05:30). This is a gnulib
--   strftime() extension. Since: 2.38
--   
- %Z: the time zone or name or abbreviation
--   
- %%: a literal % character
--   
--   
--   Some conversion specifications can be modified by preceding the
--   conversion specifier by one or more modifier characters. The following
--   modifiers are supported for many of the numeric conversions:
--   
--   
--   
- O: Use alternative numeric symbols, if the current locale supports
--   those.
--   
- _: Pad a numeric result with spaces. This overrides the default
--   padding for the specifier.
--   
- -: Do not pad a numeric result. This overrides the default padding
--   for the specifier.
--   
- 0: Pad a numeric result with zeros. This overrides the default
--   padding for the specifier.
--   
--   
--   Additionally, when O is used with B, b, or h, it produces the
--   alternative form of a month name. The alternative form should be used
--   when the month name is used without a day number (e.g., standalone).
--   It is required in some languages (Baltic, Slavic, Greek, and more) due
--   to their grammatical rules. For other languages there is no
--   difference. %OB is a GNU and BSD strftime() extension
--   expected to be added to the future POSIX specification, %Ob and %Oh
--   are GNU strftime() extensions. Since: 2.56
--   
--   Since: 2.26
dateTimeFormat :: (HasCallStack, MonadIO m) => DateTime -> Text -> m Text

-- | Retrieves the day of the month represented by datetime
--   in the gregorian calendar.
--   
--   Since: 2.26
dateTimeGetDayOfMonth :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the ISO 8601 day of the week on which
--   datetime falls (1 is Monday, 2 is Tuesday... 7 is
--   Sunday).
--   
--   Since: 2.26
dateTimeGetDayOfWeek :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the day of the year represented by datetime
--   in the Gregorian calendar.
--   
--   Since: 2.26
dateTimeGetDayOfYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the hour of the day represented by datetime
--   
--   Since: 2.26
dateTimeGetHour :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the microsecond of the date represented by
--   datetime
--   
--   Since: 2.26
dateTimeGetMicrosecond :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the minute of the hour represented by
--   datetime
--   
--   Since: 2.26
dateTimeGetMinute :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the month of the year represented by
--   datetime in the Gregorian calendar.
--   
--   Since: 2.26
dateTimeGetMonth :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the second of the minute represented by
--   datetime
--   
--   Since: 2.26
dateTimeGetSecond :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the number of seconds since the start of the last minute,
--   including the fractional part.
--   
--   Since: 2.26
dateTimeGetSeconds :: (HasCallStack, MonadIO m) => DateTime -> m Double

-- | Get the time zone for this datetime.
--   
--   Since: 2.58
dateTimeGetTimezone :: (HasCallStack, MonadIO m) => DateTime -> m TimeZone

-- | Determines the time zone abbreviation to be used at the time and in
--   the time zone of datetime.
--   
--   For example, in Toronto this is currently "EST" during the winter
--   months and "EDT" during the summer months when daylight savings time
--   is in effect.
--   
--   Since: 2.26
dateTimeGetTimezoneAbbreviation :: (HasCallStack, MonadIO m) => DateTime -> m Text

-- | Determines the offset to UTC in effect at the time and in the time
--   zone of datetime.
--   
--   The offset is the number of microseconds that you add to UTC time to
--   arrive at local time for the time zone (ie: negative numbers for time
--   zones west of GMT, positive numbers for east).
--   
--   If datetime represents UTC time, then the offset is
--   always zero.
--   
--   Since: 2.26
dateTimeGetUtcOffset :: (HasCallStack, MonadIO m) => DateTime -> m Int64

-- | Returns the ISO 8601 week-numbering year in which the week containing
--   datetime falls.
--   
--   This function, taken together with dateTimeGetWeekOfYear and
--   dateTimeGetDayOfWeek can be used to determine the full ISO week
--   date on which datetime falls.
--   
--   This is usually equal to the normal Gregorian year (as returned by
--   dateTimeGetYear), except as detailed below:
--   
--   For Thursday, the week-numbering year is always equal to the usual
--   calendar year. For other days, the number is such that every day
--   within a complete week (Monday to Sunday) is contained within the same
--   week-numbering year.
--   
--   For Monday, Tuesday and Wednesday occurring near the end of the year,
--   this may mean that the week-numbering year is one greater than the
--   calendar year (so that these days have the same week-numbering year as
--   the Thursday occurring early in the next year).
--   
--   For Friday, Saturday and Sunday occurring near the start of the year,
--   this may mean that the week-numbering year is one less than the
--   calendar year (so that these days have the same week-numbering year as
--   the Thursday occurring late in the previous year).
--   
--   An equivalent description is that the week-numbering year is equal to
--   the calendar year containing the majority of the days in the current
--   week (Monday to Sunday).
--   
--   Note that January 1 0001 in the proleptic Gregorian calendar is a
--   Monday, so this function never returns 0.
--   
--   Since: 2.26
dateTimeGetWeekNumberingYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Returns the ISO 8601 week number for the week containing
--   datetime. The ISO 8601 week number is the same for
--   every day of the week (from Moday through Sunday). That can produce
--   some unusual results (described below).
--   
--   The first week of the year is week 1. This is the week that contains
--   the first Thursday of the year. Equivalently, this is the first week
--   that has more than 4 of its days falling within the calendar year.
--   
--   The value 0 is never returned by this function. Days contained within
--   a year but occurring before the first ISO 8601 week of that year are
--   considered as being contained in the last week of the previous year.
--   Similarly, the final days of a calendar year may be considered as
--   being part of the first ISO 8601 week of the next year if 4 or more
--   days of that week are contained within the new year.
--   
--   Since: 2.26
dateTimeGetWeekOfYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the year represented by datetime in the
--   Gregorian calendar.
--   
--   Since: 2.26
dateTimeGetYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the Gregorian day, month, and year of a given
--   DateTime.
--   
--   Since: 2.26
dateTimeGetYmd :: (HasCallStack, MonadIO m) => DateTime -> m (Int32, Int32, Int32)

-- | Hashes datetime into a guint, suitable
--   for use within HashTable.
--   
--   Since: 2.26
dateTimeHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Determines if daylight savings time is in effect at the time and in
--   the time zone of datetime.
--   
--   Since: 2.26
dateTimeIsDaylightSavings :: (HasCallStack, MonadIO m) => DateTime -> m Bool

-- | Creates a new DateTime corresponding to the given date and time
--   in the time zone tz.
--   
--   The year must be between 1 and 9999,
--   month between 1 and 12 and day between
--   1 and 28, 29, 30 or 31 depending on the month and the year.
--   
--   hour must be between 0 and 23 and
--   minute must be between 0 and 59.
--   
--   seconds must be at least 0.0 and must be strictly less
--   than 60.0. It will be rounded down to the nearest microsecond.
--   
--   If the given time is not representable in the given time zone (for
--   example, 02:30 on March 14th 2010 in Toronto, due to daylight savings
--   time) then the time will be rounded up to the nearest existing time
--   (in this case, 03:00). If this matters to you then you should verify
--   the return value for containing the same as the numbers you gave.
--   
--   In the case that the given time is ambiguous in the given time zone
--   (for example, 01:30 on November 7th 2010 in Toronto, due to daylight
--   savings time) then the time falling within standard (ie: non-daylight)
--   time is taken.
--   
--   It not considered a programmer error for the values to this function
--   to be out of range, but in the case that they are, the function will
--   return Nothing.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNew :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m DateTime

-- | Creates a DateTime corresponding to the given ISO 8601
--   formatted string text. ISO 8601 strings of the
--   form <date><sep><time><tz> are supported.
--   
--   <sep> is the separator and can be either 'T', 't' or ' '.
--   
--   <date> is in the form:
--   
--   
--   
- YYYY-MM-DD - Year/month/day, e.g. 2016-08-24.
--   
- YYYYMMDD - Same as above without dividers.
--   
- YYYY-DDD - Ordinal day where DDD is from 001 to 366, e.g.
--   2016-237.
--   
- YYYYDDD - Same as above without dividers.
--   
- YYYY-Www-D - Week day where ww is from 01 to 52 and D
--   from 1-7, e.g. 2016-W34-3.
--   
- YYYYWwwD - Same as above without dividers.
--   
--   
--   <time> is in the form:
--   
--   
--   
- hh:mm:ss(.sss) - Hours, minutes, seconds (subseconds),
--   e.g. 22:10:42.123.
--   
- hhmmss(.sss) - Same as above without dividers.
--   
--   
--   <tz> is an optional timezone suffix of the form:
--   
--   
--   
- Z - UTC.
--   
- +hh:mm or -hh:mm - Offset from UTC in hours and
--   minutes, e.g. +12:00.
--   
- +hh or -hh - Offset from UTC in hours, e.g.
--   +12.
--   
--   
--   If the timezone is not provided in text it must be
--   provided in defaultTz (this field is otherwise
--   ignored).
--   
--   This call can fail (returning Nothing) if text
--   is not a valid ISO 8601 formatted string.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.56
dateTimeNewFromIso8601 :: (HasCallStack, MonadIO m) => Text -> Maybe TimeZone -> m (Maybe DateTime)

-- | Creates a DateTime corresponding to the given TimeVal
--   tv in the local time zone.
--   
--   The time contained in a TimeVal is always stored in the form of
--   seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the local
--   time offset.
--   
--   This call can fail (returning Nothing) if tv
--   represents a time outside of the supported range of DateTime.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNewFromTimevalLocal :: (HasCallStack, MonadIO m) => TimeVal -> m DateTime

-- | Creates a DateTime corresponding to the given TimeVal
--   tv in UTC.
--   
--   The time contained in a TimeVal is always stored in the form of
--   seconds elapsed since 1970-01-01 00:00:00 UTC.
--   
--   This call can fail (returning Nothing) if tv
--   represents a time outside of the supported range of DateTime.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNewFromTimevalUtc :: (HasCallStack, MonadIO m) => TimeVal -> m DateTime

-- | Creates a DateTime corresponding to the given Unix time
--   t in the local time zone.
--   
--   Unix time is the number of seconds that have elapsed since 1970-01-01
--   00:00:00 UTC, regardless of the local time offset.
--   
--   This call can fail (returning Nothing) if t
--   represents a time outside of the supported range of DateTime.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNewFromUnixLocal :: (HasCallStack, MonadIO m) => Int64 -> m DateTime

-- | Creates a DateTime corresponding to the given Unix time
--   t in UTC.
--   
--   Unix time is the number of seconds that have elapsed since 1970-01-01
--   00:00:00 UTC.
--   
--   This call can fail (returning Nothing) if t
--   represents a time outside of the supported range of DateTime.
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNewFromUnixUtc :: (HasCallStack, MonadIO m) => Int64 -> m DateTime

-- | Creates a new DateTime corresponding to the given date and time
--   in the local time zone.
--   
--   This call is equivalent to calling dateTimeNew with the time
--   zone returned by timeZoneNewLocal.
--   
--   Since: 2.26
dateTimeNewLocal :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m DateTime

-- | Creates a DateTime corresponding to this exact instant in the
--   given time zone tz. The time is as accurate as the
--   system allows, to a maximum accuracy of 1 microsecond.
--   
--   This function will always succeed unless the system clock is set to
--   truly insane values (or unless GLib is still being used after the year
--   9999).
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeNewNow :: (HasCallStack, MonadIO m) => TimeZone -> m DateTime

-- | Creates a DateTime corresponding to this exact instant in the
--   local time zone.
--   
--   This is equivalent to calling dateTimeNewNow with the time zone
--   returned by timeZoneNewLocal.
--   
--   Since: 2.26
dateTimeNewNowLocal :: (HasCallStack, MonadIO m) => m DateTime

-- | Creates a DateTime corresponding to this exact instant in UTC.
--   
--   This is equivalent to calling dateTimeNewNow with the time zone
--   returned by timeZoneNewUtc.
--   
--   Since: 2.26
dateTimeNewNowUtc :: (HasCallStack, MonadIO m) => m DateTime

-- | Creates a new DateTime corresponding to the given date and time
--   in UTC.
--   
--   This call is equivalent to calling dateTimeNew with the time
--   zone returned by timeZoneNewUtc.
--   
--   Since: 2.26
dateTimeNewUtc :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m DateTime

-- | Atomically increments the reference count of datetime
--   by one.
--   
--   Since: 2.26
dateTimeRef :: (HasCallStack, MonadIO m) => DateTime -> m DateTime

-- | Creates a new DateTime corresponding to the same instant in
--   time as datetime, but in the local time zone.
--   
--   This call is equivalent to calling dateTimeToTimezone with the
--   time zone returned by timeZoneNewLocal.
--   
--   Since: 2.26
dateTimeToLocal :: (HasCallStack, MonadIO m) => DateTime -> m DateTime

-- | Stores the instant in time that datetime represents
--   into tv.
--   
--   The time contained in a TimeVal is always stored in the form of
--   seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time
--   zone associated with datetime.
--   
--   On systems where 'long' is 32bit (ie: all 32bit systems and all
--   Windows systems), a TimeVal is incapable of storing the entire
--   range of values that DateTime is capable of expressing. On
--   those systems, this function returns False to indicate that the
--   time is out of range.
--   
--   On systems where 'long' is 64bit, this function never fails.
--   
--   Since: 2.26
dateTimeToTimeval :: (HasCallStack, MonadIO m) => DateTime -> TimeVal -> m Bool

-- | Create a new DateTime corresponding to the same instant in time
--   as datetime, but in the time zone tz.
--   
--   This call can fail in the case that the time goes out of bounds. For
--   example, converting 0001-01-01 00:00:00 UTC to a time zone west of
--   Greenwich will fail (due to the year 0 being out of range).
--   
--   You should release the return value by calling dateTimeUnref
--   when you are done with it.
--   
--   Since: 2.26
dateTimeToTimezone :: (HasCallStack, MonadIO m) => DateTime -> TimeZone -> m DateTime

-- | Gives the Unix time corresponding to datetime,
--   rounding down to the nearest second.
--   
--   Unix time is the number of seconds that have elapsed since 1970-01-01
--   00:00:00 UTC, regardless of the time zone associated with
--   datetime.
--   
--   Since: 2.26
dateTimeToUnix :: (HasCallStack, MonadIO m) => DateTime -> m Int64

-- | Creates a new DateTime corresponding to the same instant in
--   time as datetime, but in UTC.
--   
--   This call is equivalent to calling dateTimeToTimezone with the
--   time zone returned by timeZoneNewUtc.
--   
--   Since: 2.26
dateTimeToUtc :: (HasCallStack, MonadIO m) => DateTime -> m DateTime

-- | Atomically decrements the reference count of datetime
--   by one.
--   
--   When the reference count reaches zero, the resources allocated by
--   datetime are freed
--   
--   Since: 2.26
dateTimeUnref :: (HasCallStack, MonadIO m) => DateTime -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.DateTime.DateTime

-- | TimeZone is an opaque structure whose members cannot be
--   accessed directly.
--   
--   Since: 2.26
module GI.GLib.Structs.TimeZone

-- | Memory-managed wrapper type.
newtype TimeZone
TimeZone :: ManagedPtr TimeZone -> TimeZone

-- | A convenience alias for Nothing :: Maybe
--   TimeZone.
noTimeZone :: Maybe TimeZone

-- | Finds an interval within tz that corresponds to the
--   given time_, possibly adjusting time_
--   if required to fit into an interval. The meaning of
--   time_ depends on type.
--   
--   This function is similar to timeZoneFindInterval, with the
--   difference that it always succeeds (by making the adjustments
--   described below).
--   
--   In any of the cases where timeZoneFindInterval succeeds then
--   this function returns the same value, without modifying
--   time_.
--   
--   This function may, however, modify time_ in order to
--   deal with non-existent times. If the non-existent local
--   time_ of 02:30 were requested on March 14th 2010 in
--   Toronto then this function would adjust time_ to be
--   03:00 and return the interval containing the adjusted time.
--   
--   Since: 2.26
timeZoneAdjustTime :: (HasCallStack, MonadIO m) => TimeZone -> TimeType -> Int64 -> m Int32

-- | Finds an the interval within tz that corresponds to
--   the given time_. The meaning of time_
--   depends on type.
--   
--   If type is TimeTypeUniversal then this function
--   will always succeed (since universal time is monotonic and
--   continuous).
--   
--   Otherwise time_ is treated as local time. The
--   distinction between TimeTypeStandard and
--   TimeTypeDaylight is ignored except in the case that the given
--   time_ is ambiguous. In Toronto, for example, 01:30 on
--   November 7th 2010 occurred twice (once inside of daylight savings time
--   and the next, an hour later, outside of daylight savings time). In
--   this case, the different value of type would result in
--   a different interval being returned.
--   
--   It is still possible for this function to fail. In Toronto, for
--   example, 02:00 on March 14th 2010 does not exist (due to the leap
--   forward to begin daylight savings time). -1 is returned in that case.
--   
--   Since: 2.26
timeZoneFindInterval :: (HasCallStack, MonadIO m) => TimeZone -> TimeType -> Int64 -> m Int32

-- | Determines the time zone abbreviation to be used during a particular
--   interval of time in the time zone tz.
--   
--   For example, in Toronto this is currently "EST" during the winter
--   months and "EDT" during the summer months when daylight savings time
--   is in effect.
--   
--   Since: 2.26
timeZoneGetAbbreviation :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Text

-- | Get the identifier of this TimeZone, as passed to
--   timeZoneNew. If the identifier passed at construction time was
--   not recognised, UTC will be returned. If it was
--   Nothing, the identifier of the local timezone at construction
--   time will be returned.
--   
--   The identifier will be returned in the same format as provided at
--   construction time: if provided as a time offset, that will be returned
--   by this function.
--   
--   Since: 2.58
timeZoneGetIdentifier :: (HasCallStack, MonadIO m) => TimeZone -> m Text

-- | Determines the offset to UTC in effect during a particular
--   interval of time in the time zone tz.
--   
--   The offset is the number of seconds that you add to UTC time to arrive
--   at local time for tz (ie: negative numbers for time
--   zones west of GMT, positive numbers for east).
--   
--   Since: 2.26
timeZoneGetOffset :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Int32

-- | Determines if daylight savings time is in effect during a particular
--   interval of time in the time zone tz.
--   
--   Since: 2.26
timeZoneIsDst :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Bool

-- | Creates a TimeZone corresponding to identifier.
--   
--   identifier can either be an RFC3339/ISO 8601 time
--   offset or something that would pass as a valid value for the
--   TZ environment variable (including Nothing).
--   
--   In Windows, identifier can also be the unlocalized
--   name of a time zone for standard time, for example "Pacific Standard
--   Time".
--   
--   Valid RFC3339 time offsets are "Z" (for UTC) or
--   "±hh:mm". ISO 8601 additionally specifies "±hhmm"
--   and "±hh". Offsets are time values to be added to Coordinated
--   Universal Time (UTC) to get the local time.
--   
--   In UNIX, the TZ environment variable typically corresponds to
--   the name of a file in the zoneinfo database, or string in "std offset
--   [dst [offset],start[/time],end[/time]]" (POSIX) format. There are no
--   spaces in the specification. The name of standard and daylight savings
--   time zone must be three or more alphabetic characters. Offsets are
--   time values to be added to local time to get Coordinated Universal
--   Time (UTC) and should be "[±]hh[[:]mm[:ss]]". Dates are
--   either "Jn" (Julian day with n between 1 and 365, leap years
--   not counted), "n" (zero-based Julian day with n between 0 and
--   365) or "Mm.w.d" (day d (0 <= d <= 6) of week w (1
--   <= w <= 5) of month m (1 <= m <= 12), day 0 is a Sunday).
--   Times are in local wall clock time, the default is 02:00:00.
--   
--   In Windows, the "tzn[+|–]hh[:mm[:ss]][dzn]" format is used, but also
--   accepts POSIX format. The Windows format uses US rules for all time
--   zones; daylight savings time is 60 minutes behind the standard time
--   with date and time of change taken from Pacific Standard Time. Offsets
--   are time values to be added to the local time to get Coordinated
--   Universal Time (UTC).
--   
--   timeZoneNewLocal calls this function with the value of the
--   TZ environment variable. This function itself is independent
--   of the value of TZ, but if identifier is
--   Nothing then /etc/localtime will be consulted to
--   discover the correct time zone on UNIX and the registry will be
--   consulted or GetTimeZoneInformation() will be used to
--   get the local time zone on Windows.
--   
--   If intervals are not available, only time zone rules from TZ
--   environment variable or other means, then they will be computed from
--   year 1900 to 2037. If the maximum year for the rules is available and
--   it is greater than 2037, then it will followed instead.
--   
--   See RFC3339 §5.6 for a precise definition of valid RFC3339 time
--   offsets (the time-offset expansion) and ISO 8601 for the full
--   list of valid time offsets. See The GNU C Library manual for an
--   explanation of the possible values of the TZ environment
--   variable. See Microsoft Time Zone Index Values for the list of
--   time zones on Windows.
--   
--   You should release the return value by calling timeZoneUnref
--   when you are done with it.
--   
--   Since: 2.26
timeZoneNew :: (HasCallStack, MonadIO m) => Maybe Text -> m TimeZone

-- | Creates a TimeZone corresponding to local time. The local time
--   zone may change between invocations to this function; for example, if
--   the system administrator changes it.
--   
--   This is equivalent to calling timeZoneNew with the value of the
--   TZ environment variable (including the possibility of
--   Nothing).
--   
--   You should release the return value by calling timeZoneUnref
--   when you are done with it.
--   
--   Since: 2.26
timeZoneNewLocal :: (HasCallStack, MonadIO m) => m TimeZone

-- | Creates a TimeZone corresponding to the given constant offset
--   from UTC, in seconds.
--   
--   This is equivalent to calling timeZoneNew with a string in the
--   form [+|-]hh[:mm[:ss]].
--   
--   Since: 2.58
timeZoneNewOffset :: (HasCallStack, MonadIO m) => Int32 -> m TimeZone

-- | Creates a TimeZone corresponding to UTC.
--   
--   This is equivalent to calling timeZoneNew with a value like
--   "Z", "UTC", "+00", etc.
--   
--   You should release the return value by calling timeZoneUnref
--   when you are done with it.
--   
--   Since: 2.26
timeZoneNewUtc :: (HasCallStack, MonadIO m) => m TimeZone

-- | Increases the reference count on tz.
--   
--   Since: 2.26
timeZoneRef :: (HasCallStack, MonadIO m) => TimeZone -> m TimeZone

-- | Decreases the reference count on tz.
--   
--   Since: 2.26
timeZoneUnref :: (HasCallStack, MonadIO m) => TimeZone -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.TimeZone.TimeZone

-- | Opaque datatype that records a start time.
module GI.GLib.Structs.Timer

-- | Memory-managed wrapper type.
newtype Timer
Timer :: ManagedPtr Timer -> Timer

-- | A convenience alias for Nothing :: Maybe Timer.
noTimer :: Maybe Timer

-- | Resumes a timer that has previously been stopped with
--   timerStop. timerStop must be called before using this
--   function.
--   
--   Since: 2.4
timerContinue :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Destroys a timer, freeing associated resources.
timerDestroy :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | If timer has been started but not stopped, obtains the
--   time since the timer was started. If timer has been
--   stopped, obtains the elapsed time between the time it was started and
--   the time it was stopped. The return value is the number of seconds
--   elapsed, including any fractional part. The
--   microseconds out parameter is essentially useless.
timerElapsed :: (HasCallStack, MonadIO m) => Timer -> CULong -> m Double

-- | This function is useless; it's fine to call timerStart on an
--   already-started timer to reset the start time, so timerReset
--   serves no purpose.
timerReset :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Marks a start time, so that future calls to timerElapsed will
--   report the time since timerStart was called.
--   g_timer_new() automatically marks the start time, so
--   no need to call timerStart immediately after creating the
--   timer.
timerStart :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Marks an end time, so calls to timerElapsed will return the
--   difference between this end time and the start time.
timerStop :: (HasCallStack, MonadIO m) => Timer -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Timer.Timer

-- | Each piece of memory that is pushed onto the stack is cast to a
--   GTrashStack*.
module GI.GLib.Structs.TrashStack

-- | Memory-managed wrapper type.
newtype TrashStack
TrashStack :: ManagedPtr TrashStack -> TrashStack

-- | Construct a TrashStack struct initialized to zero.
newZeroTrashStack :: MonadIO m => m TrashStack

-- | A convenience alias for Nothing :: Maybe
--   TrashStack.
noTrashStack :: Maybe TrashStack

-- | Returns the height of a TrashStack.
--   
--   Note that execution of this function is of O(N) complexity where N
--   denotes the number of items on the stack.

-- | Deprecated: (Since version 2.48)TrashStack is deprecated
--   without replacement
trashStackHeight :: (HasCallStack, MonadIO m) => TrashStack -> m Word32

-- | Returns the element at the top of a TrashStack which may be
--   Nothing.

-- | Deprecated: (Since version 2.48)TrashStack is deprecated
--   without replacement
trashStackPeek :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())

-- | Pops a piece of memory off a TrashStack.

-- | Deprecated: (Since version 2.48)TrashStack is deprecated
--   without replacement
trashStackPop :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())

-- | Pushes a piece of memory onto a TrashStack.

-- | Deprecated: (Since version 2.48)TrashStack is deprecated
--   without replacement
trashStackPush :: (HasCallStack, MonadIO m) => TrashStack -> Ptr () -> m ()

-- | Set the value of the “next” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #next
--   
clearTrashStackNext :: MonadIO m => TrashStack -> m ()

-- | Get the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get trashStack #next
--   
getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack)

-- | Set the value of the “next” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set trashStack [ #next := value ]
--   
setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.TrashStack.TrashStack
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TrashStack.TrashStack tag

-- | The GTree struct is an opaque data structure representing a [balanced
--   binary tree][glib-Balanced-Binary-Trees]. It should be accessed only
--   by using the following functions.
module GI.GLib.Structs.Tree

-- | Memory-managed wrapper type.
newtype Tree
Tree :: ManagedPtr Tree -> Tree

-- | A convenience alias for Nothing :: Maybe Tree.
noTree :: Maybe Tree

-- | Removes all keys and values from the Tree and decreases its
--   reference count by one. If keys and/or values are dynamically
--   allocated, you should either free them first or create the Tree
--   using g_tree_new_full(). In the latter case the
--   destroy functions you supplied will be called on all keys and values
--   before destroying the Tree.
treeDestroy :: (HasCallStack, MonadIO m) => Tree -> m ()

-- | Gets the height of a Tree.
--   
--   If the Tree contains no nodes, the height is 0. If the
--   Tree contains only one root node the height is 1. If the root
--   node has children the height is 2, etc.
treeHeight :: (HasCallStack, MonadIO m) => Tree -> m Int32

-- | Inserts a key/value pair into a Tree.
--   
--   If the given key already exists in the Tree its corresponding
--   value is set to the new value. If you supplied a
--   valueDestroyFunc when creating the Tree, the
--   old value is freed using that function. If you supplied a
--   keyDestroyFunc when creating the Tree, the
--   passed key is freed using that function.
--   
--   The tree is automatically 'balanced' as new key/value pairs are added,
--   so that the distance from the root to every leaf is as small as
--   possible.
treeInsert :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m ()

-- | Gets the value corresponding to the given key. Since a Tree is
--   automatically balanced as key/value pairs are added, key lookup is
--   O(log n) (where n is the number of key/value pairs in the tree).
treeLookup :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Ptr ())

-- | Looks up a key in the Tree, returning the original key and the
--   associated value. This is useful if you need to free the memory
--   allocated for the original key, for example before calling
--   treeRemove.
treeLookupExtended :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Gets the number of nodes in a Tree.
treeNnodes :: (HasCallStack, MonadIO m) => Tree -> m Int32

-- | Removes a key/value pair from a Tree.
--   
--   If the Tree was created using
--   g_tree_new_full(), the key and value are freed using
--   the supplied destroy functions, otherwise you have to make sure that
--   any dynamically allocated values are freed yourself. If the key does
--   not exist in the Tree, the function does nothing.
treeRemove :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m Bool

-- | Inserts a new key and value into a Tree similar to
--   treeInsert. The difference is that if the key already exists in
--   the Tree, it gets replaced by the new key. If you supplied a
--   valueDestroyFunc when creating the Tree, the
--   old value is freed using that function. If you supplied a
--   keyDestroyFunc when creating the Tree, the old
--   key is freed using that function.
--   
--   The tree is automatically 'balanced' as new key/value pairs are added,
--   so that the distance from the root to every leaf is as small as
--   possible.
treeReplace :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m ()

-- | Removes a key and its associated value from a Tree without
--   calling the key and value destroy functions.
--   
--   If the key does not exist in the Tree, the function does
--   nothing.
treeSteal :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m Bool

-- | Decrements the reference count of tree by one. If the
--   reference count drops to 0, all keys and values will be destroyed (if
--   destroy functions were specified) and all memory allocated by
--   tree will be released.
--   
--   It is safe to call this function from any thread.
--   
--   Since: 2.22
treeUnref :: (HasCallStack, MonadIO m) => Tree -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Tree.Tree

-- | VariantDict is a mutable interface to GVariant
--   dictionaries.
--   
--   It can be used for doing a sequence of dictionary lookups in an
--   efficient way on an existing GVariant dictionary or it can be
--   used to construct new dictionaries with a hashtable-like interface. It
--   can also be used for taking existing dictionaries and modifying them
--   in order to create new ones.
--   
--   VariantDict can only be used with
--   G_VARIANT_TYPE_VARDICT dictionaries.
--   
--   It is possible to use VariantDict allocated on the stack or on
--   the heap. When using a stack-allocated VariantDict, you begin
--   with a call to g_variant_dict_init() and free the
--   resources with a call to variantDictClear.
--   
--   Heap-allocated VariantDict follows normal refcounting rules:
--   you allocate it with variantDictNew and use
--   variantDictRef and variantDictUnref.
--   
--   variantDictEnd is used to convert the VariantDict back
--   into a dictionary-type GVariant. When used with stack-allocated
--   instances, this also implicitly frees all associated memory, but for
--   heap-allocated instances, you must still call variantDictUnref
--   afterwards.
--   
--   You will typically want to use a heap-allocated VariantDict
--   when you expose it as part of an API. For most other uses, the
--   stack-allocated form will be more convenient.
--   
--   Consider the following two examples that do the same thing in each
--   style: take an existing dictionary and look up the "count" uint32 key,
--   adding 1 to it if it is found, or returning an error if the key is not
--   found. Each returns the new dictionary as a floating GVariant.
--   
--   
Using a stack-allocated GVariantDict
--   
--   
C code
--   
--   
--   GVariant *
--   add_to_count (GVariant  *orig,
--                 GError   **error)
--   {
--     GVariantDict dict;
--     guint32 count;
--   
--     g_variant_dict_init (&dict, orig);
--     if (!g_variant_dict_lookup (&dict, "count", "u", &count))
--       {
--         g_set_error (...);
--         g_variant_dict_clear (&dict);
--         return NULL;
--       }
--   
--     g_variant_dict_insert (&dict, "count", "u", count + 1);
--   
--     return g_variant_dict_end (&dict);
--   }
--   
--   
--   
Using heap-allocated GVariantDict
--   
--   
C code
--   
--   
--   GVariant *
--   add_to_count (GVariant  *orig,
--                 GError   **error)
--   {
--     GVariantDict *dict;
--     GVariant *result;
--     guint32 count;
--   
--     dict = g_variant_dict_new (orig);
--   
--     if (g_variant_dict_lookup (dict, "count", "u", &count))
--       {
--         g_variant_dict_insert (dict, "count", "u", count + 1);
--         result = g_variant_dict_end (dict);
--       }
--     else
--       {
--         g_set_error (...);
--         result = NULL;
--       }
--   
--     g_variant_dict_unref (dict);
--   
--     return result;
--   }
--   
--   
--   Since: 2.40
module GI.GLib.Structs.VariantDict

-- | Memory-managed wrapper type.
newtype VariantDict
VariantDict :: ManagedPtr VariantDict -> VariantDict

-- | A convenience alias for Nothing :: Maybe
--   VariantDict.
noVariantDict :: Maybe VariantDict

-- | Releases all memory associated with a VariantDict without
--   freeing the VariantDict structure itself.
--   
--   It typically only makes sense to do this on a stack-allocated
--   VariantDict if you want to abort building the value part-way
--   through. This function need not be called if you call
--   variantDictEnd and it also doesn't need to be called on dicts
--   allocated with g_variant_dict_new (see variantDictUnref for
--   that).
--   
--   It is valid to call this function on either an initialised
--   VariantDict or one that was previously cleared by an earlier
--   call to variantDictClear but it is not valid to call this
--   function on uninitialised memory.
--   
--   Since: 2.40
variantDictClear :: (HasCallStack, MonadIO m) => VariantDict -> m ()

-- | Checks if key exists in dict.
--   
--   Since: 2.40
variantDictContains :: (HasCallStack, MonadIO m) => VariantDict -> Text -> m Bool

-- | Returns the current value of dict as a GVariant
--   of type G_VARIANT_TYPE_VARDICT, clearing it in the
--   process.
--   
--   It is not permissible to use dict in any way after
--   this call except for reference counting operations (in the case of a
--   heap-allocated VariantDict) or by reinitialising it with
--   g_variant_dict_init() (in the case of
--   stack-allocated).
--   
--   Since: 2.40
variantDictEnd :: (HasCallStack, MonadIO m) => VariantDict -> m GVariant

-- | Inserts (or replaces) a key in a VariantDict.
--   
--   value is consumed if it is floating.
--   
--   Since: 2.40
variantDictInsertValue :: (HasCallStack, MonadIO m) => VariantDict -> Text -> GVariant -> m ()

-- | Looks up a value in a VariantDict.
--   
--   If key is not found in dictionary,
--   Nothing is returned.
--   
--   The expectedType string specifies what type of value
--   is expected. If the value associated with key has a
--   different type then Nothing is returned.
--   
--   If the key is found and the value has the correct type, it is
--   returned. If expectedType was specified then any
--   non-Nothing return value will have this type.
--   
--   Since: 2.40
variantDictLookupValue :: (HasCallStack, MonadIO m) => VariantDict -> Text -> Maybe VariantType -> m GVariant

-- | Allocates and initialises a new VariantDict.
--   
--   You should call variantDictUnref on the return value when it is
--   no longer needed. The memory will not be automatically freed by any
--   other call.
--   
--   In some cases it may be easier to place a VariantDict directly
--   on the stack of the calling function and initialise it with
--   g_variant_dict_init(). This is particularly useful
--   when you are using VariantDict to construct a GVariant.
--   
--   Since: 2.40
variantDictNew :: (HasCallStack, MonadIO m) => Maybe GVariant -> m VariantDict

-- | Increases the reference count on dict.
--   
--   Don't call this on stack-allocated VariantDict instances or bad
--   things will happen.
--   
--   Since: 2.40
variantDictRef :: (HasCallStack, MonadIO m) => VariantDict -> m VariantDict

-- | Removes a key and its associated value from a VariantDict.
--   
--   Since: 2.40
variantDictRemove :: (HasCallStack, MonadIO m) => VariantDict -> Text -> m Bool

-- | Decreases the reference count on dict.
--   
--   In the event that there are no more references, releases all memory
--   associated with the VariantDict.
--   
--   Don't call this on stack-allocated VariantDict instances or bad
--   things will happen.
--   
--   Since: 2.40
variantDictUnref :: (HasCallStack, MonadIO m) => VariantDict -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.VariantDict.VariantDict

-- | A utility type for constructing container-type GVariant
--   instances.
--   
--   This is an opaque structure and may only be accessed using the
--   following functions.
--   
--   VariantBuilder is not threadsafe in any way. Do not attempt to
--   access it from more than one thread.
module GI.GLib.Structs.VariantBuilder

-- | Memory-managed wrapper type.
newtype VariantBuilder
VariantBuilder :: ManagedPtr VariantBuilder -> VariantBuilder

-- | A convenience alias for Nothing :: Maybe
--   VariantBuilder.
noVariantBuilder :: Maybe VariantBuilder

-- | Adds value to builder.
--   
--   It is an error to call this function in any way that would create an
--   inconsistent value to be constructed. Some examples of this are
--   putting different types of items into an array, putting the wrong
--   types or number of items in a tuple, putting more than one value into
--   a variant, etc.
--   
--   If value is a floating reference (see
--   variantRefSink), the builder instance takes
--   ownership of value.
--   
--   Since: 2.24
variantBuilderAddValue :: (HasCallStack, MonadIO m) => VariantBuilder -> GVariant -> m ()

-- | Closes the subcontainer inside the given builder that
--   was opened by the most recent call to variantBuilderOpen.
--   
--   It is an error to call this function in any way that would create an
--   inconsistent value to be constructed (ie: too few values added to the
--   subcontainer).
--   
--   Since: 2.24
variantBuilderClose :: (HasCallStack, MonadIO m) => VariantBuilder -> m ()

-- | Ends the builder process and returns the constructed value.
--   
--   It is not permissible to use builder in any way after
--   this call except for reference counting operations (in the case of a
--   heap-allocated VariantBuilder) or by reinitialising it with
--   g_variant_builder_init() (in the case of
--   stack-allocated). This means that for the stack-allocated builders
--   there is no need to call g_variant_builder_clear()
--   after the call to variantBuilderEnd.
--   
--   It is an error to call this function in any way that would create an
--   inconsistent value to be constructed (ie: insufficient number of items
--   added to a container with a specific number of children required). It
--   is also an error to call this function if the builder was created with
--   an indefinite array or maybe type and no children have been added; in
--   this case it is impossible to infer the type of the empty array.
--   
--   Since: 2.24
variantBuilderEnd :: (HasCallStack, MonadIO m) => VariantBuilder -> m GVariant

-- | Allocates and initialises a new VariantBuilder.
--   
--   You should call variantBuilderUnref on the return value when it
--   is no longer needed. The memory will not be automatically freed by any
--   other call.
--   
--   In most cases it is easier to place a VariantBuilder directly
--   on the stack of the calling function and initialise it with
--   g_variant_builder_init().
--   
--   Since: 2.24
variantBuilderNew :: (HasCallStack, MonadIO m) => VariantType -> m VariantBuilder

-- | Opens a subcontainer inside the given builder. When
--   done adding items to the subcontainer, variantBuilderClose must
--   be called. type is the type of the container: so to
--   build a tuple of several values, type must include the
--   tuple itself.
--   
--   It is an error to call this function in any way that would cause an
--   inconsistent value to be constructed (ie: adding too many values or a
--   value of an incorrect type).
--   
--   Example of building a nested variant:
--   
--   
C code
--   
--   
--   GVariantBuilder builder;
--   guint32 some_number = get_number ();
--   g_autoptr (GHashTable) some_dict = get_dict ();
--   GHashTableIter iter;
--   const gchar *key;
--   const GVariant *value;
--   g_autoptr (GVariant) output = NULL;
--   
--   g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ua{sv})"));
--   g_variant_builder_add (&builder, "u", some_number);
--   g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
--   
--   g_hash_table_iter_init (&iter, some_dict);
--   while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value))
--     {
--       g_variant_builder_open (&builder, G_VARIANT_TYPE ("{sv}"));
--       g_variant_builder_add (&builder, "s", key);
--       g_variant_builder_add (&builder, "v", value);
--       g_variant_builder_close (&builder);
--     }
--   
--   g_variant_builder_close (&builder);
--   
--   output = g_variant_builder_end (&builder);
--   
--   
--   Since: 2.24
variantBuilderOpen :: (HasCallStack, MonadIO m) => VariantBuilder -> VariantType -> m ()

-- | Increases the reference count on builder.
--   
--   Don't call this on stack-allocated VariantBuilder instances or
--   bad things will happen.
--   
--   Since: 2.24
variantBuilderRef :: (HasCallStack, MonadIO m) => VariantBuilder -> m VariantBuilder

-- | Decreases the reference count on builder.
--   
--   In the event that there are no more references, releases all memory
--   associated with the VariantBuilder.
--   
--   Don't call this on stack-allocated VariantBuilder instances or
--   bad things will happen.
--   
--   Since: 2.24
variantBuilderUnref :: (HasCallStack, MonadIO m) => VariantBuilder -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.VariantBuilder.VariantBuilder

-- | This section introduces the GVariant type system. It is based, in
--   large part, on the D-Bus type system, with two major changes and some
--   minor lifting of restrictions. The D-Bus specification,
--   therefore, provides a significant amount of information that is useful
--   when working with GVariant.
--   
--   The first major change with respect to the D-Bus type system is the
--   introduction of maybe (or "nullable") types. Any type in GVariant can
--   be converted to a maybe type, in which case, "nothing" (or "null")
--   becomes a valid value. Maybe types have been added by introducing the
--   character "m" to type strings.
--   
--   The second major change is that the GVariant type system supports the
--   concept of "indefinite types" -- types that are less specific than the
--   normal types found in D-Bus. For example, it is possible to speak of
--   "an array of any type" in GVariant, where the D-Bus type system would
--   require you to speak of "an array of integers" or "an array of
--   strings". Indefinite types have been added by introducing the
--   characters "*", "?" and "r" to type strings.
--   
--   Finally, all arbitrary restrictions relating to the complexity of
--   types are lifted along with the restriction that dictionary entries
--   may only appear nested inside of arrays.
--   
--   Just as in D-Bus, GVariant types are described with strings ("type
--   strings"). Subject to the differences mentioned above, these strings
--   are of the same form as those found in DBus. Note, however: D-Bus
--   always works in terms of messages and therefore individual type
--   strings appear nowhere in its interface. Instead, "signatures" are a
--   concatenation of the strings of the type of each argument in a
--   message. GVariant deals with single values directly so GVariant type
--   strings always describe the type of exactly one value. This means that
--   a D-Bus signature string is generally not a valid GVariant type string
--   -- except in the case that it is the signature of a message containing
--   exactly one argument.
--   
--   An indefinite type is similar in spirit to what may be called an
--   abstract type in other type systems. No value can exist that has an
--   indefinite type as its type, but values can exist that have types that
--   are subtypes of indefinite types. That is to say,
--   variantGetType will never return an indefinite type, but
--   calling variantIsOfType with an indefinite type may return
--   True. For example, you cannot have a value that represents "an
--   array of no particular type", but you can have an "array of integers"
--   which certainly matches the type of "an array of no particular type",
--   since "array of integers" is a subtype of "array of no particular
--   type".
--   
--   This is similar to how instances of abstract classes may not directly
--   exist in other type systems, but instances of their non-abstract
--   subtypes may. For example, in GTK, no object that has the type of
--   GtkBin can exist (since GtkBin is an
--   abstract class), but a GtkWindow can certainly be
--   instantiated, and you would say that the GtkWindow is
--   a GtkBin (since GtkWindow is a
--   subclass of GtkBin).
--   
--   
GVariant Type Strings
--   
--   A GVariant type string can be any of the following:
--   
--   
--   
- any basic type string (listed below)
--   
- "v", "r" or "*"
--   
- one of the characters 'a' or 'm', followed by another type
--   string
--   
- the character '(', followed by a concatenation of zero or more
--   other type strings, followed by the character ')'
--   
- the character '{', followed by a basic type string (see below),
--   followed by another type string, followed by the character '}'
--   
--   
--   A basic type string describes a basic type (as per
--   variantTypeIsBasic) and is always a single character in length.
--   The valid basic type strings are "b", "y", "n", "q", "i", "u", "x",
--   "t", "h", "d", "s", "o", "g" and "?".
--   
--   The above definition is recursive to arbitrary depth. "aaaaai" and
--   "(ui(nq((y)))s)" are both valid type strings, as is
--   "a(aa(ui)(qna{ya(yd)}))". In order to not hit memory limits,
--   GVariant imposes a limit on recursion depth of 65 nested
--   containers. This is the limit in the D-Bus specification (64) plus one
--   to allow a GDBusMessage to be nested in a top-level
--   tuple.
--   
--   The meaning of each of the characters is as follows:
--   
--   
--   
- b: the type string of
--   G_VARIANT_TYPE_BOOLEAN; a boolean value.
--   
- y: the type string of
--   G_VARIANT_TYPE_BYTE; a byte.
--   
- n: the type string of
--   G_VARIANT_TYPE_INT16; a signed 16 bit integer.
--   
- q: the type string of
--   G_VARIANT_TYPE_UINT16; an unsigned 16 bit
--   integer.
--   
- i: the type string of
--   G_VARIANT_TYPE_INT32; a signed 32 bit integer.
--   
- u: the type string of
--   G_VARIANT_TYPE_UINT32; an unsigned 32 bit
--   integer.
--   
- x: the type string of
--   G_VARIANT_TYPE_INT64; a signed 64 bit integer.
--   
- t: the type string of
--   G_VARIANT_TYPE_UINT64; an unsigned 64 bit
--   integer.
--   
- h: the type string of
--   G_VARIANT_TYPE_HANDLE; a signed 32 bit value that, by
--   convention, is used as an index into an array of file descriptors that
--   are sent alongside a D-Bus message.
--   
- d: the type string of
--   G_VARIANT_TYPE_DOUBLE; a double precision floating
--   point value.
--   
- s: the type string of
--   G_VARIANT_TYPE_STRING; a string.
--   
- o: the type string of
--   G_VARIANT_TYPE_OBJECT_PATH; a string in the form of a
--   D-Bus object path.
--   
- g: the type string of
--   G_VARIANT_TYPE_SIGNATURE; a string in the form of a
--   D-Bus type signature.
--   
- ?: the type string of
--   G_VARIANT_TYPE_BASIC; an indefinite type that is a
--   supertype of any of the basic types.
--   
- v: the type string of
--   G_VARIANT_TYPE_VARIANT; a container type that contain
--   any other type of value.
--   
- a: used as a prefix on another type string to mean an
--   array of that type; the type string "ai", for example, is the type of
--   an array of signed 32-bit integers.
--   
- m: used as a prefix on another type string to mean a
--   "maybe", or "nullable", version of that type; the type string "ms",
--   for example, is the type of a value that maybe contains a string, or
--   maybe contains nothing.
--   
- (): used to enclose zero or more other concatenated type
--   strings to create a tuple type; the type string "(is)", for example,
--   is the type of a pair of an integer and a string.
--   
- r: the type string of
--   G_VARIANT_TYPE_TUPLE; an indefinite type that is a
--   supertype of any tuple type, regardless of the number of items.
--   
- {}: used to enclose a basic type string concatenated with
--   another type string to create a dictionary entry type, which usually
--   appears inside of an array to form a dictionary; the type string
--   "a{sd}", for example, is the type of a dictionary that maps strings to
--   double precision floating point values.
--   
--   
--   The first type (the basic type) is the key type and the second type is
--   the value type. The reason that the first type is restricted to being
--   a basic type is so that it can easily be hashed.
--   
--   
--   
- *: the type string of G_VARIANT_TYPE_ANY;
--   the indefinite type that is a supertype of all types. Note that, as
--   with all type strings, this character represents exactly one type. It
--   cannot be used inside of tuples to mean "any number of items".
--   
--   
--   Any type string of a container that contains an indefinite type is,
--   itself, an indefinite type. For example, the type string "a*"
--   (corresponding to G_VARIANT_TYPE_ARRAY) is an
--   indefinite type that is a supertype of every array type. "(*s)" is a
--   supertype of all tuples that contain exactly two items where the
--   second item is a string.
--   
--   "a{?*}" is an indefinite type that is a supertype of all arrays
--   containing dictionary entries where the key is any basic type and the
--   value is any type at all. This is, by definition, a dictionary, so
--   this type string corresponds to
--   G_VARIANT_TYPE_DICTIONARY. Note that, due to the
--   restriction that the key of a dictionary entry must be a basic type,
--   "{**}" is not a valid type string.
module GI.GLib.Structs.VariantType

-- | Memory-managed wrapper type.
newtype VariantType
VariantType :: ManagedPtr VariantType -> VariantType

-- | A convenience alias for Nothing :: Maybe
--   VariantType.
noVariantType :: Maybe VariantType

-- | No description available in the introspection data.
variantTypeChecked_ :: (HasCallStack, MonadIO m) => Text -> m VariantType

-- | Makes a copy of a VariantType. It is appropriate to call
--   variantTypeFree on the return value. type may
--   not be Nothing.
variantTypeCopy :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Returns a newly-allocated copy of the type string corresponding to
--   type. The returned string is nul-terminated. It is
--   appropriate to call free on the return value.
variantTypeDupString :: (HasCallStack, MonadIO m) => VariantType -> m Text

-- | Determines the element type of an array or maybe type.
--   
--   This function may only be used with array or maybe types.
variantTypeElement :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Compares type1 and type2 for equality.
--   
--   Only returns True if the types are exactly equal. Even if one
--   type is an indefinite type and the other is a subtype of it,
--   False will be returned if they are not exactly equal. If you
--   want to check for subtypes, use variantTypeIsSubtypeOf.
--   
--   The argument types of type1 and type2
--   are only gconstpointer to allow use with
--   HashTable without function pointer casting. For both arguments,
--   a valid VariantType must be provided.
variantTypeEqual :: (HasCallStack, MonadIO m) => VariantType -> VariantType -> m Bool

-- | Determines the first item type of a tuple or dictionary entry type.
--   
--   This function may only be used with tuple or dictionary entry types,
--   but must not be used with the generic tuple type
--   G_VARIANT_TYPE_TUPLE.
--   
--   In the case of a dictionary entry type, this returns the type of the
--   key.
--   
--   Nothing is returned in case of type being
--   G_VARIANT_TYPE_UNIT.
--   
--   This call, together with variantTypeNext provides an iterator
--   interface over tuple and dictionary entry types.
variantTypeFirst :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Frees a VariantType that was allocated with
--   variantTypeCopy, variantTypeNew or one of the container
--   type constructor functions.
--   
--   In the case that type is Nothing, this function
--   does nothing.
--   
--   Since 2.24
variantTypeFree :: (HasCallStack, MonadIO m) => VariantType -> m ()

-- | Returns the length of the type string corresponding to the given
--   type. This function must be used to determine the
--   valid extent of the memory region returned by
--   g_variant_type_peek_string().
variantTypeGetStringLength :: (HasCallStack, MonadIO m) => VariantType -> m Word64

-- | Hashes type.
--   
--   The argument type of type is only
--   gconstpointer to allow use with HashTable
--   without function pointer casting. A valid VariantType must be
--   provided.
variantTypeHash :: (HasCallStack, MonadIO m) => VariantType -> m Word32

-- | Determines if the given type is an array type. This is
--   true if the type string for type starts with an 'a'.
--   
--   This function returns True for any indefinite type for which
--   every definite subtype is an array type --
--   G_VARIANT_TYPE_ARRAY, for example.
variantTypeIsArray :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is a basic type.
--   
--   Basic types are booleans, bytes, integers, doubles, strings, object
--   paths and signatures.
--   
--   Only a basic type may be used as the key of a dictionary entry.
--   
--   This function returns False for all indefinite types except
--   G_VARIANT_TYPE_BASIC.
variantTypeIsBasic :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is a container type.
--   
--   Container types are any array, maybe, tuple, or dictionary entry types
--   plus the variant type.
--   
--   This function returns True for any indefinite type for which
--   every definite subtype is a container --
--   G_VARIANT_TYPE_ARRAY, for example.
variantTypeIsContainer :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is definite (ie: not
--   indefinite).
--   
--   A type is definite if its type string does not contain any indefinite
--   type characters ('*', '?', or 'r').
--   
--   A GVariant instance may not have an indefinite type, so calling
--   this function on the result of variantGetType will always
--   result in True being returned. Calling this function on an
--   indefinite type like G_VARIANT_TYPE_ARRAY, however,
--   will result in False being returned.
variantTypeIsDefinite :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is a dictionary entry
--   type. This is true if the type string for type starts
--   with a '{'.
--   
--   This function returns True for any indefinite type for which
--   every definite subtype is a dictionary entry type --
--   G_VARIANT_TYPE_DICT_ENTRY, for example.
variantTypeIsDictEntry :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is a maybe type. This is
--   true if the type string for type starts with an 'm'.
--   
--   This function returns True for any indefinite type for which
--   every definite subtype is a maybe type --
--   G_VARIANT_TYPE_MAYBE, for example.
variantTypeIsMaybe :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Checks if type is a subtype of
--   supertype.
--   
--   This function returns True if type is a subtype
--   of supertype. All types are considered to be subtypes
--   of themselves. Aside from that, only indefinite types can have
--   subtypes.
variantTypeIsSubtypeOf :: (HasCallStack, MonadIO m) => VariantType -> VariantType -> m Bool

-- | Determines if the given type is a tuple type. This is
--   true if the type string for type starts with a '(' or
--   if type is G_VARIANT_TYPE_TUPLE.
--   
--   This function returns True for any indefinite type for which
--   every definite subtype is a tuple type --
--   G_VARIANT_TYPE_TUPLE, for example.
variantTypeIsTuple :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given type is the variant type.
variantTypeIsVariant :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines the key type of a dictionary entry type.
--   
--   This function may only be used with a dictionary entry type. Other
--   than the additional restriction, this call is equivalent to
--   variantTypeFirst.
variantTypeKey :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Determines the number of items contained in a tuple or dictionary
--   entry type.
--   
--   This function may only be used with tuple or dictionary entry types,
--   but must not be used with the generic tuple type
--   G_VARIANT_TYPE_TUPLE.
--   
--   In the case of a dictionary entry type, this function will always
--   return 2.
variantTypeNItems :: (HasCallStack, MonadIO m) => VariantType -> m Word64

-- | Creates a new VariantType corresponding to the type string
--   given by typeString. It is appropriate to call
--   variantTypeFree on the return value.
--   
--   It is a programmer error to call this function with an invalid type
--   string. Use variantTypeStringIsValid if you are unsure.
--   
--   Since: 2.24
variantTypeNew :: (HasCallStack, MonadIO m) => Text -> m VariantType

-- | Constructs the type corresponding to an array of elements of the type
--   type.
--   
--   It is appropriate to call variantTypeFree on the return value.
variantTypeNewArray :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Constructs the type corresponding to a dictionary entry with a key of
--   type key and a value of type value.
--   
--   It is appropriate to call variantTypeFree on the return value.
variantTypeNewDictEntry :: (HasCallStack, MonadIO m) => VariantType -> VariantType -> m VariantType

-- | Constructs the type corresponding to a maybe instance containing type
--   type or Nothing.
--   
--   It is appropriate to call variantTypeFree on the return value.
variantTypeNewMaybe :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Constructs a new tuple type, from items.
--   
--   length is the number of items in
--   items, or -1 to indicate that items is
--   Nothing-terminated.
--   
--   It is appropriate to call variantTypeFree on the return value.
variantTypeNewTuple :: (HasCallStack, MonadIO m) => [VariantType] -> m VariantType

-- | Determines the next item type of a tuple or dictionary entry type.
--   
--   type must be the result of a previous call to
--   variantTypeFirst or variantTypeNext.
--   
--   If called on the key type of a dictionary entry then this call returns
--   the value type. If called on the value type of a dictionary entry then
--   this call returns Nothing.
--   
--   For tuples, Nothing is returned when type is
--   the last item in a tuple.
variantTypeNext :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | No description available in the introspection data.
variantTypeStringGetDepth_ :: (HasCallStack, MonadIO m) => Text -> m Word64

-- | Checks if typeString is a valid GVariant type string.
--   This call is equivalent to calling variantTypeStringScan and
--   confirming that the following character is a nul terminator.
variantTypeStringIsValid :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Scan for a single complete and valid GVariant type string in
--   string. The memory pointed to by limit
--   (or bytes beyond it) is never accessed.
--   
--   If a valid type string is found, endptr is updated to
--   point to the first character past the end of the string that was found
--   and True is returned.
--   
--   If there is no valid type string starting at string,
--   or if the type string does not end before limit then
--   False is returned.
--   
--   For the simple case of checking if a string is a valid type string,
--   see variantTypeStringIsValid.
--   
--   Since: 2.24
variantTypeStringScan :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m (Bool, Text)

-- | Determines the value type of a dictionary entry type.
--   
--   This function may only be used with a dictionary entry type.
variantTypeValue :: (HasCallStack, MonadIO m) => VariantType -> m VariantType
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.VariantType.VariantType

-- | The FloatIEEE754 and DoubleIEEE754 unions are used to
--   access the sign, mantissa and exponent of IEEE floats and doubles.
--   These unions are defined as appropriate for a given platform. IEEE
--   floats and doubles are supported (used for storage) by at least Intel,
--   PPC and Sparc.
module GI.GLib.Unions.DoubleIEEE754

-- | Memory-managed wrapper type.
newtype DoubleIEEE754
DoubleIEEE754 :: ManagedPtr DoubleIEEE754 -> DoubleIEEE754

-- | Construct a DoubleIEEE754 struct initialized to zero.
newZeroDoubleIEEE754 :: MonadIO m => m DoubleIEEE754

-- | A convenience alias for Nothing :: Maybe
--   DoubleIEEE754.
noDoubleIEEE754 :: Maybe DoubleIEEE754

-- | Get the value of the “v_double” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get doubleIEEE754 #vDouble
--   
getDoubleIEEE754VDouble :: MonadIO m => DoubleIEEE754 -> m Double

-- | Set the value of the “v_double” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set doubleIEEE754 [ #vDouble := value ]
--   
setDoubleIEEE754VDouble :: MonadIO m => DoubleIEEE754 -> Double -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754 tag

-- | The FloatIEEE754 and DoubleIEEE754 unions are used to
--   access the sign, mantissa and exponent of IEEE floats and doubles.
--   These unions are defined as appropriate for a given platform. IEEE
--   floats and doubles are supported (used for storage) by at least Intel,
--   PPC and Sparc.
module GI.GLib.Unions.FloatIEEE754

-- | Memory-managed wrapper type.
newtype FloatIEEE754
FloatIEEE754 :: ManagedPtr FloatIEEE754 -> FloatIEEE754

-- | Construct a FloatIEEE754 struct initialized to zero.
newZeroFloatIEEE754 :: MonadIO m => m FloatIEEE754

-- | A convenience alias for Nothing :: Maybe
--   FloatIEEE754.
noFloatIEEE754 :: Maybe FloatIEEE754

-- | Get the value of the “v_float” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get floatIEEE754 #vFloat
--   
getFloatIEEE754VFloat :: MonadIO m => FloatIEEE754 -> m Float

-- | Set the value of the “v_float” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set floatIEEE754 [ #vFloat := value ]
--   
setFloatIEEE754VFloat :: MonadIO m => FloatIEEE754 -> Float -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Unions.FloatIEEE754.FloatIEEE754
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.FloatIEEE754.FloatIEEE754 tag

-- | The GMainContext struct is an opaque data type representing a
--   set of sources to be handled in a main loop.
module GI.GLib.Structs.MainContext

-- | Memory-managed wrapper type.
newtype MainContext
MainContext :: ManagedPtr MainContext -> MainContext

-- | A convenience alias for Nothing :: Maybe
--   MainContext.
noMainContext :: Maybe MainContext

-- | Tries to become the owner of the specified context. If some other
--   thread is the owner of the context, returns False immediately.
--   Ownership is properly recursive: the owner can require ownership again
--   and will release ownership when mainContextRelease is called as
--   many times as mainContextAcquire.
--   
--   You must be the owner of a context before you can call
--   mainContextPrepare, mainContextQuery,
--   mainContextCheck, mainContextDispatch.
mainContextAcquire :: (HasCallStack, MonadIO m) => MainContext -> m Bool

-- | Adds a file descriptor to the set of file descriptors polled for this
--   context. This will very seldom be used directly. Instead a typical
--   event source will use sourceAddUnixFd instead.
mainContextAddPoll :: (HasCallStack, MonadIO m) => MainContext -> PollFD -> Int32 -> m ()

-- | Passes the results of polling back to the main loop.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextCheck :: (HasCallStack, MonadIO m) => MainContext -> Int32 -> [PollFD] -> m Bool

-- | Returns the global default main context. This is the main context used
--   for main loop functions when a main loop is not explicitly specified,
--   and corresponds to the "main" main loop. See also
--   mainContextGetThreadDefault.
mainContextDefault :: (HasCallStack, MonadIO m) => m MainContext

-- | Dispatches all pending sources.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextDispatch :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Finds a source with the given source functions and user data. If
--   multiple sources exist with the same source function and user data,
--   the first one found will be returned.
mainContextFindSourceByFuncsUserData :: (HasCallStack, MonadIO m) => MainContext -> SourceFuncs -> Ptr () -> m Source

-- | Finds a Source given a pair of context and ID.
--   
--   It is a programmer error to attempt to lookup a non-existent source.
--   
--   More specifically: source IDs can be reissued after a source has been
--   destroyed and therefore it is never valid to use this function with a
--   source ID which may have already been removed. An example is when
--   scheduling an idle to run in another thread with
--   g_idle_add(): the idle may already have run and been
--   removed by the time this function is called on its (now invalid)
--   source ID. This source ID may have been reissued, leading to the
--   operation being performed against the wrong source.
mainContextFindSourceById :: (HasCallStack, MonadIO m) => MainContext -> Word32 -> m Source

-- | Finds a source with the given user data for the callback. If multiple
--   sources exist with the same user data, the first one found will be
--   returned.
mainContextFindSourceByUserData :: (HasCallStack, MonadIO m) => MainContext -> Ptr () -> m Source

-- | Gets the thread-default MainContext for this thread.
--   Asynchronous operations that want to be able to be run in contexts
--   other than the default one should call this method or
--   mainContextRefThreadDefault to get a MainContext to add
--   their GSources to. (Note that even in single-threaded
--   programs applications may sometimes want to temporarily push a
--   non-default context, so it is not safe to assume that this will always
--   return Nothing if you are running in the default thread.)
--   
--   If you need to hold a reference on the context, use
--   mainContextRefThreadDefault instead.
--   
--   Since: 2.22
mainContextGetThreadDefault :: (HasCallStack, MonadIO m) => m MainContext

-- | Invokes a function in such a way that context is owned
--   during the invocation of function.
--   
--   This function is the same as g_main_context_invoke()
--   except that it lets you specify the priority in case
--   function ends up being scheduled as an idle and also
--   lets you give a DestroyNotify for data.
--   
--   notify should not assume that it is called from any
--   particular thread or with any particular context acquired.
--   
--   Since: 2.28
mainContextInvokeFull :: (HasCallStack, MonadIO m) => MainContext -> Int32 -> SourceFunc -> m ()

-- | Determines whether this thread holds the (recursive) ownership of this
--   MainContext. This is useful to know before waiting on another
--   thread that may be blocking to get ownership of
--   context.
--   
--   Since: 2.10
mainContextIsOwner :: (HasCallStack, MonadIO m) => MainContext -> m Bool

-- | Runs a single iteration for the given main loop. This involves
--   checking to see if any event sources are ready to be processed, then
--   if no events sources are ready and mayBlock is
--   True, waiting for a source to become ready, then dispatching
--   the highest priority events sources that are ready. Otherwise, if
--   mayBlock is False sources are not waited to
--   become ready, only those highest priority events sources will be
--   dispatched (if any), that are ready at this given moment without
--   further waiting.
--   
--   Note that even when mayBlock is True, it is
--   still possible for mainContextIteration to return False,
--   since the wait may be interrupted for other reasons than an event
--   source becoming ready.
mainContextIteration :: (HasCallStack, MonadIO m) => MainContext -> Bool -> m Bool

-- | Creates a new MainContext structure.
mainContextNew :: (HasCallStack, MonadIO m) => m MainContext

-- | Checks if any sources have pending events for the given context.
mainContextPending :: (HasCallStack, MonadIO m) => MainContext -> m Bool

-- | Pops context off the thread-default context stack
--   (verifying that it was on the top of the stack).
--   
--   Since: 2.22
mainContextPopThreadDefault :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Prepares to poll sources within a main loop. The resulting information
--   for polling is determined by calling g_main_context_query ().
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextPrepare :: (HasCallStack, MonadIO m) => MainContext -> Int32 -> m Bool

-- | Acquires context and sets it as the thread-default
--   context for the current thread. This will cause certain asynchronous
--   operations (such as most [gio][gio]-based I/O) which are started in
--   this thread to run under context and deliver their
--   results to its main loop, rather than running under the global default
--   context in the main thread. Note that calling this function changes
--   the context returned by mainContextGetThreadDefault, not the
--   one returned by mainContextDefault, so it does not affect the
--   context used by functions like g_idle_add().
--   
--   Normally you would call this function shortly after creating a new
--   thread, passing it a MainContext which will be run by a
--   MainLoop in that thread, to set a new default context for all
--   async operations in that thread. In this case you may not need to ever
--   call mainContextPopThreadDefault, assuming you want the new
--   MainContext to be the default for the whole lifecycle of the
--   thread.
--   
--   If you don't have control over how the new thread was created (e.g. in
--   the new thread isn't newly created, or if the thread life cycle is
--   managed by a ThreadPool), it is always suggested to wrap the
--   logic that needs to use the new MainContext inside a
--   mainContextPushThreadDefault /
--   mainContextPopThreadDefault pair, otherwise threads that are
--   re-used will end up never explicitly releasing the MainContext
--   reference they hold.
--   
--   In some cases you may want to schedule a single operation in a
--   non-default context, or temporarily use a non-default context in the
--   main thread. In that case, you can wrap the call to the asynchronous
--   operation inside a mainContextPushThreadDefault /
--   mainContextPopThreadDefault pair, but it is up to you to ensure
--   that no other asynchronous operations accidentally get started while
--   the non-default context is active.
--   
--   Beware that libraries that predate this function may not correctly
--   handle being used from a thread with a thread-default context. Eg, see
--   g_file_supports_thread_contexts().
--   
--   Since: 2.22
mainContextPushThreadDefault :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Determines information necessary to poll this main loop.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextQuery :: (HasCallStack, MonadIO m) => MainContext -> Int32 -> [PollFD] -> m (Int32, Int32, [PollFD])

-- | Increases the reference count on a MainContext object by one.
mainContextRef :: (HasCallStack, MonadIO m) => MainContext -> m MainContext

-- | Gets the thread-default MainContext for this thread, as with
--   mainContextGetThreadDefault, but also adds a reference to it
--   with mainContextRef. In addition, unlike
--   mainContextGetThreadDefault, if the thread-default context is
--   the global default context, this will return that MainContext
--   (with a ref added to it) rather than returning Nothing.
--   
--   Since: 2.32
mainContextRefThreadDefault :: (HasCallStack, MonadIO m) => m MainContext

-- | Releases ownership of a context previously acquired by this thread
--   with mainContextAcquire. If the context was acquired multiple
--   times, the ownership will be released only when
--   mainContextRelease is called as many times as it was acquired.
mainContextRelease :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Removes file descriptor from the set of file descriptors to be polled
--   for a particular context.
mainContextRemovePoll :: (HasCallStack, MonadIO m) => MainContext -> PollFD -> m ()

-- | Decreases the reference count on a MainContext object by one.
--   If the result is zero, free the context and free all associated
--   memory.
mainContextUnref :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Tries to become the owner of the specified context, as with
--   mainContextAcquire. But if another thread is the owner,
--   atomically drop mutex and wait on cond
--   until that owner releases ownership or until cond is
--   signaled, then try again (once) to become the owner.

-- | Deprecated: (Since version 2.58)Use mainContextIsOwner and
--   separate locking instead.
mainContextWait :: (HasCallStack, MonadIO m) => MainContext -> Cond -> Mutex -> m Bool

-- | If context is currently blocking in
--   mainContextIteration waiting for a source to become ready,
--   cause it to stop blocking and return. Otherwise, cause the next
--   invocation of mainContextIteration to return without blocking.
--   
--   This API is useful for low-level control over MainContext; for
--   example, integrating it with main loop implementations such as
--   MainLoop.
--   
--   Another related use for this function is when implementing a main loop
--   with a termination condition, computed from multiple threads:
--   
--   
C code
--   
--   
--   #define NUM_TASKS 10
--   static volatile gint tasks_remaining = NUM_TASKS;
--   ...
--   
--   while (g_atomic_int_get (&tasks_remaining) != 0)
--     g_main_context_iteration (NULL, TRUE);
--   
--   
--   Then in a thread:
--   
--   
C code
--   
--   
--   perform_work();
--   
--   if (g_atomic_int_dec_and_test (&tasks_remaining))
--     g_main_context_wakeup (NULL);
--   
mainContextWakeup :: (HasCallStack, MonadIO m) => MainContext -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.GLib.Structs.MainContext.MainContext

-- | The Cond struct is an opaque data structure that represents a
--   condition. Threads can block on a Cond if they find a certain
--   condition to be false. If other threads change the state of this
--   condition they signal the Cond, and that causes the waiting
--   threads to be woken up.
--   
--   Consider the following example of a shared variable. One or more
--   threads can wait for data to be published to the variable and when
--   another thread publishes the data, it can signal one of the waiting
--   threads to wake up to collect the data.
--   
--   Here is an example for using GCond to block a thread until a condition
--   is satisfied:
--   
--   
C code
--   
--   
--   gpointer current_data = NULL;
--   GMutex data_mutex;
--   GCond data_cond;
--   
--   void
--   push_data (gpointer data)
--   {
--     g_mutex_lock (&data_mutex);
--     current_data = data;
--     g_cond_signal (&data_cond);
--     g_mutex_unlock (&data_mutex);
--   }
--   
--   gpointer
--   pop_data (void)
--   {
--     gpointer data;
--   
--     g_mutex_lock (&data_mutex);
--     while (!current_data)
--       g_cond_wait (&data_cond, &data_mutex);
--     data = current_data;
--     current_data = NULL;
--     g_mutex_unlock (&data_mutex);
--   
--     return data;
--   }
--   
--   
--   Whenever a thread calls pop_data() now, it will wait
--   until current_data is non-Nothing, i.e. until some other thread
--   has called push_data().
--   
--   The example shows that use of a condition variable must always be
--   paired with a mutex. Without the use of a mutex, there would be a race
--   between the check of currentData by the while loop in
--   pop_data() and waiting. Specifically, another thread
--   could set currentData after the check, and signal the
--   cond (with nobody waiting on it) before the first thread goes to
--   sleep. Cond is specifically useful for its ability to release
--   the mutex and go to sleep atomically.
--   
--   It is also important to use the condWait and
--   condWaitUntil functions only inside a loop which checks for the
--   condition to be true. See condWait for an explanation of why
--   the condition may not be true even after it returns.
--   
--   If a Cond is allocated in static storage then it can be used
--   without initialisation. Otherwise, you should call condInit on
--   it and condClear when done.
--   
--   A Cond should only be accessed via the g_cond_ functions.
module GI.GLib.Structs.Cond

-- | Memory-managed wrapper type.
newtype Cond
Cond :: ManagedPtr Cond -> Cond

-- | Construct a Cond struct initialized to zero.
newZeroCond :: MonadIO m => m Cond

-- | A convenience alias for Nothing :: Maybe Cond.
noCond :: Maybe Cond

-- | If threads are waiting for cond, all of them are
--   unblocked. If no threads are waiting for cond, this
--   function has no effect. It is good practice to lock the same mutex as
--   the waiting threads while calling this function, though not required.
condBroadcast :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | Frees the resources allocated to a Cond with condInit.
--   
--   This function should not be used with a Cond that has been
--   statically allocated.
--   
--   Calling condClear for a Cond on which threads are
--   blocking leads to undefined behaviour.
--   
--   Since: 2.32
condClear :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | Initialises a Cond so that it can be used.
--   
--   This function is useful to initialise a Cond that has been
--   allocated as part of a larger structure. It is not necessary to
--   initialise a Cond that has been statically allocated.
--   
--   To undo the effect of condInit when a Cond is no longer
--   needed, use condClear.
--   
--   Calling condInit on an already-initialised Cond leads to
--   undefined behaviour.
--   
--   Since: 2.32
condInit :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | If threads are waiting for cond, at least one of them
--   is unblocked. If no threads are waiting for cond, this
--   function has no effect. It is good practice to hold the same lock as
--   the waiting thread while calling this function, though not required.
condSignal :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | Atomically releases mutex and waits until
--   cond is signalled. When this function returns,
--   mutex is locked again and owned by the calling thread.
--   
--   When using condition variables, it is possible that a spurious wakeup
--   may occur (ie: condWait returns even though condSignal
--   was not called). It's also possible that a stolen wakeup may occur.
--   This is when condSignal is called, but another thread acquires
--   mutex before this thread and modifies the state of the
--   program in such a way that when condWait is able to return, the
--   expected condition is no longer met.
--   
--   For this reason, condWait must always be used in a loop. See
--   the documentation for Cond for a complete example.
condWait :: (HasCallStack, MonadIO m) => Cond -> Mutex -> m ()

-- | Waits until either cond is signalled or
--   endTime has passed.
--   
--   As with condWait it is possible that a spurious or stolen
--   wakeup could occur. For that reason, waiting on a condition variable
--   should always be in a loop, based on an explicitly-checked predicate.
--   
--   True is returned if the condition variable was signalled (or in
--   the case of a spurious wakeup). False is returned if
--   endTime has passed.
--   
--   The following code shows how to correctly perform a timed wait on a
--   condition variable (extending the example presented in the
--   documentation for Cond):
--   
--   
C code
--   
--   
--   gpointer
--   pop_data_timed (void)
--   {
--     gint64 end_time;
--     gpointer data;
--   
--     g_mutex_lock (&data_mutex);
--   
--     end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND;
--     while (!current_data)
--       if (!g_cond_wait_until (&data_cond, &data_mutex, end_time))
--         {
--           // timeout has passed.
--           g_mutex_unlock (&data_mutex);
--           return NULL;
--         }
--   
--     // there is data for us
--     data = current_data;
--     current_data = NULL;
--   
--     g_mutex_unlock (&data_mutex);
--   
--     return data;
--   }
--   
--   
--   Notice that the end time is calculated once, before entering the loop
--   and reused. This is the motivation behind the use of absolute time on
--   this API -- if a relative time of 5 seconds were passed directly to
--   the call and a spurious wakeup occurred, the program would have to
--   start over waiting again (which would lead to a total wait time of
--   more than 5 seconds).
--   
--   Since: 2.32
condWaitUntil :: (HasCallStack, MonadIO m) => Cond -> Mutex -> Int64 -> m Bool
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Cond.Cond
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Cond.Cond tag

-- | The Mutex struct is an opaque data structure to represent a
--   mutex (mutual exclusion). It can be used to protect data against
--   shared access.
--   
--   Take for example the following function:
--   
--   
C code
--   
--   
--   int
--   give_me_next_number (void)
--   {
--     static int current_number = 0;
--   
--     // now do a very complicated calculation to calculate the new
--     // number, this might for example be a random number generator
--     current_number = calc_next_number (current_number);
--   
--     return current_number;
--   }
--   
--   
--   It is easy to see that this won't work in a multi-threaded
--   application. There current_number must be protected against shared
--   access. A Mutex can be used as a solution to this problem:
--   
--   
C code
--   
--   
--   int
--   give_me_next_number (void)
--   {
--     static GMutex mutex;
--     static int current_number = 0;
--     int ret_val;
--   
--     g_mutex_lock (&mutex);
--     ret_val = current_number = calc_next_number (current_number);
--     g_mutex_unlock (&mutex);
--   
--     return ret_val;
--   }
--   
--   
--   Notice that the Mutex is not initialised to any particular
--   value. Its placement in static storage ensures that it will be
--   initialised to all-zeros, which is appropriate.
--   
--   If a Mutex is placed in other contexts (eg: embedded in a
--   struct) then it must be explicitly initialised using mutexInit.
--   
--   A Mutex should only be accessed via g_mutex_ functions.
module GI.GLib.Unions.Mutex

-- | Memory-managed wrapper type.
newtype Mutex
Mutex :: ManagedPtr Mutex -> Mutex

-- | Construct a Mutex struct initialized to zero.
newZeroMutex :: MonadIO m => m Mutex

-- | A convenience alias for Nothing :: Maybe Mutex.
noMutex :: Maybe Mutex

-- | Frees the resources allocated to a mutex with mutexInit.
--   
--   This function should not be used with a Mutex that has been
--   statically allocated.
--   
--   Calling mutexClear on a locked mutex leads to undefined
--   behaviour.
--   
--   Sine: 2.32
mutexClear :: (HasCallStack, MonadIO m) => Mutex -> m ()

-- | Initializes a Mutex so that it can be used.
--   
--   This function is useful to initialize a mutex that has been allocated
--   on the stack, or as part of a larger structure. It is not necessary to
--   initialize a mutex that has been statically allocated.
--   
--   
C code
--   
--   
--     typedef struct {
--       GMutex m;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_mutex_init (&b->m);
--   
--   
--   To undo the effect of mutexInit when a mutex is no longer
--   needed, use mutexClear.
--   
--   Calling mutexInit on an already initialized Mutex leads
--   to undefined behaviour.
--   
--   Since: 2.32
mutexInit :: (HasCallStack, MonadIO m) => Mutex -> m ()

-- | Locks mutex. If mutex is already
--   locked by another thread, the current thread will block until
--   mutex is unlocked by the other thread.
--   
--   Mutex is neither guaranteed to be recursive nor to be
--   non-recursive. As such, calling mutexLock on a Mutex
--   that has already been locked by the same thread results in undefined
--   behaviour (including but not limited to deadlocks).
mutexLock :: (HasCallStack, MonadIO m) => Mutex -> m ()

-- | Tries to lock mutex. If mutex is
--   already locked by another thread, it immediately returns False.
--   Otherwise it locks mutex and returns True.
--   
--   Mutex is neither guaranteed to be recursive nor to be
--   non-recursive. As such, calling mutexLock on a Mutex
--   that has already been locked by the same thread results in undefined
--   behaviour (including but not limited to deadlocks or arbitrary return
--   values).
mutexTrylock :: (HasCallStack, MonadIO m) => Mutex -> m Bool

-- | Unlocks mutex. If another thread is blocked in a
--   mutexLock call for mutex, it will become
--   unblocked and can lock mutex itself.
--   
--   Calling mutexUnlock on a mutex that is not locked by the
--   current thread leads to undefined behaviour.
mutexUnlock :: (HasCallStack, MonadIO m) => Mutex -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Unions.Mutex.Mutex
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.Mutex.Mutex tag

-- | The data structure representing a lexical scanner.
--   
--   You should set inputName after creating the scanner,
--   since it is used by the default message handler when displaying
--   warnings and errors. If you are scanning a file, the filename would be
--   a good choice.
--   
--   The userData and maxParseErrors fields
--   are not used. If you need to associate extra data with the scanner you
--   can place them here.
--   
--   If you want to use your own message handler you can set the
--   msgHandler field. The type of the message handler
--   function is declared by ScannerMsgFunc.
module GI.GLib.Structs.Scanner

-- | Memory-managed wrapper type.
newtype Scanner
Scanner :: ManagedPtr Scanner -> Scanner

-- | Construct a Scanner struct initialized to zero.
newZeroScanner :: MonadIO m => m Scanner

-- | A convenience alias for Nothing :: Maybe Scanner.
noScanner :: Maybe Scanner

-- | Returns the current line in the input stream (counting from 1). This
--   is the line of the last token parsed via scannerGetNextToken.
scannerCurLine :: (HasCallStack, MonadIO m) => Scanner -> m Word32

-- | Returns the current position in the current line (counting from 0).
--   This is the position of the last token parsed via
--   scannerGetNextToken.
scannerCurPosition :: (HasCallStack, MonadIO m) => Scanner -> m Word32

-- | Gets the current token type. This is simply the token
--   field in the Scanner structure.
scannerCurToken :: (HasCallStack, MonadIO m) => Scanner -> m TokenType

-- | Frees all memory used by the Scanner.
scannerDestroy :: (HasCallStack, MonadIO m) => Scanner -> m ()

-- | Returns True if the scanner has reached the end of the file or
--   text buffer.
scannerEof :: (HasCallStack, MonadIO m) => Scanner -> m Bool

-- | Parses the next token just like scannerPeekNextToken and also
--   removes it from the input stream. The token data is placed in the
--   token, value, line,
--   and position fields of the Scanner structure.
scannerGetNextToken :: (HasCallStack, MonadIO m) => Scanner -> m TokenType

-- | Prepares to scan a file.
scannerInputFile :: (HasCallStack, MonadIO m) => Scanner -> Int32 -> m ()

-- | Prepares to scan a text buffer.
scannerInputText :: (HasCallStack, MonadIO m) => Scanner -> Text -> Word32 -> m ()

-- | Looks up a symbol in the current scope and return its value. If the
--   symbol is not bound in the current scope, Nothing is returned.
scannerLookupSymbol :: (HasCallStack, MonadIO m) => Scanner -> Text -> m (Ptr ())

-- | Parses the next token, without removing it from the input stream. The
--   token data is placed in the nextToken,
--   nextValue, nextLine, and
--   nextPosition fields of the Scanner structure.
--   
--   Note that, while the token is not removed from the input stream (i.e.
--   the next call to scannerGetNextToken will return the same
--   token), it will not be reevaluated. This can lead to surprising
--   results when changing scope or the scanner configuration after peeking
--   the next token. Getting the next token after switching the scope or
--   configuration will return whatever was peeked before, regardless of
--   any symbols that may have been added or removed in the new scope.
scannerPeekNextToken :: (HasCallStack, MonadIO m) => Scanner -> m TokenType

-- | Adds a symbol to the given scope.
scannerScopeAddSymbol :: (HasCallStack, MonadIO m) => Scanner -> Word32 -> Text -> Ptr () -> m ()

-- | Looks up a symbol in a scope and return its value. If the symbol is
--   not bound in the scope, Nothing is returned.
scannerScopeLookupSymbol :: (HasCallStack, MonadIO m) => Scanner -> Word32 -> Text -> m (Ptr ())

-- | Removes a symbol from a scope.
scannerScopeRemoveSymbol :: (HasCallStack, MonadIO m) => Scanner -> Word32 -> Text -> m ()

-- | Sets the current scope.
scannerSetScope :: (HasCallStack, MonadIO m) => Scanner -> Word32 -> m Word32

-- | Rewinds the filedescriptor to the current buffer position and blows
--   the file read ahead buffer. This is useful for third party uses of the
--   scanners filedescriptor, which hooks onto the current scanning
--   position.
scannerSyncFileOffset :: (HasCallStack, MonadIO m) => Scanner -> m ()

-- | Outputs a message through the scanner's msg_handler, resulting from an
--   unexpected token in the input stream. Note that you should not call
--   scannerPeekNextToken followed by scannerUnexpToken
--   without an intermediate call to scannerGetNextToken, as
--   scannerUnexpToken evaluates the scanner's current token (not
--   the peeked token) to construct part of the message.
scannerUnexpToken :: (HasCallStack, MonadIO m) => Scanner -> TokenType -> Text -> Text -> Text -> Text -> Int32 -> m ()

-- | Set the value of the “config” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #config
--   
clearScannerConfig :: MonadIO m => Scanner -> m ()

-- | Get the value of the “config” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get scanner #config
--   
getScannerConfig :: MonadIO m => Scanner -> m (Maybe ScannerConfig)

-- | Set the value of the “config” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set scanner [ #config := value ]
--   
setScannerConfig :: MonadIO m => Scanner -> Ptr ScannerConfig -> m ()

-- | Set the value of the “input_name” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #inputName
--   
clearScannerInputName :: MonadIO m => Scanner -> m ()

-- | Get the value of the “input_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #inputName
--   
getScannerInputName :: MonadIO m => Scanner -> m (Maybe Text)

-- | Set the value of the “input_name” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #inputName := value ]
--   
setScannerInputName :: MonadIO m => Scanner -> CString -> m ()

-- | Get the value of the “line” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get scanner #line
--   
getScannerLine :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “line” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set scanner [ #line := value ]
--   
setScannerLine :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “max_parse_errors” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #maxParseErrors
--   
getScannerMaxParseErrors :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “max_parse_errors” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #maxParseErrors := value ]
--   
setScannerMaxParseErrors :: MonadIO m => Scanner -> Word32 -> m ()

-- | Set the value of the “msg_handler” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #msgHandler
--   
clearScannerMsgHandler :: MonadIO m => Scanner -> m ()

-- | Get the value of the “msg_handler” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #msgHandler
--   
getScannerMsgHandler :: MonadIO m => Scanner -> m (Maybe ScannerMsgFunc)

-- | Set the value of the “msg_handler” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #msgHandler := value ]
--   
setScannerMsgHandler :: MonadIO m => Scanner -> FunPtr C_ScannerMsgFunc -> m ()

-- | Get the value of the “next_line” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #nextLine
--   
getScannerNextLine :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “next_line” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #nextLine := value ]
--   
setScannerNextLine :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “next_position” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #nextPosition
--   
getScannerNextPosition :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “next_position” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #nextPosition := value ]
--   
setScannerNextPosition :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “next_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #nextToken
--   
getScannerNextToken :: MonadIO m => Scanner -> m TokenType

-- | Set the value of the “next_token” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #nextToken := value ]
--   
setScannerNextToken :: MonadIO m => Scanner -> TokenType -> m ()

-- | Get the value of the “next_value” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #nextValue
--   
getScannerNextValue :: MonadIO m => Scanner -> m TokenValue

-- | Get the value of the “parse_errors” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #parseErrors
--   
getScannerParseErrors :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “parse_errors” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #parseErrors := value ]
--   
setScannerParseErrors :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “position” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #position
--   
getScannerPosition :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “position” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #position := value ]
--   
setScannerPosition :: MonadIO m => Scanner -> Word32 -> m ()

-- | Set the value of the “qdata” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #qdata
--   
clearScannerQdata :: MonadIO m => Scanner -> m ()

-- | Get the value of the “qdata” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get scanner #qdata
--   
getScannerQdata :: MonadIO m => Scanner -> m (Maybe Data)

-- | Set the value of the “qdata” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set scanner [ #qdata := value ]
--   
setScannerQdata :: MonadIO m => Scanner -> Ptr Data -> m ()

-- | Get the value of the “token” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get scanner #token
--   
getScannerToken :: MonadIO m => Scanner -> m TokenType

-- | Set the value of the “token” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set scanner [ #token := value ]
--   
setScannerToken :: MonadIO m => Scanner -> TokenType -> m ()

-- | Set the value of the “user_data” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #userData
--   
clearScannerUserData :: MonadIO m => Scanner -> m ()

-- | Get the value of the “user_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get scanner #userData
--   
getScannerUserData :: MonadIO m => Scanner -> m (Ptr ())

-- | Set the value of the “user_data” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set scanner [ #userData := value ]
--   
setScannerUserData :: MonadIO m => Scanner -> Ptr () -> m ()

-- | Get the value of the “value” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get scanner #value
--   
getScannerValue :: MonadIO m => Scanner -> m TokenValue
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Structs.Scanner.Scanner
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Scanner.Scanner tag

module GI.GLib.Structs

-- | A union holding the value of the token.
module GI.GLib.Unions.TokenValue

-- | Memory-managed wrapper type.
newtype TokenValue
TokenValue :: ManagedPtr TokenValue -> TokenValue

-- | Construct a TokenValue struct initialized to zero.
newZeroTokenValue :: MonadIO m => m TokenValue

-- | A convenience alias for Nothing :: Maybe
--   TokenValue.
noTokenValue :: Maybe TokenValue

-- | Get the value of the “v_binary” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get tokenValue #vBinary
--   
getTokenValueVBinary :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “v_binary” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vBinary := value ]
--   
setTokenValueVBinary :: MonadIO m => TokenValue -> CULong -> m ()

-- | Get the value of the “v_char” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vChar
--   
getTokenValueVChar :: MonadIO m => TokenValue -> m Word8

-- | Set the value of the “v_char” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vChar := value ]
--   
setTokenValueVChar :: MonadIO m => TokenValue -> Word8 -> m ()

-- | Set the value of the “v_comment” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #vComment
--   
clearTokenValueVComment :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “v_comment” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get tokenValue #vComment
--   
getTokenValueVComment :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “v_comment” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vComment := value ]
--   
setTokenValueVComment :: MonadIO m => TokenValue -> CString -> m ()

-- | Get the value of the “v_error” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vError
--   
getTokenValueVError :: MonadIO m => TokenValue -> m Word32

-- | Set the value of the “v_error” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vError := value ]
--   
setTokenValueVError :: MonadIO m => TokenValue -> Word32 -> m ()

-- | Get the value of the “v_float” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vFloat
--   
getTokenValueVFloat :: MonadIO m => TokenValue -> m Double

-- | Set the value of the “v_float” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vFloat := value ]
--   
setTokenValueVFloat :: MonadIO m => TokenValue -> Double -> m ()

-- | Get the value of the “v_hex” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vHex
--   
getTokenValueVHex :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “v_hex” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vHex := value ]
--   
setTokenValueVHex :: MonadIO m => TokenValue -> CULong -> m ()

-- | Set the value of the “v_identifier” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #vIdentifier
--   
clearTokenValueVIdentifier :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “v_identifier” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get tokenValue #vIdentifier
--   
getTokenValueVIdentifier :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “v_identifier” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vIdentifier := value ]
--   
setTokenValueVIdentifier :: MonadIO m => TokenValue -> CString -> m ()

-- | Get the value of the “v_int” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vInt
--   
getTokenValueVInt :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “v_int” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vInt := value ]
--   
setTokenValueVInt :: MonadIO m => TokenValue -> CULong -> m ()

-- | Get the value of the “v_int64” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vInt64
--   
getTokenValueVInt64 :: MonadIO m => TokenValue -> m Word64

-- | Set the value of the “v_int64” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vInt64 := value ]
--   
setTokenValueVInt64 :: MonadIO m => TokenValue -> Word64 -> m ()

-- | Get the value of the “v_octal” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get tokenValue #vOctal
--   
getTokenValueVOctal :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “v_octal” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vOctal := value ]
--   
setTokenValueVOctal :: MonadIO m => TokenValue -> CULong -> m ()

-- | Set the value of the “v_string” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #vString
--   
clearTokenValueVString :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “v_string” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get tokenValue #vString
--   
getTokenValueVString :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “v_string” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vString := value ]
--   
setTokenValueVString :: MonadIO m => TokenValue -> CString -> m ()

-- | Set the value of the “v_symbol” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #vSymbol
--   
clearTokenValueVSymbol :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “v_symbol” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get tokenValue #vSymbol
--   
getTokenValueVSymbol :: MonadIO m => TokenValue -> m (Ptr ())

-- | Set the value of the “v_symbol” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set tokenValue [ #vSymbol := value ]
--   
setTokenValueVSymbol :: MonadIO m => TokenValue -> Ptr () -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.GLib.Unions.TokenValue.TokenValue
instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.TokenValue.TokenValue tag

module GI.GLib.Unions

module GI.GLib
