-- 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.30

-- | Build time configuration used during code generation.
module GI.GLib.Config

-- | Overrides used when generating these bindings.
overrides :: Text

-- | Modules in this package
modules :: [Text]

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 !$&'()*+,;=.
--   
--   Since: 2.16
pattern URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS :: Text

-- | Generic delimiters characters as defined in RFC 3986. Includes
--   :/?#[]@.
--   
--   Since: 2.16
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

-- | A value that can be passed as an option to
--   GLib.test_init.
--   
--   If this option is given, GLib.test_init will not call
--   setPrgname.
--   
--   Since: 2.84
pattern TEST_OPTION_NO_PRGNAME :: Text

-- | A value that can be passed as an option to
--   GLib.test_init.
--   
--   If this option is given, assertions will not abort the process, but
--   call testFail. Equivalent to testSetNonfatalAssertions.
--   
--   Since: 2.84
pattern TEST_OPTION_NONFATAL_ASSERTIONS :: Text

-- | A value that can be passed as an option to
--   GLib.test_init.
--   
--   Creates a unique temporary directory for each unit test and uses sets
--   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) getHomeDir 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
--   
- getUserStateDir
--   
- 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
--   [callbackgLib.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
--   [callbackgLib.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

-- | Evaluates to the initial reference count for grefcount.
--   
--   This macro is useful for initializing grefcount fields inside
--   structures, for instance:
--   
--   
C code
--   
--   
--   typedef struct {
--     grefcount ref_count;
--     char *name;
--     char *address;
--   } Person;
--   
--   static const Person default_person = {
--     .ref_count = G_REF_COUNT_INIT,
--     .name = "Default name",
--     .address = "Default address",
--   };
--   
--   
--   Since: 2.78
pattern REF_COUNT_INIT :: 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
--   idleAdd.
pattern PRIORITY_DEFAULT_IDLE :: Int32

-- | Use this for default priority event sources.
--   
--   In GLib this priority is used when adding timeout functions with
--   timeoutAdd. 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

-- | No description available in the introspection data.
pattern MAXUINT8 :: Word8

-- | No description available in the introspection data.
pattern MAXUINT64 :: Word64

-- | No description available in the introspection data.
pattern MAXUINT32 :: Word32

-- | No description available in the introspection data.
pattern MAXUINT16 :: Word16

-- | No description available in the introspection data.
pattern MAXINT8 :: Int8

-- | No description available in the introspection data.
pattern MAXINT64 :: Int64

-- | No description available in the introspection data.
pattern MAXINT32 :: Int32

-- | No description available in the introspection data.
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.
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
--   [constgLib.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
--   [constgLib.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
--   [constgLib.KEY_FILE_DESKTOP_KEY_TYPE], key for desktop
--   entries representing applications.
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_TYPE_APPLICATION :: Text

-- | A key under [constgLib.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 [constgLib.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 [constgLib.KEY_FILE_DESKTOP_GROUP], whose
--   value is a string giving the type of the desktop entry.
--   
--   Usually [constgLib.KEY_FILE_DESKTOP_TYPE_APPLICATION],
--   [constgLib.KEY_FILE_DESKTOP_TYPE_LINK], or
--   [constgLib.KEY_FILE_DESKTOP_TYPE_DIRECTORY].
--   
--   Since: 2.14
pattern KEY_FILE_DESKTOP_KEY_TYPE :: Text

-- | A key under [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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

-- | A key under [constgLib.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 [constgLib.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

-- | A key under [constgLib.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

-- | A key under [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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 [constgLib.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

-- | 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

-- | No description available in the introspection data.
pattern GUINTPTR_FORMAT :: Text

-- | No description available in the introspection data.
pattern GUINT64_FORMAT :: Text

-- | No description available in the introspection data.
pattern GUINT32_FORMAT :: Text

-- | No description available in the introspection data.
pattern GUINT16_FORMAT :: Text

-- | No description available in the introspection data.
pattern GSSIZE_MODIFIER :: Text

-- | No description available in the introspection data.
pattern GSSIZE_FORMAT :: Text

-- | No description available in the introspection data.
pattern GSIZE_MODIFIER :: Text

-- | No description available in the introspection data.
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

-- | No description available in the introspection data.
pattern GINTPTR_MODIFIER :: Text

-- | No description available in the introspection data.
pattern GINTPTR_FORMAT :: Text

-- | No description available in the introspection data.
pattern GINT64_MODIFIER :: Text

-- | No description available in the introspection data.
pattern GINT64_FORMAT :: Text

-- | No description available in the introspection data.
pattern GINT32_MODIFIER :: Text

-- | No description available in the introspection data.
pattern GINT32_FORMAT :: Text

-- | No description available in the introspection data.
pattern GINT16_MODIFIER :: Text

-- | No description available in the introspection data.
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 C standard version the code is compiling against, it's normally
--   defined with the same value of STDC_VERSION for C
--   standard compatible compilers, while it uses the lowest standard
--   version in pure MSVC, given that in such compiler the definition
--   depends on a compilation flag.
--   
--   This is granted to be undefined when compiling with a C++ compiler.
--   
--   See also: G_C_STD_CHECK_VERSION and
--   G_CXX_STD_VERSION
--   
--   Since: 2.76
pattern C_STD_VERSION :: 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

-- | No description available in the introspection data.
pattern C'macro__has_attribute_no_sanitize_address :: Int32

-- | No description available in the introspection data.
pattern C'macro__has_attribute_ifunc :: Int32

-- | No description available in the introspection data.
pattern C'macro__has_attribute___noreturn__ :: Int32

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

-- | Evaluates to the initial reference count for gatomicrefcount.
--   
--   This macro is useful for initializing gatomicrefcount fields
--   inside structures, for instance:
--   
--   
C code
--   
--   
--   typedef struct {
--     gatomicrefcount ref_count;
--     char *name;
--     char *address;
--   } Person;
--   
--   static const Person default_person = {
--     .ref_count = G_ATOMIC_REF_COUNT_INIT,
--     .name = "Default name",
--     .address = "Default address",
--   };
--   
--   
--   Since: 2.78
pattern ATOMIC_REF_COUNT_INIT :: 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

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
pattern ALLOC_ONLY :: Int32

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
pattern ALLOC_AND_FREE :: Int32

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
pattern ALLOCATOR_SLIST :: Int32

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
pattern ALLOCATOR_NODE :: Int32

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
pattern ALLOCATOR_LIST :: 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 DateMonthJanuary,
--   DateMonthFebruary, etc. DateMonthBadMonth 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; DateWeekdayMonday,
--   DateWeekdayTuesday, etc. DateWeekdayBadWeekday 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

-- | Statuses 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 or booleans.
OptionArgNone :: OptionArg

-- | The option takes a UTF-8 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, which will be in the GLib
--   filename encoding rather than UTF-8.
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 (deprecated since GLib
--   2.32)
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
--   GLib.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.
--   
--   The same principles apply for other build systems, such as meson.
--   
--   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 traversal performed by treeTraverse,
--   nodeTraverse and g_node_find().
--   
--   The different orders are illustrated here:
--   
--   
--   
- In order: A, B, C, D, E, F, G, H, I <picture> <source
--   srcset="Sorted_binary_tree_inorder-dark.svg"
--   media="(prefers-color-scheme: dark)"> <img
--   src="Sorted_binary_tree_inorder.svg" alt="Sorted binary tree, in-order
--   traversal"> </picture>
--   
- Pre order: F, B, A, D, C, E, G, I, H <picture> <source
--   srcset="Sorted_binary_tree_preorder-dark.svg"
--   media="(prefers-color-scheme: dark)"> <img
--   src="Sorted_binary_tree_preorder.svg" alt="Sorted binary tree,
--   pre-order traversal"> </picture>
--   
- Post order: A, C, E, D, B, H, I, G, F <picture> <source
--   srcset="Sorted_binary_tree_postorder-dark.svg"
--   media="(prefers-color-scheme: dark)"> <img
--   src="Sorted_binary_tree_postorder.svg" alt="Sorted binary tree,
--   post-order traversal"> </picture>
--   
- Level order: F, B, G, A, D, I, C, E, H <picture> <source
--   srcset="Sorted_binary_tree_breadth-first_traversal-dark.svg"
--   media="(prefers-color-scheme: dark)"> <img
--   src="Sorted_binary_tree_breadth-first_traversal.svg" alt="Sorted
--   binary tree, breadth-first level order traversal">
--   </picture>
--   
data TraverseType

-- | visits 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. For n-ary
--   trees, it visits 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. Deprecated: 2.70: Use
--   UnicodeBreakTypeCloseParenthesis instead.
UnicodeBreakTypeCloseParanthesis :: UnicodeBreakType

-- | Closing Parenthesis (CP). Since 2.70
UnicodeBreakTypeCloseParenthesis :: 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

-- | Aksara (AK). Since: 2.80
UnicodeBreakTypeAksara :: UnicodeBreakType

-- | Aksara Pre-Base (AP). Since: 2.80
UnicodeBreakTypeAksaraPreBase :: UnicodeBreakType

-- | Aksara Start (AS). Since: 2.80
UnicodeBreakTypeAksaraStart :: UnicodeBreakType

-- | Virama Final (VF). Since: 2.80
UnicodeBreakTypeViramaFinal :: UnicodeBreakType

-- | Virama (VI). Since: 2.80
UnicodeBreakTypeVirama :: UnicodeBreakType

-- | Unambiguous Hyphen (HH). Since: 2.88
UnicodeBreakTypeUnambiguousHyphen :: 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

-- | Elym. Since: 2.62
UnicodeScriptElymaic :: UnicodeScript

-- | Nand. Since: 2.62
UnicodeScriptNandinagari :: UnicodeScript

-- | Rohg. Since: 2.62
UnicodeScriptNyiakengPuachueHmong :: UnicodeScript

-- | Wcho. Since: 2.62
UnicodeScriptWancho :: UnicodeScript

-- | Chorasmian. Since: 2.66
UnicodeScriptChorasmian :: UnicodeScript

-- | Dives Akuru. Since: 2.66
UnicodeScriptDivesAkuru :: UnicodeScript

-- | Khitan small script. Since: 2.66
UnicodeScriptKhitanSmallScript :: UnicodeScript

-- | Yezidi. Since: 2.66
UnicodeScriptYezidi :: UnicodeScript

-- | Cypro-Minoan. Since: 2.72
UnicodeScriptCyproMinoan :: UnicodeScript

-- | Old Uyghur. Since: 2.72
UnicodeScriptOldUyghur :: UnicodeScript

-- | Tangsa. Since: 2.72
UnicodeScriptTangsa :: UnicodeScript

-- | Toto. Since: 2.72
UnicodeScriptToto :: UnicodeScript

-- | Vithkuqi. Since: 2.72
UnicodeScriptVithkuqi :: UnicodeScript

-- | Mathematical notation. Since: 2.72
UnicodeScriptMath :: UnicodeScript

-- | Kawi. Since 2.74
UnicodeScriptKawi :: UnicodeScript

-- | Nag Mundari. Since 2.74
UnicodeScriptNagMundari :: UnicodeScript

-- | Todhri. Since: 2.84
UnicodeScriptTodhri :: UnicodeScript

-- | Garay. Since: 2.84
UnicodeScriptGaray :: UnicodeScript

-- | Tulu-Tigalari. Since: 2.84
UnicodeScriptTuluTigalari :: UnicodeScript

-- | Sunuwar. Since: 2.84
UnicodeScriptSunuwar :: UnicodeScript

-- | Gurung Khema. Since: 2.84
UnicodeScriptGurungKhema :: UnicodeScript

-- | Kirat Rai. Since: 2.84
UnicodeScriptKiratRai :: UnicodeScript

-- | Ol Onal. Since: 2.84
UnicodeScriptOlOnal :: UnicodeScript

-- | Sidetic. Since: 2.88
UnicodeScriptSidetic :: UnicodeScript

-- | Tolong Siki. Since: 2.88
UnicodeScriptTolongSiki :: UnicodeScript

-- | Tai Yo. Since: 2.88
UnicodeScriptTaiYo :: UnicodeScript

-- | Beria Erfe. Since: 2.88
UnicodeScriptBeriaErfe :: 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

-- | Mnemonic constants for the ends of a Unix pipe.
--   
--   Since: 2.80
data UnixPipeEnd

-- | The readable file descriptor 0
UnixPipeEndRead :: UnixPipeEnd

-- | The writable file descriptor 1
UnixPipeEndWrite :: UnixPipeEnd

-- | Catch-all for unknown values
AnotherUnixPipeEnd :: Int -> UnixPipeEnd

-- | Error codes returned by Uri methods.
--   
--   Since: 2.66
data UriError

-- | Generic error if no more specific error is available. See the error
--   message for details.
UriErrorFailed :: UriError

-- | The scheme of a URI could not be parsed.
UriErrorBadScheme :: UriError

-- | The user/userinfo of a URI could not be parsed.
UriErrorBadUser :: UriError

-- | The password of a URI could not be parsed.
UriErrorBadPassword :: UriError

-- | The authentication parameters of a URI could not be parsed.
UriErrorBadAuthParams :: UriError

-- | The host of a URI could not be parsed.
UriErrorBadHost :: UriError

-- | The port of a URI could not be parsed.
UriErrorBadPort :: UriError

-- | The path of a URI could not be parsed.
UriErrorBadPath :: UriError

-- | The query of a URI could not be parsed.
UriErrorBadQuery :: UriError

-- | The fragment of a URI could not be parsed.
UriErrorBadFragment :: UriError

-- | Catch-all for unknown values
AnotherUriError :: Int -> UriError

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

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

-- | 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

-- | variant was too deeply nested; GVariant is only guaranteed to
--   handle nesting up to 64 levels (Since: 2.64)
VariantParseErrorRecursion :: 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 Data.GI.Base.BasicTypes.BoxedEnum GI.GLib.Enums.NormalizeMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GLib.Enums.UnicodeBreakType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GLib.Enums.UnicodeScript
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GLib.Enums.UnicodeType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.BookmarkFileError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.ChecksumType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.ConvertError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.DateDMY
instance GHC.Internal.Enum.Enum GI.GLib.Enums.DateMonth
instance GHC.Internal.Enum.Enum GI.GLib.Enums.DateWeekday
instance GHC.Internal.Enum.Enum GI.GLib.Enums.ErrorType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.FileError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.IOChannelError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.IOError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.IOStatus
instance GHC.Internal.Enum.Enum GI.GLib.Enums.KeyFileError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.LogWriterOutput
instance GHC.Internal.Enum.Enum GI.GLib.Enums.MarkupError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.NormalizeMode
instance GHC.Internal.Enum.Enum GI.GLib.Enums.NumberParserError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.OnceStatus
instance GHC.Internal.Enum.Enum GI.GLib.Enums.OptionArg
instance GHC.Internal.Enum.Enum GI.GLib.Enums.OptionError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.RegexError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.SeekType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.ShellError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.SliceConfig
instance GHC.Internal.Enum.Enum GI.GLib.Enums.SpawnError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TestFileType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TestLogType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TestResult
instance GHC.Internal.Enum.Enum GI.GLib.Enums.ThreadError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TimeType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TokenType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.TraverseType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UnicodeBreakType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UnicodeScript
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UnicodeType
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UnixPipeEnd
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UriError
instance GHC.Internal.Enum.Enum GI.GLib.Enums.UserDirectory
instance GHC.Internal.Enum.Enum GI.GLib.Enums.VariantClass
instance GHC.Internal.Enum.Enum GI.GLib.Enums.VariantParseError
instance GHC.Classes.Eq GI.GLib.Enums.BookmarkFileError
instance GHC.Classes.Eq GI.GLib.Enums.ChecksumType
instance GHC.Classes.Eq GI.GLib.Enums.ConvertError
instance GHC.Classes.Eq GI.GLib.Enums.DateDMY
instance GHC.Classes.Eq GI.GLib.Enums.DateMonth
instance GHC.Classes.Eq GI.GLib.Enums.DateWeekday
instance GHC.Classes.Eq GI.GLib.Enums.ErrorType
instance GHC.Classes.Eq GI.GLib.Enums.FileError
instance GHC.Classes.Eq GI.GLib.Enums.IOChannelError
instance GHC.Classes.Eq GI.GLib.Enums.IOError
instance GHC.Classes.Eq GI.GLib.Enums.IOStatus
instance GHC.Classes.Eq GI.GLib.Enums.KeyFileError
instance GHC.Classes.Eq GI.GLib.Enums.LogWriterOutput
instance GHC.Classes.Eq GI.GLib.Enums.MarkupError
instance GHC.Classes.Eq GI.GLib.Enums.NormalizeMode
instance GHC.Classes.Eq GI.GLib.Enums.NumberParserError
instance GHC.Classes.Eq GI.GLib.Enums.OnceStatus
instance GHC.Classes.Eq GI.GLib.Enums.OptionArg
instance GHC.Classes.Eq GI.GLib.Enums.OptionError
instance GHC.Classes.Eq GI.GLib.Enums.RegexError
instance GHC.Classes.Eq GI.GLib.Enums.SeekType
instance GHC.Classes.Eq GI.GLib.Enums.ShellError
instance GHC.Classes.Eq GI.GLib.Enums.SliceConfig
instance GHC.Classes.Eq GI.GLib.Enums.SpawnError
instance GHC.Classes.Eq GI.GLib.Enums.TestFileType
instance GHC.Classes.Eq GI.GLib.Enums.TestLogType
instance GHC.Classes.Eq GI.GLib.Enums.TestResult
instance GHC.Classes.Eq GI.GLib.Enums.ThreadError
instance GHC.Classes.Eq GI.GLib.Enums.TimeType
instance GHC.Classes.Eq GI.GLib.Enums.TokenType
instance GHC.Classes.Eq GI.GLib.Enums.TraverseType
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeBreakType
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeScript
instance GHC.Classes.Eq GI.GLib.Enums.UnicodeType
instance GHC.Classes.Eq GI.GLib.Enums.UnixPipeEnd
instance GHC.Classes.Eq GI.GLib.Enums.UriError
instance GHC.Classes.Eq GI.GLib.Enums.UserDirectory
instance GHC.Classes.Eq GI.GLib.Enums.VariantClass
instance GHC.Classes.Eq GI.GLib.Enums.VariantParseError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.BookmarkFileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ConvertError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.FileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.IOChannelError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.KeyFileError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.MarkupError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.NumberParserError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.OptionError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.RegexError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ShellError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.SpawnError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.ThreadError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.UriError
instance Data.GI.Base.GError.GErrorClass GI.GLib.Enums.VariantParseError
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Enums.NormalizeMode
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Enums.UnicodeBreakType
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Enums.UnicodeScript
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Enums.UnicodeType
instance GHC.Classes.Ord GI.GLib.Enums.BookmarkFileError
instance GHC.Classes.Ord GI.GLib.Enums.ChecksumType
instance GHC.Classes.Ord GI.GLib.Enums.ConvertError
instance GHC.Classes.Ord GI.GLib.Enums.DateDMY
instance GHC.Classes.Ord GI.GLib.Enums.DateMonth
instance GHC.Classes.Ord GI.GLib.Enums.DateWeekday
instance GHC.Classes.Ord GI.GLib.Enums.ErrorType
instance GHC.Classes.Ord GI.GLib.Enums.FileError
instance GHC.Classes.Ord GI.GLib.Enums.IOChannelError
instance GHC.Classes.Ord GI.GLib.Enums.IOError
instance GHC.Classes.Ord GI.GLib.Enums.IOStatus
instance GHC.Classes.Ord GI.GLib.Enums.KeyFileError
instance GHC.Classes.Ord GI.GLib.Enums.LogWriterOutput
instance GHC.Classes.Ord GI.GLib.Enums.MarkupError
instance GHC.Classes.Ord GI.GLib.Enums.NormalizeMode
instance GHC.Classes.Ord GI.GLib.Enums.NumberParserError
instance GHC.Classes.Ord GI.GLib.Enums.OnceStatus
instance GHC.Classes.Ord GI.GLib.Enums.OptionArg
instance GHC.Classes.Ord GI.GLib.Enums.OptionError
instance GHC.Classes.Ord GI.GLib.Enums.RegexError
instance GHC.Classes.Ord GI.GLib.Enums.SeekType
instance GHC.Classes.Ord GI.GLib.Enums.ShellError
instance GHC.Classes.Ord GI.GLib.Enums.SliceConfig
instance GHC.Classes.Ord GI.GLib.Enums.SpawnError
instance GHC.Classes.Ord GI.GLib.Enums.TestFileType
instance GHC.Classes.Ord GI.GLib.Enums.TestLogType
instance GHC.Classes.Ord GI.GLib.Enums.TestResult
instance GHC.Classes.Ord GI.GLib.Enums.ThreadError
instance GHC.Classes.Ord GI.GLib.Enums.TimeType
instance GHC.Classes.Ord GI.GLib.Enums.TokenType
instance GHC.Classes.Ord GI.GLib.Enums.TraverseType
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeBreakType
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeScript
instance GHC.Classes.Ord GI.GLib.Enums.UnicodeType
instance GHC.Classes.Ord GI.GLib.Enums.UnixPipeEnd
instance GHC.Classes.Ord GI.GLib.Enums.UriError
instance GHC.Classes.Ord GI.GLib.Enums.UserDirectory
instance GHC.Classes.Ord GI.GLib.Enums.VariantClass
instance GHC.Classes.Ord GI.GLib.Enums.VariantParseError
instance GHC.Internal.Show.Show GI.GLib.Enums.BookmarkFileError
instance GHC.Internal.Show.Show GI.GLib.Enums.ChecksumType
instance GHC.Internal.Show.Show GI.GLib.Enums.ConvertError
instance GHC.Internal.Show.Show GI.GLib.Enums.DateDMY
instance GHC.Internal.Show.Show GI.GLib.Enums.DateMonth
instance GHC.Internal.Show.Show GI.GLib.Enums.DateWeekday
instance GHC.Internal.Show.Show GI.GLib.Enums.ErrorType
instance GHC.Internal.Show.Show GI.GLib.Enums.FileError
instance GHC.Internal.Show.Show GI.GLib.Enums.IOChannelError
instance GHC.Internal.Show.Show GI.GLib.Enums.IOError
instance GHC.Internal.Show.Show GI.GLib.Enums.IOStatus
instance GHC.Internal.Show.Show GI.GLib.Enums.KeyFileError
instance GHC.Internal.Show.Show GI.GLib.Enums.LogWriterOutput
instance GHC.Internal.Show.Show GI.GLib.Enums.MarkupError
instance GHC.Internal.Show.Show GI.GLib.Enums.NormalizeMode
instance GHC.Internal.Show.Show GI.GLib.Enums.NumberParserError
instance GHC.Internal.Show.Show GI.GLib.Enums.OnceStatus
instance GHC.Internal.Show.Show GI.GLib.Enums.OptionArg
instance GHC.Internal.Show.Show GI.GLib.Enums.OptionError
instance GHC.Internal.Show.Show GI.GLib.Enums.RegexError
instance GHC.Internal.Show.Show GI.GLib.Enums.SeekType
instance GHC.Internal.Show.Show GI.GLib.Enums.ShellError
instance GHC.Internal.Show.Show GI.GLib.Enums.SliceConfig
instance GHC.Internal.Show.Show GI.GLib.Enums.SpawnError
instance GHC.Internal.Show.Show GI.GLib.Enums.TestFileType
instance GHC.Internal.Show.Show GI.GLib.Enums.TestLogType
instance GHC.Internal.Show.Show GI.GLib.Enums.TestResult
instance GHC.Internal.Show.Show GI.GLib.Enums.ThreadError
instance GHC.Internal.Show.Show GI.GLib.Enums.TimeType
instance GHC.Internal.Show.Show GI.GLib.Enums.TokenType
instance GHC.Internal.Show.Show GI.GLib.Enums.TraverseType
instance GHC.Internal.Show.Show GI.GLib.Enums.UnicodeBreakType
instance GHC.Internal.Show.Show GI.GLib.Enums.UnicodeScript
instance GHC.Internal.Show.Show GI.GLib.Enums.UnicodeType
instance GHC.Internal.Show.Show GI.GLib.Enums.UnixPipeEnd
instance GHC.Internal.Show.Show GI.GLib.Enums.UriError
instance GHC.Internal.Show.Show GI.GLib.Enums.UserDirectory
instance GHC.Internal.Show.Show GI.GLib.Enums.VariantClass
instance GHC.Internal.Show.Show GI.GLib.Enums.VariantParseError
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Enums.NormalizeMode
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Enums.UnicodeBreakType
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Enums.UnicodeScript
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Enums.UnicodeType

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

-- | Flags to pass to fileSetContentsFull to affect its safety and
--   performance.
--   
--   Since: 2.66
data FileSetContentsFlags

-- | No guarantees about file consistency or durability. The most dangerous
--   setting, which is slightly faster than other settings.
FileSetContentsFlagsNone :: FileSetContentsFlags

-- | Guarantee file consistency: after a crash, either the old version of
--   the file or the new version of the file will be available, but not a
--   mixture. On Unix systems this equates to an fsync() on the
--   file and use of an atomic rename() of the new version of the
--   file over the old.
FileSetContentsFlagsConsistent :: FileSetContentsFlags

-- | Guarantee file durability: after a crash, the new version of the file
--   will be available. On Unix systems this equates to an fsync()
--   on the file (if FileSetContentsFlagsConsistent is unset), or
--   the effects of FileSetContentsFlagsConsistent plus an
--   fsync() on the directory containing the file after calling
--   rename().
FileSetContentsFlagsDurable :: FileSetContentsFlags

-- | Only apply consistency and durability guarantees if the file already
--   exists. This may speed up file operations if the file doesn’t
--   currently exist, but may result in a corrupted version of the new file
--   if the system crashes while writing it.
FileSetContentsFlagsOnlyExisting :: FileSetContentsFlags

-- | Catch-all for unknown values
AnotherFileSetContentsFlags :: Int -> FileSetContentsFlags

-- | 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, ‘Mbit’ rather than ‘MB’.
FormatSizeFlagsBits :: FormatSizeFlags

-- | return only value, without unit; this should not be used together with
--   gFORMATSIZELONGFORMAT nor
--   gFORMATSIZEONLYUNIT. Since: 2.74
FormatSizeFlagsOnlyValue :: FormatSizeFlags

-- | return only unit, without value; this should not be used together with
--   gFORMATSIZELONGFORMAT nor
--   gFORMATSIZEONLYVALUE. Since: 2.74
FormatSizeFlagsOnlyUnit :: 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

-- | No description available in the introspection data.
HookFlagMaskReserved1 :: 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

-- | no special flags set. Since: 2.74
IOFlagsNone :: 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 logSetHandler and logSetFatalMask.
data LogLevelFlags

-- | internal flag
LogLevelFlagsFlagRecursion :: LogLevelFlags

-- | internal flag
LogLevelFlagsFlagFatal :: LogLevelFlags

-- | log level for errors, see GLib.error. This level is
--   also used for messages produced by GLib.assert.
LogLevelFlagsLevelError :: LogLevelFlags

-- | log level for critical warning messages, see
--   GLib.critical. This level is also used for messages
--   produced by GLib.return_if_fail and
--   GLib.return_val_if_fail.
LogLevelFlagsLevelCritical :: LogLevelFlags

-- | log level for warnings, see GLib.warning
LogLevelFlagsLevelWarning :: LogLevelFlags

-- | log level for messages, see GLib.message
LogLevelFlagsLevelMessage :: LogLevelFlags

-- | log level for informational messages, see GLib.info
LogLevelFlagsLevelInfo :: LogLevelFlags

-- | log level for debug messages, see GLib.debug
LogLevelFlagsLevelDebug :: LogLevelFlags

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

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

-- | Flags to pass to mainContextNewWithFlags which affect the
--   behaviour of a MainContext.
--   
--   Since: 2.72
data MainContextFlags

-- | Default behaviour.
MainContextFlagsNone :: MainContextFlags

-- | Assume that polling for events will free the thread to process other
--   jobs. That's useful if you're using
--   g_main_context_{prepare,query,check,dispatch} to integrate
--   GMainContext in other event loops.
MainContextFlagsOwnerlessPolling :: MainContextFlags

-- | Catch-all for unknown values
AnotherMainContextFlags :: Int -> MainContextFlags

-- | 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 MarkupCollectTypeOptional 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

-- | No special behaviour. Since: 2.74
MarkupParseFlagsDefaultFlags :: 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. i.e. False will be stored
--   into the argument rather than True.
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

-- | This flag marks the option as deprecated in the --help.
--   
--   You should update the description of the option to describe what the
--   user should do in response to the deprecation, for instance: remove
--   the option, or replace it with another one.
--   
--   Since: 2.84
OptionFlagsDeprecated :: OptionFlags

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

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

-- | No special options set. Since: 2.74
RegexCompileFlagsDefault :: 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
--   RegexCompileFlagsDollarEndonly is set). When
--   RegexCompileFlagsMultiline 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
--   RegexCompileFlagsMultiline 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

-- | Since 2.74 and the port to pcre2, requests JIT compilation, which, if
--   the just-in-time compiler is available, further processes a compiled
--   pattern into machine code that executes much faster. However, it comes
--   at the cost of extra processing before the match is performed, so it
--   is most beneficial to use this when the same compiled pattern is used
--   for matching many times. Before 2.74 this option used the built-in
--   non-JIT optimizations in pcre1.
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

-- | No description available in the introspection data.
RegexCompileFlagsNewlineReserved1 :: RegexCompileFlags

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

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

-- | No special options set. Since: 2.74
RegexMatchFlagsDefault :: 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 RegexCompileFlagsMultiline (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
--   RegexCompileFlagsMultiline (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 RegexMatchFlagsPartial. Since: 2.34
RegexMatchFlagsPartialSoft :: RegexMatchFlags

-- | Turns on the partial matching feature. In contrast to to
--   RegexMatchFlagsPartialSoft, 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 RegexMatchFlagsNotempty, 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 absolute 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

-- | The child will inherit the parent's standard output.
--   
--   Since: 2.74
SpawnFlagsChildInheritsStdout :: SpawnFlags

-- | The child will inherit the parent's standard error.
--   
--   Since: 2.74
SpawnFlagsChildInheritsStderr :: SpawnFlags

-- | The child's standard input is attached to /dev/null.
--   
--   Since: 2.74
SpawnFlagsStdinFromDevNull :: 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 behavior
--   of testTrapSubprocess is to not show stdout and stderr.
data TestSubprocessFlags

-- | Default behaviour. Since: 2.74
TestSubprocessFlagsDefault :: 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.
TestSubprocessFlagsInheritStdin :: 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
--   GLib.test_trap_assert_stdout.
TestSubprocessFlagsInheritStdout :: 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
--   GLib.test_trap_assert_stderr.
TestSubprocessFlagsInheritStderr :: TestSubprocessFlags

-- | If this flag is given, the child process will inherit the parent’s
--   open file descriptors.
TestSubprocessFlagsInheritDescriptors :: TestSubprocessFlags

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

-- | Flags to pass to testTrapFork to control input and output.
--   
--   Test traps are guards around forked tests. These flags determine what
--   traps to set.

-- | Deprecated: (Since version 2.38)GTestTrapFlags is used
--   only with testTrapFork,which is deprecated. Its replacement,
--   testTrapSubprocess
--   uses[flagsgLib.TestSubprocessFlags].
data TestTrapFlags

-- | Default behaviour. Since: 2.74
TestTrapFlagsDefault :: 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 nodeTraverse 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

-- | Flags that describe a URI.
--   
--   When parsing a URI, if you need to choose different flags based on the
--   type of URI, you can use uriPeekScheme on the URI string to
--   check the scheme first, and use that to decide what flags to parse it
--   with.
--   
--   Since: 2.66
data UriFlags

-- | No flags set.
UriFlagsNone :: UriFlags

-- | Parse the URI more relaxedly than the RFC 3986 grammar
--   specifies, fixing up or ignoring common mistakes in URIs coming from
--   external sources. This is also needed for some obscure URI schemes
--   where ; separates the host from the path. Don’t use this flag
--   unless you need to.
UriFlagsParseRelaxed :: UriFlags

-- | The userinfo field may contain a password, which will be separated
--   from the username by :.
UriFlagsHasPassword :: UriFlags

-- | The userinfo may contain additional authentication-related parameters,
--   which will be separated from the username and/or password by
--   ;.
UriFlagsHasAuthParams :: UriFlags

-- | When parsing a URI, this indicates that %-encoded characters
--   in the userinfo, path, query, and fragment fields should not be
--   decoded. (And likewise the host field if UriFlagsNonDns is also
--   set.) When building a URI, it indicates that you have already
--   %-encoded the components, and so Uri should not do any
--   encoding itself.
UriFlagsEncoded :: UriFlags

-- | The host component should not be assumed to be a DNS hostname or IP
--   address (for example, for smb URIs with NetBIOS hostnames).
UriFlagsNonDns :: UriFlags

-- | Same as UriFlagsEncoded, for the query field only.
UriFlagsEncodedQuery :: UriFlags

-- | Same as UriFlagsEncoded, for the path only.
UriFlagsEncodedPath :: UriFlags

-- | Same as UriFlagsEncoded, for the fragment only.
UriFlagsEncodedFragment :: UriFlags

-- | A scheme-based normalization will be applied. For example, when
--   parsing an HTTP URI changing omitted path to / and omitted
--   port to 80; and when building a URI, changing empty path to
--   / and default port 80). This only supports a subset
--   of known schemes. (Since: 2.68)
UriFlagsSchemeNormalize :: UriFlags

-- | Catch-all for unknown values
AnotherUriFlags :: Int -> UriFlags

-- | Flags describing what parts of the URI to hide in
--   uriToStringPartial. Note that UriHideFlagsPassword and
--   UriHideFlagsAuthParams will only work if the Uri was
--   parsed with the corresponding flags.
--   
--   Since: 2.66
data UriHideFlags

-- | No flags set.
UriHideFlagsNone :: UriHideFlags

-- | Hide the userinfo.
UriHideFlagsUserinfo :: UriHideFlags

-- | Hide the password.
UriHideFlagsPassword :: UriHideFlags

-- | Hide the auth_params.
UriHideFlagsAuthParams :: UriHideFlags

-- | Hide the query.
UriHideFlagsQuery :: UriHideFlags

-- | Hide the fragment.
UriHideFlagsFragment :: UriHideFlags

-- | Catch-all for unknown values
AnotherUriHideFlags :: Int -> UriHideFlags

-- | Flags modifying the way parameters are handled by
--   uriParseParams and UriParamsIter.
--   
--   Since: 2.66
data UriParamsFlags

-- | No flags set.
UriParamsFlagsNone :: UriParamsFlags

-- | Parameter names are case insensitive.
UriParamsFlagsCaseInsensitive :: UriParamsFlags

-- | Replace + with space character. Only useful for URLs on the
--   web, using the https or http schemas.
UriParamsFlagsWwwForm :: UriParamsFlags

-- | See UriFlagsParseRelaxed.
UriParamsFlagsParseRelaxed :: UriParamsFlags

-- | Catch-all for unknown values
AnotherUriParamsFlags :: Int -> UriParamsFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.GLib.Flags.IOCondition
instance GHC.Internal.Enum.Enum GI.GLib.Flags.AsciiType
instance GHC.Internal.Enum.Enum GI.GLib.Flags.FileSetContentsFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.FileTest
instance GHC.Internal.Enum.Enum GI.GLib.Flags.FormatSizeFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.HookFlagMask
instance GHC.Internal.Enum.Enum GI.GLib.Flags.IOCondition
instance GHC.Internal.Enum.Enum GI.GLib.Flags.IOFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.KeyFileFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.LogLevelFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.MainContextFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.MarkupCollectType
instance GHC.Internal.Enum.Enum GI.GLib.Flags.MarkupParseFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.OptionFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.RegexCompileFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.RegexMatchFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.SpawnFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.TestSubprocessFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.TestTrapFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.TraverseFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.UriFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.UriHideFlags
instance GHC.Internal.Enum.Enum GI.GLib.Flags.UriParamsFlags
instance GHC.Classes.Eq GI.GLib.Flags.AsciiType
instance GHC.Classes.Eq GI.GLib.Flags.FileSetContentsFlags
instance GHC.Classes.Eq GI.GLib.Flags.FileTest
instance GHC.Classes.Eq GI.GLib.Flags.FormatSizeFlags
instance GHC.Classes.Eq GI.GLib.Flags.HookFlagMask
instance GHC.Classes.Eq GI.GLib.Flags.IOCondition
instance GHC.Classes.Eq GI.GLib.Flags.IOFlags
instance GHC.Classes.Eq GI.GLib.Flags.KeyFileFlags
instance GHC.Classes.Eq GI.GLib.Flags.LogLevelFlags
instance GHC.Classes.Eq GI.GLib.Flags.MainContextFlags
instance GHC.Classes.Eq GI.GLib.Flags.MarkupCollectType
instance GHC.Classes.Eq GI.GLib.Flags.MarkupParseFlags
instance GHC.Classes.Eq GI.GLib.Flags.OptionFlags
instance GHC.Classes.Eq GI.GLib.Flags.RegexCompileFlags
instance GHC.Classes.Eq GI.GLib.Flags.RegexMatchFlags
instance GHC.Classes.Eq GI.GLib.Flags.SpawnFlags
instance GHC.Classes.Eq GI.GLib.Flags.TestSubprocessFlags
instance GHC.Classes.Eq GI.GLib.Flags.TestTrapFlags
instance GHC.Classes.Eq GI.GLib.Flags.TraverseFlags
instance GHC.Classes.Eq GI.GLib.Flags.UriFlags
instance GHC.Classes.Eq GI.GLib.Flags.UriHideFlags
instance GHC.Classes.Eq GI.GLib.Flags.UriParamsFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Flags.IOCondition
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.AsciiType
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.FileSetContentsFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.FileTest
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.FormatSizeFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.HookFlagMask
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.IOCondition
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.IOFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.KeyFileFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.LogLevelFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.MainContextFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.MarkupCollectType
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.MarkupParseFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.OptionFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.RegexCompileFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.RegexMatchFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.SpawnFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TestSubprocessFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TestTrapFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.TraverseFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.UriFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.UriHideFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.GLib.Flags.UriParamsFlags
instance GHC.Classes.Ord GI.GLib.Flags.AsciiType
instance GHC.Classes.Ord GI.GLib.Flags.FileSetContentsFlags
instance GHC.Classes.Ord GI.GLib.Flags.FileTest
instance GHC.Classes.Ord GI.GLib.Flags.FormatSizeFlags
instance GHC.Classes.Ord GI.GLib.Flags.HookFlagMask
instance GHC.Classes.Ord GI.GLib.Flags.IOCondition
instance GHC.Classes.Ord GI.GLib.Flags.IOFlags
instance GHC.Classes.Ord GI.GLib.Flags.KeyFileFlags
instance GHC.Classes.Ord GI.GLib.Flags.LogLevelFlags
instance GHC.Classes.Ord GI.GLib.Flags.MainContextFlags
instance GHC.Classes.Ord GI.GLib.Flags.MarkupCollectType
instance GHC.Classes.Ord GI.GLib.Flags.MarkupParseFlags
instance GHC.Classes.Ord GI.GLib.Flags.OptionFlags
instance GHC.Classes.Ord GI.GLib.Flags.RegexCompileFlags
instance GHC.Classes.Ord GI.GLib.Flags.RegexMatchFlags
instance GHC.Classes.Ord GI.GLib.Flags.SpawnFlags
instance GHC.Classes.Ord GI.GLib.Flags.TestSubprocessFlags
instance GHC.Classes.Ord GI.GLib.Flags.TestTrapFlags
instance GHC.Classes.Ord GI.GLib.Flags.TraverseFlags
instance GHC.Classes.Ord GI.GLib.Flags.UriFlags
instance GHC.Classes.Ord GI.GLib.Flags.UriHideFlags
instance GHC.Classes.Ord GI.GLib.Flags.UriParamsFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.AsciiType
instance GHC.Internal.Show.Show GI.GLib.Flags.FileSetContentsFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.FileTest
instance GHC.Internal.Show.Show GI.GLib.Flags.FormatSizeFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.HookFlagMask
instance GHC.Internal.Show.Show GI.GLib.Flags.IOCondition
instance GHC.Internal.Show.Show GI.GLib.Flags.IOFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.KeyFileFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.LogLevelFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.MainContextFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.MarkupCollectType
instance GHC.Internal.Show.Show GI.GLib.Flags.MarkupParseFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.OptionFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.RegexCompileFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.RegexMatchFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.SpawnFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.TestSubprocessFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.TestTrapFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.TraverseFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.UriFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.UriHideFlags
instance GHC.Internal.Show.Show GI.GLib.Flags.UriParamsFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Flags.IOCondition

-- | No description available in the introspection data.
module GI.GLib.Structs.Allocator

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

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
allocatorFree :: (HasCallStack, MonadIO m) => Allocator -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Allocator.Allocator
instance GHC.Classes.Eq GI.GLib.Structs.Allocator.Allocator
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Allocator.Allocator

-- | A simple reference counted data type representing an immutable
--   sequence of zero or more bytes from an unspecified origin.
--   
--   The purpose of a GBytes 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 GBytes without
--   coordinating their activities, resting assured that the byte data will
--   not change or move while they hold a reference.
--   
--   A GBytes 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.
--   
--   GBytes work well as keys in GHashTable. Use
--   bytesEqual and bytesHash as parameters to
--   GHashTable.new() or
--   GHashTable.new_full(). GBytes can also
--   be used as keys in a Tree by passing the bytesCompare
--   function to 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 GBytes sequence. To create an
--   immutable GBytes 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

-- | 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 GHashTable.new()
--   as the keyEqualFunc parameter, when using
--   non-NULL GBytes pointers as keys in a
--   GHashTable.
--   
--   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
--   GBytes.
--   
--   NULL may be returned if size is 0. This is
--   not guaranteed, as the GBytes may represent an empty string
--   with data non-NULL and size
--   as 0. NULL will not be returned if size is
--   non-zero.
--   
--   Since: 2.32
bytesGetData :: (HasCallStack, MonadIO m) => Bytes -> m (Maybe ByteString)

-- | Gets a pointer to a region in bytes.
--   
--   The region starts at offset many bytes from the start
--   of the data and contains nElements many elements of
--   elementSize size.
--   
--   nElements may be zero, but elementSize
--   must always be non-zero. Ideally, elementSize is a
--   static constant (eg: sizeof a struct).
--   
--   This function does careful bounds checking (including checking for
--   arithmetic overflows) and returns a non-NULL pointer if the
--   specified region lies entirely within the bytes. If
--   the region is in some way out of range, or if an overflow has
--   occurred, then NULL is returned.
--   
--   Note: it is possible to have a valid zero-size region. In this case,
--   the returned pointer will be equal to the base pointer of the data of
--   bytes, plus offset. This will be
--   non-NULL except for the case where bytes
--   itself was a zero-sized region. Since it is unlikely that you will be
--   using this function to check for a zero-sized region in a zero-sized
--   bytes, NULL effectively always means ‘error’.
--   
--   Since: 2.70
bytesGetRegion :: (HasCallStack, MonadIO m) => Bytes -> CSize -> CSize -> CSize -> m (Ptr ())

-- | Get the size of the byte data in the Bytes.
--   
--   This function will always return the same value for a given
--   GBytes.
--   
--   Since: 2.32
bytesGetSize :: (HasCallStack, MonadIO m) => Bytes -> m CSize

-- | Creates an integer hash code for the byte data in the Bytes.
--   
--   This function can be passed to GHashTable.new()
--   as the keyHashFunc parameter, when using
--   non-NULL GBytes pointers as keys in a
--   GHashTable.
--   
--   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 NULL.
--   
--   As an optimization, bytesNew may avoid an extra allocation by
--   copying the data within the resulting bytes structure if sufficiently
--   small (since GLib 2.84).
--   
--   Since: 2.32
bytesNew :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Bytes

-- | Creates a Bytes which is a subsection of another
--   GBytes.
--   
--   The offset + length may not be longer
--   than the size of bytes.
--   
--   A reference to bytes will be held by the newly created
--   GBytes 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 GBytes, then the
--   resulting GBytes will reference the same GBytes
--   instead of bytes. This allows consumers to simplify
--   the usage of GBytes when asynchronously writing to streams.
--   
--   Since: 2.32
bytesNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> CSize -> CSize -> m Bytes

-- | Creates a new Bytes from data.
--   
--   After this call, data belongs to the GBytes
--   and may no longer be modified by the caller. The memory of
--   data has to be dynamically allocated and will
--   eventually be freed with free.
--   
--   For creating GBytes with memory from other allocators, see
--   Bytes.new_with_free_func().
--   
--   data may be NULL 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
--   NULL, it will return immediately.
--   
--   Since: 2.32
bytesUnref :: (HasCallStack, MonadIO m) => Maybe 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 and the buffer was
--   larger than the size Bytes may internalize within its
--   allocation. In all other cases the data is copied.
--   
--   Do not use it if bytes contains more than
--   G_MAXUINT bytes. ByteArray stores the length of
--   its data in guint, which may be shorter than gsize,
--   that bytes is using.
--   
--   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 and the buffer was
--   larger than the size Bytes may internalize within its
--   allocation. In all other cases the data is copied.
--   
--   Since: 2.32
bytesUnrefToData :: (HasCallStack, MonadIO m) => Bytes -> m ByteString
instance GHC.Classes.Eq GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Bytes.Bytes)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Bytes.Bytes

-- | GLib provides a generic API for computing checksums (or ‘digests’) for
--   a sequence of arbitrary bytes, using various hashing algorithms like
--   MD5, SHA-1 and SHA-256. Checksums are commonly used in various
--   environments and specifications.
--   
--   To create a new GChecksum, use checksumNew. To free a
--   GChecksum, use checksumFree.
--   
--   GLib supports incremental checksums using the GChecksum data
--   structure, by calling checksumUpdate as long as there’s data
--   available and then using checksumGetString or
--   Checksum.get_digest() to compute the checksum
--   and return it either as a string in hexadecimal form, or as a raw
--   sequence of bytes. To compute the checksum for binary blobs and
--   nul-terminated strings in one go, use the convenience functions
--   computeChecksumForData and computeChecksumForString,
--   respectively.
--   
--   Since: 2.16
module GI.GLib.Structs.Checksum

-- | Memory-managed wrapper type.
newtype Checksum
Checksum :: ManagedPtr Checksum -> 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 a 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 (Maybe 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 GHC.Classes.Eq GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Checksum.Checksum)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Checksum.Checksum

-- | An opaque data structure that represents a keyed data list.
--   
--   See also: Keyed data lists.
module GI.GLib.Structs.Data

-- | Memory-managed wrapper type.
newtype Data
Data :: ManagedPtr Data -> Data
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Data.Data
instance GHC.Classes.Eq GI.GLib.Structs.Data.Data
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype 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

-- | 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.BoxedPtr GI.GLib.Structs.DebugKey.DebugKey
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.DebugKey.DebugKey
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.DebugKey.DebugKey tag
instance GHC.Classes.Eq GI.GLib.Structs.DebugKey.DebugKey
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.DebugKey.DebugKey

-- | An opaque structure representing an opened directory.
module GI.GLib.Structs.Dir

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

-- | Closes the directory immediately and decrements the reference count.
--   
--   Once the reference count reaches zero, the GDir structure
--   itself will be freed. Prior to GLib 2.80, GDir was not
--   reference counted.
--   
--   It is an error to call any of the GDir methods other than
--   dirRef and dirUnref on a GDir after calling
--   dirClose on it.
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]

-- | Opens a directory for reading. The names of the files in the directory
--   can then be retrieved using dirReadName. Note that the ordering
--   is not defined.
dirOpen :: (HasCallStack, MonadIO m) => Text -> Word32 -> m Dir

-- | 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]

-- | Increment the reference count of dir.
--   
--   Since: 2.80
dirRef :: (HasCallStack, MonadIO m) => Dir -> m Dir

-- | Resets the given directory. The next call to dirReadName will
--   return the first entry again.
dirRewind :: (HasCallStack, MonadIO m) => Dir -> m ()

-- | Decrements the reference count of dir.
--   
--   Once the reference count reaches zero, the directory will be closed
--   and all resources associated with it will be freed. If dirClose
--   is called when the reference count is greater than zero, the directory
--   is closed but the GDir structure will not be freed until its
--   reference count reaches zero.
--   
--   It is an error to call any of the GDir methods other than
--   dirRef and dirUnref on a GDir after calling
--   dirClose on it.
--   
--   Since: 2.80
dirUnref :: (HasCallStack, MonadIO m) => Dir -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Dir.Dir
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Dir.Dir
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Dir.Dir
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Dir.Dir)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Dir.Dir
instance Data.GI.Base.BasicTypes.TypedObject 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.
--   
--   The iteration order of a HashTableIter over the keys/values in
--   a hash table is not defined.
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

-- | Returns the HashTable associated with iter.
--   
--   Since: 2.16
hashTableIterGetHashTable :: (HasCallStack, MonadIO m) => HashTableIter -> m (Map (Ptr ()) (Ptr ()))

-- | Initializes a key/value pair iterator and associates it with
--   hashTable. Modifying the hash table after calling this
--   function invalidates the returned iterator.
--   
--   The iteration order of a HashTableIter over the keys/values in
--   a hash table is not defined.
--   
--   
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.BoxedPtr GI.GLib.Structs.HashTableIter.HashTableIter
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.HashTableIter.HashTableIter
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.HashTableIter.HashTableIter tag
instance GHC.Classes.Eq GI.GLib.Structs.HashTableIter.HashTableIter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.HashTableIter.HashTableIter

-- | HMACs should be used when producing a cookie or hash based on data and
--   a key. Simple mechanisms for using SHA1 and other algorithms to digest
--   a key and data together are vulnerable to various security issues.
--   HMAC uses algorithms like SHA1 in a secure way to produce a
--   digest of a key and data.
--   
--   Both the key and data are arbitrary byte arrays of bytes or
--   characters.
--   
--   Support for HMAC Digests has been added in GLib 2.30, and support for
--   SHA-512 in GLib 2.42. Support for SHA-384 was added in GLib 2.52.
--   
--   To create a new GHmac, use hmacNew. To free a
--   GHmac, use hmacUnref.
--   
--   Since: 2.30
module GI.GLib.Structs.Hmac

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

-- | Copies a Hmac. If hmac has been closed, by
--   calling hmacGetString or hmacGetDigest, the copied HMAC
--   will be closed as well.
--   
--   Since: 2.30
hmacCopy :: (HasCallStack, MonadIO m) => Hmac -> m 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 a 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

-- | Creates a new Hmac, using the digest algorithm
--   digestType. If the digestType is not
--   known, Nothing is returned. A Hmac can be used to
--   compute the HMAC of a key and an arbitrary binary blob, using
--   different hashing algorithms.
--   
--   A Hmac works by feeding a binary blob through hmacUpdate
--   until the data is complete; the digest can then be extracted using
--   hmacGetString, which will return the checksum as a hexadecimal
--   string; or hmacGetDigest, which will return a array of raw
--   bytes. Once either hmacGetString or hmacGetDigest have
--   been called on a Hmac, the HMAC will be closed and it won't be
--   possible to call hmacUpdate on it anymore.
--   
--   Support for digests of type ChecksumTypeSha512 has been added
--   in GLib 2.42. Support for ChecksumTypeSha384 was added in GLib
--   2.52.
--   
--   Since: 2.30
hmacNew :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> m (Maybe Hmac)

-- | Atomically increments the reference count of hmac by
--   one.
--   
--   This function is MT-safe and may be called from any thread.
--   
--   Since: 2.30
hmacRef :: (HasCallStack, MonadIO m) => Hmac -> m Hmac

-- | 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 GHC.Classes.Eq GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Hmac.Hmac)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Hmac.Hmac

-- | The GIOChannel data type aims to provide a portable method
--   for using file descriptors, pipes, and sockets, and integrating them
--   into the main event loop (see MainContext). Currently, full
--   support is available on UNIX platforms; support for Windows is only
--   partially complete.
--   
--   To create a new GIOChannel on UNIX systems use
--   iOChannelUnixNew. This works for plain file descriptors, pipes
--   and sockets. Alternatively, a channel can be created for a file in a
--   system independent manner using iOChannelNewFile.
--   
--   Once a GIOChannel has been created, it can be used in a
--   generic manner with the functions iOChannelReadChars,
--   iOChannelWriteChars, iOChannelSeekPosition, and
--   iOChannelShutdown.
--   
--   To add a GIOChannel to the main event loop, use
--   ioAddWatch or GLib.io_add_watch_full. Here you
--   specify which events you are interested in on the GIOChannel,
--   and provide a function to be called whenever these events occur.
--   
--   GIOChannel instances are created with an initial reference
--   count of 1. iOChannelRef and iOChannelUnref can be used
--   to increment or decrement the reference count respectively. When the
--   reference count falls to 0, the GIOChannel is freed. (Though
--   it isn’t closed automatically, unless it was created using
--   iOChannelNewFile.) Using ioAddWatch or
--   GLib.io_add_watch_full increments a channel’s
--   reference count.
--   
--   The new functions iOChannelReadChars, iOChannelReadLine,
--   IOChannel.read_line_string(),
--   iOChannelReadToEnd, iOChannelWriteChars,
--   iOChannelSeekPosition, and iOChannelFlush should not be
--   mixed with the deprecated functions iOChannelRead,
--   iOChannelWrite, and iOChannelSeek on the same channel.
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

-- | 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 CSize

-- | 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. Since 2.84, the return value is always nul-terminated.
iOChannelGetLineTerm :: (HasCallStack, MonadIO m) => IOChannel -> m (Text, Int32)

-- | 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 -> CSize -> CSize -> m IOError

-- | Replacement for iOChannelRead with the new API.
iOChannelReadChars :: (HasCallStack, MonadIO m) => IOChannel -> ByteString -> m (IOStatus, ByteString, CSize)

-- | 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, CSize, CSize)

-- | 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 -> CSize -> 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 -> CSize -> CSize -> 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, CSize)

-- | 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.IOChannel.IOChannel tag
instance GHC.Classes.Eq GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.IOChannel.IOChannel)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.IOChannel.IOChannel

-- | GKeyFile parses .ini-like config files.
--   
--   GKeyFile lets you parse, edit or create files containing
--   groups of key-value pairs, which we call ‘key files’ for lack of a
--   better name. Several freedesktop.org specifications use key files. For
--   example, the Desktop Entry Specification and the Icon Theme
--   Specification.
--   
--   The syntax of key files is described in detail in the Desktop Entry
--   Specification, here is a quick summary: Key files consists of
--   groups of key-value pairs, interspersed with comments.
--   
--   
txt code
--   
--   
--   # this is just an example
--   # there can be comments before the first group
--   
--   [First Group]
--   
--   Name=Key File Example\tthis value shows\nescaping
--   
--   # localized strings are stored in multiple key-value pairs
--   Welcome=Hello
--   Welcome[de]=Hallo
--   Welcome[fr_FR]=Bonjour
--   Welcome[it]=Ciao
--   
--   [Another Group]
--   
--   Numbers=2;20;-200;0
--   
--   Booleans=true;false;true;true
--   
--   
--   Lines beginning with a # and blank lines are considered
--   comments.
--   
--   Groups are started by a header line containing the group name enclosed
--   in [ and ], and ended implicitly by the start of the
--   next group or the end of the file. Each key-value pair must be
--   contained in a group.
--   
--   Key-value pairs generally have the form key=value, with the
--   exception of localized strings, which have the form
--   key[locale]=value, with a locale identifier of the form
--   lang_COUNTRY@MODIFIER where COUNTRY and
--   MODIFIER are optional. As a special case, the locale
--   C is associated with the untranslated pair key=value
--   (since GLib 2.84). Space before and after the = character is
--   ignored. Newline, tab, carriage return and backslash characters in
--   value are escaped as \n, \t, \r, and
--   \\\\, respectively. To preserve leading spaces in values,
--   these can also be escaped as \s.
--   
--   Key files can store strings (possibly with localized variants),
--   integers, booleans and lists of these. Lists are separated by a
--   separator character, typically ; or ,. To use the
--   list separator character in a value in a list, it has to be escaped by
--   prefixing it with a backslash.
--   
--   This syntax is obviously inspired by the .ini files commonly met on
--   Windows, but there are some important differences:
--   
--   
--   
- .ini files use the ; character to begin comments, key
--   files use the # character.
--   
- Key files do not allow for ungrouped keys meaning only comments
--   can precede the first group.
--   
- Key files are always encoded in UTF-8.
--   
- Key and Group names are case-sensitive. For example, a group
--   called [GROUP] is a different from [group].
--   
- .ini files don’t have a strongly typed boolean entry type, they
--   only have GetProfileInt(). In key files, only true
--   and false (in lower case) are allowed.
--   
--   
--   Note that in contrast to the Desktop Entry Specification,
--   groups in key files may contain the same key multiple times; the last
--   entry wins. Key files may also contain multiple groups with the same
--   name; they are merged together. Another difference is that keys and
--   group names in key files are not restricted to ASCII characters.
--   
--   Here is an example of loading a key file and reading a value:
--   
--   
c code
--   
--   
--   g_autoptr(GError) error = NULL;
--   g_autoptr(GKeyFile) key_file = g_key_file_new ();
--   
--   if (!g_key_file_load_from_file (key_file, "key-file.ini", flags, &error))
--     {
--       if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
--         g_warning ("Error loading key file: %s", error->message);
--       return;
--     }
--   
--   g_autofree gchar *val = g_key_file_get_string (key_file, "Group Name", "SomeKey", &error);
--   if (val == NULL &&
--       !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
--     {
--       g_warning ("Error finding key in key file: %s", error->message);
--       return;
--     }
--   else if (val == NULL)
--     {
--       // Fall back to a default value.
--       val = g_strdup ("default-value");
--     }
--   
--   
--   Here is an example of creating and saving a key file:
--   
--   
c code
--   
--   
--   g_autoptr(GKeyFile) key_file = g_key_file_new ();
--   const gchar *val = …;
--   g_autoptr(GError) error = NULL;
--   
--   g_key_file_set_string (key_file, "Group Name", "SomeKey", val);
--   
--   // Save as a file.
--   if (!g_key_file_save_to_file (key_file, "key-file.ini", &error))
--     {
--       g_warning ("Error saving key file: %s", error->message);
--       return;
--     }
--   
--   // Or store to a GBytes for use elsewhere.
--   gsize data_len;
--   g_autofree guint8 *data = (guint8 *) g_key_file_to_data (key_file, &data_len, &error);
--   if (data == NULL)
--     {
--       g_warning ("Error saving key file: %s", error->message);
--       return;
--     }
--   g_autoptr(GBytes) bytes = g_bytes_new_take (g_steal_pointer (&data), data_len);
--   
module GI.GLib.Structs.KeyFile

-- | Memory-managed wrapper type.
newtype KeyFile
KeyFile :: ManagedPtr KeyFile -> 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
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the value associated with key cannot be
--   interpreted as a boolean then
--   [errorgLib.KeyFileError.INVALID_VALUE] is returned.
--   
--   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
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the values associated with key cannot be
--   interpreted as booleans then
--   [errorgLib.KeyFileError.INVALID_VALUE] is returned.
--   
--   Since: 2.6
keyFileGetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Bool]

-- | Retrieves a comment above key from
--   groupName.
--   
--   If key is NULL then comment
--   will be read from above groupName. If both
--   key and groupName are NULL,
--   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 -> Maybe Text -> m Text

-- | Returns the value associated with key under
--   groupName as a double.
--   
--   If key cannot be found then
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the value associated with key cannot be
--   interpreted as a double then
--   [errorgLib.KeyFileError.INVALID_VALUE] is returned.
--   
--   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
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the values associated with key cannot be
--   interpreted as doubles then
--   [errorgLib.KeyFileError.INVALID_VALUE] is returned.
--   
--   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 NULL-terminated, so
--   length may optionally be NULL.
--   
--   Since: 2.6
keyFileGetGroups :: (HasCallStack, MonadIO m) => KeyFile -> m ([Text], CSize)

-- | 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
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the value associated with key cannot be
--   interpreted as an integer, or is out of range for a gint,
--   then [errorgLib.KeyFileError.INVALID_VALUE] is
--   returned.
--   
--   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
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned.
--   Likewise, if the values associated with key cannot be
--   interpreted as integers, or are out of range for gint, then
--   [errorgLib.KeyFileError.INVALID_VALUE] is returned.
--   
--   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 NULL-terminated, so
--   length may optionally be NULL. If the
--   groupName cannot be found,
--   [errorgLib.KeyFileError.GROUP_NOT_FOUND] is returned.
--   
--   Since: 2.6
keyFileGetKeys :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ([Text], CSize)

-- | 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 C then the untranslated value is
--   returned (since GLib 2.84).
--   
--   If locale is NULL then the current locale is
--   assumed.
--   
--   If locale is to be non-NULL, or if the
--   current locale will change over the lifetime of the KeyFile, it
--   must be loaded with
--   [flagsgLib.KeyFileFlags.KEEP_TRANSLATIONS] in order to
--   load strings for all locales.
--   
--   If key cannot be found then
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned. 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 C then the untranslated value is
--   returned (since GLib 2.84).
--   
--   If locale is NULL then the current locale is
--   assumed.
--   
--   If locale is to be non-NULL, or if the
--   current locale will change over the lifetime of the KeyFile, it
--   must be loaded with
--   [flagsgLib.KeyFileFlags.KEEP_TRANSLATIONS] in order to
--   load strings for all locales.
--   
--   If key cannot be found then
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned. 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 NULL-terminated, so
--   length may optionally be NULL.
--   
--   Since: 2.6
keyFileGetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m ([Text], CSize)

-- | Returns the name of the start group of the file.
--   
--   Since: 2.6
keyFileGetStartGroup :: (HasCallStack, MonadIO m) => KeyFile -> m (Maybe Text)

-- | Returns the string value associated with key under
--   groupName.
--   
--   Unlike keyFileGetValue, this function handles escape sequences
--   like \s.
--   
--   If the key cannot be found,
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned. If
--   the groupName cannot be found,
--   [errorgLib.KeyFileError.GROUP_NOT_FOUND] is returned.
--   
--   Since: 2.6
keyFileGetString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Text

-- | Returns the values associated with key under
--   groupName.
--   
--   If the key cannot be found,
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned. If
--   the groupName cannot be found,
--   [errorgLib.KeyFileError.GROUP_NOT_FOUND] is returned.
--   
--   Since: 2.6
keyFileGetStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ([Text], CSize)

-- | 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.
--   
--   If the key cannot be found,
--   [errorgLib.KeyFileError.KEY_NOT_FOUND] is returned. If
--   the groupName cannot be found,
--   [errorgLib.KeyFileError.GROUP_NOT_FOUND] is returned.
--   
--   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 a
--   [errorgLib.KeyFileError] is returned.
--   
--   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 a
--   [errorgLib.KeyFileError is returned.
--   
--   Since: 2.6
keyFileLoadFromData :: (HasCallStack, MonadIO m) => KeyFile -> Text -> CSize -> [KeyFileFlags] -> m ()

-- | Looks for a key file named file in the paths returned
--   from getUserDataDir and getSystemDataDirs.
--   
--   The search algorithm from keyFileLoadFromDirs is used. If
--   file is found, it’s loaded into
--   keyFile and its full path is returned in
--   fullPath.
--   
--   If the file could not be loaded then either a
--   [errorgLib.FileError] or
--   [errorgLib.KeyFileError] is returned.
--   
--   Since: 2.6
keyFileLoadFromDataDirs :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [KeyFileFlags] -> m [Char]

-- | 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.
--   
--   searchDirs are checked in the order listed in the
--   array, with the highest priority directory listed first. Within each
--   directory, file is looked for. If it’s not found,
--   - characters in file are progressively
--   replaced with directory separators to search subdirectories of the
--   search directory. If the file has not been found after all -
--   characters have been replaced, the next search directory in
--   searchDirs is checked.
--   
--   If the file could not be found in any of the
--   searchDirs,
--   [errorgLib.KeyFileError.NOT_FOUND] is returned. If the
--   file is found but the OS returns an error when opening or reading the
--   file, a [errorgLib.FileError] is returned. If there is
--   a problem parsing the file, a [errorgLib.KeyFileError]
--   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
--   [errorgLib.FileError] is returned. If there is a
--   problem parsing the file, a [errorgLib.KeyFileError]
--   is returned.
--   
--   This function will never return a
--   [errorgLib.KeyFileError.NOT_FOUND] error. If the
--   file is not found,
--   [errorgLib.FileError.NOENT] 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 NULL then comment
--   will be removed above groupName. If both
--   key and groupName are NULL,
--   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.
--   
--   If you need stricter guarantees about durability of the written file
--   than are provided by fileSetContents, use
--   fileSetContentsFull with the return value of
--   keyFileToData.
--   
--   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.
--   
--   Since: 2.6
keyFileSetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Bool] -> m ()

-- | Places a comment above key from
--   groupName.
--   
--   If key is NULL then comment
--   will be written above groupName. If both
--   key and groupName are NULL,
--   then comment will be written above the first group in
--   the file.
--   
--   Passing a non-existent groupName or
--   key to this function returns false and populates
--   error. (In contrast, passing a non-existent
--   group_name or key to keyFileSetString creates
--   the associated group name and key.)
--   
--   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.
--   
--   If locale is C then the untranslated value is
--   set (since GLib 2.84).
--   
--   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 locale is C then the untranslated value is
--   set (since GLib 2.84).
--   
--   If the translation for key cannot be found then it is
--   created.
--   
--   Since: 2.6
keyFileSetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> [Text] -> CSize -> 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] -> CSize -> 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 ()

-- | Outputs keyFile as a string.
--   
--   Note that this function never reports an error.
--   
--   Since: 2.6
keyFileToData :: (HasCallStack, MonadIO m) => KeyFile -> m (Text, CSize)

-- | 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 GHC.Classes.Eq GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.KeyFile.KeyFile)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.BasicTypes.TypedObject 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

-- | 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.BoxedPtr GI.GLib.Structs.LogField.LogField
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.LogField.LogField
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.LogField.LogField tag
instance GHC.Classes.Eq GI.GLib.Structs.LogField.LogField
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.LogField.LogField

-- | 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

-- | 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 (Maybe Text)

-- | Returns the length of the contents of a MappedFile.
--   
--   Since: 2.8
mappedFileGetLength :: (HasCallStack, MonadIO m) => MappedFile -> m CSize

-- | 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
--   FileErrorInval.
--   
--   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 GHC.Classes.Eq GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.MappedFile.MappedFile)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MappedFile.MappedFile

-- | No description available in the introspection data.
module GI.GLib.Structs.MemChunk

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

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkAlloc :: (HasCallStack, MonadIO m) => MemChunk -> m (Ptr ())

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkAlloc0 :: (HasCallStack, MonadIO m) => MemChunk -> m (Ptr ())

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkClean :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkDestroy :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkFree :: (HasCallStack, MonadIO m) => MemChunk -> Ptr () -> m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkInfo :: (HasCallStack, MonadIO m) => m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkPrint :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
memChunkReset :: (HasCallStack, MonadIO m) => MemChunk -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.MemChunk.MemChunk
instance GHC.Classes.Eq GI.GLib.Structs.MemChunk.MemChunk
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MemChunk.MemChunk

-- | 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

-- | 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
--   
--   
--   While location has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.14
onceInitEnter :: (HasCallStack, MonadIO m) => Ptr () -> m (Bool, Ptr ())

-- | No description available in the introspection data.
onceInitEnterImpl :: (HasCallStack, MonadIO m) => CSize -> m Bool

-- | This functions behaves in the same way as onceInitEnter, but
--   can can be used to initialize pointers (or guintptr)
--   instead of gsize.
--   
--   
C code
--   
--   
--   static MyStruct *interesting_struct = NULL;
--   
--   if (g_once_init_enter_pointer (&interesting_struct))
--     {
--       MyStruct *setup_value = allocate_my_struct (); // initialization code here
--   
--       g_once_init_leave_pointer (&interesting_struct, g_steal_pointer (&setup_value));
--     }
--   
--   // use interesting_struct here
--   
--   
--   Since: 2.80
onceInitEnterPointer :: (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.
--   
--   While location has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.14
onceInitLeave :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())

-- | Counterpart to onceInitEnterPointer. Expects a location of a
--   static NULL-initialized initialization variable, and an
--   initialization value other than NULL. Sets the variable to
--   the initialization value, and releases concurrent threads blocking in
--   onceInitEnterPointer on this initialization variable.
--   
--   This functions behaves in the same way as onceInitLeave, but
--   can be used to initialize pointers (or guintptr)
--   instead of gsize.
--   
--   Since: 2.80
onceInitLeavePointer :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> 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.BoxedPtr GI.GLib.Structs.Once.Once
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Once.Once
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Once.Once tag
instance GHC.Classes.Eq GI.GLib.Structs.Once.Once
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Once.Once

-- | 
--   
- OptionArgNone: gboolean
--   
- OptionArgString: gchar*
--   
- OptionArgInt: gint
--   
- OptionArgFilename: gchar*
--   
- OptionArgStringArray: gchar__
--   
- OptionArgFilenameArray: gchar__
--   
- OptionArgDouble: gdouble
--   
--   
--   If arg type is OptionArgString or
--   OptionArgFilename, the location will contain a newly allocated
--   string if the option was given. That string needs to be freed by the
--   callee using free. Likewise if arg type is
--   OptionArgStringArray or OptionArgFilenameArray, the data
--   should be freed using strfreev.
--   
--   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

-- | 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.BoxedPtr GI.GLib.Structs.OptionEntry.OptionEntry
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.OptionEntry.OptionEntry
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.OptionEntry.OptionEntry tag
instance GHC.Classes.Eq GI.GLib.Structs.OptionEntry.OptionEntry
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionEntry.OptionEntry

-- | GPathBuf is a helper type that allows you to easily build
--   paths from individual elements, using the platform specific
--   conventions for path separators.
--   
--   
c code
--   
--   
--   g_auto (GPathBuf) path;
--   
--   g_path_buf_init (&path);
--   
--   g_path_buf_push (&path, "usr");
--   g_path_buf_push (&path, "bin");
--   g_path_buf_push (&path, "echo");
--   
--   g_autofree char *echo = g_path_buf_to_path (&path);
--   g_assert_cmpstr (echo, ==, "/usr/bin/echo");
--   
--   
--   You can also load a full path and then operate on its components:
--   
--   
c code
--   
--   
--   g_auto (GPathBuf) path;
--   
--   g_path_buf_init_from_path (&path, "/usr/bin/echo");
--   
--   g_path_buf_pop (&path);
--   g_path_buf_push (&path, "sh");
--   
--   g_autofree char *sh = g_path_buf_to_path (&path);
--   g_assert_cmpstr (sh, ==, "/usr/bin/sh");
--   
--   
--   Since: 2.76
module GI.GLib.Structs.PathBuf

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

-- | Construct a PathBuf struct initialized to zero.
newZeroPathBuf :: MonadIO m => m PathBuf

-- | Clears the contents of the path buffer.
--   
--   This function should be use to free the resources in a stack-allocated
--   GPathBuf initialized using pathBufInit or
--   pathBufInitFromPath.
--   
--   Since: 2.76
pathBufClear :: (HasCallStack, MonadIO m) => PathBuf -> m ()

-- | Clears the contents of the path buffer and returns the built path.
--   
--   This function returns NULL if the GPathBuf is empty.
--   
--   See also: pathBufToPath
--   
--   Since: 2.76
pathBufClearToPath :: (HasCallStack, MonadIO m) => PathBuf -> m (Maybe [Char])

-- | Compares two path buffers for equality and returns TRUE if
--   they are equal.
--   
--   The paths inside the path buffers are not going to be normalized, so
--   X/Y/Z/A/.., X/./Y/Z and X/Y/Z are not going
--   to be considered equal.
--   
--   This function can be passed to g_hash_table_new() as
--   the key_equal_func parameter.
--   
--   Since: 2.76
pathBufEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Frees a GPathBuf allocated by
--   g_path_buf_new().
--   
--   Since: 2.76
pathBufFree :: (HasCallStack, MonadIO m) => PathBuf -> m ()

-- | Frees a GPathBuf allocated by
--   g_path_buf_new(), and returns the path inside the
--   buffer.
--   
--   This function returns NULL if the GPathBuf is empty.
--   
--   See also: pathBufToPath
--   
--   Since: 2.76
pathBufFreeToPath :: (HasCallStack, MonadIO m) => PathBuf -> m (Maybe [Char])

-- | Initializes a GPathBuf instance.
--   
--   Since: 2.76
pathBufInit :: (HasCallStack, MonadIO m) => PathBuf -> m PathBuf

-- | Initializes a GPathBuf instance with the given path.
--   
--   Since: 2.76
pathBufInitFromPath :: (HasCallStack, MonadIO m) => PathBuf -> Maybe [Char] -> m PathBuf

-- | Removes the last element of the path buffer.
--   
--   If there is only one element in the path buffer (for example,
--   / on Unix-like operating systems or the drive on Windows
--   systems), it will not be removed and False will be returned
--   instead.
--   
--   
C code
--   
--   
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&buf, "/bin/sh");
--   
--   g_path_buf_pop (&buf);
--   g_path_buf_init_from_path (&cmp, "/bin");
--   g_assert_true (g_path_buf_equal (&buf, &cmp));
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_pop (&buf);
--   g_path_buf_init_from_path (&cmp, "/");
--   g_assert_true (g_path_buf_equal (&buf, &cmp));
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_clear (&buf);
--   
--   
--   Since: 2.76
pathBufPop :: (HasCallStack, MonadIO m) => PathBuf -> m Bool

-- | Extends the given path buffer with path.
--   
--   If path is absolute, it replaces the current path.
--   
--   If path contains a directory separator, the buffer is
--   extended by as many elements the path provides.
--   
--   On Windows, both forward slashes and backslashes are treated as
--   directory separators. On other platforms, DIR_SEPARATOR_S is
--   the only directory separator.
--   
--   
C code
--   
--   
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&buf, "/tmp");
--   g_path_buf_push (&buf, ".X11-unix/X0");
--   g_path_buf_init_from_path (&cmp, "/tmp/.X11-unix/X0");
--   g_assert_true (g_path_buf_equal (&buf, &cmp));
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_push (&buf, "/etc/locale.conf");
--   g_path_buf_init_from_path (&cmp, "/etc/locale.conf");
--   g_assert_true (g_path_buf_equal (&buf, &cmp));
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_clear (&buf);
--   
--   
--   Since: 2.76
pathBufPush :: (HasCallStack, MonadIO m) => PathBuf -> [Char] -> m PathBuf

-- | Adds an extension to the file name in the path buffer.
--   
--   If extension is NULL, the extension will be
--   unset.
--   
--   If the path buffer does not have a file name set, this function
--   returns FALSE and leaves the path buffer unmodified.
--   
--   Since: 2.76
pathBufSetExtension :: (HasCallStack, MonadIO m) => PathBuf -> Maybe [Char] -> m Bool

-- | Sets the file name of the path.
--   
--   If the path buffer is empty, the filename is left unset and this
--   function returns FALSE.
--   
--   If the path buffer only contains the root element (on Unix-like
--   operating systems) or the drive (on Windows), this is the equivalent
--   of pushing the new fileName.
--   
--   If the path buffer contains a path, this is the equivalent of popping
--   the path buffer and pushing fileName, creating a
--   sibling of the original path.
--   
--   
C code
--   
--   
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&buf, "/");
--   
--   g_path_buf_set_filename (&buf, "bar");
--   g_path_buf_init_from_path (&cmp, "/bar");
--   g_assert_true (g_path_buf_equal (&buf, &cmp));
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_set_filename (&buf, "baz.txt");
--   g_path_buf_init_from_path (&cmp, "/baz.txt");
--   g_assert_true (g_path_buf_equal (&buf, &cmp);
--   g_path_buf_clear (&cmp);
--   
--   g_path_buf_clear (&buf);
--   
--   
--   Since: 2.76
pathBufSetFilename :: (HasCallStack, MonadIO m) => PathBuf -> [Char] -> m Bool

-- | Retrieves the built path from the path buffer.
--   
--   On Windows, the result contains backslashes as directory separators,
--   even if forward slashes were used in input.
--   
--   If the path buffer is empty, this function returns NULL.
--   
--   Since: 2.76
pathBufToPath :: (HasCallStack, MonadIO m) => PathBuf -> m (Maybe [Char])
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.PathBuf.PathBuf
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.PathBuf.PathBuf
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PathBuf.PathBuf tag
instance GHC.Classes.Eq GI.GLib.Structs.PathBuf.PathBuf
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PathBuf.PathBuf

-- | A GPatternSpec struct is the ‘compiled’ form of a glob-style
--   pattern.
--   
--   The patternMatchSimple and patternSpecMatch functions
--   match a string against a pattern containing * and ?
--   wildcards with similar semantics as the standard glob()
--   function: * matches an arbitrary, possibly empty, string,
--   ? matches an arbitrary character.
--   
--   Note that in contrast to `glob()`), the / character
--   can be matched by the wildcards, there are no […] character
--   ranges and * and ? can not be escaped to include
--   them literally in a pattern.
--   
--   When multiple strings must be matched against the same pattern, it is
--   better to compile the pattern to a PatternSpec using
--   patternSpecNew and use patternSpecMatchString instead of
--   patternMatchSimple. This avoids the overhead of repeated
--   pattern compilation.
module GI.GLib.Structs.PatternSpec

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

-- | Copies pspec in a new
--   [typegLib.PatternSpec].
--   
--   Since: 2.70
patternSpecCopy :: (HasCallStack, MonadIO m) => PatternSpec -> m 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
--   [typegLib.PatternSpec].
patternSpecFree :: (HasCallStack, MonadIO m) => PatternSpec -> m ()

-- | 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 NULL, this is more
--   efficient if the reversed version of the string to be matched is not
--   at hand, as patternSpecMatch 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 patternSpecMatch.
--   
--   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.
--   
--   Since: 2.70
patternSpecMatch :: (HasCallStack, MonadIO m) => PatternSpec -> CSize -> Text -> Maybe Text -> m Bool

-- | Matches a string against a compiled pattern.
--   
--   If the string is to be matched against more than one pattern, consider
--   using patternSpecMatch instead while supplying the reversed
--   string.
--   
--   Since: 2.70
patternSpecMatchString :: (HasCallStack, MonadIO m) => PatternSpec -> Text -> m Bool

-- | Compiles a pattern to a [typegLib.PatternSpec].
patternSpecNew :: (HasCallStack, MonadIO m) => Text -> m PatternSpec
instance GHC.Classes.Eq GI.GLib.Structs.PatternSpec.PatternSpec
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.PatternSpec.PatternSpec
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.PatternSpec.PatternSpec
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.PatternSpec.PatternSpec)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PatternSpec.PatternSpec
instance Data.GI.Base.BasicTypes.TypedObject 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

-- | Get the value of the “events” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get pollFD #events
--   
getPollFDEvents :: MonadIO m => PollFD -> m CUShort

-- | Set the value of the “events” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set pollFD [ #events := value ]
--   
setPollFDEvents :: MonadIO m => PollFD -> CUShort -> 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 CUShort

-- | Set the value of the “revents” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set pollFD [ #revents := value ]
--   
setPollFDRevents :: MonadIO m => PollFD -> CUShort -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PollFD.PollFD tag
instance GHC.Classes.Eq GI.GLib.Structs.PollFD.PollFD
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.PollFD.PollFD
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.PollFD.PollFD
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.PollFD.PollFD)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PollFD.PollFD
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.PollFD.PollFD

-- | Contains the public fields of a GPtrArray.
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

-- | 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PtrArray.PtrArray tag
instance GHC.Classes.Eq GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.PtrArray.PtrArray)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.PtrArray.PtrArray

-- | 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

-- | 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.
--   
--   Since: 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, the current
--   thread will block until the write lock was (held and) released. If
--   another thread does not hold the write lock, but is waiting for it, it
--   is implementation defined whether the reader or writer will block.
--   Read locks can be taken recursively.
--   
--   Calling rWLockReaderLock while the current thread already owns
--   a write lock leads to undefined behaviour. Read locks however can be
--   taken recursively, in which case you need to make sure to call
--   rWLockReaderUnlock the same amount of times.
--   
--   It is implementation-defined how many read locks are allowed to be
--   held 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 another thread
--   currently holds a read or write lock on rwLock, the
--   current thread will block until all other threads have dropped their
--   locks on rwLock.
--   
--   Calling rWLockWriterLock while the current thread already owns
--   a read or write lock on rwLock leads to undefined
--   behaviour.
--   
--   Since: 2.32
rWLockWriterLock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Tries to obtain a write lock on rwLock. If another
--   thread currently 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.BoxedPtr GI.GLib.Structs.RWLock.RWLock
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.RWLock.RWLock
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.RWLock.RWLock tag
instance GHC.Classes.Eq GI.GLib.Structs.RWLock.RWLock
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.RWLock.RWLock

-- | 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

-- | Copies a Rand into a new one with the same exact state as
--   before. This way you can take a snapshot of the random number
--   generator for replaying later.
--   
--   Since: 2.4
randCopy :: (HasCallStack, MonadIO m) => Rand -> m 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

-- | Creates a new random number generator initialized with a seed taken
--   either from /dev/urandom (if existing) or from the current
--   time (as a fallback).
--   
--   On Windows, the seed is taken from rand_s().
randNew :: (HasCallStack, MonadIO m) => m Rand

-- | Creates a new random number generator initialized with
--   seed.
randNewWithSeed :: (HasCallStack, MonadIO m) => Word32 -> m Rand

-- | Creates a new random number generator initialized with
--   seed.
--   
--   Since: 2.4
randNewWithSeedArray :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Rand

-- | 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 GHC.Classes.Eq GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Rand.Rand)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.BasicTypes.TypedObject 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

-- | 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.
--   
--   Since: 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.BoxedPtr GI.GLib.Structs.RecMutex.RecMutex
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.RecMutex.RecMutex
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.RecMutex.RecMutex tag
instance GHC.Classes.Eq GI.GLib.Structs.RecMutex.RecMutex
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.RecMutex.RecMutex

-- | A GRelation is a table of data which can be indexed on any
--   number of fields, rather like simple database tables. A
--   GRelation contains a number of records, called tuples. Each
--   record contains a number of fields. Records are not ordered, so it is
--   not possible to find the record at a particular index.
--   
--   Note that GRelation tables are currently limited to 2 fields.
--   
--   To create a GRelation, use
--   Relation.new().
--   
--   To specify which fields should be indexed, use
--   Relation.index(). Note that this must be called
--   before any tuples are added to the GRelation.
--   
--   To add records to a GRelation use
--   Relation.insert().
--   
--   To determine if a given record appears in a GRelation, use
--   Relation.exists(). Note that fields are
--   compared directly, so pointers must point to the exact same position
--   (i.e. different copies of the same string will not match.)
--   
--   To count the number of records which have a particular value in a
--   given field, use relationCount.
--   
--   To get all the records which have a particular value in a given field,
--   use Relation.select(). To access fields of the
--   resulting records, use tuplesIndex. To free the resulting
--   records use tuplesDestroy.
--   
--   To delete all records which have a particular value in a given field,
--   use relationDelete.
--   
--   To destroy the GRelation, use relationDestroy.
--   
--   To help debug GRelation objects, use relationPrint.
--   
--   GRelation has been marked as deprecated, since this API has
--   never been fully implemented, is not very actively maintained and
--   rarely used.
module GI.GLib.Structs.Relation

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

-- | Returns the number of tuples in a Relation that have the given
--   value in the given field.

-- | Deprecated: (Since version 2.26)Rarely used API
relationCount :: (HasCallStack, MonadIO m) => Relation -> Ptr () -> Int32 -> m Int32

-- | Deletes any records from a Relation that have the given key
--   value in the given field.

-- | Deprecated: (Since version 2.26)Rarely used API
relationDelete :: (HasCallStack, MonadIO m) => Relation -> Ptr () -> Int32 -> m Int32

-- | Destroys the Relation, freeing all memory allocated. However,
--   it does not free memory allocated for the tuple data, so you should
--   free that first if appropriate.

-- | Deprecated: (Since version 2.26)Rarely used API
relationDestroy :: (HasCallStack, MonadIO m) => Relation -> m ()

-- | Outputs information about all records in a Relation, as well as
--   the indexes. It is for debugging.

-- | Deprecated: (Since version 2.26)Rarely used API
relationPrint :: (HasCallStack, MonadIO m) => Relation -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Relation.Relation
instance GHC.Classes.Eq GI.GLib.Structs.Relation.Relation
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Relation.Relation

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.ScannerConfig.ScannerConfig
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.ScannerConfig.ScannerConfig
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ScannerConfig.ScannerConfig tag
instance GHC.Classes.Eq GI.GLib.Structs.ScannerConfig.ScannerConfig
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ScannerConfig.ScannerConfig

-- | A type corresponding to the appropriate struct type for the
--   stat() system call, depending on the platform and/or
--   compiler being used.
--   
--   See stat for more information.
module GI.GLib.Structs.StatBuf

-- | Memory-managed wrapper type.
newtype StatBuf
StatBuf :: ManagedPtr StatBuf -> StatBuf
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.StatBuf.StatBuf
instance GHC.Classes.Eq GI.GLib.Structs.StatBuf.StatBuf
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.StatBuf.StatBuf

-- | A GString is an object that handles the memory management of
--   a C string.
--   
--   The emphasis of GString is on text, typically UTF-8.
--   Crucially, the "str" member of a GString is guaranteed to
--   have a trailing nul character, and it is therefore always safe to call
--   functions such as strchr() or strdup() on it.
--   
--   However, a GString can also hold arbitrary binary data,
--   because it has a "len" member, which includes any possible embedded
--   nul characters in the data. Conceptually then, GString is
--   like a GByteArray with the addition of many convenience
--   methods for text, and a guaranteed nul terminator.
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

-- | 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, escaping
--   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

-- | Copies the String instance and its contents.
--   
--   This will preserve the allocation length of the String in the
--   copy.
--   
--   Since: 2.86
stringCopy :: (HasCallStack, MonadIO m) => String -> m String

-- | Converts a String to lowercase.

-- | Deprecated: (Since version 2.2)This function uses the
--   locale-specifictolower() 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.
--   
--   Instead of passing False to this function, consider using
--   stringFreeAndSteal.
stringFree :: (HasCallStack, MonadIO m) => String -> Bool -> m (Maybe Text)

-- | Frees the memory allocated for the String.
--   
--   The caller gains ownership of the buffer and must free it after use
--   with free.
--   
--   Since: 2.76
stringFreeAndSteal :: (HasCallStack, MonadIO m) => String -> m 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

-- | 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, initialized with the given string.
--   
--   After this call, init belongs to the String and
--   may no longer be modified by the caller. The memory of
--   init has to be dynamically allocated and will
--   eventually be freed with free.
--   
--   Since: 2.78
stringNewTake :: (HasCallStack, MonadIO m) => Maybe Text -> m String

-- | Overwrites part of a string, lengthening it if necessary.
--   
--   Since: 2.14
stringOverwrite :: (HasCallStack, MonadIO m) => String -> CSize -> 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 -> CSize -> 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

-- | Replaces the string find with the string
--   replace in a String up to limit
--   times. If the number of instances of find in the
--   String is less than limit, all instances are
--   replaced. If limit is 0, all instances of
--   find are replaced.
--   
--   If find is the empty string, since versions 2.69.1 and
--   2.68.4 the replacement will be inserted no more than once per possible
--   position (beginning of string, end of string and between characters).
--   This did not work correctly in earlier versions.
--   
--   If limit is zero and more than G_MAXUINT
--   instances of find are in the input string, they will
--   all be replaced, but the return value will be capped at
--   G_MAXUINT.
--   
--   Since: 2.68
stringReplace :: (HasCallStack, MonadIO m) => String -> Text -> Text -> Word32 -> m Word32

-- | 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 -> CSize -> 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) => CSize -> m String

-- | Cuts off the end of the GString, leaving the first len
--   bytes.
stringTruncate :: (HasCallStack, MonadIO m) => String -> CSize -> m String

-- | Converts a String to uppercase.

-- | Deprecated: (Since version 2.2)This function uses the
--   locale-specifictoupper() 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 CSize

-- | Set the value of the “allocated_len” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set string [ #allocatedLen := value ]
--   
setStringAllocatedLen :: MonadIO m => String -> CSize -> m ()

-- | Get the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get string #len
--   
getStringLen :: MonadIO m => String -> m CSize

-- | Set the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set string [ #len := value ]
--   
setStringLen :: MonadIO m => String -> CSize -> 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.String.String tag
instance GHC.Classes.Eq GI.GLib.Structs.String.String
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.String.String
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.String.String
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.String.String)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.String.String
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.String.String

-- | GStringChunk provides efficient storage of groups of strings
--   
--   String chunks are used to store groups of strings. Memory is allocated
--   in blocks, and as strings are added to the GStringChunk they
--   are copied into the next free position in a block. When a block is
--   full a new block is allocated.
--   
--   When storing a large number of strings, string chunks are more
--   efficient than using strdup since fewer calls to
--   malloc() are needed, and less memory is wasted in memory
--   allocation overheads.
--   
--   By adding strings with stringChunkInsertConst it is also
--   possible to remove duplicates.
--   
--   To create a new GStringChunk use
--   StringChunk.new().
--   
--   To add strings to a GStringChunk use
--   stringChunkInsert.
--   
--   To add strings to a GStringChunk, but without duplicating
--   strings which are already in the GStringChunk, use
--   stringChunkInsertConst.
--   
--   To free the entire GStringChunk use stringChunkFree.
--   It is not possible to free individual strings.
module GI.GLib.Structs.StringChunk

-- | Memory-managed wrapper type.
newtype StringChunk
StringChunk :: ManagedPtr StringChunk -> 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 ()

-- | 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.BoxedPtr GI.GLib.Structs.StringChunk.StringChunk
instance GHC.Classes.Eq GI.GLib.Structs.StringChunk.StringChunk
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.StringChunk.StringChunk

-- | GStrvBuilder is a helper object to build a
--   Nothing-terminated string arrays.
--   
--   The following example shows how to build a two element array:
--   
--   
c code
--   
--   
--   g_autoptr(GStrvBuilder) builder = g_strv_builder_new ();
--   g_strv_builder_add (builder, "hello");
--   g_strv_builder_add (builder, "world");
--   
--   g_auto(GStrv) array = g_strv_builder_end (builder);
--   
--   g_assert_true (g_strv_equal (array, (const char *[]) { "hello", "world", NULL }));
--   
--   
--   Since: 2.68
module GI.GLib.Structs.StrvBuilder

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

-- | Add a string to the end of the array.
--   
--   Since 2.68
strvBuilderAdd :: (HasCallStack, MonadIO m) => StrvBuilder -> Text -> m ()

-- | Appends all the strings in the given vector to the builder.
--   
--   Since 2.70
strvBuilderAddv :: (HasCallStack, MonadIO m) => StrvBuilder -> [Text] -> m ()

-- | Ends the builder process and returns the constructed NULL-terminated
--   string array. The returned value should be freed with strfreev
--   when no longer needed.
strvBuilderEnd :: (HasCallStack, MonadIO m) => StrvBuilder -> m [Text]

-- | Creates a new StrvBuilder with a reference count of 1. Use
--   strvBuilderUnref on the returned value when no longer needed.
--   
--   Since: 2.68
strvBuilderNew :: (HasCallStack, MonadIO m) => m StrvBuilder

-- | Atomically increments the reference count of builder
--   by one. This function is thread-safe and may be called from any
--   thread.
--   
--   Since: 2.68
strvBuilderRef :: (HasCallStack, MonadIO m) => StrvBuilder -> m StrvBuilder

-- | Add a string to the end of the array. After value
--   belongs to the StrvBuilder and may no longer be modified by the
--   caller.
--   
--   Since 2.80
strvBuilderTake :: (HasCallStack, MonadIO m) => StrvBuilder -> Text -> m ()

-- | Decreases the reference count on builder.
--   
--   In the event that there are no more references, releases all memory
--   associated with the StrvBuilder.
--   
--   Since: 2.68
strvBuilderUnref :: (HasCallStack, MonadIO m) => StrvBuilder -> m ()

-- | Decreases the reference count on the string vector builder, and
--   returns its contents as a NULL-terminated string array.
--   
--   This function is especially useful for cases where it's not possible
--   to use g_autoptr().
--   
--   
c code
--   
--   
--   GStrvBuilder *builder = g_strv_builder_new ();
--   g_strv_builder_add (builder, "hello");
--   g_strv_builder_add (builder, "world");
--   
--   GStrv array = g_strv_builder_unref_to_strv (builder);
--   
--   g_assert_true (g_strv_equal (array, (const char *[]) { "hello", "world", NULL }));
--   
--   g_strfreev (array);
--   
--   
--   Since: 2.82
strvBuilderUnrefToStrv :: (HasCallStack, MonadIO m) => StrvBuilder -> m [Text]
instance GHC.Classes.Eq GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.StrvBuilder.StrvBuilder)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.StrvBuilder.StrvBuilder

-- | An opaque structure representing a test case.
module GI.GLib.Structs.TestCase

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

-- | Free the testCase.
--   
--   Since: 2.70
testCaseFree :: (HasCallStack, MonadIO m) => TestCase -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.TestCase.TestCase
instance GHC.Classes.Eq GI.GLib.Structs.TestCase.TestCase
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype 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

-- | 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.BoxedPtr GI.GLib.Structs.TestConfig.TestConfig
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.TestConfig.TestConfig
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestConfig.TestConfig tag
instance GHC.Classes.Eq GI.GLib.Structs.TestConfig.TestConfig
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestConfig.TestConfig

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.TestLogBuffer.TestLogBuffer
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.TestLogBuffer.TestLogBuffer
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestLogBuffer.TestLogBuffer tag
instance GHC.Classes.Eq GI.GLib.Structs.TestLogBuffer.TestLogBuffer
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestLogBuffer.TestLogBuffer

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.TestLogMsg.TestLogMsg
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.TestLogMsg.TestLogMsg
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TestLogMsg.TestLogMsg tag
instance GHC.Classes.Eq GI.GLib.Structs.TestLogMsg.TestLogMsg
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestLogMsg.TestLogMsg

-- | An opaque structure representing a test suite.
module GI.GLib.Structs.TestSuite

-- | Memory-managed wrapper type.
newtype TestSuite
TestSuite :: ManagedPtr TestSuite -> 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 ()

-- | Frees the suite and all nested suites.
--   
--   Since: 2.70
testSuiteFree :: (HasCallStack, MonadIO m) => TestSuite -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.TestSuite.TestSuite
instance GHC.Classes.Eq GI.GLib.Structs.TestSuite.TestSuite
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestSuite.TestSuite

-- | 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 64-bit 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

-- | Adds the given number of microseconds to time_.
--   microseconds can also be negative to decrease the
--   value of time_.

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. Use guint64 forrepresenting microseconds
--   since the epoch, or use DateTime.
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.
--   
--   This function was deprecated, along with TimeVal itself, in
--   GLib 2.62. Equivalent functionality is available using code like:
--   
--   
--   GDateTime *dt = g_date_time_new_from_iso8601 (iso8601_string, NULL);
--   gint64 time_val = g_date_time_to_unix (dt);
--   g_date_time_unref (dt);
--   
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. UsedateTimeNewFromIso8601 instead.
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. Accordingly, since GLib 2.62, this function
--   has been deprecated. Equivalent functionality is available using:
--   
--   
--   GDateTime *dt = g_date_time_new_from_unix_utc (time_val);
--   iso8601_string = g_date_time_format_iso8601 (dt);
--   g_date_time_unref (dt);
--   
--   
--   The return value of timeValToIso8601 has been nullable since
--   GLib 2.54; before then, GLib would crash under the same conditions.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. Useg_date_time_format_iso8601(dt) instead.
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.BoxedPtr GI.GLib.Structs.TimeVal.TimeVal
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.TimeVal.TimeVal
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TimeVal.TimeVal tag
instance GHC.Classes.Eq GI.GLib.Structs.TimeVal.TimeVal
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TimeVal.TimeVal

-- | GDate is a struct for calendrical calculations.
--   
--   The GDate data structure represents a day between January 1,
--   Year 1, and sometime a few thousand years in the future (right now it
--   will go to the year 65535 or so, but dateSetParse only parses
--   up to the year 8000 or so - just count on "a few thousand").
--   GDate is meant to represent everyday dates, not astronomical
--   dates or historical dates or ISO timestamps or the like. It
--   extrapolates the current Gregorian calendar forward and backward in
--   time; there is no attempt to change the calendar to match time periods
--   or locations. GDate does not store time information; it
--   represents a day.
--   
--   The GDate implementation has several nice features; it is
--   only a 64-bit struct, so storing large numbers of dates is very
--   efficient. It can keep both a Julian and day-month-year representation
--   of the date, since some calculations are much easier with one
--   representation or the other. A Julian representation is simply a count
--   of days since some fixed day in the past; for Date the fixed
--   day is January 1, 1 AD. ("Julian" dates in the Date API aren't
--   really Julian dates in the technical sense; technically, Julian dates
--   count from the start of the Julian period, Jan 1, 4713 BC).
--   
--   GDate is simple to use. First you need a "blank" date; you
--   can get a dynamically allocated date from dateNew, or you can
--   declare an automatic variable or array and initialize it by calling
--   dateClear. A cleared date is safe; it's safe to call
--   dateSetDmy and the other mutator functions to initialize the
--   value of a cleared date. However, a cleared date is initially invalid,
--   meaning that it doesn't represent a day that exists. It is undefined
--   to call any of the date calculation routines on an invalid date. If
--   you obtain a date from a user or other unpredictable source, you
--   should check its validity with the dateValid predicate.
--   dateValid is also used to check for errors with
--   dateSetParse and other functions that can fail. Dates can be
--   invalidated by calling dateClear again.
--   
--   It is very important to use the API to access the GDate
--   struct. Often only the day-month-year or only the Julian
--   representation is valid. Sometimes neither is valid. Use the API.
--   
--   GLib also features GDateTime which represents a precise time.
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

-- | 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 safe 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

-- | Calculates the week of the year during which this date falls.
--   
--   The result depends on which day is considered the first day of the
--   week, which varies by locale. Both date and
--   first_day_of_week must be valid.
--   
--   If date is before the start of the first week of the
--   year (for example, before the first Monday in January if
--   firstDayOfWeek is DateWeekdayMonday) then zero
--   will be returned.
--   
--   Since: 2.86
dateGetWeekOfYear :: (HasCallStack, MonadIO m) => Date -> DateWeekday -> m Word32

-- | Returns the day of the week for a Date. The date must be valid.
dateGetWeekday :: (HasCallStack, MonadIO m) => Date -> m DateWeekday

-- | Calculates the number of weeks in the year.
--   
--   The result depends on which day is considered the first day of the
--   week, which varies by locale. first_day_of_week must be
--   valid.
--   
--   The result will be either 52 or 53. Years always have 52 seven-day
--   periods, plus one or two extra days depending on whether it’s a leap
--   year. This function effectively calculates how many
--   firstDayOfWeek days there are in the year.
--   
--   Since: 2.86
dateGetWeeksInYear :: (HasCallStack, MonadIO m) => Word16 -> DateWeekday -> m Word8

-- | 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 safe 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

-- | Create a new Date representing the given day-month-year
--   triplet.
--   
--   The triplet you pass in must represent a valid date. Use
--   dateValidDmy if needed to validate it. The returned Date
--   is guaranteed to be non-Nothing and valid.
dateNewDmy :: (HasCallStack, MonadIO m) => Word8 -> DateMonth -> Word16 -> m Date

-- | Create a new Date representing the given Julian date.
--   
--   The julianDay you pass in must be valid. Use
--   dateValidJulian if needed to validate it. The returned
--   Date is guaranteed to be non-Nothing and 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 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 -> CTime -> 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

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. Use dateSetTimeTinstead.
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-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 -> CSize -> Text -> Date -> m CSize

-- | 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 safe 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Date.Date tag
instance GHC.Classes.Eq GI.GLib.Structs.Date.Date
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Date.Date
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Date.Date
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Date.Date)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Date.Date
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Date.Date

-- | A GTimeZone represents a time zone, at no particular point in
--   time.
--   
--   The GTimeZone struct is refcounted and immutable.
--   
--   Each time zone has an identifier (for example, ‘Europe/London’) which
--   is platform dependent. See timeZoneNew for information on the
--   identifier formats. The identifier of a time zone can be retrieved
--   using timeZoneGetIdentifier.
--   
--   A time zone contains a number of intervals. Each interval has an
--   abbreviation to describe it (for example, ‘PDT’), an offset to UTC and
--   a flag indicating if the daylight savings time is in effect during
--   that interval. A time zone always has at least one interval — interval
--   0. Note that interval abbreviations are not the same as time zone
--   identifiers (apart from ‘UTC’), and cannot be passed to
--   timeZoneNew.
--   
--   Every UTC time is contained within exactly one interval, but a given
--   local time may be contained within zero, one or two intervals (due to
--   incontinuities associated with daylight savings time).
--   
--   An interval may refer to a specific period of time (eg: the duration
--   of daylight savings time during 2010) or it may refer to many periods
--   of time that share the same properties (eg: all periods of daylight
--   savings time). It is also possible (usually for political reasons)
--   that some properties (like the abbreviation) change between intervals
--   without other properties changing.
--   
--   Since: 2.26
module GI.GLib.Structs.TimeZone

-- | Memory-managed wrapper type.
newtype TimeZone
TimeZone :: ManagedPtr TimeZone -> 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, Int64)

-- | Finds an 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

-- | A version of timeZoneNewIdentifier which returns the UTC time
--   zone if identifier could not be parsed or loaded.
--   
--   If you need to check whether identifier was loaded
--   successfully, use timeZoneNewIdentifier.
--   
--   Since: 2.26

-- | Deprecated: (Since version 2.68)Use timeZoneNewIdentifier
--   instead, as it provideserror reporting. Change your code to handle a
--   potentially Nothing returnvalue.
timeZoneNew :: (HasCallStack, MonadIO m) => Maybe Text -> m TimeZone

-- | Creates a TimeZone corresponding to identifier.
--   If identifier cannot be parsed or loaded,
--   Nothing is returned.
--   
--   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, an absolute path to a
--   file somewhere else, or a 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.68
timeZoneNewIdentifier :: (HasCallStack, MonadIO m) => Maybe Text -> m (Maybe 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]].
--   
--   It is possible for this function to fail if seconds is
--   too big (greater than 24 hours), in which case this function will
--   return the UTC timezone for backwards compatibility. To detect
--   failures like this, use timeZoneNewIdentifier directly.
--   
--   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 GHC.Classes.Eq GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.TimeZone.TimeZone)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.TimeZone.TimeZone

-- | GDateTime is a structure that combines a Gregorian date and
--   time into a single structure.
--   
--   GDateTime provides many conversion and methods to manipulate
--   dates and times. Time precision is provided down to microseconds and
--   the time can range (proleptically) from 0001-01-01 00:00:00 to
--   9999-12-31 23:59:59.999999. GDateTime follows POSIX time in
--   the sense that it is oblivious to leap seconds.
--   
--   GDateTime is an immutable object; once it has been created it
--   cannot be modified further. All modifiers will create a new
--   GDateTime. Nearly all such functions can fail due to the date
--   or time going out of range, in which case Nothing will be
--   returned.
--   
--   GDateTime is reference counted: the reference count is
--   increased by calling dateTimeRef and decreased by calling
--   dateTimeUnref. When the reference count drops to 0, the
--   resources allocated by the GDateTime structure are released.
--   
--   Many parts of the API may produce non-obvious results. As an example,
--   adding two months to January 31st will yield March 31st whereas adding
--   one month and then one month again will yield either March 28th or
--   March 29th. Also note that adding 24 hours is not always the same as
--   adding one day (since days containing daylight savings time
--   transitions are either 23 or 25 hours in length).
--   
--   Since: 2.26
module GI.GLib.Structs.DateTime

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

-- | Creates a copy of datetime and adds the specified
--   timespan to the copy.
--   
--   Since: 2.26
dateTimeAdd :: (HasCallStack, MonadIO m) => DateTime -> Int64 -> m (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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) => DateTime -> DateTime -> 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) => DateTime -> DateTime -> 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.
--   The Python extension %f is also supported.
--   
--   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); single digits are preceded by a figure space (U+2007)
--   
- %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 figure space (U+2007)
--   
- %l: the hour (12-hour clock) as a decimal number (range 1
--   to 12); single digits are preceded by a figure space (U+2007)
--   
- %m: the month as a decimal number (range 01 to 12)
--   
- %M: the minute as a decimal number (range 00 to 59)
--   
- %f: the microsecond as a decimal number (range 000000 to
--   999999)
--   
- %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’. Use of this format specifier is
--   discouraged, as many locales have no concept of AM/PM formatting. Use
--   %c or %X instead.
--   
- %P: like %p but lowercase: ‘am’ or ‘pm’ or a
--   corresponding string for the current locale. Use of this format
--   specifier is discouraged, as many locales have no concept of AM/PM
--   formatting. Use %c or %X instead.
--   
- %r: the time in a.m. or p.m. notation. Use of this format
--   specifier is discouraged, as many locales have no concept of AM/PM
--   formatting. Use %c or %X instead.
--   
- %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.
--   
--   
--   The following modifiers are supported for many of the alphabetic
--   conversions:
--   
--   
--   
- ^: Use upper case if possible. This is a gnulib
--   strftime() extension. Since: 2.80
--   
- #: Use opposite case if possible. This is a gnulib
--   strftime() extension. Since: 2.80
--   
--   
--   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 GLib 2.80, when E is used with %c,
--   %C, %x, %X, %y or %Y, the
--   date is formatted using an alternate era representation specific to
--   the locale. This is typically used for the Thai solar calendar or
--   Japanese era names, for example.
--   
--   
--   
- %Ec: the preferred date and time representation for the
--   current locale, using the alternate era representation
--   
- %EC: the name of the era
--   
- %Ex: the preferred date representation for the current
--   locale without the time, using the alternate era representation
--   
- %EX: the preferred time representation for the current
--   locale without the date, using the alternate era representation
--   
- %Ey: the year since the beginning of the era denoted by
--   the %EC specifier
--   
- %EY: the full alternative year representation
--   
--   
--   Since: 2.26
dateTimeFormat :: (HasCallStack, MonadIO m) => DateTime -> Text -> m (Maybe Text)

-- | Format datetime in ISO 8601 format, including
--   the date, time and time zone, and return that as a UTF-8 encoded
--   string.
--   
--   Since GLib 2.66, this will output to sub-second precision if needed.
--   
--   Since: 2.62
dateTimeFormatIso8601 :: (HasCallStack, MonadIO m) => DateTime -> m (Maybe 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) => DateTime -> 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 (Maybe 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, with some extensions from RFC 3339 as mentioned
--   below.
--   
--   Note that as DateTime "is oblivious to leap seconds", leap
--   seconds information in an ISO-8601 string will be ignored, so a
--   23:59:60 time would be parsed as 23:59:59.
--   
--   <sep> is the separator and can be either 'T', 't' or '
--   '. The latter two separators are an extension from RFC 3339.
--   
--   <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

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. UsedateTimeNewFromUnixLocal instead.
dateTimeNewFromTimevalLocal :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe 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

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. UsedateTimeNewFromUnixUtc instead.
dateTimeNewFromTimevalUtc :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe 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 (Maybe DateTime)

-- | Creates a DateTime corresponding to the given Unix time
--   t in the local time zone.
--   
--   Unix time is the number of microseconds that have elapsed since
--   1970-01-01 00:00:00 UTC, regardless of the local time offset.
--   
--   This call can fail (returning NULL) 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.80
dateTimeNewFromUnixLocalUsec :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe 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 (Maybe DateTime)

-- | Creates a DateTime corresponding to the given Unix time
--   t in UTC.
--   
--   Unix time is the number of microseconds that have elapsed since
--   1970-01-01 00:00:00 UTC.
--   
--   This call can fail (returning NULL) 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.80
dateTimeNewFromUnixUtcUsec :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe 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 (Maybe 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 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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 (Maybe 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

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. UsedateTimeToUnix instead.
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).
--   
--   Since: 2.26
dateTimeToTimezone :: (HasCallStack, MonadIO m) => DateTime -> TimeZone -> m (Maybe 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

-- | Gives the Unix time corresponding to datetime, in
--   microseconds.
--   
--   Unix time is the number of microseconds that have elapsed since
--   1970-01-01 00:00:00 UTC, regardless of the time zone associated with
--   datetime.
--   
--   Since: 2.80
dateTimeToUnixUsec :: (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 (Maybe 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 GHC.Classes.Eq GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.DateTime.DateTime)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.DateTime.DateTime

-- | GBookmarkFile lets you parse, edit or create files containing
--   bookmarks.
--   
--   Bookmarks refer to a URI, along with some meta-data about the resource
--   pointed by the URI like its MIME type, the application that is
--   registering the bookmark and the icon that should be used to represent
--   the bookmark. The data is stored using the Desktop Bookmark
--   Specification.
--   
--   The syntax of the bookmark files is described in detail inside the
--   Desktop Bookmark Specification, here is a quick summary: bookmark
--   files use a sub-class of the XML Bookmark Exchange Language
--   specification, consisting of valid UTF-8 encoded XML, under the
--   <xbel> root element; each bookmark is stored inside a
--   <bookmark> element, using its URI: no relative paths
--   can be used inside a bookmark file. The bookmark may have a user
--   defined title and description, to be used instead of the URI. Under
--   the <metadata> element, with its owner attribute set to
--   http://freedesktop.org, is stored the meta-data about a
--   resource pointed by its URI. The meta-data consists of the resource's
--   MIME type; the applications that have registered a bookmark; the
--   groups to which a bookmark belongs to; a visibility flag, used to set
--   the bookmark as "private" to the applications and groups that has it
--   registered; the URI and MIME type of an icon, to be used when
--   displaying the bookmark inside a GUI.
--   
--   Here is an example of a bookmark file: bookmarks.xbel
--   
--   A bookmark file might contain more than one bookmark; each bookmark is
--   accessed through its URI.
--   
--   The important caveat of bookmark files is that when you add a new
--   bookmark you must also add the application that is registering it,
--   using bookmarkFileAddApplication or
--   bookmarkFileSetApplicationInfo. If a bookmark has no
--   applications then it won't be dumped when creating the on disk
--   representation, using bookmarkFileToData or
--   bookmarkFileToFile.
--   
--   Since: 2.12
module GI.GLib.Structs.BookmarkFile

-- | Memory-managed wrapper type.
newtype BookmarkFile
BookmarkFile :: ManagedPtr BookmarkFile -> 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 ()

-- | Deeply copies a bookmark BookmarkFile object to
--   a new one.
--   
--   Since: 2.76
bookmarkFileCopy :: (HasCallStack, MonadIO m) => BookmarkFile -> m BookmarkFile

-- | 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 BookmarkFileErrorUriNotFound.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileGetAddedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileGetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CTime

-- | Gets the time the bookmark for uri was added to
--   bookmark
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to BookmarkFileErrorUriNotFound.
--   
--   Since: 2.66
bookmarkFileGetAddedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m DateTime

-- | Gets the registration information of appName for the
--   bookmark for uri. See
--   bookmarkFileSetApplicationInfo 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 BookmarkFileErrorUriNotFound.
--   In the event that no application with name appName has
--   registered a bookmark for uri, False is
--   returned and error is set to BookmarkFileErrorAppNotRegistered.
--   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

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileGetApplicationInfo instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileGetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, CTime)

-- | Gets the registration information of appName for the
--   bookmark for uri. See
--   bookmarkFileSetApplicationInfo 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 BookmarkFileErrorUriNotFound.
--   In the event that no application with name appName has
--   registered a bookmark for uri, False is
--   returned and error is set to BookmarkFileErrorAppNotRegistered.
--   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.66
bookmarkFileGetApplicationInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, DateTime)

-- | 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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   In the event that the private flag cannot be found, False is
--   returned and error is set to
--   BookmarkFileErrorInvalidValue.
--   
--   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 BookmarkFileErrorUriNotFound.
--   In the event that the MIME type cannot be found, Nothing is
--   returned and error is set to
--   BookmarkFileErrorInvalidValue.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileGetModifiedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileGetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CTime

-- | Gets the time when the bookmark for uri was last
--   modified.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to BookmarkFileErrorUriNotFound.
--   
--   Since: 2.66
bookmarkFileGetModifiedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m DateTime

-- | 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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileGetVisitedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileGetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CTime

-- | Gets the time the bookmark for uri was last visited.
--   
--   In the event the URI cannot be found, Nothing is returned and
--   error is set to BookmarkFileErrorUriNotFound.
--   
--   Since: 2.66
bookmarkFileGetVisitedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m DateTime

-- | 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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   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 BookmarkFileErrorUriNotFound.
--   
--   Since: 2.12
bookmarkFileMoveItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> m ()

-- | Creates a new empty BookmarkFile object.
--   
--   Use bookmarkFileLoadFromFile, bookmarkFileLoadFromData
--   or bookmarkFileLoadFromDataDirs to read an existing bookmark
--   file.
--   
--   Since: 2.12
bookmarkFileNew :: (HasCallStack, MonadIO m) => m BookmarkFile

-- | 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 BookmarkFileErrorUriNotFound.
--   In the event that no application with name appName has
--   registered a bookmark for uri, False is
--   returned and error is set to BookmarkFileErrorAppNotRegistered.
--   
--   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 BookmarkFileErrorUriNotFound.
--   In the event no group was defined, False is returned and
--   error is set to BookmarkFileErrorInvalidValue.
--   
--   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

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileSetAddedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileSetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CTime -> 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.66
bookmarkFileSetAddedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> 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
--   bookmarkFileGetApplicationInfo 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
--   BookmarkFileErrorUriNotFound; similarly, in the event that no
--   application name has registered a bookmark for
--   uri, False is returned and error is set to
--   BookmarkFileErrorAppNotRegistered. Otherwise, if no bookmark
--   for uri is found, one is created.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileSetApplicationInfo instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileSetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> CTime -> 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
--   bookmarkFileGetApplicationInfo 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 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
--   BookmarkFileErrorUriNotFound; similarly, in the event that no
--   application name has registered a bookmark for
--   uri, False is returned and error is set to
--   BookmarkFileErrorAppNotRegistered. Otherwise, if no bookmark
--   for uri is found, one is created.
--   
--   Since: 2.66
bookmarkFileSetApplicationInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> Maybe DateTime -> 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
--   bookmarkFileSetVisitedDateTime.
--   
--   Since: 2.12

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileSetModifiedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileSetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CTime -> 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
--   bookmarkFileSetVisitedDateTime.
--   
--   Since: 2.66
bookmarkFileSetModifiedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> 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
--   bookmarkFileGetApplicationInfo 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

-- | Deprecated: (Since version 2.66)Use
--   bookmarkFileSetVisitedDateTime instead, astime_t is
--   deprecated due to the year 2038 problem.
bookmarkFileSetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CTime -> 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
--   bookmarkFileGetApplicationInfo 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.66
bookmarkFileSetVisitedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> 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 GHC.Classes.Eq GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.BookmarkFile.BookmarkFile)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.BookmarkFile.BookmarkFile

-- | GTimer records a start time, and counts microseconds elapsed
--   since that time.
--   
--   This is done somewhat differently on different platforms, and can be
--   tricky to get exactly right, so GTimer provides a
--   portable/convenient interface.
module GI.GLib.Structs.Timer

-- | Memory-managed wrapper type.
newtype Timer
Timer :: ManagedPtr Timer -> 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

-- | Exposes whether the timer is currently active.
--   
--   Since: 2.62
timerIsActive :: (HasCallStack, MonadIO m) => Timer -> m Bool

-- | 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.BoxedPtr GI.GLib.Structs.Timer.Timer
instance GHC.Classes.Eq GI.GLib.Structs.Timer.Timer
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Timer.Timer

-- | A GTrashStack is an efficient way to keep a stack of unused
--   allocated memory chunks. Each memory chunk is required to be large
--   enough to hold a gpointer. This allows the stack to be
--   maintained without any space overhead, since the stack pointers can be
--   stored inside the memory chunks.
--   
--   There is no function to create a GTrashStack. A NULL
--   GTrashStack* is a perfectly valid empty stack.
--   
--   Each piece of memory that is pushed onto the stack is cast to a
--   GTrashStack*.
--   
--   There is no longer any good reason to use GTrashStack. If you
--   have extra pieces of memory, free() them and allocate them
--   again later.
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

-- | 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.BoxedPtr GI.GLib.Structs.TrashStack.TrashStack
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.TrashStack.TrashStack
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.TrashStack.TrashStack tag
instance GHC.Classes.Eq GI.GLib.Structs.TrashStack.TrashStack
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TrashStack.TrashStack

-- | An opaque type which identifies a specific node in a Tree.
--   
--   Since: 2.68
module GI.GLib.Structs.TreeNode

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

-- | Gets the key stored at a particular tree node.
--   
--   Since: 2.68
treeNodeKey :: (HasCallStack, MonadIO m) => TreeNode -> m (Ptr ())

-- | Returns the next in-order node of the tree, or Nothing if the
--   passed node was already the last one.
--   
--   Since: 2.68
treeNodeNext :: (HasCallStack, MonadIO m) => TreeNode -> m (Maybe TreeNode)

-- | Returns the previous in-order node of the tree, or Nothing if
--   the passed node was already the first one.
--   
--   Since: 2.68
treeNodePrevious :: (HasCallStack, MonadIO m) => TreeNode -> m (Maybe TreeNode)

-- | Gets the value stored at a particular tree node.
--   
--   Since: 2.68
treeNodeValue :: (HasCallStack, MonadIO m) => TreeNode -> m (Ptr ())
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.TreeNode.TreeNode
instance GHC.Classes.Eq GI.GLib.Structs.TreeNode.TreeNode
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TreeNode.TreeNode

-- | The Tuples struct is used to return records (or tuples) from
--   the Relation by g_relation_select(). It only
--   contains one public member - the number of records that matched. To
--   access the matched records, you must use tuplesIndex.
module GI.GLib.Structs.Tuples

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

-- | Construct a Tuples struct initialized to zero.
newZeroTuples :: MonadIO m => m Tuples

-- | Frees the records which were returned by
--   g_relation_select(). This should always be called
--   after g_relation_select() when you are finished with
--   the records. The records are not removed from the Relation.

-- | Deprecated: (Since version 2.26)Rarely used API
tuplesDestroy :: (HasCallStack, MonadIO m) => Tuples -> m ()

-- | Gets a field from the records returned by
--   g_relation_select(). It returns the given field of the
--   record at the given index. The returned value should not be changed.

-- | Deprecated: (Since version 2.26)Rarely used API
tuplesIndex :: (HasCallStack, MonadIO m) => Tuples -> Int32 -> Int32 -> m (Ptr ())

-- | Get the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get tuples #len
--   
getTuplesLen :: MonadIO m => Tuples -> m Word32

-- | Set the value of the “len” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set tuples [ #len := value ]
--   
setTuplesLen :: MonadIO m => Tuples -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Tuples.Tuples
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Tuples.Tuples
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Tuples.Tuples tag
instance GHC.Classes.Eq GI.GLib.Structs.Tuples.Tuples
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Tuples.Tuples

-- | A Unix pipe. The advantage of this type over int[2] is that
--   it can be closed automatically when it goes out of scope, using
--   g_auto(GUnixPipe), on compilers that support that feature.
--   
--   Since: 2.80
module GI.GLib.Structs.UnixPipe

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

-- | Construct a UnixPipe struct initialized to zero.
newZeroUnixPipe :: MonadIO m => m UnixPipe
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.UnixPipe.UnixPipe
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.UnixPipe.UnixPipe
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.UnixPipe.UnixPipe tag
instance GHC.Classes.Eq GI.GLib.Structs.UnixPipe.UnixPipe
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.UnixPipe.UnixPipe

-- | The GUri type and related functions can be used to parse URIs
--   into their components, and build valid URIs from individual
--   components.
--   
--   Since GUri only represents absolute URIs, all GUris
--   will have a URI scheme, so uriGetScheme will always return a
--   non-NULL answer. Likewise, by definition, all URIs have a
--   path component, so uriGetPath will always return a
--   non-NULL string (which may be empty).
--   
--   If the URI string has an ‘authority’ component (that is, if the
--   scheme is followed by :// rather than just :), then
--   the GUri will contain a hostname, and possibly a port and
--   ‘userinfo’. Additionally, depending on how the GUri was
--   constructed/parsed (for example, using the
--   G_URI_FLAGS_HAS_PASSWORD and
--   G_URI_FLAGS_HAS_AUTH_PARAMS flags), the userinfo may be split
--   out into a username, password, and additional authorization-related
--   parameters.
--   
--   Normally, the components of a GUri will have all
--   %-encoded characters decoded. However, if you construct/parse
--   a GUri with G_URI_FLAGS_ENCODED, then the
--   %-encoding will be preserved instead in the userinfo, path,
--   and query fields (and in the host field if also created with
--   G_URI_FLAGS_NON_DNS). In particular, this is necessary if the
--   URI may contain binary data or non-UTF-8 text, or if decoding the
--   components might change the interpretation of the URI.
--   
--   For example, with the encoded flag:
--   
--   
c code
--   
--   
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_ENCODED, &err);
--   g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue");
--   
--   
--   While the default %-decoding behaviour would give:
--   
--   
c code
--   
--   
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_NONE, &err);
--   g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http://host/path?param=value");
--   
--   
--   During decoding, if an invalid UTF-8 string is encountered, parsing
--   will fail with an error indicating the bad string location:
--   
--   
c code
--   
--   
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fbad%3D%00alue", G_URI_FLAGS_NONE, &err);
--   g_assert_error (err, G_URI_ERROR, G_URI_ERROR_BAD_QUERY);
--   
--   
--   You should pass G_URI_FLAGS_ENCODED or
--   G_URI_FLAGS_ENCODED_QUERY if you need to handle that case
--   manually. In particular, if the query string contains =
--   characters that are %-encoded, you should let
--   uriParseParams do the decoding once of the query.
--   
--   GUri is immutable once constructed, and can safely be
--   accessed from multiple threads. Its reference counting is atomic.
--   
--   Note that the scope of GUri is to help manipulate URIs in
--   various applications, following RFC 3986. In particular, it
--   doesn't intend to cover web browser needs, and doesn’t implement the
--   WHATWG URL standard. No APIs are provided to help prevent
--   homograph attacks, so GUri is not suitable for
--   formatting URIs for display to the user for making security-sensitive
--   decisions.
--   
--   
Relative and absolute URIs
--   
--   As defined in RFC 3986, the hierarchical nature of URIs means
--   that they can either be ‘relative references’ (sometimes referred to
--   as ‘relative URIs’) or ‘URIs’ (for clarity, ‘URIs’ are referred to in
--   this documentation as ‘absolute URIs’ — although in contrast to RFC
--   3986, fragment identifiers are always allowed).
--   
--   Relative references have one or more components of the URI missing. In
--   particular, they have no scheme. Any other component, such as
--   hostname, query, etc. may be missing, apart from a path, which has to
--   be specified (but may be empty). The path may be relative, starting
--   with ./ rather than /.
--   
--   For example, a valid relative reference is ./path?query,
--   /?query#fragment or //example.com.
--   
--   Absolute URIs have a scheme specified. Any other components of the URI
--   which are missing are specified as explicitly unset in the URI, rather
--   than being resolved relative to a base URI using
--   uriParseRelative.
--   
--   For example, a valid absolute URI is file:///home/bob or
--   https://search.com?query=string.
--   
--   A GUri instance is always an absolute URI. A string may be an
--   absolute URI or a relative reference; see the documentation for
--   individual functions as to what forms they accept.
--   
--   
Parsing URIs
--   
--   The most minimalist APIs for parsing URIs are uriSplit and
--   uriSplitWithUser. These split a URI into its component parts,
--   and return the parts; the difference between the two is that
--   uriSplit treats the ‘userinfo’ component of the URI as a single
--   element, while uriSplitWithUser can (depending on the
--   [flagsgLib.UriFlags] you pass) treat it as containing
--   a username, password, and authentication parameters. Alternatively,
--   uriSplitNetwork can be used when you are only interested in the
--   components that are needed to initiate a network connection to the
--   service (scheme, host, and port).
--   
--   uriParse is similar to uriSplit, but instead of
--   returning individual strings, it returns a GUri structure
--   (and it requires that the URI be an absolute URI).
--   
--   uriResolveRelative and uriParseRelative allow you to
--   resolve a relative URI relative to a base URI.
--   uriResolveRelative takes two strings and returns a string, and
--   uriParseRelative takes a GUri and a string and returns
--   a GUri.
--   
--   All of the parsing functions take a
--   [flagsgLib.UriFlags] argument describing exactly how
--   to parse the URI; see the documentation for that type for more details
--   on the specific flags that you can pass. If you need to choose
--   different flags based on the type of URI, you can use
--   uriPeekScheme on the URI string to check the scheme first, and
--   use that to decide what flags to parse it with.
--   
--   For example, you might want to use G_URI_PARAMS_WWW_FORM when
--   parsing the params for a web URI, so compare the result of
--   uriPeekScheme against http and https.
--   
--   
Building URIs
--   
--   uriJoin and uriJoinWithUser can be used to construct
--   valid URI strings from a set of component strings. They are the
--   inverse of uriSplit and uriSplitWithUser.
--   
--   Similarly, uriBuild and uriBuildWithUser can be used to
--   construct a GUri from a set of component strings.
--   
--   As with the parsing functions, the building functions take a
--   [flagsgLib.UriFlags] argument. In particular, it is
--   important to keep in mind whether the URI components you are using are
--   already %-encoded. If so, you must pass the
--   G_URI_FLAGS_ENCODED flag.
--   
--   
file:// URIs
--   
--   Note that Windows and Unix both define special rules for parsing
--   file:// URIs (involving non-UTF-8 character sets on Unix, and
--   the interpretation of path separators on Windows). GUri does
--   not implement these rules. Use filenameFromUri and
--   filenameToUri if you want to properly convert between
--   file:// URIs and local filenames.
--   
--   
URI Equality
--   
--   Note that there is no g_uri_equal () function, because
--   comparing URIs usefully requires scheme-specific knowledge that
--   GUri does not have. GUri can help with normalization
--   if you use the various encoded [flagsgLib.UriFlags] as
--   well as G_URI_FLAGS_SCHEME_NORMALIZE however it is not
--   comprehensive. For example, data:,foo and
--   data:;base64,Zm9v resolve to the same thing according to the
--   data: URI specification which GLib does not handle.
--   
--   Since: 2.66
module GI.GLib.Structs.Uri

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

-- | Creates a new Uri from the given components according to
--   flags.
--   
--   See also uriBuildWithUser, which allows specifying the
--   components of the "userinfo" separately.
--   
--   Since: 2.66
uriBuild :: (HasCallStack, MonadIO m) => [UriFlags] -> Text -> Maybe Text -> Maybe Text -> Int32 -> Text -> Maybe Text -> Maybe Text -> m Uri

-- | Creates a new Uri from the given components according to
--   flags (UriFlagsHasPassword is added
--   unconditionally). The flags must be coherent with the
--   passed values, in particular use %-encoded values with
--   UriFlagsEncoded.
--   
--   In contrast to uriBuild, this allows specifying the components
--   of the ‘userinfo’ field separately. Note that user
--   must be non-Nothing if either password or
--   authParams is non-Nothing.
--   
--   Since: 2.66
uriBuildWithUser :: (HasCallStack, MonadIO m) => [UriFlags] -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int32 -> Text -> Maybe Text -> Maybe Text -> m Uri

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

-- | Escapes arbitrary data 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.
--   
--   Though technically incorrect, this will also allow escaping nul bytes
--   as %00.
--   
--   Since: 2.66
uriEscapeBytes :: (HasCallStack, MonadIO m) => ByteString -> Maybe Text -> m Text

-- | 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

-- | Gets uri's authentication parameters, which may
--   contain %-encoding, depending on the flags with which
--   uri was created. (If uri was not
--   created with UriFlagsHasAuthParams then this will be
--   Nothing.)
--   
--   Depending on the URI scheme, uriParseParams may be useful for
--   further parsing this information.
--   
--   Since: 2.66
uriGetAuthParams :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's flags set upon construction.
--   
--   Since: 2.66
uriGetFlags :: (HasCallStack, MonadIO m) => Uri -> m [UriFlags]

-- | Gets uri's fragment, which may contain
--   %-encoding, depending on the flags with which
--   uri was created.
--   
--   Since: 2.66
uriGetFragment :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's host. This will never have
--   %-encoded characters, unless it is non-UTF-8 (which can only
--   be the case if uri was created with
--   UriFlagsNonDns).
--   
--   If uri contained an IPv6 address literal, this value
--   will be just that address, without the brackets around it that are
--   necessary in the string form of the URI. Note that in this case there
--   may also be a scope ID attached to the address. Eg,
--   fe80::1234%em1 (or
--   fe80::1234%25em1 if the string is still encoded).
--   
--   Since: 2.66
uriGetHost :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's password, which may contain
--   %-encoding, depending on the flags with which
--   uri was created. (If uri was not
--   created with UriFlagsHasPassword then this will be
--   Nothing.)
--   
--   Since: 2.66
uriGetPassword :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's path, which may contain
--   %-encoding, depending on the flags with which
--   uri was created.
--   
--   Since: 2.66
uriGetPath :: (HasCallStack, MonadIO m) => Uri -> m Text

-- | Gets uri's port.
--   
--   Since: 2.66
uriGetPort :: (HasCallStack, MonadIO m) => Uri -> m Int32

-- | Gets uri's query, which may contain
--   %-encoding, depending on the flags with which
--   uri was created.
--   
--   For queries consisting of a series of name=value parameters,
--   UriParamsIter or uriParseParams may be useful.
--   
--   Since: 2.66
uriGetQuery :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's scheme. Note that this will always be
--   all-lowercase, regardless of the string or strings that
--   uri was created from.
--   
--   Since: 2.66
uriGetScheme :: (HasCallStack, MonadIO m) => Uri -> m Text

-- | Gets the ‘username’ component of uri's userinfo, which
--   may contain %-encoding, depending on the flags with which
--   uri was created. If uri was not
--   created with UriFlagsHasPassword or
--   UriFlagsHasAuthParams, this is the same as
--   uriGetUserinfo.
--   
--   Since: 2.66
uriGetUser :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Gets uri's userinfo, which may contain
--   %-encoding, depending on the flags with which
--   uri was created.
--   
--   Since: 2.66
uriGetUserinfo :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

-- | Parses uriString according to flags,
--   to determine whether it is a valid absolute URI, i.e. it does
--   not need to be resolved relative to another URI using
--   uriParseRelative.
--   
--   If it’s not a valid URI, an error is returned explaining how it’s
--   invalid.
--   
--   See uriSplit, and the definition of UriFlags, for more
--   information on the effect of flags.
--   
--   Since: 2.66
uriIsValid :: (HasCallStack, MonadIO m) => Text -> [UriFlags] -> m ()

-- | Joins the given components together according to flags
--   to create an absolute URI string. path may not be
--   Nothing (though it may be the empty string).
--   
--   When host is present, path must either
--   be empty or begin with a slash (/) character. When
--   host is not present, path cannot begin
--   with two slash characters (//). See RFC 3986, section
--   3.
--   
--   See also uriJoinWithUser, which allows specifying the
--   components of the ‘userinfo’ separately.
--   
--   UriFlagsHasPassword and UriFlagsHasAuthParams are
--   ignored if set in flags.
--   
--   Since: 2.66
uriJoin :: (HasCallStack, MonadIO m) => [UriFlags] -> Maybe Text -> Maybe Text -> Maybe Text -> Int32 -> Text -> Maybe Text -> Maybe Text -> m Text

-- | Joins the given components together according to flags
--   to create an absolute URI string. path may not be
--   Nothing (though it may be the empty string).
--   
--   In contrast to uriJoin, this allows specifying the components
--   of the ‘userinfo’ separately. It otherwise behaves the same.
--   
--   UriFlagsHasPassword and UriFlagsHasAuthParams are
--   ignored if set in flags.
--   
--   Since: 2.66
uriJoinWithUser :: (HasCallStack, MonadIO m) => [UriFlags] -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int32 -> Text -> Maybe Text -> Maybe Text -> 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]

-- | Parses uriString according to flags.
--   If the result is not a valid absolute URI, it will be
--   discarded, and an error returned.
--   
--   Since: 2.66
uriParse :: (HasCallStack, MonadIO m) => Text -> [UriFlags] -> m Uri

-- | Many URI schemes include one or more attribute/value pairs as part of
--   the URI value. This method can be used to parse them into a hash
--   table. When an attribute has multiple occurrences, the last value is
--   the final returned value. If you need to handle repeated attributes
--   differently, use UriParamsIter.
--   
--   The params string is assumed to still be
--   %-encoded, but the returned values will be fully decoded.
--   (Thus it is possible that the returned values may contain =
--   or separators, if the value was encoded in the input.)
--   Invalid %-encoding is treated as with the
--   UriFlagsParseRelaxed rules for uriParse. (However, if
--   params is the path or query string from a Uri
--   that was parsed without UriFlagsParseRelaxed and
--   UriFlagsEncoded, then you already know that it does not contain
--   any invalid encoding.)
--   
--   UriParamsFlagsWwwForm is handled as documented for
--   uriParamsIterInit.
--   
--   If UriParamsFlagsCaseInsensitive is passed to
--   flags, attributes will be compared case-insensitively,
--   so a params string attr=123&Attr=456 will only return a
--   single attribute–value pair, Attr=456. Case will be preserved
--   in the returned attributes.
--   
--   If params cannot be parsed (for example, it contains
--   two separators characters in a row), then
--   error is set and Nothing is returned.
--   
--   Since: 2.66
uriParseParams :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> [UriParamsFlags] -> m (Map Text Text)

-- | Parses uriRef according to flags and,
--   if it is a relative URI, resolves it relative to
--   baseUri. If the result is not a valid absolute URI, it
--   will be discarded, and an error returned.
--   
--   Since: 2.66
uriParseRelative :: (HasCallStack, MonadIO m) => Maybe Uri -> Text -> [UriFlags] -> m Uri

-- | Gets the scheme portion of a URI string. RFC 3986 decodes the
--   scheme as:
--   
--   
--   URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
--   
--   
--   Common schemes include file, https,
--   svn+ssh, etc.
--   
--   Since: 2.16
uriParseScheme :: (HasCallStack, MonadIO m) => Text -> m (Maybe 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, https,
--   svn+ssh, etc.
--   
--   Unlike uriParseScheme, the returned scheme is normalized to
--   all-lowercase and does not need to be freed.
--   
--   Since: 2.66
uriPeekScheme :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Parses uriRef according to flags and,
--   if it is a relative URI, resolves it relative to
--   baseUriString. If the result is not a valid absolute
--   URI, it will be discarded, and an error returned.
--   
--   (If baseUriString is Nothing, this just returns
--   uriRef, or Nothing if uriRef is
--   invalid or not absolute.)
--   
--   Since: 2.66
uriResolveRelative :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> [UriFlags] -> m Text

-- | Parses uriRef (which can be an absolute or relative
--   URI) according to flags, and returns the pieces.
--   Any component that doesn't appear in uriRef will be
--   returned as Nothing (but note that all URIs always have a path
--   component, though it may be the empty string).
--   
--   If flags contains UriFlagsEncoded, then
--   %-encoded characters in uriRef will remain
--   encoded in the output strings. (If not, then all such characters will
--   be decoded.) Note that decoding will only work if the URI components
--   are ASCII or UTF-8, so you will need to use UriFlagsEncoded if
--   they are not.
--   
--   Note that the UriFlagsHasPassword and
--   UriFlagsHasAuthParams flags are ignored by
--   uriSplit, since it always returns only the full userinfo; use
--   uriSplitWithUser if you want it split up.
--   
--   Since: 2.66
uriSplit :: (HasCallStack, MonadIO m) => Text -> [UriFlags] -> m (Maybe Text, Maybe Text, Maybe Text, Int32, Text, Maybe Text, Maybe Text)

-- | Parses uriString (which must be an absolute
--   URI) according to flags, and returns the pieces
--   relevant to connecting to a host. See the documentation for
--   uriSplit for more details; this is mostly a wrapper around that
--   function with simpler arguments. However, it will return an error if
--   uriString is a relative URI, or does not contain a
--   hostname component.
--   
--   Since: 2.66
uriSplitNetwork :: (HasCallStack, MonadIO m) => Text -> [UriFlags] -> m (Maybe Text, Maybe Text, Int32)

-- | Parses uriRef (which can be an absolute or relative
--   URI) according to flags, and returns the pieces.
--   Any component that doesn't appear in uriRef will be
--   returned as Nothing (but note that all URIs always have a path
--   component, though it may be the empty string).
--   
--   See uriSplit, and the definition of UriFlags, for more
--   information on the effect of flags. Note that
--   password will only be parsed out if
--   flags contains UriFlagsHasPassword, and
--   authParams will only be parsed out if
--   flags contains UriFlagsHasAuthParams.
--   
--   Since: 2.66
uriSplitWithUser :: (HasCallStack, MonadIO m) => Text -> [UriFlags] -> m (Maybe Text, Maybe Text, Maybe Text, Maybe Text, Maybe Text, Int32, Text, Maybe Text, Maybe Text)

-- | Returns a string representing uri.
--   
--   This is not guaranteed to return a string which is identical to the
--   string that uri was parsed from. However, if the
--   source URI was syntactically correct (according to RFC 3986), and it
--   was parsed with UriFlagsEncoded, then uriToString is
--   guaranteed to return a string which is at least semantically
--   equivalent to the source URI (according to RFC 3986).
--   
--   If uri might contain sensitive details, such as
--   authentication parameters, or private data in its query string, and
--   the returned string is going to be logged, then consider using
--   uriToStringPartial to redact parts.
--   
--   Since: 2.66
uriToString :: (HasCallStack, MonadIO m) => Uri -> m Text

-- | Returns a string representing uri, subject to the
--   options in flags. See uriToString and
--   UriHideFlags for more details.
--   
--   Since: 2.66
uriToStringPartial :: (HasCallStack, MonadIO m) => Uri -> [UriHideFlags] -> m Text

-- | Unescapes a segment of an escaped string as binary data.
--   
--   Note that in contrast to uriUnescapeString, this does allow nul
--   bytes to appear in the output.
--   
--   If any of the characters in illegalCharacters appears
--   as an escaped character in escapedString, then that is
--   an error and Nothing will be returned. This is useful if you
--   want to avoid for instance having a slash being expanded in an escaped
--   path element, which might confuse pathname handling.
--   
--   Since: 2.66
uriUnescapeBytes :: (HasCallStack, MonadIO m) => Text -> Int64 -> Maybe Text -> m Bytes

-- | Unescapes a segment of an escaped string.
--   
--   If any of the characters in illegalCharacters or the
--   NUL character appears as an escaped character in
--   escapedString, then that is an error and
--   Nothing will be returned. This is useful if you want to avoid
--   for instance having a slash being expanded in an escaped path element,
--   which might confuse pathname handling.
--   
--   Note: NUL byte is not accepted in the output, in contrast to
--   uriUnescapeBytes.
--   
--   Since: 2.16
uriUnescapeSegment :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> Maybe Text -> m (Maybe Text)

-- | Unescapes a whole escaped string.
--   
--   If any of the characters in illegalCharacters or the
--   NUL character appears as an escaped character in
--   escapedString, then that is an error and
--   Nothing will be returned. This is useful if 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 (Maybe Text)
instance GHC.Classes.Eq GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Uri.Uri)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Uri.Uri

-- | Many URI schemes include one or more attribute/value pairs as part of
--   the URI value. For example
--   scheme://server/path?query=string&is=there has two
--   attributes – query=string and is=there – in its
--   query part.
--   
--   A UriParamsIter structure represents an iterator that can be
--   used to iterate over the attribute/value pairs of a URI query string.
--   UriParamsIter structures are typically allocated on the stack
--   and then initialized with uriParamsIterInit. See the
--   documentation for uriParamsIterInit for a usage example.
--   
--   Since: 2.66
module GI.GLib.Structs.UriParamsIter

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

-- | Construct a UriParamsIter struct initialized to zero.
newZeroUriParamsIter :: MonadIO m => m UriParamsIter

-- | Initializes an attribute/value pair iterator.
--   
--   The iterator keeps pointers to the params and
--   separators arguments, those variables must thus
--   outlive the iterator and not be modified during the iteration.
--   
--   If UriParamsFlagsWwwForm is passed in flags,
--   + characters in the param string will be replaced with spaces
--   in the output. For example, foo=bar+baz will give attribute
--   foo with value bar baz. This is commonly used on the
--   web (the https and http schemes only), but is
--   deprecated in favour of the equivalent of encoding spaces as
--   %20.
--   
--   Unlike with uriParseParams,
--   UriParamsFlagsCaseInsensitive has no effect if passed to
--   flags for uriParamsIterInit. The caller is
--   responsible for doing their own case-insensitive comparisons.
--   
--   
C code
--   
--   
--   GUriParamsIter iter;
--   GError *error = NULL;
--   gchar *unowned_attr, *unowned_value;
--   
--   g_uri_params_iter_init (&iter, "foo=bar&baz=bar&Foo=frob&baz=bar2", -1, "&", G_URI_PARAMS_NONE);
--   while (g_uri_params_iter_next (&iter, &unowned_attr, &unowned_value, &error))
--     {
--       g_autofree gchar *attr = g_steal_pointer (&unowned_attr);
--       g_autofree gchar *value = g_steal_pointer (&unowned_value);
--       // do something with attr and value; this code will be called 4 times
--       // for the params string in this example: once with attr=foo and value=bar,
--       // then with baz/bar, then Foo/frob, then baz/bar2.
--     }
--   if (error)
--     // handle parsing error
--   
--   
--   Since: 2.66
uriParamsIterInit :: (HasCallStack, MonadIO m) => UriParamsIter -> Text -> Int64 -> Text -> [UriParamsFlags] -> m ()

-- | Advances iter and retrieves the next attribute/value.
--   False is returned if an error has occurred (in which case
--   error is set), or if the end of the iteration is
--   reached (in which case attribute and
--   value are set to Nothing and the iterator
--   becomes invalid). If True is returned, uriParamsIterNext
--   may be called again to receive another attribute/value pair.
--   
--   Note that the same attribute may be returned multiple
--   times, since URIs allow repeated attributes.
--   
--   Since: 2.66
uriParamsIterNext :: (HasCallStack, MonadIO m) => UriParamsIter -> m (Maybe Text, Maybe Text)
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.UriParamsIter.UriParamsIter
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.UriParamsIter.UriParamsIter
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.UriParamsIter.UriParamsIter tag
instance GHC.Classes.Eq GI.GLib.Structs.UriParamsIter.UriParamsIter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.UriParamsIter.UriParamsIter

-- | A type in the [typegLib.Variant] type system.
--   
--   
--   
- typegLib.Variant types are represented as
--   strings, but have a strict syntax described below. All
--   [typegLib.VariantType]s passed to GLib must be valid,
--   and they are typically expected to be static (i.e. not provided by
--   user input) as they determine how binary
--   [typegLib.Variant] data is interpreted.
--   
--   
--   To convert a static string to a [typegLib.VariantType]
--   in C, use the GLib.VARIANT_TYPE casting macro. When
--   GLib is compiled with checks enabled, it will validate the type. To
--   check if an arbitrary string is a valid
--   [typegLib.VariantType], use
--   variantTypeStringIsValid.
--   
--   
GVariant Type System
--   
--   This section introduces the [typegLib.Variant] 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
--   [typegLib.Variant].
--   
--   The first major change with respect to the D-Bus type system is the
--   introduction of maybe (or ‘nullable’) types. Any type in
--   [typegLib.Variant] 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 [typegLib.Variant]
--   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
--   [typegLib.Variant], 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, [typegLib.Variant] types are
--   described with strings (‘type strings’). Subject to the differences
--   mentioned above, these strings are of the same form as those found in
--   D-Bus. 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. [typegLib.Variant]
--   deals with single values directly so
--   [typegLib.Variant] type strings always describe the
--   type of exactly one value. This means that a D-Bus signature string is
--   generally not a valid [typegLib.Variant] 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
--   `GtkWidget` can exist (since GtkWidget is an abstract
--   class), but a `GtkWindow` can certainly be instantiated, and
--   you would say that a GtkWindow is a GtkWidget (since
--   GtkWindow is a subclass of GtkWidget).
--   
--   Two types may not be compared by value; use variantTypeEqual or
--   variantTypeIsSubtypeOf May be copied using
--   variantTypeCopy and freed using variantTypeFree.
--   
--   
GVariant Type Strings
--   
--   A [typegLib.Variant] 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,
--   [typegLib.Variant] 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.
--   
--   Since: 2.24
module GI.GLib.Structs.VariantType

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

-- | No description available in the introspection data.
variantTypeChecked_ :: (HasCallStack, MonadIO m) => Text -> m VariantType

-- | Makes a copy of a [typegLib.VariantType].
--   
--   It is appropriate to call variantTypeFree on the return value.
--   type may not be NULL.
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
--   [typegLib.HashTable] without function pointer casting.
--   For both arguments, a valid [typegLib.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.
--   
--   NULL 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 (Maybe VariantType)

-- | Frees a [typegLib.VariantType] that was allocated with
--   variantTypeCopy, variantTypeNew or one of the container
--   type constructor functions.
--   
--   In the case that type is NULL, this function
--   does nothing.
--   
--   Since 2.24
variantTypeFree :: (HasCallStack, MonadIO m) => Maybe 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 VariantType.peek_string().
variantTypeGetStringLength :: (HasCallStack, MonadIO m) => VariantType -> m CSize

-- | Hashes type.
--   
--   The argument type of type is only
--   gconstpointer to allow use with
--   [typegLib.HashTable] without function pointer casting.
--   A valid [typegLib.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 [typegLib.Variant] 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 CSize

-- | Creates a new [typegLib.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 variantTypeFirst 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 NULL-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 NULL.
--   
--   For tuples, NULL is returned when type is the
--   last item in the tuple.
variantTypeNext :: (HasCallStack, MonadIO m) => VariantType -> m (Maybe VariantType)

-- | No description available in the introspection data.
variantTypeStringGetDepth_ :: (HasCallStack, MonadIO m) => Text -> m CSize

-- | 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 GHC.Classes.Eq GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.VariantType.VariantType)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.VariantType.VariantType

-- | 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

-- | 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 (Maybe 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 GHC.Classes.Eq GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.VariantDict.VariantDict)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.BasicTypes.TypedObject 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

-- | 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_static().
--   
--   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 GHC.Classes.Eq GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.VariantBuilder.VariantBuilder)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.VariantBuilder.VariantBuilder

-- | 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

-- | 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.BoxedPtr GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754 tag
instance GHC.Classes.Eq GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754

-- | 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

-- | 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.BoxedPtr GI.GLib.Unions.FloatIEEE754.FloatIEEE754
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Unions.FloatIEEE754.FloatIEEE754
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.FloatIEEE754.FloatIEEE754 tag
instance GHC.Classes.Eq GI.GLib.Unions.FloatIEEE754.FloatIEEE754
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.FloatIEEE754.FloatIEEE754

-- | 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

-- | 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.
--   
--   Since: 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.BoxedPtr GI.GLib.Unions.Mutex.Mutex
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Unions.Mutex.Mutex
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.Mutex.Mutex tag
instance GHC.Classes.Eq GI.GLib.Unions.Mutex.Mutex
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.Mutex.Mutex

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.Cond.Cond
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Cond.Cond
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Cond.Cond tag
instance GHC.Classes.Eq GI.GLib.Structs.Cond.Cond
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Cond.Cond

-- | 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

-- | 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.BoxedPtr GI.GLib.Unions.TokenValue.TokenValue
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Unions.TokenValue.TokenValue
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Unions.TokenValue.TokenValue tag
instance GHC.Classes.Eq GI.GLib.Unions.TokenValue.TokenValue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.TokenValue.TokenValue

module GI.GLib.Unions

module GI.GLib.Callbacks

-- | Type for the callback on the (unwrapped) C side.
type C_CacheDestroyFunc = Ptr () -> IO ()

-- | Specifies the type of the valueDestroyFunc and
--   keyDestroyFunc functions passed to
--   g_cache_new(). The functions are passed a pointer to
--   the Cache key or Cache value and should free any memory
--   and other resources associated with it.

-- | Deprecated: (Since version 2.32)Use a HashTable instead
type CacheDestroyFunc = Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CacheDestroyFunc :: (HasCallStack, MonadIO m) => FunPtr C_CacheDestroyFunc -> Ptr () -> m ()

-- | Wrap the callback into a GClosure.
genClosure_CacheDestroyFunc :: MonadIO m => CacheDestroyFunc -> m (GClosure C_CacheDestroyFunc)

-- | Generate a function pointer callable from C code, from a
--   C_CacheDestroyFunc.
mk_CacheDestroyFunc :: C_CacheDestroyFunc -> IO (FunPtr C_CacheDestroyFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CacheDestroyFunc.
noCacheDestroyFunc :: Maybe CacheDestroyFunc

-- | Wrap a CacheDestroyFunc into a C_CacheDestroyFunc.
wrap_CacheDestroyFunc :: Maybe (Ptr (FunPtr C_CacheDestroyFunc)) -> CacheDestroyFunc -> C_CacheDestroyFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CacheDupFunc = Ptr () -> IO Ptr ()

-- | Specifies the type of the keyDupFunc function passed
--   to g_cache_new(). The function is passed a key
--   (not a value as the prototype implies) and should return a
--   duplicate of the key.

-- | Deprecated: (Since version 2.32)Use a HashTable instead
type CacheDupFunc = Ptr () -> IO Ptr ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CacheDupFunc :: (HasCallStack, MonadIO m) => FunPtr C_CacheDupFunc -> Ptr () -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_CacheDupFunc :: MonadIO m => CacheDupFunc -> m (GClosure C_CacheDupFunc)

-- | Generate a function pointer callable from C code, from a
--   C_CacheDupFunc.
mk_CacheDupFunc :: C_CacheDupFunc -> IO (FunPtr C_CacheDupFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CacheDupFunc.
noCacheDupFunc :: Maybe CacheDupFunc

-- | Wrap a CacheDupFunc into a C_CacheDupFunc.
wrap_CacheDupFunc :: Maybe (Ptr (FunPtr C_CacheDupFunc)) -> CacheDupFunc -> C_CacheDupFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CacheNewFunc = Ptr () -> IO Ptr ()

-- | Specifies the type of the valueNewFunc function passed
--   to g_cache_new(). It is passed a Cache key and
--   should create the value corresponding to the key.

-- | Deprecated: (Since version 2.32)Use a HashTable instead
type CacheNewFunc = Ptr () -> IO Ptr ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CacheNewFunc :: (HasCallStack, MonadIO m) => FunPtr C_CacheNewFunc -> Ptr () -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_CacheNewFunc :: MonadIO m => CacheNewFunc -> m (GClosure C_CacheNewFunc)

-- | Generate a function pointer callable from C code, from a
--   C_CacheNewFunc.
mk_CacheNewFunc :: C_CacheNewFunc -> IO (FunPtr C_CacheNewFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CacheNewFunc.
noCacheNewFunc :: Maybe CacheNewFunc

-- | Wrap a CacheNewFunc into a C_CacheNewFunc.
wrap_CacheNewFunc :: Maybe (Ptr (FunPtr C_CacheNewFunc)) -> CacheNewFunc -> C_CacheNewFunc

-- | 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 waitStatus, see the documentation for
--   spawnCheckWaitStatus. In particular, on Unix platforms, note
--   that it is usually not equal to the integer passed to exit()
--   or returned from main().
type ChildWatchFunc = Int32 -> Int32 -> IO ()

-- | Prototype of a GChildWatchSource callback, called when
--   a child process has exited.
--   
--   To interpret waitStatus, see the documentation for
--   spawnCheckWaitStatus. In particular, on Unix platforms, note
--   that it is usually not equal to the integer passed to exit()
--   or returned from main().
type ChildWatchFunc_WithClosures = Int32 -> Int32 -> Ptr () -> 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 GClosure.
genClosure_ChildWatchFunc :: MonadIO m => ChildWatchFunc -> m (GClosure C_ChildWatchFunc)

-- | 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
--   GLib.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 -> 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 GClosure.
genClosure_ClearHandleFunc :: MonadIO m => ClearHandleFunc -> m (GClosure C_ClearHandleFunc)

-- | 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 () -> 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_WithClosures = Ptr () -> Ptr () -> Ptr () -> IO Int32

-- | 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 GClosure.
genClosure_CompareDataFunc :: MonadIO m => CompareDataFunc -> m (GClosure C_CompareDataFunc)

-- | 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 () -> Ptr () -> IO Int32

-- | 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 GClosure.
genClosure_CompareFunc :: MonadIO m => CompareFunc -> m (GClosure C_CompareFunc)

-- | 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_CompletionFunc = Ptr () -> IO CString

-- | Specifies the type of the function passed to
--   g_completion_new(). It should return the string
--   corresponding to the given target item. This is used when you use data
--   structures as Completion items.

-- | Deprecated: (Since version 2.26)Rarely used API
type CompletionFunc = Ptr () -> IO Text

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CompletionFunc :: (HasCallStack, MonadIO m) => FunPtr C_CompletionFunc -> Ptr () -> m Text

-- | Wrap the callback into a GClosure.
genClosure_CompletionFunc :: MonadIO m => CompletionFunc -> m (GClosure C_CompletionFunc)

-- | Generate a function pointer callable from C code, from a
--   C_CompletionFunc.
mk_CompletionFunc :: C_CompletionFunc -> IO (FunPtr C_CompletionFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CompletionFunc.
noCompletionFunc :: Maybe CompletionFunc

-- | Wrap a CompletionFunc into a C_CompletionFunc.
wrap_CompletionFunc :: Maybe (Ptr (FunPtr C_CompletionFunc)) -> CompletionFunc -> C_CompletionFunc

-- | Type for the callback on the (unwrapped) C side.
type C_CompletionStrncmpFunc = CString -> CString -> CSize -> IO Int32

-- | Specifies the type of the function passed to
--   g_completion_set_compare(). This is used when you use
--   strings as Completion items.

-- | Deprecated: (Since version 2.26)Rarely used API
type CompletionStrncmpFunc = Text -> Text -> CSize -> IO Int32

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CompletionStrncmpFunc :: (HasCallStack, MonadIO m) => FunPtr C_CompletionStrncmpFunc -> Text -> Text -> CSize -> m Int32

-- | Wrap the callback into a GClosure.
genClosure_CompletionStrncmpFunc :: MonadIO m => CompletionStrncmpFunc -> m (GClosure C_CompletionStrncmpFunc)

-- | Generate a function pointer callable from C code, from a
--   C_CompletionStrncmpFunc.
mk_CompletionStrncmpFunc :: C_CompletionStrncmpFunc -> IO (FunPtr C_CompletionStrncmpFunc)

-- | A convenience synonym for Nothing :: Maybe
--   CompletionStrncmpFunc.
noCompletionStrncmpFunc :: Maybe CompletionStrncmpFunc

-- | Wrap a CompletionStrncmpFunc into a
--   C_CompletionStrncmpFunc.
wrap_CompletionStrncmpFunc :: Maybe (Ptr (FunPtr C_CompletionStrncmpFunc)) -> CompletionStrncmpFunc -> C_CompletionStrncmpFunc

-- | 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 () -> Ptr () -> IO Ptr ()

-- | 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 GClosure.
genClosure_CopyFunc :: MonadIO m => CopyFunc -> m (GClosure C_CopyFunc)

-- | 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 -> 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_WithClosures = Word32 -> Ptr () -> Ptr () -> 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 GClosure.
genClosure_DataForeachFunc :: MonadIO m => DataForeachFunc -> m (GClosure C_DataForeachFunc)

-- | 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 () -> 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 GClosure.
genClosure_DestroyNotify :: MonadIO m => DestroyNotify -> m (GClosure C_DestroyNotify)

-- | 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 () -> 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_WithClosures = Ptr () -> Ptr () -> IO Ptr ()

-- | 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 GClosure.
genClosure_DuplicateFunc :: MonadIO m => DuplicateFunc -> m (GClosure C_DuplicateFunc)

-- | 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 () -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_EqualFunc :: MonadIO m => EqualFunc -> m (GClosure C_EqualFunc)

-- | 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_EqualFuncFull = Ptr () -> 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.
--   
--   This is a version of EqualFunc which provides a
--   userData closure from the caller.
--   
--   Since: 2.74
type EqualFuncFull = Ptr () -> Ptr () -> IO Bool

-- | 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.
--   
--   This is a version of EqualFunc which provides a
--   userData closure from the caller.
--   
--   Since: 2.74
type EqualFuncFull_WithClosures = Ptr () -> Ptr () -> Ptr () -> IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_EqualFuncFull :: EqualFuncFull -> EqualFuncFull_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_EqualFuncFull :: (HasCallStack, MonadIO m) => FunPtr C_EqualFuncFull -> Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Wrap the callback into a GClosure.
genClosure_EqualFuncFull :: MonadIO m => EqualFuncFull -> m (GClosure C_EqualFuncFull)

-- | Generate a function pointer callable from C code, from a
--   C_EqualFuncFull.
mk_EqualFuncFull :: C_EqualFuncFull -> IO (FunPtr C_EqualFuncFull)

-- | A convenience synonym for Nothing :: Maybe
--   EqualFuncFull.
noEqualFuncFull :: Maybe EqualFuncFull

-- | A convenience synonym for Nothing :: Maybe
--   EqualFuncFull_WithClosures.
noEqualFuncFull_WithClosures :: Maybe EqualFuncFull_WithClosures

-- | Wrap a EqualFuncFull into a C_EqualFuncFull.
wrap_EqualFuncFull :: Maybe (Ptr (FunPtr C_EqualFuncFull)) -> EqualFuncFull_WithClosures -> C_EqualFuncFull

-- | Type for the callback on the (unwrapped) C side.
type C_ErrorClearFunc = Ptr GError -> IO ()

-- | Specifies the type of function which is called when an extended error
--   instance is freed. It is passed the error pointer about to be freed,
--   and should free the error's private data fields.
--   
--   Normally, it is better to use
--   G_DEFINE_EXTENDED_ERROR(), as it already takes care of
--   getting the private data from error.
--   
--   Since: 2.68
type ErrorClearFunc = GError -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ErrorClearFunc :: (HasCallStack, MonadIO m) => FunPtr C_ErrorClearFunc -> GError -> m ()

-- | Wrap the callback into a GClosure.
genClosure_ErrorClearFunc :: MonadIO m => ErrorClearFunc -> m (GClosure C_ErrorClearFunc)

-- | Generate a function pointer callable from C code, from a
--   C_ErrorClearFunc.
mk_ErrorClearFunc :: C_ErrorClearFunc -> IO (FunPtr C_ErrorClearFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ErrorClearFunc.
noErrorClearFunc :: Maybe ErrorClearFunc

-- | Wrap a ErrorClearFunc into a C_ErrorClearFunc.
wrap_ErrorClearFunc :: Maybe (Ptr (FunPtr C_ErrorClearFunc)) -> ErrorClearFunc -> C_ErrorClearFunc

-- | Type for the callback on the (unwrapped) C side.
type C_ErrorCopyFunc = Ptr GError -> Ptr GError -> IO ()

-- | Specifies the type of function which is called when an extended error
--   instance is copied. It is passed the pointer to the destination error
--   and source error, and should copy only the fields of the private data
--   from srcError to destError.
--   
--   Normally, it is better to use
--   G_DEFINE_EXTENDED_ERROR(), as it already takes care of
--   getting the private data from srcError and
--   destError.
--   
--   Since: 2.68
type ErrorCopyFunc = GError -> GError -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ErrorCopyFunc :: (HasCallStack, MonadIO m) => FunPtr C_ErrorCopyFunc -> GError -> GError -> m ()

-- | Wrap the callback into a GClosure.
genClosure_ErrorCopyFunc :: MonadIO m => ErrorCopyFunc -> m (GClosure C_ErrorCopyFunc)

-- | Generate a function pointer callable from C code, from a
--   C_ErrorCopyFunc.
mk_ErrorCopyFunc :: C_ErrorCopyFunc -> IO (FunPtr C_ErrorCopyFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ErrorCopyFunc.
noErrorCopyFunc :: Maybe ErrorCopyFunc

-- | Wrap a ErrorCopyFunc into a C_ErrorCopyFunc.
wrap_ErrorCopyFunc :: Maybe (Ptr (FunPtr C_ErrorCopyFunc)) -> ErrorCopyFunc -> C_ErrorCopyFunc

-- | Type for the callback on the (unwrapped) C side.
type C_ErrorInitFunc = Ptr GError -> IO ()

-- | Specifies the type of function which is called just after an extended
--   error instance is created and its fields filled. It should only
--   initialize the fields in the private data, which can be received with
--   the generated *_get_private() function.
--   
--   Normally, it is better to use
--   G_DEFINE_EXTENDED_ERROR(), as it already takes care of
--   getting the private data from error.
--   
--   Since: 2.68
type ErrorInitFunc = GError -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ErrorInitFunc :: (HasCallStack, MonadIO m) => FunPtr C_ErrorInitFunc -> GError -> m ()

-- | Wrap the callback into a GClosure.
genClosure_ErrorInitFunc :: MonadIO m => ErrorInitFunc -> m (GClosure C_ErrorInitFunc)

-- | Generate a function pointer callable from C code, from a
--   C_ErrorInitFunc.
mk_ErrorInitFunc :: C_ErrorInitFunc -> IO (FunPtr C_ErrorInitFunc)

-- | A convenience synonym for Nothing :: Maybe
--   ErrorInitFunc.
noErrorInitFunc :: Maybe ErrorInitFunc

-- | Wrap a ErrorInitFunc into a C_ErrorInitFunc.
wrap_ErrorInitFunc :: Maybe (Ptr (FunPtr C_ErrorInitFunc)) -> ErrorInitFunc -> C_ErrorInitFunc

-- | 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 () -> 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 GClosure.
genClosure_FreeFunc :: MonadIO m => FreeFunc -> m (GClosure C_FreeFunc)

-- | 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 () -> IO ()

-- | Specifies the type of functions passed to
--   g_list_foreach() and
--   g_slist_foreach().
type Func_WithClosures = Ptr () -> Ptr () -> 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 GClosure.
genClosure_Func :: MonadIO m => Func -> m (GClosure C_Func)

-- | 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 hashTableForeach.
--   It is called with each key/value pair, together with the
--   userData parameter which is passed to
--   hashTableForeach.
type HFunc = Ptr () -> Ptr () -> IO ()

-- | Specifies the type of the function passed to hashTableForeach.
--   It is called with each key/value pair, together with the
--   userData parameter which is passed to
--   hashTableForeach.
type HFunc_WithClosures = Ptr () -> Ptr () -> Ptr () -> 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 GClosure.
genClosure_HFunc :: MonadIO m => HFunc -> m (GClosure C_HFunc)

-- | 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 hashTableFind,
--   hashTableForeachRemove, and hashTableForeachSteal.
--   
--   The function is called with each key/value pair, together with the
--   userData parameter passed to the calling function.
--   
--   The function should return true if the key/value pair should be
--   selected, meaning it has been found or it should be removed from the
--   GHashTable, depending on the calling function.
type HRFunc = Ptr () -> Ptr () -> IO Bool

-- | Specifies the type of the function passed to hashTableFind,
--   hashTableForeachRemove, and hashTableForeachSteal.
--   
--   The function is called with each key/value pair, together with the
--   userData parameter passed to the calling function.
--   
--   The function should return true if the key/value pair should be
--   selected, meaning it has been found or it should be removed from the
--   GHashTable, depending on the calling function.
type HRFunc_WithClosures = Ptr () -> Ptr () -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_HRFunc :: MonadIO m => HRFunc -> m (GClosure C_HRFunc)

-- | 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 vulnerable 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 () -> IO Word32

-- | 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 GClosure.
genClosure_HashFunc :: MonadIO m => HashFunc -> m (GClosure C_HashFunc)

-- | 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 () -> IO Bool

-- | 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 GClosure.
genClosure_HookCheckFunc :: MonadIO m => HookCheckFunc -> m (GClosure C_HookCheckFunc)

-- | 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 hookListMarshalCheck.
type HookCheckMarshaller = Hook -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_HookCheckMarshaller :: MonadIO m => HookCheckMarshaller -> m (GClosure C_HookCheckMarshaller)

-- | 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
--   hookInsertSorted.
type HookCompareFunc = Hook -> Hook -> IO Int32

-- | 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 GClosure.
genClosure_HookCompareFunc :: MonadIO m => HookCompareFunc -> m (GClosure C_HookCompareFunc)

-- | 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 -> Hook -> 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 GClosure.
genClosure_HookFinalizeFunc :: MonadIO m => HookFinalizeFunc -> m (GClosure C_HookFinalizeFunc)

-- | 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 -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_HookFindFunc :: MonadIO m => HookFindFunc -> m (GClosure C_HookFindFunc)

-- | 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 () -> 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 GClosure.
genClosure_HookFunc :: MonadIO m => HookFunc -> m (GClosure C_HookFunc)

-- | 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 hookListMarshal.
type HookMarshaller = Hook -> Ptr () -> 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 GClosure.
genClosure_HookMarshaller :: MonadIO m => HookMarshaller -> m (GClosure C_HookMarshaller)

-- | 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 -> [IOCondition] -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_IOFunc :: MonadIO m => IOFunc -> m (GClosure C_IOFunc)

-- | 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

-- | 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 GClosure.
genClosure_IOFuncsIoCreateWatchFieldCallback :: MonadIO m => IOFuncsIoCreateWatchFieldCallback -> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)

-- | 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 GClosure.
genClosure_IOFuncsIoFreeFieldCallback :: MonadIO m => IOFuncsIoFreeFieldCallback -> m (GClosure C_IOFuncsIoFreeFieldCallback)

-- | 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 GClosure.
genClosure_IOFuncsIoGetFlagsFieldCallback :: MonadIO m => IOFuncsIoGetFlagsFieldCallback -> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)

-- | 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 -> CSize -> CSize -> Ptr Ptr GError -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoReadFieldCallback = IOChannel -> Text -> CSize -> CSize -> IO IOStatus

-- | 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 -> CSize -> CSize -> 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

-- | 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

-- | 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 -> CSize -> CSize -> Ptr Ptr GError -> IO CUInt

-- | No description available in the introspection data.
type IOFuncsIoWriteFieldCallback = IOChannel -> Text -> CSize -> CSize -> IO IOStatus

-- | 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 -> CSize -> CSize -> 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.
--   
--   The log_domain parameter can be set to NULL or an
--   empty string to use the default application domain.
--   
--   This is not used if structured logging is enabled; see Using
--   Structured Logging.
type LogFunc = Maybe Text -> [LogLevelFlags] -> Text -> 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.
--   
--   The log_domain parameter can be set to NULL or an
--   empty string to use the default application domain.
--   
--   This is not used if structured logging is enabled; see Using
--   Structured Logging.
type LogFunc_WithClosures = Maybe Text -> [LogLevelFlags] -> Text -> Ptr () -> 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 -> Maybe Text -> [LogLevelFlags] -> Text -> Ptr () -> m ()

-- | Wrap the callback into a GClosure.
genClosure_LogFunc :: MonadIO m => LogFunc -> m (GClosure C_LogFunc)

-- | 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 -> CSize -> 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] -> [LogField] -> IO LogWriterOutput

-- | 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] -> [LogField] -> Ptr () -> IO LogWriterOutput

-- | 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 GClosure.
genClosure_LogWriterFunc :: MonadIO m => LogWriterFunc -> m (GClosure C_LogWriterFunc)

-- | 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 ()

-- | No description available in the introspection data.
type MarkupParserEndElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Ptr () -> IO ()

-- | 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 GClosure.
genClosure_MarkupParserErrorFieldCallback :: MonadIO m => MarkupParserErrorFieldCallback -> m (GClosure C_MarkupParserErrorFieldCallback)

-- | 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 -> CSize -> Ptr () -> Ptr Ptr GError -> IO ()

-- | No description available in the introspection data.
type MarkupParserPassthroughFieldCallback = MarkupParseContext -> Text -> CSize -> IO ()

-- | No description available in the introspection data.
type MarkupParserPassthroughFieldCallback_WithClosures = MarkupParseContext -> Text -> CSize -> Ptr () -> IO ()

-- | 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 -> CSize -> 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 ()

-- | No description available in the introspection data.
type MarkupParserStartElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Text -> Text -> Ptr () -> IO ()

-- | 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 -> CSize -> Ptr () -> Ptr Ptr GError -> IO ()

-- | No description available in the introspection data.
type MarkupParserTextFieldCallback = MarkupParseContext -> Text -> CSize -> IO ()

-- | No description available in the introspection data.
type MarkupParserTextFieldCallback_WithClosures = MarkupParseContext -> Text -> CSize -> Ptr () -> IO ()

-- | 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 -> CSize -> 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 = CSize -> CSize -> IO Ptr ()

-- | No description available in the introspection data.
type MemVTableCallocFieldCallback = CSize -> CSize -> 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 -> CSize -> CSize -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_MemVTableCallocFieldCallback :: MonadIO m => MemVTableCallocFieldCallback -> m (GClosure C_MemVTableCallocFieldCallback)

-- | 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 GClosure.
genClosure_MemVTableFreeFieldCallback :: MonadIO m => MemVTableFreeFieldCallback -> m (GClosure C_MemVTableFreeFieldCallback)

-- | 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 = CSize -> IO Ptr ()

-- | No description available in the introspection data.
type MemVTableMallocFieldCallback = CSize -> 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 -> CSize -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_MemVTableMallocFieldCallback :: MonadIO m => MemVTableMallocFieldCallback -> m (GClosure C_MemVTableMallocFieldCallback)

-- | 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 () -> CSize -> IO Ptr ()

-- | No description available in the introspection data.
type MemVTableReallocFieldCallback = Ptr () -> CSize -> 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 () -> CSize -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_MemVTableReallocFieldCallback :: MonadIO m => MemVTableReallocFieldCallback -> m (GClosure C_MemVTableReallocFieldCallback)

-- | 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 = CSize -> IO Ptr ()

-- | No description available in the introspection data.
type MemVTableTryMallocFieldCallback = CSize -> 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 -> CSize -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_MemVTableTryMallocFieldCallback :: MonadIO m => MemVTableTryMallocFieldCallback -> m (GClosure C_MemVTableTryMallocFieldCallback)

-- | 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 () -> CSize -> IO Ptr ()

-- | No description available in the introspection data.
type MemVTableTryReallocFieldCallback = Ptr () -> CSize -> 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 () -> CSize -> m (Ptr ())

-- | Wrap the callback into a GClosure.
genClosure_MemVTableTryReallocFieldCallback :: MonadIO m => MemVTableTryReallocFieldCallback -> m (GClosure C_MemVTableTryReallocFieldCallback)

-- | 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 nodeChildrenForeach.
--   The function is called with each child node, together with the user
--   data passed to nodeChildrenForeach.
type NodeForeachFunc = Node -> Ptr () -> 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 GClosure.
genClosure_NodeForeachFunc :: MonadIO m => NodeForeachFunc -> m (GClosure C_NodeForeachFunc)

-- | 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 nodeTraverse. The
--   function is called with each of the nodes visited, together with the
--   user data passed to nodeTraverse. If the function returns
--   True, then the traversal is stopped.
type NodeTraverseFunc = Node -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_NodeTraverseFunc :: MonadIO m => NodeTraverseFunc -> m (GClosure C_NodeTraverseFunc)

-- | 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 -> Text -> Ptr () -> IO ()

-- | 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 -> OptionGroup -> Ptr () -> IO ()

-- | 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 -> OptionGroup -> Ptr () -> IO ()

-- | 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 -> Word32 -> Int32 -> IO Int32

-- | 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 GClosure.
genClosure_PollFunc :: MonadIO m => PollFunc -> m (GClosure C_PollFunc)

-- | 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 -> 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 GClosure.
genClosure_PrintFunc :: MonadIO m => PrintFunc -> m (GClosure C_PrintFunc)

-- | 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 regexReplaceEval.
--   It is called for each occurrence of the pattern in the string passed
--   to regexReplaceEval, and it should append the replacement to
--   result.
--   
--   Since: 2.14
type RegexEvalCallback = MatchInfo -> String -> IO Bool

-- | Specifies the type of the function passed to regexReplaceEval.
--   It is called for each occurrence of the pattern in the string passed
--   to regexReplaceEval, and it should append the replacement to
--   result.
--   
--   Since: 2.14
type RegexEvalCallback_WithClosures = MatchInfo -> String -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_RegexEvalCallback :: MonadIO m => RegexEvalCallback -> m (GClosure C_RegexEvalCallback)

-- | 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 -> Text -> Bool -> 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 GClosure.
genClosure_ScannerMsgFunc :: MonadIO m => ScannerMsgFunc -> m (GClosure C_ScannerMsgFunc)

-- | 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 -> SequenceIter -> Ptr () -> IO Int32

-- | 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 GClosure.
genClosure_SequenceIterCompareFunc :: MonadIO m => SequenceIterCompareFunc -> m (GClosure C_SequenceIterCompareFunc)

-- | 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 GClosure.
genClosure_SourceCallbackFuncsRefFieldCallback :: MonadIO m => SourceCallbackFuncsRefFieldCallback -> m (GClosure C_SourceCallbackFuncsRefFieldCallback)

-- | 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 GClosure.
genClosure_SourceCallbackFuncsUnrefFieldCallback :: MonadIO m => SourceCallbackFuncsUnrefFieldCallback -> m (GClosure C_SourceCallbackFuncsUnrefFieldCallback)

-- | 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_SourceDisposeFunc = Ptr Source -> IO ()

-- | Dispose function for source. See
--   Source.set_dispose_function() for details.
--   
--   Since: 2.64
type SourceDisposeFunc = Source -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceDisposeFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceDisposeFunc -> Source -> m ()

-- | Wrap the callback into a GClosure.
genClosure_SourceDisposeFunc :: MonadIO m => SourceDisposeFunc -> m (GClosure C_SourceDisposeFunc)

-- | Generate a function pointer callable from C code, from a
--   C_SourceDisposeFunc.
mk_SourceDisposeFunc :: C_SourceDisposeFunc -> IO (FunPtr C_SourceDisposeFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceDisposeFunc.
noSourceDisposeFunc :: Maybe SourceDisposeFunc

-- | Wrap a SourceDisposeFunc into a C_SourceDisposeFunc.
wrap_SourceDisposeFunc :: Maybe (Ptr (FunPtr C_SourceDisposeFunc)) -> SourceDisposeFunc -> C_SourceDisposeFunc

-- | 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 GClosure.
genClosure_SourceDummyMarshal :: MonadIO m => SourceDummyMarshal -> m (GClosure C_SourceDummyMarshal)

-- | 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 timeoutAdd,
--   GLib.timeout_add_full, idleAdd, and
--   GLib.idle_add_full.
--   
--   When calling sourceSetCallback, you may need to cast a function
--   of a different type to this type. Use GLib.SOURCE_FUNC
--   to avoid warnings about incompatible function types.
type SourceFunc = IO Bool

-- | Specifies the type of function passed to timeoutAdd,
--   GLib.timeout_add_full, idleAdd, and
--   GLib.idle_add_full.
--   
--   When calling sourceSetCallback, you may need to cast a function
--   of a different type to this type. Use GLib.SOURCE_FUNC
--   to avoid warnings about incompatible function types.
type SourceFunc_WithClosures = Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_SourceFunc :: MonadIO m => SourceFunc -> m (GClosure C_SourceFunc)

-- | 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_SourceFuncsCheckFunc = Ptr Source -> IO CInt

-- | Checks if the source is ready to be dispatched.
--   
--   Called after all the file descriptors are polled. The source should
--   return True if it is ready to be dispatched. Note that some
--   time may have passed since the previous prepare function was called,
--   so the source should be checked again here.
--   
--   Since 2.36 this may be NULL, in which case the effect is as
--   if the function always returns FALSE.
--   
--   Since: 2.82
type SourceFuncsCheckFunc = Source -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsCheckFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsCheckFunc -> Source -> m Bool

-- | Wrap the callback into a GClosure.
genClosure_SourceFuncsCheckFunc :: MonadIO m => SourceFuncsCheckFunc -> m (GClosure C_SourceFuncsCheckFunc)

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsCheckFunc.
mk_SourceFuncsCheckFunc :: C_SourceFuncsCheckFunc -> IO (FunPtr C_SourceFuncsCheckFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsCheckFunc.
noSourceFuncsCheckFunc :: Maybe SourceFuncsCheckFunc

-- | Wrap a SourceFuncsCheckFunc into a
--   C_SourceFuncsCheckFunc.
wrap_SourceFuncsCheckFunc :: Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc)) -> SourceFuncsCheckFunc -> C_SourceFuncsCheckFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFuncsFinalizeFunc = Ptr Source -> IO ()

-- | Finalizes the source.
--   
--   Called when the source is finalized. At this point, the source will
--   have been destroyed, had its callback cleared, and have been removed
--   from its [typegLib.MainContext], but it will still
--   have its final reference count, so methods can be called on it from
--   within this function.
--   
--   Since: 2.82
type SourceFuncsFinalizeFunc = Source -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsFinalizeFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsFinalizeFunc -> Source -> m ()

-- | Wrap the callback into a GClosure.
genClosure_SourceFuncsFinalizeFunc :: MonadIO m => SourceFuncsFinalizeFunc -> m (GClosure C_SourceFuncsFinalizeFunc)

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsFinalizeFunc.
mk_SourceFuncsFinalizeFunc :: C_SourceFuncsFinalizeFunc -> IO (FunPtr C_SourceFuncsFinalizeFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsFinalizeFunc.
noSourceFuncsFinalizeFunc :: Maybe SourceFuncsFinalizeFunc

-- | Wrap a SourceFuncsFinalizeFunc into a
--   C_SourceFuncsFinalizeFunc.
wrap_SourceFuncsFinalizeFunc :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc)) -> SourceFuncsFinalizeFunc -> C_SourceFuncsFinalizeFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SourceFuncsPrepareFunc = Ptr Source -> Ptr Int32 -> IO CInt

-- | Checks the source for readiness.
--   
--   Called before all the file descriptors are polled. If the source can
--   determine that it is ready here (without waiting for the results of
--   the poll call) it should return True. It can also return a
--   timeout_ value which should be the maximum timeout (in
--   milliseconds) which should be passed to the poll call. The actual
--   timeout used will be -1 if all sources returned -1,
--   or it will be the minimum of all the timeout_ values
--   returned which were greater than or equal to 0. If the
--   prepare function returns a timeout and the source also has a ready
--   time set, then the lower of the two will be used.
--   
--   Since 2.36 this may be NULL, in which case the effect is as
--   if the function always returns FALSE with a timeout of
--   -1.
--   
--   Since: 2.82
type SourceFuncsPrepareFunc = Source -> IO (Bool, Int32)

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceFuncsPrepareFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceFuncsPrepareFunc -> Source -> m (Bool, Int32)

-- | Wrap the callback into a GClosure.
genClosure_SourceFuncsPrepareFunc :: MonadIO m => SourceFuncsPrepareFunc -> m (GClosure C_SourceFuncsPrepareFunc)

-- | Generate a function pointer callable from C code, from a
--   C_SourceFuncsPrepareFunc.
mk_SourceFuncsPrepareFunc :: C_SourceFuncsPrepareFunc -> IO (FunPtr C_SourceFuncsPrepareFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceFuncsPrepareFunc.
noSourceFuncsPrepareFunc :: Maybe SourceFuncsPrepareFunc

-- | Wrap a SourceFuncsPrepareFunc into a
--   C_SourceFuncsPrepareFunc.
wrap_SourceFuncsPrepareFunc :: Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc)) -> SourceFuncsPrepareFunc -> C_SourceFuncsPrepareFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SourceOnceFunc = Ptr () -> IO ()

-- | A source function that is only called once before being removed from
--   the main context automatically.
--   
--   See: GLib.idle_add_once,
--   GLib.timeout_add_once
--   
--   Since: 2.74
type SourceOnceFunc = IO ()

-- | A source function that is only called once before being removed from
--   the main context automatically.
--   
--   See: GLib.idle_add_once,
--   GLib.timeout_add_once
--   
--   Since: 2.74
type SourceOnceFunc_WithClosures = Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SourceOnceFunc :: SourceOnceFunc -> SourceOnceFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SourceOnceFunc :: (HasCallStack, MonadIO m) => FunPtr C_SourceOnceFunc -> Ptr () -> m ()

-- | Wrap the callback into a GClosure.
genClosure_SourceOnceFunc :: MonadIO m => SourceOnceFunc -> m (GClosure C_SourceOnceFunc)

-- | Generate a function pointer callable from C code, from a
--   C_SourceOnceFunc.
mk_SourceOnceFunc :: C_SourceOnceFunc -> IO (FunPtr C_SourceOnceFunc)

-- | A convenience synonym for Nothing :: Maybe
--   SourceOnceFunc.
noSourceOnceFunc :: Maybe SourceOnceFunc

-- | A convenience synonym for Nothing :: Maybe
--   SourceOnceFunc_WithClosures.
noSourceOnceFunc_WithClosures :: Maybe SourceOnceFunc_WithClosures

-- | Wrap a SourceOnceFunc into a C_SourceOnceFunc.
wrap_SourceOnceFunc :: Maybe (Ptr (FunPtr C_SourceOnceFunc)) -> SourceOnceFunc_WithClosures -> C_SourceOnceFunc

-- | 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 = Ptr () -> IO ()

-- | 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 GClosure.
genClosure_SpawnChildSetupFunc :: MonadIO m => SpawnChildSetupFunc -> m (GClosure C_SpawnChildSetupFunc)

-- | 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

-- | Wrap a SpawnChildSetupFunc into a C_SpawnChildSetupFunc.
wrap_SpawnChildSetupFunc :: Maybe (Ptr (FunPtr C_SpawnChildSetupFunc)) -> SpawnChildSetupFunc -> 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 () -> 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 GClosure.
genClosure_TestDataFunc :: MonadIO m => TestDataFunc -> m (GClosure C_TestDataFunc)

-- | 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 () -> 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 () -> Ptr () -> 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 GClosure.
genClosure_TestFixtureFunc :: MonadIO m => TestFixtureFunc -> m (GClosure C_TestFixtureFunc)

-- | 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 GClosure.
genClosure_TestFunc :: MonadIO m => TestFunc -> m (GClosure C_TestFunc)

-- | 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 -> [LogLevelFlags] -> Text -> IO Bool

-- | Specifies the prototype of fatal log handler functions.
--   
--   Since: 2.22
type TestLogFatalFunc_WithClosures = Text -> [LogLevelFlags] -> Text -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_TestLogFatalFunc :: MonadIO m => TestLogFatalFunc -> m (GClosure C_TestLogFatalFunc)

-- | 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
--   threadNew or threadTryNew.
type ThreadFunc = Ptr () -> IO Ptr ()

-- | 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 GClosure.
genClosure_ThreadFunc :: MonadIO m => ThreadFunc -> m (GClosure C_ThreadFunc)

-- | 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 -> Ptr () -> IO Text

-- | 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 GClosure.
genClosure_TranslateFunc :: MonadIO m => TranslateFunc -> m (GClosure C_TranslateFunc)

-- | 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 treeTraverse. It is
--   passed the key and value of each node, together with the
--   userData parameter passed to treeTraverse. If
--   the function returns True, the traversal is stopped.
type TraverseFunc = Ptr () -> Ptr () -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_TraverseFunc :: MonadIO m => TraverseFunc -> m (GClosure C_TraverseFunc)

-- | 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_TraverseNodeFunc = Ptr TreeNode -> Ptr () -> IO CInt

-- | Specifies the type of function passed to treeForeachNode. It is
--   passed each node, together with the userData parameter
--   passed to treeForeachNode. If the function returns True,
--   the traversal is stopped.
--   
--   Since: 2.68
type TraverseNodeFunc = TreeNode -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TraverseNodeFunc :: (HasCallStack, MonadIO m) => FunPtr C_TraverseNodeFunc -> TreeNode -> Ptr () -> m Bool

-- | Wrap the callback into a GClosure.
genClosure_TraverseNodeFunc :: MonadIO m => TraverseNodeFunc -> m (GClosure C_TraverseNodeFunc)

-- | Generate a function pointer callable from C code, from a
--   C_TraverseNodeFunc.
mk_TraverseNodeFunc :: C_TraverseNodeFunc -> IO (FunPtr C_TraverseNodeFunc)

-- | A convenience synonym for Nothing :: Maybe
--   TraverseNodeFunc.
noTraverseNodeFunc :: Maybe TraverseNodeFunc

-- | Wrap a TraverseNodeFunc into a C_TraverseNodeFunc.
wrap_TraverseNodeFunc :: Maybe (Ptr (FunPtr C_TraverseNodeFunc)) -> TraverseNodeFunc -> C_TraverseNodeFunc

-- | 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 -> [IOCondition] -> IO Bool

-- | The type of functions to be called when a UNIX fd watch source
--   triggers.
type UnixFDSourceFunc_WithClosures = Int32 -> [IOCondition] -> Ptr () -> IO Bool

-- | 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 GClosure.
genClosure_UnixFDSourceFunc :: MonadIO m => UnixFDSourceFunc -> m (GClosure C_UnixFDSourceFunc)

-- | 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 GClosure.
genClosure_VoidFunc :: MonadIO m => VoidFunc -> m (GClosure C_VoidFunc)

-- | 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 GTree struct is an opaque data structure representing a
--   balanced binary tree. 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

-- | 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 treeNewFull. 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 ()

-- | Calls the given function for each of the key/value pairs in the
--   Tree. The function is passed the key and value of each pair,
--   and the given data parameter. The tree is traversed in
--   sorted order.
--   
--   The tree may not be modified while iterating over it (you can't
--   add/remove items). To remove all items matching a predicate, you need
--   to add each item to a list in your TraverseFunc as you walk
--   over the tree, then walk the list and remove each item.
treeForeach :: (HasCallStack, MonadIO m) => Tree -> TraverseFunc -> m ()

-- | Calls the given function for each of the nodes in the Tree. The
--   function is passed the pointer to the particular node, and the given
--   data parameter. The tree traversal happens in-order.
--   
--   The tree may not be modified while iterating over it (you can't
--   add/remove items). To remove all items matching a predicate, you need
--   to add each item to a list in your TraverseFunc as you walk
--   over the tree, then walk the list and remove each item.
--   
--   Since: 2.68
treeForeachNode :: (HasCallStack, MonadIO m) => Tree -> TraverseNodeFunc -> 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.
--   
--   Inserts a new key and value into a Tree as
--   treeInsertNode does, only this function does not return the
--   inserted or set node.
treeInsert :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m ()

-- | 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. The cost of maintaining a balanced tree while inserting new
--   key/value result in a O(n log(n)) operation where most of the other
--   operations are O(log(n)).
--   
--   Since: 2.68
treeInsertNode :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m (Maybe TreeNode)

-- | 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 () -> m (Bool, Ptr (), Ptr ())

-- | Gets the tree node 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).
--   
--   Since: 2.68
treeLookupNode :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Maybe TreeNode)

-- | Gets the lower bound node corresponding to the given key, or
--   Nothing if the tree is empty or all the nodes in the tree have
--   keys that are strictly lower than the searched key.
--   
--   The lower bound is the first node that has its key greater than or
--   equal to the searched key.
--   
--   Since: 2.68
treeLowerBound :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Maybe TreeNode)

-- | Creates a new Tree like g_tree_new() and allows
--   to specify functions to free the memory allocated for the key and
--   value that get called when removing the entry from the Tree.
treeNewFull :: (HasCallStack, MonadIO m) => CompareDataFunc -> DestroyNotify -> m Tree

-- | Gets the number of nodes in a Tree.
treeNnodes :: (HasCallStack, MonadIO m) => Tree -> m Int32

-- | Returns the first in-order node of the tree, or Nothing for an
--   empty tree.
--   
--   Since: 2.68
treeNodeFirst :: (HasCallStack, MonadIO m) => Tree -> m (Maybe TreeNode)

-- | Returns the last in-order node of the tree, or Nothing for an
--   empty tree.
--   
--   Since: 2.68
treeNodeLast :: (HasCallStack, MonadIO m) => Tree -> m (Maybe TreeNode)

-- | Increments the reference count of tree by one.
--   
--   It is safe to call this function from any thread.
--   
--   Since: 2.22
treeRef :: (HasCallStack, MonadIO m) => Tree -> m Tree

-- | Removes a key/value pair from a Tree.
--   
--   If the Tree was created using treeNewFull, 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.
--   
--   The cost of maintaining a balanced tree while removing a key/value
--   result in a O(n log(n)) operation where most of the other operations
--   are O(log(n)).
treeRemove :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m Bool

-- | Removes all nodes from a Tree and destroys their keys and
--   values, then resets the Tree’s root to Nothing.
--   
--   Since: 2.70
treeRemoveAll :: (HasCallStack, MonadIO m) => Tree -> m ()

-- | Inserts a new key and value into a Tree as
--   treeReplaceNode does, only this function does not return the
--   inserted or set node.
treeReplace :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m ()

-- | Inserts a new key and value into a Tree similar to
--   treeInsertNode. 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.
--   
--   Since: 2.68
treeReplaceNode :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m (Maybe TreeNode)

-- | Searches a Tree using searchFunc.
--   
--   The searchFunc is called with a pointer to the key of
--   a key/value pair in the tree, and the passed in
--   userData. If searchFunc returns 0 for
--   a key/value pair, then the corresponding value is returned as the
--   result of treeSearch. If searchFunc returns -1,
--   searching will proceed among the key/value pairs that have a smaller
--   key; if searchFunc returns 1, searching will proceed
--   among the key/value pairs that have a larger key.
treeSearch :: (HasCallStack, MonadIO m) => Tree -> CompareFunc -> m (Ptr ())

-- | Searches a Tree using searchFunc.
--   
--   The searchFunc is called with a pointer to the key of
--   a key/value pair in the tree, and the passed in
--   userData. If searchFunc returns 0 for
--   a key/value pair, then the corresponding node is returned as the
--   result of treeSearch. If searchFunc returns -1,
--   searching will proceed among the key/value pairs that have a smaller
--   key; if searchFunc returns 1, searching will proceed
--   among the key/value pairs that have a larger key.
--   
--   Since: 2.68
treeSearchNode :: (HasCallStack, MonadIO m) => Tree -> CompareFunc -> m (Maybe TreeNode)

-- | 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

-- | Calls the given function for each node in the Tree.

-- | Deprecated: (Since version 2.2)The order of a balanced tree is
--   somewhat arbitrary.If you just want to visit all nodes in sorted
--   order, usetreeForeach instead. If you really need to visit
--   nodes ina different order, consider using an n-ary tree.
treeTraverse :: (HasCallStack, MonadIO m) => Tree -> TraverseFunc -> TraverseType -> m ()

-- | 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 ()

-- | Gets the upper bound node corresponding to the given key, or
--   Nothing if the tree is empty or all the nodes in the tree have
--   keys that are lower than or equal to the searched key.
--   
--   The upper bound is the first node that has its key strictly greater
--   than the searched key.
--   
--   Since: 2.68
treeUpperBound :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Maybe TreeNode)
instance GHC.Classes.Eq GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Tree.Tree)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Tree.Tree

-- | The GThreadPool struct represents a thread pool.
--   
--   A thread pool is useful when you wish to asynchronously fork out the
--   execution of work and continue working in your own thread. If that
--   will happen often, the overhead of starting and destroying a thread
--   each time might be too high. In such cases reusing already started
--   threads seems like a good idea. And it indeed is, but implementing
--   this can be tedious and error-prone.
--   
--   Therefore GLib provides thread pools for your convenience. An added
--   advantage is, that the threads can be shared between the different
--   subsystems of your program, when they are using GLib.
--   
--   To create a new thread pool, you use
--   ThreadPool.new(). It is destroyed by
--   threadPoolFree.
--   
--   If you want to execute a certain task within a thread pool, use
--   threadPoolPush.
--   
--   To get the current number of running threads you call
--   threadPoolGetNumThreads. To get the number of still unprocessed
--   tasks you call threadPoolUnprocessed. To control the maximum
--   number of threads for a thread pool, you use
--   threadPoolGetMaxThreads. and threadPoolSetMaxThreads.
--   
--   Finally you can control the number of unused threads, that are kept
--   alive by GLib for future use. The current number can be fetched with
--   threadPoolGetNumUnusedThreads. The maximum number can be
--   controlled by threadPoolGetMaxUnusedThreads and
--   threadPoolSetMaxUnusedThreads. All currently unused threads can
--   be stopped by calling threadPoolStopUnusedThreads.
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

-- | 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, this function does not return
--   before all tasks to be processed (dependent on
--   immediate, whether all or only the currently running)
--   are ready. Otherwise this 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 8 since GLib 2.84. Previously the default value
--   was 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.BoxedPtr GI.GLib.Structs.ThreadPool.ThreadPool
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.ThreadPool.ThreadPool
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ThreadPool.ThreadPool tag
instance GHC.Classes.Eq GI.GLib.Structs.ThreadPool.ThreadPool
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ThreadPool.ThreadPool

-- | The Thread struct represents a running thread. This struct is
--   returned by threadNew or threadTryNew. 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

-- | Construct a Thread struct initialized to zero.
newZeroThread :: MonadIO m => m 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 threadNew.
--   
--   You must only call threadExit from a thread that you created
--   yourself with threadNew 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 ()

-- | Gets the name of the thread.
--   
--   This function is intended for debugging purposes.
--   
--   Since: 2.84
threadGetName :: (HasCallStack, MonadIO m) => Thread -> m Text

-- | Waits until thread finishes, i.e. the function
--   func, as given to threadNew, 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 ())

-- | This function creates a new thread. The new thread starts by invoking
--   func with the argument data. The thread will run until
--   func returns or until threadExit is called from
--   the new thread. The return value of func becomes the
--   return value of the thread, which can be obtained with
--   threadJoin.
--   
--   The name can be useful for discriminating threads in a
--   debugger. It is not used for other purposes and does not have to be
--   unique. Some systems restrict the length of name to 16
--   bytes.
--   
--   If the thread can not be created the program aborts. See
--   threadTryNew if you want to attempt to deal with failures.
--   
--   If you are using threads to offload (potentially many) short-lived
--   tasks, ThreadPool may be more appropriate than manually
--   spawning and tracking multiple GThreads.
--   
--   To free the struct returned by this function, use threadUnref.
--   Note that threadJoin implicitly unrefs the Thread as
--   well.
--   
--   New threads by default inherit their scheduler policy (POSIX) or
--   thread priority (Windows) of the thread creating the new thread.
--   
--   This behaviour changed in GLib 2.64: before threads on Windows were
--   not inheriting the thread priority but were spawned with the default
--   priority. Starting with GLib 2.64 the behaviour is now consistent
--   between Windows and POSIX and all threads inherit their parent
--   thread's priority.
--   
--   Since: 2.32
threadNew :: (HasCallStack, MonadIO m) => Maybe Text -> ThreadFunc -> m Thread

-- | 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

-- | This function is the same as threadNew except that it allows
--   for the possibility of failure.
--   
--   If a thread can not be created (due to resource limits),
--   error is set and Nothing is returned.
--   
--   Since: 2.32
threadTryNew :: (HasCallStack, MonadIO m) => Maybe Text -> ThreadFunc -> 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Thread.Thread tag
instance GHC.Classes.Eq GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Thread.Thread)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Thread.Thread

-- | 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

-- | 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 SourceFuncsCheckFunc)

-- | 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_SourceFuncsCheckFunc -> 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 SourceFuncsFinalizeFunc)

-- | 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_SourceFuncsFinalizeFunc -> 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 SourceFuncsPrepareFunc)

-- | 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_SourceFuncsPrepareFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.SourceFuncs.SourceFuncs
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.SourceFuncs.SourceFuncs
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.SourceFuncs.SourceFuncs tag
instance GHC.Classes.Eq GI.GLib.Structs.SourceFuncs.SourceFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SourceFuncs.SourceFuncs

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs tag
instance GHC.Classes.Eq GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs

-- | 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

-- | 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.
--   
--   The 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).
--   
--   The 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
--   g_source_add_unix_fd() 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 file descriptor 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.
--   
--   This function is safe to call from any thread, regardless of which
--   thread the context is running in.
sourceAttach :: (HasCallStack, MonadIO m) => Source -> Maybe MainContext -> m Word32

-- | Removes a source from its MainContext, if any, and marks 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.
--   
--   This does not unref the Source: if you still hold a reference,
--   use sourceUnref to drop it.
--   
--   This function is safe to call from any thread, regardless of which
--   thread the MainContext is running in.
--   
--   If the source is currently attached to a MainContext,
--   destroying it will effectively unset the callback similar to calling
--   sourceSetCallback. This can mean, that the data’s
--   [callbackgLib.DestroyNotify] gets called right away.
sourceDestroy :: (HasCallStack, MonadIO m) => Source -> m ()

-- | Gets a reference to the MainContext with which the source is
--   associated.
--   
--   You can call this on a source that has been destroyed. You can always
--   call this function on the source returned from
--   mainCurrentSource.
--   
--   Since: 2.86
sourceDupContext :: (HasCallStack, MonadIO m) => Source -> m (Maybe MainContext)

-- | 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.
--   
--   If the associated MainContext could be destroy concurrently
--   from a different thread, then this function is not safe to call and
--   sourceDupContext should be used instead.
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 (Maybe 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 or equal to the current monotonic time (including
--   zero) 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;
--      
--     g_mutex_lock (&self->idle_id_mutex);
--     // do stuff with self
--     self->idle_id = 0;
--     g_mutex_unlock (&self->idle_id_mutex);
--      
--     return G_SOURCE_REMOVE;
--   }
--    
--   static void
--   some_widget_do_stuff_later (SomeWidget *self)
--   {
--     g_mutex_lock (&self->idle_id_mutex);
--     self->idle_id = g_idle_add (idle_callback, self);
--     g_mutex_unlock (&self->idle_id_mutex);
--   }
--    
--   static void
--   some_widget_init (SomeWidget *self)
--   {
--     g_mutex_init (&self->idle_id_mutex);
--   
--     // ...
--   }
--   
--   static void
--   some_widget_finalize (GObject *object)
--   {
--     SomeWidget *self = SOME_WIDGET (object);
--      
--     if (self->idle_id)
--       g_source_remove (self->idle_id);
--      
--     g_mutex_clear (&self->idle_id_mutex);
--   
--     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;
--     
--     g_mutex_lock (&self->idle_id_mutex);
--     if (!g_source_is_destroyed (g_main_current_source ()))
--       {
--         // do stuff with self
--       }
--     g_mutex_unlock (&self->idle_id_mutex);
--     
--     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 file descriptor identified by
--   tag.
--   
--   The tag is the tag returned from
--   sourceAddUnixFd.
--   
--   If you want to remove a file descriptor, 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 file descriptor 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, idleAdd,
--   GLib.idle_add_full, timeoutAdd,
--   GLib.timeout_add_full, childWatchAdd,
--   GLib.child_watch_add_full, ioAddWatch, and
--   GLib.io_add_watch_full.
--   
--   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 idleAdd: 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 a file descriptor
--   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 GLib.SOURCE_FUNC to avoid warnings about
--   incompatible function types.
--   
--   See main loop 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 idleAdd or
--   timeoutAdd.
--   
--   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.
--   
--   Note that sourceDestroy for a currently attached source has the
--   effect of also unsetting the callback.
sourceSetCallback :: (HasCallStack, MonadIO m) => Source -> SourceFunc -> m ()

-- | Sets the callback function storing the data as a reference counted
--   callback ‘object’.
--   
--   This is used internally. Note that calling
--   sourceSetCallbackIndirect assumes an initial reference count on
--   callbackData, and thus
--   callback_funcs->unref will eventually be called once more
--   than callback_funcs->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 of an unattached source.
--   
--   These can be used to override the default implementations for the type
--   of 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’.
--   
--   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.
--   
--   Also see sourceSetStaticName.
--   
--   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 idleAdd, timeoutAdd, 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 idleAdd: 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 ()

-- | A variant of sourceSetName that does not duplicate the
--   name, and can only be used with string literals.
--   
--   Since: 2.70
sourceSetStaticName :: (HasCallStack, MonadIO m) => Source -> Text -> 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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Source.Source tag
instance GHC.Classes.Eq GI.GLib.Structs.Source.Source
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Source.Source
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Source.Source
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Source.Source)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Source.Source
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Source.Source

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.SequenceIter.SequenceIter
instance GHC.Classes.Eq GI.GLib.Structs.SequenceIter.SequenceIter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SequenceIter.SequenceIter

-- | The Sequence struct is an opaque data type representing a
--   sequence data type.
module GI.GLib.Structs.Sequence

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

-- | Adds a new item to the end of seq.
--   
--   Since: 2.14
sequenceAppend :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> m SequenceIter

-- | Calls func for each item in the sequence passing
--   userData to the function. func must
--   not modify the sequence itself.
--   
--   Since: 2.14
sequenceForeach :: (HasCallStack, MonadIO m) => Sequence -> Func -> m ()

-- | Calls func for each item in the range
--   (begin, end) passing
--   userData to the function. func must
--   not modify the sequence itself.
--   
--   Since: 2.14
sequenceForeachRange :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> Func -> m ()

-- | 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 positive length (>= 0) 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

-- | Inserts data into seq using
--   cmpFunc to determine the new position. The sequence
--   must already be sorted according to cmpFunc; otherwise
--   the new position of data is undefined.
--   
--   cmpFunc is called with two items of the
--   seq, and cmpData. It should return 0
--   if the items are equal, a negative value if the first item comes
--   before the second, and a positive value if the second item comes
--   before the first.
--   
--   Note that when adding a large amount of data to a Sequence, it
--   is more efficient to do unsorted insertions and then call
--   sequenceSort or sequenceSortIter.
--   
--   Since: 2.14
sequenceInsertSorted :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m SequenceIter

-- | Like sequenceInsertSorted, but uses a
--   SequenceIterCompareFunc instead of a CompareDataFunc as
--   the compare function.
--   
--   iterCmp is called with two iterators pointing into
--   seq. It should return 0 if the iterators are equal, a
--   negative value if the first iterator comes before the second, and a
--   positive value if the second iterator comes before the first.
--   
--   Note that when adding a large amount of data to a Sequence, it
--   is more efficient to do unsorted insertions and then call
--   sequenceSort or sequenceSortIter.
--   
--   Since: 2.14
sequenceInsertSortedIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> 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

-- | Returns an iterator pointing to the position of the first item found
--   equal to data according to cmpFunc and
--   cmpData. If more than one item is equal, it is not
--   guaranteed that it is the first which is returned. In that case, you
--   can use sequenceIterNext and sequenceIterPrev to get
--   others.
--   
--   cmpFunc is called with two items of the
--   seq, and cmpData. It should return 0
--   if the items are equal, a negative value if the first item comes
--   before the second, and a positive value if the second item comes
--   before the first.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   Since: 2.28
sequenceLookup :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m (Maybe SequenceIter)

-- | Like sequenceLookup, but uses a SequenceIterCompareFunc
--   instead of a CompareDataFunc as the compare function.
--   
--   iterCmp is called with two iterators pointing into
--   seq. It should return 0 if the iterators are equal, a
--   negative value if the first iterator comes before the second, and a
--   positive value if the second iterator comes before the first.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   Since: 2.28
sequenceLookupIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> m (Maybe SequenceIter)

-- | 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 ()

-- | Returns an iterator pointing to the position where
--   data would be inserted according to
--   cmpFunc and cmpData.
--   
--   cmpFunc is called with two items of the
--   seq, and cmpData. It should return 0
--   if the items are equal, a negative value if the first item comes
--   before the second, and a positive value if the second item comes
--   before the first.
--   
--   If you are simply searching for an existing element of the sequence,
--   consider using sequenceLookup.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   Since: 2.14
sequenceSearch :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m SequenceIter

-- | Like sequenceSearch, but uses a SequenceIterCompareFunc
--   instead of a CompareDataFunc as the compare function.
--   
--   iterCmp is called with two iterators pointing into
--   seq. It should return 0 if the iterators are equal, a
--   negative value if the first iterator comes before the second, and a
--   positive value if the second iterator comes before the first.
--   
--   If you are simply searching for an existing element of the sequence,
--   consider using sequenceLookupIter.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   Since: 2.14
sequenceSearchIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> m SequenceIter

-- | 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 ()

-- | Sorts seq using cmpFunc.
--   
--   cmpFunc is passed two items of seq and
--   should return 0 if they are equal, a negative value if the first comes
--   before the second, and a positive value if the second comes before the
--   first.
--   
--   Since: 2.14
sequenceSort :: (HasCallStack, MonadIO m) => Sequence -> CompareDataFunc -> m ()

-- | Moves the data pointed to by iter to a new position as
--   indicated by cmpFunc. This function should be called
--   for items in a sequence already sorted according to
--   cmpFunc whenever some aspect of an item changes so
--   that cmpFunc may return different values for that
--   item.
--   
--   cmpFunc is called with two items of the
--   seq, and cmpData. It should return 0
--   if the items are equal, a negative value if the first item comes
--   before the second, and a positive value if the second item comes
--   before the first.
--   
--   Since: 2.14
sequenceSortChanged :: (HasCallStack, MonadIO m) => SequenceIter -> CompareDataFunc -> m ()

-- | Like sequenceSortChanged, but uses a
--   SequenceIterCompareFunc instead of a CompareDataFunc as
--   the compare function.
--   
--   iterCmp is called with two iterators pointing into the
--   Sequence that iter points into. It should
--   return 0 if the iterators are equal, a negative value if the first
--   iterator comes before the second, and a positive value if the second
--   iterator comes before the first.
--   
--   Since: 2.14
sequenceSortChangedIter :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIterCompareFunc -> m ()

-- | Like sequenceSort, but uses a SequenceIterCompareFunc
--   instead of a CompareDataFunc as the compare function
--   
--   cmpFunc is called with two iterators pointing into
--   seq. It should return 0 if the iterators are equal, a
--   negative value if the first iterator comes before the second, and a
--   positive value if the second iterator comes before the first.
--   
--   Since: 2.14
sequenceSortIter :: (HasCallStack, MonadIO m) => Sequence -> SequenceIterCompareFunc -> 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.BoxedPtr GI.GLib.Structs.Sequence.Sequence
instance GHC.Classes.Eq GI.GLib.Structs.Sequence.Sequence
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Sequence.Sequence

-- | GScanner provides a general-purpose 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

-- | 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 ()

-- | Calls the given function for each of the symbol/value pairs in the
--   given scope of the Scanner. The function is passed the symbol
--   and value of each pair, and the given userData
--   parameter.
scannerScopeForeachSymbol :: (HasCallStack, MonadIO m) => Scanner -> Word32 -> HFunc -> 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.BoxedPtr GI.GLib.Structs.Scanner.Scanner
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Scanner.Scanner
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Scanner.Scanner tag
instance GHC.Classes.Eq GI.GLib.Structs.Scanner.Scanner
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Scanner.Scanner

-- | A GRegex is a compiled form of a regular expression.
--   
--   After instantiating a GRegex, you can use its methods to find
--   matches in a string, replace matches within a string, or split the
--   string at matches.
--   
--   GRegex implements regular expression pattern matching using
--   syntax and semantics (such as character classes, quantifiers, and
--   capture groups) similar to Perl regular expression. See the PCRE
--   documentation) for details.
--   
--   A typical scenario for regex pattern matching is to check if a string
--   matches a pattern. The following statements implement this scenario.
--   
--   
{ .c } code
--   
--   
--   const char *regex_pattern = ".*GLib.*";
--   const char *string_to_search = "You will love the GLib implementation of regex";
--   g_autoptr(GMatchInfo) match_info = NULL;
--   g_autoptr(GRegex) regex = NULL;
--   
--   regex = g_regex_new (regex_pattern, G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
--   g_assert (regex != NULL);
--   
--   if (g_regex_match (regex, string_to_search, G_REGEX_MATCH_DEFAULT, &match_info))
--     {
--       int start_pos, end_pos;
--       g_match_info_fetch_pos (match_info, 0, &start_pos, &end_pos);
--       g_print ("Match successful! Overall pattern matches bytes %d to %d\n", start_pos, end_pos);
--     }
--   else
--     {
--       g_print ("No match!\n");
--     }
--   
--   
--   The constructor for GRegex includes two sets of bitmapped
--   flags:
--   
--   
--   
- [flagsgLib.RegexCompileFlags]—These flags control
--   how GLib compiles the regex. There are options for case sensitivity,
--   multiline, ignoring whitespace, etc.
--   
- [flagsgLib.RegexMatchFlags]—These flags control
--   GRegex’s matching behavior, such as anchoring and customizing
--   definitions for newline characters.
--   
--   
--   Some regex patterns include backslash assertions, such as \d
--   (digit) or \D (non-digit). The regex pattern must escape
--   those backslashes. For example, the pattern "\\d\\D" matches
--   a digit followed by a non-digit.
--   
--   GLib’s implementation of pattern matching includes a
--   start_position argument for some of the match, replace, and
--   split methods. Specifying a start position provides flexibility when
--   you want to ignore the first _n_ characters of a string, but want to
--   incorporate backslash assertions at character _n_ - 1. For example, a
--   database field contains inconsistent spelling for a job title:
--   healthcare provider and health-care provider. The
--   database manager wants to make the spelling consistent by adding a
--   hyphen when it is missing. The following regex pattern tests for the
--   string care preceded by a non-word boundary character
--   (instead of a hyphen) and followed by a space.
--   
--   
{ .c } code
--   
--   
--   const char *regex_pattern = "\\Bcare\\s";
--   
--   
--   An efficient way to match with this pattern is to start examining at
--   start_position 6 in the string healthcare or
--   health-care.
--   
--   
{ .c } code
--   
--   
--   const char *regex_pattern = "\\Bcare\\s";
--   const char *string_to_search = "healthcare provider";
--   g_autoptr(GMatchInfo) match_info = NULL;
--   g_autoptr(GRegex) regex = NULL;
--   
--   regex = g_regex_new (
--     regex_pattern,
--     G_REGEX_DEFAULT,
--     G_REGEX_MATCH_DEFAULT,
--     NULL);
--   g_assert (regex != NULL);
--   
--   g_regex_match_full (
--     regex,
--     string_to_search,
--     -1,
--     6, // position of 'c' in the test string.
--     G_REGEX_MATCH_DEFAULT,
--     &match_info,
--     NULL);
--   
--   
--   The method regexMatchFull (and other methods implementing
--   start_pos) allow for lookback before the start position to
--   determine if the previous character satisfies an assertion.
--   
--   Unless you set the [flagsgLib.RegexCompileFlags.RAW]
--   as one of the GRegexCompileFlags, all the strings passed to
--   GRegex methods 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.
--   
--   Regarding line endings, \n matches a \n character,
--   and \r matches a \r character. More generally,
--   \R matches all typical line endings: CR + LF (\r\n),
--   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), and PS (paragraph separator, U+2029).
--   
--   The behaviour of the dot, circumflex, and dollar metacharacters are
--   affected by newline characters. By default, GRegex matches
--   any newline character matched by \R. You can limit the
--   matched newline characters by specifying the
--   [flagsgLib.RegexMatchFlags.NEWLINE_CR],
--   [flagsgLib.RegexMatchFlags.NEWLINE_LF], and
--   [flagsgLib.RegexMatchFlags.NEWLINE_CRLF] compile
--   options, and with
--   [flagsgLib.RegexMatchFlags.NEWLINE_ANY],
--   [flagsgLib.RegexMatchFlags.NEWLINE_CR],
--   [flagsgLib.RegexMatchFlags.NEWLINE_LF] and
--   [flagsgLib.RegexMatchFlags.NEWLINE_CRLF] match
--   options. These settings are also relevant when compiling a pattern if
--   [flagsgLib.RegexCompileFlags.EXTENDED] is set and an
--   unescaped # outside a character class is encountered. This
--   indicates a comment that lasts until after the next newline.
--   
--   Because GRegex does not modify its internal state between
--   creation and destruction, you can create and modify the same
--   GRegex instance from different threads. In contrast,
--   MatchInfo is not thread safe.
--   
--   The regular expression 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

-- | 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 -> Int32 -> 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]+", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, 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 RegexMatchFlagsNotbol 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 RegexMatchFlagsNotbol 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]+", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, 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
--   RegexCompileFlagsRaw was passed to regexNew. If you want
--   to use not UTF-8 encoded strings you can use
--   regexReplaceLiteral.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting RegexMatchFlagsNotbol 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 occurrences of the pattern in regex with the output of
--   eval for that occurrence.
--   
--   Setting startPosition differs from just passing over a
--   shortened string and setting RegexMatchFlagsNotbol in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   The following example uses regexReplaceEval to replace multiple
--   strings at once:
--   
--   
C code
--   
--   
--   static gboolean
--   eval_cb (const GMatchInfo *info,
--            GString          *res,
--            gpointer          data)
--   {
--     gchar *match;
--     gchar *r;
--   
--      match = g_match_info_fetch (info, 0);
--      r = g_hash_table_lookup ((GHashTable *)data, match);
--      g_string_append (res, r);
--      g_free (match);
--   
--      return FALSE;
--   }
--   
--   ...
--   
--   GRegex *reg;
--   GHashTable *h;
--   gchar *res;
--   
--   h = g_hash_table_new (g_str_hash, g_str_equal);
--   
--   g_hash_table_insert (h, "1", "ONE");
--   g_hash_table_insert (h, "2", "TWO");
--   g_hash_table_insert (h, "3", "THREE");
--   g_hash_table_insert (h, "4", "FOUR");
--   
--   reg = g_regex_new ("1|2|3|4", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
--   res = g_regex_replace_eval (reg, text, -1, 0, 0, eval_cb, h, NULL);
--   g_hash_table_destroy (h);
--   
--   ...
--   
--   
--   Since: 2.14
regexReplaceEval :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> RegexEvalCallback -> 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 RegexMatchFlagsNotbol 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 an 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 an 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 RegexMatchFlagsNotbol 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 an 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 GHC.Classes.Eq GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.Regex.Regex)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Regex.Regex

-- | Contains the public fields of a Queue.
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

-- | 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 ()

-- | Calls func for each element in the queue passing
--   userData to the function.
--   
--   It is safe for func to remove the element from
--   queue, but it must not modify any part of the queue
--   after that element.
--   
--   Since: 2.4
queueForeach :: (HasCallStack, MonadIO m) => Queue -> Func -> 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 ()

-- | Inserts data into queue using
--   func to determine the new position.
--   
--   Since: 2.4
queueInsertSorted :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> CompareDataFunc -> 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 ()

-- | Sorts queue using compareFunc.
--   
--   Since: 2.4
queueSort :: (HasCallStack, MonadIO m) => Queue -> CompareDataFunc -> 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.BoxedPtr GI.GLib.Structs.Queue.Queue
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Queue.Queue
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Queue.Queue tag
instance GHC.Classes.Eq GI.GLib.Structs.Queue.Queue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Queue.Queue

-- | 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

-- | 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.
--   
--   description is typically used to provide a title for
--   the group. If so, it is recommended that it’s written in title case,
--   and has a trailing colon so that it matches the style of built-in GLib
--   group titles such as ‘Application Options:’.
--   
--   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 GHC.Classes.Eq GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.OptionGroup.OptionGroup)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.BasicTypes.TypedObject 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

-- | 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 ()

-- | 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 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.BoxedPtr GI.GLib.Structs.OptionContext.OptionContext
instance GHC.Classes.Eq GI.GLib.Structs.OptionContext.OptionContext
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionContext.OptionContext

-- | The Node struct represents one node in a n-ary tree.
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

-- | 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

-- | Calls a function for each of the children of a Node. Note that
--   it doesn't descend beneath the child nodes. func must
--   not do anything that would modify the structure of the tree.
nodeChildrenForeach :: (HasCallStack, MonadIO m) => Node -> [TraverseFlags] -> NodeForeachFunc -> m ()

-- | 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

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
nodePopAllocator :: (HasCallStack, MonadIO m) => m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
nodePushAllocator :: (HasCallStack, MonadIO m) => Allocator -> m ()

-- | Reverses the order of the children of a Node. (It doesn't
--   change the order of the grandchildren.)
nodeReverseChildren :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Traverses a tree starting at the given root Node. It calls the
--   given function for each node visited. The traversal can be halted at
--   any point by returning True from func.
--   func must not do anything that would modify the
--   structure of the tree.
nodeTraverse :: (HasCallStack, MonadIO m) => Node -> TraverseType -> [TraverseFlags] -> Int32 -> NodeTraverseFunc -> 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.BoxedPtr GI.GLib.Structs.Node.Node
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Node.Node
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Node.Node tag
instance GHC.Classes.Eq GI.GLib.Structs.Node.Node
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Node.Node

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.MemVTable.MemVTable
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.MemVTable.MemVTable
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.MemVTable.MemVTable tag
instance GHC.Classes.Eq GI.GLib.Structs.MemVTable.MemVTable
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MemVTable.MemVTable

-- | 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

-- | 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
--   RegexCompileFlagsRaw 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) => Maybe 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.
--   
--   As endPos is set to the byte after the final byte of
--   the match (on success), the length of the match can be calculated as
--   end_pos - start_pos.
--   
--   Since: 2.14
matchInfoFetchNamedPos :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Bool, Int32, Int32)

-- | Returns the start and end positions (in bytes) of a successfully
--   matching capture parenthesis.
--   
--   Valid values for matchNum are 0 for the full
--   text of the match, 1 for the first paren set, 2 for
--   the second, and so on.
--   
--   As endPos is set to the byte after the final byte of
--   the match (on success), the length of the match can be calculated as
--   end_pos - start_pos.
--   
--   As a best practice, initialize startPos and
--   endPos to identifiable values, such as
--   G_MAXINT, so that you can test if
--   g_match_info_fetch_pos() actually changed the value for a
--   given capture parenthesis.
--   
--   The parameter matchNum corresponds to a matched
--   capture parenthesis. The actual value you use for
--   matchNum depends on the method used to generate
--   matchInfo. The following sections describe those
--   methods.
--   
--   
Methods Using Non-deterministic Finite Automata Matching
--   
--   The methods regexMatch and regexMatchFull return a
--   MatchInfo using traditional (greedy) pattern matching, also
--   known as Non-deterministic Finite Automaton (NFA) matching. You
--   pass the returned GMatchInfo from these methods to
--   g_match_info_fetch_pos() to determine the start and end
--   positions of capture parentheses. The values for
--   matchNum correspond to the capture parentheses in
--   order, with 0 corresponding to the entire matched string.
--   
--   matchNum can refer to a capture parenthesis with no
--   match. For example, the string b matches against the pattern
--   (a)?b, but the capture parenthesis (a) has no match.
--   In this case, g_match_info_fetch_pos() returns true and sets
--   startPos and endPos to -1
--   when called with match_num as 1 (for (a)).
--   
--   For an expanded example, a regex pattern is (a)?(.*?)the
--   (.*), and a candidate string is glib regexes are the
--   best. In this scenario there are four capture parentheses
--   numbered 0–3: an implicit one for the entire string, and three
--   explicitly declared in the regex pattern.
--   
--   Given this example, the following table describes the return values
--   from g_match_info_fetch_pos() for various values of
--   matchNum.
--   
--   match_num | Contents | Return value | Returned
--   start_pos | Returned end_pos ----------- | --------
--   | ------------ | -------------------- | ------------------ 0 | Matches
--   entire string | True | 0 | 25 1 | Does not match first character |
--   True | -1 | -1 2 | All text before the  | True | 0 | 17 3 |
--   All text after the  | True | 21 | 25 4 | Capture paren out of
--   range | False | Unchanged | Unchanged
--   
--   The following code sample and output implements this example.
--   
--   
{ .c } code
--   
--   
--   #include <glib.h>
--   
--   int
--   main (int argc, char *argv[])
--   {
--     g_autoptr(GError) local_error = NULL;
--     const char *regex_pattern = "(a)?(.*?)the (.*)";
--     const char *test_string = "glib regexes are the best";
--     g_autoptr(GRegex) regex = NULL;
--   
--     regex = g_regex_new (regex_pattern,
--                          G_REGEX_DEFAULT,
--                          G_REGEX_MATCH_DEFAULT,
--                          &local_error);
--     if (regex == NULL)
--       {
--         g_printerr ("Error creating regex: %s\n", local_error->message);
--         return 1;
--       }
--   
--     g_autoptr(GMatchInfo) match_info = NULL;
--     g_regex_match (regex, test_string, G_REGEX_MATCH_DEFAULT, &match_info);
--   
--     int n_matched_strings = g_match_info_get_match_count (match_info);
--   
--     // Print header line
--     g_print ("match_num Contents                  Return value returned start_pos returned end_pos\n");
--   
--     // Iterate over each capture paren, including one that is out of range as a demonstration.
--     for (int match_num = 0; match_num <= n_matched_strings; match_num++)
--       {
--         gboolean found_match;
--         g_autofree char *paren_string = NULL;
--         int start_pos = G_MAXINT;
--         int end_pos = G_MAXINT;
--   
--         found_match = g_match_info_fetch_pos (match_info,
--                                               match_num,
--                                               &start_pos,
--                                               &end_pos);
--   
--         // If no match, display N/A as the found string.
--         if (start_pos == G_MAXINT || start_pos == -1)
--           paren_string = g_strdup ("N/A");
--         else
--           paren_string = g_strndup (test_string + start_pos, end_pos - start_pos);
--   
--         g_print ("%-9d %-25s %-12d %-18d %d\n", match_num, paren_string, found_match, start_pos, end_pos);
--       }
--   
--     return 0;
--   }
--   
--   
--   
--   match_num Contents                  Return value returned start_pos returned end_pos
--   0         glib regexes are the best 1            0                  25
--   1         N/A                       1            -1                 -1
--   2         glib regexes are          1            0                  17
--   3         best                      1            21                 25
--   4         N/A                       0            2147483647         2147483647
--   
--   
--   
Methods Using Deterministic Finite Automata Matching
--   
--   The methods regexMatchAll and regexMatchAllFull return a
--   GMatchInfo using Deterministic Finite Automaton (DFA)
--   pattern matching. This algorithm detects overlapping matches. You pass
--   the returned GMatchInfo from these methods to
--   g_match_info_fetch_pos() to determine the start and end
--   positions of each overlapping match. Use the method
--   matchInfoGetMatchCount to determine the number of overlapping
--   matches.
--   
--   For example, a regex pattern is <.*>, and a candidate
--   string is <a> <b> <c>. In this scenario
--   there are three implicit capture parentheses: one for the entire
--   string, one for <a> <b>, and one for
--   <a>.
--   
--   Given this example, the following table describes the return values
--   from g_match_info_fetch_pos() for various values of
--   matchNum.
--   
--   match_num | Contents | Return value | Returned
--   start_pos | Returned end_pos ----------- | --------
--   | ------------ | -------------------- | ------------------ 0 | Matches
--   entire string | True | 0 | 11 1 | Matches <a> <b>
--   | True | 0 | 7 2 | Matches <a> | True | 0 | 3 3 |
--   Capture paren out of range | False | Unchanged | Unchanged
--   
--   The following code sample and output implements this example.
--   
--   
{ .c } code
--   
--   
--   #include <glib.h>
--   
--   int
--   main (int argc, char *argv[])
--   {
--     g_autoptr(GError) local_error = NULL;
--     const char *regex_pattern = "<.*>";
--     const char *test_string = "<a> <b> <c>";
--     g_autoptr(GRegex) regex = NULL;
--   
--     regex = g_regex_new (regex_pattern,
--                          G_REGEX_DEFAULT,
--                          G_REGEX_MATCH_DEFAULT,
--                          &local_error);
--     if (regex == NULL)
--       {
--         g_printerr ("Error creating regex: %s\n", local_error->message);
--         return -1;
--       }
--   
--     g_autoptr(GMatchInfo) match_info = NULL;
--     g_regex_match_all (regex, test_string, G_REGEX_MATCH_DEFAULT, &match_info);
--   
--     int n_matched_strings = g_match_info_get_match_count (match_info);
--   
--     // Print header line
--     g_print ("match_num Contents                  Return value returned start_pos returned end_pos\n");
--   
--     // Iterate over each capture paren, including one that is out of range as a demonstration.
--     for (int match_num = 0; match_num <= n_matched_strings; match_num++)
--       {
--         gboolean found_match;
--         g_autofree char *paren_string = NULL;
--         int start_pos = G_MAXINT;
--         int end_pos = G_MAXINT;
--   
--         found_match = g_match_info_fetch_pos (match_info, match_num, &start_pos, &end_pos);
--   
--         // If no match, display N/A as the found string.
--         if (start_pos == G_MAXINT || start_pos == -1)
--           paren_string = g_strdup ("N/A");
--         else
--           paren_string = g_strndup (test_string + start_pos, end_pos - start_pos);
--   
--         g_print ("%-9d %-25s %-12d %-18d %d\n", match_num, paren_string, found_match, start_pos, end_pos);
--       }
--   
--     return 0;
--   }
--   
--   
--   
--   match_num Contents                  Return value returned start_pos returned end_pos
--   0         <a> <b> <c>               1            0                  11
--   1         <a> <b>                   1            0                  7
--   2         <a>                       1            0                  3
--   3         N/A                       0            2147483647         2147483647
--   
--   
--   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) => Maybe 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
--   RegexMatchFlagsPartialSoft and
--   RegexMatchFlagsPartialHard 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 RegexMatchFlagsPartialSoft and
--   RegexMatchFlagsPartialHard is that when a partial match is
--   encountered with RegexMatchFlagsPartialSoft, matching continues
--   to search for a possible complete match, while with
--   RegexMatchFlagsPartialHard matching stops at the partial match.
--   When both RegexMatchFlagsPartialSoft and
--   RegexMatchFlagsPartialHard 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 GHC.Classes.Eq GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.MatchInfo.MatchInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MatchInfo.MatchInfo

-- | 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.
--   
--   Refer to the GMarkup documentation to understand the scope and
--   limitations of GMarkupParser. In particular, it is not a full
--   XML parser and it must not be used to process untrusted data.
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

-- | 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.BoxedPtr GI.GLib.Structs.MarkupParser.MarkupParser
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.MarkupParser.MarkupParser
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.MarkupParser.MarkupParser tag
instance GHC.Classes.Eq GI.GLib.Structs.MarkupParser.MarkupParser
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MarkupParser.MarkupParser

-- | 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

-- | 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 markupParseContextGetElementStack.
--   
--   Since: 2.2
markupParseContextGetElement :: (HasCallStack, MonadIO m) => MarkupParseContext -> m Text

-- | Retrieves the element stack from the internal state of the parser.
--   
--   The returned SList is a list of strings where the first item is
--   the currently open tag (as would be returned by
--   markupParseContextGetElement) and the next item is its
--   immediate parent.
--   
--   This function is intended to be used in the start_element and
--   end_element handlers where markupParseContextGetElement would
--   merely return the name of the element that is being processed.
--   
--   Since: 2.16
markupParseContextGetElementStack :: (HasCallStack, MonadIO m) => MarkupParseContext -> m [Text]

-- | Retrieves the current offset from the beginning of the document, in
--   bytes.
--   
--   The information is meant to accompany the values returned by
--   markupParseContextGetPosition, and comes with the same accuracy
--   guarantees.
--   
--   Since: 2.88
markupParseContextGetOffset :: (HasCallStack, MonadIO m) => MarkupParseContext -> m CSize

-- | Retrieves the current line number and the number of the character on
--   that line. Intended for use in error messages; there are no strict
--   semantics for what constitutes the "current" line number other than
--   "the best number we could come up with for error messages."
markupParseContextGetPosition :: (HasCallStack, MonadIO m) => MarkupParseContext -> m (Int32, Int32)

-- | 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 GHC.Classes.Eq GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.MarkupParseContext.MarkupParseContext)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MarkupParseContext.MarkupParseContext

-- | 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

-- | 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 from 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, the loop and all associated memory are freed.
mainLoopUnref :: (HasCallStack, MonadIO m) => MainLoop -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.MainLoop.MainLoop)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MainLoop.MainLoop

-- | 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

-- | 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,
--   mainContextRelease.
--   
--   Since 2.76 context can be NULL to use the
--   global-default main context.
mainContextAcquire :: (HasCallStack, MonadIO m) => Maybe 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 g_source_add_unix_fd() instead.
mainContextAddPoll :: (HasCallStack, MonadIO m) => Maybe MainContext -> PollFD -> Int32 -> m ()

-- | Passes the results of polling back to the main loop.
--   
--   You should be careful to pass fds and its length
--   nFds as received from mainContextQuery, as this
--   functions relies on assumptions on how fds is filled.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
--   
--   Since 2.76 context can be NULL to use the
--   global-default main context.
mainContextCheck :: (HasCallStack, MonadIO m) => Maybe 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.
--   
--   Since 2.76 context can be NULL to use the
--   global-default main context.
mainContextDispatch :: (HasCallStack, MonadIO m) => Maybe 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) => Maybe MainContext -> SourceFuncs -> Ptr () -> m (Maybe Source)

-- | Finds a Source given a pair of context and ID.
--   
--   It is a programmer error to attempt to look up 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 idleAdd: 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) => Maybe 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) => Maybe MainContext -> Ptr () -> m (Maybe Source)

-- | Gets the thread-default main context 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 Sources 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
--   NULL 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 (Maybe MainContext)

-- | Invokes a function in such a way that context is owned
--   during the invocation of function.
--   
--   This function is the same as
--   MainContext.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
--   [callbackgLib.DestroyNotify] for data.
--   
--   The notify function should not assume that it is
--   called from any particular thread or with any particular context
--   acquired.
--   
--   Since: 2.28
mainContextInvokeFull :: (HasCallStack, MonadIO m) => Maybe 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) => Maybe 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, this function
--   does not wait for sources to become ready, and only the highest
--   priority sources which are already ready (if any) will be dispatched.
--   
--   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) => Maybe MainContext -> Bool -> m Bool

-- | Creates a new MainContext structure.
mainContextNew :: (HasCallStack, MonadIO m) => m MainContext

-- | Creates a new MainContext structure.
--   
--   Since: 2.72
mainContextNewWithFlags :: (HasCallStack, MonadIO m) => [MainContextFlags] -> m MainContext

-- | Checks if any sources have pending events for the given context.
mainContextPending :: (HasCallStack, MonadIO m) => Maybe 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) => Maybe MainContext -> m ()

-- | Prepares to poll sources within a main loop.
--   
--   The resulting information for polling is determined by calling
--   mainContextQuery.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextPrepare :: (HasCallStack, MonadIO m) => Maybe MainContext -> m (Bool, Int32)

-- | Acquires context and sets it as the thread-default
--   context for the current thread. This will cause certain asynchronous
--   operations (such as most 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
--   main 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 idleAdd.
--   
--   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. For
--   example, see g_file_supports_thread_contexts().
--   
--   Since: 2.22
mainContextPushThreadDefault :: (HasCallStack, MonadIO m) => Maybe MainContext -> m ()

-- | Determines information necessary to poll this main loop.
--   
--   You should be careful to pass the resulting fds array
--   and its length nFds as-is when calling
--   mainContextCheck, as this function relies on assumptions made
--   when the array is filled.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextQuery :: (HasCallStack, MonadIO m) => Maybe 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 a reference to the thread-default MainContext for this
--   thread
--   
--   This is the same as mainContextGetThreadDefault, but it also
--   adds a reference to the returned main context 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 NULL.
--   
--   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.
--   
--   You must have successfully acquired the context with
--   mainContextAcquire before you may call this function.
mainContextRelease :: (HasCallStack, MonadIO m) => Maybe MainContext -> m ()

-- | Removes file descriptor from the set of file descriptors to be polled
--   for a particular context.
mainContextRemovePoll :: (HasCallStack, MonadIO m) => Maybe 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, and waits on
--   cond if another thread is the owner.
--   
--   This is the same as 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
--   separatelocking instead.
mainContextWait :: (HasCallStack, MonadIO m) => Maybe MainContext -> Cond -> Mutex -> m Bool

-- | Wake up context if it’s currently blocking in
--   mainContextIteration, causing it to stop blocking.
--   
--   The context could be blocking waiting for a source to
--   become ready. Otherwise, if context is not currently
--   blocking, this function causes 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 gint tasks_remaining = NUM_TASKS;  // (atomic)
--   ...
--   
--   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) => Maybe MainContext -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.MainContext.MainContext)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MainContext.MainContext

-- | 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

-- | 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.BoxedPtr GI.GLib.Structs.IOFuncs.IOFuncs
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.IOFuncs.IOFuncs
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.IOFuncs.IOFuncs tag
instance GHC.Classes.Eq GI.GLib.Structs.IOFuncs.IOFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.IOFuncs.IOFuncs

-- | 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

-- | 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 ()

-- | Calls a function on each valid Hook.
hookListMarshal :: (HasCallStack, MonadIO m) => HookList -> Bool -> HookMarshaller -> m ()

-- | Calls a function on each valid Hook and destroys it if the
--   function returns False.
hookListMarshalCheck :: (HasCallStack, MonadIO m) => HookList -> Bool -> HookCheckMarshaller -> 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.BoxedPtr GI.GLib.Structs.HookList.HookList
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.HookList.HookList
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.HookList.HookList tag
instance GHC.Classes.Eq GI.GLib.Structs.HookList.HookList
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.HookList.HookList

-- | 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

-- | 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 ()

-- | Inserts a Hook into a HookList, sorted by the given
--   function.
hookInsertSorted :: (HasCallStack, MonadIO m) => HookList -> Hook -> HookCompareFunc -> 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.BoxedPtr GI.GLib.Structs.Hook.Hook
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Hook.Hook
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Hook.Hook tag
instance GHC.Classes.Eq GI.GLib.Structs.Hook.Hook
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Hook.Hook

-- | GCompletion provides support for automatic completion of a
--   string using any group of target strings. It is typically used for
--   file name completion as is common in many UNIX shells.
--   
--   A GCompletion is created using
--   Completion.new(). Target items are added and
--   removed with Completion.add_items(),
--   Completion.remove_items() and
--   completionClearItems. A completion attempt is requested with
--   Completion.complete() or
--   completionCompleteUtf8. When no longer needed, the
--   GCompletion is freed with completionFree.
--   
--   Items in the completion can be simple strings (e.g. filenames), or
--   pointers to arbitrary data structures. If data structures are used you
--   must provide a [typegLib.CompletionFunc] in
--   Completion.new(), which retrieves the item’s
--   string from the data structure. You can change the way in which
--   strings are compared by setting a different
--   [typegLib.CompletionStrncmpFunc] in
--   Completion.set_compare().
--   
--   GCompletion has been marked as deprecated, since this API is
--   rarely used and not very actively maintained.
module GI.GLib.Structs.Completion

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

-- | Construct a Completion struct initialized to zero.
newZeroCompletion :: MonadIO m => m Completion

-- | Removes all items from the Completion. The items are not freed,
--   so if the memory was dynamically allocated, it should be freed after
--   calling this function.

-- | Deprecated: (Since version 2.26)Rarely used API
completionClearItems :: (HasCallStack, MonadIO m) => Completion -> m ()

-- | Attempts to complete the string prefix using the
--   Completion target items. In contrast to
--   g_completion_complete(), this function returns the
--   largest common prefix that is a valid UTF-8 string, omitting a
--   possible common partial character.
--   
--   You should use this function instead of
--   g_completion_complete() if your items are UTF-8
--   strings.
--   
--   Since: 2.4

-- | Deprecated: (Since version 2.26)Rarely used API
completionCompleteUtf8 :: (HasCallStack, MonadIO m) => Completion -> Text -> Text -> m [Text]

-- | Frees all memory used by the Completion. The items are not
--   freed, so if the memory was dynamically allocated, it should be freed
--   after calling this function.

-- | Deprecated: (Since version 2.26)Rarely used API
completionFree :: (HasCallStack, MonadIO m) => Completion -> m ()

-- | Set the value of the “cache” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #cache
--   
clearCompletionCache :: MonadIO m => Completion -> m ()

-- | Get the value of the “cache” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get completion #cache
--   
getCompletionCache :: MonadIO m => Completion -> m [Ptr ()]

-- | Set the value of the “cache” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set completion [ #cache := value ]
--   
setCompletionCache :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()

-- | Set the value of the “func” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #func
--   
clearCompletionFunc :: MonadIO m => Completion -> m ()

-- | Get the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   get completion #func
--   
getCompletionFunc :: MonadIO m => Completion -> m (Maybe CompletionFunc)

-- | Set the value of the “func” field. When overloading is
--   enabled, this is equivalent to
--   
--   
--   set completion [ #func := value ]
--   
setCompletionFunc :: MonadIO m => Completion -> FunPtr C_CompletionFunc -> m ()

-- | Set the value of the “items” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #items
--   
clearCompletionItems :: MonadIO m => Completion -> m ()

-- | Get the value of the “items” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get completion #items
--   
getCompletionItems :: MonadIO m => Completion -> m [Ptr ()]

-- | Set the value of the “items” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set completion [ #items := value ]
--   
setCompletionItems :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()

-- | Set the value of the “prefix” field to Nothing. When
--   overloading is enabled, this is equivalent to
--   
--   
--   clear #prefix
--   
clearCompletionPrefix :: MonadIO m => Completion -> m ()

-- | Get the value of the “prefix” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   get completion #prefix
--   
getCompletionPrefix :: MonadIO m => Completion -> m (Maybe Text)

-- | Set the value of the “prefix” field. When overloading
--   is enabled, this is equivalent to
--   
--   
--   set completion [ #prefix := value ]
--   
setCompletionPrefix :: MonadIO m => Completion -> CString -> m ()

-- | Set the value of the “strncmp_func” field to Nothing.
--   When overloading is enabled, this is equivalent to
--   
--   
--   clear #strncmpFunc
--   
clearCompletionStrncmpFunc :: MonadIO m => Completion -> m ()

-- | Get the value of the “strncmp_func” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   get completion #strncmpFunc
--   
getCompletionStrncmpFunc :: MonadIO m => Completion -> m (Maybe CompletionStrncmpFunc)

-- | Set the value of the “strncmp_func” field. When
--   overloading is enabled, this is equivalent to
--   
--   
--   set completion [ #strncmpFunc := value ]
--   
setCompletionStrncmpFunc :: MonadIO m => Completion -> FunPtr C_CompletionStrncmpFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Completion.Completion
instance Data.GI.Base.BasicTypes.CallocPtr GI.GLib.Structs.Completion.Completion
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Completion.Completion tag
instance GHC.Classes.Eq GI.GLib.Structs.Completion.Completion
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Completion.Completion

-- | A GCache allows sharing of complex data structures, in order
--   to save system resources.
--   
--   GCache uses keys and values. A GCache key describes
--   the properties of a particular resource. A GCache value is
--   the actual resource.
--   
--   GCache has been marked as deprecated, since this API is
--   rarely used and not very actively maintained.
module GI.GLib.Structs.Cache

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

-- | Frees the memory allocated for the Cache.
--   
--   Note that it does not destroy the keys and values which were contained
--   in the Cache.

-- | Deprecated: (Since version 2.32)Use a HashTable instead
cacheDestroy :: (HasCallStack, MonadIO m) => Cache -> m ()

-- | Gets the value corresponding to the given key, creating it if
--   necessary. It first checks if the value already exists in the
--   Cache, by using the keyEqualFunc function
--   passed to g_cache_new(). If it does already exist it
--   is returned, and its reference count is increased by one. If the value
--   does not currently exist, if is created by calling the
--   valueNewFunc. The key is duplicated by calling
--   keyDupFunc and the duplicated key and value are
--   inserted into the Cache.

-- | Deprecated: (Since version 2.32)Use a HashTable instead
cacheInsert :: (HasCallStack, MonadIO m) => Cache -> Ptr () -> m (Ptr ())

-- | Calls the given function for each of the keys in the Cache.
--   
--   NOTE func is passed three parameters, the value and
--   key of a cache entry and the userData. The order of
--   value and key is different from the order in which
--   hashTableForeach passes key-value pairs to its callback
--   function !

-- | Deprecated: (Since version 2.32)Use a HashTable instead
cacheKeyForeach :: (HasCallStack, MonadIO m) => Cache -> HFunc -> m ()

-- | Decreases the reference count of the given value. If it drops to 0
--   then the value and its corresponding key are destroyed, using the
--   valueDestroyFunc and keyDestroyFunc
--   passed to g_cache_new().

-- | Deprecated: (Since version 2.32)Use a HashTable instead
cacheRemove :: (HasCallStack, MonadIO m) => Cache -> Ptr () -> m ()

-- | Calls the given function for each of the values in the Cache.

-- | Deprecated: (Since version 2.10)The reason is that it passes
--   pointers to internaldata structures to func; use
--   cacheKeyForeach instead
cacheValueForeach :: (HasCallStack, MonadIO m) => Cache -> HFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Cache.Cache
instance GHC.Classes.Eq GI.GLib.Structs.Cache.Cache
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Cache.Cache

-- | 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

-- | Adds the given bytes to the end of the GByteArray. The array
--   will grow in size automatically if necessary.
byteArrayAppend :: (HasCallStack, MonadIO m) => ByteString -> ByteString -> m ByteString

-- | Transfers the data from the GByteArray into a new immutable
--   Bytes.
--   
--   The GByteArray is freed unless the reference count of
--   array is greater than one, in which the
--   GByteArray 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 GByteArray with a reference count of 1.
byteArrayNew :: (HasCallStack, MonadIO m) => m ByteString

-- | Creates a byte array containing the data. After this
--   call, data belongs to the GByteArray and may
--   no longer be modified by the caller. The memory of
--   data has to be dynamically allocated and will
--   eventually be freed with free.
--   
--   Do not use it if len is greater than
--   `G_MAXUINT`. GByteArray stores the length of its data
--   in guint, which may be shorter than gsize.
--   
--   Since: 2.32
byteArrayNewTake :: (HasCallStack, MonadIO m) => ByteString -> m ByteString

-- | Adds the given data to the start of the GByteArray. The array
--   will grow in size automatically if necessary.
byteArrayPrepend :: (HasCallStack, MonadIO m) => ByteString -> ByteString -> m ByteString

-- | Atomically increments the reference count of array by
--   one. This function is thread-safe and may be called from any thread.
--   
--   Since: 2.22
byteArrayRef :: (HasCallStack, MonadIO m) => ByteString -> m ByteString

-- | Removes the byte at the given index from a GByteArray. The
--   following bytes are moved down one place.
byteArrayRemoveIndex :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> m ByteString

-- | Removes the byte at the given index from a GByteArray. The
--   last element in the array is used to fill in the space, so this
--   function does not preserve the order of the GByteArray. But
--   it is faster than byteArrayRemoveIndex.
byteArrayRemoveIndexFast :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> m ByteString

-- | Removes the given number of bytes starting at the given index from a
--   GByteArray. The following elements are moved to close the
--   gap.
--   
--   Since: 2.4
byteArrayRemoveRange :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> Word32 -> m ByteString

-- | Sets the size of the GByteArray, expanding it if necessary.
byteArraySetSize :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> m ByteString

-- | Creates a new GByteArray with reservedSize
--   bytes preallocated. This avoids frequent reallocation, if you are
--   going to add many bytes to the array. Note however that the size of
--   the array is still 0.
byteArraySizedNew :: (HasCallStack, MonadIO m) => Word32 -> m ByteString

-- | Sorts a byte array, using compareFunc which should be
--   a qsort()-style comparison function (returns less than zero
--   for first arg is less than second arg, zero for equal, greater than
--   zero if first arg is greater than second arg).
--   
--   If two array elements compare equal, their order in the sorted array
--   is undefined. If you want equal elements to keep their order (i.e. you
--   want a stable sort) you can write a comparison function that, if two
--   elements would otherwise compare equal, compares them by their
--   addresses.
byteArraySort :: (HasCallStack, MonadIO m) => ByteString -> CompareFunc -> m ()

-- | Like byteArraySort, but the comparison function takes an extra
--   user data argument.
byteArraySortWithData :: (HasCallStack, MonadIO m) => ByteString -> CompareDataFunc -> m ()

-- | Frees the data in the array and resets the size to zero, while the
--   underlying array is preserved for use elsewhere and returned to the
--   caller.
--   
--   Since: 2.64
byteArraySteal :: (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 (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ByteArray.ByteArray tag
instance GHC.Classes.Eq GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.GLib.Structs.ByteArray.ByteArray)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.ByteArray.ByteArray

-- | 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

-- | 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 ()

-- | Creates a new asynchronous queue.
asyncQueueNew :: (HasCallStack, MonadIO m) => m AsyncQueue

-- | Creates a new asynchronous queue and sets up a destroy notify function
--   that is used to free any remaining queue items when the queue is
--   destroyed after the final unref.
--   
--   Since: 2.16
asyncQueueNewFull :: (HasCallStack, MonadIO m) => Maybe DestroyNotify -> m AsyncQueue

-- | 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.
--   
--   The data parameter 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 ()

-- | Inserts data into queue using
--   func to determine the new position.
--   
--   This function requires that the queue is sorted before
--   pushing on new elements, see asyncQueueSort.
--   
--   This function will lock queue before it sorts the
--   queue and unlock it when it is finished.
--   
--   For an example of func see asyncQueueSort.
--   
--   Since: 2.10
asyncQueuePushSorted :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()

-- | Inserts data into queue using
--   func to determine the new position.
--   
--   The sort function func is passed two elements of the
--   queue. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   queue or a positive value if the first element should
--   be lower in the queue than the second element.
--   
--   This function requires that the queue is sorted before
--   pushing on new elements, see asyncQueueSort.
--   
--   This function must be called while holding the queue's
--   lock.
--   
--   For an example of func see asyncQueueSort.
--   
--   Since: 2.10
asyncQueuePushSortedUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()

-- | Pushes the data into the queue.
--   
--   The data parameter 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. You do not need to hold the lock to call
--   this function.
asyncQueueRef :: (HasCallStack, MonadIO m) => AsyncQueue -> m AsyncQueue

-- | Increases the reference count of the asynchronous
--   queue by 1.

-- | Deprecated: (Since version 2.8)Reference counting is done
--   atomically.so asyncQueueRef 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

-- | Sorts queue using func.
--   
--   The sort function func is passed two elements of the
--   queue. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   queue or a positive value if the first element should
--   be lower in the queue than the second element.
--   
--   This function will lock queue before it sorts the
--   queue and unlock it when it is finished.
--   
--   If you were sorting a list of priority numbers to make sure the lowest
--   priority would be at the top of the queue, you could use:
--   
--   
C code
--   
--   
--   gint32 id1;
--   gint32 id2;
--   
--   id1 = GPOINTER_TO_INT (element1);
--   id2 = GPOINTER_TO_INT (element2);
--   
--   return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1);
--   
--   
--   Since: 2.10
asyncQueueSort :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()

-- | Sorts queue using func.
--   
--   The sort function func is passed two elements of the
--   queue. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   queue or a positive value if the first element should
--   be lower in the queue than the second element.
--   
--   This function must be called while holding the queue's
--   lock.
--   
--   Since: 2.10
asyncQueueSortUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()

-- | 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
--   getRealTime 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
--   getRealTime 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 ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.AsyncQueue.AsyncQueue
instance GHC.Classes.Eq GI.GLib.Structs.AsyncQueue.AsyncQueue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.AsyncQueue.AsyncQueue

module GI.GLib.Structs

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

-- | This function is similar to malloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to align the allocated memory to with the given
--   alignment value. Additionally, it will detect possible overflow during
--   multiplication.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
--   
--   Aligned memory allocations returned by this function can only be freed
--   using alignedFreeSized or alignedFree.
--   
--   Since: 2.72
alignedAlloc :: (HasCallStack, MonadIO m) => CSize -> CSize -> CSize -> m (Ptr ())

-- | This function is similar to alignedAlloc, but it will also
--   clear the allocated memory before returning it.
--   
--   Since: 2.72
alignedAlloc0 :: (HasCallStack, MonadIO m) => CSize -> CSize -> CSize -> m (Ptr ())

-- | Frees the memory allocated by alignedAlloc.
--   
--   Since: 2.72
alignedFree :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Frees the memory pointed to by mem, assuming it is has
--   the given size and alignment.
--   
--   If mem is Nothing this is a no-op (and
--   size is ignored).
--   
--   It is an error if size doesn’t match the size, or
--   alignment doesn’t match the alignment, passed when
--   mem was allocated. size and
--   alignment are passed to this function to allow
--   optimizations in the allocator. If you don’t know either of them, use
--   alignedFree instead.
--   
--   Since: 2.76
alignedFreeSized :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> CSize -> m ()

-- | Determines the numeric value of a character as a decimal digit. If the
--   character is not a decimal digit according to
--   GLib.ascii_isdigit, -1 is returned.
--   
--   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
--   [constgLib.ASCII_DTOSTR_BUF_SIZE] 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 format must just be a single format specifier
--   starting with %, expecting a gdouble argument.
--   
--   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-NULL.
asciiStrcasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> m Int32

-- | Converts all upper case ASCII letters to lower case ASCII letters,
--   with semantics that exactly match asciiTolower.
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
--   [errorgLib.NumberParserError.INVALID]. If the parsed
--   number is out of bounds -
--   [errorgLib.NumberParserError.OUT_OF_BOUNDS].
--   
--   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
--   [errorgLib.NumberParserError.INVALID]. If the parsed
--   number is out of bounds -
--   [errorgLib.NumberParserError.OUT_OF_BOUNDS].
--   
--   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. If either string is less than
--   n bytes long, comparison will stop at the first nul
--   byte encountered.
--   
--   Unlike the BSD strncasecmp() 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 -> CSize -> m Int32

-- | Converts a string to a floating point 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,
--   [constgLib.MAXINT64] or
--   [constgLib.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-NULL).
--   
--   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 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,
--   [constgLib.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-NULL).
--   
--   Since: 2.2
asciiStrtoull :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Word64, Text)

-- | Converts all lower case ASCII letters to upper case ASCII letters,
--   with semantics that exactly match asciiToupper.
asciiStrup :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Convert a character to ASCII lower case. If the character is not an
--   ASCII upper case letter, it is returned unchanged.
--   
--   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. If the character is not an
--   ASCII lower case letter, it is returned unchanged.
--   
--   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 hexadecimal digit. If
--   the character is not a hex digit according to
--   GLib.ascii_isxdigit, -1 is returned.
--   
--   Differs from unicharXdigitValue because it takes a char, so
--   there's no worry about sign extension if characters are signed.
--   
--   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.
assertionMessageCmpint :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Word64 -> Text -> Word64 -> Int8 -> 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.
assertionMessageCmpstrv :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Text -> Text -> CSize -> 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).
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntAdd :: (HasCallStack, MonadIO m) => Ptr () -> 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; }.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.30
atomicIntAnd :: (HasCallStack, MonadIO m) => Ptr () -> 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntCompareAndExchange :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> Int32 -> m Bool

-- | Compares atomic to oldval and, if
--   equal, sets it to newval. If atomic
--   was not equal to oldval then no change occurs. In any
--   case the value of atomic before this operation is
--   stored in preval.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of { *preval =
--   *atomic; if (*atomic == oldval) { *atomic = newval; return TRUE; }
--   else return FALSE; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   See also atomicIntCompareAndExchange
--   
--   Since: 2.74
atomicIntCompareAndExchangeFull :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> Int32 -> m (Bool, Int32)

-- | 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntDecAndTest :: (HasCallStack, MonadIO m) => Ptr () -> m Bool

-- | Sets the atomic to newval and returns
--   the old value from atomic.
--   
--   This exchange is done atomically.
--   
--   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.74
atomicIntExchange :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m Int32

-- | 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) => Ptr () -> Int32 -> m Int32

-- | Gets the current value of atomic.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntGet :: (HasCallStack, MonadIO m) => Ptr () -> 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntInc :: (HasCallStack, MonadIO m) => Ptr () -> 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.30
atomicIntOr :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m Word32

-- | Sets the value of atomic to newval.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicIntSet :: (HasCallStack, MonadIO m) => Ptr () -> 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.30
atomicIntXor :: (HasCallStack, MonadIO m) => Ptr () -> 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   In GLib 2.80, the return type was changed from gssize
--   to gintptr to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   Since: 2.30
atomicPointerAdd :: (HasCallStack, MonadIO m) => Ptr () -> Int64 -> m CIntPtr

-- | 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   In GLib 2.80, the return type was changed from gsize
--   to guintptr to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   Since: 2.30
atomicPointerAnd :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | 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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   Since: 2.4
atomicPointerCompareAndExchange :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Compares atomic to oldval and, if
--   equal, sets it to newval. If atomic
--   was not equal to oldval then no change occurs. In any
--   case the value of atomic before this operation is
--   stored in preval.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of { *preval =
--   *atomic; if (*atomic == oldval) { *atomic = newval; return TRUE; }
--   else return FALSE; }.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   See also atomicPointerCompareAndExchange
--   
--   Since: 2.74
atomicPointerCompareAndExchangeFull :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> Ptr () -> m (Bool, Ptr ())

-- | Sets the atomic to newval and returns
--   the old value from atomic.
--   
--   This exchange is done atomically.
--   
--   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.74
atomicPointerExchange :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m (Ptr ())

-- | Gets the current value of atomic.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   In GLib 2.80, the return type was changed from gsize
--   to guintptr to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   Since: 2.30
atomicPointerOr :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | Sets the value of atomic to newval.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   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.
--   
--   While atomic has a volatile qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   volatile.
--   
--   In GLib 2.80, the return type was changed from gsize
--   to guintptr to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   Since: 2.30
atomicPointerXor :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | 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) => CSize -> m (Ptr ())

-- | Allocates blockSize bytes of memory, and adds atomic
--   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
atomicRcBoxAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a new block of data with atomic reference counting
--   semantics, and copies blockSize bytes of
--   memBlock into it.
--   
--   Since: 2.58
atomicRcBoxDup :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   memBlock.
--   
--   Since: 2.58
atomicRcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m CSize

-- | 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.
--   
--   Note that implementing weak references via clearFunc
--   is not thread-safe: clearing a pointer to the memory from the callback
--   can race with another thread trying to access it as
--   memBlock already has a reference count of 0 when the
--   callback is called and will be freed.
--   
--   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.
--   
--   If True is returned, the reference count reached 0. After this
--   point, arc is an undefined state and must be
--   reinitialized with atomicRefCountInit to be used again.
--   
--   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 to 1.
--   
--   Since: 2.58
atomicRefCountInit :: (HasCallStack, MonadIO m) => m Int32

-- | 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 noticethat pathGetBasename allocates new memory for
--   thereturned string, unlike this function which returns a pointerinto
--   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. While address has a
--   volatile qualifier, this is a historical artifact and the
--   argument passed to it should not be volatile.
--   
--   Since: 2.24
bitLock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | Sets the indicated lockBit in address
--   and atomically returns the new value.
--   
--   This is like bitLock, except it can atomically return the new
--   value at address (right after obtaining the lock).
--   Thus the value returned in outVal always has the
--   lockBit set.
--   
--   Since: 2.86
bitLockAndGet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m Int32

-- | 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. While address has a
--   volatile qualifier, this is a historical artifact and the
--   argument passed to it should not be volatile.
--   
--   Since: 2.24
bitTrylock :: (HasCallStack, MonadIO m) => Ptr () -> 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. While address has a
--   volatile qualifier, this is a historical artifact and the
--   argument passed to it should not be volatile.
--   
--   Since: 2.24
bitUnlock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | This is like bitUnlock but also atomically sets
--   address to val.
--   
--   If preserveMask is not zero, then the
--   preserveMask bits will be preserved in
--   address and are not set to val.
--   
--   Note that the lockBit bit will always be unset
--   regardless of val, preserveMask and
--   the currently set value in address.
--   
--   Since: 2.86
bitUnlockAndSet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Int32 -> Int32 -> m ()

-- | No description available in the introspection data.

-- | Deprecated: (Since version 2.10)
blowChunks :: (HasCallStack, MonadIO m) => m ()

-- | Creates a filename from a vector of elements using the correct
--   separator for the current platform.
--   
--   This function 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.
--   
--   If you are building a path programmatically you may want to use
--   PathBuf instead.
--   
--   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 variadic arguments.
--   
--   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
--   @required_major.required_minor.@required_micro. Second the
--   running library must be binary compatible with the version
--   @required_major.@required_minor.@required_micro (same major
--   version.)
--   
--   Since: 2.6
checkVersion :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> Word32 -> m (Maybe 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
--   [flagsgLib.SpawnFlags.DO_NOT_REAP_CHILD] as a flag to
--   the spawn function for the child watching to work.
--   
--   In many programs, you will want to call spawnCheckWaitStatus in
--   the callback to determine whether or not the child exited
--   successfully.
--   
--   Also, note that on platforms where [typegLib.Pid] 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
--   [flagsgLib.SpawnFlags.DO_NOT_REAP_CHILD] flag is used.
--   
--   Note that on platforms where [typegLib.Pid] 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 SIGCHLD.
--   
- Before 2.78, the application could not send a signal
--   (`kill()`)) to the watched pid in a race free
--   manner. Since 2.78, you can do that while the associated
--   MainContext is acquired.
--   
- Before 2.78, even after destroying the Source, you could
--   not be sure that pid wasn’t already reaped. Hence, it
--   was also not safe to kill() or waitpid() on the
--   process ID after the child watch source was gone. Destroying the
--   source before it fired made it impossible to reliably reap the
--   process.
--   
--   
--   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

-- | A wrapper for the POSIX chmod() function. The
--   chmod() function is used to set the permissions of a
--   file system object.
--   
--   On Windows the file protection mechanism is not at all POSIX-like, and
--   the underlying chmod() function in the C library just
--   sets or clears the FAT-style READONLY attribute. It does not touch any
--   ACL. Software that needs to manage file permissions on Windows exactly
--   should use the Win32 API.
--   
--   See your C library manual for more details about
--   chmod().
--   
--   Since: 2.8
chmod :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | 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. In case of
--   success, errno is undefined.
--   
--   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.
--   
--   It is a bug to call this function with an invalid file descriptor.
--   
--   On POSIX platforms since GLib 2.76, this function is async-signal safe
--   if (and only if) error is Nothing and
--   fd is a valid open file descriptor. This makes it safe
--   to call from a signal handler or a SpawnChildSetupFunc under
--   those conditions. See `signal(7)`) and
--   `signal-safety(7)`) for more details.
--   
--   Since: 2.36
close :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Close every file descriptor equal to or greater than
--   lowfd.
--   
--   Typically lowfd will be 3, to leave standard input,
--   standard output and standard error open.
--   
--   This is the same as Linux close_range (lowfd, ~0U, 0), but
--   portable to other OSs and to older versions of Linux. Equivalently, it
--   is the same as BSD closefrom (lowfd), but portable, and
--   async-signal-safe on all OSs.
--   
--   This function is async-signal safe, making it safe to call from a
--   signal handler or a
--   [callbackgLib.SpawnChildSetupFunc], as long as
--   lowfd is non-negative. See `signal(7)`) and
--   `signal-safety(7)`) for more details.
--   
--   Since: 2.80
closefrom :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | 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 (Maybe 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 (Maybe 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 (Maybe Text)

-- | Computes the HMAC for a binary data. This is a
--   convenience wrapper for hmacNew, 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
--   hmacNew, 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, CSize)

-- | 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, CSize)

-- | A wrapper for the POSIX creat() function. The
--   creat() function is used to convert a pathname into a
--   file descriptor, creating a file if necessary.
--   
--   On POSIX systems file descriptors are implemented by the operating
--   system. On Windows, it's the C library that implements
--   creat() and file descriptors. The actual Windows API
--   for opening files is different, see MSDN documentation for
--   CreateFile(). The Win32 API uses file handles, which
--   are more randomish integers, not small integers like file descriptors.
--   
--   Because file descriptors are specific to the C library on Windows, the
--   file descriptor returned by this function makes sense only to
--   functions in the same C library. Thus if the GLib-using code uses a
--   different C library than GLib does, the file descriptor returned by
--   this function cannot be passed to C library functions like
--   write() or read().
--   
--   See your C library manual for more details about
--   creat().
--   
--   Since: 2.8
creat :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | 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 ())

-- | Removes multiple keys from a datalist.
--   
--   This is more efficient than calling
--   g_datalist_id_remove_data() multiple times in a row.
--   
--   Before 2.80, nKeys had to be not larger than 16. Since
--   2.84, performance is improved for larger number of keys.
--   
--   Since: 2.74
datalistIdRemoveMultiple :: (HasCallStack, MonadIO m) => Data -> [Word32] -> m ()

-- | 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 -> CSize -> 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 (Maybe [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]]

-- | Mark every file descriptor equal to or greater than
--   lowfd to be closed at the next execve() or
--   similar, as if via the FD_CLOEXEC flag.
--   
--   Typically lowfd will be 3, to leave standard input,
--   standard output and standard error open after exec.
--   
--   This is the same as Linux close_range (lowfd, ~0U,
--   CLOSE_RANGE_CLOEXEC), but portable to other OSs and to older
--   versions of Linux.
--   
--   This function is async-signal safe, making it safe to call from a
--   signal handler or a
--   [callbackgLib.SpawnChildSetupFunc], as long as
--   lowfd is non-negative. See `signal(7)`) and
--   `signal-safety(7)`) for more details.
--   
--   Since: 2.80
fdwalkSetCloexec :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Gets a FileError constant based on the passed-in
--   errNo.
--   
--   For example, if you pass in EEXIST this function returns
--   FileErrorExist. 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.
--   
--   The returned string may also be a relative path. Use
--   g_build_filename() to convert it to an absolute path:
--   
--   
C code
--   
--   
--   g_autoptr(GError) local_error = NULL;
--   g_autofree gchar *link_target = g_file_read_link ("/etc/localtime", &local_error);
--   
--   if (local_error != NULL)
--     g_error ("Error reading link: %s", local_error->message);
--   
--   if (!g_path_is_absolute (link_target))
--     {
--       g_autofree gchar *absolute_link_target = g_build_filename ("/etc", link_target, NULL);
--       g_free (link_target);
--       link_target = g_steal_pointer (&absolute_link_target);
--     }
--   
--   
--   Since: 2.4
fileReadLink :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Writes all of contents to a file named
--   filename. This is a convenience wrapper around calling
--   fileSetContentsFull with flags set to
--   G_FILE_SET_CONTENTS_CONSISTENT |
--   G_FILE_SET_CONTENTS_ONLY_EXISTING and mode set to
--   0666.
--   
--   Since: 2.8
fileSetContents :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> m ()

-- | Writes all of contents to a file named
--   filename, with good error checking. If a file called
--   filename already exists it will be overwritten.
--   
--   flags control the properties of the write operation:
--   whether it’s atomic, and what the tradeoff is between returning
--   quickly or being resilient to system crashes.
--   
--   As this function performs file I/O, it is recommended to not call it
--   anywhere where blocking would cause problems, such as in the main loop
--   of a graphical application. In particular, if flags
--   has any value other than FileSetContentsFlagsNone then this
--   function may call fsync().
--   
--   If FileSetContentsFlagsConsistent is set in
--   flags, the operation 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), and if FileSetContentsFlagsConsistent is set in
--   flags, 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, unless
--   FileSetContentsFlagsDurable and
--   FileSetContentsFlagsConsistent are set in
--   flags.
--   
- 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.
--   
--   If the file didn’t exist before and is created, it will be given the
--   permissions from mode. Otherwise, the permissions of
--   the existing file will remain unchanged.
--   
--   Since: 2.66
fileSetContentsFull :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> [FileSetContentsFlags] -> Int32 -> 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, see
--   TOCTOU.
--   
--   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
--     }
--   
--   // DO THIS INSTEAD
--   fd = g_open (filename, O_WRONLY | O_NOFOLLOW | O_CLOEXEC);
--   if (fd == -1)
--     {
--       // check error
--       if (errno == ELOOP)
--         // file is a symlink and can be ignored
--       else
--         // handle errors as before
--     }
--   else
--     {
--       // 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.
--   
--   Since GLib 2.78, the query string and fragment can be present in the
--   URI, but are not part of the resulting filename. We take inspiration
--   from https://url.spec.whatwg.org/file-state, but we
--   don't support the entire standard.
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.
--   
--   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], CSize, CSize)

-- | 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.
--   
--   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, CSize, CSize)

-- | 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 (Maybe [Char])

-- | A wrapper for the stdio fopen() function. The
--   fopen() function opens a file and associates a new stream
--   with it.
--   
--   Because file descriptors are specific to the C library on Windows, and
--   a file descriptor is part of the FILE struct, the
--   FILE* returned by this function makes sense only to functions
--   in the same C library. Thus if the GLib-using code uses a different C
--   library than GLib does, the FILE* returned by this function cannot be
--   passed to C library functions like fprintf() or
--   fread().
--   
--   See your C library manual for more details about fopen().
--   
--   As close() and fclose() are part of the C library,
--   this implies that it is currently impossible to close a file if the
--   application C library and the C library used by GLib are different.
--   Convenience functions like fileSetContentsFull avoid this
--   problem.
--   
--   Since GLib 2.86, the e option is supported in
--   mode on all platforms. On Unix platforms it will set
--   O_CLOEXEC on the opened file descriptor. On Windows platforms
--   it will be converted to the `N` modifier. It is recommended to
--   set e unconditionally, unless you know the returned file
--   should be shared between this process and a new fork.
--   
--   Since: 2.6
fopen :: (HasCallStack, MonadIO m) => [Char] -> Text -> m (Ptr ())

-- | 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 SIsuffixes 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 you know the allocated size of mem, calling
--   freeSized may be faster, depending on the libc implementation
--   in use.
--   
--   Starting from GLib 2.78, this may happen automatically in case a GCC
--   compatible compiler is used with some optimization level and the
--   allocated size is known at compile time (see
--   <https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html
--   documentation of `__builtin_object_size()`> to understand its
--   caveats).
--   
--   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 ()

-- | Frees the memory pointed to by mem, assuming it is has
--   the given size.
--   
--   If mem is Nothing this is a no-op (and
--   size is ignored).
--   
--   It is an error if size doesn’t match the size passed
--   when mem was allocated. size is passed
--   to this function to allow optimizations in the allocator. If you don’t
--   know the allocation size, use free instead.
--   
--   In case a GCC compatible compiler is used, this function may be used
--   automatically via free if the allocated size is known at
--   compile time, since GLib 2.78.
--   
--   Since: 2.76
freeSized :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m ()

-- | A wrapper for the POSIX freopen() function. The
--   freopen() function opens a file and associates it with
--   an existing stream.
--   
--   See your C library manual for more details about
--   freopen().
--   
--   Since GLib 2.86, the e option is supported in
--   mode on all platforms. See the documentation for
--   fopen for more details.
--   
--   Since: 2.6
freopen :: (HasCallStack, MonadIO m) => [Char] -> Text -> Ptr () -> m (Ptr ())

-- | A wrapper for the POSIX fsync() function. On Windows,
--   _commit() will be used. On macOS, fcntl(F_FULLFSYNC)
--   will be used. The fsync() function is used to synchronize a
--   file's in-core state with that of the disk.
--   
--   This wrapper will handle retrying on EINTR.
--   
--   See the C library manual for more details about
--   fsync().
--   
--   Since: 2.64
fsync :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | 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 (Maybe Text)

-- | Obtains the character set for the current locale; 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. nl_langinfo()
--   returns the C locale if no locale has been loaded by
--   setlocale().
--   
--   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

-- | Obtains the character set used by the console attached to the process,
--   which is suitable for printing output to the terminal.
--   
--   Usually this matches the result returned by getCharset, but in
--   environments where the locale's character set does not match the
--   encoding of the console this function tries to guess a more suitable
--   value instead.
--   
--   On Windows the character set returned by this function is the output
--   code page used by the console associated with the calling process. If
--   the codepage can't be determined (for example because there is no
--   console attached) UTF-8 is assumed.
--   
--   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.
--   
--   Since: 2.62
getConsoleCharset :: (HasCallStack, MonadIO m) => m (Bool, 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]

-- | Queries the system wall-clock time.
--   
--   This is equivalent to the UNIX `gettimeofday()`) function, but
--   portable.
--   
--   You may find getRealTime to be more convenient.

-- | Deprecated: (Since version 2.62)TimeVal is not
--   year-2038-safe. UsegetRealTime instead.
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. 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. See `setlocale(3)` for information about locales and
--   their format.
--   
--   locale itself is guaranteed to be returned in the
--   output.
--   
--   For example, if locale is fr_BE, then the
--   returned list is fr_BE, fr. If
--   locale is en_GB.UTF-8@euro, then the returned
--   list is en_GB.UTF-8@euro, en_GB.UTF-8,
--   en_GB@euro, en_GB, en.UTF-8@euro,
--   en.UTF-8, en@euro, en.
--   
--   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

-- | Get information about the operating system.
--   
--   On Linux this comes from the /etc/os-release file. On other
--   systems, it may come from a variety of sources. You can either use the
--   standard key names like G_OS_INFO_KEY_NAME or pass any
--   UTF-8 string key name. For example, /etc/os-release provides
--   a number of other less commonly used values that may be useful. No key
--   is guaranteed to be provided, so the caller should always check if the
--   result is Nothing.
--   
--   Since: 2.64
getOsInfo :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | 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 (Maybe 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 is equivalent to the UNIX `gettimeofday()`) function, but
--   portable.
--   
--   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
--   FOLDERID_ProgramData folder. This information will not roam and is
--   available to anyone using the computer.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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 FOLDERID_ProgramData and
--   FOLDERID_PublicDocuments.
--   
--   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.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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
--   `FOLDERID_InternetCache`.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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
--   `FOLDERID_LocalAppData`. Note that in this case on Windows it will
--   be the same as what getUserDataDir returns.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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
--   `FOLDERID_LocalAppData`. Note that in this case on Windows it will
--   be the same as what getUserConfigDir returns.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   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 (Maybe [Char])

-- | Returns a base directory in which to store state files 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_STATE_HOME.
--   
--   On Windows it follows XDG Base Directory Specification if
--   XDG_STATE_HOME is defined. If XDG_STATE_HOME is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the documentation for
--   `FOLDERID_LocalAppData`. Note that in this case on Windows it will
--   be the same as what getUserDataDir returns.
--   
--   The return value is cached and modifying it at runtime is not
--   supported, as it’s not thread-safe to modify environment variables at
--   runtime.
--   
--   Since: 2.72
getUserStateDir :: (HasCallStack, MonadIO m) => 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 (Maybe [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.66, IPv6 addresses with a zone-id are accepted (RFC6874).
--   
--   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 (Maybe 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 (Maybe Text)

-- | Adds a function to be called whenever there are no higher priority
--   events pending.
--   
--   If the function returns [constgLib.SOURCE_REMOVE] it
--   is automatically removed from the list of event sources and will not
--   be called again.
--   
--   See main loop 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 [constgLib.PRIORITY_DEFAULT_IDLE], as
--   compared to other sources which have a default priority of
--   [constgLib.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.
--   
--   This function must not be used before library constructors have
--   finished running. In particular, this means it cannot be used to
--   initialize global variables in C++.
--   
--   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().
--   
--   This function must not be used before library constructors have
--   finished running. In particular, this means it cannot be used to
--   initialize global variables in C++.
--   
--   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
--   IOConditionIn, the source will be dispatched when there's data
--   available for reading.
--   
--   The callback function invoked by the Source should be added
--   with sourceSetCallback, but it has type IOFunc (not
--   SourceFunc).
--   
--   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. 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, CSize)

-- | 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 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, CSize, CSize)

-- | The default log handler set up by GLib;
--   GLib.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 GLib.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 application.
--   
- 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. If you need to set the allowed domains
--   at runtime, use logWriterDefaultSetDebugDomains.
--   
- DEBUG_INVOCATION: If set to 1, this is
--   equivalent to G_MESSAGES_DEBUG=all. DEBUG_INVOCATION
--   is a standard environment variable set by systemd to prompt debug
--   output. (Since: 2.84)
--   
--   
--   stderr is used for levels
--   [flagsgLib.LogLevelFlags.LEVEL_ERROR],
--   [flagsgLib.LogLevelFlags.LEVEL_CRITICAL],
--   [flagsgLib.LogLevelFlags.LEVEL_WARNING] and
--   [flagsgLib.LogLevelFlags.LEVEL_MESSAGE].
--   stdout is used for the rest, unless stderr was
--   requested by logWriterDefaultSetUseStderr.
--   
--   This has no effect if structured logging is enabled; see Using
--   Structured Logging.
logDefaultHandler :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> Maybe Text -> Ptr () -> m ()

-- | Gets the current fatal mask.
--   
--   This is mostly used by custom log writers to make fatal messages
--   (fatal-warnings, fatal-criticals) work as expected,
--   when using the G_DEBUG environment variable (see Running
--   GLib Applications).
--   
--   An example usage is shown below:
--   
--   
c code
--   
--   
--   static GLogWriterOutput
--   my_custom_log_writer_fn (GLogLevelFlags log_level,
--                            const GLogField *fields,
--                            gsize n_fields,
--                            gpointer user_data)
--   {
--   
--      // abort if the message was fatal
--      if (log_level & g_log_get_always_fatal ())
--        g_abort ();
--   
--      // custom log handling code
--      ...
--      ...
--   
--      // success
--      return G_LOG_WRITER_HANDLED;
--   }
--   
--   
--   Since: 2.86
logGetAlwaysFatal :: (HasCallStack, MonadIO m) => m [LogLevelFlags]

-- | Return whether debug output from the GLib logging system is enabled.
--   
--   Note that this should not be used to conditionalise calls to
--   GLib.debug or other logging functions; it should only
--   be used from [typegLib.LogWriterFunc] implementations.
--   
--   Note also that the value of this does not depend on
--   G_MESSAGES_DEBUG, nor DEBUG_INVOCATION, nor
--   logWriterDefaultSetDebugDomains; see the docs for
--   logSetDebugEnabled.
--   
--   Since: 2.72
logGetDebugEnabled :: (HasCallStack, MonadIO m) => m Bool

-- | Removes the log handler.
--   
--   This has no effect if structured logging is enabled; see 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.
--   [flagsgLib.LogLevelFlags.LEVEL_ERROR] 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 GLib.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.
logSetAlwaysFatal :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> m [LogLevelFlags]

-- | Enable or disable debug output from the GLib logging system for all
--   domains.
--   
--   This value interacts disjunctively with G_MESSAGES_DEBUG,
--   DEBUG_INVOCATION and logWriterDefaultSetDebugDomains —
--   if any of them would allow a debug message to be outputted, it will
--   be.
--   
--   Note that this should not be used from within library code to enable
--   debug output — it is intended for external use.
--   
--   Since: 2.72
logSetDebugEnabled :: (HasCallStack, MonadIO m) => Bool -> m ()

-- | Sets the log levels which are fatal in the given domain.
--   
--   
--   
- flagsgLib.LogLevelFlags.LEVEL_ERROR is
--   always fatal.
--   
--   
--   This has no effect on structured log messages (using
--   GLib.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.
--   
--   This function is mostly intended to be used with
--   [flagsgLib.LogLevelFlags.LEVEL_CRITICAL]. You should
--   typically not set
--   [flagsgLib.LogLevelFlags.LEVEL_WARNING],
--   [flagsgLib.LogLevelFlags.LEVEL_MESSAGE],
--   [flagsgLib.LogLevelFlags.LEVEL_INFO] or
--   [flagsgLib.LogLevelFlags.LEVEL_DEBUG] as fatal except
--   inside of test programs.
logSetFatalMask :: (HasCallStack, MonadIO m) => Text -> [LogLevelFlags] -> m [LogLevelFlags]

-- | Like logSetHandler, but takes a destroy notify for the
--   userData.
--   
--   This has no effect if structured logging is enabled; see Using
--   Structured Logging.
--   
--   The log_domain parameter can be set to NULL or an
--   empty string to use the default application domain.
--   
--   Since: 2.46
logSetHandler :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> LogFunc -> m Word32

-- | Set a writer function which will be called to format and write out
--   each log message.
--   
--   Each program should set a writer function, or the default writer
--   (logWriterDefault) will be used.
--   
--   Libraries must not call this function — only programs are
--   allowed to install a writer function, as there must be a single,
--   central point where log messages are formatted and outputted.
--   
--   There can only be one writer function. It is an error to set more than
--   one.
--   
--   Since: 2.50
logSetWriterFunc :: (HasCallStack, MonadIO m) => LogWriterFunc -> m ()

-- | 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
--   [flagsgLib.LogLevelFlags.LEVEL_ERROR]), the program
--   will be aborted at the end of this function.
--   
--   See GLib.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
--   [typegLib.Variant].
--   
--   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 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
--   GLib.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
--   [typegLib.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, or DEBUG_INVOCATION=1 is set in the environment, or
--   set at runtime by logWriterDefaultSetDebugDomains.
--   
--   logWriterDefault uses the mask set by logSetAlwaysFatal
--   to determine which messages are fatal. When using a custom writer
--   function instead it is up to the writer function to determine which
--   log messages are fatal.
--   
--   Since: 2.50
logWriterDefault :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Reset the list of domains to be logged, that might be initially set by
--   the G_MESSAGES_DEBUG or DEBUG_INVOCATION environment
--   variables.
--   
--   This function is thread-safe.
--   
--   Since: 2.80
logWriterDefaultSetDebugDomains :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | Configure whether the built-in log functions will output all log
--   messages to stderr.
--   
--   The built-in log functions are logDefaultHandler for the
--   old-style API, and both logWriterDefault and
--   logWriterStandardStreams for the structured API.
--   
--   By default, log messages of levels
--   [flagsgLib.LogLevelFlags.LEVEL_INFO] and
--   [flagsgLib.LogLevelFlags.LEVEL_DEBUG] are sent to
--   stdout, and other log messages are sent to stderr.
--   This is problematic for applications that intend to reserve
--   stdout for structured output such as JSON or XML.
--   
--   This function sets global state. It is not thread-aware, and should be
--   called at the very start of a program, before creating any other
--   threads or creating objects that could create worker threads of their
--   own.
--   
--   Since: 2.68
logWriterDefaultSetUseStderr :: (HasCallStack, MonadIO m) => Bool -> m ()

-- | Check whether logWriterDefault and logDefaultHandler
--   would ignore a message with the given domain and level.
--   
--   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, or DEBUG_INVOCATION=1 is set in the environment, or
--   by logWriterDefaultSetDebugDomains.
--   
--   This can be used when implementing log writers with the same filtering
--   behaviour as the default, but a different destination or output
--   format:
--   
--   
c code
--   
--   
--   if (g_log_writer_default_would_drop (log_level, log_domain))
--     return G_LOG_WRITER_HANDLED;
--   ]|
--   
--   or to skip an expensive computation if it is only needed for a debugging
--   message, and `G_MESSAGES_DEBUG` and `DEBUG_INVOCATION` are not set:
--   
--   
--   c if (!g_log_writer_default_would_drop (G_LOG_LEVEL_DEBUG,
--   G_LOG_DOMAIN)) { g_autofree gchar *result = expensive_computation
--   (my_object);
--   
--   g_debug ("my_object result: s", result); } ```
--   
--   Since: 2.68
logWriterDefaultWouldDrop :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> Maybe Text -> m Bool

-- | 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 GLib.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
--   [typegLib.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.
--   
--   
--   
- flagsgLib.LogLevelFlags.LEVEL_INFO and
--   [flagsgLib.LogLevelFlags.LEVEL_DEBUG] messages are
--   sent to stdout, or to stderr if requested by
--   logWriterDefaultSetUseStderr; 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
--   [typegLib.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

-- | Format a structured log message and send it to the syslog daemon. Only
--   fields which are understood by this function are included in the
--   formatted string which is printed.
--   
--   Log facility will be defined via the SYSLOG_FACILITY field and accepts
--   the following values: "auth", "daemon", and "user". If SYSLOG_FACILITY
--   is not specified, LOG_USER facility will be used.
--   
--   This is suitable for use as a
--   [typegLib.LogWriterFunc].
--   
--   If syslog is not supported, this function is still defined, but will
--   always return LogWriterOutputUnhandled.
--   
--   Since: 2.80
logWriterSyslog :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | A wrapper for the POSIX lstat() function. The
--   lstat() function is like stat() except
--   that in the case of symbolic links, it returns information about the
--   symbolic link itself and not the file that it refers to. If the system
--   does not support symbolic links lstat is identical to
--   stat.
--   
--   See your C library manual for more details about
--   lstat().
--   
--   Since: 2.6
lstat :: (HasCallStack, MonadIO m) => [Char] -> StatBuf -> m Int32

-- | Returns the currently firing source for this thread.
--   
--   Since: 2.12
mainCurrentSource :: (HasCallStack, MonadIO m) => m (Maybe Source)

-- | Returns the depth of the stack of calls to mainContextDispatch
--   on any MainContext in the current thread.
--   
--   That is, when called from the top level, 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.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
malloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates nBytes bytes of memory, initialized to 0's.
--   If nBytes is 0 it returns Nothing.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
malloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | This function is similar to malloc0, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
--   
--   Since: 2.24
malloc0N :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())

-- | This function is similar to malloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
--   
--   Since: 2.24
mallocN :: (HasCallStack, MonadIO m) => CSize -> CSize -> 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 interchangeably 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 NULL it returns NULL.

-- | Deprecated: (Since version 2.68)Use memdup2 instead, as it
--   accepts a gsize argumentfor byteSize, avoiding the
--   possibility of overflow in a gsize →
--   guintconversion
memdup :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())

-- | Allocates byteSize bytes of memory, and copies
--   byteSize bytes into it from mem. If
--   mem is NULL it returns NULL.
--   
--   This replaces memdup, which was prone to integer overflows when
--   converting the argument from a gsize to a guint.
--   
--   Since: 2.68
memdup2 :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())

-- | A wrapper for the POSIX mkdir() function. The
--   mkdir() function attempts to create a directory with
--   the given name and permissions. The mode argument is ignored on
--   Windows.
--   
--   See your C library manual for more details about
--   mkdir().
--   
--   Since: 2.6
mkdir :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | 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.
--   
--   On Windows consider using the G_DEBUGGER environment variable
--   (see Running GLib Applications) and calling
--   onErrorStackTrace instead.
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.
--   
--   When running on Windows, this function is *not* called by
--   onErrorQuery. If called directly, it will raise an exception,
--   which will crash the program. If the G_DEBUGGER environment
--   variable is set, a debugger will be invoked to attach and handle that
--   exception (see Running GLib Applications).
onErrorStackTrace :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | A wrapper for the POSIX open() function. The
--   open() function is used to convert a pathname into a
--   file descriptor.
--   
--   On POSIX systems file descriptors are implemented by the operating
--   system. On Windows, it's the C library that implements
--   open() and file descriptors. The actual Win32 API for
--   opening files is quite different, see MSDN documentation for
--   CreateFile(). The Win32 API uses file handles, which
--   are more randomish integers, not small integers like file descriptors.
--   
--   Because file descriptors are specific to the C library on Windows, the
--   file descriptor returned by this function makes sense only to
--   functions in the same C library. Thus if the GLib-using code uses a
--   different C library than GLib does, the file descriptor returned by
--   this function cannot be passed to C library functions like
--   write() or read().
--   
--   See your C library manual for more details about
--   open().
--   
--   Since: 2.6
open :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> Int32 -> m Int32

-- | 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 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 patternSpecNew and call
--   patternSpecMatchString repeatedly.
patternMatchSimple :: (HasCallStack, MonadIO m) => Text -> 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.
--   
--   While address has a volatile qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   volatile.
--   
--   Since: 2.30
pointerBitLock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | 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.80
pointerBitLockAndGet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m CUIntPtr

-- | This mangles ptr as pointerBitLock and
--   pointerBitUnlock do.
--   
--   Since: 2.80
pointerBitLockMaskPtr :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Bool -> CUIntPtr -> Ptr () -> m (Ptr ())

-- | This is equivalent to bitTrylock, but working on pointers (or
--   other pointer-sized values).
--   
--   For portability reasons, you may only lock on the bottom 32 bits of
--   the pointer.
--   
--   While address has a volatile qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   volatile.
--   
--   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.
--   
--   While address has a volatile qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   volatile.
--   
--   Since: 2.30
pointerBitUnlock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | This is equivalent to pointerBitUnlock and atomically setting
--   the pointer value.
--   
--   Note that the lock bit will be cleared from the pointer. If the
--   unlocked pointer that was set is not identical to ptr,
--   an assertion fails. In other words, ptr must have
--   lockBit unset. This also means, you usually can only
--   use this on the lowest bits.
--   
--   Since: 2.80
pointerBitUnlockAndSet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Ptr () -> CUIntPtr -> 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

-- | Prefixes prefix to an existing error message. If
--   err or *err is Nothing (i.e.: no error
--   variable) then do nothing.
--   
--   Since: 2.70
prefixErrorLiteral :: (HasCallStack, MonadIO m) => Maybe GError -> Text -> m (Maybe GError)

-- | 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)

-- | This is just like the standard C `qsort()`) function, but the
--   comparison routine accepts a user data argument (like
--   `qsort_r()`)).
--   
--   Unlike qsort(), this is guaranteed to be a stable sort (since
--   GLib 2.32).

-- | Deprecated: (Since version 2.82)total_elems is too small
--   to represent larger arrays; useGLib.sort_array
--   instead
qsortWithData :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> CSize -> CompareDataFunc -> m ()

-- | 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).
--   
--   This function must not be used before library constructors have
--   finished running. In particular, this means it cannot be used to
--   initialize global variables in C++.
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.
--   
--   This function must not be used before library constructors have
--   finished running. In particular, this means it cannot be used to
--   initialize global variables in C++.
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.
--   
--   This function must not be used before library constructors have
--   finished running.
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) => CSize -> 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) => CSize -> 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) => CSize -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   memBlock.
--   
--   Since: 2.58
rcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m CSize

-- | 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.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
realloc :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())

-- | This function is similar to realloc, allocating
--   (nBlocks * nBlockBytes) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
--   
--   Since: 2.24
reallocN :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> CSize -> 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.
--   
--   If True is returned, the reference count reached 0. After this
--   point, rc is an undefined state and must be
--   reinitialized with refCountInit to be used again.
--   
--   Since: 2.58
refCountDec :: (HasCallStack, MonadIO m) => Int32 -> m (Bool, Int32)

-- | Increases the reference count.
--   
--   Since: 2.58
refCountInc :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Initializes a reference count variable to 1.
--   
--   Since: 2.58
refCountInit :: (HasCallStack, MonadIO m) => m Int32

-- | Acquires a reference on a string.
--   
--   Since: 2.58
refStringAcquire :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Compares two ref-counted strings for byte-by-byte equality.
--   
--   It can be passed to GHashTable.new() as the key
--   equality function, and behaves exactly the same as strEqual (or
--   strcmp()), but can return slightly faster as it can check the
--   string lengths before checking all the bytes.
--   
--   Since: 2.84
refStringEqual :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Retrieves the length of str.
--   
--   Since: 2.58
refStringLength :: (HasCallStack, MonadIO m) => Text -> m CSize

-- | 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 remove() function. The
--   remove() function deletes a name from the filesystem.
--   
--   See your C library manual for more details about how
--   remove() works on your system. On Unix,
--   remove() removes also directories, as it calls
--   unlink() for files and rmdir() for
--   directories. On Windows, although remove() in the C
--   library only works for files, this function tries first
--   remove() and then if that fails
--   rmdir(), and thus works for both files and
--   directories. Note however, that on Windows, it is in general not
--   possible to remove a file that is open to some process, or mapped into
--   memory.
--   
--   If this function fails on Windows you can't infer too much from the
--   errno value. rmdir() is tried regardless of what
--   caused remove() to fail. Any errno value set by
--   remove() will be overwritten by that set by
--   rmdir().
--   
--   Since: 2.6
remove :: (HasCallStack, MonadIO m) => [Char] -> m Int32

-- | A wrapper for the POSIX rename() function. The
--   rename() function renames a file, moving it between
--   directories if required.
--   
--   See your C library manual for more details about how
--   rename() works on your system. It is not possible in
--   general on Windows to rename a file that is open to some process.
--   
--   Since: 2.6
rename :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m Int32

-- | 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. By default, the
--   program name is found by taking the last component of
--   argv[0].
--   
--   Since GLib 2.72, this function can be called multiple times and is
--   fully thread safe. Prior to GLib 2.72, this function could only be
--   called once per process.
--   
--   See the GTK documentation for requirements on integrating
--   setPrgname with GTK applications.
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.
--   
--   In particular, if commandLine is an empty string (or a
--   string containing only whitespace), ShellErrorEmptyString will
--   be returned. It’s guaranteed that argvp will be a
--   non-empty array if this function returns successfully.
--   
--   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.
--   
--   This function 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
--   $, ``<tt>, </tt>"<tt>, </tt>`, 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 libc allocator.
--   
--   The block address handed out can be expected to be aligned to at least
--   1 * sizeof (void*).
--   
--   Since GLib 2.76 this always uses the system malloc()
--   implementation internally.
--   
--   Since: 2.10
sliceAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a block of memory via sliceAlloc and initializes the
--   returned memory to 0.
--   
--   Since GLib 2.76 this always uses the system malloc()
--   implementation internally.
--   
--   Since: 2.10
sliceAlloc0 :: (HasCallStack, MonadIO m) => CSize -> 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 GLib 2.76 this always uses the system malloc()
--   implementation internally.
--   
--   Since: 2.14
sliceCopy :: (HasCallStack, MonadIO m) => CSize -> 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` environment
--   variable.
--   
--   If memBlock is Nothing, this function does
--   nothing.
--   
--   Since GLib 2.76 this always uses the system
--   free_sized() implementation internally.
--   
--   Since: 2.10
sliceFree1 :: (HasCallStack, MonadIO m) => CSize -> 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` environment variable.
--   
--   If memChain is Nothing, this function does
--   nothing.
--   
--   Since GLib 2.76 this always uses the system
--   free_sized() implementation internally.
--   
--   Since: 2.10
sliceFreeChainWithOffset :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> CSize -> 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

-- | Executes a child program asynchronously.
--   
--   See spawnAsyncWithPipesAndFds for a full description; this
--   function simply calls the spawnAsyncWithPipes without any
--   pipes, which in turn calls spawnAsyncWithPipesAndFds.
--   
--   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

-- | Executes a child program asynchronously.
--   
--   Identical to spawnAsyncWithPipesAndFds but with n_fds
--   set to zero, so no FD assignments are used.
--   
--   Since: 2.58
spawnAsyncWithFds :: (HasCallStack, MonadIO m) => Maybe [Char] -> [Text] -> Maybe [Text] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Int32 -> Int32 -> Int32 -> m Int32

-- | Identical to spawnAsyncWithPipesAndFds but with n_fds
--   set to zero, so no FD assignments are used.
spawnAsyncWithPipes :: (HasCallStack, MonadIO m) => Maybe [Char] -> [[Char]] -> Maybe [[Char]] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> m (Int32, Int32, Int32, 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.
--   
--   SpawnFlagsChildInheritsStdin means that the child will inherit
--   the parent's standard input (by default, the child's standard input is
--   attached to /dev/null). SpawnFlagsStdinFromDevNull
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the stdinPipeOut
--   argument is ignored.
--   
--   SpawnFlagsStdoutToDevNull means that the child's standard
--   output will be discarded (by default, it goes to the same location as
--   the parent's standard output). SpawnFlagsChildInheritsStdout
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the stdoutPipeOut
--   argument is ignored.
--   
--   SpawnFlagsStderrToDevNull means that the child's standard error
--   will be discarded (by default, it goes to the same location as the
--   parent's standard error). SpawnFlagsChildInheritsStderr
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the stderrPipeOut
--   argument is ignored.
--   
--   It is valid to pass the same FD in multiple parameters (e.g. you can
--   pass a single FD for both stdoutFd and
--   stderrFd, and include it in sourceFds
--   too).
--   
--   sourceFds and targetFds allow zero or
--   more FDs from this process to be remapped to different FDs in the
--   spawned process. If nFds is greater than zero,
--   sourceFds and targetFds must both be
--   non-Nothing and the same length. Each FD in
--   sourceFds is remapped to the FD number at the same
--   index in targetFds. The source and target FD may be
--   equal to simply propagate an FD to the spawned process. FD remappings
--   are processed after standard FDs, so any target FDs which equal
--   stdinFd, stdoutFd or
--   stderrFd will overwrite them in the spawned process.
--   
--   sourceFds is supported on Windows since 2.72.
--   
--   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 stdinPipeOut,
--   stdoutPipeOut, stderrPipeOut 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 stdinPipeOut is Nothing, the child's
--   standard input is attached to /dev/null unless
--   SpawnFlagsChildInheritsStdin is set.
--   
--   If stderrPipeOut is NULL, the child's standard error
--   goes to the same location as the parent's standard error unless
--   SpawnFlagsStderrToDevNull is set.
--   
--   If stdoutPipeOut 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,
--   stdinPipeOut, stdoutPipeOut, and
--   stderrPipeOut 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.
--   
--   Since: 2.68
spawnAsyncWithPipesAndFds :: (HasCallStack, MonadIO m) => Maybe [Char] -> [[Char]] -> Maybe [[Char]] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Int32 -> Int32 -> Int32 -> Maybe [Int32] -> Maybe [Int32] -> m (Int32, Int32, Int32, Int32)

-- | An old name for spawnCheckWaitStatus, deprecated because its
--   name is misleading.
--   
--   Despite the name of the function, waitStatus must be
--   the wait status as returned by spawnSync,
--   g_subprocess_get_status(), waitpid(), etc. On
--   Unix platforms, it is incorrect for it to be the exit status as passed
--   to exit() or returned by
--   g_subprocess_get_exit_status() or
--   WEXITSTATUS().
--   
--   Since: 2.34

-- | Deprecated: (Since version 2.70)Use spawnCheckWaitStatus
--   instead, and check whether your code is conflating wait and exit
--   statuses.
spawnCheckExitStatus :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Set error if waitStatus 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 the status of 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
--   waitStatus 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 wait 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
--   waitStatus. 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
--   (for example if it was killed by a signal), 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 waitStatus directly. Do not attempt to scan or
--   parse the error message string; it may be translated and/or change in
--   future versions of GLib.
--   
--   Prior to version 2.70, spawnCheckExitStatus provides the same
--   functionality, although under a misleading name.
--   
--   Since: 2.70
spawnCheckWaitStatus :: (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.
--   
--   The commandLine argument 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 waitStatus is non-Nothing, the
--   platform-specific status of the child is stored there; see the
--   documentation of spawnCheckWaitStatus for how to use and
--   interpret this. On Unix platforms, note that it is usually not equal
--   to the integer passed to exit() or returned from
--   main().
--   
--   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 waitStatus is non-Nothing, the
--   platform-specific status of the child is stored there; see the
--   documentation of spawnCheckWaitStatus for how to use and
--   interpret this. On Unix platforms, note that it is usually not equal
--   to the integer passed to exit() or returned from
--   main().
--   
--   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
--   waitStatus.
--   
--   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)

-- | A wrapper for the POSIX stat() function. The
--   stat() function returns information about a file. On
--   Windows the stat() function in the C library checks
--   only the FAT-style READONLY attribute and does not look at the ACL at
--   all. Thus on Windows the protection bits in the stMode
--   field are a fabrication of little use.
--   
--   On Windows the Microsoft C libraries have several variants of the stat
--   struct and stat() function with names like
--   _stat(), _stat32(),
--   _stat32i64() and _stat64i32(). The one
--   used here is for 32-bit code the one with 32-bit size and time fields,
--   specifically called _stat32().
--   
--   In Microsoft's compiler, by default struct stat means one with 64-bit
--   time fields while in MinGW struct stat is the legacy one with 32-bit
--   fields. To hopefully clear up this messs, the gstdio.h header defines
--   a type StatBuf which is the appropriate struct type depending
--   on the platform and/or compiler being used. On POSIX it is just struct
--   stat, but note that even on POSIX platforms, stat()
--   might be a macro.
--   
--   See your C library manual for more details about
--   stat().
--   
--   Since: 2.6
stat :: (HasCallStack, MonadIO m) => [Char] -> StatBuf -> m Int32

-- | Copies a nul-terminated string into the destination buffer, including
--   the trailing nul byte, and returns a pointer to the trailing nul byte
--   in dest. The return value is useful for concatenating
--   multiple strings 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 a string 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 g_str_tokenize_and_fold() on each string in
--   your corpus and build an index on the returned folded tokens, then
--   call g_str_tokenize_and_fold() 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

-- | Tokenizes 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-NULL 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", '?'))
--   
--   
--   In order to modify a copy, you may use strdup:
--   
--   
C code
--   
--   
--   reformatted = g_strcanon (g_strdup (const_str), "abc", '?');
--   …
--   g_free (reformatted);
--   
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 thisfunction 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 GLib.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 GLib.strstrip.
strchug :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Compares str1 and str2 like
--   strcmp().
--   
--   Handles NULL gracefully by sorting it before
--   non-NULL strings. Comparing two NULL pointers
--   returns 0.
--   
--   Since: 2.16
strcmp0 :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> m Int32

-- | Makes a copy of a string replacing C string-style escape sequences
--   with their one byte equivalent:
--   
--   
--   
- \b → U+0008 Backspace
--   
- \f → U+000C Form Feed
--   
- \n → U+000A Line Feed
--   
- \r → U+000D Carriage Return
--   
- \t → U+0009 Horizontal Tabulation
--   
- \v → U+000B Vertical Tabulation
--   
- \ followed by one to three octal digits → the numeric
--   value (mod 256)
--   
- \ followed by any other character → the character as is.
--   For example, \\ will turn into a backslash (\) and
--   \" into a double quote (").
--   
--   
--   strescape does the reverse conversion.
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", '?'))
--   
--   
--   In order to modify a copy, you may use strdup:
--   
--   
C code
--   
--   
--   reformatted = g_strdelimit (g_strdup (const_str), "abc", '?');
--   …
--   g_free (reformatted);
--   
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 orutf8Strdown instead.
strdown :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Duplicates a string. If str is NULL it
--   returns NULL.
strdup :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Copies an array of strings. The copy is a deep copy; each string is
--   also copied.
--   
--   If called on a NULL value, g_strdupv() simply
--   returns NULL.
strdupv :: (HasCallStack, MonadIO m) => Maybe [Text] -> m (Maybe [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. If the error code is unknown, it returns a
--   string like “Unknown error <code\>”.
--   
--   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:
--   
--   
C code
--   
--   
--   int saved_errno;
--   
--   ret = read (blah);
--   saved_errno = errno;
--   
--   g_strerror (saved_errno);
--   
strerror :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | It replaces the following special characters in the string
--   source with their corresponding C escape sequence:
--   
--   | Symbol | Escape |
--   |-----------------------------------------------------------------------------|--------|
--   | U+0008 Backspace | \b | | U+000C Form Feed |
--   \f | | U+000A Line Feed | \n | | U+000D
--   Carriage Return | \r | | U+0009 Horizontal
--   Tabulation | \t | | U+000B Vertical Tabulation |
--   \v |
--   
--   It also inserts a backslash (\) before any backslash or a
--   double quote ("). 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 backslash 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 an array of strings, as well as each string it contains.
--   
--   If strArray is NULL, this function simply
--   returns.
strfreev :: (HasCallStack, MonadIO m) => Maybe [Text] -> m ()

-- | An auxiliary function for gettext() support (see
--   Q_()).
--   
--   Since: 2.4
stripContext :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Joins an array of strings together to form one long string, with the
--   optional separator inserted between each of them.
--   
--   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
--   GLib.strconcat is harder to mess up.
strlcat :: (HasCallStack, MonadIO m) => Text -> Text -> CSize -> m CSize

-- | 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 -> CSize -> m CSize

-- | 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
--   g_strncasecmp() is that it doesthe comparison by calling
--   toupper()/tolower(). These functionsare
--   locale-specific and operate on single bytes. However, it isimpossible
--   to handle things correctly from an internationalizationstandpoint by
--   operating on bytes, since characters may be multibyte.Thus
--   g_strncasecmp() is broken if your string is guaranteed to
--   beASCII, since it is locale-sensitive, and it's broken if your
--   stringis 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, andutf8Casefold 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 NULL it returns NULL.
--   
--   To copy a number of characters from a UTF-8 encoded string, use
--   utf8Strncpy instead.
strndup :: (HasCallStack, MonadIO m) => Maybe Text -> CSize -> m (Maybe Text)

-- | Creates a new string length bytes long filled with
--   fillChar.
strnfill :: (HasCallStack, MonadIO m) => CSize -> Int8 -> m Text

-- | Reverses all of the bytes in a string. For example, g_strreverse
--   ("abcdef") will result in "fedcba".
--   
--   Note that g_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.
--   
--   The fact that this function returns gchar * rather than
--   const gchar * is a historical artifact.
strrstr :: (HasCallStack, MonadIO m) => Text -> Text -> m (Maybe Text)

-- | Searches the string haystack for the last occurrence
--   of the string needle, limiting the length of the
--   search to haystackLen.
--   
--   The fact that this function returns gchar * rather than
--   const gchar * is a historical artifact.
strrstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m (Maybe Text)

-- | Returns a string describing the given signal, e.g. "Segmentation
--   fault". If the signal is unknown, it returns “unknown signal
--   (<signum\>)”.
--   
--   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

-- | Splits a string into a maximum of maxTokens pieces,
--   using the given delimiter. If
--   maxTokens is reached, the remainder of
--   string is appended to the last token.
--   
--   As an example, the result of g_strsplit (":a:bc::d:", ":",
--   -1) is an array containing the six strings "", "a", "bc", "", "d"
--   and "".
--   
--   As a special case, the result of splitting the empty string "" is an
--   empty array, not an array containing a single string. The reason for
--   this special case is that being able to represent an empty array 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 g_strsplit().
strsplit :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> m [Text]

-- | Splits string into a number of tokens not containing
--   any of the bytes in delimiters.
--   
--   A token is the (possibly empty) longest string that does not contain
--   any of the bytes in delimiters. Note that separators
--   will only be single bytes from delimiters. If
--   maxTokens is reached, the remainder is appended to the
--   last token.
--   
--   For example, the result of g_strsplit_set ("abc:def/ghi", ":/",
--   -1) is an array containing the three strings "abc",
--   "def", and "ghi".
--   
--   The result of g_strsplit_set (":def/ghi:/x", ":/", -1) is an
--   array containing the five strings "", "def",
--   "ghi", "", "x".
--   
--   As a special case, the result of splitting the empty string
--   "" is an empty array, not an array containing a single
--   string. The reason for this special case is that being able to
--   represent an empty array 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
--   g_strsplit_set().
--   
--   Note that this function works on bytes not characters, so it can't be
--   used to delimit UTF-8 strings for anything but ASCII characters.
--   
--   Since: 2.4
strsplitSet :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> m [Text]

-- | Searches the string haystack for the first occurrence
--   of the string needle, limiting the length of the
--   search to haystackLen or a nul terminator byte
--   (whichever is reached first).
--   
--   A length of -1 can be used to mean “search the entire
--   string”, like strstr().
--   
--   The fact that this function returns gchar * rather than
--   const gchar * is a historical artifact.
strstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m (Maybe Text)

-- | Converts a string to a floating point 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 discussedin the strncasecmp docs — use
--   asciiStrup orutf8Strup instead.
strup :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Checks if an array of strings contains the string str
--   according to strEqual. strv must not be
--   NULL.
--   
--   Since: 2.44
strvContains :: (HasCallStack, MonadIO m) => [Text] -> Text -> m Bool

-- | Checks if two arrays of strings 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 qsortWithData or similar).
--   
--   Two empty arrays are considered equal. Neither strv1
--   nor strv2 may be NULL.
--   
--   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 an array of strings. strArray
--   must not be NULL.
--   
--   Since: 2.6
strvLength :: (HasCallStack, MonadIO m) => [Text] -> m Word32

-- | Creates a new test case.
--   
--   This function is similar to GLib.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 /-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
--   [constgLib.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 ()

-- | Creates a new test case.
--   
--   This function is similar to GLib.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 /-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
--   [constgLib.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 ()

-- | 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. If testBugBase has not been
--   called, it is assumed to be the empty string, so a full URI can be
--   provided to testBug instead.
--   
--   See also testSummary.
--   
--   Since GLib 2.70, the base URI is not prepended to
--   bugUriSnippet if it is already a valid URI.
--   
--   Since: 2.16
testBug :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Specifies the base URI for bug reports.
--   
--   The base URI is used to construct bug report messages for
--   GLib.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.
--   
--   If testBugBase is not called, bug URIs are formed solely from
--   the value provided by testBug.
--   
--   Since: 2.16
testBugBase :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Attempts to disable system crash reporting infrastructure.
--   
--   This function should be called before exercising code paths that are
--   expected or intended to crash, to avoid wasting resources in
--   system-wide crash collection infrastructure such as systemd-coredump
--   or abrt.
--   
--   Since: 2.78
testDisableCrashReporting :: (HasCallStack, MonadIO m) => 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
--   (GLib.log without G_LOG_USE_STRUCTURED
--   defined). It will not work with the structured logging API. See
--   Testing for Messages.
--   
--   Use GLib.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 GLib.error
--   messages, since GLib.error intentionally never returns
--   even if the program doesn’t abort; use testTrapSubprocess in
--   this case.
--   
--   If messages at [flagsgLib.LogLevelFlags.LEVEL_DEBUG]
--   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.
--   
--   Note that unlike testSkip and testIncomplete, this
--   function does not log a message alongside the test failure. If details
--   of the test failure are available, either log them with
--   GLib.test_message before testFail, or use
--   GLib.test_fail_printf instead.
--   
--   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]

-- | Gets the test path for the test currently being run.
--   
--   In essence, it will be the same string passed as the first argument to
--   e.g. GLib.test_add when the test was added.
--   
--   This function returns a valid string only within a test function.
--   
--   Note that this is a test path, not a file system path.
--   
--   Since: 2.68
testGetPath :: (HasCallStack, MonadIO m) => m Text

-- | 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

-- | Enqueues a callback destroyFunc to be executed during
--   the next test case teardown phase.
--   
--   This is most useful to auto destroy 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 ()

-- | Enqueues 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 ()

-- | Gets a reproducible random floating point number.
--   
--   See testRandInt for details on test case random numbers.
--   
--   Since: 2.16
testRandDouble :: (HasCallStack, MonadIO m) => m Double

-- | Gets a reproducible random floating point 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

-- | Gets 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

-- | Gets 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.
--   
--   The toplevel suite can be retrieved with
--   GLib.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 GLib.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
--   GLib.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

-- | Executes the tests within suite and all nested test
--   suites.
--   
--   The test suites to be executed are filtered according to test path
--   arguments (-p testpath and -s testpath) as parsed by
--   GLib.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 the various assertion macros.
--   
--   The g_assert_*() macros,
--   g_test_assert_expected_messages() and the various
--   g_test_trap_assert_*() macros are changed to not abort to
--   program.
--   
--   Instead, they will 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 GLib.assert_not_reached and
--   GLib.assert macros are not affected by this.
--   
--   This function can only be called after GLib.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 if the test program is running under
--   testTrapSubprocess.
--   
--   Since: 2.38
testSubprocess :: (HasCallStack, MonadIO m) => m Bool

-- | Sets the summary for a test.
--   
--   This may be included in test report output, and is useful
--   documentation for anyone reading the source code or modifying a test
--   in future. It must be a single line, and it should summarise what the
--   test checks, and how.
--   
--   This should be called at the top of a test function.
--   
--   For example:
--   
--   
c code
--   
--   
--   static void
--   test_array_sort (void)
--   {
--     g_test_summary ("Test my_array_sort() sorts the array correctly and stably, "
--                     "including testing zero length and one-element arrays.");
--   
--     // ...
--   }
--   
--   
--   See also testBug.
--   
--   Since: 2.62
testSummary :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Gets the number of seconds since the last start of the timer with
--   testTimerStart.
--   
--   Since: 2.16
testTimerElapsed :: (HasCallStack, MonadIO m) => m Double

-- | Reports the last result of testTimerElapsed.
--   
--   Since: 2.16
testTimerLast :: (HasCallStack, MonadIO m) => m Double

-- | Starts 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 ()

-- | Forks 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
--   [flagsgLib.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
--   ");
--           g_printerr ("some stderr text: semagic43
--   ");
--           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,is
--   not always reliable due to problems inherent in fork-without-execand
--   doesn't set close-on-exec flag on its file descriptors.Use
--   funcgLib.test_trap_subprocess] instead.
testTrapFork :: (HasCallStack, MonadIO m) => Word64 -> [TestTrapFlags] -> m Bool

-- | Checks the result of the last testTrapSubprocess call.
--   
--   Since: 2.16
testTrapHasPassed :: (HasCallStack, MonadIO m) => m Bool

-- | Checks 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 is equivalent to calling testTrapSubprocessWithEnvp with
--   envp set to NULL. See the documentation for that
--   function for full details.
--   
--   Since: 2.38
testTrapSubprocess :: (HasCallStack, MonadIO m) => Maybe Text -> Word64 -> [TestSubprocessFlags] -> m ()

-- | Respawns the test program to run only testPath in a
--   subprocess with a given environment.
--   
--   This can be used for a test case that might not return, or that might
--   abort.
--   
--   If testPath is NULL 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 envp is NULL, the parent process’
--   environment will be inherited.
--   
--   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
--   [flagsgLib.TestSubprocessFlags] flags.
--   
--   You can use methods such as
--   GLib.test_trap_assert_passed,
--   GLib.test_trap_assert_failed, and
--   GLib.test_trap_assert_stderr to check the results of
--   the subprocess. (But note that
--   GLib.test_trap_assert_stdout and
--   GLib.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
--   GLib.test_init) to see whether you are in a
--   subprocess.
--   
--   Internally, this function tracks the child process using
--   childWatchSourceNew, so your process must not ignore
--   SIGCHLD, and must not attempt to watch or wait for the child
--   process via another mechanism.
--   
--   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, G_TEST_SUBPROCESS_DEFAULT);
--     g_test_trap_assert_failed ();
--     g_test_trap_assert_stderr ("*ERROR*too large*");
--   }
--   
--   static void
--   test_different_username (void)
--   {
--     if (g_test_subprocess ())
--       {
--         // Code under test goes here
--         g_message ("Username is now simulated as %s", g_getenv ("USER"));
--         return;
--       }
--   
--     // Reruns this same test in a subprocess
--     g_auto(GStrv) envp = g_get_environ ();
--     envp = g_environ_setenv (g_steal_pointer (&envp), "USER", "charlie", TRUE);
--     g_test_trap_subprocess_with_envp (NULL, envp, 0, G_TEST_SUBPROCESS_DEFAULT);
--     g_test_trap_assert_passed ();
--     g_test_trap_assert_stdout ("Username is now simulated as charlie");
--   }
--   
--   int
--   main (int argc, char **argv)
--   {
--     g_test_init (&argc, &argv, NULL);
--   
--     g_test_add_func ("/myobject/create-large-object",
--                      test_create_large_object);
--     g_test_add_func ("/myobject/different-username",
--                      test_different_username);
--     return g_test_run ();
--   }
--   
--   
--   Since: 2.80
testTrapSubprocessWithEnvp :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe [[Char]] -> Word64 -> [TestSubprocessFlags] -> m ()

-- | Sets a function to be called at regular intervals, with the given
--   priority.
--   
--   The function is called repeatedly until it returns
--   [constgLib.SOURCE_REMOVE], 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 main loop 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
--   [constgLib.SOURCE_REMOVE], at which point the timeout
--   is automatically destroyed and the function will not be called again.
--   
--   Unlike timeoutAdd, 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 main loop 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
--   timeoutAdd 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 timeoutAddSeconds is preferred over
--   timeoutAdd.
--   
--   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.
--   
--   It is safe to call this function from any thread.
--   
--   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) => CSize -> 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) => CSize -> 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) => CSize -> CSize -> 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) => CSize -> CSize -> 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 () -> CSize -> 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 () -> CSize -> CSize -> m (Ptr ())

-- | Convert a string from UCS-4 to UTF-16.
--   
--   A nul character (U+0000) will be added to the result after the
--   converted text.
ucs4ToUtf16 :: (HasCallStack, MonadIO m) => [Char] -> m (Word16, CLong, CLong)

-- | Convert a string from a 32-bit fixed width representation as UCS-4. to
--   UTF-8.
--   
--   The result will be terminated with a nul byte.
ucs4ToUtf8 :: (HasCallStack, MonadIO m) => [Char] -> m (Text, CLong, CLong)

-- | 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 -> m (Bool, Char)

-- | 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 -> m (Bool, Char, Char)

-- | 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 -> m (Bool, Char)

-- | 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 hexadecimal 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.
--   U+0000 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 hexadecimal 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 -> CSize -> 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] -> m ()

-- | 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

-- | Queries the file path for the given FD opened by the current process.
--   
--   Since: 2.88
unixFdQueryPath :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | Creates a Source to watch for a particular I/O condition on a
--   file descriptor.
--   
--   The source will never close the fd — you must do it
--   yourself.
--   
--   Any callback attached to the returned Source must have type
--   UnixFDSourceFunc.
--   
--   Since: 2.36
unixFdSourceNew :: (HasCallStack, MonadIO m) => Int32 -> [IOCondition] -> m Source

-- | Get the passwd file entry for the given
--   userName using getpwnam_r(). This can fail if
--   the given userName doesn’t exist.
--   
--   The returned struct passwd has been allocated using
--   malloc and should be freed using free. The strings
--   referenced by the returned struct are included in the same allocation,
--   so are valid until the struct passwd is freed.
--   
--   This function is safe to call from multiple threads concurrently.
--   
--   You will need to include pwd.h to get the definition of
--   struct passwd.
--   
--   Since: 2.64
unixGetPasswdEntry :: (HasCallStack, MonadIO m) => Text -> m (Ptr ())

-- | 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.
--   
--   As of GLib 2.78, the supported flags are
--   O_CLOEXEC/FD_CLOEXEC (see below) and
--   O_NONBLOCK. Prior to GLib 2.78, only FD_CLOEXEC was
--   supported — if you wanted to configure O_NONBLOCK then that
--   had to be done separately with fcntl().
--   
--   Since GLib 2.80, the constants UnixPipeEndRead and
--   UnixPipeEndWrite can be used as mnemonic indexes in
--   fds.
--   
--   It is a programmer error to call this function with unsupported flags,
--   and a critical warning will be raised.
--   
--   As of GLib 2.78, it is preferred to pass O_CLOEXEC in, rather
--   than FD_CLOEXEC, as that matches the underlying
--   pipe() API more closely. Prior to 2.78, only
--   FD_CLOEXEC was supported. Support for FD_CLOEXEC may
--   be deprecated and removed in future.
--   
--   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 mainLoopQuit. It is not safe to do any of this from a
--   regular UNIX signal handler; such a handler may be invoked while
--   malloc() or another library function is running,
--   causing reentrancy issues if the handler attempts to use those
--   functions. 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 ()

-- | 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 ()

-- | Convert a string from UTF-16 to UCS-4.
--   
--   The result will be nul-terminated.
utf16ToUcs4 :: (HasCallStack, MonadIO m) => [Word16] -> m (Char, CLong, CLong)

-- | Convert a string from UTF-16 to UTF-8.
--   
--   The result will be terminated with a nul byte.
--   
--   Note that the input is expected to be already in native endianness, an
--   initial byte-order-mark character is not handled specially.
--   convert can be used to convert a byte buffer of UTF-16 data of
--   ambiguous endianness.
--   
--   Further note that this function does not validate the result string;
--   it may (for example) include embedded nul characters. The only
--   validation done by this function is to ensure that the input can be
--   correctly interpreted as UTF-16, i.e. it doesn’t contain unpaired
--   surrogates or partial character sequences.
utf16ToUtf8 :: (HasCallStack, MonadIO m) => [Word16] -> m (Text, CLong, CLong)

-- | 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. 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.
--   
--   If the two strings are not comparable due to being in different
--   collation sequences, the result is undefined. This can happen if the
--   strings are in different language scripts, for example.
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.
--   
--   Note that the returned string is not guaranteed to be in any encoding,
--   especially UTF-8. The returned value is meant to be used only for
--   comparisons.
utf8CollateKey :: (HasCallStack, MonadIO m) => Text -> Int64 -> m [Char]

-- | 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.
--   
--   Note that the returned string is not guaranteed to be in any encoding,
--   especially UTF-8. The returned value is meant to be used only for
--   comparisons.
--   
--   Since: 2.8
utf8CollateKeyForFilename :: (HasCallStack, MonadIO m) => Text -> Int64 -> m [Char]

-- | 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 NULL, the return value will never
--   be NULL: if the end of the string is reached, a pointer to
--   the terminating nul byte is returned. If end is
--   non-NULL, the return value will be NULL 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 NULL 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 (Maybe 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 (Maybe 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 an 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 (Maybe 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 + 1 to fit the largest possible UTF-8 characters
utf8Strncpy :: (HasCallStack, MonadIO m) => Text -> Text -> CSize -> 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 (Maybe 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 GLib 2.72, -1 can be passed to endPos
--   to indicate the end of the string.
--   
--   Since: 2.30
utf8Substring :: (HasCallStack, MonadIO m) => Text -> CLong -> CLong -> m Text

-- | Convert a string from UTF-8 to a 32-bit fixed width representation as
--   UCS-4.
--   
--   A trailing nul character (U+0000) will be added to the string after
--   the converted text.
utf8ToUcs4 :: (HasCallStack, MonadIO m) => Text -> CLong -> m (Char, CLong, CLong)

-- | Convert a string from UTF-8 to a 32-bit fixed width representation as
--   UCS-4, assuming valid UTF-8 input.
--   
--   This function is roughly twice as fast as utf8ToUcs4 but does
--   no error checking on the input. A trailing nul character (U+0000) will
--   be added to the string after the converted text.
utf8ToUcs4Fast :: (HasCallStack, MonadIO m) => Text -> CLong -> m (Char, CLong)

-- | Convert a string from UTF-8 to UTF-16.
--   
--   A nul character (U+0000) will be added to the result after the
--   converted text.
utf8ToUtf16 :: (HasCallStack, MonadIO m) => Text -> CLong -> m (Word16, CLong, CLong)

-- | Cuts off the middle of the string, preserving half of
--   truncateLength characters at the beginning and half at
--   the end.
--   
--   If string is already short enough, this returns a copy
--   of string. If truncateLength is
--   0, an empty string is returned.
--   
--   Since: 2.78
utf8TruncateMiddle :: (HasCallStack, MonadIO m) => Text -> CSize -> 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-NULL, then the end of the valid
--   range will be stored there. This is the first byte of the first
--   invalid character if some bytes were invalid, or the end of the text
--   being validated otherwise — either the trailing nul byte, or the first
--   byte beyond maxLen (if it’s positive).
--   
--   Note that g_utf8_validate() 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
--   g_utf8_validate() before doing anything else with it.
utf8Validate :: (HasCallStack, MonadIO m) => ByteString -> m (Bool, ByteString)

-- | 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, ByteString)

-- | A wrapper for the POSIX utime() function. The
--   utime() function sets the access and modification
--   timestamps of a file.
--   
--   See your C library manual for more details about how
--   utime() works on your system.
--   
--   Since: 2.18
utime :: (HasCallStack, MonadIO m) => [Char] -> Ptr () -> m Int32

-- | 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. It has the
--   same randomness guarantees as Rand, so must not be used for
--   cryptographic purposes such as key generation, nonces, salts or
--   one-time pads.
--   
--   Since: 2.52
uuidStringRandom :: (HasCallStack, MonadIO m) => m Text

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

module GI.GLib
