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


module GI.GLib.Constants

-- | <i>No description available in the introspection data.</i>
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: <tt><i>GLIB_VERSION_2_26</i></tt>,
--   <tt><i>GLIB_VERSION_2_28</i></tt>,...
--   
--   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
--   <a>VERSION_MIN_REQUIRED</a> or earlier will cause warnings (but using
--   functions deprecated in later releases will not).
--   
--   <i>Since: 2.32</i>
pattern VERSION_MIN_REQUIRED :: 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 <a>RFC 3986</a>.
--   Includes <tt>!$&amp;'()*+,;=</tt>.
--   
--   <i>Since: 2.16</i>
pattern URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS :: Text

-- | Generic delimiters characters as defined in <a>RFC 3986</a>. Includes
--   <tt>:/?#[]@</tt>.
--   
--   <i>Since: 2.16</i>
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.
--   
--   <i>Since: 2.32</i>
pattern UNICHAR_MAX_DECOMPOSITION_LENGTH :: Int32

-- | Evaluates to a time span of one second.
--   
--   <i>Since: 2.26</i>
pattern TIME_SPAN_SECOND :: Int64

-- | Evaluates to a time span of one minute.
--   
--   <i>Since: 2.26</i>
pattern TIME_SPAN_MINUTE :: Int64

-- | Evaluates to a time span of one millisecond.
--   
--   <i>Since: 2.26</i>
pattern TIME_SPAN_MILLISECOND :: Int64

-- | Evaluates to a time span of one hour.
--   
--   <i>Since: 2.26</i>
pattern TIME_SPAN_HOUR :: Int64

-- | Evaluates to a time span of one day.
--   
--   <i>Since: 2.26</i>
pattern TIME_SPAN_DAY :: Int64

-- | Creates a unique temporary directory for each unit test and uses
--   <tt><i>g_set_user_dirs()</i></tt> to set XDG directories to point into
--   subdirectories of it for the duration of the unit test. The directory
--   tree is cleaned up after the test finishes successfully. Note that
--   this doesn’t take effect until <a>testRun</a> is called, so calls to
--   (for example) <tt><i>g_get_user_home_dir()</i></tt> will return the
--   system-wide value when made in a test program’s <tt><i>main()</i></tt>
--   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.
--   
--   <ul>
--   <li><a>getHomeDir</a></li>
--   <li><a>getUserCacheDir</a></li>
--   <li><a>getSystemConfigDirs</a></li>
--   <li><a>getUserConfigDir</a></li>
--   <li><a>getSystemDataDirs</a></li>
--   <li><a>getUserDataDir</a></li>
--   <li><a>getUserStateDir</a></li>
--   <li><a>getUserRuntimeDir</a></li>
--   </ul>
--   
--   The subdirectories may not be created by the test harness; as with
--   normal calls to functions like <a>getUserCacheDir</a>, the caller must
--   be prepared to create the directory if it doesn’t exist.
--   
--   <i>Since: 2.60</i>
pattern TEST_OPTION_ISOLATE_DIRS :: Text

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_MSG_PEEK :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_MSG_OOB :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_MSG_DONTROUTE :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_AF_UNIX :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_AF_INET6 :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SYSDEF_AF_INET :: Int32

-- | The standard delimiters, used in <a>strdelimit</a>.
pattern STR_DELIMITERS :: Text

-- | <i>No description available in the introspection data.</i>
pattern SQRT2 :: Double

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

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

-- | <i>No description available in the introspection data.</i>
pattern SIZEOF_VOID_P :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SIZEOF_SSIZE_T :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SIZEOF_SIZE_T :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SIZEOF_LONG :: Int32

-- | <i>No description available in the introspection data.</i>
pattern SEARCHPATH_SEPARATOR_S :: Text

-- | <i>No description available in the introspection data.</i>
pattern SEARCHPATH_SEPARATOR :: Int32

-- | Evaluates to the initial reference count for <tt>grefcount</tt>.
--   
--   This macro is useful for initializing <tt>grefcount</tt> fields inside
--   structures, for instance:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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",
--   };
--   </pre>
--   
--   <i>Since: 2.78</i>
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 <a>PRIORITY_HIGH_IDLE</a> + 10 for resizing operations, and
--   <a>PRIORITY_HIGH_IDLE</a> + 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
--   <tt><i>g_idle_add()</i></tt>.
pattern PRIORITY_DEFAULT_IDLE :: Int32

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

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

-- | <i>No description available in the introspection data.</i>
pattern PI_4 :: Double

-- | <i>No description available in the introspection data.</i>
pattern PI_2 :: Double

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

-- | <i>No description available in the introspection data.</i>
pattern PI :: Double

-- | <i>No description available in the introspection data.</i>
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 <tt>argv</tt>. The option must be of type
--   <a>OptionArgCallback</a>, <a>OptionArgStringArray</a> or
--   <a>OptionArgFilenameArray</a>.
--   
--   Using <a>OPTION_REMAINING</a> instead of simply scanning <tt>argv</tt>
--   for leftover arguments has the advantage that GOption takes care of
--   necessary encoding conversions for strings or filenames.
--   
--   <i>Since: 2.6</i>
pattern OPTION_REMAINING :: Text

-- | <i>No description available in the introspection data.</i>
pattern MODULE_SUFFIX :: Text

-- | The minor version number of the GLib library.
--   
--   Like <tt><i>gtk_minor_version</i></tt>, 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 <tt><i>gint8</i></tt>.
--   
--   <i>Since: 2.4</i>
pattern MININT8 :: Int8

-- | The minimum value which can be held in a <tt><i>gint64</i></tt>.
pattern MININT64 :: Int64

-- | The minimum value which can be held in a <tt><i>gint32</i></tt>.
--   
--   <i>Since: 2.4</i>
pattern MININT32 :: Int32

-- | The minimum value which can be held in a <tt><i>gint16</i></tt>.
--   
--   <i>Since: 2.4</i>
pattern MININT16 :: Int16

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

-- | <i>No description available in the introspection data.</i>
pattern MAXUINT8 :: Word8

-- | <i>No description available in the introspection data.</i>
pattern MAXUINT64 :: Word64

-- | <i>No description available in the introspection data.</i>
pattern MAXUINT32 :: Word32

-- | <i>No description available in the introspection data.</i>
pattern MAXUINT16 :: Word16

-- | <i>No description available in the introspection data.</i>
pattern MAXINT8 :: Int8

-- | <i>No description available in the introspection data.</i>
pattern MAXINT64 :: Int64

-- | <i>No description available in the introspection data.</i>
pattern MAXINT32 :: Int32

-- | <i>No description available in the introspection data.</i>
pattern MAXINT16 :: Int16

-- | The major version number of the GLib library.
--   
--   Like <tt><i>glib_major_version</i></tt>, 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 <tt>1&lt;&lt;G_LOG_LEVEL_USER_SHIFT</tt> 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 <a>Using
--   Structured Logging</a>.
pattern LOG_FATAL_MASK :: Int32

-- | Defines the log domain. See <a>Log Domains</a>.
--   
--   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, <tt>bloatpad</tt> or
--   <tt>bloatpad-io</tt>.
--   
--   If undefined, it defaults to the default <a>Nothing</a> (or
--   <tt>""</tt>) log domain; this is not advisable, as it cannot be
--   filtered against using the <tt>G_MESSAGES_DEBUG</tt> environment
--   variable.
--   
--   For example, GTK uses this in its <tt>Makefile.am</tt>: &gt;
--   &gt;AM_CPPFLAGS = -DG_LOG_DOMAIN="Gtk"
--   
--   Applications can choose to leave it as the default <a>Nothing</a> (or
--   <tt>""</tt>) domain. However, defining the domain offers the same
--   advantages as above.
pattern LOG_DOMAIN :: Int8

-- | <i>No description available in the introspection data.</i>
pattern LOG_2_BASE_10 :: Double

-- | <i>No description available in the introspection data.</i>
pattern LN2 :: Double

-- | <i>No description available in the introspection data.</i>
pattern LN10 :: Double

-- | <i>No description available in the introspection data.</i>
pattern LITTLE_ENDIAN :: Int32

-- | The value of the <a>KEY_FILE_DESKTOP_KEY_TYPE</a>, key for desktop
--   entries representing links to documents.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_TYPE_LINK :: Text

-- | The value of the <a>KEY_FILE_DESKTOP_KEY_TYPE</a>, key for desktop
--   entries representing directories.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_TYPE_DIRECTORY :: Text

-- | The value of the <a>KEY_FILE_DESKTOP_KEY_TYPE</a>, key for desktop
--   entries representing applications.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_TYPE_APPLICATION :: Text

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

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

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

-- | A key under <a>KEY_FILE_DESKTOP_GROUP</a>, 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 <tt>Application</tt> type.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_KEY_TRY_EXEC :: Text

-- | A key under <a>KEY_FILE_DESKTOP_GROUP</a>, 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 <tt>Application</tt>
--   type.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_KEY_TERMINAL :: Text

-- | A key under <a>KEY_FILE_DESKTOP_GROUP</a>, 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.
--   
--   <i>Since: 2.14</i>
pattern KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS :: Text

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-- | <i>No description available in the introspection data.</i>
pattern IEEE754_FLOAT_BIAS :: Int32

-- | <i>No description available in the introspection data.</i>
pattern IEEE754_DOUBLE_BIAS :: Int32

-- | The position of the first bit which is not reserved for internal use
--   be the <a>Hook</a> implementation, i.e. <tt>1 &lt;&lt;
--   G_HOOK_FLAG_USER_SHIFT</tt> is the first bit which can be used for
--   application-defined flags.
pattern HOOK_FLAG_USER_SHIFT :: Int32

-- | <i>No description available in the introspection data.</i>
pattern HAVE_ISO_VARARGS :: Int32

-- | <i>No description available in the introspection data.</i>
pattern HAVE_GROWING_STACK :: Int32

-- | <i>No description available in the introspection data.</i>
pattern HAVE_GNUC_VISIBILITY :: Int32

-- | <i>No description available in the introspection data.</i>
pattern HAVE_GNUC_VARARGS :: Int32

-- | <i>No description available in the introspection data.</i>
pattern HAVE_GINT64 :: Int32

-- | <i>No description available in the introspection data.</i>
pattern GUINTPTR_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GUINT64_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GUINT32_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GUINT16_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GSSIZE_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GSSIZE_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GSIZE_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GSIZE_FORMAT :: Text

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

-- | <i>Deprecated: (Since version 2.16)Use <tt><i>G_STRFUNC()</i></tt>
--   instead</i>
pattern GNUC_PRETTY_FUNCTION :: Text

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

-- | <i>Deprecated: (Since version 2.16)Use <tt><i>G_STRFUNC()</i></tt>
--   instead</i>
pattern GNUC_FUNCTION :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINTPTR_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINTPTR_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT64_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT64_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT32_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT32_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT16_MODIFIER :: Text

-- | <i>No description available in the introspection data.</i>
pattern GINT16_FORMAT :: Text

-- | <i>No description available in the introspection data.</i>
pattern E :: Double

-- | <i>No description available in the introspection data.</i>
pattern DIR_SEPARATOR_S :: Text

-- | <i>No description available in the introspection data.</i>
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 <tt><i>GDateDay</i></tt>.
pattern DATE_BAD_DAY :: Int32

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

-- | <i>No description available in the introspection data.</i>
pattern C_STD_VERSION :: Int32

-- | The set of lowercase ASCII alphabet characters. Used for specifying
--   valid identifier characters in <a>ScannerConfig</a>.
pattern CSET_a_2_z :: Text

-- | The set of ASCII digits. Used for specifying valid identifier
--   characters in <a>ScannerConfig</a>.
pattern CSET_DIGITS :: Text

-- | The set of uppercase ASCII alphabet characters. Used for specifying
--   valid identifier characters in <a>ScannerConfig</a>.
pattern CSET_A_2_Z :: Text

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

-- | <i>No description available in the introspection data.</i>
pattern BIG_ENDIAN :: Int32

-- | Evaluates to the initial reference count for <tt>gatomicrefcount</tt>.
--   
--   This macro is useful for initializing <tt>gatomicrefcount</tt> fields
--   inside structures, for instance:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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",
--   };
--   </pre>
--   
--   <i>Since: 2.78</i>
pattern ATOMIC_REF_COUNT_INIT :: Int32

-- | A good size for a buffer to be passed into <a>asciiDtostr</a>. 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   char buf[G_ASCII_DTOSTR_BUF_SIZE];
--   
--   fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value));
--   </pre>
pattern ASCII_DTOSTR_BUF_SIZE :: Int32

-- | <i>No description available in the introspection data.</i>
pattern ANALYZER_ANALYZING :: Int32

-- | <i>No description available in the introspection data.</i>
pattern ALLOC_ONLY :: Int32

-- | <i>No description available in the introspection data.</i>
pattern ALLOC_AND_FREE :: Int32

-- | <i>No description available in the introspection data.</i>
pattern ALLOCATOR_SLIST :: Int32

-- | <i>No description available in the introspection data.</i>
pattern ALLOCATOR_NODE :: Int32

-- | <i>No description available in the introspection data.</i>
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 <a>BookmarkFileError</a>. This is a
--   specialized version of <a>catchGErrorJustDomain</a>.
catchBookmarkFileError :: IO a -> (BookmarkFileError -> GErrorMessage -> IO a) -> IO a

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

-- | The hashing algorithm to be used by <a>Checksum</a> when performing
--   the digest of some data.
--   
--   Note that the <a>ChecksumType</a> enumeration may be extended at a
--   later date to include new hashing algorithm types.
--   
--   <i>Since: 2.16</i>
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 <a>ConvertError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchConvertError :: IO a -> (ConvertError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>ConvertError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
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 <a>DateMonthJanuary</a>,
--   <a>DateMonthFebruary</a>, etc. <a>DateMonthBadMonth</a> 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; <a>DateWeekdayMonday</a>,
--   <a>DateWeekdayTuesday</a>, etc. <a>DateWeekdayBadWeekday</a> 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 <i><tt>vError</tt></i> field of
--   <a>TokenValue</a>, when the token is a <a>TokenTypeError</a>.
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 <i><tt>errno</tt></i> codes returned from file
--   operations on UNIX. Unlike <i><tt>errno</tt></i> 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 <a>GError</a> error
--   code enumerations. Returned if no specific code applies.
FileErrorFailed :: FileError

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

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

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

-- | Error codes returned by <a>IOChannel</a> 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 <a>IOChannelError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchIOChannelError :: IO a -> (IOChannelError -> GErrorMessage -> IO a) -> IO a

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

-- | <a>IOError</a> is only used by the deprecated functions
--   <a>iOChannelRead</a>, <a>iOChannelWrite</a>, and <a>iOChannelSeek</a>.
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 <a>IOFuncs</a> 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 <a>KeyFileError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchKeyFileError :: IO a -> (KeyFileError -> GErrorMessage -> IO a) -> IO a

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

-- | Return values from <tt><i>GLogWriterFuncs</i></tt> 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 <a>LogWriterFunc</a> ignores a log entry, it should return
--   <a>LogWriterOutputHandled</a>.
--   
--   <i>Since: 2.50</i>
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 <a>MarkupParser</a> functions; element wasn't
--   known
MarkupErrorUnknownElement :: MarkupError

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

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

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

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

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

-- | Handle exceptions of type <a>MarkupError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
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 <a>NormalizeModeDefault</a>
NormalizeModeNfd :: NormalizeMode

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

-- | another name for <a>NormalizeModeDefaultCompose</a>
NormalizeModeNfc :: NormalizeMode

-- | beyond <a>NormalizeModeDefault</a> 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 <a>NormalizeModeAll</a>
NormalizeModeNfkd :: NormalizeMode

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

-- | another name for <a>NormalizeModeAllCompose</a>
NormalizeModeNfkc :: NormalizeMode

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

-- | Error codes returned by functions converting a string to a number.
--   
--   <i>Since: 2.54</i>
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 <a>NumberParserError</a>. This is a
--   specialized version of <a>catchGErrorJustDomain</a>.
catchNumberParserError :: IO a -> (NumberParserError -> GErrorMessage -> IO a) -> IO a

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

-- | The possible statuses of a one-time initialization function controlled
--   by a <a>Once</a> struct.
--   
--   <i>Since: 2.4</i>
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 <a>OptionArg</a> 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:
--   <tt>-x arg</tt>, with a long option: <tt>--name arg</tt> or combined
--   in a single argument: <tt>--name=arg</tt>.
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 <a>OptionArgFunc</a>) 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 <a>OptionArgInt</a> but for
--   larger numbers. The number can be in decimal base, or in hexadecimal
--   (when prefixed with <tt>0x</tt>, for example, <tt>0xffffffff</tt>).
--   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 <a>optionContextSetIgnoreUnknownOptions</a>.
OptionErrorUnknownOption :: OptionError

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

-- | A <a>OptionArgFunc</a> callback failed.
OptionErrorFailed :: OptionError

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

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

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

-- | Error codes returned by regular expressions functions.
--   
--   <i>Since: 2.14</i>
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 "(?", "(?&lt;" 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 <a>RegexError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchRegexError :: IO a -> (RegexError -> GErrorMessage -> IO a) -> IO a

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

-- | An enumeration specifying the base position for a
--   <a>iOChannelSeekPosition</a> 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 <a>ShellError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchShellError :: IO a -> (ShellError -> GErrorMessage -> IO a) -> IO a

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

-- | <i>No description available in the introspection data.</i>
data SliceConfig

-- | <i>No description available in the introspection data.</i>
SliceConfigAlwaysMalloc :: SliceConfig

-- | <i>No description available in the introspection data.</i>
SliceConfigBypassMagazines :: SliceConfig

-- | <i>No description available in the introspection data.</i>
SliceConfigWorkingSetMsecs :: SliceConfig

-- | <i>No description available in the introspection data.</i>
SliceConfigColorIncrement :: SliceConfig

-- | <i>No description available in the introspection data.</i>
SliceConfigChunkSizes :: SliceConfig

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

-- | <tt><i>execv()</i></tt> returned <tt>EACCES</tt>
SpawnErrorAcces :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>EPERM</tt>
SpawnErrorPerm :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>E2BIG</tt>
SpawnErrorTooBig :: SpawnError

-- | deprecated alias for <a>SpawnErrorTooBig</a> (deprecated since GLib
--   2.32)
SpawnError2big :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENOEXEC</tt>
SpawnErrorNoexec :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENAMETOOLONG</tt>
SpawnErrorNametoolong :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENOENT</tt>
SpawnErrorNoent :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENOMEM</tt>
SpawnErrorNomem :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENOTDIR</tt>
SpawnErrorNotdir :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ELOOP</tt>
SpawnErrorLoop :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ETXTBUSY</tt>
SpawnErrorTxtbusy :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>EIO</tt>
SpawnErrorIo :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ENFILE</tt>
SpawnErrorNfile :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>EMFILE</tt>
SpawnErrorMfile :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>EINVAL</tt>
SpawnErrorInval :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>EISDIR</tt>
SpawnErrorIsdir :: SpawnError

-- | <tt><i>execv()</i></tt> returned <tt>ELIBBAD</tt>
SpawnErrorLibbad :: SpawnError

-- | Some other fatal failure, <tt>error-&gt;message</tt> should explain.
SpawnErrorFailed :: SpawnError

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

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

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

-- | The type of file to return the filename for, when used with
--   <tt><i>g_test_build_filename()</i></tt>.
--   
--   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 <tt>EXTRA_DIST</tt> or
--   <tt>dist_schema_DATA</tt> sense, in which case they will always be in
--   the srcdir) or built (in the <tt>BUILT_SOURCES</tt> 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.
--   
--   <i>Since: 2.38</i>
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

-- | <i>No description available in the introspection data.</i>
data TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeNone :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeError :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeStartBinary :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeListCase :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeSkipCase :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeStartCase :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeStopCase :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeMinResult :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeMaxResult :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeMessage :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeStartSuite :: TestLogType

-- | <i>No description available in the introspection data.</i>
TestLogTypeStopSuite :: TestLogType

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

-- | <i>No description available in the introspection data.</i>
data TestResult

-- | <i>No description available in the introspection data.</i>
TestResultSuccess :: TestResult

-- | <i>No description available in the introspection data.</i>
TestResultSkipped :: TestResult

-- | <i>No description available in the introspection data.</i>
TestResultFailure :: TestResult

-- | <i>No description available in the introspection data.</i>
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 <a>ThreadError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchThreadError :: IO a -> (ThreadError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>ThreadError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
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
--   <a>scannerGetNextToken</a> 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 <a>treeTraverse</a>,
--   <a>nodeTraverse</a> and <tt><i>g_node_find()</i></tt>. The different
--   orders are illustrated here:
--   
--   <ul>
--   <li>In order: A, B, C, D, E, F, G, H, I</li>
--   <li>Pre order: F, B, A, D, C, E, G, I, H</li>
--   <li>Post order: A, C, E, D, B, H, I, G, F</li>
--   <li>Level order: F, B, G, A, D, I, C, E, H</li>
--   </ul>
data TraverseType

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

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

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

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

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

-- | These are the possible line break classifications.
--   
--   Since new Unicode versions may add new types here, applications should
--   be ready to handle unknown values. They may be regarded as
--   <a>UnicodeBreakTypeUnknown</a>.
--   
--   See <a>Unicode Line Breaking Algorithm</a>.
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
--   <a>UnicodeBreakTypeCloseParenthesis</a> 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 <i><tt>gUNICODEBREAKAKSARAPREBASE</tt></i>
--   (AP). Since: 2.80 <i><tt>gUNICODEBREAKAKSARASTART</tt></i> (AS).
--   Since: 2.80 <i><tt>gUNICODEBREAKVIRAMAFINAL</tt></i> (VF). Since: 2.80
--   <i><tt>gUNICODEBREAKVIRAMA</tt></i> (VI). Since: 2.80
UnicodeBreakTypeAksara :: UnicodeBreakType

-- | <i>No description available in the introspection data.</i>
UnicodeBreakTypeAksaraPreBase :: UnicodeBreakType

-- | <i>No description available in the introspection data.</i>
UnicodeBreakTypeAksaraStart :: UnicodeBreakType

-- | <i>No description available in the introspection data.</i>
UnicodeBreakTypeViramaFinal :: UnicodeBreakType

-- | <i>No description available in the introspection data.</i>
UnicodeBreakTypeVirama :: UnicodeBreakType

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

-- | The <a>UnicodeScript</a> 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 <tt><i>PangoScript</i></tt>.
--   
--   Note that new types may be added in the future. Applications should be
--   ready to handle unknown values. See <a>Unicode Standard Annex #24:
--   Script names</a>.
data UnicodeScript

-- | a value never returned from <a>unicharGetScript</a>
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

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

-- | These are the possible character classifications from the Unicode
--   specification. See <a>Unicode Character Database</a>.
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.
--   
--   <i>Since: 2.80</i>
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 <a>Uri</a> methods.
--   
--   <i>Since: 2.66</i>
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 <a>UriError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchUriError :: IO a -> (UriError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>UriError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
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
--   <a>getUserSpecialDir</a> to retrieve the full path associated to the
--   logical id.
--   
--   The <a>UserDirectory</a> enumeration can be extended at later date.
--   Not every platform has a directory for every logical id in this
--   enumeration.
--   
--   <i>Since: 2.14</i>
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 <a>GVariant</a> instances.
--   
--   <i>Since: 2.24</i>
data VariantClass

-- | The <a>GVariant</a> is a boolean.
VariantClassBoolean :: VariantClass

-- | The <a>GVariant</a> is a byte.
VariantClassByte :: VariantClass

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

-- | The <a>GVariant</a> is an unsigned 16 bit integer.
VariantClassUint16 :: VariantClass

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

-- | The <a>GVariant</a> is an unsigned 32 bit integer.
VariantClassUint32 :: VariantClass

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

-- | The <a>GVariant</a> is an unsigned 64 bit integer.
VariantClassUint64 :: VariantClass

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

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

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

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

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

-- | The <a>GVariant</a> is a variant.
VariantClassVariant :: VariantClass

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

-- | The <a>GVariant</a> is an array.
VariantClassArray :: VariantClass

-- | The <a>GVariant</a> is a tuple.
VariantClassTuple :: VariantClass

-- | The <a>GVariant</a> 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 <a>VariantType</a> was given where a basic type was
--   expected
VariantParseErrorBasicTypeExpected :: VariantParseError

-- | cannot infer the <a>VariantType</a>
VariantParseErrorCannotInferType :: VariantParseError

-- | an indefinite <a>VariantType</a> 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 <a>GVariant</a> format string
VariantParseErrorInvalidFormatString :: VariantParseError

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

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

-- | not a valid <a>GVariant</a> 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; <a>GVariant</a> 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 <a>VariantParseError</a>. This is a
--   specialized version of <a>catchGErrorJustDomain</a>.
catchVariantParseError :: IO a -> (VariantParseError -> GErrorMessage -> IO a) -> IO a

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


module GI.GLib.Flags

-- | <i>No description available in the introspection data.</i>
data AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeAlnum :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeAlpha :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeCntrl :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeDigit :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeGraph :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeLower :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypePrint :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypePunct :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeSpace :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeUpper :: AsciiType

-- | <i>No description available in the introspection data.</i>
AsciiTypeXdigit :: AsciiType

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

-- | Flags to pass to <a>fileSetContentsFull</a> to affect its safety and
--   performance.
--   
--   <i>Since: 2.66</i>
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 <tt>fsync()</tt> on the
--   file and use of an atomic <tt>rename()</tt> 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 <tt>fsync()</tt>
--   on the file (if <a>FileSetContentsFlagsConsistent</a> is unset), or
--   the effects of <a>FileSetContentsFlagsConsistent</a> plus an
--   <tt>fsync()</tt> on the directory containing the file after calling
--   <tt>rename()</tt>.
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 <a>fileTest</a>.
data FileTest

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

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

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

-- | <a>True</a> if the file is executable.
FileTestIsExecutable :: FileTest

-- | <a>True</a> 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
--   <a>formatSizeFull</a>.
data FormatSizeFlags

-- | behave the same as <a>formatSize</a>
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
--   <i><tt>gFORMATSIZELONGFORMAT</tt></i> nor
--   <i><tt>gFORMATSIZEONLYUNIT</tt></i>. Since: 2.74
FormatSizeFlagsOnlyValue :: FormatSizeFlags

-- | return only unit, without value; this should not be used together with
--   <i><tt>gFORMATSIZELONGFORMAT</tt></i> nor
--   <i><tt>gFORMATSIZEONLYVALUE</tt></i>. Since: 2.74
FormatSizeFlagsOnlyUnit :: FormatSizeFlags

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

-- | Flags used internally in the <a>Hook</a> implementation.
data HookFlagMask

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

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

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

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

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

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

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

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

-- | Error condition.
IOConditionErr :: IOCondition

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

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

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

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

-- | no special flags set. Since: 2.74
IOFlagsNone :: IOFlags

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

-- | turns on nonblocking mode, corresponds to
--   <tt><i>O_NONBLOCK</i></tt>/<tt><i>O_NDELAY</i></tt> (see the
--   documentation of the UNIX <tt><i>open()</i></tt> 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 <i><tt>gIOFLAGISWRITABLE</tt></i> 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
--   <a>iOChannelSeekPosition</a> 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 <a>iOChannelGetFlags</a>
IOFlagsGetMask :: IOFlags

-- | the mask of the flags that the user can modify with
--   <a>iOChannelSetFlags</a>
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 <a>logSetHandler</a> and <a>logSetFatalMask</a>.
data LogLevelFlags

-- | internal flag
LogLevelFlagsFlagRecursion :: LogLevelFlags

-- | internal flag
LogLevelFlagsFlagFatal :: LogLevelFlags

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

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

-- | log level for warnings, see <tt><i>GLib.warning</i></tt>
LogLevelFlagsLevelWarning :: LogLevelFlags

-- | log level for messages, see <tt><i>GLib.message</i></tt>
LogLevelFlagsLevelMessage :: LogLevelFlags

-- | log level for informational messages, see <tt><i>GLib.info</i></tt>
LogLevelFlagsLevelInfo :: LogLevelFlags

-- | log level for debug messages, see <tt><i>GLib.debug</i></tt>
LogLevelFlagsLevelDebug :: LogLevelFlags

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

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

-- | Flags to pass to <a>mainContextNewWithFlags</a> which affect the
--   behaviour of a <a>MainContext</a>.
--   
--   <i>Since: 2.72</i>
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
--   <tt>g_main_context_{prepare,query,check,dispatch}</tt> 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 <a>MarkupCollectTypeOptional</a>.
--   
--   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
--   <a>MarkupCollectTypeOptional</a> is specified and the attribute isn't
--   present then the pointer will be set to <a>Nothing</a>
MarkupCollectTypeString :: MarkupCollectType

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

-- | expects a parameter of type (gboolean *) and parses the attribute
--   value as a boolean. Sets <a>False</a> 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 <a>MarkupCollectTypeBoolean</a>, but in the case of a missing
--   attribute a value is set that compares equal to neither <a>False</a>
--   nor <a>True</a> G_MARKUP_COLLECT_OPTIONAL is implied
MarkupCollectTypeTristate :: MarkupCollectType

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

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

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

-- | 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 <i><tt>passthrough</tt></i> function of the parser. Instead,
--   the content of the section (without the <tt>&lt;![CDATA[</tt> and
--   <tt>]]&gt;</tt>) is passed to the <i><tt>text</tt></i> 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 <a>MarkupParser</a> 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 <tt>--help</tt> output.
OptionFlagsHidden :: OptionFlags

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

-- | For options of the <a>OptionArgNone</a> kind, this flag indicates that
--   the sense of the option is reversed. i.e. <a>False</a> will be stored
--   into the argument rather than <a>True</a>.
OptionFlagsReverse :: OptionFlags

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

-- | For options of the <a>OptionArgCallback</a> 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 <a>OptionArgCallback</a> kind, this flag indicates
--   that the argument supply is optional. If no argument is given then
--   data of <tt><i>GOptionParseFunc</i></tt> will be set to NULL. Since
--   2.8
OptionFlagsOptionalArg :: OptionFlags

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

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

-- | Flags specifying compile-time options.
--   
--   <i>Since: 2.14</i>
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
--   <a>RegexCompileFlagsDollarEndonly</a> is set). When
--   <a>RegexCompileFlagsMultiline</a> 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
--   <a>RegexCompileFlagsMultiline</a> 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

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

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

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

-- | Changes behaviour so that it is compatible with JavaScript rather than
--   PCRE. Since GLib 2.74 this is no longer supported, as libpcre2 does
--   not support it. Since: 2.34 Deprecated: 2.74
RegexCompileFlagsJavascriptCompat :: RegexCompileFlags

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

-- | Flags specifying match-time options.
--   
--   <i>Since: 2.14</i>
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 <a>RegexCompileFlagsMultiline</a> (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
--   <a>RegexCompileFlagsMultiline</a> (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 <a>matchInfoIsPartialMatch</a>.
RegexMatchFlagsPartial :: RegexMatchFlags

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

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

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

-- | Overrides the newline definition set when creating a new <a>Regex</a>,
--   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 <a>Regex</a>;
--   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
--   <a>Regex</a>; 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
--   <a>Regex</a>; 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 <a>RegexMatchFlagsPartial</a>. Since: 2.34
RegexMatchFlagsPartialSoft :: RegexMatchFlags

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

-- | Like <a>RegexMatchFlagsNotempty</a>, 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 <a>spawnSync</a>, <a>spawnAsync</a> and
--   <a>spawnAsyncWithPipes</a>.
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 <tt><i>exec()</i></tt> in the child.
SpawnFlagsLeaveDescriptorsOpen :: SpawnFlags

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

-- | <tt>argv[0]</tt> need not be an absolute path, it will be looked for
--   in the user's <tt>PATH</tt>.
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 <tt>/dev/null</tt>).
SpawnFlagsChildInheritsStdin :: SpawnFlags

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

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

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

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

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

-- | The child's standard input is attached to <tt>/dev/null</tt>.
--   
--   <i>Since: 2.74</i>
SpawnFlagsStdinFromDevNull :: SpawnFlags

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

-- | Flags to pass to <a>testTrapSubprocess</a> to control input and
--   output.
--   
--   Note that in contrast with <a>testTrapFork</a>, the default 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
--   <tt>/dev/null</tt>.
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
--   <tt><i>g_test_trap_assert_stdout()</i></tt>.
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
--   <tt><i>g_test_trap_assert_stderr()</i></tt>.
TestSubprocessFlagsInheritStderr :: TestSubprocessFlags

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

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

-- | <i>Deprecated: (Since version 2.38)t<a>TestTrapFlags</a> is used only
--   with <a>testTrapFork</a>,which is deprecated.
--   <a>testTrapSubprocess</a> usest<a>TestSubprocessFlags</a>.</i>
data TestTrapFlags

-- | Default behaviour. Since: 2.74
TestTrapFlagsDefault :: TestTrapFlags

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

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

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

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

-- | Specifies which nodes are visited during several of the tree
--   functions, including <a>nodeTraverse</a> and
--   <tt><i>g_node_find()</i></tt>.
data TraverseFlags

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

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

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

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

-- | identical to <a>TraverseFlagsLeaves</a>.
TraverseFlagsLeafs :: TraverseFlags

-- | identical to <a>TraverseFlagsNonLeaves</a>.
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 <a>uriPeekScheme</a> on the URI string to
--   check the scheme first, and use that to decide what flags to parse it
--   with.
--   
--   <i>Since: 2.66</i>
data UriFlags

-- | No flags set.
UriFlagsNone :: UriFlags

-- | Parse the URI more relaxedly than the <a>RFC 3986</a> grammar
--   specifies, fixing up or ignoring common mistakes in URIs coming from
--   external sources. This is also needed for some obscure URI schemes
--   where <tt>;</tt> 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 <tt>:</tt>.
UriFlagsHasPassword :: UriFlags

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

-- | When parsing a URI, this indicates that <tt>%</tt>-encoded characters
--   in the userinfo, path, query, and fragment fields should not be
--   decoded. (And likewise the host field if <a>UriFlagsNonDns</a> is also
--   set.) When building a URI, it indicates that you have already
--   <tt>%</tt>-encoded the components, and so <a>Uri</a> 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 <tt>smb</tt> URIs with NetBIOS hostnames).
UriFlagsNonDns :: UriFlags

-- | Same as <a>UriFlagsEncoded</a>, for the query field only.
UriFlagsEncodedQuery :: UriFlags

-- | Same as <a>UriFlagsEncoded</a>, for the path only.
UriFlagsEncodedPath :: UriFlags

-- | Same as <a>UriFlagsEncoded</a>, for the fragment only.
UriFlagsEncodedFragment :: UriFlags

-- | A scheme-based normalization will be applied. For example, when
--   parsing an HTTP URI changing omitted path to <tt>/</tt> and omitted
--   port to <tt>80</tt>; and when building a URI, changing empty path to
--   <tt>/</tt> and default port <tt>80</tt>). 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
--   <a>uriToStringPartial</a>. Note that <a>UriHideFlagsPassword</a> and
--   <a>UriHideFlagsAuthParams</a> will only work if the <a>Uri</a> was
--   parsed with the corresponding flags.
--   
--   <i>Since: 2.66</i>
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
--   <a>uriParseParams</a> and <a>UriParamsIter</a>.
--   
--   <i>Since: 2.66</i>
data UriParamsFlags

-- | No flags set.
UriParamsFlagsNone :: UriParamsFlags

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

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

-- | See <a>UriFlagsParseRelaxed</a>.
UriParamsFlagsParseRelaxed :: UriParamsFlags

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


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.Allocator

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

-- | <i>No description available in the introspection data.</i>
allocatorFree :: (HasCallStack, MonadIO m) => Allocator -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Allocator.Allocator
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Allocator.Allocator
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Allocator.Allocator


-- | A simple refcounted data type representing an immutable sequence of
--   zero or more bytes from an unspecified origin.
--   
--   The purpose of a <a>Bytes</a> 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 <a>Bytes</a> without
--   coordinating their activities, resting assured that the byte data will
--   not change or move while they hold a reference.
--   
--   A <a>Bytes</a> can come from many different origins that may have
--   different procedures for freeing the memory region. Examples are
--   memory from <a>malloc</a>, from memory slices, from a
--   <a>MappedFile</a> or memory from other allocators.
--   
--   <a>Bytes</a> work well as keys in <a>HashTable</a>. Use
--   <a>bytesEqual</a> and <a>bytesHash</a> as parameters to
--   <tt><i>g_hash_table_new()</i></tt> or
--   <tt><i>g_hash_table_new_full()</i></tt>. <a>Bytes</a> can also be used
--   as keys in a <a>Tree</a> by passing the <a>bytesCompare</a> function
--   to <tt><i>g_tree_new()</i></tt>.
--   
--   The data pointed to by this bytes must not be modified. For a mutable
--   array of bytes see <a>ByteArray</a>. Use <a>bytesUnrefToArray</a> to
--   create a mutable array for a <a>Bytes</a> sequence. To create an
--   immutable <a>Bytes</a> from a mutable <a>ByteArray</a>, use the
--   <a>byteArrayFreeToBytes</a> function.
--   
--   <i>Since: 2.32</i>
module GI.GLib.Structs.Bytes

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

-- | Compares the two <a>Bytes</a> values.
--   
--   This function can be used to sort GBytes instances in lexicographical
--   order.
--   
--   If <i><tt>bytes1</tt></i> and <i><tt>bytes2</tt></i> 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
--   <i><tt>bytes1</tt></i> has a smaller value at that position it is
--   considered less, otherwise greater than <i><tt>bytes2</tt></i>.
--   
--   <i>Since: 2.32</i>
bytesCompare :: (HasCallStack, MonadIO m) => Bytes -> Bytes -> m Int32

-- | Compares the two <a>Bytes</a> values being pointed to and returns
--   <a>True</a> if they are equal.
--   
--   This function can be passed to <tt><i>g_hash_table_new()</i></tt> as
--   the <i><tt>keyEqualFunc</tt></i> parameter, when using
--   non-<a>Nothing</a> <a>Bytes</a> pointers as keys in a
--   <a>HashTable</a>.
--   
--   <i>Since: 2.32</i>
bytesEqual :: (HasCallStack, MonadIO m) => Bytes -> Bytes -> m Bool

-- | Get the byte data in the <a>Bytes</a>. This data should not be
--   modified.
--   
--   This function will always return the same pointer for a given
--   <a>Bytes</a>.
--   
--   <a>Nothing</a> may be returned if <i><tt>size</tt></i> is 0. This is
--   not guaranteed, as the <a>Bytes</a> may represent an empty string with
--   <i><tt>data</tt></i> non-<a>Nothing</a> and <i><tt>size</tt></i> as 0.
--   <a>Nothing</a> will not be returned if <i><tt>size</tt></i> is
--   non-zero.
--   
--   <i>Since: 2.32</i>
bytesGetData :: (HasCallStack, MonadIO m) => Bytes -> m (Maybe ByteString)

-- | Gets a pointer to a region in <i><tt>bytes</tt></i>.
--   
--   The region starts at <i><tt>offset</tt></i> many bytes from the start
--   of the data and contains <i><tt>nElements</tt></i> many elements of
--   <i><tt>elementSize</tt></i> size.
--   
--   <i><tt>nElements</tt></i> may be zero, but <i><tt>elementSize</tt></i>
--   must always be non-zero. Ideally, <i><tt>elementSize</tt></i> is a
--   static constant (eg: sizeof a struct).
--   
--   This function does careful bounds checking (including checking for
--   arithmetic overflows) and returns a non-<a>Nothing</a> pointer if the
--   specified region lies entirely within the <i><tt>bytes</tt></i>. If
--   the region is in some way out of range, or if an overflow has
--   occurred, then <a>Nothing</a> 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
--   <i><tt>bytes</tt></i>, plus <i><tt>offset</tt></i>. This will be
--   non-<a>Nothing</a> except for the case where <i><tt>bytes</tt></i>
--   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
--   <i><tt>bytes</tt></i>, <a>Nothing</a> effectively always means
--   "error".
--   
--   <i>Since: 2.70</i>
bytesGetRegion :: (HasCallStack, MonadIO m) => Bytes -> CSize -> CSize -> CSize -> m (Ptr ())

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

-- | Creates an integer hash code for the byte data in the <a>Bytes</a>.
--   
--   This function can be passed to <tt><i>g_hash_table_new()</i></tt> as
--   the <i><tt>keyHashFunc</tt></i> parameter, when using
--   non-<a>Nothing</a> <a>Bytes</a> pointers as keys in a
--   <a>HashTable</a>.
--   
--   <i>Since: 2.32</i>
bytesHash :: (HasCallStack, MonadIO m) => Bytes -> m Word32

-- | Creates a new <a>Bytes</a> from <i><tt>data</tt></i>.
--   
--   <i><tt>data</tt></i> is copied. If <i><tt>size</tt></i> is 0,
--   <i><tt>data</tt></i> may be <a>Nothing</a>.
--   
--   <i>Since: 2.32</i>
bytesNew :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Bytes

-- | Creates a <a>Bytes</a> which is a subsection of another <a>Bytes</a>.
--   The <i><tt>offset</tt></i> + <i><tt>length</tt></i> may not be longer
--   than the size of <i><tt>bytes</tt></i>.
--   
--   A reference to <i><tt>bytes</tt></i> will be held by the newly created
--   <a>Bytes</a> until the byte data is no longer needed.
--   
--   Since 2.56, if <i><tt>offset</tt></i> is 0 and <i><tt>length</tt></i>
--   matches the size of <i><tt>bytes</tt></i>, then <i><tt>bytes</tt></i>
--   will be returned with the reference count incremented by 1. If
--   <i><tt>bytes</tt></i> is a slice of another <a>Bytes</a>, then the
--   resulting <a>Bytes</a> will reference the same <a>Bytes</a> instead of
--   <i><tt>bytes</tt></i>. This allows consumers to simplify the usage of
--   <a>Bytes</a> when asynchronously writing to streams.
--   
--   <i>Since: 2.32</i>
bytesNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> CSize -> CSize -> m Bytes

-- | Creates a new <a>Bytes</a> from <i><tt>data</tt></i>.
--   
--   After this call, <i><tt>data</tt></i> belongs to the <a>Bytes</a> and
--   may no longer be modified by the caller. The memory of
--   <i><tt>data</tt></i> has to be dynamically allocated and will
--   eventually be freed with <a>free</a>.
--   
--   For creating <a>Bytes</a> with memory from other allocators, see
--   <tt><i>g_bytes_new_with_free_func()</i></tt>.
--   
--   <i><tt>data</tt></i> may be <a>Nothing</a> if <i><tt>size</tt></i> is
--   0.
--   
--   <i>Since: 2.32</i>
bytesNewTake :: (HasCallStack, MonadIO m) => Maybe ByteString -> m Bytes

-- | Increase the reference count on <i><tt>bytes</tt></i>.
--   
--   <i>Since: 2.32</i>
bytesRef :: (HasCallStack, MonadIO m) => Bytes -> m Bytes

-- | Releases a reference on <i><tt>bytes</tt></i>. This may result in the
--   bytes being freed. If <i><tt>bytes</tt></i> is <a>Nothing</a>, it will
--   return immediately.
--   
--   <i>Since: 2.32</i>
bytesUnref :: (HasCallStack, MonadIO m) => Maybe Bytes -> m ()

-- | Unreferences the bytes, and returns a new mutable <a>ByteArray</a>
--   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 <a>bytesNew</a>, <a>bytesNewTake</a> or
--   <a>byteArrayFreeToBytes</a>. In all other cases the data is copied.
--   
--   Do not use it if <i><tt>bytes</tt></i> contains more than
--   <tt><i>G_MAXUINT</i></tt> bytes. <a>ByteArray</a> stores the length of
--   its data in <tt><i>guint</i></tt>, which may be shorter than
--   <tt><i>gsize</i></tt>, that <i><tt>bytes</tt></i> is using.
--   
--   <i>Since: 2.32</i>
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
--   <a>bytesNew</a>, <a>bytesNewTake</a> or <a>byteArrayFreeToBytes</a>.
--   In all other cases the data is copied.
--   
--   <i>Since: 2.32</i>
bytesUnrefToData :: (HasCallStack, MonadIO m) => Bytes -> m ByteString
instance GHC.Classes.Eq GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Bytes.Bytes
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe 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 <tt>GChecksum</tt>, use <a>checksumNew</a>. To free a
--   <tt>GChecksum</tt>, use <a>checksumFree</a>.
--   
--   GLib supports incremental checksums using the <tt>GChecksum</tt> data
--   structure, by calling <a>checksumUpdate</a> as long as there’s data
--   available and then using <a>checksumGetString</a> or
--   <a>Checksum</a>.<tt><i>get_digest</i></tt>() 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
--   <a>computeChecksumForData</a> and <a>computeChecksumForString</a>,
--   respectively.
--   
--   <i>Since: 2.16</i>
module GI.GLib.Structs.Checksum

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

-- | Copies a <a>Checksum</a>. If <i><tt>checksum</tt></i> has been closed,
--   by calling <a>checksumGetString</a> or
--   <tt><i>g_checksum_get_digest()</i></tt>, the copied checksum will be
--   closed as well.
--   
--   <i>Since: 2.16</i>
checksumCopy :: (HasCallStack, MonadIO m) => Checksum -> m Checksum

-- | Frees the memory allocated for <i><tt>checksum</tt></i>.
--   
--   <i>Since: 2.16</i>
checksumFree :: (HasCallStack, MonadIO m) => Checksum -> m ()

-- | Gets the digest as a hexadecimal string.
--   
--   Once this function has been called the <a>Checksum</a> can no longer
--   be updated with <a>checksumUpdate</a>.
--   
--   The hexadecimal characters will be lower case.
--   
--   <i>Since: 2.16</i>
checksumGetString :: (HasCallStack, MonadIO m) => Checksum -> m Text

-- | Creates a new <a>Checksum</a>, using the checksum algorithm
--   <i><tt>checksumType</tt></i>. If the <i><tt>checksumType</tt></i> is
--   not known, <a>Nothing</a> is returned. A <a>Checksum</a> can be used
--   to compute the checksum, or digest, of an arbitrary binary blob, using
--   different hashing algorithms.
--   
--   A <a>Checksum</a> works by feeding a binary blob through
--   <a>checksumUpdate</a> until there is data to be checked; the digest
--   can then be extracted using <a>checksumGetString</a>, which will
--   return the checksum as a hexadecimal string; or
--   <tt><i>g_checksum_get_digest()</i></tt>, which will return a vector of
--   raw bytes. Once either <a>checksumGetString</a> or
--   <tt><i>g_checksum_get_digest()</i></tt> have been called on a
--   <a>Checksum</a>, the checksum will be closed and it won't be possible
--   to call <a>checksumUpdate</a> on it anymore.
--   
--   <i>Since: 2.16</i>
checksumNew :: (HasCallStack, MonadIO m) => ChecksumType -> m (Maybe Checksum)

-- | Resets the state of the <i><tt>checksum</tt></i> back to its initial
--   state.
--   
--   <i>Since: 2.18</i>
checksumReset :: (HasCallStack, MonadIO m) => Checksum -> m ()

-- | Gets the length in bytes of digests of type
--   <i><tt>checksumType</tt></i>
--   
--   <i>Since: 2.16</i>
checksumTypeGetLength :: (HasCallStack, MonadIO m) => ChecksumType -> m Int64

-- | Feeds <i><tt>data</tt></i> into an existing <a>Checksum</a>. The
--   checksum must still be open, that is <a>checksumGetString</a> or
--   <tt><i>g_checksum_get_digest()</i></tt> must not have been called on
--   <i><tt>checksum</tt></i>.
--   
--   <i>Since: 2.16</i>
checksumUpdate :: (HasCallStack, MonadIO m) => Checksum -> ByteString -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Checksum.Checksum
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Checksum.Checksum)


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

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


-- | Associates a string with a bit flag. Used in <a>parseDebugString</a>.
module GI.GLib.Structs.DebugKey

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

-- | Construct a <a>DebugKey</a> struct initialized to zero.
newZeroDebugKey :: MonadIO m => m DebugKey

-- | Set the value of the “<tt>key</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #key
--   </pre>
clearDebugKeyKey :: MonadIO m => DebugKey -> m ()

-- | Get the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> debugKey #key
--   </pre>
getDebugKeyKey :: MonadIO m => DebugKey -> m (Maybe Text)

-- | Set the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> debugKey [ #key <a>:=</a> value ]
--   </pre>
setDebugKeyKey :: MonadIO m => DebugKey -> CString -> m ()

-- | Get the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> debugKey #value
--   </pre>
getDebugKeyValue :: MonadIO m => DebugKey -> m Word32

-- | Set the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> debugKey [ #value <a>:=</a> value ]
--   </pre>
setDebugKeyValue :: MonadIO m => DebugKey -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.DebugKey.DebugKey
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.DebugKey.DebugKey
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


-- | 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 <tt>GDir</tt> structure
--   itself will be freed. Prior to GLib 2.80, <tt>GDir</tt> was not
--   reference counted.
--   
--   It is an error to call any of the <tt>GDir</tt> methods other than
--   <a>dirRef</a> and <a>dirUnref</a> on a <tt>GDir</tt> after calling
--   <a>dirClose</a> on it.
dirClose :: (HasCallStack, MonadIO m) => Dir -> m ()

-- | Creates a subdirectory in the preferred directory for temporary files
--   (as returned by <a>getTmpDir</a>).
--   
--   <i><tt>tmpl</tt></i> should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, as the parameter to
--   <tt><i>g_mkstemp()</i></tt>. However, unlike these functions, the
--   template should only be a basename, no directory components are
--   allowed. If template is <a>Nothing</a>, a default template is used.
--   
--   Note that in contrast to <tt><i>g_mkdtemp()</i></tt> (and
--   <tt><i>mkdtemp()</i></tt>) <i><tt>tmpl</tt></i> is not modified, and
--   might thus be a read-only literal string.
--   
--   <i>Since: 2.30</i>
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 <a>dirReadName</a>. 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
--   <a>Nothing</a>. The order of entries returned from this function is
--   not defined, and may vary by file system or other operating-system
--   dependent factors.
--   
--   <a>Nothing</a> may also be returned in case of errors. On Unix, you
--   can check <tt>errno</tt> to find out if <a>Nothing</a> 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 <tt>dir</tt>.
--   
--   <i>Since: 2.80</i>
dirRef :: (HasCallStack, MonadIO m) => Dir -> m Dir

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

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


-- | A GHashTableIter structure represents an iterator that can be used to
--   iterate over the elements of a <a>HashTable</a>. GHashTableIter
--   structures are typically allocated on the stack and then initialized
--   with <a>hashTableIterInit</a>.
--   
--   The iteration order of a <a>HashTableIter</a> 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 <a>HashTableIter</a> struct initialized to zero.
newZeroHashTableIter :: MonadIO m => m HashTableIter

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

-- | Initializes a key/value pair iterator and associates it with
--   <i><tt>hashTable</tt></i>. Modifying the hash table after calling this
--   function invalidates the returned iterator.
--   
--   The iteration order of a <a>HashTableIter</a> over the keys/values in
--   a hash table is not defined.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GHashTableIter iter;
--   gpointer key, value;
--   
--   g_hash_table_iter_init (&amp;iter, hash_table);
--   while (g_hash_table_iter_next (&amp;iter, &amp;key, &amp;value))
--     {
--       // do something with key and value
--     }
--   </pre>
--   
--   <i>Since: 2.16</i>
hashTableIterInit :: (HasCallStack, MonadIO m) => HashTableIter -> Map (Ptr ()) (Ptr ()) -> m ()

-- | Advances <i><tt>iter</tt></i> and retrieves the key and/or value that
--   are now pointed to as a result of this advancement. If <a>False</a> is
--   returned, <i><tt>key</tt></i> and <i><tt>value</tt></i> are not set,
--   and the iterator becomes invalid.
--   
--   <i>Since: 2.16</i>
hashTableIterNext :: (HasCallStack, MonadIO m) => HashTableIter -> m (Bool, Ptr (), Ptr ())

-- | Removes the key/value pair currently pointed to by the iterator from
--   its associated <a>HashTable</a>. Can only be called after
--   <a>hashTableIterNext</a> returned <a>True</a>, and cannot be called
--   more than once for the same key/value pair.
--   
--   If the <a>HashTable</a> was created using
--   <tt><i>g_hash_table_new_full()</i></tt>, 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 <a>HashTable</a> afterward:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   while (g_hash_table_iter_next (&amp;iter, &amp;key, &amp;value))
--     {
--       if (condition)
--         g_hash_table_iter_remove (&amp;iter);
--     }
--   </pre>
--   
--   <i>Since: 2.16</i>
hashTableIterRemove :: (HasCallStack, MonadIO m) => HashTableIter -> m ()

-- | Replaces the value currently pointed to by the iterator from its
--   associated <a>HashTable</a>. Can only be called after
--   <a>hashTableIterNext</a> returned <a>True</a>.
--   
--   If you supplied a <i><tt>valueDestroyFunc</tt></i> when creating the
--   <a>HashTable</a>, the old value is freed using that function.
--   
--   <i>Since: 2.30</i>
hashTableIterReplace :: (HasCallStack, MonadIO m) => HashTableIter -> Ptr () -> m ()

-- | Removes the key/value pair currently pointed to by the iterator from
--   its associated <a>HashTable</a>, without calling the key and value
--   destroy functions. Can only be called after <a>hashTableIterNext</a>
--   returned <a>True</a>, and cannot be called more than once for the same
--   key/value pair.
--   
--   <i>Since: 2.16</i>
hashTableIterSteal :: (HasCallStack, MonadIO m) => HashTableIter -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.HashTableIter.HashTableIter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.HashTableIter.HashTableIter
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


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.Hmac

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

-- | <i>No description available in the introspection data.</i>
hmacCopy :: (HasCallStack, MonadIO m) => Hmac -> m Hmac

-- | <i>No description available in the introspection data.</i>
hmacGetDigest :: (HasCallStack, MonadIO m) => Hmac -> Word8 -> CSize -> m ()

-- | <i>No description available in the introspection data.</i>
hmacGetString :: (HasCallStack, MonadIO m) => Hmac -> m Text

-- | <i>No description available in the introspection data.</i>
hmacNew :: (HasCallStack, MonadIO m) => ChecksumType -> Word8 -> CSize -> m Hmac

-- | <i>No description available in the introspection data.</i>
hmacRef :: (HasCallStack, MonadIO m) => Hmac -> m Hmac

-- | <i>No description available in the introspection data.</i>
hmacUnref :: (HasCallStack, MonadIO m) => Hmac -> m ()

-- | <i>No description available in the introspection data.</i>
hmacUpdate :: (HasCallStack, MonadIO m) => Hmac -> Word8 -> Int64 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Hmac.Hmac
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Hmac.Hmac)


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

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

-- | Construct a <a>IOChannel</a> 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 <a>iOChannelUnref</a>.

-- | <i>Deprecated: (Since version 2.2)Use <a>iOChannelShutdown</a>
--   instead.</i>
iOChannelClose :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Converts an <tt>errno</tt> error number to a <a>IOChannelError</a>.
iOChannelErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m IOChannelError

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

-- | Flushes the write buffer for the GIOChannel.
iOChannelFlush :: (HasCallStack, MonadIO m) => IOChannel -> m IOStatus

-- | This function returns a <a>IOCondition</a> depending on whether there
--   is data to be read/space to write data in the internal buffers in the
--   <a>IOChannel</a>. Only the flags <a>IOConditionIn</a> and
--   <a>IOConditionOut</a> may be set.
iOChannelGetBufferCondition :: (HasCallStack, MonadIO m) => IOChannel -> m [IOCondition]

-- | Gets the buffer size.
iOChannelGetBufferSize :: (HasCallStack, MonadIO m) => IOChannel -> m CSize

-- | Returns whether <i><tt>channel</tt></i> is buffered.
iOChannelGetBuffered :: (HasCallStack, MonadIO m) => IOChannel -> m Bool

-- | Returns whether the file/socket/whatever associated with
--   <i><tt>channel</tt></i> will be closed when <i><tt>channel</tt></i>
--   receives its final unref and is destroyed. The default value of this
--   is <a>True</a> for channels created by g_io_channel_new_file (), and
--   <a>False</a> 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 <a>Nothing</a> makes the
--   channel safe for binary data.
iOChannelGetEncoding :: (HasCallStack, MonadIO m) => IOChannel -> m Text

-- | Gets the current flags for a <a>IOChannel</a>, including read-only
--   flags such as <a>IOFlagsIsReadable</a>.
--   
--   The values of the flags <a>IOFlagsIsReadable</a> and
--   <a>IOFlagsIsWritable</a> 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 <tt><i>shutdown()</i></tt>
--   function), the user should immediately call <a>iOChannelGetFlags</a>
--   to update the internal values of these flags.
iOChannelGetFlags :: (HasCallStack, MonadIO m) => IOChannel -> m [IOFlags]

-- | This returns the string that <a>IOChannel</a> uses to determine where
--   in the file a line break occurs. A value of <a>Nothing</a> indicates
--   autodetection.
iOChannelGetLineTerm :: (HasCallStack, MonadIO m) => IOChannel -> m (Text, Int32)

-- | Initializes a <a>IOChannel</a> struct.
--   
--   This is called by each of the above functions when creating a
--   <a>IOChannel</a>, and so is not often needed by the application
--   programmer (unless you are creating a new type of <a>IOChannel</a>).
iOChannelInit :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Open a file <i><tt>filename</tt></i> as a <a>IOChannel</a> using mode
--   <i><tt>mode</tt></i>. This channel will be closed when the last
--   reference to it is dropped, so there is no need to call
--   <a>iOChannelClose</a> (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 <a>IOChannel</a>.

-- | <i>Deprecated: (Since version 2.2)Use <a>iOChannelReadChars</a>
--   instead.</i>
iOChannelRead :: (HasCallStack, MonadIO m) => IOChannel -> Text -> CSize -> CSize -> m IOError

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

-- | Reads a line, including the terminating character(s), from a
--   <a>IOChannel</a> into a newly-allocated string.
--   <i><tt>strReturn</tt></i> will contain allocated memory if the return
--   is <a>IOStatusNormal</a>.
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 <i><tt>channel</tt></i>. This function
--   cannot be called on a channel with <a>Nothing</a> encoding.
iOChannelReadUnichar :: (HasCallStack, MonadIO m) => IOChannel -> m (IOStatus, Char)

-- | Increments the reference count of a <a>IOChannel</a>.
iOChannelRef :: (HasCallStack, MonadIO m) => IOChannel -> m IOChannel

-- | Sets the current position in the <a>IOChannel</a>, similar to the
--   standard library function <tt><i>fseek()</i></tt>.

-- | <i>Deprecated: (Since version 2.2)Use <a>iOChannelSeekPosition</a>
--   instead.</i>
iOChannelSeek :: (HasCallStack, MonadIO m) => IOChannel -> Int64 -> SeekType -> m IOError

-- | Replacement for <a>iOChannelSeek</a> 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
--   <a>Nothing</a>. 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 <a>IOStatusEof</a> 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 <a>SeekTypeCur</a> 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
--   <a>IOChannel</a> data structure. The default value of this is
--   <a>True</a> for channels created by g_io_channel_new_file (), and
--   <a>False</a> for all other channels.
--   
--   Setting this flag to <a>True</a> for a channel you have already closed
--   can cause problems when the final reference to the <a>IOChannel</a> 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 <a>Nothing</a> is safe to use with binary data.
--   
--   The encoding can only be set if one of the following conditions is
--   true:
--   
--   <ul>
--   <li>The channel was just created, and has not been written to or read
--   from yet.</li>
--   <li>The channel is write-only.</li>
--   <li>The channel is a file, and the file pointer was just repositioned
--   by a call to <a>iOChannelSeekPosition</a>. (This flushes all the
--   internal buffers.)</li>
--   <li>The current encoding is <a>Nothing</a> or UTF-8.</li>
--   <li>One of the (new API) read functions has just returned
--   <a>IOStatusEof</a> (or, in the case of <a>iOChannelReadToEnd</a>,
--   <a>IOStatusNormal</a>).</li>
--   <li>One of the functions <a>iOChannelReadChars</a> or
--   <a>iOChannelReadUnichar</a> has returned <a>IOStatusAgain</a> or
--   <a>IOStatusError</a>. This may be useful in the case of
--   <a>ConvertErrorIllegalSequence</a>. Returning one of these statuses
--   from <a>iOChannelReadLine</a>,
--   <tt><i>g_io_channel_read_line_string()</i></tt>, or
--   <a>iOChannelReadToEnd</a> does not guarantee that the encoding can be
--   changed.</li>
--   </ul>
--   
--   Channels which do not meet one of the above conditions cannot call
--   <a>iOChannelSeekPosition</a> with an offset of <a>SeekTypeCur</a>,
--   and, if they are "seekable", cannot call <a>iOChannelWriteChars</a>
--   after calling one of the API "read" functions.
iOChannelSetEncoding :: (HasCallStack, MonadIO m) => IOChannel -> Maybe Text -> m IOStatus

-- | Sets the (writeable) flags in <i><tt>channel</tt></i> to
--   (<i><tt>flags</tt></i> &amp; <a>IOFlagsSetMask</a>).
iOChannelSetFlags :: (HasCallStack, MonadIO m) => IOChannel -> [IOFlags] -> m IOStatus

-- | This sets the string that <a>IOChannel</a> 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
--   <i><tt>flush</tt></i> is <a>True</a>. The channel will not be freed
--   until the last reference is dropped using <a>iOChannelUnref</a>.
iOChannelShutdown :: (HasCallStack, MonadIO m) => IOChannel -> Bool -> m IOStatus

-- | Returns the file descriptor of the <a>IOChannel</a>.
--   
--   On Windows this function returns the file descriptor or socket of the
--   <a>IOChannel</a>.
iOChannelUnixGetFd :: (HasCallStack, MonadIO m) => IOChannel -> m Int32

-- | Creates a new <a>IOChannel</a> given a file descriptor. On UNIX
--   systems this works for plain files, pipes, and sockets.
--   
--   The returned <a>IOChannel</a> has a reference count of 1.
--   
--   The default encoding for <a>IOChannel</a> 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
--   <a>getCharset</a>) with the <a>iOChannelSetEncoding</a> function. By
--   default, the fd passed will not be closed when the final reference to
--   the <a>IOChannel</a> data structure is dropped.
--   
--   If you want to read raw binary data without interpretation, then call
--   the <a>iOChannelSetEncoding</a> function with <a>Nothing</a> 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 <a>IOChannel</a>.
iOChannelUnref :: (HasCallStack, MonadIO m) => IOChannel -> m ()

-- | Writes data to a <a>IOChannel</a>.

-- | <i>Deprecated: (Since version 2.2)Use <a>iOChannelWriteChars</a>
--   instead.</i>
iOChannelWrite :: (HasCallStack, MonadIO m) => IOChannel -> Text -> CSize -> CSize -> m IOError

-- | Replacement for <a>iOChannelWrite</a> with the new API.
--   
--   On seekable channels with encodings other than <a>Nothing</a> 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 <i><tt>channel</tt></i>. This function
--   cannot be called on a channel with <a>Nothing</a> encoding.
iOChannelWriteUnichar :: (HasCallStack, MonadIO m) => IOChannel -> Char -> m IOStatus
instance GHC.Classes.Eq GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.IOChannel.IOChannel
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.IOChannel.IOChannel)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.IOChannel.IOChannel tag


-- | <tt>GKeyFile</tt> parses .ini-like config files.
--   
--   <tt>GKeyFile</tt> 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 now,
--   e.g the <a>Desktop Entry Specification</a> and the <a>Icon Theme
--   Specification</a>.
--   
--   The syntax of key files is described in detail in the <a>Desktop Entry
--   Specification</a>, here is a quick summary: Key files consists of
--   groups of key-value pairs, interspersed with comments.
--   
--   <h3><i>txt code</i></h3>
--   
--   <pre>
--   # 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
--   </pre>
--   
--   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 <tt>key=value</tt>, with the
--   exception of localized strings, which have the form
--   <tt>key[locale]=value</tt>, with a locale identifier of the form
--   <tt>lang_COUNTRY@MODIFIER</tt> where <tt>COUNTRY</tt> and
--   <tt>MODIFIER</tt> are optional. Space before and after the '='
--   character are ignored. Newline, tab, carriage return and backslash
--   characters in value are escaped as <tt>\n</tt>, <tt>\t</tt>,
--   <tt>\r</tt>, and <tt>\\\\</tt>, respectively. To preserve leading
--   spaces in values, these can also be escaped as <tt>\s</tt>.
--   
--   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:
--   
--   <ul>
--   <li>.ini files use the ';' character to begin comments, key files use
--   the '#' character.</li>
--   <li>Key files do not allow for ungrouped keys meaning only comments
--   can precede the first group.</li>
--   <li>Key files are always encoded in UTF-8.</li>
--   <li>Key and Group names are case-sensitive. For example, a group
--   called [GROUP] is a different from [group].</li>
--   <li>.ini files don't have a strongly typed boolean entry type, they
--   only have <tt><i>GetProfileInt()</i></tt>. In key files, only true and
--   false (in lower case) are allowed.</li>
--   </ul>
--   
--   Note that in contrast to the <a>Desktop Entry Specification</a>,
--   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:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   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, &amp;error))
--     {
--       if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
--         g_warning ("Error loading key file: %s", error-&gt;message);
--       return;
--     }
--   
--   g_autofree gchar *val = g_key_file_get_string (key_file, "Group Name", "SomeKey", &amp;error);
--   if (val == NULL &amp;&amp;
--       !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-&gt;message);
--       return;
--     }
--   else if (val == NULL)
--     {
--       // Fall back to a default value.
--       val = g_strdup ("default-value");
--     }
--   </pre>
--   
--   Here is an example of creating and saving a key file:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   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", &amp;error))
--     {
--       g_warning ("Error saving key file: %s", error-&gt;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, &amp;data_len, &amp;error);
--   if (data == NULL)
--     {
--       g_warning ("Error saving key file: %s", error-&gt;message);
--       return;
--     }
--   g_autoptr(GBytes) bytes = g_bytes_new_take (g_steal_pointer (&amp;data), data_len);
--   </pre>
module GI.GLib.Structs.KeyFile

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

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

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as a boolean.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>False</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the value associated with <i><tt>key</tt></i> cannot be
--   interpreted as a boolean then <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetBoolean :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ()

-- | Returns the values associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as booleans.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>Nothing</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the values associated with <i><tt>key</tt></i> cannot be
--   interpreted as booleans then <a>Nothing</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Bool]

-- | Retrieves a comment above <i><tt>key</tt></i> from
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> is <a>Nothing</a>
--   then <i><tt>comment</tt></i> will be read from above
--   <i><tt>groupName</tt></i>. If both <i><tt>key</tt></i> and
--   <i><tt>groupName</tt></i> are <a>Nothing</a>, then
--   <i><tt>comment</tt></i> 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.
--   
--   <i>Since: 2.6</i>
keyFileGetComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Maybe Text -> m Text

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as a double. If <i><tt>groupName</tt></i> is
--   <a>Nothing</a>, the start_group is used.
--   
--   If <i><tt>key</tt></i> cannot be found then 0.0 is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the value associated with <i><tt>key</tt></i> cannot be
--   interpreted as a double then 0.0 is returned and <i><tt>error</tt></i>
--   is set to <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.12</i>
keyFileGetDouble :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Double

-- | Returns the values associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as doubles.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>Nothing</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the values associated with <i><tt>key</tt></i> cannot be
--   interpreted as doubles then <a>Nothing</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.12</i>
keyFileGetDoubleList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Double]

-- | Returns all groups in the key file loaded with
--   <i><tt>keyFile</tt></i>. The array of returned groups will be
--   <a>Nothing</a>-terminated, so <i><tt>length</tt></i> may optionally be
--   <a>Nothing</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetGroups :: (HasCallStack, MonadIO m) => KeyFile -> m ([Text], CSize)

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as a signed 64-bit integer. This is similar
--   to <a>keyFileGetInteger</a> but can return 64-bit results without
--   truncation.
--   
--   <i>Since: 2.26</i>
keyFileGetInt64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Int64

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as an integer.
--   
--   If <i><tt>key</tt></i> cannot be found then 0 is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the value associated with <i><tt>key</tt></i> cannot be
--   interpreted as an integer, or is out of range for a
--   <tt><i>gint</i></tt>, then 0 is returned and <i><tt>error</tt></i> is
--   set to <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetInteger :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Int32

-- | Returns the values associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as integers.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>Nothing</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>.
--   Likewise, if the values associated with <i><tt>key</tt></i> cannot be
--   interpreted as integers, or are out of range for <tt><i>gint</i></tt>,
--   then <a>Nothing</a> is returned and <i><tt>error</tt></i> is set to
--   <a>KeyFileErrorInvalidValue</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetIntegerList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m [Int32]

-- | Returns all keys for the group name <i><tt>groupName</tt></i>. The
--   array of returned keys will be <a>Nothing</a>-terminated, so
--   <i><tt>length</tt></i> may optionally be <a>Nothing</a>. In the event
--   that the <i><tt>groupName</tt></i> cannot be found, <a>Nothing</a> is
--   returned and <i><tt>error</tt></i> is set to
--   <a>KeyFileErrorGroupNotFound</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetKeys :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ([Text], CSize)

-- | Returns the actual locale which the result of
--   <a>keyFileGetLocaleString</a> or <a>keyFileGetLocaleStringList</a>
--   came from.
--   
--   If calling <a>keyFileGetLocaleString</a> or
--   <a>keyFileGetLocaleStringList</a> with exactly the same
--   <i><tt>keyFile</tt></i>, <i><tt>groupName</tt></i>,
--   <i><tt>key</tt></i> and <i><tt>locale</tt></i>, the result of those
--   functions will have originally been tagged with the locale that is the
--   result of this function.
--   
--   <i>Since: 2.56</i>
keyFileGetLocaleForKey :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m (Maybe Text)

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> translated in the given
--   <i><tt>locale</tt></i> if available. If <i><tt>locale</tt></i> is
--   <a>Nothing</a> then the current locale is assumed.
--   
--   If <i><tt>locale</tt></i> is to be non-<a>Nothing</a>, or if the
--   current locale will change over the lifetime of the <a>KeyFile</a>, it
--   must be loaded with <a>KeyFileFlagsKeepTranslations</a> in order to
--   load strings for all locales.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>Nothing</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>. If
--   the value associated with <i><tt>key</tt></i> cannot be interpreted or
--   no suitable translation can be found then the untranslated value is
--   returned.
--   
--   <i>Since: 2.6</i>
keyFileGetLocaleString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m Text

-- | Returns the values associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> translated in the given
--   <i><tt>locale</tt></i> if available. If <i><tt>locale</tt></i> is
--   <a>Nothing</a> then the current locale is assumed.
--   
--   If <i><tt>locale</tt></i> is to be non-<a>Nothing</a>, or if the
--   current locale will change over the lifetime of the <a>KeyFile</a>, it
--   must be loaded with <a>KeyFileFlagsKeepTranslations</a> in order to
--   load strings for all locales.
--   
--   If <i><tt>key</tt></i> cannot be found then <a>Nothing</a> is returned
--   and <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>. If
--   the values associated with <i><tt>key</tt></i> cannot be interpreted
--   or no suitable translations can be found then the untranslated values
--   are returned. The returned array is <a>Nothing</a>-terminated, so
--   <i><tt>length</tt></i> may optionally be <a>Nothing</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Maybe Text -> m ([Text], CSize)

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

-- | Returns the string value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. Unlike <a>keyFileGetValue</a>, this
--   function handles escape sequences like \s.
--   
--   In the event the key cannot be found, <a>Nothing</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>. In the
--   event that the <i><tt>groupName</tt></i> cannot be found,
--   <a>Nothing</a> is returned and <i><tt>error</tt></i> is set to
--   <a>KeyFileErrorGroupNotFound</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Text

-- | Returns the values associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>.
--   
--   In the event the key cannot be found, <a>Nothing</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>. In the
--   event that the <i><tt>groupName</tt></i> cannot be found,
--   <a>Nothing</a> is returned and <i><tt>error</tt></i> is set to
--   <a>KeyFileErrorGroupNotFound</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ([Text], CSize)

-- | Returns the value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i> as an unsigned 64-bit integer. This is
--   similar to <a>keyFileGetInteger</a> but can return large positive
--   results without truncation.
--   
--   <i>Since: 2.26</i>
keyFileGetUint64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Word64

-- | Returns the raw value associated with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. Use <a>keyFileGetString</a> to retrieve an
--   unescaped UTF-8 string.
--   
--   In the event the key cannot be found, <a>Nothing</a> is returned and
--   <i><tt>error</tt></i> is set to <a>KeyFileErrorKeyNotFound</a>. In the
--   event that the <i><tt>groupName</tt></i> cannot be found,
--   <a>Nothing</a> is returned and <i><tt>error</tt></i> is set to
--   <a>KeyFileErrorGroupNotFound</a>.
--   
--   <i>Since: 2.6</i>
keyFileGetValue :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m Text

-- | Looks whether the key file has the group <i><tt>groupName</tt></i>.
--   
--   <i>Since: 2.6</i>
keyFileHasGroup :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m Bool

-- | Loads a key file from the data in <i><tt>bytes</tt></i> into an empty
--   <a>KeyFile</a> structure. If the object cannot be created then
--   <tt><i>error</i></tt> is set to a <a>KeyFileError</a>.
--   
--   <i>Since: 2.50</i>
keyFileLoadFromBytes :: (HasCallStack, MonadIO m) => KeyFile -> Bytes -> [KeyFileFlags] -> m ()

-- | Loads a key file from memory into an empty <a>KeyFile</a> structure.
--   If the object cannot be created then <tt><i>error</i></tt> is set to a
--   <a>KeyFileError</a>.
--   
--   <i>Since: 2.6</i>
keyFileLoadFromData :: (HasCallStack, MonadIO m) => KeyFile -> Text -> CSize -> [KeyFileFlags] -> m ()

-- | This function looks for a key file named <i><tt>file</tt></i> in the
--   paths returned from <a>getUserDataDir</a> and
--   <a>getSystemDataDirs</a>, loads the file into <i><tt>keyFile</tt></i>
--   and returns the file's full path in <i><tt>fullPath</tt></i>. If the
--   file could not be loaded then an <tt><i>error</i></tt> is set to
--   either a <a>FileError</a> or <a>KeyFileError</a>.
--   
--   <i>Since: 2.6</i>
keyFileLoadFromDataDirs :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [KeyFileFlags] -> m [Char]

-- | This function looks for a key file named <i><tt>file</tt></i> in the
--   paths specified in <i><tt>searchDirs</tt></i>, loads the file into
--   <i><tt>keyFile</tt></i> and returns the file's full path in
--   <i><tt>fullPath</tt></i>.
--   
--   If the file could not be found in any of the
--   <i><tt>searchDirs</tt></i>, <a>KeyFileErrorNotFound</a> is returned.
--   If the file is found but the OS returns an error when opening or
--   reading the file, a <tt><i>G_FILE_ERROR</i></tt> is returned. If there
--   is a problem parsing the file, a <tt><i>G_KEY_FILE_ERROR</i></tt> is
--   returned.
--   
--   <i>Since: 2.14</i>
keyFileLoadFromDirs :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [[Char]] -> [KeyFileFlags] -> m [Char]

-- | Loads a key file into an empty <a>KeyFile</a> structure.
--   
--   If the OS returns an error when opening or reading the file, a
--   <tt><i>G_FILE_ERROR</i></tt> is returned. If there is a problem
--   parsing the file, a <tt><i>G_KEY_FILE_ERROR</i></tt> is returned.
--   
--   This function will never return a <a>KeyFileErrorNotFound</a> error.
--   If the <i><tt>file</tt></i> is not found, <a>FileErrorNoent</a> is
--   returned.
--   
--   <i>Since: 2.6</i>
keyFileLoadFromFile :: (HasCallStack, MonadIO m) => KeyFile -> [Char] -> [KeyFileFlags] -> m ()

-- | Creates a new empty <a>KeyFile</a> object. Use
--   <a>keyFileLoadFromFile</a>, <a>keyFileLoadFromData</a>,
--   <a>keyFileLoadFromDirs</a> or <a>keyFileLoadFromDataDirs</a> to read
--   an existing key file.
--   
--   <i>Since: 2.6</i>
keyFileNew :: (HasCallStack, MonadIO m) => m KeyFile

-- | Removes a comment above <i><tt>key</tt></i> from
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> is <a>Nothing</a>
--   then <i><tt>comment</tt></i> will be removed above
--   <i><tt>groupName</tt></i>. If both <i><tt>key</tt></i> and
--   <i><tt>groupName</tt></i> are <a>Nothing</a>, then
--   <i><tt>comment</tt></i> will be removed above the first group in the
--   file.
--   
--   <i>Since: 2.6</i>
keyFileRemoveComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Maybe Text -> m ()

-- | Removes the specified group, <i><tt>groupName</tt></i>, from the key
--   file.
--   
--   <i>Since: 2.6</i>
keyFileRemoveGroup :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ()

-- | Removes <i><tt>key</tt></i> in <i><tt>groupName</tt></i> from the key
--   file.
--   
--   <i>Since: 2.6</i>
keyFileRemoveKey :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> m ()

-- | Writes the contents of <i><tt>keyFile</tt></i> to
--   <i><tt>filename</tt></i> using <a>fileSetContents</a>. If you need
--   stricter guarantees about durability of the written file than are
--   provided by <a>fileSetContents</a>, use <a>fileSetContentsFull</a>
--   with the return value of <a>keyFileToData</a>.
--   
--   This function can fail for any of the reasons that
--   <a>fileSetContents</a> may fail.
--   
--   <i>Since: 2.40</i>
keyFileSaveToFile :: (HasCallStack, MonadIO m) => KeyFile -> Text -> m ()

-- | Associates a new boolean value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.6</i>
keyFileSetBoolean :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Bool -> m ()

-- | Associates a list of boolean values with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created. If <i><tt>groupName</tt></i> is <a>Nothing</a>, the
--   start_group is used.
--   
--   <i>Since: 2.6</i>
keyFileSetBooleanList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Bool] -> m ()

-- | Places a comment above <i><tt>key</tt></i> from
--   <i><tt>groupName</tt></i>.
--   
--   If <i><tt>key</tt></i> is <a>Nothing</a> then <i><tt>comment</tt></i>
--   will be written above <i><tt>groupName</tt></i>. If both
--   <i><tt>key</tt></i> and <i><tt>groupName</tt></i> are <a>Nothing</a>,
--   then <i><tt>comment</tt></i> will be written above the first group in
--   the file.
--   
--   Note that this function prepends a '#' comment marker to each line of
--   <i><tt>comment</tt></i>.
--   
--   <i>Since: 2.6</i>
keyFileSetComment :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> Maybe Text -> Text -> m ()

-- | Associates a new double value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.12</i>
keyFileSetDouble :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Double -> m ()

-- | Associates a list of double values with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.12</i>
keyFileSetDoubleList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Double] -> m ()

-- | Associates a new integer value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.26</i>
keyFileSetInt64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Int64 -> m ()

-- | Associates a new integer value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.6</i>
keyFileSetInteger :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Int32 -> m ()

-- | Associates a list of integer values with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.6</i>
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 ';'.
--   
--   <i>Since: 2.6</i>
keyFileSetListSeparator :: (HasCallStack, MonadIO m) => KeyFile -> Int8 -> m ()

-- | Associates a string value for <i><tt>key</tt></i> and
--   <i><tt>locale</tt></i> under <i><tt>groupName</tt></i>. If the
--   translation for <i><tt>key</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.6</i>
keyFileSetLocaleString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> Text -> m ()

-- | Associates a list of string values for <i><tt>key</tt></i> and
--   <i><tt>locale</tt></i> under <i><tt>groupName</tt></i>. If the
--   translation for <i><tt>key</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.6</i>
keyFileSetLocaleStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> [Text] -> CSize -> m ()

-- | Associates a new string value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created. If <i><tt>groupName</tt></i> cannot be found then it is
--   created. Unlike <a>keyFileSetValue</a>, this function handles
--   characters that need escaping, such as newlines.
--   
--   <i>Since: 2.6</i>
keyFileSetString :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> m ()

-- | Associates a list of string values for <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created. If <i><tt>groupName</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.6</i>
keyFileSetStringList :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> [Text] -> CSize -> m ()

-- | Associates a new integer value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>. If <i><tt>key</tt></i> cannot be found then
--   it is created.
--   
--   <i>Since: 2.26</i>
keyFileSetUint64 :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Word64 -> m ()

-- | Associates a new value with <i><tt>key</tt></i> under
--   <i><tt>groupName</tt></i>.
--   
--   If <i><tt>key</tt></i> cannot be found then it is created. If
--   <i><tt>groupName</tt></i> 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 <a>keyFileSetString</a>.
--   
--   <i>Since: 2.6</i>
keyFileSetValue :: (HasCallStack, MonadIO m) => KeyFile -> Text -> Text -> Text -> m ()

-- | This function outputs <i><tt>keyFile</tt></i> as a string.
--   
--   Note that this function never reports an error, so it is safe to pass
--   <a>Nothing</a> as <i><tt>error</tt></i>.
--   
--   <i>Since: 2.6</i>
keyFileToData :: (HasCallStack, MonadIO m) => KeyFile -> m (Text, CSize)

-- | Decreases the reference count of <i><tt>keyFile</tt></i> by 1. If the
--   reference count reaches zero, frees the key file and all its allocated
--   memory.
--   
--   <i>Since: 2.32</i>
keyFileUnref :: (HasCallStack, MonadIO m) => KeyFile -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.KeyFile.KeyFile
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.KeyFile.KeyFile)


-- | Structure representing a single field in a structured log entry. See
--   <tt><i>g_log_structured()</i></tt> 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,
--   <i><tt>length</tt></i> must be set to a non-negative value.
--   
--   <i>Since: 2.50</i>
module GI.GLib.Structs.LogField

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

-- | Construct a <a>LogField</a> struct initialized to zero.
newZeroLogField :: MonadIO m => m LogField

-- | Set the value of the “<tt>key</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #key
--   </pre>
clearLogFieldKey :: MonadIO m => LogField -> m ()

-- | Get the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> logField #key
--   </pre>
getLogFieldKey :: MonadIO m => LogField -> m (Maybe Text)

-- | Set the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> logField [ #key <a>:=</a> value ]
--   </pre>
setLogFieldKey :: MonadIO m => LogField -> CString -> m ()

-- | Get the value of the “<tt>length</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> logField #length
--   </pre>
getLogFieldLength :: MonadIO m => LogField -> m Int64

-- | Set the value of the “<tt>length</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> logField [ #length <a>:=</a> value ]
--   </pre>
setLogFieldLength :: MonadIO m => LogField -> Int64 -> m ()

-- | Set the value of the “<tt>value</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #value
--   </pre>
clearLogFieldValue :: MonadIO m => LogField -> m ()

-- | Get the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> logField #value
--   </pre>
getLogFieldValue :: MonadIO m => LogField -> m (Ptr ())

-- | Set the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> logField [ #value <a>:=</a> value ]
--   </pre>
setLogFieldValue :: MonadIO m => LogField -> Ptr () -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.LogField.LogField
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.LogField.LogField
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


-- | The <a>MappedFile</a> represents a file mapping created with
--   <a>mappedFileNew</a>. 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 <a>MappedFile</a> had refcounting and is
--   currently exactly the same as <a>mappedFileUnref</a>.
--   
--   <i>Since: 2.8</i>

-- | <i>Deprecated: (Since version 2.22)Use <a>mappedFileUnref</a>
--   instead.</i>
mappedFileFree :: (HasCallStack, MonadIO m) => MappedFile -> m ()

-- | Creates a new <a>Bytes</a> which references the data mapped from
--   <i><tt>file</tt></i>. The mapped contents of the file must not be
--   modified after creating this bytes object, because a <a>Bytes</a>
--   should be immutable.
--   
--   <i>Since: 2.34</i>
mappedFileGetBytes :: (HasCallStack, MonadIO m) => MappedFile -> m Bytes

-- | Returns the contents of a <a>MappedFile</a>.
--   
--   Note that the contents may not be zero-terminated, even if the
--   <a>MappedFile</a> is backed by a text file.
--   
--   If the file is empty then <a>Nothing</a> is returned.
--   
--   <i>Since: 2.8</i>
mappedFileGetContents :: (HasCallStack, MonadIO m) => MappedFile -> m Text

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

-- | Maps a file into memory. On UNIX, this is using the
--   <tt><i>mmap()</i></tt> function.
--   
--   If <i><tt>writable</tt></i> is <a>True</a>, 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 <a>MappedFile</a>. 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 <a>fileSetContents</a>).
--   
--   If <i><tt>filename</tt></i> is the name of an empty, regular file, the
--   function will successfully return an empty <a>MappedFile</a>. In other
--   cases of size 0 (e.g. device files such as /dev/null),
--   <i><tt>error</tt></i> will be set to the <a>FileError</a> value
--   <a>FileErrorInval</a>.
--   
--   <i>Since: 2.8</i>
mappedFileNew :: (HasCallStack, MonadIO m) => [Char] -> Bool -> m MappedFile

-- | Maps a file into memory. On UNIX, this is using the
--   <tt><i>mmap()</i></tt> function.
--   
--   If <i><tt>writable</tt></i> is <a>True</a>, 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 <a>MappedFile</a>. 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 <a>fileSetContents</a>).
--   
--   <i>Since: 2.32</i>
mappedFileNewFromFd :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m MappedFile

-- | Increments the reference count of <i><tt>file</tt></i> by one. It is
--   safe to call this function from any thread.
--   
--   <i>Since: 2.22</i>
mappedFileRef :: (HasCallStack, MonadIO m) => MappedFile -> m MappedFile

-- | Decrements the reference count of <i><tt>file</tt></i> by one. If the
--   reference count drops to 0, unmaps the buffer of <i><tt>file</tt></i>
--   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.ManagedPtrNewtype GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MappedFile.MappedFile
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.MappedFile.MappedFile)


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.MemChunk

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

-- | <i>No description available in the introspection data.</i>
memChunkAlloc :: (HasCallStack, MonadIO m) => MemChunk -> m (Ptr ())

-- | <i>No description available in the introspection data.</i>
memChunkAlloc0 :: (HasCallStack, MonadIO m) => MemChunk -> m (Ptr ())

-- | <i>No description available in the introspection data.</i>
memChunkClean :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | <i>No description available in the introspection data.</i>
memChunkDestroy :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | <i>No description available in the introspection data.</i>
memChunkFree :: (HasCallStack, MonadIO m) => MemChunk -> Ptr () -> m ()

-- | <i>No description available in the introspection data.</i>
memChunkInfo :: (HasCallStack, MonadIO m) => m ()

-- | <i>No description available in the introspection data.</i>
memChunkPrint :: (HasCallStack, MonadIO m) => MemChunk -> m ()

-- | <i>No description available in the introspection data.</i>
memChunkReset :: (HasCallStack, MonadIO m) => MemChunk -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MemChunk.MemChunk
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MemChunk.MemChunk
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.MemChunk.MemChunk


-- | A <a>Once</a> struct controls a one-time initialization function. Any
--   one-time initialization function must have its own unique <a>Once</a>
--   struct.
--   
--   <i>Since: 2.4</i>
module GI.GLib.Structs.Once

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

-- | Construct a <a>Once</a> struct initialized to zero.
newZeroOnce :: MonadIO m => m Once

-- | Function to be called when starting a critical initialization section.
--   The argument <i><tt>location</tt></i> 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
--   <a>onceInitLeave</a> and the unique address
--   <i><tt>valueLocation</tt></i>, 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static gsize initialization_value = 0;
--   
--   if (g_once_init_enter (&amp;initialization_value))
--     {
--       gsize setup_value = 42; // initialization code here
--   
--       g_once_init_leave (&amp;initialization_value, setup_value);
--     }
--   
--   // use initialization_value here
--   </pre>
--   
--   While <i><tt>location</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.14</i>
onceInitEnter :: (HasCallStack, MonadIO m) => Ptr () -> m (Bool, Ptr ())

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

-- | This functions behaves in the same way as <a>onceInitEnter</a>, but
--   can can be used to initialize pointers (or <tt><i>guintptr</i></tt>)
--   instead of <tt><i>gsize</i></tt>.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static MyStruct *interesting_struct = NULL;
--   
--   if (g_once_init_enter_pointer (&amp;interesting_struct))
--     {
--       MyStruct *setup_value = allocate_my_struct (); // initialization code here
--   
--       g_once_init_leave_pointer (&amp;interesting_struct, g_steal_pointer (&amp;setup_value));
--     }
--   
--   // use interesting_struct here
--   </pre>
--   
--   <i>Since: 2.80</i>
onceInitEnterPointer :: (HasCallStack, MonadIO m) => Ptr () -> m Bool

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

-- | Counterpart to <a>onceInitEnterPointer</a>. Expects a location of a
--   static <tt>NULL</tt>-initialized initialization variable, and an
--   initialization value other than <tt>NULL</tt>. Sets the variable to
--   the initialization value, and releases concurrent threads blocking in
--   <a>onceInitEnterPointer</a> on this initialization variable.
--   
--   This functions behaves in the same way as <a>onceInitLeave</a>, but
--   can be used to initialize pointers (or <tt><i>guintptr</i></tt>)
--   instead of <tt><i>gsize</i></tt>.
--   
--   <i>Since: 2.80</i>
onceInitLeavePointer :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m ()

-- | Set the value of the “<tt>retval</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #retval
--   </pre>
clearOnceRetval :: MonadIO m => Once -> m ()

-- | Get the value of the “<tt>retval</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> once #retval
--   </pre>
getOnceRetval :: MonadIO m => Once -> m (Ptr ())

-- | Set the value of the “<tt>retval</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> once [ #retval <a>:=</a> value ]
--   </pre>
setOnceRetval :: MonadIO m => Once -> Ptr () -> m ()

-- | Get the value of the “<tt>status</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> once #status
--   </pre>
getOnceStatus :: MonadIO m => Once -> m OnceStatus

-- | Set the value of the “<tt>status</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> once [ #status <a>:=</a> value ]
--   </pre>
setOnceStatus :: MonadIO m => Once -> OnceStatus -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Once.Once
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Once.Once
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


-- | A GOptionEntry struct defines a single option. To have an effect, they
--   must be added to a <a>OptionGroup</a> with
--   <a>optionContextAddMainEntries</a> or <a>optionGroupAddEntries</a>.
module GI.GLib.Structs.OptionEntry

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

-- | Construct a <a>OptionEntry</a> struct initialized to zero.
newZeroOptionEntry :: MonadIO m => m OptionEntry

-- | Get the value of the “<tt>arg</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #arg
--   </pre>
getOptionEntryArg :: MonadIO m => OptionEntry -> m OptionArg

-- | Set the value of the “<tt>arg</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #arg <a>:=</a> value ]
--   </pre>
setOptionEntryArg :: MonadIO m => OptionEntry -> OptionArg -> m ()

-- | Set the value of the “<tt>arg_data</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #argData
--   </pre>
clearOptionEntryArgData :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “<tt>arg_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #argData
--   </pre>
getOptionEntryArgData :: MonadIO m => OptionEntry -> m (Ptr ())

-- | Set the value of the “<tt>arg_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #argData <a>:=</a> value ]
--   </pre>
setOptionEntryArgData :: MonadIO m => OptionEntry -> Ptr () -> m ()

-- | Set the value of the “<tt>arg_description</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #argDescription
--   </pre>
clearOptionEntryArgDescription :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “<tt>arg_description</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #argDescription
--   </pre>
getOptionEntryArgDescription :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>arg_description</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #argDescription <a>:=</a> value ]
--   </pre>
setOptionEntryArgDescription :: MonadIO m => OptionEntry -> CString -> m ()

-- | Set the value of the “<tt>description</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #description
--   </pre>
clearOptionEntryDescription :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “<tt>description</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #description
--   </pre>
getOptionEntryDescription :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>description</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #description <a>:=</a> value ]
--   </pre>
setOptionEntryDescription :: MonadIO m => OptionEntry -> CString -> m ()

-- | Get the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #flags
--   </pre>
getOptionEntryFlags :: MonadIO m => OptionEntry -> m Int32

-- | Set the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #flags <a>:=</a> value ]
--   </pre>
setOptionEntryFlags :: MonadIO m => OptionEntry -> Int32 -> m ()

-- | Set the value of the “<tt>long_name</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #longName
--   </pre>
clearOptionEntryLongName :: MonadIO m => OptionEntry -> m ()

-- | Get the value of the “<tt>long_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #longName
--   </pre>
getOptionEntryLongName :: MonadIO m => OptionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>long_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #longName <a>:=</a> value ]
--   </pre>
setOptionEntryLongName :: MonadIO m => OptionEntry -> CString -> m ()

-- | Get the value of the “<tt>short_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> optionEntry #shortName
--   </pre>
getOptionEntryShortName :: MonadIO m => OptionEntry -> m Int8

-- | Set the value of the “<tt>short_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> optionEntry [ #shortName <a>:=</a> value ]
--   </pre>
setOptionEntryShortName :: MonadIO m => OptionEntry -> Int8 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.OptionEntry.OptionEntry
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionEntry.OptionEntry
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


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

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

-- | Construct a <a>PathBuf</a> 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
--   <tt>GPathBuf</tt> initialized using <a>pathBufInit</a> or
--   <a>pathBufInitFromPath</a>.
--   
--   <i>Since: 2.76</i>
pathBufClear :: (HasCallStack, MonadIO m) => PathBuf -> m ()

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

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

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

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

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

-- | Initializes a <tt>GPathBuf</tt> instance with the given path.
--   
--   <i>Since: 2.76</i>
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,
--   <tt>/</tt> on Unix-like operating systems or the drive on Windows
--   systems), it will not be removed and <a>False</a> will be returned
--   instead.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&amp;buf, "/bin/sh");
--   
--   g_path_buf_pop (&amp;buf);
--   g_path_buf_init_from_path (&amp;cmp, "/bin");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp));
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_pop (&amp;buf);
--   g_path_buf_init_from_path (&amp;cmp, "/");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp));
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_clear (&amp;buf);
--   </pre>
--   
--   <i>Since: 2.76</i>
pathBufPop :: (HasCallStack, MonadIO m) => PathBuf -> m Bool

-- | Extends the given path buffer with <i><tt>path</tt></i>.
--   
--   If <i><tt>path</tt></i> is absolute, it replaces the current path.
--   
--   If <i><tt>path</tt></i> 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, <a>DIR_SEPARATOR_S</a> is
--   the only directory separator.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&amp;buf, "/tmp");
--   g_path_buf_push (&amp;buf, ".X11-unix/X0");
--   g_path_buf_init_from_path (&amp;cmp, "/tmp/.X11-unix/X0");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp));
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_push (&amp;buf, "/etc/locale.conf");
--   g_path_buf_init_from_path (&amp;cmp, "/etc/locale.conf");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp));
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_clear (&amp;buf);
--   </pre>
--   
--   <i>Since: 2.76</i>
pathBufPush :: (HasCallStack, MonadIO m) => PathBuf -> [Char] -> m PathBuf

-- | Adds an extension to the file name in the path buffer.
--   
--   If <i><tt>extension</tt></i> is <tt>NULL</tt>, the extension will be
--   unset.
--   
--   If the path buffer does not have a file name set, this function
--   returns <tt>FALSE</tt> and leaves the path buffer unmodified.
--   
--   <i>Since: 2.76</i>
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 <tt>FALSE</tt>.
--   
--   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 <i><tt>fileName</tt></i>.
--   
--   If the path buffer contains a path, this is the equivalent of popping
--   the path buffer and pushing <i><tt>fileName</tt></i>, creating a
--   sibling of the original path.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GPathBuf buf, cmp;
--   
--   g_path_buf_init_from_path (&amp;buf, "/");
--   
--   g_path_buf_set_filename (&amp;buf, "bar");
--   g_path_buf_init_from_path (&amp;cmp, "/bar");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp));
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_set_filename (&amp;buf, "baz.txt");
--   g_path_buf_init_from_path (&amp;cmp, "/baz.txt");
--   g_assert_true (g_path_buf_equal (&amp;buf, &amp;cmp);
--   g_path_buf_clear (&amp;cmp);
--   
--   g_path_buf_clear (&amp;buf);
--   </pre>
--   
--   <i>Since: 2.76</i>
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 <tt>NULL</tt>.
--   
--   <i>Since: 2.76</i>
pathBufToPath :: (HasCallStack, MonadIO m) => PathBuf -> m (Maybe [Char])
instance GHC.Classes.Eq GI.GLib.Structs.PathBuf.PathBuf
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PathBuf.PathBuf
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


-- | A <tt>GPatternSpec</tt> struct is the 'compiled' form of a glob-style
--   pattern.
--   
--   The <a>patternMatchSimple</a> and <a>patternSpecMatch</a> functions
--   match a string against a pattern containing '*' and '?' wildcards with
--   similar semantics as the standard <tt>glob()</tt> function: '*'
--   matches an arbitrary, possibly empty, string, '?' matches an arbitrary
--   character.
--   
--   Note that in contrast to <tt>glob()</tt>, 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
--   [struct<i><tt>gLib</tt></i>.PatternSpec] using <a>patternSpecNew</a>
--   and use <a>patternSpecMatchString</a> instead of
--   <a>patternMatchSimple</a>. This avoids the overhead of repeated
--   pattern compilation.
module GI.GLib.Structs.PatternSpec

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

-- | Copies <i><tt>pspec</tt></i> in a new <a>PatternSpec</a>.
--   
--   <i>Since: 2.70</i>
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 <a>PatternSpec</a>.
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 <a>Nothing</a>, this is more efficient if the
--   reversed version of the string to be matched is not at hand, as
--   <tt><i>g_pattern_match()</i></tt> 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
--   <tt><i>g_pattern_match()</i></tt>.
--   
--   Note also that the reverse of a UTF-8 encoded string can in general
--   not be obtained by <a>strreverse</a>. This works only if the string
--   does not contain any multibyte characters. GLib offers the
--   <a>utf8Strreverse</a> function to reverse UTF-8 encoded strings.
--   
--   <i>Since: 2.70</i>
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
--   <tt><i>g_pattern_match()</i></tt> instead while supplying the reversed
--   string.
--   
--   <i>Since: 2.70</i>
patternSpecMatchString :: (HasCallStack, MonadIO m) => PatternSpec -> Text -> m Bool

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

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

-- | Set the value of the “<tt>events</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> pollFD [ #events <a>:=</a> value ]
--   </pre>
setPollFDEvents :: MonadIO m => PollFD -> CUShort -> m ()

-- | Get the value of the “<tt>fd</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pollFD #fd
--   </pre>
getPollFDFd :: MonadIO m => PollFD -> m Int32

-- | Set the value of the “<tt>fd</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> pollFD [ #fd <a>:=</a> value ]
--   </pre>
setPollFDFd :: MonadIO m => PollFD -> Int32 -> m ()

-- | Get the value of the “<tt>revents</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pollFD #revents
--   </pre>
getPollFDRevents :: MonadIO m => PollFD -> m CUShort

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


-- | Contains the public fields of a pointer array.
module GI.GLib.Structs.PtrArray

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

-- | Construct a <a>PtrArray</a> struct initialized to zero.
newZeroPtrArray :: MonadIO m => m PtrArray

-- | Get the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> ptrArray #len
--   </pre>
getPtrArrayLen :: MonadIO m => PtrArray -> m Word32

-- | Set the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> ptrArray [ #len <a>:=</a> value ]
--   </pre>
setPtrArrayLen :: MonadIO m => PtrArray -> Word32 -> m ()

-- | Set the value of the “<tt>pdata</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #pdata
--   </pre>
clearPtrArrayPdata :: MonadIO m => PtrArray -> m ()

-- | Get the value of the “<tt>pdata</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> ptrArray #pdata
--   </pre>
getPtrArrayPdata :: MonadIO m => PtrArray -> m (Ptr ())

-- | Set the value of the “<tt>pdata</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> ptrArray [ #pdata <a>:=</a> value ]
--   </pre>
setPtrArrayPdata :: MonadIO m => PtrArray -> Ptr () -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.PtrArray.PtrArray
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.PtrArray.PtrArray)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.PtrArray.PtrArray tag


-- | The GRWLock struct is an opaque data structure to represent a
--   reader-writer lock. It is similar to a <a>Mutex</a> 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 <a>rWLockWriterLock</a>), multiple threads can gain
--   simultaneous read-only access (by holding the 'reader' lock via
--   <a>rWLockReaderLock</a>).
--   
--   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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GRWLock lock;
--   GPtrArray *array;
--   
--   gpointer
--   my_array_get (guint index)
--   {
--     gpointer retval = NULL;
--   
--     if (!array)
--       return NULL;
--   
--     g_rw_lock_reader_lock (&amp;lock);
--     if (index &lt; array-&gt;len)
--       retval = g_ptr_array_index (array, index);
--     g_rw_lock_reader_unlock (&amp;lock);
--   
--     return retval;
--   }
--   
--   void
--   my_array_set (guint index, gpointer data)
--   {
--     g_rw_lock_writer_lock (&amp;lock);
--   
--     if (!array)
--       array = g_ptr_array_new ();
--   
--     if (index &gt;= array-&gt;len)
--       g_ptr_array_set_size (array, index+1);
--     g_ptr_array_index (array, index) = data;
--   
--     g_rw_lock_writer_unlock (&amp;lock);
--   }
--   </pre>
--   
--   This example shows an array which can be accessed by many readers (the
--   <tt><i>my_array_get()</i></tt> function) simultaneously, whereas the
--   writers (the <tt><i>my_array_set()</i></tt> 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 <a>RWLock</a> is allocated in static storage then it can be used
--   without initialisation. Otherwise, you should call <a>rWLockInit</a>
--   on it and <a>rWLockClear</a> when done.
--   
--   A GRWLock should only be accessed with the g_rw_lock_ functions.
--   
--   <i>Since: 2.32</i>
module GI.GLib.Structs.RWLock

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

-- | Construct a <a>RWLock</a> struct initialized to zero.
newZeroRWLock :: MonadIO m => m RWLock

-- | Frees the resources allocated to a lock with <a>rWLockInit</a>.
--   
--   This function should not be used with a <a>RWLock</a> that has been
--   statically allocated.
--   
--   Calling <a>rWLockClear</a> when any thread holds the lock leads to
--   undefined behaviour.
--   
--   <i>Since: 2.32</i>
rWLockClear :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Initializes a <a>RWLock</a> 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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--     typedef struct {
--       GRWLock l;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_rw_lock_init (&amp;b-&gt;l);
--   </pre>
--   
--   To undo the effect of <a>rWLockInit</a> when a lock is no longer
--   needed, use <a>rWLockClear</a>.
--   
--   Calling <a>rWLockInit</a> on an already initialized <a>RWLock</a>
--   leads to undefined behaviour.
--   
--   <i>Since: 2.32</i>
rWLockInit :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Obtain a read lock on <i><tt>rwLock</tt></i>. If another thread
--   currently holds the write lock on <i><tt>rwLock</tt></i>, 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 <a>rWLockReaderLock</a> 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
--   <a>rWLockReaderUnlock</a> 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.
--   
--   <i>Since: 2.32</i>
rWLockReaderLock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Tries to obtain a read lock on <i><tt>rwLock</tt></i> and returns
--   <a>True</a> if the read lock was successfully obtained. Otherwise it
--   returns <a>False</a>.
--   
--   <i>Since: 2.32</i>
rWLockReaderTrylock :: (HasCallStack, MonadIO m) => RWLock -> m Bool

-- | Release a read lock on <i><tt>rwLock</tt></i>.
--   
--   Calling <a>rWLockReaderUnlock</a> on a lock that is not held by the
--   current thread leads to undefined behaviour.
--   
--   <i>Since: 2.32</i>
rWLockReaderUnlock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Obtain a write lock on <i><tt>rwLock</tt></i>. If another thread
--   currently holds a read or write lock on <i><tt>rwLock</tt></i>, the
--   current thread will block until all other threads have dropped their
--   locks on <i><tt>rwLock</tt></i>.
--   
--   Calling <a>rWLockWriterLock</a> while the current thread already owns
--   a read or write lock on <i><tt>rwLock</tt></i> leads to undefined
--   behaviour.
--   
--   <i>Since: 2.32</i>
rWLockWriterLock :: (HasCallStack, MonadIO m) => RWLock -> m ()

-- | Tries to obtain a write lock on <i><tt>rwLock</tt></i>. If another
--   thread currently holds a read or write lock on <i><tt>rwLock</tt></i>,
--   it immediately returns <a>False</a>. Otherwise it locks
--   <i><tt>rwLock</tt></i> and returns <a>True</a>.
--   
--   <i>Since: 2.32</i>
rWLockWriterTrylock :: (HasCallStack, MonadIO m) => RWLock -> m Bool

-- | Release a write lock on <i><tt>rwLock</tt></i>.
--   
--   Calling <a>rWLockWriterUnlock</a> on a lock that is not held by the
--   current thread leads to undefined behaviour.
--   
--   <i>Since: 2.32</i>
rWLockWriterUnlock :: (HasCallStack, MonadIO m) => RWLock -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.RWLock.RWLock
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.RWLock.RWLock
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


-- | 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 <a>Rand</a> 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.
--   
--   <i>Since: 2.4</i>
randCopy :: (HasCallStack, MonadIO m) => Rand -> m Rand

-- | Returns the next random <tt><i>gdouble</i></tt> from
--   <i><tt>rand_</tt></i> equally distributed over the range [0..1).
randDouble :: (HasCallStack, MonadIO m) => Rand -> m Double

-- | Returns the next random <tt><i>gdouble</i></tt> from
--   <i><tt>rand_</tt></i> equally distributed over the range
--   [<i><tt>begin</tt></i>..<i><tt>end</tt></i>).
randDoubleRange :: (HasCallStack, MonadIO m) => Rand -> Double -> Double -> m Double

-- | Frees the memory allocated for the <a>Rand</a>.
randFree :: (HasCallStack, MonadIO m) => Rand -> m ()

-- | Returns the next random <tt><i>guint32</i></tt> from
--   <i><tt>rand_</tt></i> equally distributed over the range [0..2^32-1].
randInt :: (HasCallStack, MonadIO m) => Rand -> m Word32

-- | Returns the next random <tt><i>gint32</i></tt> from
--   <i><tt>rand_</tt></i> equally distributed over the range
--   [<i><tt>begin</tt></i>..<i><tt>end</tt></i>-1].
randIntRange :: (HasCallStack, MonadIO m) => Rand -> Int32 -> Int32 -> m Int32

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

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

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

-- | Sets the seed for the random number generator <a>Rand</a> to
--   <i><tt>seed</tt></i>.
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.
--   
--   <i>Since: 2.4</i>
randSetSeedArray :: (HasCallStack, MonadIO m) => Rand -> Word32 -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Rand.Rand
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Rand.Rand)


-- | The GRecMutex struct is an opaque data structure to represent a
--   recursive mutex. It is similar to a <a>Mutex</a> 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 <a>RecMutex</a> is allocated in static storage then it can be
--   used without initialisation. Otherwise, you should call
--   <a>recMutexInit</a> on it and <a>recMutexClear</a> when done.
--   
--   A GRecMutex should only be accessed with the g_rec_mutex_ functions.
--   
--   <i>Since: 2.32</i>
module GI.GLib.Structs.RecMutex

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

-- | Construct a <a>RecMutex</a> struct initialized to zero.
newZeroRecMutex :: MonadIO m => m RecMutex

-- | Frees the resources allocated to a recursive mutex with
--   <a>recMutexInit</a>.
--   
--   This function should not be used with a <a>RecMutex</a> that has been
--   statically allocated.
--   
--   Calling <a>recMutexClear</a> on a locked recursive mutex leads to
--   undefined behaviour.
--   
--   <i>Since: 2.32</i>
recMutexClear :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Initializes a <a>RecMutex</a> 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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--     typedef struct {
--       GRecMutex m;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_rec_mutex_init (&amp;b-&gt;m);
--   </pre>
--   
--   Calling <a>recMutexInit</a> on an already initialized <a>RecMutex</a>
--   leads to undefined behaviour.
--   
--   To undo the effect of <a>recMutexInit</a> when a recursive mutex is no
--   longer needed, use <a>recMutexClear</a>.
--   
--   <i>Since: 2.32</i>
recMutexInit :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Locks <i><tt>recMutex</tt></i>. If <i><tt>recMutex</tt></i> is already
--   locked by another thread, the current thread will block until
--   <i><tt>recMutex</tt></i> is unlocked by the other thread. If
--   <i><tt>recMutex</tt></i> is already locked by the current thread, the
--   'lock count' of <i><tt>recMutex</tt></i> is increased. The mutex will
--   only become available again when it is unlocked as many times as it
--   has been locked.
--   
--   <i>Since: 2.32</i>
recMutexLock :: (HasCallStack, MonadIO m) => RecMutex -> m ()

-- | Tries to lock <i><tt>recMutex</tt></i>. If <i><tt>recMutex</tt></i> is
--   already locked by another thread, it immediately returns <a>False</a>.
--   Otherwise it locks <i><tt>recMutex</tt></i> and returns <a>True</a>.
--   
--   <i>Since: 2.32</i>
recMutexTrylock :: (HasCallStack, MonadIO m) => RecMutex -> m Bool

-- | Unlocks <i><tt>recMutex</tt></i>. If another thread is blocked in a
--   <a>recMutexLock</a> call for <i><tt>recMutex</tt></i>, it will become
--   unblocked and can lock <i><tt>recMutex</tt></i> itself.
--   
--   Calling <a>recMutexUnlock</a> on a recursive mutex that is not locked
--   by the current thread leads to undefined behaviour.
--   
--   <i>Since: 2.32</i>
recMutexUnlock :: (HasCallStack, MonadIO m) => RecMutex -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.RecMutex.RecMutex
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.RecMutex.RecMutex
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


-- | A <tt>GRelation</tt> is a table of data which can be indexed on any
--   number of fields, rather like simple database tables. A
--   <tt>GRelation</tt> 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 <tt>GRelation</tt> tables are currently limited to 2 fields.
--   
--   To create a <tt>GRelation</tt>, use
--   [func<i><tt>gLib</tt></i>.Relation.new].
--   
--   To specify which fields should be indexed, use
--   <a>Relation</a>.<tt><i>index</i></tt>(). Note that this must be called
--   before any tuples are added to the <tt>GRelation</tt>.
--   
--   To add records to a <tt>GRelation</tt> use
--   <a>Relation</a>.<tt><i>insert</i></tt>().
--   
--   To determine if a given record appears in a <tt>GRelation</tt>, use
--   <a>Relation</a>.<tt><i>exists</i></tt>(). 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 <a>relationCount</a>.
--   
--   To get all the records which have a particular value in a given field,
--   use <a>Relation</a>.<tt><i>select</i></tt>(). To access fields of the
--   resulting records, use <a>tuplesIndex</a>. To free the resulting
--   records use <a>tuplesDestroy</a>.
--   
--   To delete all records which have a particular value in a given field,
--   use <a>relationDelete</a>.
--   
--   To destroy the <tt>GRelation</tt>, use <a>relationDestroy</a>.
--   
--   To help debug <tt>GRelation</tt> objects, use <a>relationPrint</a>.
--   
--   <tt>GRelation</tt> 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 <a>Relation</a> that have the given
--   value in the given field.

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

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

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

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

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

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

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


-- | Specifies the <a>Scanner</a> 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 <a>ScannerConfig</a> struct initialized to zero.
newZeroScannerConfig :: MonadIO m => m ScannerConfig

-- | Get the value of the “<tt>case_sensitive</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #caseSensitive
--   </pre>
getScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>case_sensitive</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #caseSensitive <a>:=</a> value ]
--   </pre>
setScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>char_2_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #char2Token
--   </pre>
getScannerConfigChar2Token :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>char_2_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #char2Token <a>:=</a> value ]
--   </pre>
setScannerConfigChar2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Set the value of the “<tt>cpair_comment_single</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #cpairCommentSingle
--   </pre>
clearScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “<tt>cpair_comment_single</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #cpairCommentSingle
--   </pre>
getScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “<tt>cpair_comment_single</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #cpairCommentSingle <a>:=</a> value ]
--   </pre>
setScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “<tt>cset_identifier_first</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #csetIdentifierFirst
--   </pre>
clearScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “<tt>cset_identifier_first</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #csetIdentifierFirst
--   </pre>
getScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “<tt>cset_identifier_first</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #csetIdentifierFirst <a>:=</a> value ]
--   </pre>
setScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “<tt>cset_identifier_nth</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #csetIdentifierNth
--   </pre>
clearScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “<tt>cset_identifier_nth</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #csetIdentifierNth
--   </pre>
getScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “<tt>cset_identifier_nth</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #csetIdentifierNth <a>:=</a> value ]
--   </pre>
setScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Set the value of the “<tt>cset_skip_characters</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #csetSkipCharacters
--   </pre>
clearScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m ()

-- | Get the value of the “<tt>cset_skip_characters</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #csetSkipCharacters
--   </pre>
getScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m (Maybe Text)

-- | Set the value of the “<tt>cset_skip_characters</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #csetSkipCharacters <a>:=</a> value ]
--   </pre>
setScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> CString -> m ()

-- | Get the value of the “<tt>identifier_2_string</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #identifier2String
--   </pre>
getScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>identifier_2_string</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #identifier2String <a>:=</a> value ]
--   </pre>
setScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>int_2_float</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #int2Float
--   </pre>
getScannerConfigInt2Float :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>int_2_float</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #int2Float <a>:=</a> value ]
--   </pre>
setScannerConfigInt2Float :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>numbers_2_int</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #numbers2Int
--   </pre>
getScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>numbers_2_int</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #numbers2Int <a>:=</a> value ]
--   </pre>
setScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_binary</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanBinary
--   </pre>
getScannerConfigScanBinary :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_binary</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanBinary <a>:=</a> value ]
--   </pre>
setScannerConfigScanBinary :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_comment_multi</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanCommentMulti
--   </pre>
getScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_comment_multi</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanCommentMulti <a>:=</a> value ]
--   </pre>
setScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_float</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanFloat
--   </pre>
getScannerConfigScanFloat :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_float</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanFloat <a>:=</a> value ]
--   </pre>
setScannerConfigScanFloat :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_hex</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanHex
--   </pre>
getScannerConfigScanHex :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_hex</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanHex <a>:=</a> value ]
--   </pre>
setScannerConfigScanHex :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_hex_dollar</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanHexDollar
--   </pre>
getScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_hex_dollar</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanHexDollar <a>:=</a> value ]
--   </pre>
setScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_identifier</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanIdentifier
--   </pre>
getScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_identifier</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanIdentifier <a>:=</a> value ]
--   </pre>
setScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_identifier_1char</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanIdentifier1char
--   </pre>
getScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_identifier_1char</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanIdentifier1char <a>:=</a> value ]
--   </pre>
setScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_identifier_NULL</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanIdentifierNULL
--   </pre>
getScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_identifier_NULL</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanIdentifierNULL <a>:=</a> value ]
--   </pre>
setScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_octal</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanOctal
--   </pre>
getScannerConfigScanOctal :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_octal</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanOctal <a>:=</a> value ]
--   </pre>
setScannerConfigScanOctal :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_string_dq</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanStringDq
--   </pre>
getScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_string_dq</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanStringDq <a>:=</a> value ]
--   </pre>
setScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_string_sq</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanStringSq
--   </pre>
getScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_string_sq</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanStringSq <a>:=</a> value ]
--   </pre>
setScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scan_symbols</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scanSymbols
--   </pre>
getScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scan_symbols</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scanSymbols <a>:=</a> value ]
--   </pre>
setScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>scope_0_fallback</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #scope0Fallback
--   </pre>
getScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>scope_0_fallback</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #scope0Fallback <a>:=</a> value ]
--   </pre>
setScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>skip_comment_multi</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #skipCommentMulti
--   </pre>
getScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>skip_comment_multi</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #skipCommentMulti <a>:=</a> value ]
--   </pre>
setScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>skip_comment_single</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #skipCommentSingle
--   </pre>
getScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>skip_comment_single</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #skipCommentSingle <a>:=</a> value ]
--   </pre>
setScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>store_int64</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #storeInt64
--   </pre>
getScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>store_int64</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #storeInt64 <a>:=</a> value ]
--   </pre>
setScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> Word32 -> m ()

-- | Get the value of the “<tt>symbol_2_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scannerConfig #symbol2Token
--   </pre>
getScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> m Word32

-- | Set the value of the “<tt>symbol_2_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scannerConfig [ #symbol2Token <a>:=</a> value ]
--   </pre>
setScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.ScannerConfig.ScannerConfig
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ScannerConfig.ScannerConfig
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


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

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


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

-- | Adds a string onto the end of a <a>String</a>, expanding it if
--   necessary.
stringAppend :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Adds a byte onto the end of a <a>String</a>, expanding it if
--   necessary.
stringAppendC :: (HasCallStack, MonadIO m) => String -> Int8 -> m String

-- | Appends <i><tt>len</tt></i> bytes of <i><tt>val</tt></i> to
--   <i><tt>string</tt></i>.
--   
--   If <i><tt>len</tt></i> is positive, <i><tt>val</tt></i> may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that <i><tt>val</tt></i> has at least
--   <i><tt>len</tt></i> addressable bytes.
--   
--   If <i><tt>len</tt></i> is negative, <i><tt>val</tt></i> must be
--   nul-terminated and <i><tt>len</tt></i> is considered to request the
--   entire string length. This makes <a>stringAppendLen</a> equivalent to
--   <a>stringAppend</a>.
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 <i><tt>unescaped</tt></i> to <i><tt>string</tt></i>, escaping
--   any characters that are reserved in URIs using URI-style escape
--   sequences.
--   
--   <i>Since: 2.16</i>
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 <a>String</a>, destroying any
--   previous contents. It is rather like the standard
--   <tt><i>strcpy()</i></tt> function, except that you do not have to
--   worry about having enough space to copy the string.
stringAssign :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Converts a <a>String</a> to lowercase.

-- | <i>Deprecated: (Since version 2.2)This function uses the
--   locale-specific <tt><i>tolower()</i></tt> function, which is almost
--   never the right thing. Use <a>stringAsciiDown</a> or
--   <a>utf8Strdown</a> instead.</i>
stringDown :: (HasCallStack, MonadIO m) => String -> m String

-- | Compares two strings for equality, returning <a>True</a> if they are
--   equal. For use with <a>HashTable</a>.
stringEqual :: (HasCallStack, MonadIO m) => String -> String -> m Bool

-- | Removes <i><tt>len</tt></i> bytes from a <a>String</a>, starting at
--   position <i><tt>pos</tt></i>. The rest of the <a>String</a> is shifted
--   down to fill the gap.
stringErase :: (HasCallStack, MonadIO m) => String -> Int64 -> Int64 -> m String

-- | Frees the memory allocated for the <a>String</a>. If
--   <i><tt>freeSegment</tt></i> is <a>True</a> it also frees the character
--   data. If it's <a>False</a>, the caller gains ownership of the buffer
--   and must free it after use with <a>free</a>.
--   
--   Instead of passing <a>False</a> to this function, consider using
--   <a>stringFreeAndSteal</a>.
stringFree :: (HasCallStack, MonadIO m) => String -> Bool -> m (Maybe Text)

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

-- | Transfers ownership of the contents of <i><tt>string</tt></i> to a
--   newly allocated <a>Bytes</a>. The <a>String</a> structure itself is
--   deallocated, and it is therefore invalid to use <i><tt>string</tt></i>
--   after invoking this function.
--   
--   Note that while <a>String</a> ensures that its buffer always has a
--   trailing nul character (not reflected in its "len"), the returned
--   <a>Bytes</a> does not include this extra nul; i.e. it has length
--   exactly equal to the "len" member.
--   
--   <i>Since: 2.34</i>
stringFreeToBytes :: (HasCallStack, MonadIO m) => String -> m Bytes

-- | Creates a hash code for <i><tt>str</tt></i>; for use with
--   <a>HashTable</a>.
stringHash :: (HasCallStack, MonadIO m) => String -> m Word32

-- | Inserts a copy of a string into a <a>String</a>, expanding it if
--   necessary.
stringInsert :: (HasCallStack, MonadIO m) => String -> Int64 -> Text -> m String

-- | Inserts a byte into a <a>String</a>, expanding it if necessary.
stringInsertC :: (HasCallStack, MonadIO m) => String -> Int64 -> Int8 -> m String

-- | Inserts <i><tt>len</tt></i> bytes of <i><tt>val</tt></i> into
--   <i><tt>string</tt></i> at <i><tt>pos</tt></i>.
--   
--   If <i><tt>len</tt></i> is positive, <i><tt>val</tt></i> may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that <i><tt>val</tt></i> has at least
--   <i><tt>len</tt></i> addressable bytes.
--   
--   If <i><tt>len</tt></i> is negative, <i><tt>val</tt></i> must be
--   nul-terminated and <i><tt>len</tt></i> is considered to request the
--   entire string length.
--   
--   If <i><tt>pos</tt></i> 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 <a>String</a>, initialized with the given string.
stringNew :: (HasCallStack, MonadIO m) => Maybe Text -> m String

-- | Creates a new <a>String</a> with <i><tt>len</tt></i> bytes of the
--   <i><tt>init</tt></i> buffer. Because a length is provided,
--   <i><tt>init</tt></i> 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 <i><tt>init</tt></i> has at least
--   <i><tt>len</tt></i> addressable bytes.
stringNewLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> m String

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

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

-- | Adds a string on to the start of a <a>String</a>, expanding it if
--   necessary.
stringPrepend :: (HasCallStack, MonadIO m) => String -> Text -> m String

-- | Adds a byte onto the start of a <a>String</a>, expanding it if
--   necessary.
stringPrependC :: (HasCallStack, MonadIO m) => String -> Int8 -> m String

-- | Prepends <i><tt>len</tt></i> bytes of <i><tt>val</tt></i> to
--   <i><tt>string</tt></i>.
--   
--   If <i><tt>len</tt></i> is positive, <i><tt>val</tt></i> may contain
--   embedded nuls and need not be nul-terminated. It is the caller's
--   responsibility to ensure that <i><tt>val</tt></i> has at least
--   <i><tt>len</tt></i> addressable bytes.
--   
--   If <i><tt>len</tt></i> is negative, <i><tt>val</tt></i> must be
--   nul-terminated and <i><tt>len</tt></i> is considered to request the
--   entire string length. This makes <a>stringPrependLen</a> equivalent to
--   <a>stringPrepend</a>.
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 <i><tt>find</tt></i> with the string
--   <i><tt>replace</tt></i> in a <a>String</a> up to <i><tt>limit</tt></i>
--   times. If the number of instances of <i><tt>find</tt></i> in the
--   <a>String</a> is less than <i><tt>limit</tt></i>, all instances are
--   replaced. If <i><tt>limit</tt></i> is <tt>0</tt>, all instances of
--   <i><tt>find</tt></i> are replaced.
--   
--   If <i><tt>find</tt></i> 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.
--   
--   <i>Since: 2.68</i>
stringReplace :: (HasCallStack, MonadIO m) => String -> Text -> Text -> Word32 -> m Word32

-- | Sets the length of a <a>String</a>. 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-&gt;str[string-&gt;len] will be
--   a nul byte.)
stringSetSize :: (HasCallStack, MonadIO m) => String -> CSize -> m String

-- | Creates a new <a>String</a>, with enough space for
--   <i><tt>dflSize</tt></i> 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 <i><tt>len</tt></i>
--   bytes.
stringTruncate :: (HasCallStack, MonadIO m) => String -> CSize -> m String

-- | Converts a <a>String</a> to uppercase.

-- | <i>Deprecated: (Since version 2.2)This function uses the
--   locale-specific <tt><i>toupper()</i></tt> function, which is almost
--   never the right thing. Use <a>stringAsciiUp</a> or <a>utf8Strup</a>
--   instead.</i>
stringUp :: (HasCallStack, MonadIO m) => String -> m String

-- | Get the value of the “<tt>allocated_len</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> string #allocatedLen
--   </pre>
getStringAllocatedLen :: MonadIO m => String -> m CSize

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

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

-- | Set the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> string [ #len <a>:=</a> value ]
--   </pre>
setStringLen :: MonadIO m => String -> CSize -> m ()

-- | Set the value of the “<tt>str</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #str
--   </pre>
clearStringStr :: MonadIO m => String -> m ()

-- | Get the value of the “<tt>str</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> string #str
--   </pre>
getStringStr :: MonadIO m => String -> m (Maybe Text)

-- | Set the value of the “<tt>str</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> string [ #str <a>:=</a> value ]
--   </pre>
setStringStr :: MonadIO m => String -> CString -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.String.String
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.String.String
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.String.String
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.String.String
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.String.String
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.String.String)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.String.String tag


-- | <tt>GStringChunk</tt> 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 <tt>GStringChunk</tt> 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 <a>strdup</a> since fewer calls to
--   <tt>malloc()</tt> are needed, and less memory is wasted in memory
--   allocation overheads.
--   
--   By adding strings with <a>stringChunkInsertConst</a> it is also
--   possible to remove duplicates.
--   
--   To create a new <tt>GStringChunk</tt> use
--   [func<i><tt>gLib</tt></i>.StringChunk.new].
--   
--   To add strings to a <tt>GStringChunk</tt> use
--   <a>stringChunkInsert</a>.
--   
--   To add strings to a <tt>GStringChunk</tt>, but without duplicating
--   strings which are already in the <tt>GStringChunk</tt>, use
--   <a>stringChunkInsertConst</a>.
--   
--   To free the entire <tt>GStringChunk</tt> use <a>stringChunkFree</a>.
--   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 <a>StringChunk</a>. After
--   calling <a>stringChunkClear</a> it is not safe to access any of the
--   strings which were contained within it.
--   
--   <i>Since: 2.14</i>
stringChunkClear :: (HasCallStack, MonadIO m) => StringChunk -> m ()

-- | Adds a copy of <i><tt>string</tt></i> to the <a>StringChunk</a>. It
--   returns a pointer to the new copy of the string in the
--   <a>StringChunk</a>. The characters in the string can be changed, if
--   necessary, though you should not change anything after the end of the
--   string.
--   
--   Unlike <a>stringChunkInsertConst</a>, this function does not check for
--   duplicates. Also strings added with <a>stringChunkInsert</a> will not
--   be searched by <a>stringChunkInsertConst</a> when looking for
--   duplicates.
stringChunkInsert :: (HasCallStack, MonadIO m) => StringChunk -> Text -> m Text

-- | Adds a copy of <i><tt>string</tt></i> to the <a>StringChunk</a>,
--   unless the same string has already been added to the
--   <a>StringChunk</a> with <a>stringChunkInsertConst</a>.
--   
--   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 <a>stringChunkInsertConst</a> will not return a pointer to a
--   string added with <a>stringChunkInsert</a>, even if they do match.
stringChunkInsertConst :: (HasCallStack, MonadIO m) => StringChunk -> Text -> m Text

-- | Adds a copy of the first <i><tt>len</tt></i> bytes of
--   <i><tt>string</tt></i> to the <a>StringChunk</a>. The copy is
--   nul-terminated.
--   
--   Since this function does not stop at nul bytes, it is the caller's
--   responsibility to ensure that <i><tt>string</tt></i> has at least
--   <i><tt>len</tt></i> 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.
--   
--   <i>Since: 2.4</i>
stringChunkInsertLen :: (HasCallStack, MonadIO m) => StringChunk -> Text -> Int64 -> m Text
instance GHC.Classes.Eq GI.GLib.Structs.StringChunk.StringChunk
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.StringChunk.StringChunk
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.StringChunk.StringChunk


-- | <tt>GStrvBuilder</tt> is a helper object to build a
--   <a>Nothing</a>-terminated string arrays.
--   
--   The following example shows how to build a two element array:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   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);
--   </pre>
--   
--   <i>Since: 2.68</i>
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 <a>strfreev</a>
--   when no longer needed.
strvBuilderEnd :: (HasCallStack, MonadIO m) => StrvBuilder -> m [Text]

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

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

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

-- | Decreases the reference count on <i><tt>builder</tt></i>.
--   
--   In the event that there are no more references, releases all memory
--   associated with the <a>StrvBuilder</a>.
--   
--   <i>Since: 2.68</i>
strvBuilderUnref :: (HasCallStack, MonadIO m) => StrvBuilder -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.StrvBuilder.StrvBuilder
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe 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 <i><tt>testCase</tt></i>.
--   
--   <i>Since: 2.70</i>
testCaseFree :: (HasCallStack, MonadIO m) => TestCase -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TestCase.TestCase
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestCase.TestCase
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.TestCase.TestCase


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.TestConfig

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

-- | Construct a <a>TestConfig</a> struct initialized to zero.
newZeroTestConfig :: MonadIO m => m TestConfig

-- | Get the value of the “<tt>test_initialized</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testInitialized
--   </pre>
getTestConfigTestInitialized :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_initialized</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testInitialized <a>:=</a> value ]
--   </pre>
setTestConfigTestInitialized :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “<tt>test_perf</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testPerf
--   </pre>
getTestConfigTestPerf :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_perf</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testPerf <a>:=</a> value ]
--   </pre>
setTestConfigTestPerf :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “<tt>test_quick</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testQuick
--   </pre>
getTestConfigTestQuick :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_quick</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testQuick <a>:=</a> value ]
--   </pre>
setTestConfigTestQuick :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “<tt>test_quiet</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testQuiet
--   </pre>
getTestConfigTestQuiet :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_quiet</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testQuiet <a>:=</a> value ]
--   </pre>
setTestConfigTestQuiet :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “<tt>test_undefined</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testUndefined
--   </pre>
getTestConfigTestUndefined :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_undefined</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testUndefined <a>:=</a> value ]
--   </pre>
setTestConfigTestUndefined :: MonadIO m => TestConfig -> Bool -> m ()

-- | Get the value of the “<tt>test_verbose</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testConfig #testVerbose
--   </pre>
getTestConfigTestVerbose :: MonadIO m => TestConfig -> m Bool

-- | Set the value of the “<tt>test_verbose</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testConfig [ #testVerbose <a>:=</a> value ]
--   </pre>
setTestConfigTestVerbose :: MonadIO m => TestConfig -> Bool -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TestConfig.TestConfig
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestConfig.TestConfig
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


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.TestLogBuffer

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

-- | Construct a <a>TestLogBuffer</a> 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 GHC.Classes.Eq GI.GLib.Structs.TestLogBuffer.TestLogBuffer
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestLogBuffer.TestLogBuffer
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


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Structs.TestLogMsg

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

-- | Construct a <a>TestLogMsg</a> 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 “<tt>log_type</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testLogMsg #logType
--   </pre>
getTestLogMsgLogType :: MonadIO m => TestLogMsg -> m TestLogType

-- | Set the value of the “<tt>log_type</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testLogMsg [ #logType <a>:=</a> value ]
--   </pre>
setTestLogMsgLogType :: MonadIO m => TestLogMsg -> TestLogType -> m ()

-- | Get the value of the “<tt>n_nums</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testLogMsg #nNums
--   </pre>
getTestLogMsgNNums :: MonadIO m => TestLogMsg -> m Word32

-- | Set the value of the “<tt>n_nums</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testLogMsg [ #nNums <a>:=</a> value ]
--   </pre>
setTestLogMsgNNums :: MonadIO m => TestLogMsg -> Word32 -> m ()

-- | Get the value of the “<tt>n_strings</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testLogMsg #nStrings
--   </pre>
getTestLogMsgNStrings :: MonadIO m => TestLogMsg -> m Word32

-- | Set the value of the “<tt>n_strings</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testLogMsg [ #nStrings <a>:=</a> value ]
--   </pre>
setTestLogMsgNStrings :: MonadIO m => TestLogMsg -> Word32 -> m ()

-- | Set the value of the “<tt>strings</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #strings
--   </pre>
clearTestLogMsgStrings :: MonadIO m => TestLogMsg -> m ()

-- | Get the value of the “<tt>strings</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testLogMsg #strings
--   </pre>
getTestLogMsgStrings :: MonadIO m => TestLogMsg -> m (Maybe Text)

-- | Set the value of the “<tt>strings</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> testLogMsg [ #strings <a>:=</a> value ]
--   </pre>
setTestLogMsgStrings :: MonadIO m => TestLogMsg -> CString -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TestLogMsg.TestLogMsg
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TestLogMsg.TestLogMsg
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


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

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

-- | Adds <i><tt>testCase</tt></i> to <i><tt>suite</tt></i>.
--   
--   <i>Since: 2.16</i>
testSuiteAdd :: (HasCallStack, MonadIO m) => TestSuite -> TestCase -> m ()

-- | Adds <i><tt>nestedsuite</tt></i> to <i><tt>suite</tt></i>.
--   
--   <i>Since: 2.16</i>
testSuiteAddSuite :: (HasCallStack, MonadIO m) => TestSuite -> TestSuite -> m ()

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


-- | Represents a precise time, with seconds and microseconds.
--   
--   Similar to the struct timeval returned by the <tt>gettimeofday()</tt>
--   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
--   <tt>glong</tt> for <tt>tv_sec</tt> is that on 32-bit systems
--   <tt>GTimeVal</tt> is subject to the year 2038 problem.
module GI.GLib.Structs.TimeVal

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

-- | Construct a <a>TimeVal</a> struct initialized to zero.
newZeroTimeVal :: MonadIO m => m TimeVal

-- | Adds the given number of microseconds to <i><tt>time_</tt></i>.
--   <i><tt>microseconds</tt></i> can also be negative to decrease the
--   value of <i><tt>time_</tt></i>.

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <tt>guint64</tt> for representing microseconds
--   since the epoch, or use <a>DateTime</a>.</i>
timeValAdd :: (HasCallStack, MonadIO m) => TimeVal -> CLong -> m ()

-- | Converts a string containing an ISO 8601 encoded date and time to a
--   <a>TimeVal</a> and puts it into <i><tt>time_</tt></i>.
--   
--   <i><tt>isoDate</tt></i> 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 <i><tt>isoDate</tt></i> is ignored.
--   
--   This function was deprecated, along with <a>TimeVal</a> itself, in
--   GLib 2.62. Equivalent functionality is available using code like: &gt;
--   &gt;GDateTime *dt = g_date_time_new_from_iso8601 (iso8601_string,
--   NULL); &gt;gint64 time_val = g_date_time_to_unix (dt);
--   &gt;g_date_time_unref (dt);
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>dateTimeNewFromIso8601</a> instead.</i>
timeValFromIso8601 :: (HasCallStack, MonadIO m) => Text -> m (Bool, TimeVal)

-- | Converts <i><tt>time_</tt></i> 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
--   <i><tt>tvUsec</tt></i> 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 <a>RFC
--   3339</a>, and to either of the two most-precise formats defined by the
--   W3C Note <a>Date and Time Formats</a>. Both of these documents are
--   profiles of ISO 8601.
--   
--   Use <a>dateTimeFormat</a> or <tt><i>g_strdup_printf()</i></tt> if a
--   different variation of ISO 8601 format is required.
--   
--   If <i><tt>time_</tt></i> represents a date which is too large to fit
--   into a <tt>struct tm</tt>, <a>Nothing</a> will be returned. This is
--   platform dependent. Note also that since <tt>GTimeVal</tt> stores the
--   number of seconds as a <tt>glong</tt>, 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: &gt;
--   &gt;GDateTime *dt = g_date_time_new_from_unix_utc (time_val);
--   &gt;iso8601_string = g_date_time_format_iso8601 (dt);
--   &gt;g_date_time_unref (dt);
--   
--   The return value of <a>timeValToIso8601</a> has been nullable since
--   GLib 2.54; before then, GLib would crash under the same conditions.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use g_date_time_format_iso8601(dt) instead.</i>
timeValToIso8601 :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe Text)

-- | Get the value of the “<tt>tv_sec</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> timeVal #tvSec
--   </pre>
getTimeValTvSec :: MonadIO m => TimeVal -> m CLong

-- | Set the value of the “<tt>tv_sec</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> timeVal [ #tvSec <a>:=</a> value ]
--   </pre>
setTimeValTvSec :: MonadIO m => TimeVal -> CLong -> m ()

-- | Get the value of the “<tt>tv_usec</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> timeVal #tvUsec
--   </pre>
getTimeValTvUsec :: MonadIO m => TimeVal -> m CLong

-- | Set the value of the “<tt>tv_usec</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> timeVal [ #tvUsec <a>:=</a> value ]
--   </pre>
setTimeValTvUsec :: MonadIO m => TimeVal -> CLong -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TimeVal.TimeVal
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TimeVal.TimeVal
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


-- | <tt>GDate</tt> is a struct for calendrical calculations.
--   
--   The <tt>GDate</tt> 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 <a>dateSetParse</a> only parses
--   up to the year 8000 or so - just count on "a few thousand").
--   <tt>GDate</tt> 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. <tt>GDate</tt> does not store time information; it
--   represents a day.
--   
--   The <tt>GDate</tt> 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 <a>Date</a> the fixed
--   day is January 1, 1 AD. ("Julian" dates in the <a>Date</a> 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).
--   
--   <tt>GDate</tt> is simple to use. First you need a "blank" date; you
--   can get a dynamically allocated date from <a>dateNew</a>, or you can
--   declare an automatic variable or array and initialize it by calling
--   <a>dateClear</a>. A cleared date is safe; it's safe to call
--   <a>dateSetDmy</a> 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 <a>dateValid</a> predicate.
--   <a>dateValid</a> is also used to check for errors with
--   <a>dateSetParse</a> and other functions that can fail. Dates can be
--   invalidated by calling <a>dateClear</a> again.
--   
--   It is very important to use the API to access the <tt>GDate</tt>
--   struct. Often only the day-month-year or only the Julian
--   representation is valid. Sometimes neither is valid. Use the API.
--   
--   GLib also features <tt>GDateTime</tt> which represents a precise time.
module GI.GLib.Structs.Date

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

-- | Construct a <a>Date</a> 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 <i><tt>date</tt></i> is prior to <i><tt>minDate</tt></i>, sets
--   <i><tt>date</tt></i> equal to <i><tt>minDate</tt></i>. If
--   <i><tt>date</tt></i> falls after <i><tt>maxDate</tt></i>, sets
--   <i><tt>date</tt></i> equal to <i><tt>maxDate</tt></i>. Otherwise,
--   <i><tt>date</tt></i> is unchanged. Either of <i><tt>minDate</tt></i>
--   and <i><tt>maxDate</tt></i> may be <a>Nothing</a>. All
--   non-<a>Nothing</a> dates must be valid.
dateClamp :: (HasCallStack, MonadIO m) => Date -> Date -> Date -> m ()

-- | Initializes one or more <a>Date</a> 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 <a>dateValid</a>.
dateClear :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | <tt><i>qsort()</i></tt>-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 <a>dateValid</a>), the invalid state will be copied
--   as is into the new object.
--   
--   <i>Since: 2.56</i>
dateCopy :: (HasCallStack, MonadIO m) => Date -> m Date

-- | Computes the number of days between two dates. If
--   <i><tt>date2</tt></i> is prior to <i><tt>date1</tt></i>, the returned
--   value is negative. Both dates must be valid.
dateDaysBetween :: (HasCallStack, MonadIO m) => Date -> Date -> m Int32

-- | Frees a <a>Date</a> returned from <a>dateNew</a>.
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.
--   
--   <i>Since: 2.6</i>
dateGetIso8601WeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the Julian day or "serial number" of the <a>Date</a>. The
--   Julian day is simply the number of days since January 1, Year 1; i.e.,
--   January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,
--   etc. The date must be valid.
dateGetJulian :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the week of the year, where weeks are understood to start on
--   Monday. If the date is before the first Monday of the year, return 0.
--   The date must be valid.
dateGetMondayWeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the number of weeks in the year, where weeks are taken to
--   start on Monday. Will be 52 or 53. The date must be valid. (Years
--   always have 52 7-day periods, plus 1 or 2 extra days depending on
--   whether it's a leap year. This function is basically telling you how
--   many Mondays are in the year, i.e. there are 53 Mondays if one of the
--   extra days happens to be a Monday.)
dateGetMondayWeeksInYear :: (HasCallStack, MonadIO m) => Word16 -> m Word8

-- | Returns the month of the year. The date must be valid.
dateGetMonth :: (HasCallStack, MonadIO m) => Date -> m DateMonth

-- | Returns the week of the year during which this date falls, if weeks
--   are understood to begin on Sunday. The date must be valid. Can return
--   0 if the day is before the first Sunday of the year.
dateGetSundayWeekOfYear :: (HasCallStack, MonadIO m) => Date -> m Word32

-- | Returns the number of weeks in the year, where weeks are taken to
--   start on Sunday. Will be 52 or 53. The date must be valid. (Years
--   always have 52 7-day periods, plus 1 or 2 extra days depending on
--   whether it's a leap year. This function is basically telling you how
--   many Sundays are in the year, i.e. there are 53 Sundays if one of the
--   extra days happens to be a Sunday.)
dateGetSundayWeeksInYear :: (HasCallStack, MonadIO m) => Word16 -> m Word8

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

-- | Returns the year of a <a>Date</a>. The date must be valid.
dateGetYear :: (HasCallStack, MonadIO m) => Date -> m Word16

-- | Returns <a>True</a> if the date is on the first of a month. The date
--   must be valid.
dateIsFirstOfMonth :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns <a>True</a> if the date is the last day of the month. The date
--   must be valid.
dateIsLastOfMonth :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns <a>True</a> 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 <a>Date</a> and initializes it to a safe state. The new
--   date will be cleared (as if you'd called <a>dateClear</a>) but invalid
--   (it won't represent an existing day). Free the return value with
--   <a>dateFree</a>.
dateNew :: (HasCallStack, MonadIO m) => m Date

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

-- | Create a new <a>Date</a> representing the given Julian date.
--   
--   The <i><tt>julianDay</tt></i> you pass in must be valid. Use
--   <a>dateValidJulian</a> if needed to validate it. The returned
--   <a>Date</a> is guaranteed to be non-<a>Nothing</a> and valid.
dateNewJulian :: (HasCallStack, MonadIO m) => Word32 -> m Date

-- | Checks if <i><tt>date1</tt></i> is less than or equal to
--   <i><tt>date2</tt></i>, 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 <a>Date</a>. 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 <a>Date</a> from a day, month, and year. The
--   day-month-year triplet must be valid; if you aren't sure it is, call
--   <a>dateValidDmy</a> to check before you set it.
dateSetDmy :: (HasCallStack, MonadIO m) => Date -> Word8 -> DateMonth -> Word16 -> m ()

-- | Sets the value of a <a>Date</a> from a Julian day number.
dateSetJulian :: (HasCallStack, MonadIO m) => Date -> Word32 -> m ()

-- | Sets the month of the year for a <a>Date</a>. 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 <i><tt>str</tt></i>, and try to figure
--   out what date it represents, taking the [current locale][setlocale]
--   into account. If the string is successfully parsed, the date will be
--   valid after the call. Otherwise, it will be invalid. You should check
--   using <a>dateValid</a> 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 <tt><i>GTime</i></tt> value. The time
--   to date conversion is done using the user's current timezone.

-- | <i>Deprecated: (Since version 2.10)Use <a>dateSetTimeT</a>
--   instead.</i>
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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   time_t now = time (NULL);
--   if (now == (time_t) -1)
--     // handle the error
--   g_date_set_time_t (date, now);
--   </pre>
--   
--   <i>Since: 2.10</i>
dateSetTimeT :: (HasCallStack, MonadIO m) => Date -> CLong -> m ()

-- | Sets the value of a date from a <a>TimeVal</a> value. Note that the
--   <i><tt>tvUsec</tt></i> member is ignored, because <a>Date</a> can't
--   make use of the additional precision.
--   
--   The time to date conversion is done using the user's current timezone.
--   
--   <i>Since: 2.10</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>dateSetTimeT</a> instead.</i>
dateSetTimeVal :: (HasCallStack, MonadIO m) => Date -> TimeVal -> m ()

-- | Sets the year for a <a>Date</a>. If the resulting day-month-year
--   triplet is invalid, the date will be invalid.
dateSetYear :: (HasCallStack, MonadIO m) => Date -> Word16 -> m ()

-- | Generates a printed representation of the date, in a
--   [locale][setlocale]-specific way. Works just like the platform's C
--   library <tt><i>strftime()</i></tt> function, but only accepts
--   date-related formats; time-related formats give undefined results.
--   Date must be valid. Unlike <tt><i>strftime()</i></tt> (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 <a>dateStrftime</a> would make the %F provided by
--   the C99 <tt><i>strftime()</i></tt> 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
--   <i><tt>date</tt></i> value. Initializes the non-date parts with
--   something safe but meaningless.
dateToStructTm :: (HasCallStack, MonadIO m) => Date -> Ptr () -> m ()

-- | Returns <a>True</a> if the <a>Date</a> represents an existing day. The
--   date must not contain garbage; it should have been initialized with
--   <a>dateClear</a> if it wasn't allocated by one of the <a>dateNew</a>
--   variants.
dateValid :: (HasCallStack, MonadIO m) => Date -> m Bool

-- | Returns <a>True</a> 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 <a>True</a> if the day-month-year triplet forms a valid,
--   existing day in the range of days <a>Date</a> 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 <a>True</a> 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 <a>True</a> if the month value is valid. The 12
--   <a>DateMonth</a> enumeration values are the only valid months.
dateValidMonth :: (HasCallStack, MonadIO m) => DateMonth -> m Bool

-- | Returns <a>True</a> if the weekday is valid. The seven
--   <a>DateWeekday</a> enumeration values are the only valid weekdays.
dateValidWeekday :: (HasCallStack, MonadIO m) => DateWeekday -> m Bool

-- | Returns <a>True</a> if the year is valid. Any year greater than 0 is
--   valid, though there is a 16-bit limit to what <a>Date</a> will
--   understand.
dateValidYear :: (HasCallStack, MonadIO m) => Word16 -> m Bool

-- | Get the value of the “<tt>day</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #day
--   </pre>
getDateDay :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>day</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #day <a>:=</a> value ]
--   </pre>
setDateDay :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “<tt>dmy</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #dmy
--   </pre>
getDateDmy :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>dmy</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #dmy <a>:=</a> value ]
--   </pre>
setDateDmy :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “<tt>julian</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #julian
--   </pre>
getDateJulian :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>julian</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #julian <a>:=</a> value ]
--   </pre>
setDateJulian :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “<tt>julian_days</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #julianDays
--   </pre>
getDateJulianDays :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>julian_days</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #julianDays <a>:=</a> value ]
--   </pre>
setDateJulianDays :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “<tt>month</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #month
--   </pre>
getDateMonth :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>month</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #month <a>:=</a> value ]
--   </pre>
setDateMonth :: MonadIO m => Date -> Word32 -> m ()

-- | Get the value of the “<tt>year</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> date #year
--   </pre>
getDateYear :: MonadIO m => Date -> m Word32

-- | Set the value of the “<tt>year</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> date [ #year <a>:=</a> value ]
--   </pre>
setDateYear :: MonadIO m => Date -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Date.Date
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Date.Date
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Date.Date
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Date.Date
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Date.Date
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Date.Date)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Date.Date tag


-- | A <tt>GTimeZone</tt> represents a time zone, at no particular point in
--   time.
--   
--   The <tt>GTimeZone</tt> struct is refcounted and immutable.
--   
--   Each time zone has an identifier (for example, ‘Europe/London’) which
--   is platform dependent. See <a>timeZoneNew</a> for information on the
--   identifier formats. The identifier of a time zone can be retrieved
--   using <a>timeZoneGetIdentifier</a>.
--   
--   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
--   <a>timeZoneNew</a>.
--   
--   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.
--   
--   <i>Since: 2.26</i>
module GI.GLib.Structs.TimeZone

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

-- | Finds an interval within <i><tt>tz</tt></i> that corresponds to the
--   given <i><tt>time_</tt></i>, possibly adjusting <i><tt>time_</tt></i>
--   if required to fit into an interval. The meaning of
--   <i><tt>time_</tt></i> depends on <i><tt>type</tt></i>.
--   
--   This function is similar to <a>timeZoneFindInterval</a>, with the
--   difference that it always succeeds (by making the adjustments
--   described below).
--   
--   In any of the cases where <a>timeZoneFindInterval</a> succeeds then
--   this function returns the same value, without modifying
--   <i><tt>time_</tt></i>.
--   
--   This function may, however, modify <i><tt>time_</tt></i> in order to
--   deal with non-existent times. If the non-existent local
--   <i><tt>time_</tt></i> of 02:30 were requested on March 14th 2010 in
--   Toronto then this function would adjust <i><tt>time_</tt></i> to be
--   03:00 and return the interval containing the adjusted time.
--   
--   <i>Since: 2.26</i>
timeZoneAdjustTime :: (HasCallStack, MonadIO m) => TimeZone -> TimeType -> Int64 -> m (Int32, Int64)

-- | Finds an interval within <i><tt>tz</tt></i> that corresponds to the
--   given <i><tt>time_</tt></i>. The meaning of <i><tt>time_</tt></i>
--   depends on <i><tt>type</tt></i>.
--   
--   If <i><tt>type</tt></i> is <a>TimeTypeUniversal</a> then this function
--   will always succeed (since universal time is monotonic and
--   continuous).
--   
--   Otherwise <i><tt>time_</tt></i> is treated as local time. The
--   distinction between <a>TimeTypeStandard</a> and
--   <a>TimeTypeDaylight</a> is ignored except in the case that the given
--   <i><tt>time_</tt></i> 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 <i><tt>type</tt></i> 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.
--   
--   <i>Since: 2.26</i>
timeZoneFindInterval :: (HasCallStack, MonadIO m) => TimeZone -> TimeType -> Int64 -> m Int32

-- | Determines the time zone abbreviation to be used during a particular
--   <i><tt>interval</tt></i> of time in the time zone <i><tt>tz</tt></i>.
--   
--   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.
--   
--   <i>Since: 2.26</i>
timeZoneGetAbbreviation :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Text

-- | Get the identifier of this <a>TimeZone</a>, as passed to
--   <a>timeZoneNew</a>. If the identifier passed at construction time was
--   not recognised, <tt>UTC</tt> will be returned. If it was
--   <a>Nothing</a>, 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.
--   
--   <i>Since: 2.58</i>
timeZoneGetIdentifier :: (HasCallStack, MonadIO m) => TimeZone -> m Text

-- | Determines the offset to UTC in effect during a particular
--   <i><tt>interval</tt></i> of time in the time zone <i><tt>tz</tt></i>.
--   
--   The offset is the number of seconds that you add to UTC time to arrive
--   at local time for <i><tt>tz</tt></i> (ie: negative numbers for time
--   zones west of GMT, positive numbers for east).
--   
--   <i>Since: 2.26</i>
timeZoneGetOffset :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Int32

-- | Determines if daylight savings time is in effect during a particular
--   <i><tt>interval</tt></i> of time in the time zone <i><tt>tz</tt></i>.
--   
--   <i>Since: 2.26</i>
timeZoneIsDst :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> m Bool

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

-- | <i>Deprecated: (Since version 2.68)Use <a>timeZoneNewIdentifier</a>
--   instead, as it provides error reporting. Change your code to handle a
--   potentially <a>Nothing</a> return value.</i>
timeZoneNew :: (HasCallStack, MonadIO m) => Maybe Text -> m TimeZone

-- | Creates a <a>TimeZone</a> corresponding to <i><tt>identifier</tt></i>.
--   If <i><tt>identifier</tt></i> cannot be parsed or loaded,
--   <a>Nothing</a> is returned.
--   
--   <i><tt>identifier</tt></i> can either be an RFC3339/ISO 8601 time
--   offset or something that would pass as a valid value for the
--   <tt>TZ</tt> environment variable (including <a>Nothing</a>).
--   
--   In Windows, <i><tt>identifier</tt></i> can also be the unlocalized
--   name of a time zone for standard time, for example "Pacific Standard
--   Time".
--   
--   Valid RFC3339 time offsets are <tt>"Z"</tt> (for UTC) or
--   <tt>"±hh:mm"</tt>. ISO 8601 additionally specifies <tt>"±hhmm"</tt>
--   and <tt>"±hh"</tt>. Offsets are time values to be added to Coordinated
--   Universal Time (UTC) to get the local time.
--   
--   In UNIX, the <tt>TZ</tt> 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 <tt>"[±]hh[[:]mm[:ss]]"</tt>. Dates are either
--   <tt>"Jn"</tt> (Julian day with n between 1 and 365, leap years not
--   counted), <tt>"n"</tt> (zero-based Julian day with n between 0 and
--   365) or <tt>"Mm.w.d"</tt> (day d (0 &lt;= d &lt;= 6) of week w (1
--   &lt;= w &lt;= 5) of month m (1 &lt;= m &lt;= 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).
--   
--   <a>timeZoneNewLocal</a> calls this function with the value of the
--   <tt>TZ</tt> environment variable. This function itself is independent
--   of the value of <tt>TZ</tt>, but if <i><tt>identifier</tt></i> is
--   <a>Nothing</a> then <tt>/etc/localtime</tt> will be consulted to
--   discover the correct time zone on UNIX and the registry will be
--   consulted or <tt><i>GetTimeZoneInformation()</i></tt> will be used to
--   get the local time zone on Windows.
--   
--   If intervals are not available, only time zone rules from <tt>TZ</tt>
--   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 <a>RFC3339 §5.6</a> for a precise definition of valid RFC3339 time
--   offsets (the <tt>time-offset</tt> expansion) and ISO 8601 for the full
--   list of valid time offsets. See <a>The GNU C Library manual</a> for an
--   explanation of the possible values of the <tt>TZ</tt> environment
--   variable. See <a>Microsoft Time Zone Index Values</a> for the list of
--   time zones on Windows.
--   
--   You should release the return value by calling <a>timeZoneUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.68</i>
timeZoneNewIdentifier :: (HasCallStack, MonadIO m) => Maybe Text -> m (Maybe TimeZone)

-- | Creates a <a>TimeZone</a> 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 <a>timeZoneNew</a> with the value of the
--   <tt>TZ</tt> environment variable (including the possibility of
--   <a>Nothing</a>).
--   
--   You should release the return value by calling <a>timeZoneUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
timeZoneNewLocal :: (HasCallStack, MonadIO m) => m TimeZone

-- | Creates a <a>TimeZone</a> corresponding to the given constant offset
--   from UTC, in seconds.
--   
--   This is equivalent to calling <a>timeZoneNew</a> with a string in the
--   form <tt>[+|-]hh[:mm[:ss]]</tt>.
--   
--   It is possible for this function to fail if <i><tt>seconds</tt></i> 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 <a>timeZoneNewIdentifier</a> directly.
--   
--   <i>Since: 2.58</i>
timeZoneNewOffset :: (HasCallStack, MonadIO m) => Int32 -> m TimeZone

-- | Creates a <a>TimeZone</a> corresponding to UTC.
--   
--   This is equivalent to calling <a>timeZoneNew</a> with a value like
--   "Z", "UTC", "+00", etc.
--   
--   You should release the return value by calling <a>timeZoneUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
timeZoneNewUtc :: (HasCallStack, MonadIO m) => m TimeZone

-- | Increases the reference count on <i><tt>tz</tt></i>.
--   
--   <i>Since: 2.26</i>
timeZoneRef :: (HasCallStack, MonadIO m) => TimeZone -> m TimeZone

-- | Decreases the reference count on <i><tt>tz</tt></i>.
--   
--   <i>Since: 2.26</i>
timeZoneUnref :: (HasCallStack, MonadIO m) => TimeZone -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.TimeZone.TimeZone
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.TimeZone.TimeZone)


-- | <tt>GDateTime</tt> is a structure that combines a Gregorian date and
--   time into a single structure.
--   
--   <tt>GDateTime</tt> 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. <tt>GDateTime</tt> follows POSIX time in
--   the sense that it is oblivious to leap seconds.
--   
--   <tt>GDateTime</tt> is an immutable object; once it has been created it
--   cannot be modified further. All modifiers will create a new
--   <tt>GDateTime</tt>. Nearly all such functions can fail due to the date
--   or time going out of range, in which case <a>Nothing</a> will be
--   returned.
--   
--   <tt>GDateTime</tt> is reference counted: the reference count is
--   increased by calling <a>dateTimeRef</a> and decreased by calling
--   <a>dateTimeUnref</a>. When the reference count drops to 0, the
--   resources allocated by the <tt>GDateTime</tt> 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).
--   
--   <i>Since: 2.26</i>
module GI.GLib.Structs.DateTime

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

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   timespan to the copy.
--   
--   <i>Since: 2.26</i>
dateTimeAdd :: (HasCallStack, MonadIO m) => DateTime -> Int64 -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of days to the copy. Add negative values to subtract days.
--   
--   <i>Since: 2.26</i>
dateTimeAddDays :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | Creates a new <a>DateTime</a> adding the specified values to the
--   current date and time in <i><tt>datetime</tt></i>. Add negative values
--   to subtract.
--   
--   <i>Since: 2.26</i>
dateTimeAddFull :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of hours. Add negative values to subtract hours.
--   
--   <i>Since: 2.26</i>
dateTimeAddHours :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> adding the specified number
--   of minutes. Add negative values to subtract minutes.
--   
--   <i>Since: 2.26</i>
dateTimeAddMinutes :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of months to the copy. Add negative values to subtract months.
--   
--   The day of the month of the resulting <a>DateTime</a> 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.
--   
--   <i>Since: 2.26</i>
dateTimeAddMonths :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of seconds. Add negative values to subtract seconds.
--   
--   <i>Since: 2.26</i>
dateTimeAddSeconds :: (HasCallStack, MonadIO m) => DateTime -> Double -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of weeks to the copy. Add negative values to subtract weeks.
--   
--   <i>Since: 2.26</i>
dateTimeAddWeeks :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | Creates a copy of <i><tt>datetime</tt></i> and adds the specified
--   number of years to the copy. Add negative values to subtract years.
--   
--   As with <a>dateTimeAddMonths</a>, if the resulting date would be 29th
--   February on a non-leap year, the day will be clamped to 28th February.
--   
--   <i>Since: 2.26</i>
dateTimeAddYears :: (HasCallStack, MonadIO m) => DateTime -> Int32 -> m (Maybe DateTime)

-- | A comparison function for <tt><i>GDateTimes</i></tt> that is suitable
--   as a <a>CompareFunc</a>. Both <tt><i>GDateTimes</i></tt> must be
--   non-<a>Nothing</a>.
--   
--   <i>Since: 2.26</i>
dateTimeCompare :: (HasCallStack, MonadIO m) => DateTime -> DateTime -> m Int32

-- | Calculates the difference in time between <i><tt>end</tt></i> and
--   <i><tt>begin</tt></i>. The <tt><i>GTimeSpan</i></tt> that is returned
--   is effectively <i><tt>end</tt></i> - <i><tt>begin</tt></i> (ie:
--   positive if the first parameter is larger).
--   
--   <i>Since: 2.26</i>
dateTimeDifference :: (HasCallStack, MonadIO m) => DateTime -> DateTime -> m Int64

-- | Checks to see if <i><tt>dt1</tt></i> and <i><tt>dt2</tt></i> are
--   equal.
--   
--   Equal here means that they represent the same moment after converting
--   them to the same time zone.
--   
--   <i>Since: 2.26</i>
dateTimeEqual :: (HasCallStack, MonadIO m) => DateTime -> DateTime -> m Bool

-- | Creates a newly allocated string representing the requested
--   <i><tt>format</tt></i>.
--   
--   The format strings understood by this function are a subset of the
--   <tt>strftime()</tt> format language as specified by C99. The
--   <tt>%D</tt>, <tt>%U</tt> and <tt>%W</tt> conversions are not
--   supported, nor is the <tt>E</tt> modifier. The GNU extensions
--   <tt>%k</tt>, <tt>%l</tt>, <tt>%s</tt> and <tt>%P</tt> are supported,
--   however, as are the <tt>0</tt>, <tt>_</tt> and <tt>-</tt> modifiers.
--   The Python extension <tt>%f</tt> is also supported.
--   
--   In contrast to <tt>strftime()</tt>, 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
--   <tt>strftime()</tt> output exactly.
--   
--   The following format specifiers are supported:
--   
--   <ul>
--   <li><tt>%a</tt>: the abbreviated weekday name according to the current
--   locale</li>
--   <li><tt>%A</tt>: the full weekday name according to the current
--   locale</li>
--   <li><tt>%b</tt>: the abbreviated month name according to the current
--   locale</li>
--   <li><tt>%B</tt>: the full month name according to the current
--   locale</li>
--   <li><tt>%c</tt>: the preferred date and time representation for the
--   current locale</li>
--   <li><tt>%C</tt>: the century number (year/100) as a 2-digit integer
--   (00-99)</li>
--   <li><tt>%d</tt>: the day of the month as a decimal number (range 01 to
--   31)</li>
--   <li><tt>%e</tt>: the day of the month as a decimal number (range 1 to
--   31); single digits are preceded by a figure space (U+2007)</li>
--   <li><tt>%F</tt>: equivalent to <tt>%Y-%m-%d</tt> (the ISO 8601 date
--   format)</li>
--   <li><tt>%g</tt>: the last two digits of the ISO 8601 week-based year
--   as a decimal number (00-99). This works well with <tt>%V</tt> and
--   <tt>%u</tt>.</li>
--   <li><tt>%G</tt>: the ISO 8601 week-based year as a decimal number.
--   This works well with <tt>%V</tt> and <tt>%u</tt>.</li>
--   <li><tt>%h</tt>: equivalent to <tt>%b</tt></li>
--   <li><tt>%H</tt>: the hour as a decimal number using a 24-hour clock
--   (range 00 to 23)</li>
--   <li><tt>%I</tt>: the hour as a decimal number using a 12-hour clock
--   (range 01 to 12)</li>
--   <li><tt>%j</tt>: the day of the year as a decimal number (range 001 to
--   366)</li>
--   <li><tt>%k</tt>: the hour (24-hour clock) as a decimal number (range 0
--   to 23); single digits are preceded by a figure space (U+2007)</li>
--   <li><tt>%l</tt>: the hour (12-hour clock) as a decimal number (range 1
--   to 12); single digits are preceded by a figure space (U+2007)</li>
--   <li><tt>%m</tt>: the month as a decimal number (range 01 to 12)</li>
--   <li><tt>%M</tt>: the minute as a decimal number (range 00 to 59)</li>
--   <li><tt>%f</tt>: the microsecond as a decimal number (range 000000 to
--   999999)</li>
--   <li><tt>%p</tt>: 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
--   <tt>%c</tt> or <tt>%X</tt> instead.</li>
--   <li><tt>%P</tt>: like <tt>%p</tt> 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 <tt>%c</tt> or <tt>%X</tt> instead.</li>
--   <li><tt>%r</tt>: 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 <tt>%c</tt> or <tt>%X</tt> instead.</li>
--   <li><tt>%R</tt>: the time in 24-hour notation (<tt>%H:%M</tt>)</li>
--   <li><tt>%s</tt>: the number of seconds since the Epoch, that is, since
--   1970-01-01 00:00:00 UTC</li>
--   <li><tt>%S</tt>: the second as a decimal number (range 00 to 60)</li>
--   <li><tt>%t</tt>: a tab character</li>
--   <li><tt>%T</tt>: the time in 24-hour notation with seconds
--   (<tt>%H:%M:%S</tt>)</li>
--   <li><tt>%u</tt>: the ISO 8601 standard day of the week as a decimal,
--   range 1 to 7, Monday being 1. This works well with <tt>%G</tt> and
--   <tt>%V</tt>.</li>
--   <li><tt>%V</tt>: 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
--   <a>dateTimeGetWeekOfYear</a>. This works well with <tt>%G</tt> and
--   <tt>%u</tt>.</li>
--   <li><tt>%w</tt>: the day of the week as a decimal, range 0 to 6,
--   Sunday being 0. This is not the ISO 8601 standard format — use
--   <tt>%u</tt> instead.</li>
--   <li><tt>%x</tt>: the preferred date representation for the current
--   locale without the time</li>
--   <li><tt>%X</tt>: the preferred time representation for the current
--   locale without the date</li>
--   <li><tt>%y</tt>: the year as a decimal number without the century</li>
--   <li><tt>%Y</tt>: the year as a decimal number including the
--   century</li>
--   <li><tt>%z</tt>: the time zone as an offset from UTC
--   (<tt>+hhmm</tt>)</li>
--   <li><tt>%:z</tt>: the time zone as an offset from UTC
--   (<tt>+hh:mm</tt>). This is a gnulib <tt>strftime()</tt> extension.
--   Since: 2.38</li>
--   <li><tt>%::z</tt>: the time zone as an offset from UTC
--   (<tt>+hh:mm:ss</tt>). This is a gnulib <tt>strftime()</tt> extension.
--   Since: 2.38</li>
--   <li><tt>%:::z</tt>: the time zone as an offset from UTC, with
--   <tt>:</tt> to necessary precision (e.g., <tt>-04</tt>,
--   <tt>+05:30</tt>). This is a gnulib <tt>strftime()</tt> extension.
--   Since: 2.38</li>
--   <li><tt>%Z</tt>: the time zone or name or abbreviation</li>
--   <li><tt>%%</tt>: a literal <tt>%</tt> character</li>
--   </ul>
--   
--   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:
--   
--   <ul>
--   <li><tt>O</tt>: Use alternative numeric symbols, if the current locale
--   supports those.</li>
--   <li><tt>_</tt>: Pad a numeric result with spaces. This overrides the
--   default padding for the specifier.</li>
--   <li><tt>-</tt>: Do not pad a numeric result. This overrides the
--   default padding for the specifier.</li>
--   <li><tt>0</tt>: Pad a numeric result with zeros. This overrides the
--   default padding for the specifier.</li>
--   </ul>
--   
--   The following modifiers are supported for many of the alphabetic
--   conversions:
--   
--   <ul>
--   <li><tt>^</tt>: Use upper case if possible. This is a gnulib
--   <tt>strftime()</tt> extension. Since: 2.80</li>
--   <li><tt>#</tt>: Use opposite case if possible. This is a gnulib
--   <tt>strftime()</tt> extension. Since: 2.80</li>
--   </ul>
--   
--   Additionally, when <tt>O</tt> is used with <tt>B</tt>, <tt>b</tt>, or
--   <tt>h</tt>, 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. <tt>%OB</tt> is a GNU and BSD
--   <tt>strftime()</tt> extension expected to be added to the future POSIX
--   specification, <tt>%Ob</tt> and <tt>%Oh</tt> are GNU
--   <tt>strftime()</tt> extensions. Since: 2.56
--   
--   Since GLib 2.80, when <tt>E</tt> is used with <tt>%c</tt>,
--   <tt>%C</tt>, <tt>%x</tt>, <tt>%X</tt>, <tt>%y</tt> or <tt>%Y</tt>, 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.
--   
--   <ul>
--   <li><tt>%Ec</tt>: the preferred date and time representation for the
--   current locale, using the alternate era representation</li>
--   <li><tt>%EC</tt>: the name of the era</li>
--   <li><tt>%Ex</tt>: the preferred date representation for the current
--   locale without the time, using the alternate era representation</li>
--   <li><tt>%EX</tt>: the preferred time representation for the current
--   locale without the date, using the alternate era representation</li>
--   <li><tt>%Ey</tt>: the year since the beginning of the era denoted by
--   the <tt>%EC</tt> specifier</li>
--   <li><tt>%EY</tt>: the full alternative year representation</li>
--   </ul>
--   
--   <i>Since: 2.26</i>
dateTimeFormat :: (HasCallStack, MonadIO m) => DateTime -> Text -> m (Maybe Text)

-- | Format <i><tt>datetime</tt></i> in <a>ISO 8601 format</a>, 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.
--   
--   <i>Since: 2.62</i>
dateTimeFormatIso8601 :: (HasCallStack, MonadIO m) => DateTime -> m (Maybe Text)

-- | Retrieves the day of the month represented by <i><tt>datetime</tt></i>
--   in the gregorian calendar.
--   
--   <i>Since: 2.26</i>
dateTimeGetDayOfMonth :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the ISO 8601 day of the week on which
--   <i><tt>datetime</tt></i> falls (1 is Monday, 2 is Tuesday... 7 is
--   Sunday).
--   
--   <i>Since: 2.26</i>
dateTimeGetDayOfWeek :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the day of the year represented by <i><tt>datetime</tt></i>
--   in the Gregorian calendar.
--   
--   <i>Since: 2.26</i>
dateTimeGetDayOfYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the hour of the day represented by <i><tt>datetime</tt></i>
--   
--   <i>Since: 2.26</i>
dateTimeGetHour :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the microsecond of the date represented by
--   <i><tt>datetime</tt></i>
--   
--   <i>Since: 2.26</i>
dateTimeGetMicrosecond :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the minute of the hour represented by
--   <i><tt>datetime</tt></i>
--   
--   <i>Since: 2.26</i>
dateTimeGetMinute :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the month of the year represented by
--   <i><tt>datetime</tt></i> in the Gregorian calendar.
--   
--   <i>Since: 2.26</i>
dateTimeGetMonth :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the second of the minute represented by
--   <i><tt>datetime</tt></i>
--   
--   <i>Since: 2.26</i>
dateTimeGetSecond :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the number of seconds since the start of the last minute,
--   including the fractional part.
--   
--   <i>Since: 2.26</i>
dateTimeGetSeconds :: (HasCallStack, MonadIO m) => DateTime -> m Double

-- | Get the time zone for this <i><tt>datetime</tt></i>.
--   
--   <i>Since: 2.58</i>
dateTimeGetTimezone :: (HasCallStack, MonadIO m) => DateTime -> m TimeZone

-- | Determines the time zone abbreviation to be used at the time and in
--   the time zone of <i><tt>datetime</tt></i>.
--   
--   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.
--   
--   <i>Since: 2.26</i>
dateTimeGetTimezoneAbbreviation :: (HasCallStack, MonadIO m) => DateTime -> m Text

-- | Determines the offset to UTC in effect at the time and in the time
--   zone of <i><tt>datetime</tt></i>.
--   
--   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 <i><tt>datetime</tt></i> represents UTC time, then the offset is
--   always zero.
--   
--   <i>Since: 2.26</i>
dateTimeGetUtcOffset :: (HasCallStack, MonadIO m) => DateTime -> m Int64

-- | Returns the ISO 8601 week-numbering year in which the week containing
--   <i><tt>datetime</tt></i> falls.
--   
--   This function, taken together with <a>dateTimeGetWeekOfYear</a> and
--   <a>dateTimeGetDayOfWeek</a> can be used to determine the full ISO week
--   date on which <i><tt>datetime</tt></i> falls.
--   
--   This is usually equal to the normal Gregorian year (as returned by
--   <a>dateTimeGetYear</a>), 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.
--   
--   <i>Since: 2.26</i>
dateTimeGetWeekNumberingYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Returns the ISO 8601 week number for the week containing
--   <i><tt>datetime</tt></i>. 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.
--   
--   <i>Since: 2.26</i>
dateTimeGetWeekOfYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the year represented by <i><tt>datetime</tt></i> in the
--   Gregorian calendar.
--   
--   <i>Since: 2.26</i>
dateTimeGetYear :: (HasCallStack, MonadIO m) => DateTime -> m Int32

-- | Retrieves the Gregorian day, month, and year of a given
--   <a>DateTime</a>.
--   
--   <i>Since: 2.26</i>
dateTimeGetYmd :: (HasCallStack, MonadIO m) => DateTime -> m (Int32, Int32, Int32)

-- | Hashes <i><tt>datetime</tt></i> into a <tt><i>guint</i></tt>, suitable
--   for use within <a>HashTable</a>.
--   
--   <i>Since: 2.26</i>
dateTimeHash :: (HasCallStack, MonadIO m) => DateTime -> m Word32

-- | Determines if daylight savings time is in effect at the time and in
--   the time zone of <i><tt>datetime</tt></i>.
--   
--   <i>Since: 2.26</i>
dateTimeIsDaylightSavings :: (HasCallStack, MonadIO m) => DateTime -> m Bool

-- | Creates a new <a>DateTime</a> corresponding to the given date and time
--   in the time zone <i><tt>tz</tt></i>.
--   
--   The <i><tt>year</tt></i> must be between 1 and 9999,
--   <i><tt>month</tt></i> between 1 and 12 and <i><tt>day</tt></i> between
--   1 and 28, 29, 30 or 31 depending on the month and the year.
--   
--   <i><tt>hour</tt></i> must be between 0 and 23 and
--   <i><tt>minute</tt></i> must be between 0 and 59.
--   
--   <i><tt>seconds</tt></i> 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 <a>Nothing</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
dateTimeNew :: (HasCallStack, MonadIO m) => TimeZone -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to the given <a>ISO 8601
--   formatted string</a> <i><tt>text</tt></i>. ISO 8601 strings of the
--   form &lt;date&gt;&lt;sep&gt;&lt;time&gt;&lt;tz&gt; are supported, with
--   some extensions from <a>RFC 3339</a> as mentioned below.
--   
--   Note that as <a>DateTime</a> "is oblivious to leap seconds", leap
--   seconds information in an ISO-8601 string will be ignored, so a
--   <tt>23:59:60</tt> time would be parsed as <tt>23:59:59</tt>.
--   
--   &lt;sep&gt; is the separator and can be either 'T', 't' or ' '. The
--   latter two separators are an extension from <a>RFC 3339</a>.
--   
--   &lt;date&gt; is in the form:
--   
--   <ul>
--   <li><tt>YYYY-MM-DD</tt> - Year/month/day, e.g. 2016-08-24.</li>
--   <li><tt>YYYYMMDD</tt> - Same as above without dividers.</li>
--   <li><tt>YYYY-DDD</tt> - Ordinal day where DDD is from 001 to 366, e.g.
--   2016-237.</li>
--   <li><tt>YYYYDDD</tt> - Same as above without dividers.</li>
--   <li><tt>YYYY-Www-D</tt> - Week day where ww is from 01 to 52 and D
--   from 1-7, e.g. 2016-W34-3.</li>
--   <li><tt>YYYYWwwD</tt> - Same as above without dividers.</li>
--   </ul>
--   
--   &lt;time&gt; is in the form:
--   
--   <ul>
--   <li><tt>hh:mm:ss(.sss)</tt> - Hours, minutes, seconds (subseconds),
--   e.g. 22:10:42.123.</li>
--   <li><tt>hhmmss(.sss)</tt> - Same as above without dividers.</li>
--   </ul>
--   
--   &lt;tz&gt; is an optional timezone suffix of the form:
--   
--   <ul>
--   <li><tt>Z</tt> - UTC.</li>
--   <li><tt>+hh:mm</tt> or <tt>-hh:mm</tt> - Offset from UTC in hours and
--   minutes, e.g. +12:00.</li>
--   <li><tt>+hh</tt> or <tt>-hh</tt> - Offset from UTC in hours, e.g.
--   +12.</li>
--   </ul>
--   
--   If the timezone is not provided in <i><tt>text</tt></i> it must be
--   provided in <i><tt>defaultTz</tt></i> (this field is otherwise
--   ignored).
--   
--   This call can fail (returning <a>Nothing</a>) if <i><tt>text</tt></i>
--   is not a valid ISO 8601 formatted string.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.56</i>
dateTimeNewFromIso8601 :: (HasCallStack, MonadIO m) => Text -> Maybe TimeZone -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to the given <a>TimeVal</a>
--   <i><tt>tv</tt></i> in the local time zone.
--   
--   The time contained in a <a>TimeVal</a> 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 <a>Nothing</a>) if <i><tt>tv</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>dateTimeNewFromUnixLocal</a> instead.</i>
dateTimeNewFromTimevalLocal :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to the given <a>TimeVal</a>
--   <i><tt>tv</tt></i> in UTC.
--   
--   The time contained in a <a>TimeVal</a> is always stored in the form of
--   seconds elapsed since 1970-01-01 00:00:00 UTC.
--   
--   This call can fail (returning <a>Nothing</a>) if <i><tt>tv</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>dateTimeNewFromUnixUtc</a> instead.</i>
dateTimeNewFromTimevalUtc :: (HasCallStack, MonadIO m) => TimeVal -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to the given Unix time
--   <i><tt>t</tt></i> 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 <a>Nothing</a>) if <i><tt>t</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
dateTimeNewFromUnixLocal :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

-- | Creates a [struct<i><tt>gLib</tt></i>.DateTime] corresponding to the
--   given Unix time <i><tt>t</tt></i> 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 <tt>NULL</tt>) if <i><tt>t</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.80</i>
dateTimeNewFromUnixLocalUsec :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to the given Unix time
--   <i><tt>t</tt></i> 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 <a>Nothing</a>) if <i><tt>t</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
dateTimeNewFromUnixUtc :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

-- | Creates a [struct<i><tt>gLib</tt></i>.DateTime] corresponding to the
--   given Unix time <i><tt>t</tt></i> 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 <tt>NULL</tt>) if <i><tt>t</tt></i>
--   represents a time outside of the supported range of <a>DateTime</a>.
--   
--   You should release the return value by calling <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.80</i>
dateTimeNewFromUnixUtcUsec :: (HasCallStack, MonadIO m) => Int64 -> m (Maybe DateTime)

-- | Creates a new <a>DateTime</a> corresponding to the given date and time
--   in the local time zone.
--   
--   This call is equivalent to calling <a>dateTimeNew</a> with the time
--   zone returned by <a>timeZoneNewLocal</a>.
--   
--   <i>Since: 2.26</i>
dateTimeNewLocal :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to this exact instant in the
--   given time zone <i><tt>tz</tt></i>. 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 <a>dateTimeUnref</a>
--   when you are done with it.
--   
--   <i>Since: 2.26</i>
dateTimeNewNow :: (HasCallStack, MonadIO m) => TimeZone -> m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to this exact instant in the
--   local time zone.
--   
--   This is equivalent to calling <a>dateTimeNewNow</a> with the time zone
--   returned by <a>timeZoneNewLocal</a>.
--   
--   <i>Since: 2.26</i>
dateTimeNewNowLocal :: (HasCallStack, MonadIO m) => m (Maybe DateTime)

-- | Creates a <a>DateTime</a> corresponding to this exact instant in UTC.
--   
--   This is equivalent to calling <a>dateTimeNewNow</a> with the time zone
--   returned by <a>timeZoneNewUtc</a>.
--   
--   <i>Since: 2.26</i>
dateTimeNewNowUtc :: (HasCallStack, MonadIO m) => m (Maybe DateTime)

-- | Creates a new <a>DateTime</a> corresponding to the given date and time
--   in UTC.
--   
--   This call is equivalent to calling <a>dateTimeNew</a> with the time
--   zone returned by <a>timeZoneNewUtc</a>.
--   
--   <i>Since: 2.26</i>
dateTimeNewUtc :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m (Maybe DateTime)

-- | Atomically increments the reference count of <i><tt>datetime</tt></i>
--   by one.
--   
--   <i>Since: 2.26</i>
dateTimeRef :: (HasCallStack, MonadIO m) => DateTime -> m DateTime

-- | Creates a new <a>DateTime</a> corresponding to the same instant in
--   time as <i><tt>datetime</tt></i>, but in the local time zone.
--   
--   This call is equivalent to calling <a>dateTimeToTimezone</a> with the
--   time zone returned by <a>timeZoneNewLocal</a>.
--   
--   <i>Since: 2.26</i>
dateTimeToLocal :: (HasCallStack, MonadIO m) => DateTime -> m (Maybe DateTime)

-- | Stores the instant in time that <i><tt>datetime</tt></i> represents
--   into <i><tt>tv</tt></i>.
--   
--   The time contained in a <a>TimeVal</a> is always stored in the form of
--   seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time
--   zone associated with <i><tt>datetime</tt></i>.
--   
--   On systems where 'long' is 32bit (ie: all 32bit systems and all
--   Windows systems), a <a>TimeVal</a> is incapable of storing the entire
--   range of values that <a>DateTime</a> is capable of expressing. On
--   those systems, this function returns <a>False</a> to indicate that the
--   time is out of range.
--   
--   On systems where 'long' is 64bit, this function never fails.
--   
--   <i>Since: 2.26</i>

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>dateTimeToUnix</a> instead.</i>
dateTimeToTimeval :: (HasCallStack, MonadIO m) => DateTime -> TimeVal -> m Bool

-- | Create a new <a>DateTime</a> corresponding to the same instant in time
--   as <i><tt>datetime</tt></i>, but in the time zone <i><tt>tz</tt></i>.
--   
--   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).
--   
--   <i>Since: 2.26</i>
dateTimeToTimezone :: (HasCallStack, MonadIO m) => DateTime -> TimeZone -> m (Maybe DateTime)

-- | Gives the Unix time corresponding to <i><tt>datetime</tt></i>,
--   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
--   <i><tt>datetime</tt></i>.
--   
--   <i>Since: 2.26</i>
dateTimeToUnix :: (HasCallStack, MonadIO m) => DateTime -> m Int64

-- | Gives the Unix time corresponding to <i><tt>datetime</tt></i>, 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
--   <i><tt>datetime</tt></i>.
--   
--   <i>Since: 2.80</i>
dateTimeToUnixUsec :: (HasCallStack, MonadIO m) => DateTime -> m Int64

-- | Creates a new <a>DateTime</a> corresponding to the same instant in
--   time as <i><tt>datetime</tt></i>, but in UTC.
--   
--   This call is equivalent to calling <a>dateTimeToTimezone</a> with the
--   time zone returned by <a>timeZoneNewUtc</a>.
--   
--   <i>Since: 2.26</i>
dateTimeToUtc :: (HasCallStack, MonadIO m) => DateTime -> m (Maybe DateTime)

-- | Atomically decrements the reference count of <i><tt>datetime</tt></i>
--   by one.
--   
--   When the reference count reaches zero, the resources allocated by
--   <i><tt>datetime</tt></i> are freed
--   
--   <i>Since: 2.26</i>
dateTimeUnref :: (HasCallStack, MonadIO m) => DateTime -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.DateTime.DateTime
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.DateTime.DateTime)


-- | <tt>GBookmarkFile</tt> 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 <a>Desktop Bookmark
--   Specification</a>.
--   
--   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
--   <tt>&lt;xbel&gt;</tt> root element; each bookmark is stored inside a
--   <tt>&lt;bookmark&gt;</tt> 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 <tt>&lt;metadata&gt;</tt> element, with its owner attribute set to
--   <tt>http://freedesktop.org</tt>, 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: <a>bookmarks.xbel</a>
--   
--   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 <a>bookmarkFileAddApplication</a> or
--   <a>bookmarkFileSetApplicationInfo</a>. If a bookmark has no
--   applications then it won't be dumped when creating the on disk
--   representation, using <a>bookmarkFileToData</a> or
--   <a>bookmarkFileToFile</a>.
--   
--   <i>Since: 2.12</i>
module GI.GLib.Structs.BookmarkFile

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

-- | Adds the application with <i><tt>name</tt></i> and
--   <i><tt>exec</tt></i> to the list of applications that have registered
--   a bookmark for <i><tt>uri</tt></i> into <i><tt>bookmark</tt></i>.
--   
--   Every bookmark inside a <a>BookmarkFile</a> 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 <i><tt>name</tt></i> is <a>Nothing</a>, the name of the application
--   will be the same returned by <a>getApplicationName</a>; if
--   <i><tt>exec</tt></i> is <a>Nothing</a>, the command line will be a
--   composition of the program name as returned by <a>getPrgname</a> 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 <i><tt>name</tt></i> had already registered a bookmark for
--   <i><tt>uri</tt></i> inside <i><tt>bookmark</tt></i>.
--   
--   If no bookmark for <i><tt>uri</tt></i> is found, one is created.
--   
--   <i>Since: 2.12</i>
bookmarkFileAddApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Maybe Text -> m ()

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

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

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

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

-- | Gets the time the bookmark for <i><tt>uri</tt></i> was added to
--   <i><tt>bookmark</tt></i>
--   
--   In the event the URI cannot be found, -1 is returned and
--   <i><tt>error</tt></i> is set to <a>BookmarkFileErrorUriNotFound</a>.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileGetAddedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileGetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

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

-- | Gets the registration information of <i><tt>appName</tt></i> for the
--   bookmark for <i><tt>uri</tt></i>. See
--   <a>bookmarkFileSetApplicationInfo</a> for more information about the
--   returned data.
--   
--   The string returned in <i><tt>appExec</tt></i> must be freed.
--   
--   In the event the URI cannot be found, <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to <a>BookmarkFileErrorUriNotFound</a>.
--   In the event that no application with name <i><tt>appName</tt></i> has
--   registered a bookmark for <i><tt>uri</tt></i>, <a>False</a> is
--   returned and error is set to <a>BookmarkFileErrorAppNotRegistered</a>.
--   In the event that unquoting the command line fails, an error of the
--   <tt><i>G_SHELL_ERROR</i></tt> domain is set and <a>False</a> is
--   returned.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileGetApplicationInfo</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileGetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, CLong)

-- | Gets the registration information of <i><tt>appName</tt></i> for the
--   bookmark for <i><tt>uri</tt></i>. See
--   <a>bookmarkFileSetApplicationInfo</a> for more information about the
--   returned data.
--   
--   The string returned in <i><tt>appExec</tt></i> must be freed.
--   
--   In the event the URI cannot be found, <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to <a>BookmarkFileErrorUriNotFound</a>.
--   In the event that no application with name <i><tt>appName</tt></i> has
--   registered a bookmark for <i><tt>uri</tt></i>, <a>False</a> is
--   returned and error is set to <a>BookmarkFileErrorAppNotRegistered</a>.
--   In the event that unquoting the command line fails, an error of the
--   <tt><i>G_SHELL_ERROR</i></tt> domain is set and <a>False</a> is
--   returned.
--   
--   <i>Since: 2.66</i>
bookmarkFileGetApplicationInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, DateTime)

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

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

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

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

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

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

-- | Gets the time when the bookmark for <i><tt>uri</tt></i> was last
--   modified.
--   
--   In the event the URI cannot be found, -1 is returned and
--   <i><tt>error</tt></i> is set to <a>BookmarkFileErrorUriNotFound</a>.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileGetModifiedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileGetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

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

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

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

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

-- | Gets the time the bookmark for <i><tt>uri</tt></i> was last visited.
--   
--   In the event the URI cannot be found, -1 is returned and
--   <i><tt>error</tt></i> is set to <a>BookmarkFileErrorUriNotFound</a>.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileGetVisitedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileGetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong

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

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

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

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

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

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

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

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

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

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

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

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

-- | Sets the time the bookmark for <i><tt>uri</tt></i> was added into
--   <i><tt>bookmark</tt></i>.
--   
--   If no bookmark for <i><tt>uri</tt></i> is found then it is created.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileSetAddedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileSetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | Sets the time the bookmark for <i><tt>uri</tt></i> was added into
--   <i><tt>bookmark</tt></i>.
--   
--   If no bookmark for <i><tt>uri</tt></i> is found then it is created.
--   
--   <i>Since: 2.66</i>
bookmarkFileSetAddedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> m ()

-- | Sets the meta-data of application <i><tt>name</tt></i> inside the list
--   of applications that have registered a bookmark for
--   <i><tt>uri</tt></i> inside <i><tt>bookmark</tt></i>.
--   
--   You should rarely use this function; use
--   <a>bookmarkFileAddApplication</a> and
--   <a>bookmarkFileRemoveApplication</a> instead.
--   
--   <i><tt>name</tt></i> can be any UTF-8 encoded string used to identify
--   an application. <i><tt>exec</tt></i> 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
--   <a>bookmarkFileGetApplicationInfo</a> function. <i><tt>count</tt></i>
--   is the number of times the application has registered the bookmark; if
--   is &lt; 0, the current registration count will be increased by one, if
--   is 0, the application with <i><tt>name</tt></i> will be removed from
--   the list of registered applications. <i><tt>stamp</tt></i> 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 <i><tt>uri</tt></i> is found,
--   <a>False</a> is returned and <i><tt>error</tt></i> is set to
--   <a>BookmarkFileErrorUriNotFound</a>; similarly, in the event that no
--   application <i><tt>name</tt></i> has registered a bookmark for
--   <i><tt>uri</tt></i>, <a>False</a> is returned and error is set to
--   <a>BookmarkFileErrorAppNotRegistered</a>. Otherwise, if no bookmark
--   for <i><tt>uri</tt></i> is found, one is created.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileSetApplicationInfo</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileSetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> CLong -> m ()

-- | Sets the meta-data of application <i><tt>name</tt></i> inside the list
--   of applications that have registered a bookmark for
--   <i><tt>uri</tt></i> inside <i><tt>bookmark</tt></i>.
--   
--   You should rarely use this function; use
--   <a>bookmarkFileAddApplication</a> and
--   <a>bookmarkFileRemoveApplication</a> instead.
--   
--   <i><tt>name</tt></i> can be any UTF-8 encoded string used to identify
--   an application. <i><tt>exec</tt></i> 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
--   <a>bookmarkFileGetApplicationInfo</a> function. <i><tt>count</tt></i>
--   is the number of times the application has registered the bookmark; if
--   is &lt; 0, the current registration count will be increased by one, if
--   is 0, the application with <i><tt>name</tt></i> will be removed from
--   the list of registered applications. <i><tt>stamp</tt></i> 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 <i><tt>uri</tt></i> is found,
--   <a>False</a> is returned and <i><tt>error</tt></i> is set to
--   <a>BookmarkFileErrorUriNotFound</a>; similarly, in the event that no
--   application <i><tt>name</tt></i> has registered a bookmark for
--   <i><tt>uri</tt></i>, <a>False</a> is returned and error is set to
--   <a>BookmarkFileErrorAppNotRegistered</a>. Otherwise, if no bookmark
--   for <i><tt>uri</tt></i> is found, one is created.
--   
--   <i>Since: 2.66</i>
bookmarkFileSetApplicationInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> Maybe DateTime -> m ()

-- | Sets <i><tt>description</tt></i> as the description of the bookmark
--   for <i><tt>uri</tt></i>.
--   
--   If <i><tt>uri</tt></i> is <a>Nothing</a>, the description of
--   <i><tt>bookmark</tt></i> is set.
--   
--   If a bookmark for <i><tt>uri</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetDescription :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()

-- | Sets a list of group names for the item with URI <i><tt>uri</tt></i>.
--   Each previously set group name list is removed.
--   
--   If <i><tt>uri</tt></i> cannot be found then an item for it is created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetGroups :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe [Text] -> m ()

-- | Sets the icon for the bookmark for <i><tt>uri</tt></i>. If
--   <i><tt>href</tt></i> is <a>Nothing</a>, unsets the currently set icon.
--   <i><tt>href</tt></i> can either be a full URL for the icon file or the
--   icon name following the Icon Naming specification.
--   
--   If no bookmark for <i><tt>uri</tt></i> is found one is created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetIcon :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Text -> m ()

-- | Sets the private flag of the bookmark for <i><tt>uri</tt></i>.
--   
--   If a bookmark for <i><tt>uri</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetIsPrivate :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Bool -> m ()

-- | Sets <i><tt>mimeType</tt></i> as the MIME type of the bookmark for
--   <i><tt>uri</tt></i>.
--   
--   If a bookmark for <i><tt>uri</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetMimeType :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()

-- | Sets the last time the bookmark for <i><tt>uri</tt></i> was last
--   modified.
--   
--   If no bookmark for <i><tt>uri</tt></i> 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 <a>BookmarkFile</a> that
--   modifies a bookmark also changes the modification time, except for
--   <a>bookmarkFileSetVisitedDateTime</a>.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileSetModifiedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileSetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | Sets the last time the bookmark for <i><tt>uri</tt></i> was last
--   modified.
--   
--   If no bookmark for <i><tt>uri</tt></i> 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 <a>BookmarkFile</a> that
--   modifies a bookmark also changes the modification time, except for
--   <a>bookmarkFileSetVisitedDateTime</a>.
--   
--   <i>Since: 2.66</i>
bookmarkFileSetModifiedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> m ()

-- | Sets <i><tt>title</tt></i> as the title of the bookmark for
--   <i><tt>uri</tt></i> inside the bookmark file <i><tt>bookmark</tt></i>.
--   
--   If <i><tt>uri</tt></i> is <a>Nothing</a>, the title of
--   <i><tt>bookmark</tt></i> is set.
--   
--   If a bookmark for <i><tt>uri</tt></i> cannot be found then it is
--   created.
--   
--   <i>Since: 2.12</i>
bookmarkFileSetTitle :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()

-- | Sets the time the bookmark for <i><tt>uri</tt></i> was last visited.
--   
--   If no bookmark for <i><tt>uri</tt></i> 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
--   <a>bookmarkFileGetApplicationInfo</a> or by the default application
--   for the bookmark's MIME type, retrieved using
--   <a>bookmarkFileGetMimeType</a>. Changing the "visited" time does not
--   affect the "modified" time.
--   
--   <i>Since: 2.12</i>

-- | <i>Deprecated: (Since version 2.66)Use
--   <a>bookmarkFileSetVisitedDateTime</a> instead, as <tt>time_t</tt> is
--   deprecated due to the year 2038 problem.</i>
bookmarkFileSetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()

-- | Sets the time the bookmark for <i><tt>uri</tt></i> was last visited.
--   
--   If no bookmark for <i><tt>uri</tt></i> 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
--   <a>bookmarkFileGetApplicationInfo</a> or by the default application
--   for the bookmark's MIME type, retrieved using
--   <a>bookmarkFileGetMimeType</a>. Changing the "visited" time does not
--   affect the "modified" time.
--   
--   <i>Since: 2.66</i>
bookmarkFileSetVisitedDateTime :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> DateTime -> m ()

-- | This function outputs <i><tt>bookmark</tt></i> as a string.
--   
--   <i>Since: 2.12</i>
bookmarkFileToData :: (HasCallStack, MonadIO m) => BookmarkFile -> m ByteString

-- | This function outputs <i><tt>bookmark</tt></i> into a file. The write
--   process is guaranteed to be atomic by using <a>fileSetContents</a>
--   internally.
--   
--   <i>Since: 2.12</i>
bookmarkFileToFile :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.BookmarkFile.BookmarkFile
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.BookmarkFile.BookmarkFile)


-- | <tt>GTimer</tt> 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 <tt>GTimer</tt> 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
--   <a>timerStop</a>. <a>timerStop</a> must be called before using this
--   function.
--   
--   <i>Since: 2.4</i>
timerContinue :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Destroys a timer, freeing associated resources.
timerDestroy :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | If <i><tt>timer</tt></i> has been started but not stopped, obtains the
--   time since the timer was started. If <i><tt>timer</tt></i> 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
--   <i><tt>microseconds</tt></i> out parameter is essentially useless.
timerElapsed :: (HasCallStack, MonadIO m) => Timer -> CULong -> m Double

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

-- | This function is useless; it's fine to call <a>timerStart</a> on an
--   already-started timer to reset the start time, so <a>timerReset</a>
--   serves no purpose.
timerReset :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Marks a start time, so that future calls to <a>timerElapsed</a> will
--   report the time since <a>timerStart</a> was called.
--   <tt><i>g_timer_new()</i></tt> automatically marks the start time, so
--   no need to call <a>timerStart</a> immediately after creating the
--   timer.
timerStart :: (HasCallStack, MonadIO m) => Timer -> m ()

-- | Marks an end time, so calls to <a>timerElapsed</a> will return the
--   difference between this end time and the start time.
timerStop :: (HasCallStack, MonadIO m) => Timer -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Timer.Timer
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Timer.Timer
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Timer.Timer


-- | A <tt>GTrashStack</tt> 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 <tt>gpointer</tt>. 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 <tt>GTrashStack</tt>. A <tt>NULL</tt>
--   <tt>GTrashStack*</tt> is a perfectly valid empty stack.
--   
--   Each piece of memory that is pushed onto the stack is cast to a
--   <tt>GTrashStack*</tt>.
--   
--   There is no longer any good reason to use <tt>GTrashStack</tt>. If you
--   have extra pieces of memory, <tt>free()</tt> them and allocate them
--   again later.
module GI.GLib.Structs.TrashStack

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

-- | Construct a <a>TrashStack</a> struct initialized to zero.
newZeroTrashStack :: MonadIO m => m TrashStack

-- | Returns the height of a <a>TrashStack</a>.
--   
--   Note that execution of this function is of O(N) complexity where N
--   denotes the number of items on the stack.

-- | <i>Deprecated: (Since version 2.48)t<a>TrashStack</a> is deprecated
--   without replacement</i>
trashStackHeight :: (HasCallStack, MonadIO m) => TrashStack -> m Word32

-- | Returns the element at the top of a <a>TrashStack</a> which may be
--   <a>Nothing</a>.

-- | <i>Deprecated: (Since version 2.48)t<a>TrashStack</a> is deprecated
--   without replacement</i>
trashStackPeek :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())

-- | Pops a piece of memory off a <a>TrashStack</a>.

-- | <i>Deprecated: (Since version 2.48)t<a>TrashStack</a> is deprecated
--   without replacement</i>
trashStackPop :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())

-- | Pushes a piece of memory onto a <a>TrashStack</a>.

-- | <i>Deprecated: (Since version 2.48)t<a>TrashStack</a> is deprecated
--   without replacement</i>
trashStackPush :: (HasCallStack, MonadIO m) => TrashStack -> Ptr () -> m ()

-- | Set the value of the “<tt>next</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #next
--   </pre>
clearTrashStackNext :: MonadIO m => TrashStack -> m ()

-- | Get the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> trashStack #next
--   </pre>
getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack)

-- | Set the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> trashStack [ #next <a>:=</a> value ]
--   </pre>
setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.TrashStack.TrashStack
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.TrashStack.TrashStack
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


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

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

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

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

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

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


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

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

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

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

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

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

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

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

-- | Set the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tuples [ #len <a>:=</a> value ]
--   </pre>
setTuplesLen :: MonadIO m => Tuples -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Tuples.Tuples
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Tuples.Tuples
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


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

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

-- | Construct a <a>UnixPipe</a> struct initialized to zero.
newZeroUnixPipe :: MonadIO m => m UnixPipe
instance GHC.Classes.Eq GI.GLib.Structs.UnixPipe.UnixPipe
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.UnixPipe.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


-- | The <tt>GUri</tt> type and related functions can be used to parse URIs
--   into their components, and build valid URIs from individual
--   components.
--   
--   Since <tt>GUri</tt> only represents absolute URIs, all <tt>GUri</tt>s
--   will have a URI scheme, so <a>uriGetScheme</a> will always return a
--   non-<tt>NULL</tt> answer. Likewise, by definition, all URIs have a
--   path component, so <a>uriGetPath</a> will always return a
--   non-<tt>NULL</tt> string (which may be empty).
--   
--   If the URI string has an <a>‘authority’ component</a> (that is, if the
--   scheme is followed by <tt>://</tt> rather than just <tt>:</tt>), then
--   the <tt>GUri</tt> will contain a hostname, and possibly a port and
--   ‘userinfo’. Additionally, depending on how the <tt>GUri</tt> was
--   constructed/parsed (for example, using the
--   <tt>G_URI_FLAGS_HAS_PASSWORD</tt> and
--   <tt>G_URI_FLAGS_HAS_AUTH_PARAMS</tt> flags), the userinfo may be split
--   out into a username, password, and additional authorization-related
--   parameters.
--   
--   Normally, the components of a <tt>GUri</tt> will have all
--   <tt>%</tt>-encoded characters decoded. However, if you construct/parse
--   a <tt>GUri</tt> with <tt>G_URI_FLAGS_ENCODED</tt>, then the
--   <tt>%</tt>-encoding will be preserved instead in the userinfo, path,
--   and query fields (and in the host field if also created with
--   <tt>G_URI_FLAGS_NON_DNS</tt>). 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:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_ENCODED, &amp;err);
--   g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue");
--   </pre>
--   
--   While the default <tt>%</tt>-decoding behaviour would give:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_NONE, &amp;err);
--   g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http://host/path?param=value");
--   </pre>
--   
--   During decoding, if an invalid UTF-8 string is encountered, parsing
--   will fail with an error indicating the bad string location:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fbad%3D%00alue", G_URI_FLAGS_NONE, &amp;err);
--   g_assert_error (err, G_URI_ERROR, G_URI_ERROR_BAD_QUERY);
--   </pre>
--   
--   You should pass <tt>G_URI_FLAGS_ENCODED</tt> or
--   <tt>G_URI_FLAGS_ENCODED_QUERY</tt> if you need to handle that case
--   manually. In particular, if the query string contains <tt>=</tt>
--   characters that are <tt>%</tt>-encoded, you should let
--   [func<i><tt>gLib</tt></i>.Uri.parse_params] do the decoding once of
--   the query.
--   
--   <tt>GUri</tt> is immutable once constructed, and can safely be
--   accessed from multiple threads. Its reference counting is atomic.
--   
--   Note that the scope of <tt>GUri</tt> is to help manipulate URIs in
--   various applications, following <a>RFC 3986</a>. In particular, it
--   doesn't intend to cover web browser needs, and doesn’t implement the
--   <a>WHATWG URL</a> standard. No APIs are provided to help prevent
--   <a>homograph attacks</a>, so <tt>GUri</tt> is not suitable for
--   formatting URIs for display to the user for making security-sensitive
--   decisions.
--   
--   <h2>Relative and absolute URIs</h2>
--   
--   As defined in <a>RFC 3986</a>, 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 <a>in constrast to
--   RFC 3986</a>, 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 <tt>./</tt> rather than <tt>/</tt>.
--   
--   For example, a valid relative reference is <tt>./path?query</tt>,
--   <tt>/?query#fragment</tt> or <tt>//example.com</tt>.
--   
--   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
--   <a>uriParseRelative</a>.
--   
--   For example, a valid absolute URI is <tt>file:///home/bob</tt> or
--   <tt>https://search.com?query=string</tt>.
--   
--   A <tt>GUri</tt> 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.
--   
--   <h2>Parsing URIs</h2>
--   
--   The most minimalist APIs for parsing URIs are
--   [func<i><tt>gLib</tt></i>.Uri.split] and
--   [func<i><tt>gLib</tt></i>.Uri.split_with_user]. These split a URI into
--   its component parts, and return the parts; the difference between the
--   two is that [func<i><tt>gLib</tt></i>.Uri.split] treats the ‘userinfo’
--   component of the URI as a single element, while
--   [func<i><tt>gLib</tt></i>.Uri.split_with_user] can (depending on the
--   [flags<i><tt>gLib</tt></i>.UriFlags] you pass) treat it as containing
--   a username, password, and authentication parameters. Alternatively,
--   [func<i><tt>gLib</tt></i>.Uri.split_network] 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).
--   
--   <ul>
--   <li><i>func<i><tt>gLib</tt></i>.Uri.parse</i> is similar to
--   [func<i><tt>gLib</tt></i>.Uri.split], but instead of returning
--   individual strings, it returns a <tt>GUri</tt> structure (and it
--   requires that the URI be an absolute URI).</li>
--   <li><i>func<i><tt>gLib</tt></i>.Uri.resolve_relative</i> and
--   <a>uriParseRelative</a> allow you to resolve a relative URI relative
--   to a base URI.</li>
--   <li><i>func<i><tt>gLib</tt></i>.Uri.resolve_relative</i> takes two
--   strings and returns a string, and <a>uriParseRelative</a> takes a
--   <tt>GUri</tt> and a string and returns a <tt>GUri</tt>.</li>
--   </ul>
--   
--   All of the parsing functions take a
--   [flags<i><tt>gLib</tt></i>.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
--   [func<i><tt>gLib</tt></i>.Uri.peek_scheme] 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 <tt>G_URI_PARAMS_WWW_FORM</tt> when
--   parsing the params for a web URI, so compare the result of
--   [func<i><tt>gLib</tt></i>.Uri.peek_scheme] against <tt>http</tt> and
--   <tt>https</tt>.
--   
--   <h2>Building URIs</h2>
--   
--   <ul>
--   <li><i>func<i><tt>gLib</tt></i>.Uri.join</i> and
--   [func<i><tt>gLib</tt></i>.Uri.join_with_user] can be used to construct
--   valid URI strings from a set of component strings. They are the
--   inverse of [func<i><tt>gLib</tt></i>.Uri.split] and
--   [func<i><tt>gLib</tt></i>.Uri.split_with_user].</li>
--   </ul>
--   
--   Similarly, [func<i><tt>gLib</tt></i>.Uri.build] and
--   [func<i><tt>gLib</tt></i>.Uri.build_with_user] can be used to
--   construct a <tt>GUri</tt> from a set of component strings.
--   
--   As with the parsing functions, the building functions take a
--   [flags<i><tt>gLib</tt></i>.UriFlags] argument. In particular, it is
--   important to keep in mind whether the URI components you are using are
--   already <tt>%</tt>-encoded. If so, you must pass the
--   <tt>G_URI_FLAGS_ENCODED</tt> flag.
--   
--   <h2><tt>file://</tt> URIs</h2>
--   
--   Note that Windows and Unix both define special rules for parsing
--   <tt>file://</tt> URIs (involving non-UTF-8 character sets on Unix, and
--   the interpretation of path separators on Windows). <tt>GUri</tt> does
--   not implement these rules. Use <a>filenameFromUri</a> and
--   <a>filenameToUri</a> if you want to properly convert between
--   <tt>file://</tt> URIs and local filenames.
--   
--   <h2>URI Equality</h2>
--   
--   Note that there is no <tt>g_uri_equal ()</tt> function, because
--   comparing URIs usefully requires scheme-specific knowledge that
--   <tt>GUri</tt> does not have. <tt>GUri</tt> can help with normalization
--   if you use the various encoded [flags<i><tt>gLib</tt></i>.UriFlags] as
--   well as <tt>G_URI_FLAGS_SCHEME_NORMALIZE</tt> however it is not
--   comprehensive. For example, <tt>data:,foo</tt> and
--   <tt>data:;base64,Zm9v</tt> resolve to the same thing according to the
--   <tt>data:</tt> URI specification which GLib does not handle.
--   
--   <i>Since: 2.66</i>
module GI.GLib.Structs.Uri

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

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

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

-- | <i>No description available in the introspection data.</i>
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
--   <i><tt>reservedCharsAllowed</tt></i> 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 <tt>%</tt><tt>00</tt>.
--   
--   <i>Since: 2.66</i>
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
--   <i><tt>reservedCharsAllowed</tt></i> 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.
--   
--   <i>Since: 2.16</i>
uriEscapeString :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Bool -> m Text

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

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

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

-- | Gets <i><tt>uri</tt></i>'s host. This will never have
--   <tt>%</tt>-encoded characters, unless it is non-UTF-8 (which can only
--   be the case if <i><tt>uri</tt></i> was created with
--   <a>UriFlagsNonDns</a>).
--   
--   If <i><tt>uri</tt></i> 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,
--   <tt>fe80::1234%</tt><tt>em1</tt> (or
--   <tt>fe80::1234%</tt><tt>25em1</tt> if the string is still encoded).
--   
--   <i>Since: 2.66</i>
uriGetHost :: (HasCallStack, MonadIO m) => Uri -> m (Maybe Text)

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

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

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

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

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

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

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

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

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

-- | Parses <i><tt>uriString</tt></i> according to <i><tt>flags</tt></i>.
--   If the result is not a valid <a>absolute URI</a>, it will be
--   discarded, and an error returned.
--   
--   <i>Since: 2.66</i>
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 <a>UriParamsIter</a>.
--   
--   The <i><tt>params</tt></i> string is assumed to still be
--   <tt>%</tt>-encoded, but the returned values will be fully decoded.
--   (Thus it is possible that the returned values may contain <tt>=</tt>
--   or <i><tt>separators</tt></i>, if the value was encoded in the input.)
--   Invalid <tt>%</tt>-encoding is treated as with the
--   <a>UriFlagsParseRelaxed</a> rules for <a>uriParse</a>. (However, if
--   <i><tt>params</tt></i> is the path or query string from a <a>Uri</a>
--   that was parsed without <a>UriFlagsParseRelaxed</a> and
--   <a>UriFlagsEncoded</a>, then you already know that it does not contain
--   any invalid encoding.)
--   
--   <a>UriParamsFlagsWwwForm</a> is handled as documented for
--   <a>uriParamsIterInit</a>.
--   
--   If <a>UriParamsFlagsCaseInsensitive</a> is passed to
--   <i><tt>flags</tt></i>, attributes will be compared case-insensitively,
--   so a params string <tt>attr=123&amp;Attr=456</tt> will only return a
--   single attribute–value pair, <tt>Attr=456</tt>. Case will be preserved
--   in the returned attributes.
--   
--   If <i><tt>params</tt></i> cannot be parsed (for example, it contains
--   two <i><tt>separators</tt></i> characters in a row), then
--   <i><tt>error</tt></i> is set and <a>Nothing</a> is returned.
--   
--   <i>Since: 2.66</i>
uriParseParams :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> [UriParamsFlags] -> m (Map Text Text)

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

-- | Gets the scheme portion of a URI string. <a>RFC 3986</a> decodes the
--   scheme as: &gt; &gt;URI = scheme ":" hier-part [ "?" query ] [ "#"
--   fragment ]
--   
--   Common schemes include <tt>file</tt>, <tt>https</tt>,
--   <tt>svn+ssh</tt>, etc.
--   
--   <i>Since: 2.16</i>
uriParseScheme :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

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

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

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

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

-- | Parses <i><tt>uriRef</tt></i> (which can be an <a>absolute or relative
--   URI</a>) according to <i><tt>flags</tt></i>, and returns the pieces.
--   Any component that doesn't appear in <i><tt>uriRef</tt></i> will be
--   returned as <a>Nothing</a> (but note that all URIs always have a path
--   component, though it may be the empty string).
--   
--   See <a>uriSplit</a>, and the definition of <a>UriFlags</a>, for more
--   information on the effect of <i><tt>flags</tt></i>. Note that
--   <i><tt>password</tt></i> will only be parsed out if
--   <i><tt>flags</tt></i> contains <a>UriFlagsHasPassword</a>, and
--   <i><tt>authParams</tt></i> will only be parsed out if
--   <i><tt>flags</tt></i> contains <a>UriFlagsHasAuthParams</a>.
--   
--   <i>Since: 2.66</i>
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 <i><tt>uri</tt></i>.
--   
--   This is not guaranteed to return a string which is identical to the
--   string that <i><tt>uri</tt></i> was parsed from. However, if the
--   source URI was syntactically correct (according to RFC 3986), and it
--   was parsed with <a>UriFlagsEncoded</a>, then <a>uriToString</a> is
--   guaranteed to return a string which is at least semantically
--   equivalent to the source URI (according to RFC 3986).
--   
--   If <i><tt>uri</tt></i> 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
--   <a>uriToStringPartial</a> to redact parts.
--   
--   <i>Since: 2.66</i>
uriToString :: (HasCallStack, MonadIO m) => Uri -> m Text

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

-- | Unescapes a segment of an escaped string as binary data.
--   
--   Note that in contrast to <a>uriUnescapeString</a>, this does allow nul
--   bytes to appear in the output.
--   
--   If any of the characters in <i><tt>illegalCharacters</tt></i> appears
--   as an escaped character in <i><tt>escapedString</tt></i>, then that is
--   an error and <a>Nothing</a> 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.
--   
--   <i>Since: 2.66</i>
uriUnescapeBytes :: (HasCallStack, MonadIO m) => Text -> Int64 -> Maybe Text -> m Bytes

-- | Unescapes a segment of an escaped string.
--   
--   If any of the characters in <i><tt>illegalCharacters</tt></i> or the
--   NUL character appears as an escaped character in
--   <i><tt>escapedString</tt></i>, then that is an error and
--   <a>Nothing</a> 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: <tt>NUL</tt> byte is not accepted in the output, in contrast to
--   <a>uriUnescapeBytes</a>.
--   
--   <i>Since: 2.16</i>
uriUnescapeSegment :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> Maybe Text -> m (Maybe Text)

-- | Unescapes a whole escaped string.
--   
--   If any of the characters in <i><tt>illegalCharacters</tt></i> or the
--   NUL character appears as an escaped character in
--   <i><tt>escapedString</tt></i>, then that is an error and
--   <a>Nothing</a> 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.
--   
--   <i>Since: 2.16</i>
uriUnescapeString :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m (Maybe Text)
instance GHC.Classes.Eq GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Uri.Uri
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Uri.Uri)


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

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

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

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

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


-- | A type in the [type<i><tt>gLib</tt></i>.Variant] type system.
--   
--   This section introduces the [type<i><tt>gLib</tt></i>.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 <a>D-Bus
--   specification</a>, therefore, provides a significant amount of
--   information that is useful when working with
--   [type<i><tt>gLib</tt></i>.Variant].
--   
--   The first major change with respect to the D-Bus type system is the
--   introduction of maybe (or ‘nullable’) types. Any type in
--   [type<i><tt>gLib</tt></i>.Variant] can be converted to a maybe type,
--   in which case, <tt>nothing</tt> (or <tt>null</tt>) becomes a valid
--   value. Maybe types have been added by introducing the character
--   <tt>m</tt> to type strings.
--   
--   The second major change is that the [type<i><tt>gLib</tt></i>.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
--   [type<i><tt>gLib</tt></i>.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 <tt>*</tt>, <tt>?</tt> and <tt>r</tt> 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, [type<i><tt>gLib</tt></i>.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. [type<i><tt>gLib</tt></i>.Variant]
--   deals with single values directly so
--   [type<i><tt>gLib</tt></i>.Variant] type strings always describe the
--   type of exactly one value. This means that a D-Bus signature string is
--   generally not a valid [type<i><tt>gLib</tt></i>.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,
--   <a>variantGetType</a> will never return an indefinite type, but
--   calling <a>variantIsOfType</a> 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
--   <a>`GtkWidget`</a> can exist (since <tt>GtkWidget</tt> is an abstract
--   class), but a <a>`GtkWindow`</a> can certainly be instantiated, and
--   you would say that a <tt>GtkWindow</tt> is a <tt>GtkWidget</tt> (since
--   <tt>GtkWindow</tt> is a subclass of <tt>GtkWidget</tt>).
--   
--   Two types may not be compared by value; use <a>variantTypeEqual</a> or
--   <a>variantTypeIsSubtypeOf</a> May be copied using
--   <a>variantTypeCopy</a> and freed using <a>variantTypeFree</a>.
--   
--   <h2>GVariant Type Strings</h2>
--   
--   A [type<i><tt>gLib</tt></i>.Variant] type string can be any of the
--   following:
--   
--   <ul>
--   <li>any basic type string (listed below)</li>
--   <li><tt>v</tt>, <tt>r</tt> or <tt>*</tt></li>
--   <li>one of the characters <tt>a</tt> or <tt>m</tt>, followed by
--   another type string</li>
--   <li>the character <tt>(</tt>, followed by a concatenation of zero or
--   more other type strings, followed by the character <tt>)</tt></li>
--   <li>the character <tt>{</tt>, followed by a basic type string (see
--   below), followed by another type string, followed by the character
--   <tt>}</tt></li>
--   </ul>
--   
--   A basic type string describes a basic type (as per
--   <a>variantTypeIsBasic</a>) and is always a single character in length.
--   The valid basic type strings are <tt>b</tt>, <tt>y</tt>, <tt>n</tt>,
--   <tt>q</tt>, <tt>i</tt>, <tt>u</tt>, <tt>x</tt>, <tt>t</tt>,
--   <tt>h</tt>, <tt>d</tt>, <tt>s</tt>, <tt>o</tt>, <tt>g</tt> and
--   <tt>?</tt>.
--   
--   The above definition is recursive to arbitrary depth. <tt>aaaaai</tt>
--   and <tt>(ui(nq((y)))s)</tt> are both valid type strings, as is
--   <tt>a(aa(ui)(qna{ya(yd)}))</tt>. In order to not hit memory limits,
--   [type<i><tt>gLib</tt></i>.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 <a>`GDBusMessage`</a> to be nested in a
--   top-level tuple.
--   
--   The meaning of each of the characters is as follows:
--   
--   <ul>
--   <li><tt>b</tt>: the type string of <tt>G_VARIANT_TYPE_BOOLEAN</tt>; a
--   boolean value.</li>
--   <li><tt>y</tt>: the type string of <tt>G_VARIANT_TYPE_BYTE</tt>; a
--   byte.</li>
--   <li><tt>n</tt>: the type string of <tt>G_VARIANT_TYPE_INT16</tt>; a
--   signed 16 bit integer.</li>
--   <li><tt>q</tt>: the type string of <tt>G_VARIANT_TYPE_UINT16</tt>; an
--   unsigned 16 bit integer.</li>
--   <li><tt>i</tt>: the type string of <tt>G_VARIANT_TYPE_INT32</tt>; a
--   signed 32 bit integer.</li>
--   <li><tt>u</tt>: the type string of <tt>G_VARIANT_TYPE_UINT32</tt>; an
--   unsigned 32 bit integer.</li>
--   <li><tt>x</tt>: the type string of <tt>G_VARIANT_TYPE_INT64</tt>; a
--   signed 64 bit integer.</li>
--   <li><tt>t</tt>: the type string of <tt>G_VARIANT_TYPE_UINT64</tt>; an
--   unsigned 64 bit integer.</li>
--   <li><tt>h</tt>: the type string of <tt>G_VARIANT_TYPE_HANDLE</tt>; 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.</li>
--   <li><tt>d</tt>: the type string of <tt>G_VARIANT_TYPE_DOUBLE</tt>; a
--   double precision floating point value.</li>
--   <li><tt>s</tt>: the type string of <tt>G_VARIANT_TYPE_STRING</tt>; a
--   string.</li>
--   <li><tt>o</tt>: the type string of
--   <tt>G_VARIANT_TYPE_OBJECT_PATH</tt>; a string in the form of a D-Bus
--   object path.</li>
--   <li><tt>g</tt>: the type string of <tt>G_VARIANT_TYPE_SIGNATURE</tt>;
--   a string in the form of a D-Bus type signature.</li>
--   <li><tt>?</tt>: the type string of <tt>G_VARIANT_TYPE_BASIC</tt>; an
--   indefinite type that is a supertype of any of the basic types.</li>
--   <li><tt>v</tt>: the type string of <tt>G_VARIANT_TYPE_VARIANT</tt>; a
--   container type that contain any other type of value.</li>
--   <li><tt>a</tt>: used as a prefix on another type string to mean an
--   array of that type; the type string <tt>ai</tt>, for example, is the
--   type of an array of signed 32-bit integers.</li>
--   <li><tt>m</tt>: used as a prefix on another type string to mean a
--   ‘maybe’, or ‘nullable’, version of that type; the type string
--   <tt>ms</tt>, for example, is the type of a value that maybe contains a
--   string, or maybe contains nothing.</li>
--   <li><tt>()</tt>: used to enclose zero or more other concatenated type
--   strings to create a tuple type; the type string <tt>(is)</tt>, for
--   example, is the type of a pair of an integer and a string.</li>
--   <li><tt>r</tt>: the type string of <tt>G_VARIANT_TYPE_TUPLE</tt>; an
--   indefinite type that is a supertype of any tuple type, regardless of
--   the number of items.</li>
--   <li><tt>{}</tt>: 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
--   <tt>a{sd}</tt>, for example, is the type of a dictionary that maps
--   strings to double precision floating point values.</li>
--   </ul>
--   
--   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.
--   
--   <ul>
--   <li><tt>*</tt>: the type string of <tt>G_VARIANT_TYPE_ANY</tt>; 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’.</li>
--   </ul>
--   
--   Any type string of a container that contains an indefinite type is,
--   itself, an indefinite type. For example, the type string <tt>a*</tt>
--   (corresponding to <tt>G_VARIANT_TYPE_ARRAY</tt>) is an indefinite type
--   that is a supertype of every array type. <tt>(*s)</tt> is a supertype
--   of all tuples that contain exactly two items where the second item is
--   a string.
--   
--   <tt>a{?*}</tt> 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 <tt>G_VARIANT_TYPE_DICTIONARY</tt>.
--   Note that, due to the restriction that the key of a dictionary entry
--   must be a basic type, <tt>{**}</tt> is not a valid type string.
--   
--   <i>Since: 2.24</i>
module GI.GLib.Structs.VariantType

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

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

-- | Makes a copy of a <a>VariantType</a>. It is appropriate to call
--   <a>variantTypeFree</a> on the return value. <i><tt>type</tt></i> may
--   not be <a>Nothing</a>.
variantTypeCopy :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Returns a newly-allocated copy of the type string corresponding to
--   <i><tt>type</tt></i>. The returned string is nul-terminated. It is
--   appropriate to call <a>free</a> 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 <i><tt>type1</tt></i> and <i><tt>type2</tt></i> for equality.
--   
--   Only returns <a>True</a> if the types are exactly equal. Even if one
--   type is an indefinite type and the other is a subtype of it,
--   <a>False</a> will be returned if they are not exactly equal. If you
--   want to check for subtypes, use <a>variantTypeIsSubtypeOf</a>.
--   
--   The argument types of <i><tt>type1</tt></i> and <i><tt>type2</tt></i>
--   are only <tt><i>gconstpointer</i></tt> to allow use with
--   <a>HashTable</a> without function pointer casting. For both arguments,
--   a valid <a>VariantType</a> 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
--   <tt><i>G_VARIANT_TYPE_TUPLE</i></tt>.
--   
--   In the case of a dictionary entry type, this returns the type of the
--   key.
--   
--   <a>Nothing</a> is returned in case of <i><tt>type</tt></i> being
--   <tt><i>G_VARIANT_TYPE_UNIT</i></tt>.
--   
--   This call, together with <a>variantTypeNext</a> provides an iterator
--   interface over tuple and dictionary entry types.
variantTypeFirst :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Frees a <a>VariantType</a> that was allocated with
--   <a>variantTypeCopy</a>, <a>variantTypeNew</a> or one of the container
--   type constructor functions.
--   
--   In the case that <i><tt>type</tt></i> is <a>Nothing</a>, 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
--   <i><tt>type</tt></i>. This function must be used to determine the
--   valid extent of the memory region returned by
--   <tt><i>g_variant_type_peek_string()</i></tt>.
variantTypeGetStringLength :: (HasCallStack, MonadIO m) => VariantType -> m CSize

-- | Hashes <i><tt>type</tt></i>.
--   
--   The argument type of <i><tt>type</tt></i> is only
--   <tt><i>gconstpointer</i></tt> to allow use with <a>HashTable</a>
--   without function pointer casting. A valid <a>VariantType</a> must be
--   provided.
variantTypeHash :: (HasCallStack, MonadIO m) => VariantType -> m Word32

-- | Determines if the given <i><tt>type</tt></i> is an array type. This is
--   true if the type string for <i><tt>type</tt></i> starts with an 'a'.
--   
--   This function returns <a>True</a> for any indefinite type for which
--   every definite subtype is an array type --
--   <tt><i>G_VARIANT_TYPE_ARRAY</i></tt>, for example.
variantTypeIsArray :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> 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 <a>False</a> for all indefinite types except
--   <tt><i>G_VARIANT_TYPE_BASIC</i></tt>.
variantTypeIsBasic :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> is a container type.
--   
--   Container types are any array, maybe, tuple, or dictionary entry types
--   plus the variant type.
--   
--   This function returns <a>True</a> for any indefinite type for which
--   every definite subtype is a container --
--   <tt><i>G_VARIANT_TYPE_ARRAY</i></tt>, for example.
variantTypeIsContainer :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> is definite (ie: not
--   indefinite).
--   
--   A type is definite if its type string does not contain any indefinite
--   type characters ('*', '?', or 'r').
--   
--   A <a>GVariant</a> instance may not have an indefinite type, so calling
--   this function on the result of <a>variantGetType</a> will always
--   result in <a>True</a> being returned. Calling this function on an
--   indefinite type like <tt><i>G_VARIANT_TYPE_ARRAY</i></tt>, however,
--   will result in <a>False</a> being returned.
variantTypeIsDefinite :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> is a dictionary entry
--   type. This is true if the type string for <i><tt>type</tt></i> starts
--   with a '{'.
--   
--   This function returns <a>True</a> for any indefinite type for which
--   every definite subtype is a dictionary entry type --
--   <tt><i>G_VARIANT_TYPE_DICT_ENTRY</i></tt>, for example.
variantTypeIsDictEntry :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> is a maybe type. This is
--   true if the type string for <i><tt>type</tt></i> starts with an 'm'.
--   
--   This function returns <a>True</a> for any indefinite type for which
--   every definite subtype is a maybe type --
--   <tt><i>G_VARIANT_TYPE_MAYBE</i></tt>, for example.
variantTypeIsMaybe :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Checks if <i><tt>type</tt></i> is a subtype of
--   <i><tt>supertype</tt></i>.
--   
--   This function returns <a>True</a> if <i><tt>type</tt></i> is a subtype
--   of <i><tt>supertype</tt></i>. 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 <i><tt>type</tt></i> is a tuple type. This is
--   true if the type string for <i><tt>type</tt></i> starts with a '(' or
--   if <i><tt>type</tt></i> is <tt><i>G_VARIANT_TYPE_TUPLE</i></tt>.
--   
--   This function returns <a>True</a> for any indefinite type for which
--   every definite subtype is a tuple type --
--   <tt><i>G_VARIANT_TYPE_TUPLE</i></tt>, for example.
variantTypeIsTuple :: (HasCallStack, MonadIO m) => VariantType -> m Bool

-- | Determines if the given <i><tt>type</tt></i> 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
--   <a>variantTypeFirst</a>.
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
--   <tt><i>G_VARIANT_TYPE_TUPLE</i></tt>.
--   
--   In the case of a dictionary entry type, this function will always
--   return 2.
variantTypeNItems :: (HasCallStack, MonadIO m) => VariantType -> m CSize

-- | Creates a new <a>VariantType</a> corresponding to the type string
--   given by <i><tt>typeString</tt></i>. It is appropriate to call
--   <a>variantTypeFree</a> on the return value.
--   
--   It is a programmer error to call this function with an invalid type
--   string. Use <a>variantTypeStringIsValid</a> if you are unsure.
--   
--   <i>Since: 2.24</i>
variantTypeNew :: (HasCallStack, MonadIO m) => Text -> m VariantType

-- | Constructs the type corresponding to an array of elements of the type
--   <i><tt>type</tt></i>.
--   
--   It is appropriate to call <a>variantTypeFree</a> on the return value.
variantTypeNewArray :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Constructs the type corresponding to a dictionary entry with a key of
--   type <i><tt>key</tt></i> and a value of type <i><tt>value</tt></i>.
--   
--   It is appropriate to call <a>variantTypeFree</a> on the return value.
variantTypeNewDictEntry :: (HasCallStack, MonadIO m) => VariantType -> VariantType -> m VariantType

-- | Constructs the type corresponding to a maybe instance containing type
--   <i><tt>type</tt></i> or Nothing.
--   
--   It is appropriate to call <a>variantTypeFree</a> on the return value.
variantTypeNewMaybe :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

-- | Constructs a new tuple type, from <i><tt>items</tt></i>.
--   
--   <i><tt>length</tt></i> is the number of items in
--   <i><tt>items</tt></i>, or -1 to indicate that <i><tt>items</tt></i> is
--   <a>Nothing</a>-terminated.
--   
--   It is appropriate to call <a>variantTypeFree</a> on the return value.
variantTypeNewTuple :: (HasCallStack, MonadIO m) => [VariantType] -> m VariantType

-- | Determines the next item type of a tuple or dictionary entry type.
--   
--   <i><tt>type</tt></i> must be the result of a previous call to
--   <a>variantTypeFirst</a> or <a>variantTypeNext</a>.
--   
--   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 <a>Nothing</a>.
--   
--   For tuples, <a>Nothing</a> is returned when <i><tt>type</tt></i> is
--   the last item in a tuple.
variantTypeNext :: (HasCallStack, MonadIO m) => VariantType -> m VariantType

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

-- | Checks if <i><tt>typeString</tt></i> is a valid GVariant type string.
--   This call is equivalent to calling <a>variantTypeStringScan</a> 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
--   <i><tt>string</tt></i>. The memory pointed to by <i><tt>limit</tt></i>
--   (or bytes beyond it) is never accessed.
--   
--   If a valid type string is found, <i><tt>endptr</tt></i> is updated to
--   point to the first character past the end of the string that was found
--   and <a>True</a> is returned.
--   
--   If there is no valid type string starting at <i><tt>string</tt></i>,
--   or if the type string does not end before <i><tt>limit</tt></i> then
--   <a>False</a> is returned.
--   
--   For the simple case of checking if a string is a valid type string,
--   see <a>variantTypeStringIsValid</a>.
--   
--   <i>Since: 2.24</i>
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.ManagedPtrNewtype GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantType.VariantType
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.VariantType.VariantType)


-- | <a>VariantDict</a> is a mutable interface to <a>GVariant</a>
--   dictionaries.
--   
--   It can be used for doing a sequence of dictionary lookups in an
--   efficient way on an existing <a>GVariant</a> 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.
--   
--   <a>VariantDict</a> can only be used with
--   <tt><i>G_VARIANT_TYPE_VARDICT</i></tt> dictionaries.
--   
--   It is possible to use <a>VariantDict</a> allocated on the stack or on
--   the heap. When using a stack-allocated <a>VariantDict</a>, you begin
--   with a call to <tt><i>g_variant_dict_init()</i></tt> and free the
--   resources with a call to <a>variantDictClear</a>.
--   
--   Heap-allocated <a>VariantDict</a> follows normal refcounting rules:
--   you allocate it with <a>variantDictNew</a> and use
--   <a>variantDictRef</a> and <a>variantDictUnref</a>.
--   
--   <a>variantDictEnd</a> is used to convert the <a>VariantDict</a> back
--   into a dictionary-type <a>GVariant</a>. When used with stack-allocated
--   instances, this also implicitly frees all associated memory, but for
--   heap-allocated instances, you must still call <a>variantDictUnref</a>
--   afterwards.
--   
--   You will typically want to use a heap-allocated <a>VariantDict</a>
--   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 <a>GVariant</a>.
--   
--   <h2>Using a stack-allocated GVariantDict</h2>
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GVariant *
--   add_to_count (GVariant  *orig,
--                 GError   **error)
--   {
--     GVariantDict dict;
--     guint32 count;
--   
--     g_variant_dict_init (&amp;dict, orig);
--     if (!g_variant_dict_lookup (&amp;dict, "count", "u", &amp;count))
--       {
--         g_set_error (...);
--         g_variant_dict_clear (&amp;dict);
--         return NULL;
--       }
--   
--     g_variant_dict_insert (&amp;dict, "count", "u", count + 1);
--   
--     return g_variant_dict_end (&amp;dict);
--   }
--   </pre>
--   
--   <h2>Using heap-allocated GVariantDict</h2>
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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", &amp;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;
--   }
--   </pre>
--   
--   <i>Since: 2.40</i>
module GI.GLib.Structs.VariantDict

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

-- | Releases all memory associated with a <a>VariantDict</a> without
--   freeing the <a>VariantDict</a> structure itself.
--   
--   It typically only makes sense to do this on a stack-allocated
--   <a>VariantDict</a> if you want to abort building the value part-way
--   through. This function need not be called if you call
--   <a>variantDictEnd</a> and it also doesn't need to be called on dicts
--   allocated with g_variant_dict_new (see <a>variantDictUnref</a> for
--   that).
--   
--   It is valid to call this function on either an initialised
--   <a>VariantDict</a> or one that was previously cleared by an earlier
--   call to <a>variantDictClear</a> but it is not valid to call this
--   function on uninitialised memory.
--   
--   <i>Since: 2.40</i>
variantDictClear :: (HasCallStack, MonadIO m) => VariantDict -> m ()

-- | Checks if <i><tt>key</tt></i> exists in <i><tt>dict</tt></i>.
--   
--   <i>Since: 2.40</i>
variantDictContains :: (HasCallStack, MonadIO m) => VariantDict -> Text -> m Bool

-- | Returns the current value of <i><tt>dict</tt></i> as a <a>GVariant</a>
--   of type <tt><i>G_VARIANT_TYPE_VARDICT</i></tt>, clearing it in the
--   process.
--   
--   It is not permissible to use <i><tt>dict</tt></i> in any way after
--   this call except for reference counting operations (in the case of a
--   heap-allocated <a>VariantDict</a>) or by reinitialising it with
--   <tt><i>g_variant_dict_init()</i></tt> (in the case of
--   stack-allocated).
--   
--   <i>Since: 2.40</i>
variantDictEnd :: (HasCallStack, MonadIO m) => VariantDict -> m GVariant

-- | Inserts (or replaces) a key in a <a>VariantDict</a>.
--   
--   <i><tt>value</tt></i> is consumed if it is floating.
--   
--   <i>Since: 2.40</i>
variantDictInsertValue :: (HasCallStack, MonadIO m) => VariantDict -> Text -> GVariant -> m ()

-- | Looks up a value in a <a>VariantDict</a>.
--   
--   If <i><tt>key</tt></i> is not found in <i><tt>dictionary</tt></i>,
--   <a>Nothing</a> is returned.
--   
--   The <i><tt>expectedType</tt></i> string specifies what type of value
--   is expected. If the value associated with <i><tt>key</tt></i> has a
--   different type then <a>Nothing</a> is returned.
--   
--   If the key is found and the value has the correct type, it is
--   returned. If <i><tt>expectedType</tt></i> was specified then any
--   non-<a>Nothing</a> return value will have this type.
--   
--   <i>Since: 2.40</i>
variantDictLookupValue :: (HasCallStack, MonadIO m) => VariantDict -> Text -> Maybe VariantType -> m (Maybe GVariant)

-- | Allocates and initialises a new <a>VariantDict</a>.
--   
--   You should call <a>variantDictUnref</a> 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 <a>VariantDict</a> directly
--   on the stack of the calling function and initialise it with
--   <tt><i>g_variant_dict_init()</i></tt>. This is particularly useful
--   when you are using <a>VariantDict</a> to construct a <a>GVariant</a>.
--   
--   <i>Since: 2.40</i>
variantDictNew :: (HasCallStack, MonadIO m) => Maybe GVariant -> m VariantDict

-- | Increases the reference count on <i><tt>dict</tt></i>.
--   
--   Don't call this on stack-allocated <a>VariantDict</a> instances or bad
--   things will happen.
--   
--   <i>Since: 2.40</i>
variantDictRef :: (HasCallStack, MonadIO m) => VariantDict -> m VariantDict

-- | Removes a key and its associated value from a <a>VariantDict</a>.
--   
--   <i>Since: 2.40</i>
variantDictRemove :: (HasCallStack, MonadIO m) => VariantDict -> Text -> m Bool

-- | Decreases the reference count on <i><tt>dict</tt></i>.
--   
--   In the event that there are no more references, releases all memory
--   associated with the <a>VariantDict</a>.
--   
--   Don't call this on stack-allocated <a>VariantDict</a> instances or bad
--   things will happen.
--   
--   <i>Since: 2.40</i>
variantDictUnref :: (HasCallStack, MonadIO m) => VariantDict -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantDict.VariantDict
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.VariantDict.VariantDict)


-- | A utility type for constructing container-type <a>GVariant</a>
--   instances.
--   
--   This is an opaque structure and may only be accessed using the
--   following functions.
--   
--   <a>VariantBuilder</a> 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 <i><tt>value</tt></i> to <i><tt>builder</tt></i>.
--   
--   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 <i><tt>value</tt></i> is a floating reference (see
--   <a>variantRefSink</a>), the <i><tt>builder</tt></i> instance takes
--   ownership of <i><tt>value</tt></i>.
--   
--   <i>Since: 2.24</i>
variantBuilderAddValue :: (HasCallStack, MonadIO m) => VariantBuilder -> GVariant -> m ()

-- | Closes the subcontainer inside the given <i><tt>builder</tt></i> that
--   was opened by the most recent call to <a>variantBuilderOpen</a>.
--   
--   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).
--   
--   <i>Since: 2.24</i>
variantBuilderClose :: (HasCallStack, MonadIO m) => VariantBuilder -> m ()

-- | Ends the builder process and returns the constructed value.
--   
--   It is not permissible to use <i><tt>builder</tt></i> in any way after
--   this call except for reference counting operations (in the case of a
--   heap-allocated <a>VariantBuilder</a>) or by reinitialising it with
--   <tt><i>g_variant_builder_init()</i></tt> (in the case of
--   stack-allocated). This means that for the stack-allocated builders
--   there is no need to call <tt><i>g_variant_builder_clear()</i></tt>
--   after the call to <a>variantBuilderEnd</a>.
--   
--   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.
--   
--   <i>Since: 2.24</i>
variantBuilderEnd :: (HasCallStack, MonadIO m) => VariantBuilder -> m GVariant

-- | Allocates and initialises a new <a>VariantBuilder</a>.
--   
--   You should call <a>variantBuilderUnref</a> 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 <a>VariantBuilder</a> directly
--   on the stack of the calling function and initialise it with
--   <tt><i>g_variant_builder_init()</i></tt>.
--   
--   <i>Since: 2.24</i>
variantBuilderNew :: (HasCallStack, MonadIO m) => VariantType -> m VariantBuilder

-- | Opens a subcontainer inside the given <i><tt>builder</tt></i>. When
--   done adding items to the subcontainer, <a>variantBuilderClose</a> must
--   be called. <i><tt>type</tt></i> is the type of the container: so to
--   build a tuple of several values, <i><tt>type</tt></i> 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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 (&amp;builder, G_VARIANT_TYPE ("(ua{sv})"));
--   g_variant_builder_add (&amp;builder, "u", some_number);
--   g_variant_builder_open (&amp;builder, G_VARIANT_TYPE ("a{sv}"));
--   
--   g_hash_table_iter_init (&amp;iter, some_dict);
--   while (g_hash_table_iter_next (&amp;iter, (gpointer *) &amp;key, (gpointer *) &amp;value))
--     {
--       g_variant_builder_open (&amp;builder, G_VARIANT_TYPE ("{sv}"));
--       g_variant_builder_add (&amp;builder, "s", key);
--       g_variant_builder_add (&amp;builder, "v", value);
--       g_variant_builder_close (&amp;builder);
--     }
--   
--   g_variant_builder_close (&amp;builder);
--   
--   output = g_variant_builder_end (&amp;builder);
--   </pre>
--   
--   <i>Since: 2.24</i>
variantBuilderOpen :: (HasCallStack, MonadIO m) => VariantBuilder -> VariantType -> m ()

-- | Increases the reference count on <i><tt>builder</tt></i>.
--   
--   Don't call this on stack-allocated <a>VariantBuilder</a> instances or
--   bad things will happen.
--   
--   <i>Since: 2.24</i>
variantBuilderRef :: (HasCallStack, MonadIO m) => VariantBuilder -> m VariantBuilder

-- | Decreases the reference count on <i><tt>builder</tt></i>.
--   
--   In the event that there are no more references, releases all memory
--   associated with the <a>VariantBuilder</a>.
--   
--   Don't call this on stack-allocated <a>VariantBuilder</a> instances or
--   bad things will happen.
--   
--   <i>Since: 2.24</i>
variantBuilderUnref :: (HasCallStack, MonadIO m) => VariantBuilder -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.VariantBuilder.VariantBuilder
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.VariantBuilder.VariantBuilder)


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Unions.DoubleIEEE754

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

-- | Construct a <a>DoubleIEEE754</a> struct initialized to zero.
newZeroDoubleIEEE754 :: MonadIO m => m DoubleIEEE754

-- | Get the value of the “<tt>v_double</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> doubleIEEE754 #vDouble
--   </pre>
getDoubleIEEE754VDouble :: MonadIO m => DoubleIEEE754 -> m Double

-- | Set the value of the “<tt>v_double</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> doubleIEEE754 [ #vDouble <a>:=</a> value ]
--   </pre>
setDoubleIEEE754VDouble :: MonadIO m => DoubleIEEE754 -> Double -> m ()
instance GHC.Classes.Eq GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.DoubleIEEE754.DoubleIEEE754
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


-- | <i>No description available in the introspection data.</i>
module GI.GLib.Unions.FloatIEEE754

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

-- | Construct a <a>FloatIEEE754</a> struct initialized to zero.
newZeroFloatIEEE754 :: MonadIO m => m FloatIEEE754

-- | Get the value of the “<tt>v_float</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> floatIEEE754 #vFloat
--   </pre>
getFloatIEEE754VFloat :: MonadIO m => FloatIEEE754 -> m Float

-- | Set the value of the “<tt>v_float</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> floatIEEE754 [ #vFloat <a>:=</a> value ]
--   </pre>
setFloatIEEE754VFloat :: MonadIO m => FloatIEEE754 -> Float -> m ()
instance GHC.Classes.Eq GI.GLib.Unions.FloatIEEE754.FloatIEEE754
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.FloatIEEE754.FloatIEEE754
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


-- | The <a>Mutex</a> 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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;
--   }
--   </pre>
--   
--   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 <a>Mutex</a> can be used as a solution to this problem:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   int
--   give_me_next_number (void)
--   {
--     static GMutex mutex;
--     static int current_number = 0;
--     int ret_val;
--   
--     g_mutex_lock (&amp;mutex);
--     ret_val = current_number = calc_next_number (current_number);
--     g_mutex_unlock (&amp;mutex);
--   
--     return ret_val;
--   }
--   </pre>
--   
--   Notice that the <a>Mutex</a> 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 <a>Mutex</a> is placed in other contexts (eg: embedded in a
--   struct) then it must be explicitly initialised using <a>mutexInit</a>.
--   
--   A <a>Mutex</a> 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 <a>Mutex</a> struct initialized to zero.
newZeroMutex :: MonadIO m => m Mutex

-- | Frees the resources allocated to a mutex with <a>mutexInit</a>.
--   
--   This function should not be used with a <a>Mutex</a> that has been
--   statically allocated.
--   
--   Calling <a>mutexClear</a> on a locked mutex leads to undefined
--   behaviour.
--   
--   <i>Since: 2.32</i>
mutexClear :: (HasCallStack, MonadIO m) => Mutex -> m ()

-- | Initializes a <a>Mutex</a> 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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--     typedef struct {
--       GMutex m;
--       ...
--     } Blob;
--   
--   Blob *b;
--   
--   b = g_new (Blob, 1);
--   g_mutex_init (&amp;b-&gt;m);
--   </pre>
--   
--   To undo the effect of <a>mutexInit</a> when a mutex is no longer
--   needed, use <a>mutexClear</a>.
--   
--   Calling <a>mutexInit</a> on an already initialized <a>Mutex</a> leads
--   to undefined behaviour.
--   
--   <i>Since: 2.32</i>
mutexInit :: (HasCallStack, MonadIO m) => Mutex -> m ()

-- | Locks <i><tt>mutex</tt></i>. If <i><tt>mutex</tt></i> is already
--   locked by another thread, the current thread will block until
--   <i><tt>mutex</tt></i> is unlocked by the other thread.
--   
--   <a>Mutex</a> is neither guaranteed to be recursive nor to be
--   non-recursive. As such, calling <a>mutexLock</a> on a <a>Mutex</a>
--   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 <i><tt>mutex</tt></i>. If <i><tt>mutex</tt></i> is
--   already locked by another thread, it immediately returns <a>False</a>.
--   Otherwise it locks <i><tt>mutex</tt></i> and returns <a>True</a>.
--   
--   <a>Mutex</a> is neither guaranteed to be recursive nor to be
--   non-recursive. As such, calling <a>mutexLock</a> on a <a>Mutex</a>
--   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 <i><tt>mutex</tt></i>. If another thread is blocked in a
--   <a>mutexLock</a> call for <i><tt>mutex</tt></i>, it will become
--   unblocked and can lock <i><tt>mutex</tt></i> itself.
--   
--   Calling <a>mutexUnlock</a> on a mutex that is not locked by the
--   current thread leads to undefined behaviour.
mutexUnlock :: (HasCallStack, MonadIO m) => Mutex -> m ()
instance GHC.Classes.Eq GI.GLib.Unions.Mutex.Mutex
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.Mutex.Mutex
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


-- | The <a>Cond</a> struct is an opaque data structure that represents a
--   condition. Threads can block on a <a>Cond</a> if they find a certain
--   condition to be false. If other threads change the state of this
--   condition they signal the <a>Cond</a>, 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   gpointer current_data = NULL;
--   GMutex data_mutex;
--   GCond data_cond;
--   
--   void
--   push_data (gpointer data)
--   {
--     g_mutex_lock (&amp;data_mutex);
--     current_data = data;
--     g_cond_signal (&amp;data_cond);
--     g_mutex_unlock (&amp;data_mutex);
--   }
--   
--   gpointer
--   pop_data (void)
--   {
--     gpointer data;
--   
--     g_mutex_lock (&amp;data_mutex);
--     while (!current_data)
--       g_cond_wait (&amp;data_cond, &amp;data_mutex);
--     data = current_data;
--     current_data = NULL;
--     g_mutex_unlock (&amp;data_mutex);
--   
--     return data;
--   }
--   </pre>
--   
--   Whenever a thread calls <tt><i>pop_data()</i></tt> now, it will wait
--   until current_data is non-<a>Nothing</a>, i.e. until some other thread
--   has called <tt><i>push_data()</i></tt>.
--   
--   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 <i><tt>currentData</tt></i> by the while loop in
--   <tt><i>pop_data()</i></tt> and waiting. Specifically, another thread
--   could set <i><tt>currentData</tt></i> after the check, and signal the
--   cond (with nobody waiting on it) before the first thread goes to
--   sleep. <a>Cond</a> is specifically useful for its ability to release
--   the mutex and go to sleep atomically.
--   
--   It is also important to use the <a>condWait</a> and
--   <a>condWaitUntil</a> functions only inside a loop which checks for the
--   condition to be true. See <a>condWait</a> for an explanation of why
--   the condition may not be true even after it returns.
--   
--   If a <a>Cond</a> is allocated in static storage then it can be used
--   without initialisation. Otherwise, you should call <a>condInit</a> on
--   it and <a>condClear</a> when done.
--   
--   A <a>Cond</a> 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 <a>Cond</a> struct initialized to zero.
newZeroCond :: MonadIO m => m Cond

-- | If threads are waiting for <i><tt>cond</tt></i>, all of them are
--   unblocked. If no threads are waiting for <i><tt>cond</tt></i>, 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 <a>Cond</a> with <a>condInit</a>.
--   
--   This function should not be used with a <a>Cond</a> that has been
--   statically allocated.
--   
--   Calling <a>condClear</a> for a <a>Cond</a> on which threads are
--   blocking leads to undefined behaviour.
--   
--   <i>Since: 2.32</i>
condClear :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | Initialises a <a>Cond</a> so that it can be used.
--   
--   This function is useful to initialise a <a>Cond</a> that has been
--   allocated as part of a larger structure. It is not necessary to
--   initialise a <a>Cond</a> that has been statically allocated.
--   
--   To undo the effect of <a>condInit</a> when a <a>Cond</a> is no longer
--   needed, use <a>condClear</a>.
--   
--   Calling <a>condInit</a> on an already-initialised <a>Cond</a> leads to
--   undefined behaviour.
--   
--   <i>Since: 2.32</i>
condInit :: (HasCallStack, MonadIO m) => Cond -> m ()

-- | If threads are waiting for <i><tt>cond</tt></i>, at least one of them
--   is unblocked. If no threads are waiting for <i><tt>cond</tt></i>, 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 <i><tt>mutex</tt></i> and waits until
--   <i><tt>cond</tt></i> is signalled. When this function returns,
--   <i><tt>mutex</tt></i> is locked again and owned by the calling thread.
--   
--   When using condition variables, it is possible that a spurious wakeup
--   may occur (ie: <a>condWait</a> returns even though <a>condSignal</a>
--   was not called). It's also possible that a stolen wakeup may occur.
--   This is when <a>condSignal</a> is called, but another thread acquires
--   <i><tt>mutex</tt></i> before this thread and modifies the state of the
--   program in such a way that when <a>condWait</a> is able to return, the
--   expected condition is no longer met.
--   
--   For this reason, <a>condWait</a> must always be used in a loop. See
--   the documentation for <a>Cond</a> for a complete example.
condWait :: (HasCallStack, MonadIO m) => Cond -> Mutex -> m ()

-- | Waits until either <i><tt>cond</tt></i> is signalled or
--   <i><tt>endTime</tt></i> has passed.
--   
--   As with <a>condWait</a> 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.
--   
--   <a>True</a> is returned if the condition variable was signalled (or in
--   the case of a spurious wakeup). <a>False</a> is returned if
--   <i><tt>endTime</tt></i> 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 <a>Cond</a>):
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   gpointer
--   pop_data_timed (void)
--   {
--     gint64 end_time;
--     gpointer data;
--   
--     g_mutex_lock (&amp;data_mutex);
--   
--     end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND;
--     while (!current_data)
--       if (!g_cond_wait_until (&amp;data_cond, &amp;data_mutex, end_time))
--         {
--           // timeout has passed.
--           g_mutex_unlock (&amp;data_mutex);
--           return NULL;
--         }
--   
--     // there is data for us
--     data = current_data;
--     current_data = NULL;
--   
--     g_mutex_unlock (&amp;data_mutex);
--   
--     return data;
--   }
--   </pre>
--   
--   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).
--   
--   <i>Since: 2.32</i>
condWaitUntil :: (HasCallStack, MonadIO m) => Cond -> Mutex -> Int64 -> m Bool
instance GHC.Classes.Eq GI.GLib.Structs.Cond.Cond
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Cond.Cond
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


-- | 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 <a>TokenValue</a> struct initialized to zero.
newZeroTokenValue :: MonadIO m => m TokenValue

-- | Get the value of the “<tt>v_binary</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vBinary
--   </pre>
getTokenValueVBinary :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “<tt>v_binary</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vBinary <a>:=</a> value ]
--   </pre>
setTokenValueVBinary :: MonadIO m => TokenValue -> CULong -> m ()

-- | Get the value of the “<tt>v_char</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vChar
--   </pre>
getTokenValueVChar :: MonadIO m => TokenValue -> m Word8

-- | Set the value of the “<tt>v_char</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vChar <a>:=</a> value ]
--   </pre>
setTokenValueVChar :: MonadIO m => TokenValue -> Word8 -> m ()

-- | Set the value of the “<tt>v_comment</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #vComment
--   </pre>
clearTokenValueVComment :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “<tt>v_comment</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vComment
--   </pre>
getTokenValueVComment :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “<tt>v_comment</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vComment <a>:=</a> value ]
--   </pre>
setTokenValueVComment :: MonadIO m => TokenValue -> CString -> m ()

-- | Get the value of the “<tt>v_error</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vError
--   </pre>
getTokenValueVError :: MonadIO m => TokenValue -> m Word32

-- | Set the value of the “<tt>v_error</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vError <a>:=</a> value ]
--   </pre>
setTokenValueVError :: MonadIO m => TokenValue -> Word32 -> m ()

-- | Get the value of the “<tt>v_float</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vFloat
--   </pre>
getTokenValueVFloat :: MonadIO m => TokenValue -> m Double

-- | Set the value of the “<tt>v_float</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vFloat <a>:=</a> value ]
--   </pre>
setTokenValueVFloat :: MonadIO m => TokenValue -> Double -> m ()

-- | Get the value of the “<tt>v_hex</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vHex
--   </pre>
getTokenValueVHex :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “<tt>v_hex</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vHex <a>:=</a> value ]
--   </pre>
setTokenValueVHex :: MonadIO m => TokenValue -> CULong -> m ()

-- | Set the value of the “<tt>v_identifier</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #vIdentifier
--   </pre>
clearTokenValueVIdentifier :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “<tt>v_identifier</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vIdentifier
--   </pre>
getTokenValueVIdentifier :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “<tt>v_identifier</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vIdentifier <a>:=</a> value ]
--   </pre>
setTokenValueVIdentifier :: MonadIO m => TokenValue -> CString -> m ()

-- | Get the value of the “<tt>v_int</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vInt
--   </pre>
getTokenValueVInt :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “<tt>v_int</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vInt <a>:=</a> value ]
--   </pre>
setTokenValueVInt :: MonadIO m => TokenValue -> CULong -> m ()

-- | Get the value of the “<tt>v_int64</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vInt64
--   </pre>
getTokenValueVInt64 :: MonadIO m => TokenValue -> m Word64

-- | Set the value of the “<tt>v_int64</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vInt64 <a>:=</a> value ]
--   </pre>
setTokenValueVInt64 :: MonadIO m => TokenValue -> Word64 -> m ()

-- | Get the value of the “<tt>v_octal</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vOctal
--   </pre>
getTokenValueVOctal :: MonadIO m => TokenValue -> m CULong

-- | Set the value of the “<tt>v_octal</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vOctal <a>:=</a> value ]
--   </pre>
setTokenValueVOctal :: MonadIO m => TokenValue -> CULong -> m ()

-- | Set the value of the “<tt>v_string</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #vString
--   </pre>
clearTokenValueVString :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “<tt>v_string</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vString
--   </pre>
getTokenValueVString :: MonadIO m => TokenValue -> m (Maybe Text)

-- | Set the value of the “<tt>v_string</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vString <a>:=</a> value ]
--   </pre>
setTokenValueVString :: MonadIO m => TokenValue -> CString -> m ()

-- | Set the value of the “<tt>v_symbol</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #vSymbol
--   </pre>
clearTokenValueVSymbol :: MonadIO m => TokenValue -> m ()

-- | Get the value of the “<tt>v_symbol</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tokenValue #vSymbol
--   </pre>
getTokenValueVSymbol :: MonadIO m => TokenValue -> m (Ptr ())

-- | Set the value of the “<tt>v_symbol</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tokenValue [ #vSymbol <a>:=</a> value ]
--   </pre>
setTokenValueVSymbol :: MonadIO m => TokenValue -> Ptr () -> m ()
instance GHC.Classes.Eq GI.GLib.Unions.TokenValue.TokenValue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Unions.TokenValue.TokenValue
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


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 <i><tt>valueDestroyFunc</tt></i> and
--   <i><tt>keyDestroyFunc</tt></i> functions passed to
--   <tt><i>g_cache_new()</i></tt>. The functions are passed a pointer to
--   the <a>Cache</a> key or <a>Cache</a> value and should free any memory
--   and other resources associated with it.

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

-- | Specifies the type of the <i><tt>valueDestroyFunc</tt></i> and
--   <i><tt>keyDestroyFunc</tt></i> functions passed to
--   <tt><i>g_cache_new()</i></tt>. The functions are passed a pointer to
--   the <a>Cache</a> key or <a>Cache</a> value and should free any memory
--   and other resources associated with it.
type CacheDestroyFunc_WithClosures = -- | /@value@/: the t'GI.GLib.Structs.Cache.Cache' value to destroy Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CacheDestroyFunc :: CacheDestroyFunc -> CacheDestroyFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_CacheDestroyFunc :: MonadIO m => CacheDestroyFunc -> m (GClosure C_CacheDestroyFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheDestroyFunc</a></tt>.
noCacheDestroyFunc :: Maybe CacheDestroyFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheDestroyFunc_WithClosures</a></tt>.
noCacheDestroyFunc_WithClosures :: Maybe CacheDestroyFunc_WithClosures

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

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

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

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
type CacheDupFunc = -- | __Returns:__ a copy of the t'GI.GLib.Structs.Cache.Cache' key IO (Ptr ())

-- | Specifies the type of the <i><tt>keyDupFunc</tt></i> function passed
--   to <tt><i>g_cache_new()</i></tt>. The function is passed a key
--   (<b>not</b> a value as the prototype implies) and should return a
--   duplicate of the key.
type CacheDupFunc_WithClosures = -- | /@value@/: the t'GI.GLib.Structs.Cache.Cache' key to destroy (__not__ a --         t'GI.GLib.Structs.Cache.Cache' value as it seems) Ptr () -> -- | __Returns:__ a copy of the t'GI.GLib.Structs.Cache.Cache' key IO (Ptr ())

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CacheDupFunc :: CacheDupFunc -> CacheDupFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_CacheDupFunc :: MonadIO m => CacheDupFunc -> m (GClosure C_CacheDupFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheDupFunc</a></tt>.
noCacheDupFunc :: Maybe CacheDupFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheDupFunc_WithClosures</a></tt>.
noCacheDupFunc_WithClosures :: Maybe CacheDupFunc_WithClosures

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

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

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

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
type CacheNewFunc = -- | __Returns:__ a new t'GI.GLib.Structs.Cache.Cache' value corresponding to the key. IO (Ptr ())

-- | Specifies the type of the <i><tt>valueNewFunc</tt></i> function passed
--   to <tt><i>g_cache_new()</i></tt>. It is passed a <a>Cache</a> key and
--   should create the value corresponding to the key.
type CacheNewFunc_WithClosures = -- | /@key@/: a t'GI.GLib.Structs.Cache.Cache' key Ptr () -> -- | __Returns:__ a new t'GI.GLib.Structs.Cache.Cache' value corresponding to the key. IO (Ptr ())

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CacheNewFunc :: CacheNewFunc -> CacheNewFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_CacheNewFunc :: MonadIO m => CacheNewFunc -> m (GClosure C_CacheNewFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheNewFunc</a></tt>.
noCacheNewFunc :: Maybe CacheNewFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CacheNewFunc_WithClosures</a></tt>.
noCacheNewFunc_WithClosures :: Maybe CacheNewFunc_WithClosures

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

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

-- | Prototype of a <tt><i>GChildWatchSource</i></tt> callback, called when
--   a child process has exited.
--   
--   To interpret <i><tt>waitStatus</tt></i>, see the documentation for
--   <a>spawnCheckWaitStatus</a>. In particular, on Unix platforms, note
--   that it is usually not equal to the integer passed to <tt>exit()</tt>
--   or returned from <tt>main()</tt>.
type ChildWatchFunc = -- | /@pid@/: the process id of the child process Int32 -> -- | /@waitStatus@/: Status information about the child process, encoded --               in a platform-specific manner Int32 -> IO ()

-- | Prototype of a <tt><i>GChildWatchSource</i></tt> callback, called when
--   a child process has exited.
--   
--   To interpret <i><tt>waitStatus</tt></i>, see the documentation for
--   <a>spawnCheckWaitStatus</a>. In particular, on Unix platforms, note
--   that it is usually not equal to the integer passed to <tt>exit()</tt>
--   or returned from <tt>main()</tt>.
type ChildWatchFunc_WithClosures = -- | /@pid@/: the process id of the child process Int32 -> -- | /@waitStatus@/: Status information about the child process, encoded --               in a platform-specific manner Int32 -> -- | /@userData@/: user data passed to @/g_child_watch_add()/@ 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 <a>GClosure</a>.
genClosure_ChildWatchFunc :: MonadIO m => ChildWatchFunc -> m (GClosure C_ChildWatchFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ChildWatchFunc</a>.
mk_ChildWatchFunc :: C_ChildWatchFunc -> IO (FunPtr C_ChildWatchFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ChildWatchFunc</a></tt>.
noChildWatchFunc :: Maybe ChildWatchFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ChildWatchFunc_WithClosures</a></tt>.
noChildWatchFunc_WithClosures :: Maybe ChildWatchFunc_WithClosures

-- | Wrap a <a>ChildWatchFunc</a> into a <a>C_ChildWatchFunc</a>.
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
--   <tt><i>g_clear_handle_id()</i></tt>. The implementation is expected to
--   free the resource identified by <i><tt>handleId</tt></i>; for
--   instance, if <i><tt>handleId</tt></i> is a <a>Source</a> ID,
--   <a>sourceRemove</a> can be used.
--   
--   <i>Since: 2.56</i>
type ClearHandleFunc = -- | /@handleId@/: the handle ID to clear 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 <a>GClosure</a>.
genClosure_ClearHandleFunc :: MonadIO m => ClearHandleFunc -> m (GClosure C_ClearHandleFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ClearHandleFunc</a>.
mk_ClearHandleFunc :: C_ClearHandleFunc -> IO (FunPtr C_ClearHandleFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ClearHandleFunc</a></tt>.
noClearHandleFunc :: Maybe ClearHandleFunc

-- | Wrap a <a>ClearHandleFunc</a> into a <a>C_ClearHandleFunc</a>.
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 = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive --          value if /@a@/ > /@b@/ 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 = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | /@userData@/: user data Ptr () -> -- | __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive --          value if /@a@/ > /@b@/ 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 <a>GClosure</a>.
genClosure_CompareDataFunc :: MonadIO m => CompareDataFunc -> m (GClosure C_CompareDataFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_CompareDataFunc</a>.
mk_CompareDataFunc :: C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompareDataFunc</a></tt>.
noCompareDataFunc :: Maybe CompareDataFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompareDataFunc_WithClosures</a></tt>.
noCompareDataFunc_WithClosures :: Maybe CompareDataFunc_WithClosures

-- | Wrap a <a>CompareDataFunc</a> into a <a>C_CompareDataFunc</a>.
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 = -- | /@a@/: a value Ptr () -> -- | __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive --          value if /@a@/ > /@b@/ 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_WithClosures = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive --          value if /@a@/ > /@b@/ IO Int32

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CompareFunc :: CompareFunc -> CompareFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_CompareFunc</a>.
mk_CompareFunc :: C_CompareFunc -> IO (FunPtr C_CompareFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompareFunc</a></tt>.
noCompareFunc :: Maybe CompareFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompareFunc_WithClosures</a></tt>.
noCompareFunc_WithClosures :: Maybe CompareFunc_WithClosures

-- | Wrap a <a>CompareFunc</a> into a <a>C_CompareFunc</a>.
wrap_CompareFunc :: Maybe (Ptr (FunPtr C_CompareFunc)) -> CompareFunc_WithClosures -> 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
--   <tt><i>g_completion_new()</i></tt>. It should return the string
--   corresponding to the given target item. This is used when you use data
--   structures as <a>Completion</a> items.

-- | <i>Deprecated: (Since version 2.26)Rarely used API</i>
type CompletionFunc = -- | __Returns:__ the string corresponding to the item. IO Text

-- | Specifies the type of the function passed to
--   <tt><i>g_completion_new()</i></tt>. It should return the string
--   corresponding to the given target item. This is used when you use data
--   structures as <a>Completion</a> items.
type CompletionFunc_WithClosures = -- | /@item@/: the completion item. Ptr () -> -- | __Returns:__ the string corresponding to the item. IO Text

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CompletionFunc :: CompletionFunc -> CompletionFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_CompletionFunc :: MonadIO m => CompletionFunc -> m (GClosure C_CompletionFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompletionFunc</a></tt>.
noCompletionFunc :: Maybe CompletionFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompletionFunc_WithClosures</a></tt>.
noCompletionFunc_WithClosures :: Maybe CompletionFunc_WithClosures

-- | Wrap a <a>CompletionFunc</a> into a <a>C_CompletionFunc</a>.
wrap_CompletionFunc :: Maybe (Ptr (FunPtr C_CompletionFunc)) -> CompletionFunc_WithClosures -> 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
--   <tt><i>g_completion_set_compare()</i></tt>. This is used when you use
--   strings as <a>Completion</a> items.

-- | <i>Deprecated: (Since version 2.26)Rarely used API</i>
type CompletionStrncmpFunc = -- | /@s1@/: string to compare with /@s2@/. Text -> -- | /@s2@/: string to compare with /@s1@/. Text -> -- | /@n@/: maximal number of bytes to compare. CSize -> -- | __Returns:__ an integer less than, equal to, or greater than zero if --          the first /@n@/ bytes of /@s1@/ is found, respectively, to be --          less than, to match, or to be greater than the first /@n@/ --          bytes of /@s2@/. 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 <a>GClosure</a>.
genClosure_CompletionStrncmpFunc :: MonadIO m => CompletionStrncmpFunc -> m (GClosure C_CompletionStrncmpFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CompletionStrncmpFunc</a></tt>.
noCompletionStrncmpFunc :: Maybe CompletionStrncmpFunc

-- | Wrap a <a>CompletionStrncmpFunc</a> into a
--   <a>C_CompletionStrncmpFunc</a>.
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.
--   
--   <i>Since: 2.4</i>
type CopyFunc = -- | /@src@/: A pointer to the data which should be copied Ptr () -> -- | __Returns:__ A pointer to the copy IO (Ptr ())

-- | A function of this signature is used to copy the node data when doing
--   a deep-copy of a tree.
--   
--   <i>Since: 2.4</i>
type CopyFunc_WithClosures = -- | /@src@/: A pointer to the data which should be copied Ptr () -> -- | /@data@/: Additional data Ptr () -> -- | __Returns:__ A pointer to the copy IO (Ptr ())

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CopyFunc :: CopyFunc -> CopyFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_CopyFunc</a>.
mk_CopyFunc :: C_CopyFunc -> IO (FunPtr C_CopyFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CopyFunc</a></tt>.
noCopyFunc :: Maybe CopyFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CopyFunc_WithClosures</a></tt>.
noCopyFunc_WithClosures :: Maybe CopyFunc_WithClosures

-- | Wrap a <a>CopyFunc</a> into a <a>C_CopyFunc</a>.
wrap_CopyFunc :: Maybe (Ptr (FunPtr C_CopyFunc)) -> CopyFunc_WithClosures -> 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 <a>datasetForeach</a>. It is
--   called with each <tt><i>GQuark</i></tt> id and associated data
--   element, together with the <i><tt>userData</tt></i> parameter supplied
--   to <a>datasetForeach</a>.
type DataForeachFunc = -- | /@keyId@/: the @/GQuark/@ id to identifying the data element. Word32 -> -- | /@data@/: the data element. Ptr () -> IO ()

-- | Specifies the type of function passed to <a>datasetForeach</a>. It is
--   called with each <tt><i>GQuark</i></tt> id and associated data
--   element, together with the <i><tt>userData</tt></i> parameter supplied
--   to <a>datasetForeach</a>.
type DataForeachFunc_WithClosures = -- | /@keyId@/: the @/GQuark/@ id to identifying the data element. Word32 -> -- | /@data@/: the data element. Ptr () -> -- | /@userData@/: user data passed to 'GI.GLib.Functions.datasetForeach'. 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 <a>GClosure</a>.
genClosure_DataForeachFunc :: MonadIO m => DataForeachFunc -> m (GClosure C_DataForeachFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DataForeachFunc</a>.
mk_DataForeachFunc :: C_DataForeachFunc -> IO (FunPtr C_DataForeachFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DataForeachFunc</a></tt>.
noDataForeachFunc :: Maybe DataForeachFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DataForeachFunc_WithClosures</a></tt>.
noDataForeachFunc_WithClosures :: Maybe DataForeachFunc_WithClosures

-- | Wrap a <a>DataForeachFunc</a> into a <a>C_DataForeachFunc</a>.
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 = 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_WithClosures = -- | /@data@/: the data element. Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DestroyNotify :: DestroyNotify -> DestroyNotify_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_DestroyNotify</a>.
mk_DestroyNotify :: C_DestroyNotify -> IO (FunPtr C_DestroyNotify)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DestroyNotify</a></tt>.
noDestroyNotify :: Maybe DestroyNotify

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DestroyNotify_WithClosures</a></tt>.
noDestroyNotify_WithClosures :: Maybe DestroyNotify_WithClosures

-- | Wrap a <a>DestroyNotify</a> into a <a>C_DestroyNotify</a>.
wrap_DestroyNotify :: Maybe (Ptr (FunPtr C_DestroyNotify)) -> DestroyNotify_WithClosures -> 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 <i><tt>data</tt></i> is a ref-counted object.
type DuplicateFunc = -- | /@data@/: the data to duplicate Ptr () -> -- | __Returns:__ a duplicate of data 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 <i><tt>data</tt></i> is a ref-counted object.
type DuplicateFunc_WithClosures = -- | /@data@/: the data to duplicate Ptr () -> -- | /@userData@/: user data that was specified in --             @/g_datalist_id_dup_data()/@ Ptr () -> -- | __Returns:__ a duplicate of data 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 <a>GClosure</a>.
genClosure_DuplicateFunc :: MonadIO m => DuplicateFunc -> m (GClosure C_DuplicateFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DuplicateFunc</a>.
mk_DuplicateFunc :: C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DuplicateFunc</a></tt>.
noDuplicateFunc :: Maybe DuplicateFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DuplicateFunc_WithClosures</a></tt>.
noDuplicateFunc_WithClosures :: Maybe DuplicateFunc_WithClosures

-- | Wrap a <a>DuplicateFunc</a> into a <a>C_DuplicateFunc</a>.
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 <a>True</a> if both values are equal and
--   <a>False</a> otherwise.
type EqualFunc = -- | /@a@/: a value Ptr () -> -- | __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise IO Bool

-- | Specifies the type of a function used to test two values for equality.
--   The function should return <a>True</a> if both values are equal and
--   <a>False</a> otherwise.
type EqualFunc_WithClosures = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_EqualFunc :: EqualFunc -> EqualFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_EqualFunc</a>.
mk_EqualFunc :: C_EqualFunc -> IO (FunPtr C_EqualFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>EqualFunc</a></tt>.
noEqualFunc :: Maybe EqualFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>EqualFunc_WithClosures</a></tt>.
noEqualFunc_WithClosures :: Maybe EqualFunc_WithClosures

-- | Wrap a <a>EqualFunc</a> into a <a>C_EqualFunc</a>.
wrap_EqualFunc :: Maybe (Ptr (FunPtr C_EqualFunc)) -> EqualFunc_WithClosures -> 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 <a>True</a> if both values are equal and
--   <a>False</a> otherwise.
--   
--   This is a version of <a>EqualFunc</a> which provides a
--   <i><tt>userData</tt></i> closure from the caller.
--   
--   <i>Since: 2.74</i>
type EqualFuncFull = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise IO Bool

-- | Specifies the type of a function used to test two values for equality.
--   The function should return <a>True</a> if both values are equal and
--   <a>False</a> otherwise.
--   
--   This is a version of <a>EqualFunc</a> which provides a
--   <i><tt>userData</tt></i> closure from the caller.
--   
--   <i>Since: 2.74</i>
type EqualFuncFull_WithClosures = -- | /@a@/: a value Ptr () -> -- | /@b@/: a value to compare with Ptr () -> -- | /@userData@/: user data provided by the caller Ptr () -> -- | __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise 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 <a>GClosure</a>.
genClosure_EqualFuncFull :: MonadIO m => EqualFuncFull -> m (GClosure C_EqualFuncFull)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>EqualFuncFull</a></tt>.
noEqualFuncFull :: Maybe EqualFuncFull

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>EqualFuncFull_WithClosures</a></tt>.
noEqualFuncFull_WithClosures :: Maybe EqualFuncFull_WithClosures

-- | Wrap a <a>EqualFuncFull</a> into a <a>C_EqualFuncFull</a>.
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
--   <tt><i>G_DEFINE_EXTENDED_ERROR()</i></tt>, as it already takes care of
--   getting the private data from <i><tt>error</tt></i>.
--   
--   <i>Since: 2.68</i>
type ErrorClearFunc = -- | /@error@/: extended error to clear 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 <a>GClosure</a>.
genClosure_ErrorClearFunc :: MonadIO m => ErrorClearFunc -> m (GClosure C_ErrorClearFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ErrorClearFunc</a></tt>.
noErrorClearFunc :: Maybe ErrorClearFunc

-- | Wrap a <a>ErrorClearFunc</a> into a <a>C_ErrorClearFunc</a>.
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 <i><tt>srcError</tt></i> to <i><tt>destError</tt></i>.
--   
--   Normally, it is better to use
--   <tt><i>G_DEFINE_EXTENDED_ERROR()</i></tt>, as it already takes care of
--   getting the private data from <i><tt>srcError</tt></i> and
--   <i><tt>destError</tt></i>.
--   
--   <i>Since: 2.68</i>
type ErrorCopyFunc = -- | /@srcError@/: source extended error GError -> -- | /@destError@/: destination extended error 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 <a>GClosure</a>.
genClosure_ErrorCopyFunc :: MonadIO m => ErrorCopyFunc -> m (GClosure C_ErrorCopyFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ErrorCopyFunc</a></tt>.
noErrorCopyFunc :: Maybe ErrorCopyFunc

-- | Wrap a <a>ErrorCopyFunc</a> into a <a>C_ErrorCopyFunc</a>.
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 <tt>*_get_private()</tt> function.
--   
--   Normally, it is better to use
--   <tt><i>G_DEFINE_EXTENDED_ERROR()</i></tt>, as it already takes care of
--   getting the private data from <i><tt>error</tt></i>.
--   
--   <i>Since: 2.68</i>
type ErrorInitFunc = -- | /@error@/: extended error 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 <a>GClosure</a>.
genClosure_ErrorInitFunc :: MonadIO m => ErrorInitFunc -> m (GClosure C_ErrorInitFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ErrorInitFunc</a></tt>.
noErrorInitFunc :: Maybe ErrorInitFunc

-- | Wrap a <a>ErrorInitFunc</a> into a <a>C_ErrorInitFunc</a>.
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 = 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_WithClosures = -- | /@data@/: a data pointer Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FreeFunc :: FreeFunc -> FreeFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_FreeFunc</a>.
mk_FreeFunc :: C_FreeFunc -> IO (FunPtr C_FreeFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>FreeFunc</a></tt>.
noFreeFunc :: Maybe FreeFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>FreeFunc_WithClosures</a></tt>.
noFreeFunc_WithClosures :: Maybe FreeFunc_WithClosures

-- | Wrap a <a>FreeFunc</a> into a <a>C_FreeFunc</a>.
wrap_FreeFunc :: Maybe (Ptr (FunPtr C_FreeFunc)) -> FreeFunc_WithClosures -> C_FreeFunc

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

-- | Specifies the type of functions passed to
--   <tt><i>g_list_foreach()</i></tt> and
--   <tt><i>g_slist_foreach()</i></tt>.
type Func = -- | /@data@/: the element\'s data Ptr () -> IO ()

-- | Specifies the type of functions passed to
--   <tt><i>g_list_foreach()</i></tt> and
--   <tt><i>g_slist_foreach()</i></tt>.
type Func_WithClosures = -- | /@data@/: the element\'s data Ptr () -> -- | /@userData@/: user data passed to @/g_list_foreach()/@ or @/g_slist_foreach()/@ 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 <a>GClosure</a>.
genClosure_Func :: MonadIO m => Func -> m (GClosure C_Func)

-- | Generate a function pointer callable from C code, from a
--   <a>C_Func</a>.
mk_Func :: C_Func -> IO (FunPtr C_Func)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>Func</a></tt>.
noFunc :: Maybe Func

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>Func_WithClosures</a></tt>.
noFunc_WithClosures :: Maybe Func_WithClosures

-- | Wrap a <a>Func</a> into a <a>C_Func</a>.
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 <a>hashTableForeach</a>.
--   It is called with each key/value pair, together with the
--   <i><tt>userData</tt></i> parameter which is passed to
--   <a>hashTableForeach</a>.
type HFunc = -- | /@key@/: a key Ptr () -> -- | /@value@/: the value corresponding to the key Ptr () -> IO ()

-- | Specifies the type of the function passed to <a>hashTableForeach</a>.
--   It is called with each key/value pair, together with the
--   <i><tt>userData</tt></i> parameter which is passed to
--   <a>hashTableForeach</a>.
type HFunc_WithClosures = -- | /@key@/: a key Ptr () -> -- | /@value@/: the value corresponding to the key Ptr () -> -- | /@userData@/: user data passed to 'GI.GLib.Functions.hashTableForeach' 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 <a>GClosure</a>.
genClosure_HFunc :: MonadIO m => HFunc -> m (GClosure C_HFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_HFunc</a>.
mk_HFunc :: C_HFunc -> IO (FunPtr C_HFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HFunc</a></tt>.
noHFunc :: Maybe HFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HFunc_WithClosures</a></tt>.
noHFunc_WithClosures :: Maybe HFunc_WithClosures

-- | Wrap a <a>HFunc</a> into a <a>C_HFunc</a>.
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
--   <a>hashTableForeachRemove</a>. It is called with each key/value pair,
--   together with the <i><tt>userData</tt></i> parameter passed to
--   <a>hashTableForeachRemove</a>. It should return <a>True</a> if the
--   key/value pair should be removed from the <a>HashTable</a>.
type HRFunc = -- | /@key@/: a key Ptr () -> -- | /@value@/: the value associated with the key Ptr () -> -- | __Returns:__ 'P.True' if the key\/value pair should be removed from the --     t'GI.GLib.Structs.HashTable.HashTable' IO Bool

-- | Specifies the type of the function passed to
--   <a>hashTableForeachRemove</a>. It is called with each key/value pair,
--   together with the <i><tt>userData</tt></i> parameter passed to
--   <a>hashTableForeachRemove</a>. It should return <a>True</a> if the
--   key/value pair should be removed from the <a>HashTable</a>.
type HRFunc_WithClosures = -- | /@key@/: a key Ptr () -> -- | /@value@/: the value associated with the key Ptr () -> -- | /@userData@/: user data passed to 'GI.GLib.Functions.hashTableRemove' Ptr () -> -- | __Returns:__ 'P.True' if the key\/value pair should be removed from the --     t'GI.GLib.Structs.HashTable.HashTable' 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 <a>GClosure</a>.
genClosure_HRFunc :: MonadIO m => HRFunc -> m (GClosure C_HRFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_HRFunc</a>.
mk_HRFunc :: C_HRFunc -> IO (FunPtr C_HRFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HRFunc</a></tt>.
noHRFunc :: Maybe HRFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HRFunc_WithClosures</a></tt>.
noHRFunc_WithClosures :: Maybe HRFunc_WithClosures

-- | Wrap a <a>HRFunc</a> into a <a>C_HRFunc</a>.
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
--   <tt><i>g_hash_table_new()</i></tt> when a <a>HashTable</a> is created.
--   
--   The function is passed a key and should return a <tt><i>guint</i></tt>
--   hash value. The functions <a>directHash</a>, <a>intHash</a> and
--   <a>strHash</a> provide hash functions which can be used when the key
--   is a <tt><i>gpointer</i></tt>, <tt><i>gint</i></tt>*, and
--   <tt><i>gchar</i></tt>* respectively.
--   
--   <a>directHash</a> is also the appropriate hash function for keys of
--   the form <tt>GINT_TO_POINTER (n)</tt> (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 <a>strHash</a> in that
--   situation might make your application vulnerable to <a>Algorithmic
--   Complexity Attacks</a>.
--   
--   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 = -- | __Returns:__ the hash value corresponding to the key IO Word32

-- | Specifies the type of the hash function which is passed to
--   <tt><i>g_hash_table_new()</i></tt> when a <a>HashTable</a> is created.
--   
--   The function is passed a key and should return a <tt><i>guint</i></tt>
--   hash value. The functions <a>directHash</a>, <a>intHash</a> and
--   <a>strHash</a> provide hash functions which can be used when the key
--   is a <tt><i>gpointer</i></tt>, <tt><i>gint</i></tt>*, and
--   <tt><i>gchar</i></tt>* respectively.
--   
--   <a>directHash</a> is also the appropriate hash function for keys of
--   the form <tt>GINT_TO_POINTER (n)</tt> (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 <a>strHash</a> in that
--   situation might make your application vulnerable to <a>Algorithmic
--   Complexity Attacks</a>.
--   
--   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_WithClosures = -- | /@key@/: a key Ptr () -> -- | __Returns:__ the hash value corresponding to the key IO Word32

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HashFunc :: HashFunc -> HashFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_HashFunc</a>.
mk_HashFunc :: C_HashFunc -> IO (FunPtr C_HashFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HashFunc</a></tt>.
noHashFunc :: Maybe HashFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HashFunc_WithClosures</a></tt>.
noHashFunc_WithClosures :: Maybe HashFunc_WithClosures

-- | Wrap a <a>HashFunc</a> into a <a>C_HashFunc</a>.
wrap_HashFunc :: Maybe (Ptr (FunPtr C_HashFunc)) -> HashFunc_WithClosures -> 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
--   <a>hookListInvokeCheck</a>.
type HookCheckFunc = -- | __Returns:__ 'P.False' if the t'GI.GLib.Structs.Hook.Hook' should be destroyed IO Bool

-- | Defines the type of a hook function that can be invoked by
--   <a>hookListInvokeCheck</a>.
type HookCheckFunc_WithClosures = -- | /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here Ptr () -> -- | __Returns:__ 'P.False' if the t'GI.GLib.Structs.Hook.Hook' should be destroyed IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HookCheckFunc :: HookCheckFunc -> HookCheckFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookCheckFunc</a>.
mk_HookCheckFunc :: C_HookCheckFunc -> IO (FunPtr C_HookCheckFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookCheckFunc</a></tt>.
noHookCheckFunc :: Maybe HookCheckFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookCheckFunc_WithClosures</a></tt>.
noHookCheckFunc_WithClosures :: Maybe HookCheckFunc_WithClosures

-- | Wrap a <a>HookCheckFunc</a> into a <a>C_HookCheckFunc</a>.
wrap_HookCheckFunc :: Maybe (Ptr (FunPtr C_HookCheckFunc)) -> HookCheckFunc_WithClosures -> 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 <a>hookListMarshalCheck</a>.
type HookCheckMarshaller = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> -- | __Returns:__ 'P.False' if /@hook@/ should be destroyed IO Bool

-- | Defines the type of function used by <a>hookListMarshalCheck</a>.
type HookCheckMarshaller_WithClosures = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> -- | /@marshalData@/: user data Ptr () -> -- | __Returns:__ 'P.False' if /@hook@/ should be destroyed IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HookCheckMarshaller :: HookCheckMarshaller -> HookCheckMarshaller_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookCheckMarshaller</a>.
mk_HookCheckMarshaller :: C_HookCheckMarshaller -> IO (FunPtr C_HookCheckMarshaller)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookCheckMarshaller</a></tt>.
noHookCheckMarshaller :: Maybe HookCheckMarshaller

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookCheckMarshaller_WithClosures</a></tt>.
noHookCheckMarshaller_WithClosures :: Maybe HookCheckMarshaller_WithClosures

-- | Wrap a <a>HookCheckMarshaller</a> into a <a>C_HookCheckMarshaller</a>.
wrap_HookCheckMarshaller :: Maybe (Ptr (FunPtr C_HookCheckMarshaller)) -> HookCheckMarshaller_WithClosures -> 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 <a>Hook</a> elements in
--   <a>hookInsertSorted</a>.
type HookCompareFunc = -- | /@newHook@/: the t'GI.GLib.Structs.Hook.Hook' being inserted Hook -> -- | /@sibling@/: the t'GI.GLib.Structs.Hook.Hook' to compare with /@newHook@/ Hook -> -- | __Returns:__ a value \<= 0 if /@newHook@/ should be before /@sibling@/ 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 <a>GClosure</a>.
genClosure_HookCompareFunc :: MonadIO m => HookCompareFunc -> m (GClosure C_HookCompareFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookCompareFunc</a>.
mk_HookCompareFunc :: C_HookCompareFunc -> IO (FunPtr C_HookCompareFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookCompareFunc</a></tt>.
noHookCompareFunc :: Maybe HookCompareFunc

-- | Wrap a <a>HookCompareFunc</a> into a <a>C_HookCompareFunc</a>.
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@/: a t'GI.GLib.Structs.HookList.HookList' HookList -> -- | /@hook@/: the hook in /@hookList@/ that gets finalized 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 <a>GClosure</a>.
genClosure_HookFinalizeFunc :: MonadIO m => HookFinalizeFunc -> m (GClosure C_HookFinalizeFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookFinalizeFunc</a>.
mk_HookFinalizeFunc :: C_HookFinalizeFunc -> IO (FunPtr C_HookFinalizeFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookFinalizeFunc</a></tt>.
noHookFinalizeFunc :: Maybe HookFinalizeFunc

-- | Wrap a <a>HookFinalizeFunc</a> into a <a>C_HookFinalizeFunc</a>.
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
--   <tt><i>g_hook_find()</i></tt>.
type HookFindFunc = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> -- | __Returns:__ 'P.True' if the required t'GI.GLib.Structs.Hook.Hook' has been found IO Bool

-- | Defines the type of the function passed to
--   <tt><i>g_hook_find()</i></tt>.
type HookFindFunc_WithClosures = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> -- | /@data@/: user data passed to @/g_hook_find_func()/@ Ptr () -> -- | __Returns:__ 'P.True' if the required t'GI.GLib.Structs.Hook.Hook' has been found IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HookFindFunc :: HookFindFunc -> HookFindFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookFindFunc</a>.
mk_HookFindFunc :: C_HookFindFunc -> IO (FunPtr C_HookFindFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookFindFunc</a></tt>.
noHookFindFunc :: Maybe HookFindFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookFindFunc_WithClosures</a></tt>.
noHookFindFunc_WithClosures :: Maybe HookFindFunc_WithClosures

-- | Wrap a <a>HookFindFunc</a> into a <a>C_HookFindFunc</a>.
wrap_HookFindFunc :: Maybe (Ptr (FunPtr C_HookFindFunc)) -> HookFindFunc_WithClosures -> 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
--   <a>hookListInvoke</a>.
type HookFunc = IO ()

-- | Defines the type of a hook function that can be invoked by
--   <a>hookListInvoke</a>.
type HookFunc_WithClosures = -- | /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HookFunc :: HookFunc -> HookFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookFunc</a>.
mk_HookFunc :: C_HookFunc -> IO (FunPtr C_HookFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookFunc</a></tt>.
noHookFunc :: Maybe HookFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookFunc_WithClosures</a></tt>.
noHookFunc_WithClosures :: Maybe HookFunc_WithClosures

-- | Wrap a <a>HookFunc</a> into a <a>C_HookFunc</a>.
wrap_HookFunc :: Maybe (Ptr (FunPtr C_HookFunc)) -> HookFunc_WithClosures -> 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 <a>hookListMarshal</a>.
type HookMarshaller = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> IO ()

-- | Defines the type of function used by <a>hookListMarshal</a>.
type HookMarshaller_WithClosures = -- | /@hook@/: a t'GI.GLib.Structs.Hook.Hook' Hook -> -- | /@marshalData@/: user data Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_HookMarshaller :: HookMarshaller -> HookMarshaller_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_HookMarshaller :: MonadIO m => HookMarshaller -> m (GClosure C_HookMarshaller)

-- | Generate a function pointer callable from C code, from a
--   <a>C_HookMarshaller</a>.
mk_HookMarshaller :: C_HookMarshaller -> IO (FunPtr C_HookMarshaller)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookMarshaller</a></tt>.
noHookMarshaller :: Maybe HookMarshaller

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>HookMarshaller_WithClosures</a></tt>.
noHookMarshaller_WithClosures :: Maybe HookMarshaller_WithClosures

-- | Wrap a <a>HookMarshaller</a> into a <a>C_HookMarshaller</a>.
wrap_HookMarshaller :: Maybe (Ptr (FunPtr C_HookMarshaller)) -> HookMarshaller_WithClosures -> 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
--   <tt><i>g_io_add_watch()</i></tt> or <a>ioAddWatch</a>, which is called
--   when the requested condition on a <a>IOChannel</a> is satisfied.
type IOFunc = -- | /@source@/: the t'GI.GLib.Structs.IOChannel.IOChannel' event source IOChannel -> -- | /@condition@/: the condition which has been satisfied [IOCondition] -> -- | __Returns:__ the function should return 'P.False' if the event source --          should be removed IO Bool

-- | Specifies the type of function passed to
--   <tt><i>g_io_add_watch()</i></tt> or <a>ioAddWatch</a>, which is called
--   when the requested condition on a <a>IOChannel</a> is satisfied.
type IOFunc_WithClosures = -- | /@source@/: the t'GI.GLib.Structs.IOChannel.IOChannel' event source IOChannel -> -- | /@condition@/: the condition which has been satisfied [IOCondition] -> -- | /@data@/: user data set in @/g_io_add_watch()/@ or 'GI.GLib.Functions.ioAddWatch' Ptr () -> -- | __Returns:__ the function should return 'P.False' if the event source --          should be removed IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_IOFunc :: IOFunc -> IOFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_IOFunc</a>.
mk_IOFunc :: C_IOFunc -> IO (FunPtr C_IOFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFunc</a></tt>.
noIOFunc :: Maybe IOFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFunc_WithClosures</a></tt>.
noIOFunc_WithClosures :: Maybe IOFunc_WithClosures

-- | Wrap a <a>IOFunc</a> into a <a>C_IOFunc</a>.
wrap_IOFunc :: Maybe (Ptr (FunPtr C_IOFunc)) -> IOFunc_WithClosures -> C_IOFunc

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

-- | <i>No description available in the introspection data.</i>
type IOFuncsIoCloseFieldCallback = IOChannel -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_IOFuncsIoCloseFieldCallback</a>.
mk_IOFuncsIoCloseFieldCallback :: C_IOFuncsIoCloseFieldCallback -> IO (FunPtr C_IOFuncsIoCloseFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoCloseFieldCallback</a></tt>.
noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback

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

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_IOFuncsIoCreateWatchFieldCallback :: MonadIO m => IOFuncsIoCreateWatchFieldCallback -> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_IOFuncsIoCreateWatchFieldCallback</a>.
mk_IOFuncsIoCreateWatchFieldCallback :: C_IOFuncsIoCreateWatchFieldCallback -> IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoCreateWatchFieldCallback</a></tt>.
noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback

-- | Wrap a <a>IOFuncsIoCreateWatchFieldCallback</a> into a
--   <a>C_IOFuncsIoCreateWatchFieldCallback</a>.
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 ()

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_IOFuncsIoFreeFieldCallback :: MonadIO m => IOFuncsIoFreeFieldCallback -> m (GClosure C_IOFuncsIoFreeFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_IOFuncsIoFreeFieldCallback</a>.
mk_IOFuncsIoFreeFieldCallback :: C_IOFuncsIoFreeFieldCallback -> IO (FunPtr C_IOFuncsIoFreeFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoFreeFieldCallback</a></tt>.
noIOFuncsIoFreeFieldCallback :: Maybe IOFuncsIoFreeFieldCallback

-- | Wrap a <a>IOFuncsIoFreeFieldCallback</a> into a
--   <a>C_IOFuncsIoFreeFieldCallback</a>.
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

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_IOFuncsIoGetFlagsFieldCallback :: MonadIO m => IOFuncsIoGetFlagsFieldCallback -> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_IOFuncsIoGetFlagsFieldCallback</a>.
mk_IOFuncsIoGetFlagsFieldCallback :: C_IOFuncsIoGetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoGetFlagsFieldCallback</a></tt>.
noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback

-- | Wrap a <a>IOFuncsIoGetFlagsFieldCallback</a> into a
--   <a>C_IOFuncsIoGetFlagsFieldCallback</a>.
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

-- | <i>No description available in the introspection data.</i>
type IOFuncsIoReadFieldCallback = IOChannel -> Text -> CSize -> CSize -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_IOFuncsIoReadFieldCallback</a>.
mk_IOFuncsIoReadFieldCallback :: C_IOFuncsIoReadFieldCallback -> IO (FunPtr C_IOFuncsIoReadFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoReadFieldCallback</a></tt>.
noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoReadFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOFuncsIoSeekFieldCallback = Ptr IOChannel -> Int64 -> CUInt -> Ptr (Ptr GError) -> IO CUInt

-- | <i>No description available in the introspection data.</i>
type IOFuncsIoSeekFieldCallback = IOChannel -> Int64 -> SeekType -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_IOFuncsIoSeekFieldCallback</a>.
mk_IOFuncsIoSeekFieldCallback :: C_IOFuncsIoSeekFieldCallback -> IO (FunPtr C_IOFuncsIoSeekFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoSeekFieldCallback</a></tt>.
noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback

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

-- | <i>No description available in the introspection data.</i>
type IOFuncsIoSetFlagsFieldCallback = IOChannel -> [IOFlags] -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_IOFuncsIoSetFlagsFieldCallback</a>.
mk_IOFuncsIoSetFlagsFieldCallback :: C_IOFuncsIoSetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoSetFlagsFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoSetFlagsFieldCallback</a></tt>.
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

-- | <i>No description available in the introspection data.</i>
type IOFuncsIoWriteFieldCallback = IOChannel -> Text -> CSize -> CSize -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_IOFuncsIoWriteFieldCallback</a>.
mk_IOFuncsIoWriteFieldCallback :: C_IOFuncsIoWriteFieldCallback -> IO (FunPtr C_IOFuncsIoWriteFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOFuncsIoWriteFieldCallback</a></tt>.
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, <a>logDefaultHandler</a>, automatically
--   appends a new-line character to <i><tt>message</tt></i> when printing
--   it. It is advised that any custom log handler functions behave
--   similarly, so that logging calls in user code do not need modifying to
--   add a new-line character to the message if the log handler is changed.
--   
--   This is not used if structured logging is enabled; see <a>Using
--   Structured Logging</a>.
type LogFunc = -- | /@logDomain@/: the log domain of the message Text -> -- | /@logLevel@/: the log level of the message (including the --   fatal and recursion flags) [LogLevelFlags] -> -- | /@message@/: the message to process Text -> IO ()

-- | Specifies the prototype of log handler functions.
--   
--   The default log handler, <a>logDefaultHandler</a>, automatically
--   appends a new-line character to <i><tt>message</tt></i> when printing
--   it. It is advised that any custom log handler functions behave
--   similarly, so that logging calls in user code do not need modifying to
--   add a new-line character to the message if the log handler is changed.
--   
--   This is not used if structured logging is enabled; see <a>Using
--   Structured Logging</a>.
type LogFunc_WithClosures = -- | /@logDomain@/: the log domain of the message Text -> -- | /@logLevel@/: the log level of the message (including the --   fatal and recursion flags) [LogLevelFlags] -> -- | /@message@/: the message to process Text -> -- | /@userData@/: user data, set in 'GI.GLib.Functions.logSetHandler' 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 -> Text -> [LogLevelFlags] -> Text -> Ptr () -> m ()

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_LogFunc</a>.
mk_LogFunc :: C_LogFunc -> IO (FunPtr C_LogFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>LogFunc</a></tt>.
noLogFunc :: Maybe LogFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>LogFunc_WithClosures</a></tt>.
noLogFunc_WithClosures :: Maybe LogFunc_WithClosures

-- | Wrap a <a>LogFunc</a> into a <a>C_LogFunc</a>.
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 <tt><i>GLogFields</i></tt>, using the standard
--   &lt;<a>https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html</a>
--   field names from journal specification&gt;. See
--   <tt><i>g_log_structured()</i></tt> 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.
--   
--   <i><tt>logLevel</tt></i> is guaranteed to be included in
--   <i><tt>fields</tt></i> as the <tt>PRIORITY</tt> field, but is provided
--   separately for convenience of deciding whether or where to output the
--   log entry.
--   
--   Writer functions should return <a>LogWriterOutputHandled</a> 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
--   <a>LogWriterOutputUnhandled</a>. This allows writer functions to be
--   chained and fall back to simpler handlers in case of failure.
--   
--   <i>Since: 2.50</i>
type LogWriterFunc = -- | /@logLevel@/: log level of the message [LogLevelFlags] -> -- | /@fields@/: fields forming the message [LogField] -> -- | __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully; --   'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise IO LogWriterOutput

-- | Writer function for log entries. A log entry is a collection of one or
--   more <tt><i>GLogFields</i></tt>, using the standard
--   &lt;<a>https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html</a>
--   field names from journal specification&gt;. See
--   <tt><i>g_log_structured()</i></tt> 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.
--   
--   <i><tt>logLevel</tt></i> is guaranteed to be included in
--   <i><tt>fields</tt></i> as the <tt>PRIORITY</tt> field, but is provided
--   separately for convenience of deciding whether or where to output the
--   log entry.
--   
--   Writer functions should return <a>LogWriterOutputHandled</a> 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
--   <a>LogWriterOutputUnhandled</a>. This allows writer functions to be
--   chained and fall back to simpler handlers in case of failure.
--   
--   <i>Since: 2.50</i>
type LogWriterFunc_WithClosures = -- | /@logLevel@/: log level of the message [LogLevelFlags] -> -- | /@fields@/: fields forming the message [LogField] -> -- | /@userData@/: user data passed to 'GI.GLib.Functions.logSetWriterFunc' Ptr () -> -- | __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully; --   'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise 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 <a>GClosure</a>.
genClosure_LogWriterFunc :: MonadIO m => LogWriterFunc -> m (GClosure C_LogWriterFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_LogWriterFunc</a>.
mk_LogWriterFunc :: C_LogWriterFunc -> IO (FunPtr C_LogWriterFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>LogWriterFunc</a></tt>.
noLogWriterFunc :: Maybe LogWriterFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>LogWriterFunc_WithClosures</a></tt>.
noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures

-- | Wrap a <a>LogWriterFunc</a> into a <a>C_LogWriterFunc</a>.
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 ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserEndElementFieldCallback = MarkupParseContext -> Text -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserEndElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Ptr () -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_MarkupParserEndElementFieldCallback</a>.
mk_MarkupParserEndElementFieldCallback :: C_MarkupParserEndElementFieldCallback -> IO (FunPtr C_MarkupParserEndElementFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserEndElementFieldCallback</a></tt>.
noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserEndElementFieldCallback_WithClosures</a></tt>.
noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures

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

-- | <i>No description available in the introspection data.</i>
type MarkupParserErrorFieldCallback = MarkupParseContext -> GError -> IO ()

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MarkupParserErrorFieldCallback :: MonadIO m => MarkupParserErrorFieldCallback -> m (GClosure C_MarkupParserErrorFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MarkupParserErrorFieldCallback</a>.
mk_MarkupParserErrorFieldCallback :: C_MarkupParserErrorFieldCallback -> IO (FunPtr C_MarkupParserErrorFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserErrorFieldCallback</a></tt>.
noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserErrorFieldCallback_WithClosures</a></tt>.
noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures

-- | Wrap a <a>MarkupParserErrorFieldCallback</a> into a
--   <a>C_MarkupParserErrorFieldCallback</a>.
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 ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserPassthroughFieldCallback = MarkupParseContext -> Text -> CSize -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserPassthroughFieldCallback_WithClosures = MarkupParseContext -> Text -> CSize -> Ptr () -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_MarkupParserPassthroughFieldCallback</a>.
mk_MarkupParserPassthroughFieldCallback :: C_MarkupParserPassthroughFieldCallback -> IO (FunPtr C_MarkupParserPassthroughFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserPassthroughFieldCallback</a></tt>.
noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserPassthroughFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserPassthroughFieldCallback_WithClosures</a></tt>.
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 ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserStartElementFieldCallback = MarkupParseContext -> Text -> Text -> Text -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserStartElementFieldCallback_WithClosures = MarkupParseContext -> Text -> Text -> Text -> Ptr () -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_MarkupParserStartElementFieldCallback</a>.
mk_MarkupParserStartElementFieldCallback :: C_MarkupParserStartElementFieldCallback -> IO (FunPtr C_MarkupParserStartElementFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserStartElementFieldCallback</a></tt>.
noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserStartElementFieldCallback_WithClosures</a></tt>.
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 ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserTextFieldCallback = MarkupParseContext -> Text -> CSize -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | <i>No description available in the introspection data.</i>
type MarkupParserTextFieldCallback_WithClosures = MarkupParseContext -> Text -> CSize -> Ptr () -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ 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
--   <a>C_MarkupParserTextFieldCallback</a>.
mk_MarkupParserTextFieldCallback :: C_MarkupParserTextFieldCallback -> IO (FunPtr C_MarkupParserTextFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserTextFieldCallback</a></tt>.
noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MarkupParserTextFieldCallback_WithClosures</a></tt>.
noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures

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

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MemVTableCallocFieldCallback :: MonadIO m => MemVTableCallocFieldCallback -> m (GClosure C_MemVTableCallocFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableCallocFieldCallback</a>.
mk_MemVTableCallocFieldCallback :: C_MemVTableCallocFieldCallback -> IO (FunPtr C_MemVTableCallocFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableCallocFieldCallback</a></tt>.
noMemVTableCallocFieldCallback :: Maybe MemVTableCallocFieldCallback

-- | Wrap a <a>MemVTableCallocFieldCallback</a> into a
--   <a>C_MemVTableCallocFieldCallback</a>.
wrap_MemVTableCallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback)) -> MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback

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

-- | <i>No description available in the introspection data.</i>
type MemVTableFreeFieldCallback = IO ()

-- | <i>No description available in the introspection data.</i>
type MemVTableFreeFieldCallback_WithClosures = Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MemVTableFreeFieldCallback :: MemVTableFreeFieldCallback -> MemVTableFreeFieldCallback_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableFreeFieldCallback</a>.
mk_MemVTableFreeFieldCallback :: C_MemVTableFreeFieldCallback -> IO (FunPtr C_MemVTableFreeFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableFreeFieldCallback</a></tt>.
noMemVTableFreeFieldCallback :: Maybe MemVTableFreeFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableFreeFieldCallback_WithClosures</a></tt>.
noMemVTableFreeFieldCallback_WithClosures :: Maybe MemVTableFreeFieldCallback_WithClosures

-- | Wrap a <a>MemVTableFreeFieldCallback</a> into a
--   <a>C_MemVTableFreeFieldCallback</a>.
wrap_MemVTableFreeFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableFreeFieldCallback)) -> MemVTableFreeFieldCallback_WithClosures -> C_MemVTableFreeFieldCallback

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

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MemVTableMallocFieldCallback :: MonadIO m => MemVTableMallocFieldCallback -> m (GClosure C_MemVTableMallocFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableMallocFieldCallback</a>.
mk_MemVTableMallocFieldCallback :: C_MemVTableMallocFieldCallback -> IO (FunPtr C_MemVTableMallocFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableMallocFieldCallback</a></tt>.
noMemVTableMallocFieldCallback :: Maybe MemVTableMallocFieldCallback

-- | Wrap a <a>MemVTableMallocFieldCallback</a> into a
--   <a>C_MemVTableMallocFieldCallback</a>.
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 ())

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MemVTableReallocFieldCallback :: MonadIO m => MemVTableReallocFieldCallback -> m (GClosure C_MemVTableReallocFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableReallocFieldCallback</a>.
mk_MemVTableReallocFieldCallback :: C_MemVTableReallocFieldCallback -> IO (FunPtr C_MemVTableReallocFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableReallocFieldCallback</a></tt>.
noMemVTableReallocFieldCallback :: Maybe MemVTableReallocFieldCallback

-- | Wrap a <a>MemVTableReallocFieldCallback</a> into a
--   <a>C_MemVTableReallocFieldCallback</a>.
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 ())

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MemVTableTryMallocFieldCallback :: MonadIO m => MemVTableTryMallocFieldCallback -> m (GClosure C_MemVTableTryMallocFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableTryMallocFieldCallback</a>.
mk_MemVTableTryMallocFieldCallback :: C_MemVTableTryMallocFieldCallback -> IO (FunPtr C_MemVTableTryMallocFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableTryMallocFieldCallback</a></tt>.
noMemVTableTryMallocFieldCallback :: Maybe MemVTableTryMallocFieldCallback

-- | Wrap a <a>MemVTableTryMallocFieldCallback</a> into a
--   <a>C_MemVTableTryMallocFieldCallback</a>.
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 ())

-- | <i>No description available in the introspection data.</i>
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 <a>GClosure</a>.
genClosure_MemVTableTryReallocFieldCallback :: MonadIO m => MemVTableTryReallocFieldCallback -> m (GClosure C_MemVTableTryReallocFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_MemVTableTryReallocFieldCallback</a>.
mk_MemVTableTryReallocFieldCallback :: C_MemVTableTryReallocFieldCallback -> IO (FunPtr C_MemVTableTryReallocFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>MemVTableTryReallocFieldCallback</a></tt>.
noMemVTableTryReallocFieldCallback :: Maybe MemVTableTryReallocFieldCallback

-- | Wrap a <a>MemVTableTryReallocFieldCallback</a> into a
--   <a>C_MemVTableTryReallocFieldCallback</a>.
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 <a>nodeChildrenForeach</a>.
--   The function is called with each child node, together with the user
--   data passed to <a>nodeChildrenForeach</a>.
type NodeForeachFunc = -- | /@node@/: a t'GI.GLib.Structs.Node.Node'. Node -> IO ()

-- | Specifies the type of function passed to <a>nodeChildrenForeach</a>.
--   The function is called with each child node, together with the user
--   data passed to <a>nodeChildrenForeach</a>.
type NodeForeachFunc_WithClosures = -- | /@node@/: a t'GI.GLib.Structs.Node.Node'. Node -> -- | /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeChildrenForeach'. Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_NodeForeachFunc :: NodeForeachFunc -> NodeForeachFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_NodeForeachFunc :: MonadIO m => NodeForeachFunc -> m (GClosure C_NodeForeachFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_NodeForeachFunc</a>.
mk_NodeForeachFunc :: C_NodeForeachFunc -> IO (FunPtr C_NodeForeachFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>NodeForeachFunc</a></tt>.
noNodeForeachFunc :: Maybe NodeForeachFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>NodeForeachFunc_WithClosures</a></tt>.
noNodeForeachFunc_WithClosures :: Maybe NodeForeachFunc_WithClosures

-- | Wrap a <a>NodeForeachFunc</a> into a <a>C_NodeForeachFunc</a>.
wrap_NodeForeachFunc :: Maybe (Ptr (FunPtr C_NodeForeachFunc)) -> NodeForeachFunc_WithClosures -> 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 <a>nodeTraverse</a>. The
--   function is called with each of the nodes visited, together with the
--   user data passed to <a>nodeTraverse</a>. If the function returns
--   <a>True</a>, then the traversal is stopped.
type NodeTraverseFunc = -- | /@node@/: a t'GI.GLib.Structs.Node.Node'. Node -> -- | __Returns:__ 'P.True' to stop the traversal. IO Bool

-- | Specifies the type of function passed to <a>nodeTraverse</a>. The
--   function is called with each of the nodes visited, together with the
--   user data passed to <a>nodeTraverse</a>. If the function returns
--   <a>True</a>, then the traversal is stopped.
type NodeTraverseFunc_WithClosures = -- | /@node@/: a t'GI.GLib.Structs.Node.Node'. Node -> -- | /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeTraverse'. Ptr () -> -- | __Returns:__ 'P.True' to stop the traversal. IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_NodeTraverseFunc :: NodeTraverseFunc -> NodeTraverseFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_NodeTraverseFunc</a>.
mk_NodeTraverseFunc :: C_NodeTraverseFunc -> IO (FunPtr C_NodeTraverseFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>NodeTraverseFunc</a></tt>.
noNodeTraverseFunc :: Maybe NodeTraverseFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>NodeTraverseFunc_WithClosures</a></tt>.
noNodeTraverseFunc_WithClosures :: Maybe NodeTraverseFunc_WithClosures

-- | Wrap a <a>NodeTraverseFunc</a> into a <a>C_NodeTraverseFunc</a>.
wrap_NodeTraverseFunc :: Maybe (Ptr (FunPtr C_NodeTraverseFunc)) -> NodeTraverseFunc_WithClosures -> 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
--   <a>OptionArgCallback</a> options.
type OptionArgFunc = -- | /@optionName@/: The name of the option being parsed. This will be either a --  single dash followed by a single letter (for a short name) or two dashes --  followed by a long option name. Text -> -- | /@value@/: The value to be parsed. Text -> -- | __Returns:__ 'P.True' if the option was successfully parsed, 'P.False' if an error --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | The type of function to be passed as callback for
--   <a>OptionArgCallback</a> options.
type OptionArgFunc_WithClosures = -- | /@optionName@/: The name of the option being parsed. This will be either a --  single dash followed by a single letter (for a short name) or two dashes --  followed by a long option name. Text -> -- | /@value@/: The value to be parsed. Text -> -- | /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' Ptr () -> -- | __Returns:__ 'P.True' if the option was successfully parsed, 'P.False' if an error --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_OptionArgFunc :: OptionArgFunc -> OptionArgFunc_WithClosures

-- | 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
--   <a>C_OptionArgFunc</a>.
mk_OptionArgFunc :: C_OptionArgFunc -> IO (FunPtr C_OptionArgFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionArgFunc</a></tt>.
noOptionArgFunc :: Maybe OptionArgFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionArgFunc_WithClosures</a></tt>.
noOptionArgFunc_WithClosures :: Maybe OptionArgFunc_WithClosures

-- | 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 = -- | /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext' OptionContext -> -- | /@group@/: The group to which the function belongs OptionGroup -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | The type of function to be used as callback when a parse error occurs.
type OptionErrorFunc_WithClosures = -- | /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext' OptionContext -> -- | /@group@/: The group to which the function belongs OptionGroup -> -- | /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' Ptr () -> -- | /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_OptionErrorFunc :: OptionErrorFunc -> OptionErrorFunc_WithClosures

-- | 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
--   <a>C_OptionErrorFunc</a>.
mk_OptionErrorFunc :: C_OptionErrorFunc -> IO (FunPtr C_OptionErrorFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionErrorFunc</a></tt>.
noOptionErrorFunc :: Maybe OptionErrorFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionErrorFunc_WithClosures</a></tt>.
noOptionErrorFunc_WithClosures :: Maybe OptionErrorFunc_WithClosures

-- | 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 = -- | /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext' OptionContext -> -- | /@group@/: The group to which the function belongs OptionGroup -> -- | __Returns:__ 'P.True' if the function completed successfully, 'P.False' if an error --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | The type of function that can be called before and after parsing.
type OptionParseFunc_WithClosures = -- | /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext' OptionContext -> -- | /@group@/: The group to which the function belongs OptionGroup -> -- | /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew' Ptr () -> -- | __Returns:__ 'P.True' if the function completed successfully, 'P.False' if an error --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/ IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_OptionParseFunc :: OptionParseFunc -> OptionParseFunc_WithClosures

-- | 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
--   <a>C_OptionParseFunc</a>.
mk_OptionParseFunc :: C_OptionParseFunc -> IO (FunPtr C_OptionParseFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionParseFunc</a></tt>.
noOptionParseFunc :: Maybe OptionParseFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>OptionParseFunc_WithClosures</a></tt>.
noOptionParseFunc_WithClosures :: Maybe OptionParseFunc_WithClosures

-- | 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
--   <tt><i>g_main_context_set_poll_func()</i></tt>. The semantics of the
--   function should match those of the <tt><i>poll()</i></tt> system call.
type PollFunc = -- | /@ufds@/: an array of t'GI.GLib.Structs.PollFD.PollFD' elements PollFD -> -- | /@nfsd@/: the number of elements in /@ufds@/ Word32 -> -- | /@timeout_@/: the maximum time to wait for an event of the file descriptors. --     A negative value indicates an infinite timeout. Int32 -> -- | __Returns:__ the number of t'GI.GLib.Structs.PollFD.PollFD' elements which have events or errors --     reported, or -1 if an error occurred. 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 <a>GClosure</a>.
genClosure_PollFunc :: MonadIO m => PollFunc -> m (GClosure C_PollFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PollFunc</a>.
mk_PollFunc :: C_PollFunc -> IO (FunPtr C_PollFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PollFunc</a></tt>.
noPollFunc :: Maybe PollFunc

-- | Wrap a <a>PollFunc</a> into a <a>C_PollFunc</a>.
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 = -- | /@string@/: the message to output 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 <a>GClosure</a>.
genClosure_PrintFunc :: MonadIO m => PrintFunc -> m (GClosure C_PrintFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PrintFunc</a>.
mk_PrintFunc :: C_PrintFunc -> IO (FunPtr C_PrintFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PrintFunc</a></tt>.
noPrintFunc :: Maybe PrintFunc

-- | Wrap a <a>PrintFunc</a> into a <a>C_PrintFunc</a>.
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 <a>regexReplaceEval</a>.
--   It is called for each occurrence of the pattern in the string passed
--   to <a>regexReplaceEval</a>, and it should append the replacement to
--   <i><tt>result</tt></i>.
--   
--   <i>Since: 2.14</i>
type RegexEvalCallback = -- | /@matchInfo@/: the t'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match. --     Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you --     need the t'GI.GLib.Structs.Regex.Regex' or the matched string. MatchInfo -> -- | /@result@/: a t'GI.GLib.Structs.String.String' containing the new string String -> -- | __Returns:__ 'P.False' to continue the replacement process, 'P.True' to stop it IO Bool

-- | Specifies the type of the function passed to <a>regexReplaceEval</a>.
--   It is called for each occurrence of the pattern in the string passed
--   to <a>regexReplaceEval</a>, and it should append the replacement to
--   <i><tt>result</tt></i>.
--   
--   <i>Since: 2.14</i>
type RegexEvalCallback_WithClosures = -- | /@matchInfo@/: the t'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match. --     Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you --     need the t'GI.GLib.Structs.Regex.Regex' or the matched string. MatchInfo -> -- | /@result@/: a t'GI.GLib.Structs.String.String' containing the new string String -> -- | /@userData@/: user data passed to 'GI.GLib.Structs.Regex.regexReplaceEval' Ptr () -> -- | __Returns:__ 'P.False' to continue the replacement process, 'P.True' to stop it 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 <a>GClosure</a>.
genClosure_RegexEvalCallback :: MonadIO m => RegexEvalCallback -> m (GClosure C_RegexEvalCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_RegexEvalCallback</a>.
mk_RegexEvalCallback :: C_RegexEvalCallback -> IO (FunPtr C_RegexEvalCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>RegexEvalCallback</a></tt>.
noRegexEvalCallback :: Maybe RegexEvalCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>RegexEvalCallback_WithClosures</a></tt>.
noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures

-- | Wrap a <a>RegexEvalCallback</a> into a <a>C_RegexEvalCallback</a>.
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@/: a t'GI.GLib.Structs.Scanner.Scanner' Scanner -> -- | /@message@/: the message Text -> -- | /@error@/: 'P.True' if the message signals an error, --     'P.False' if it signals a warning. 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 <a>GClosure</a>.
genClosure_ScannerMsgFunc :: MonadIO m => ScannerMsgFunc -> m (GClosure C_ScannerMsgFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ScannerMsgFunc</a>.
mk_ScannerMsgFunc :: C_ScannerMsgFunc -> IO (FunPtr C_ScannerMsgFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ScannerMsgFunc</a></tt>.
noScannerMsgFunc :: Maybe ScannerMsgFunc

-- | Wrap a <a>ScannerMsgFunc</a> into a <a>C_ScannerMsgFunc</a>.
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 <a>SequenceIterCompareFunc</a> is a function used to compare
--   iterators. It must return zero if the iterators compare equal, a
--   negative value if <i><tt>a</tt></i> comes before <i><tt>b</tt></i>,
--   and a positive value if <i><tt>b</tt></i> comes before
--   <i><tt>a</tt></i>.
type SequenceIterCompareFunc = -- | /@a@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter' SequenceIter -> -- | /@b@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter' SequenceIter -> -- | __Returns:__ zero if the iterators are equal, a negative value if /@a@/ --     comes before /@b@/, and a positive value if /@b@/ comes before /@a@/. IO Int32

-- | A <a>SequenceIterCompareFunc</a> is a function used to compare
--   iterators. It must return zero if the iterators compare equal, a
--   negative value if <i><tt>a</tt></i> comes before <i><tt>b</tt></i>,
--   and a positive value if <i><tt>b</tt></i> comes before
--   <i><tt>a</tt></i>.
type SequenceIterCompareFunc_WithClosures = -- | /@a@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter' SequenceIter -> -- | /@b@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter' SequenceIter -> -- | /@data@/: user data Ptr () -> -- | __Returns:__ zero if the iterators are equal, a negative value if /@a@/ --     comes before /@b@/, and a positive value if /@b@/ comes before /@a@/. IO Int32

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SequenceIterCompareFunc :: SequenceIterCompareFunc -> SequenceIterCompareFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_SequenceIterCompareFunc</a>.
mk_SequenceIterCompareFunc :: C_SequenceIterCompareFunc -> IO (FunPtr C_SequenceIterCompareFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SequenceIterCompareFunc</a></tt>.
noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SequenceIterCompareFunc_WithClosures</a></tt>.
noSequenceIterCompareFunc_WithClosures :: Maybe SequenceIterCompareFunc_WithClosures

-- | Wrap a <a>SequenceIterCompareFunc</a> into a
--   <a>C_SequenceIterCompareFunc</a>.
wrap_SequenceIterCompareFunc :: Maybe (Ptr (FunPtr C_SequenceIterCompareFunc)) -> SequenceIterCompareFunc_WithClosures -> C_SequenceIterCompareFunc

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

-- | <i>No description available in the introspection data.</i>
type SourceCallbackFuncsRefFieldCallback = IO ()

-- | <i>No description available in the introspection data.</i>
type SourceCallbackFuncsRefFieldCallback_WithClosures = Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SourceCallbackFuncsRefFieldCallback :: SourceCallbackFuncsRefFieldCallback -> SourceCallbackFuncsRefFieldCallback_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceCallbackFuncsRefFieldCallback</a>.
mk_SourceCallbackFuncsRefFieldCallback :: C_SourceCallbackFuncsRefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsRefFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceCallbackFuncsRefFieldCallback</a></tt>.
noSourceCallbackFuncsRefFieldCallback :: Maybe SourceCallbackFuncsRefFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceCallbackFuncsRefFieldCallback_WithClosures</a></tt>.
noSourceCallbackFuncsRefFieldCallback_WithClosures :: Maybe SourceCallbackFuncsRefFieldCallback_WithClosures

-- | Wrap a <a>SourceCallbackFuncsRefFieldCallback</a> into a
--   <a>C_SourceCallbackFuncsRefFieldCallback</a>.
wrap_SourceCallbackFuncsRefFieldCallback :: Maybe (Ptr (FunPtr C_SourceCallbackFuncsRefFieldCallback)) -> SourceCallbackFuncsRefFieldCallback_WithClosures -> C_SourceCallbackFuncsRefFieldCallback

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

-- | <i>No description available in the introspection data.</i>
type SourceCallbackFuncsUnrefFieldCallback = IO ()

-- | <i>No description available in the introspection data.</i>
type SourceCallbackFuncsUnrefFieldCallback_WithClosures = Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SourceCallbackFuncsUnrefFieldCallback :: SourceCallbackFuncsUnrefFieldCallback -> SourceCallbackFuncsUnrefFieldCallback_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceCallbackFuncsUnrefFieldCallback</a>.
mk_SourceCallbackFuncsUnrefFieldCallback :: C_SourceCallbackFuncsUnrefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceCallbackFuncsUnrefFieldCallback</a></tt>.
noSourceCallbackFuncsUnrefFieldCallback :: Maybe SourceCallbackFuncsUnrefFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceCallbackFuncsUnrefFieldCallback_WithClosures</a></tt>.
noSourceCallbackFuncsUnrefFieldCallback_WithClosures :: Maybe SourceCallbackFuncsUnrefFieldCallback_WithClosures

-- | Wrap a <a>SourceCallbackFuncsUnrefFieldCallback</a> into a
--   <a>C_SourceCallbackFuncsUnrefFieldCallback</a>.
wrap_SourceCallbackFuncsUnrefFieldCallback :: Maybe (Ptr (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)) -> SourceCallbackFuncsUnrefFieldCallback_WithClosures -> C_SourceCallbackFuncsUnrefFieldCallback

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

-- | Dispose function for <i><tt>source</tt></i>. See
--   <tt><i>g_source_set_dispose_function()</i></tt> for details.
--   
--   <i>Since: 2.64</i>
type SourceDisposeFunc = -- | /@source@/: t'GI.GLib.Structs.Source.Source' that is currently being disposed 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 <a>GClosure</a>.
genClosure_SourceDisposeFunc :: MonadIO m => SourceDisposeFunc -> m (GClosure C_SourceDisposeFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceDisposeFunc</a></tt>.
noSourceDisposeFunc :: Maybe SourceDisposeFunc

-- | Wrap a <a>SourceDisposeFunc</a> into a <a>C_SourceDisposeFunc</a>.
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 <tt><i>GClosureMarshal</i></tt>, 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 <a>GClosure</a>.
genClosure_SourceDummyMarshal :: MonadIO m => SourceDummyMarshal -> m (GClosure C_SourceDummyMarshal)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceDummyMarshal</a>.
mk_SourceDummyMarshal :: C_SourceDummyMarshal -> IO (FunPtr C_SourceDummyMarshal)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceDummyMarshal</a></tt>.
noSourceDummyMarshal :: Maybe SourceDummyMarshal

-- | Wrap a <a>SourceDummyMarshal</a> into a <a>C_SourceDummyMarshal</a>.
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
--   <tt><i>g_timeout_add()</i></tt>, <a>timeoutAdd</a>,
--   <tt><i>g_idle_add()</i></tt>, and <a>idleAdd</a>.
--   
--   When calling <a>sourceSetCallback</a>, you may need to cast a function
--   of a different type to this type. Use <tt><i>G_SOURCE_FUNC()</i></tt>
--   to avoid warnings about incompatible function types.
type SourceFunc = -- | __Returns:__ 'P.False' if the source should be removed. 'GI.GLib.Constants.SOURCE_CONTINUE' and -- 'GI.GLib.Constants.SOURCE_REMOVE' are more memorable names for the return value. IO Bool

-- | Specifies the type of function passed to
--   <tt><i>g_timeout_add()</i></tt>, <a>timeoutAdd</a>,
--   <tt><i>g_idle_add()</i></tt>, and <a>idleAdd</a>.
--   
--   When calling <a>sourceSetCallback</a>, you may need to cast a function
--   of a different type to this type. Use <tt><i>G_SOURCE_FUNC()</i></tt>
--   to avoid warnings about incompatible function types.
type SourceFunc_WithClosures = -- | /@userData@/: data passed to the function, set when the source was --     created with one of the above functions Ptr () -> -- | __Returns:__ 'P.False' if the source should be removed. 'GI.GLib.Constants.SOURCE_CONTINUE' and -- 'GI.GLib.Constants.SOURCE_REMOVE' are more memorable names for the return value. 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 <a>GClosure</a>.
genClosure_SourceFunc :: MonadIO m => SourceFunc -> m (GClosure C_SourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceFunc</a>.
mk_SourceFunc :: C_SourceFunc -> IO (FunPtr C_SourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceFunc</a></tt>.
noSourceFunc :: Maybe SourceFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceFunc_WithClosures</a></tt>.
noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures

-- | Wrap a <a>SourceFunc</a> into a <a>C_SourceFunc</a>.
wrap_SourceFunc :: Maybe (Ptr (FunPtr C_SourceFunc)) -> SourceFunc_WithClosures -> C_SourceFunc

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

-- | <i>No description available in the introspection data.</i>
type SourceFuncsCheckFieldCallback = Source -> IO Bool

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

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SourceFuncsCheckFieldCallback :: MonadIO m => SourceFuncsCheckFieldCallback -> m (GClosure C_SourceFuncsCheckFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceFuncsCheckFieldCallback</a>.
mk_SourceFuncsCheckFieldCallback :: C_SourceFuncsCheckFieldCallback -> IO (FunPtr C_SourceFuncsCheckFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceFuncsCheckFieldCallback</a></tt>.
noSourceFuncsCheckFieldCallback :: Maybe SourceFuncsCheckFieldCallback

-- | Wrap a <a>SourceFuncsCheckFieldCallback</a> into a
--   <a>C_SourceFuncsCheckFieldCallback</a>.
wrap_SourceFuncsCheckFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback)) -> SourceFuncsCheckFieldCallback -> C_SourceFuncsCheckFieldCallback

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

-- | <i>No description available in the introspection data.</i>
type SourceFuncsFinalizeFieldCallback = Source -> IO ()

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

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SourceFuncsFinalizeFieldCallback :: MonadIO m => SourceFuncsFinalizeFieldCallback -> m (GClosure C_SourceFuncsFinalizeFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceFuncsFinalizeFieldCallback</a>.
mk_SourceFuncsFinalizeFieldCallback :: C_SourceFuncsFinalizeFieldCallback -> IO (FunPtr C_SourceFuncsFinalizeFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceFuncsFinalizeFieldCallback</a></tt>.
noSourceFuncsFinalizeFieldCallback :: Maybe SourceFuncsFinalizeFieldCallback

-- | Wrap a <a>SourceFuncsFinalizeFieldCallback</a> into a
--   <a>C_SourceFuncsFinalizeFieldCallback</a>.
wrap_SourceFuncsFinalizeFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback)) -> SourceFuncsFinalizeFieldCallback -> C_SourceFuncsFinalizeFieldCallback

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

-- | <i>No description available in the introspection data.</i>
type SourceFuncsPrepareFieldCallback = Source -> Int32 -> IO Bool

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

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SourceFuncsPrepareFieldCallback :: MonadIO m => SourceFuncsPrepareFieldCallback -> m (GClosure C_SourceFuncsPrepareFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SourceFuncsPrepareFieldCallback</a>.
mk_SourceFuncsPrepareFieldCallback :: C_SourceFuncsPrepareFieldCallback -> IO (FunPtr C_SourceFuncsPrepareFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceFuncsPrepareFieldCallback</a></tt>.
noSourceFuncsPrepareFieldCallback :: Maybe SourceFuncsPrepareFieldCallback

-- | Wrap a <a>SourceFuncsPrepareFieldCallback</a> into a
--   <a>C_SourceFuncsPrepareFieldCallback</a>.
wrap_SourceFuncsPrepareFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback)) -> SourceFuncsPrepareFieldCallback -> C_SourceFuncsPrepareFieldCallback

-- | 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: <tt><i>g_idle_add_once()</i></tt>,
--   <tt><i>g_timeout_add_once()</i></tt>
--   
--   <i>Since: 2.74</i>
type SourceOnceFunc = IO ()

-- | A source function that is only called once before being removed from
--   the main context automatically.
--   
--   See: <tt><i>g_idle_add_once()</i></tt>,
--   <tt><i>g_timeout_add_once()</i></tt>
--   
--   <i>Since: 2.74</i>
type SourceOnceFunc_WithClosures = -- | /@userData@/: data passed to the function, set when the source was --   created 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 <a>GClosure</a>.
genClosure_SourceOnceFunc :: MonadIO m => SourceOnceFunc -> m (GClosure C_SourceOnceFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceOnceFunc</a></tt>.
noSourceOnceFunc :: Maybe SourceOnceFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SourceOnceFunc_WithClosures</a></tt>.
noSourceOnceFunc_WithClosures :: Maybe SourceOnceFunc_WithClosures

-- | Wrap a <a>SourceOnceFunc</a> into a <a>C_SourceOnceFunc</a>.
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 <a>spawnAsync</a>,
--   <a>spawnSync</a> and <a>spawnAsyncWithPipes</a>, 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
--   <tt><i>exec()</i></tt>. 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 <a>SpawnChildSetupFunc</a>, because any mutexes that
--   were held by other threads in the parent process at the time of the
--   <tt><i>fork()</i></tt> 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
--   <tt><i>fork()</i></tt> and <tt><i>exec()</i></tt>, which drastically
--   limits the usefulness of child setup functions.
--   
--   In particular, it is not safe to call any function which may call
--   <tt><i>malloc()</i></tt>, which includes POSIX functions such as
--   <tt><i>setenv()</i></tt>. If you need to set up the child environment
--   differently from the parent, you should use <a>getEnviron</a>,
--   <a>environSetenv</a>, and <a>environUnsetenv</a>, and then pass the
--   complete environment list to the <tt>g_spawn...</tt> function.
type SpawnChildSetupFunc = IO ()

-- | Specifies the type of the setup function passed to <a>spawnAsync</a>,
--   <a>spawnSync</a> and <a>spawnAsyncWithPipes</a>, 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
--   <tt><i>exec()</i></tt>. 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 <a>SpawnChildSetupFunc</a>, because any mutexes that
--   were held by other threads in the parent process at the time of the
--   <tt><i>fork()</i></tt> 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
--   <tt><i>fork()</i></tt> and <tt><i>exec()</i></tt>, which drastically
--   limits the usefulness of child setup functions.
--   
--   In particular, it is not safe to call any function which may call
--   <tt><i>malloc()</i></tt>, which includes POSIX functions such as
--   <tt><i>setenv()</i></tt>. If you need to set up the child environment
--   differently from the parent, you should use <a>getEnviron</a>,
--   <a>environSetenv</a>, and <a>environUnsetenv</a>, and then pass the
--   complete environment list to the <tt>g_spawn...</tt> function.
type SpawnChildSetupFunc_WithClosures = -- | /@data@/: user data passed to the function. Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SpawnChildSetupFunc :: SpawnChildSetupFunc -> SpawnChildSetupFunc_WithClosures

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

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SpawnChildSetupFunc :: MonadIO m => SpawnChildSetupFunc -> m (GClosure C_SpawnChildSetupFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SpawnChildSetupFunc</a>.
mk_SpawnChildSetupFunc :: C_SpawnChildSetupFunc -> IO (FunPtr C_SpawnChildSetupFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SpawnChildSetupFunc</a></tt>.
noSpawnChildSetupFunc :: Maybe SpawnChildSetupFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SpawnChildSetupFunc_WithClosures</a></tt>.
noSpawnChildSetupFunc_WithClosures :: Maybe SpawnChildSetupFunc_WithClosures

-- | Wrap a <a>SpawnChildSetupFunc</a> into a <a>C_SpawnChildSetupFunc</a>.
wrap_SpawnChildSetupFunc :: Maybe (Ptr (FunPtr C_SpawnChildSetupFunc)) -> SpawnChildSetupFunc_WithClosures -> C_SpawnChildSetupFunc

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

-- | The type used for test case functions that take an extra pointer
--   argument.
--   
--   <i>Since: 2.28</i>
type TestDataFunc = IO ()

-- | The type used for test case functions that take an extra pointer
--   argument.
--   
--   <i>Since: 2.28</i>
type TestDataFunc_WithClosures = -- | /@userData@/: the data provided when registering the test 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 <a>GClosure</a>.
genClosure_TestDataFunc :: MonadIO m => TestDataFunc -> m (GClosure C_TestDataFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_TestDataFunc</a>.
mk_TestDataFunc :: C_TestDataFunc -> IO (FunPtr C_TestDataFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestDataFunc</a></tt>.
noTestDataFunc :: Maybe TestDataFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestDataFunc_WithClosures</a></tt>.
noTestDataFunc_WithClosures :: Maybe TestDataFunc_WithClosures

-- | Wrap a <a>TestDataFunc</a> into a <a>C_TestDataFunc</a>.
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.
--   
--   <i><tt>userData</tt></i> is a pointer to the data that was given when
--   registering the test case.
--   
--   <i><tt>fixture</tt></i> 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 <i><tt>fixture</tt></i> will be equal to
--   <i><tt>userData</tt></i>.
--   
--   <i>Since: 2.28</i>
type TestFixtureFunc = -- | /@fixture@/: the test fixture 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.
--   
--   <i><tt>userData</tt></i> is a pointer to the data that was given when
--   registering the test case.
--   
--   <i><tt>fixture</tt></i> 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 <i><tt>fixture</tt></i> will be equal to
--   <i><tt>userData</tt></i>.
--   
--   <i>Since: 2.28</i>
type TestFixtureFunc_WithClosures = -- | /@fixture@/: the test fixture Ptr () -> -- | /@userData@/: the data provided when registering the test 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 <a>GClosure</a>.
genClosure_TestFixtureFunc :: MonadIO m => TestFixtureFunc -> m (GClosure C_TestFixtureFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_TestFixtureFunc</a>.
mk_TestFixtureFunc :: C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestFixtureFunc</a></tt>.
noTestFixtureFunc :: Maybe TestFixtureFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestFixtureFunc_WithClosures</a></tt>.
noTestFixtureFunc_WithClosures :: Maybe TestFixtureFunc_WithClosures

-- | Wrap a <a>TestFixtureFunc</a> into a <a>C_TestFixtureFunc</a>.
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.
--   
--   <i>Since: 2.28</i>
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 <a>GClosure</a>.
genClosure_TestFunc :: MonadIO m => TestFunc -> m (GClosure C_TestFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_TestFunc</a>.
mk_TestFunc :: C_TestFunc -> IO (FunPtr C_TestFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestFunc</a></tt>.
noTestFunc :: Maybe TestFunc

-- | Wrap a <a>TestFunc</a> into a <a>C_TestFunc</a>.
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.
--   
--   <i>Since: 2.22</i>
type TestLogFatalFunc = -- | /@logDomain@/: the log domain of the message Text -> -- | /@logLevel@/: the log level of the message (including the fatal and recursion flags) [LogLevelFlags] -> -- | /@message@/: the message to process Text -> -- | __Returns:__ 'P.True' if the program should abort, 'P.False' otherwise IO Bool

-- | Specifies the prototype of fatal log handler functions.
--   
--   <i>Since: 2.22</i>
type TestLogFatalFunc_WithClosures = -- | /@logDomain@/: the log domain of the message Text -> -- | /@logLevel@/: the log level of the message (including the fatal and recursion flags) [LogLevelFlags] -> -- | /@message@/: the message to process Text -> -- | /@userData@/: user data, set in @/g_test_log_set_fatal_handler()/@ Ptr () -> -- | __Returns:__ 'P.True' if the program should abort, 'P.False' otherwise 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 <a>GClosure</a>.
genClosure_TestLogFatalFunc :: MonadIO m => TestLogFatalFunc -> m (GClosure C_TestLogFatalFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_TestLogFatalFunc</a>.
mk_TestLogFatalFunc :: C_TestLogFatalFunc -> IO (FunPtr C_TestLogFatalFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestLogFatalFunc</a></tt>.
noTestLogFatalFunc :: Maybe TestLogFatalFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TestLogFatalFunc_WithClosures</a></tt>.
noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures

-- | Wrap a <a>TestLogFatalFunc</a> into a <a>C_TestLogFatalFunc</a>.
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 <i><tt>func</tt></i> functions passed to
--   <a>threadNew</a> or <a>threadTryNew</a>.
type ThreadFunc = -- | __Returns:__ the return value of the thread IO (Ptr ())

-- | Specifies the type of the <i><tt>func</tt></i> functions passed to
--   <a>threadNew</a> or <a>threadTryNew</a>.
type ThreadFunc_WithClosures = -- | /@data@/: data passed to the thread Ptr () -> -- | __Returns:__ the return value of the thread IO (Ptr ())

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ThreadFunc :: ThreadFunc -> ThreadFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_ThreadFunc</a>.
mk_ThreadFunc :: C_ThreadFunc -> IO (FunPtr C_ThreadFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ThreadFunc</a></tt>.
noThreadFunc :: Maybe ThreadFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ThreadFunc_WithClosures</a></tt>.
noThreadFunc_WithClosures :: Maybe ThreadFunc_WithClosures

-- | Wrap a <a>ThreadFunc</a> into a <a>C_ThreadFunc</a>.
wrap_ThreadFunc :: Maybe (Ptr (FunPtr C_ThreadFunc)) -> ThreadFunc_WithClosures -> 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 &lt;option&gt;--help&lt;/option&gt; output.
type TranslateFunc = -- | /@str@/: the untranslated string Text -> -- | __Returns:__ a translation of the string for the current locale. --  The returned string is owned by GLib and must not be freed. IO Text

-- | The type of functions which are used to translate user-visible
--   strings, for &lt;option&gt;--help&lt;/option&gt; output.
type TranslateFunc_WithClosures = -- | /@str@/: the untranslated string Text -> -- | /@data@/: user data specified when installing the function, e.g. --  in 'GI.GLib.Structs.OptionGroup.optionGroupSetTranslateFunc' Ptr () -> -- | __Returns:__ a translation of the string for the current locale. --  The returned string is owned by GLib and must not be freed. IO Text

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TranslateFunc :: TranslateFunc -> TranslateFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_TranslateFunc</a>.
mk_TranslateFunc :: C_TranslateFunc -> IO (FunPtr C_TranslateFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TranslateFunc</a></tt>.
noTranslateFunc :: Maybe TranslateFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TranslateFunc_WithClosures</a></tt>.
noTranslateFunc_WithClosures :: Maybe TranslateFunc_WithClosures

-- | Wrap a <a>TranslateFunc</a> into a <a>C_TranslateFunc</a>.
wrap_TranslateFunc :: Maybe (Ptr (FunPtr C_TranslateFunc)) -> TranslateFunc_WithClosures -> 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 <a>treeTraverse</a>. It is
--   passed the key and value of each node, together with the
--   <i><tt>userData</tt></i> parameter passed to <a>treeTraverse</a>. If
--   the function returns <a>True</a>, the traversal is stopped.
type TraverseFunc = -- | /@key@/: a key of a t'GI.GLib.Structs.Tree.Tree' node Ptr () -> -- | /@value@/: the value corresponding to the key Ptr () -> -- | __Returns:__ 'P.True' to stop the traversal IO Bool

-- | Specifies the type of function passed to <a>treeTraverse</a>. It is
--   passed the key and value of each node, together with the
--   <i><tt>userData</tt></i> parameter passed to <a>treeTraverse</a>. If
--   the function returns <a>True</a>, the traversal is stopped.
type TraverseFunc_WithClosures = -- | /@key@/: a key of a t'GI.GLib.Structs.Tree.Tree' node Ptr () -> -- | /@value@/: the value corresponding to the key Ptr () -> -- | /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeTraverse' Ptr () -> -- | __Returns:__ 'P.True' to stop the traversal IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TraverseFunc :: TraverseFunc -> TraverseFunc_WithClosures

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

-- | Generate a function pointer callable from C code, from a
--   <a>C_TraverseFunc</a>.
mk_TraverseFunc :: C_TraverseFunc -> IO (FunPtr C_TraverseFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TraverseFunc</a></tt>.
noTraverseFunc :: Maybe TraverseFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TraverseFunc_WithClosures</a></tt>.
noTraverseFunc_WithClosures :: Maybe TraverseFunc_WithClosures

-- | Wrap a <a>TraverseFunc</a> into a <a>C_TraverseFunc</a>.
wrap_TraverseFunc :: Maybe (Ptr (FunPtr C_TraverseFunc)) -> TraverseFunc_WithClosures -> 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 <a>treeForeachNode</a>. It is
--   passed each node, together with the <i><tt>userData</tt></i> parameter
--   passed to <a>treeForeachNode</a>. If the function returns <a>True</a>,
--   the traversal is stopped.
--   
--   <i>Since: 2.68</i>
type TraverseNodeFunc = -- | /@node@/: a t'GI.GLib.Structs.TreeNode.TreeNode' TreeNode -> -- | __Returns:__ 'P.True' to stop the traversal IO Bool

-- | Specifies the type of function passed to <a>treeForeachNode</a>. It is
--   passed each node, together with the <i><tt>userData</tt></i> parameter
--   passed to <a>treeForeachNode</a>. If the function returns <a>True</a>,
--   the traversal is stopped.
--   
--   <i>Since: 2.68</i>
type TraverseNodeFunc_WithClosures = -- | /@node@/: a t'GI.GLib.Structs.TreeNode.TreeNode' TreeNode -> -- | /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeForeachNode' Ptr () -> -- | __Returns:__ 'P.True' to stop the traversal IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TraverseNodeFunc :: TraverseNodeFunc -> TraverseNodeFunc_WithClosures

-- | 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 <a>GClosure</a>.
genClosure_TraverseNodeFunc :: MonadIO m => TraverseNodeFunc -> m (GClosure C_TraverseNodeFunc)

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

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TraverseNodeFunc</a></tt>.
noTraverseNodeFunc :: Maybe TraverseNodeFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TraverseNodeFunc_WithClosures</a></tt>.
noTraverseNodeFunc_WithClosures :: Maybe TraverseNodeFunc_WithClosures

-- | Wrap a <a>TraverseNodeFunc</a> into a <a>C_TraverseNodeFunc</a>.
wrap_TraverseNodeFunc :: Maybe (Ptr (FunPtr C_TraverseNodeFunc)) -> TraverseNodeFunc_WithClosures -> 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 = -- | /@fd@/: the fd that triggered the event Int32 -> -- | /@condition@/: the IO conditions reported on /@fd@/ [IOCondition] -> -- | __Returns:__ 'P.False' if the source should be removed IO Bool

-- | The type of functions to be called when a UNIX fd watch source
--   triggers.
type UnixFDSourceFunc_WithClosures = -- | /@fd@/: the fd that triggered the event Int32 -> -- | /@condition@/: the IO conditions reported on /@fd@/ [IOCondition] -> -- | /@userData@/: user data passed to @/g_unix_fd_add()/@ Ptr () -> -- | __Returns:__ 'P.False' if the source should be removed 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 <a>GClosure</a>.
genClosure_UnixFDSourceFunc :: MonadIO m => UnixFDSourceFunc -> m (GClosure C_UnixFDSourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_UnixFDSourceFunc</a>.
mk_UnixFDSourceFunc :: C_UnixFDSourceFunc -> IO (FunPtr C_UnixFDSourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>UnixFDSourceFunc</a></tt>.
noUnixFDSourceFunc :: Maybe UnixFDSourceFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>UnixFDSourceFunc_WithClosures</a></tt>.
noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures

-- | Wrap a <a>UnixFDSourceFunc</a> into a <a>C_UnixFDSourceFunc</a>.
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
--   <a>atexit</a>.
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 <a>GClosure</a>.
genClosure_VoidFunc :: MonadIO m => VoidFunc -> m (GClosure C_VoidFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_VoidFunc</a>.
mk_VoidFunc :: C_VoidFunc -> IO (FunPtr C_VoidFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>VoidFunc</a></tt>.
noVoidFunc :: Maybe VoidFunc

-- | Wrap a <a>VoidFunc</a> into a <a>C_VoidFunc</a>.
wrap_VoidFunc :: Maybe (Ptr (FunPtr C_VoidFunc)) -> VoidFunc -> C_VoidFunc


-- | The GTree struct is an opaque data structure representing a [balanced
--   binary tree][glib-Balanced-Binary-Trees]. It should be accessed only
--   by using the following functions.
module GI.GLib.Structs.Tree

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

-- | Removes all keys and values from the <a>Tree</a> and decreases its
--   reference count by one. If keys and/or values are dynamically
--   allocated, you should either free them first or create the <a>Tree</a>
--   using <a>treeNewFull</a>. In the latter case the destroy functions you
--   supplied will be called on all keys and values before destroying the
--   <a>Tree</a>.
treeDestroy :: (HasCallStack, MonadIO m) => Tree -> m ()

-- | Calls the given function for each of the key/value pairs in the
--   <a>Tree</a>. The function is passed the key and value of each pair,
--   and the given <i><tt>data</tt></i> 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 <a>TraverseFunc</a> 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 <a>Tree</a>. The
--   function is passed the pointer to the particular node, and the given
--   <i><tt>data</tt></i> 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 <a>TraverseFunc</a> as you walk
--   over the tree, then walk the list and remove each item.
--   
--   <i>Since: 2.68</i>
treeForeachNode :: (HasCallStack, MonadIO m) => Tree -> TraverseNodeFunc -> m ()

-- | Gets the height of a <a>Tree</a>.
--   
--   If the <a>Tree</a> contains no nodes, the height is 0. If the
--   <a>Tree</a> 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 <a>Tree</a>.
--   
--   Inserts a new key and value into a <a>Tree</a> as
--   <a>treeInsertNode</a> 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 <a>Tree</a>.
--   
--   If the given key already exists in the <a>Tree</a> its corresponding
--   value is set to the new value. If you supplied a
--   <i><tt>valueDestroyFunc</tt></i> when creating the <a>Tree</a>, the
--   old value is freed using that function. If you supplied a
--   <i><tt>keyDestroyFunc</tt></i> when creating the <a>Tree</a>, 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)).
--   
--   <i>Since: 2.68</i>
treeInsertNode :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m (Maybe TreeNode)

-- | Gets the value corresponding to the given key. Since a <a>Tree</a> 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 <a>Tree</a>, 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
--   <a>treeRemove</a>.
treeLookupExtended :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Bool, Ptr (), Ptr ())

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

-- | Gets the lower bound node corresponding to the given key, or
--   <a>Nothing</a> 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.
--   
--   <i>Since: 2.68</i>
treeLowerBound :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Maybe TreeNode)

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

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

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

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

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

-- | Removes a key/value pair from a <a>Tree</a>.
--   
--   If the <a>Tree</a> was created using <a>treeNewFull</a>, 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 <a>Tree</a>, 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 <a>Tree</a> and destroys their keys and
--   values, then resets the <a>Tree</a>’s root to <a>Nothing</a>.
--   
--   <i>Since: 2.70</i>
treeRemoveAll :: (HasCallStack, MonadIO m) => Tree -> m ()

-- | Inserts a new key and value into a <a>Tree</a> as
--   <a>treeReplaceNode</a> 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 <a>Tree</a> similar to
--   <a>treeInsertNode</a>. The difference is that if the key already
--   exists in the <a>Tree</a>, it gets replaced by the new key. If you
--   supplied a <i><tt>valueDestroyFunc</tt></i> when creating the
--   <a>Tree</a>, the old value is freed using that function. If you
--   supplied a <i><tt>keyDestroyFunc</tt></i> when creating the
--   <a>Tree</a>, 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.
--   
--   <i>Since: 2.68</i>
treeReplaceNode :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> Ptr () -> m (Maybe TreeNode)

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

-- | Removes a key and its associated value from a <a>Tree</a> without
--   calling the key and value destroy functions.
--   
--   If the key does not exist in the <a>Tree</a>, the function does
--   nothing.
treeSteal :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m Bool

-- | Calls the given function for each node in the <a>Tree</a>.

-- | <i>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, use <a>treeForeach</a> instead. If you really need to visit
--   nodes in a different order, consider using an [n-ary
--   tree][glib-N-ary-Trees].</i>
treeTraverse :: (HasCallStack, MonadIO m) => Tree -> TraverseFunc -> TraverseType -> m ()

-- | Decrements the reference count of <i><tt>tree</tt></i> 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
--   <i><tt>tree</tt></i> will be released.
--   
--   It is safe to call this function from any thread.
--   
--   <i>Since: 2.22</i>
treeUnref :: (HasCallStack, MonadIO m) => Tree -> m ()

-- | Gets the upper bound node corresponding to the given key, or
--   <a>Nothing</a> 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.
--   
--   <i>Since: 2.68</i>
treeUpperBound :: (HasCallStack, MonadIO m) => Tree -> Ptr () -> m (Maybe TreeNode)
instance GHC.Classes.Eq GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Tree.Tree
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Tree.Tree)


-- | The <tt>GThreadPool</tt> 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
--   [func<i><tt>gLib</tt></i>.ThreadPool.new]. It is destroyed by
--   <a>threadPoolFree</a>.
--   
--   If you want to execute a certain task within a thread pool, use
--   <a>threadPoolPush</a>.
--   
--   To get the current number of running threads you call
--   <a>threadPoolGetNumThreads</a>. To get the number of still unprocessed
--   tasks you call <a>threadPoolUnprocessed</a>. To control the maximum
--   number of threads for a thread pool, you use
--   <a>threadPoolGetMaxThreads</a>. and <a>threadPoolSetMaxThreads</a>.
--   
--   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
--   [func<i><tt>gLib</tt></i>.ThreadPool.get_num_unused_threads]. The
--   maximum number can be controlled by
--   [func<i><tt>gLib</tt></i>.ThreadPool.get_max_unused_threads] and
--   [func<i><tt>gLib</tt></i>.ThreadPool.set_max_unused_threads]. All
--   currently unused threads can be stopped by calling
--   [func<i><tt>gLib</tt></i>.ThreadPool.stop_unused_threads].
module GI.GLib.Structs.ThreadPool

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

-- | Construct a <a>ThreadPool</a> struct initialized to zero.
newZeroThreadPool :: MonadIO m => m ThreadPool

-- | Frees all resources allocated for <i><tt>pool</tt></i>.
--   
--   If <i><tt>immediate</tt></i> is <a>True</a>, no new task is processed
--   for <i><tt>pool</tt></i>. Otherwise <i><tt>pool</tt></i> 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
--   <i><tt>pool</tt></i> is freed.
--   
--   If <i><tt>wait_</tt></i> is <a>True</a>, this function does not return
--   before all tasks to be processed (dependent on
--   <i><tt>immediate</tt></i>, whether all or only the currently running)
--   are ready. Otherwise this function returns immediately.
--   
--   After calling this function <i><tt>pool</tt></i> must not be used
--   anymore.
threadPoolFree :: (HasCallStack, MonadIO m) => ThreadPool -> Bool -> Bool -> m ()

-- | This function will return the maximum <i><tt>interval</tt></i> 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.
--   
--   <i>Since: 2.10</i>
threadPoolGetMaxIdleTime :: (HasCallStack, MonadIO m) => m Word32

-- | Returns the maximal number of threads for <i><tt>pool</tt></i>.
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
--   <i><tt>pool</tt></i>.
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.
--   
--   <i>Since: 2.46</i>
threadPoolMoveToFront :: (HasCallStack, MonadIO m) => ThreadPool -> Ptr () -> m Bool

-- | Inserts <i><tt>data</tt></i> into the list of tasks to be executed by
--   <i><tt>pool</tt></i>.
--   
--   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 <tt><i>g_thread_pool_new()</i></tt>.
--   Otherwise, <i><tt>data</tt></i> stays in the queue until a thread in
--   this pool finishes its previous task and processes
--   <i><tt>data</tt></i>.
--   
--   <i><tt>error</tt></i> can be <a>Nothing</a> to ignore errors, or
--   non-<a>Nothing</a> to report errors. An error can only occur when a
--   new thread couldn't be created. In that case <i><tt>data</tt></i> 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 <i><tt>interval</tt></i> that a
--   thread waiting in the pool for new tasks can be idle for before being
--   stopped. This function is similar to calling
--   <a>threadPoolStopUnusedThreads</a> on a regular timeout, except this
--   is done on a per thread basis.
--   
--   By setting <i><tt>interval</tt></i> to 0, idle threads will not be
--   stopped.
--   
--   The default value is 15000 (15 seconds).
--   
--   <i>Since: 2.10</i>
threadPoolSetMaxIdleTime :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Sets the maximal allowed number of threads for <i><tt>pool</tt></i>. A
--   value of -1 means that the maximal number of threads is unlimited. If
--   <i><tt>pool</tt></i> is an exclusive thread pool, setting the maximal
--   number of threads to -1 is not allowed.
--   
--   Setting <i><tt>maxThreads</tt></i> to 0 means stopping all work for
--   <i><tt>pool</tt></i>. It is effectively frozen until
--   <i><tt>maxThreads</tt></i> is set to a non-zero value again.
--   
--   A thread is never terminated while calling <i><tt>func</tt></i>, as
--   supplied by <tt><i>g_thread_pool_new()</i></tt>. Instead the maximal
--   number of threads only has effect for the allocation of new threads in
--   <a>threadPoolPush</a>. A new thread is allocated, whenever the number
--   of currently running threads in <i><tt>pool</tt></i> is smaller than
--   the maximal number.
--   
--   <i><tt>error</tt></i> can be <a>Nothing</a> to ignore errors, or
--   non-<a>Nothing</a> 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
--   <i><tt>maxThreads</tt></i>. If <i><tt>maxThreads</tt></i> is -1, no
--   limit is imposed on the number of unused threads.
--   
--   The default value is 2.
threadPoolSetMaxUnusedThreads :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Stops all currently unused threads. This does not change the maximal
--   number of unused threads. This function can be used to regularly stop
--   all unused threads e.g. from <tt><i>g_timeout_add()</i></tt>.
threadPoolStopUnusedThreads :: (HasCallStack, MonadIO m) => m ()

-- | Returns the number of tasks still unprocessed in <i><tt>pool</tt></i>.
threadPoolUnprocessed :: (HasCallStack, MonadIO m) => ThreadPool -> m Word32

-- | Get the value of the “<tt>exclusive</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> threadPool #exclusive
--   </pre>
getThreadPoolExclusive :: MonadIO m => ThreadPool -> m Bool

-- | Set the value of the “<tt>exclusive</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> threadPool [ #exclusive <a>:=</a> value ]
--   </pre>
setThreadPoolExclusive :: MonadIO m => ThreadPool -> Bool -> m ()

-- | Set the value of the “<tt>func</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #func
--   </pre>
clearThreadPoolFunc :: MonadIO m => ThreadPool -> m ()

-- | Get the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> threadPool #func
--   </pre>
getThreadPoolFunc :: MonadIO m => ThreadPool -> m (Maybe Func_WithClosures)

-- | Set the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> threadPool [ #func <a>:=</a> value ]
--   </pre>
setThreadPoolFunc :: MonadIO m => ThreadPool -> FunPtr C_Func -> m ()

-- | Set the value of the “<tt>user_data</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #userData
--   </pre>
clearThreadPoolUserData :: MonadIO m => ThreadPool -> m ()

-- | Get the value of the “<tt>user_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> threadPool #userData
--   </pre>
getThreadPoolUserData :: MonadIO m => ThreadPool -> m (Ptr ())

-- | Set the value of the “<tt>user_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> threadPool [ #userData <a>:=</a> value ]
--   </pre>
setThreadPoolUserData :: MonadIO m => ThreadPool -> Ptr () -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.ThreadPool.ThreadPool
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ThreadPool.ThreadPool
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


-- | The <a>Thread</a> struct represents a running thread. This struct is
--   returned by <a>threadNew</a> or <a>threadTryNew</a>. You can obtain
--   the <a>Thread</a> struct representing the current thread by calling
--   <a>threadSelf</a>.
--   
--   GThread is refcounted, see <a>threadRef</a> and <a>threadUnref</a>.
--   The thread represented by it holds a reference while it is running,
--   and <a>threadJoin</a> 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 <a>Thread</a> struct initialized to zero.
newZeroThread :: MonadIO m => m Thread

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

-- | Terminates the current thread.
--   
--   If another thread is waiting for us using <a>threadJoin</a> then the
--   waiting thread will be woken up and get <i><tt>retval</tt></i> as the
--   return value of <a>threadJoin</a>.
--   
--   Calling <a>threadExit</a> with a parameter <i><tt>retval</tt></i> is
--   equivalent to returning <i><tt>retval</tt></i> from the function
--   <i><tt>func</tt></i>, as given to <a>threadNew</a>.
--   
--   You must only call <a>threadExit</a> from a thread that you created
--   yourself with <a>threadNew</a> or related APIs. You must not call this
--   function from a thread created with another threading library or or
--   from within a <a>ThreadPool</a>.
threadExit :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Waits until <i><tt>thread</tt></i> finishes, i.e. the function
--   <i><tt>func</tt></i>, as given to <a>threadNew</a>, returns or
--   <a>threadExit</a> is called. If <i><tt>thread</tt></i> has already
--   terminated, then <a>threadJoin</a> returns immediately.
--   
--   Any thread can wait for any other thread by calling <a>threadJoin</a>,
--   not just its 'creator'. Calling <a>threadJoin</a> from multiple
--   threads for the same <i><tt>thread</tt></i> leads to undefined
--   behaviour.
--   
--   The value returned by <i><tt>func</tt></i> or given to
--   <a>threadExit</a> is returned by this function.
--   
--   <a>threadJoin</a> consumes the reference to the passed-in
--   <i><tt>thread</tt></i>. This will usually cause the <a>Thread</a>
--   struct and associated resources to be freed. Use <a>threadRef</a> to
--   obtain an extra reference if you want to keep the GThread alive beyond
--   the <a>threadJoin</a> call.
threadJoin :: (HasCallStack, MonadIO m) => Thread -> m (Ptr ())

-- | This function creates a new thread. The new thread starts by invoking
--   <i><tt>func</tt></i> with the argument data. The thread will run until
--   <i><tt>func</tt></i> returns or until <a>threadExit</a> is called from
--   the new thread. The return value of <i><tt>func</tt></i> becomes the
--   return value of the thread, which can be obtained with
--   <a>threadJoin</a>.
--   
--   The <i><tt>name</tt></i> 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 <i><tt>name</tt></i> to 16
--   bytes.
--   
--   If the thread can not be created the program aborts. See
--   <a>threadTryNew</a> if you want to attempt to deal with failures.
--   
--   If you are using threads to offload (potentially many) short-lived
--   tasks, <a>ThreadPool</a> may be more appropriate than manually
--   spawning and tracking multiple <tt><i>GThreads</i></tt>.
--   
--   To free the struct returned by this function, use <a>threadUnref</a>.
--   Note that <a>threadJoin</a> implicitly unrefs the <a>Thread</a> 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.
--   
--   <i>Since: 2.32</i>
threadNew :: (HasCallStack, MonadIO m) => Maybe Text -> ThreadFunc -> m Thread

-- | Increase the reference count on <i><tt>thread</tt></i>.
--   
--   <i>Since: 2.32</i>
threadRef :: (HasCallStack, MonadIO m) => Thread -> m Thread

-- | This function returns the <a>Thread</a> corresponding to the current
--   thread. Note that this function does not increase the reference count
--   of the returned struct.
--   
--   This function will return a <a>Thread</a> 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 <a>threadJoin</a>) on
--   these threads.
threadSelf :: (HasCallStack, MonadIO m) => m Thread

-- | This function is the same as <a>threadNew</a> except that it allows
--   for the possibility of failure.
--   
--   If a thread can not be created (due to resource limits),
--   <i><tt>error</tt></i> is set and <a>Nothing</a> is returned.
--   
--   <i>Since: 2.32</i>
threadTryNew :: (HasCallStack, MonadIO m) => Maybe Text -> ThreadFunc -> m Thread

-- | Decrease the reference count on <i><tt>thread</tt></i>, possibly
--   freeing all resources associated with it.
--   
--   Note that each thread holds a reference to its <a>Thread</a> while it
--   is running, so it is safe to drop your own reference to it if you
--   don't need it anymore.
--   
--   <i>Since: 2.32</i>
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 GHC.Classes.Eq GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Thread.Thread
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Thread.Thread)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.Thread.Thread tag


-- | The <tt>GSourceFuncs</tt> 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
--   <a>True</a> 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 <tt><i>poll()</i></tt> 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
--   <a>True</a> if the timeout interval has expired. The prepare function
--   also returns a timeout value to ensure that the <tt><i>poll()</i></tt>
--   call doesn't block too long and miss the next timeout.
--   
--   For file descriptor sources, the prepare function typically returns
--   <a>False</a>, since it must wait until <tt><i>poll()</i></tt> 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 <tt><i>poll()</i></tt> call blocks. In the check function, it
--   tests the results of the <tt><i>poll()</i></tt> call to see if the
--   required condition has been met, and returns <a>True</a> if so.
module GI.GLib.Structs.SourceFuncs

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

-- | Construct a <a>SourceFuncs</a> struct initialized to zero.
newZeroSourceFuncs :: MonadIO m => m SourceFuncs

-- | Set the value of the “<tt>check</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #check
--   </pre>
clearSourceFuncsCheck :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “<tt>check</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> sourceFuncs #check
--   </pre>
getSourceFuncsCheck :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsCheckFieldCallback)

-- | Set the value of the “<tt>check</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> sourceFuncs [ #check <a>:=</a> value ]
--   </pre>
setSourceFuncsCheck :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsCheckFieldCallback -> m ()

-- | Set the value of the “<tt>finalize</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #finalize
--   </pre>
clearSourceFuncsFinalize :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “<tt>finalize</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> sourceFuncs #finalize
--   </pre>
getSourceFuncsFinalize :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsFinalizeFieldCallback)

-- | Set the value of the “<tt>finalize</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> sourceFuncs [ #finalize <a>:=</a> value ]
--   </pre>
setSourceFuncsFinalize :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsFinalizeFieldCallback -> m ()

-- | Set the value of the “<tt>prepare</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #prepare
--   </pre>
clearSourceFuncsPrepare :: MonadIO m => SourceFuncs -> m ()

-- | Get the value of the “<tt>prepare</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> sourceFuncs #prepare
--   </pre>
getSourceFuncsPrepare :: MonadIO m => SourceFuncs -> m (Maybe SourceFuncsPrepareFieldCallback)

-- | Set the value of the “<tt>prepare</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> sourceFuncs [ #prepare <a>:=</a> value ]
--   </pre>
setSourceFuncsPrepare :: MonadIO m => SourceFuncs -> FunPtr C_SourceFuncsPrepareFieldCallback -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.SourceFuncs.SourceFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SourceFuncs.SourceFuncs
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


-- | The <tt>GSourceCallbackFuncs</tt> struct contains functions for
--   managing callback objects.
module GI.GLib.Structs.SourceCallbackFuncs

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

-- | Construct a <a>SourceCallbackFuncs</a> struct initialized to zero.
newZeroSourceCallbackFuncs :: MonadIO m => m SourceCallbackFuncs

-- | Set the value of the “<tt>ref</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ref
--   </pre>
clearSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m ()

-- | Get the value of the “<tt>ref</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> sourceCallbackFuncs #ref
--   </pre>
getSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m (Maybe SourceCallbackFuncsRefFieldCallback_WithClosures)

-- | Set the value of the “<tt>ref</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> sourceCallbackFuncs [ #ref <a>:=</a> value ]
--   </pre>
setSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> FunPtr C_SourceCallbackFuncsRefFieldCallback -> m ()

-- | Set the value of the “<tt>unref</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #unref
--   </pre>
clearSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m ()

-- | Get the value of the “<tt>unref</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> sourceCallbackFuncs #unref
--   </pre>
getSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m (Maybe SourceCallbackFuncsUnrefFieldCallback_WithClosures)

-- | Set the value of the “<tt>unref</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> sourceCallbackFuncs [ #unref <a>:=</a> value ]
--   </pre>
setSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> FunPtr C_SourceCallbackFuncsUnrefFieldCallback -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SourceCallbackFuncs.SourceCallbackFuncs
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


-- | The <tt>GSource</tt> 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 <a>Source</a> struct initialized to zero.
newZeroSource :: MonadIO m => m Source

-- | Adds <i><tt>childSource</tt></i> to <i><tt>source</tt></i> as a
--   "polled" source; when <i><tt>source</tt></i> is added to a
--   <a>MainContext</a>, <i><tt>childSource</tt></i> will be automatically
--   added with the same priority, when <i><tt>childSource</tt></i> is
--   triggered, it will cause <i><tt>source</tt></i> to dispatch (in
--   addition to calling its own callback), and when <i><tt>source</tt></i>
--   is destroyed, it will destroy <i><tt>childSource</tt></i> as well.
--   (<i><tt>source</tt></i> will also still be dispatched if its own
--   prepare/check functions indicate that it is ready.)
--   
--   If you don't need <i><tt>childSource</tt></i> to do anything on its
--   own when it triggers, you can call
--   <tt><i>g_source_set_dummy_callback()</i></tt> on it to set a callback
--   that does nothing (except return <a>True</a> if appropriate).
--   
--   <i><tt>source</tt></i> will hold a reference on
--   <i><tt>childSource</tt></i> while <i><tt>childSource</tt></i> is
--   attached to it.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   <i>Since: 2.28</i>
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 <a>sourceNew</a> to add an event
--   source. The event source's check function will typically test the
--   <i><tt>revents</tt></i> field in the <a>PollFD</a> struct and return
--   <a>True</a> if events need to be processed.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> 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
--   <a>sourceAddUnixFd</a> instead of this API.
sourceAddPoll :: (HasCallStack, MonadIO m) => Source -> PollFD -> m ()

-- | Monitors <i><tt>fd</tt></i> for the IO events in
--   <i><tt>events</tt></i>.
--   
--   The tag returned by this function can be used to remove or modify the
--   monitoring of the fd using <a>sourceRemoveUnixFd</a> or
--   <a>sourceModifyUnixFd</a>.
--   
--   It is not necessary to remove the fd before destroying the source; it
--   will be cleaned up automatically.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   <i>Since: 2.36</i>
sourceAddUnixFd :: (HasCallStack, MonadIO m) => Source -> Int32 -> [IOCondition] -> m (Ptr ())

-- | Adds a <a>Source</a> to a <i><tt>context</tt></i> so that it will be
--   executed within that context. Remove it by calling
--   <a>sourceDestroy</a>.
--   
--   This function is safe to call from any thread, regardless of which
--   thread the <i><tt>context</tt></i> is running in.
sourceAttach :: (HasCallStack, MonadIO m) => Source -> Maybe MainContext -> m Word32

-- | Removes a source from its <a>MainContext</a>, if any, and mark it as
--   destroyed. The source cannot be subsequently added to another context.
--   It is safe to call this on sources which have already been removed
--   from their context.
--   
--   This does not unref the <a>Source</a>: if you still hold a reference,
--   use <a>sourceUnref</a> to drop it.
--   
--   This function is safe to call from any thread, regardless of which
--   thread the <a>MainContext</a> is running in.
--   
--   If the source is currently attached to a <a>MainContext</a>,
--   destroying it will effectively unset the callback similar to calling
--   <a>sourceSetCallback</a>. This can mean, that the data's
--   <a>DestroyNotify</a> gets called right away.
sourceDestroy :: (HasCallStack, MonadIO m) => Source -> m ()

-- | Checks whether a source is allowed to be called recursively. see
--   <a>sourceSetCanRecurse</a>.
sourceGetCanRecurse :: (HasCallStack, MonadIO m) => Source -> m Bool

-- | Gets the <a>MainContext</a> with which the source is associated.
--   
--   You can call this on a source that has been destroyed, provided that
--   the <a>MainContext</a> it was attached to still exists (in which case
--   it will return that <a>MainContext</a>). In particular, you can always
--   call this function on the source returned from
--   <a>mainCurrentSource</a>. But calling this function on a source whose
--   <a>MainContext</a> has been destroyed is an error.
sourceGetContext :: (HasCallStack, MonadIO m) => Source -> m (Maybe MainContext)

-- | This function ignores <i><tt>source</tt></i> and is otherwise the same
--   as <a>getCurrentTime</a>.

-- | <i>Deprecated: (Since version 2.28)use <a>sourceGetTime</a>
--   instead</i>
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
--   <a>mainContextFindSourceById</a>.
--   
--   You can only call this function while the source is associated to a
--   <a>MainContext</a> instance; calling this function before
--   <a>sourceAttach</a> or after <a>sourceDestroy</a> yields undefined
--   behavior. The ID returned is unique within the <a>MainContext</a>
--   instance passed to <a>sourceAttach</a>.
sourceGetId :: (HasCallStack, MonadIO m) => Source -> m Word32

-- | Gets a name for the source, used in debugging and profiling. The name
--   may be <tt><i>NULL</i></tt> if it has never been set with
--   <a>sourceSetName</a>.
--   
--   <i>Since: 2.26</i>
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 <i><tt>source</tt></i>, as set by
--   <a>sourceSetReadyTime</a>.
--   
--   Any time before or equal to the current monotonic time (including 0)
--   is an indication that the source will fire immediately.
sourceGetReadyTime :: (HasCallStack, MonadIO m) => Source -> m Int64

-- | Gets the time to be used when checking this source. The advantage of
--   calling this function over calling <a>getMonotonicTime</a> 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 <a>getMonotonicTime</a>.
--   
--   <i>Since: 2.28</i>
sourceGetTime :: (HasCallStack, MonadIO m) => Source -> m Int64

-- | Returns whether <i><tt>source</tt></i> 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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static gboolean
--   idle_callback (gpointer data)
--   {
--     SomeWidget *self = data;
--      
--     g_mutex_lock (&amp;self-&gt;idle_id_mutex);
--     // do stuff with self
--     self-&gt;idle_id = 0;
--     g_mutex_unlock (&amp;self-&gt;idle_id_mutex);
--      
--     return G_SOURCE_REMOVE;
--   }
--    
--   static void
--   some_widget_do_stuff_later (SomeWidget *self)
--   {
--     g_mutex_lock (&amp;self-&gt;idle_id_mutex);
--     self-&gt;idle_id = g_idle_add (idle_callback, self);
--     g_mutex_unlock (&amp;self-&gt;idle_id_mutex);
--   }
--    
--   static void
--   some_widget_init (SomeWidget *self)
--   {
--     g_mutex_init (&amp;self-&gt;idle_id_mutex);
--   
--     // ...
--   }
--   
--   static void
--   some_widget_finalize (GObject *object)
--   {
--     SomeWidget *self = SOME_WIDGET (object);
--      
--     if (self-&gt;idle_id)
--       g_source_remove (self-&gt;idle_id);
--      
--     g_mutex_clear (&amp;self-&gt;idle_id_mutex);
--   
--     G_OBJECT_CLASS (parent_class)-&gt;finalize (object);
--   }
--   </pre>
--   
--   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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static gboolean
--   idle_callback (gpointer data)
--   {
--     SomeWidget *self = data;
--     
--     g_mutex_lock (&amp;self-&gt;idle_id_mutex);
--     if (!g_source_is_destroyed (g_main_current_source ()))
--       {
--         // do stuff with self
--       }
--     g_mutex_unlock (&amp;self-&gt;idle_id_mutex);
--     
--     return FALSE;
--   }
--   </pre>
--   
--   Calls to this function from a thread other than the one acquired by
--   the <a>MainContext</a> the <a>Source</a> 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.
--   
--   <i>Since: 2.12</i>
sourceIsDestroyed :: (HasCallStack, MonadIO m) => Source -> m Bool

-- | Updates the event mask to watch for the fd identified by
--   <i><tt>tag</tt></i>.
--   
--   <i><tt>tag</tt></i> is the tag returned from <a>sourceAddUnixFd</a>.
--   
--   If you want to remove a fd, don't set its event mask to zero. Instead,
--   call <a>sourceRemoveUnixFd</a>.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   <i>Since: 2.36</i>
sourceModifyUnixFd :: (HasCallStack, MonadIO m) => Source -> Ptr () -> [IOCondition] -> m ()

-- | Creates a new <a>Source</a> structure. The size is specified to allow
--   creating structures derived from <a>Source</a> that contain additional
--   data. The size passed in must be at least <tt>sizeof (GSource)</tt>.
--   
--   The source will not initially be associated with any
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   before it will be executed.
sourceNew :: (HasCallStack, MonadIO m) => SourceFuncs -> Word32 -> m Source

-- | Queries the events reported for the fd corresponding to
--   <i><tt>tag</tt></i> on <i><tt>source</tt></i> 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
--   <i><tt>source</tt></i>.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   <i>Since: 2.36</i>
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 <a>sourceDestroy</a> for sources added to a non-default
--   main context.
--   
--   The ID of a <a>Source</a> is given by <a>sourceGetId</a>, or will be
--   returned by the functions <a>sourceAttach</a>,
--   <tt><i>g_idle_add()</i></tt>, <a>idleAdd</a>,
--   <tt><i>g_timeout_add()</i></tt>, <a>timeoutAdd</a>,
--   <tt><i>g_child_watch_add()</i></tt>, <a>childWatchAdd</a>,
--   <tt><i>g_io_add_watch()</i></tt>, and <a>ioAddWatch</a>.
--   
--   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
--   <tt><i>g_idle_add()</i></tt>: 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 <i><tt>childSource</tt></i> from <i><tt>source</tt></i> and
--   destroys it.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   <i>Since: 2.28</i>
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
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
sourceRemovePoll :: (HasCallStack, MonadIO m) => Source -> PollFD -> m ()

-- | Reverses the effect of a previous call to <a>sourceAddUnixFd</a>.
--   
--   You only need to call this if you want to remove an fd from being
--   watched while keeping the same source around. In the normal case you
--   will just want to destroy the source.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   As the name suggests, this function is not available on Windows.
--   
--   <i>Since: 2.36</i>
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 <i><tt>func</tt></i> depends on the type of source;
--   ie. you should not count on <i><tt>func</tt></i> being called with
--   <i><tt>data</tt></i> as its first parameter. Cast <i><tt>func</tt></i>
--   with <tt><i>G_SOURCE_FUNC()</i></tt> to avoid warnings about
--   incompatible function types.
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle memory management of <i><tt>data</tt></i>.
--   
--   Typically, you won't use this function. Instead use functions specific
--   to the type of source you are using, such as
--   <tt><i>g_idle_add()</i></tt> or <tt><i>g_timeout_add()</i></tt>.
--   
--   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 <a>sourceDestroy</a> 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 refcounted callback
--   "object". This is used internally. Note that calling
--   <a>sourceSetCallbackIndirect</a> assumes an initial reference count on
--   <i><tt>callbackData</tt></i>, and thus
--   <i><tt>callbackFuncs</tt></i>-&gt;unref will eventually be called once
--   more than <i><tt>callbackFuncs</tt></i>-&gt;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
--   <i><tt>canRecurse</tt></i> is <a>True</a>, then while the source is
--   being dispatched then this source will be processed normally.
--   Otherwise, all processing of this source is blocked until the dispatch
--   function returns.
sourceSetCanRecurse :: (HasCallStack, MonadIO m) => Source -> Bool -> m ()

-- | Sets the source functions (can be used to override default
--   implementations) of an unattached source.
--   
--   <i>Since: 2.12</i>
sourceSetFuncs :: (HasCallStack, MonadIO m) => Source -> SourceFuncs -> m ()

-- | Sets a name for the source, used in debugging and profiling. The name
--   defaults to <tt><i>NULL</i></tt>.
--   
--   The source name should describe in a human-readable way what the
--   source does. For example, "X11 event queue" or "GTK repaint idle
--   handler" or whatever it is.
--   
--   It is permitted to call this function multiple times, but is not
--   recommended due to the potential performance impact. For example, one
--   could change the name in the "check" function of a <a>SourceFuncs</a>
--   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 <a>sourceGetName</a>; 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 <a>sourceSetStaticName</a>.
--   
--   <i>Since: 2.26</i>
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 <tt><i>g_idle_add()</i></tt>,
--   <tt><i>g_timeout_add()</i></tt>, 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
--   <tt><i>g_idle_add()</i></tt>: 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.
--   
--   <i>Since: 2.26</i>
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 <a>Source</a> 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 <i><tt>readyTime</tt></i> is 0) then the source will
--   be dispatched immediately.
--   
--   If <i><tt>readyTime</tt></i> 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 <a>Source</a> which has
--   already been destroyed with <a>sourceDestroy</a>.
--   
--   This API is only intended to be used by implementations of
--   <a>Source</a>. Do not call this API on a <a>Source</a> that you did
--   not create.
--   
--   <i>Since: 2.36</i>
sourceSetReadyTime :: (HasCallStack, MonadIO m) => Source -> Int64 -> m ()

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


-- | The <a>SequenceIter</a> struct is an opaque data type representing an
--   iterator pointing into a <a>Sequence</a>.
module GI.GLib.Structs.SequenceIter

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

-- | Returns a negative number if <i><tt>a</tt></i> comes before
--   <i><tt>b</tt></i>, 0 if they are equal, and a positive number if
--   <i><tt>a</tt></i> comes after <i><tt>b</tt></i>.
--   
--   The <i><tt>a</tt></i> and <i><tt>b</tt></i> iterators must point into
--   the same sequence.
--   
--   <i>Since: 2.14</i>
sequenceIterCompare :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m Int32

-- | Returns the position of <i><tt>iter</tt></i>
--   
--   <i>Since: 2.14</i>
sequenceIterGetPosition :: (HasCallStack, MonadIO m) => SequenceIter -> m Int32

-- | Returns the <a>Sequence</a> that <i><tt>iter</tt></i> points into.
--   
--   <i>Since: 2.14</i>
sequenceIterGetSequence :: (HasCallStack, MonadIO m) => SequenceIter -> m Sequence

-- | Returns whether <i><tt>iter</tt></i> is the begin iterator
--   
--   <i>Since: 2.14</i>
sequenceIterIsBegin :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool

-- | Returns whether <i><tt>iter</tt></i> is the end iterator
--   
--   <i>Since: 2.14</i>
sequenceIterIsEnd :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool

-- | Returns the <a>SequenceIter</a> which is <i><tt>delta</tt></i>
--   positions away from <i><tt>iter</tt></i>. If <i><tt>iter</tt></i> is
--   closer than -<i><tt>delta</tt></i> positions to the beginning of the
--   sequence, the begin iterator is returned. If <i><tt>iter</tt></i> is
--   closer than <i><tt>delta</tt></i> positions to the end of the
--   sequence, the end iterator is returned.
--   
--   <i>Since: 2.14</i>
sequenceIterMove :: (HasCallStack, MonadIO m) => SequenceIter -> Int32 -> m SequenceIter

-- | Returns an iterator pointing to the next position after
--   <i><tt>iter</tt></i>. If <i><tt>iter</tt></i> is the end iterator, the
--   end iterator is returned.
--   
--   <i>Since: 2.14</i>
sequenceIterNext :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter

-- | Returns an iterator pointing to the previous position before
--   <i><tt>iter</tt></i>. If <i><tt>iter</tt></i> is the begin iterator,
--   the begin iterator is returned.
--   
--   <i>Since: 2.14</i>
sequenceIterPrev :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter
instance GHC.Classes.Eq GI.GLib.Structs.SequenceIter.SequenceIter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.SequenceIter.SequenceIter
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.SequenceIter.SequenceIter


-- | The <a>Sequence</a> struct is an opaque data type representing a
--   [sequence][glib-Sequences] data type.
module GI.GLib.Structs.Sequence

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

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

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

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

-- | Frees the memory allocated for <i><tt>seq</tt></i>. If
--   <i><tt>seq</tt></i> has a data destroy function associated with it,
--   that function is called on all items in <i><tt>seq</tt></i>.
--   
--   <i>Since: 2.14</i>
sequenceFree :: (HasCallStack, MonadIO m) => Sequence -> m ()

-- | Returns the data that <i><tt>iter</tt></i> points to.
--   
--   <i>Since: 2.14</i>
sequenceGet :: (HasCallStack, MonadIO m) => SequenceIter -> m (Ptr ())

-- | Returns the begin iterator for <i><tt>seq</tt></i>.
--   
--   <i>Since: 2.14</i>
sequenceGetBeginIter :: (HasCallStack, MonadIO m) => Sequence -> m SequenceIter

-- | Returns the end iterator for <i><tt>seg</tt></i>
--   
--   <i>Since: 2.14</i>
sequenceGetEndIter :: (HasCallStack, MonadIO m) => Sequence -> m SequenceIter

-- | Returns the iterator at position <i><tt>pos</tt></i>. If
--   <i><tt>pos</tt></i> is negative or larger than the number of items in
--   <i><tt>seq</tt></i>, the end iterator is returned.
--   
--   <i>Since: 2.14</i>
sequenceGetIterAtPos :: (HasCallStack, MonadIO m) => Sequence -> Int32 -> m SequenceIter

-- | Returns the positive length (&gt;= 0) of <i><tt>seq</tt></i>. Note
--   that this method is O(h) where `h' is the height of the tree. It is
--   thus more efficient to use <a>sequenceIsEmpty</a> when comparing the
--   length to zero.
--   
--   <i>Since: 2.14</i>
sequenceGetLength :: (HasCallStack, MonadIO m) => Sequence -> m Int32

-- | Inserts a new item just before the item pointed to by
--   <i><tt>iter</tt></i>.
--   
--   <i>Since: 2.14</i>
sequenceInsertBefore :: (HasCallStack, MonadIO m) => SequenceIter -> Ptr () -> m SequenceIter

-- | Inserts <i><tt>data</tt></i> into <i><tt>seq</tt></i> using
--   <i><tt>cmpFunc</tt></i> to determine the new position. The sequence
--   must already be sorted according to <i><tt>cmpFunc</tt></i>; otherwise
--   the new position of <i><tt>data</tt></i> is undefined.
--   
--   <i><tt>cmpFunc</tt></i> is called with two items of the
--   <i><tt>seq</tt></i>, and <i><tt>cmpData</tt></i>. 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 <a>Sequence</a>, it
--   is more efficient to do unsorted insertions and then call
--   <a>sequenceSort</a> or <a>sequenceSortIter</a>.
--   
--   <i>Since: 2.14</i>
sequenceInsertSorted :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m SequenceIter

-- | Like <a>sequenceInsertSorted</a>, but uses a
--   <a>SequenceIterCompareFunc</a> instead of a <a>CompareDataFunc</a> as
--   the compare function.
--   
--   <i><tt>iterCmp</tt></i> is called with two iterators pointing into
--   <i><tt>seq</tt></i>. 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 <a>Sequence</a>, it
--   is more efficient to do unsorted insertions and then call
--   <a>sequenceSort</a> or <a>sequenceSortIter</a>.
--   
--   <i>Since: 2.14</i>
sequenceInsertSortedIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> m SequenceIter

-- | Returns <a>True</a> if the sequence contains zero items.
--   
--   This function is functionally identical to checking the result of
--   <a>sequenceGetLength</a> being equal to zero. However this function is
--   implemented in O(1) running time.
--   
--   <i>Since: 2.48</i>
sequenceIsEmpty :: (HasCallStack, MonadIO m) => Sequence -> m Bool

-- | Returns an iterator pointing to the position of the first item found
--   equal to <i><tt>data</tt></i> according to <i><tt>cmpFunc</tt></i> and
--   <i><tt>cmpData</tt></i>. 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 <a>sequenceIterNext</a> and <a>sequenceIterPrev</a> to get
--   others.
--   
--   <i><tt>cmpFunc</tt></i> is called with two items of the
--   <i><tt>seq</tt></i>, and <i><tt>cmpData</tt></i>. 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.
--   
--   <i>Since: 2.28</i>
sequenceLookup :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m (Maybe SequenceIter)

-- | Like <a>sequenceLookup</a>, but uses a <a>SequenceIterCompareFunc</a>
--   instead of a <a>CompareDataFunc</a> as the compare function.
--   
--   <i><tt>iterCmp</tt></i> is called with two iterators pointing into
--   <i><tt>seq</tt></i>. 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.
--   
--   <i>Since: 2.28</i>
sequenceLookupIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> m (Maybe SequenceIter)

-- | Moves the item pointed to by <i><tt>src</tt></i> to the position
--   indicated by <i><tt>dest</tt></i>. After calling this function
--   <i><tt>dest</tt></i> will point to the position immediately after
--   <i><tt>src</tt></i>. It is allowed for <i><tt>src</tt></i> and
--   <i><tt>dest</tt></i> to point into different sequences.
--   
--   <i>Since: 2.14</i>
sequenceMove :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()

-- | Inserts the (<i><tt>begin</tt></i>, <i><tt>end</tt></i>) range at the
--   destination pointed to by <i><tt>dest</tt></i>. The
--   <i><tt>begin</tt></i> and <i><tt>end</tt></i> iters must point into
--   the same sequence. It is allowed for <i><tt>dest</tt></i> to point to
--   a different sequence than the one pointed into by
--   <i><tt>begin</tt></i> and <i><tt>end</tt></i>.
--   
--   If <i><tt>dest</tt></i> is <a>Nothing</a>, the range indicated by
--   <i><tt>begin</tt></i> and <i><tt>end</tt></i> is removed from the
--   sequence. If <i><tt>dest</tt></i> points to a place within the
--   (<i><tt>begin</tt></i>, <i><tt>end</tt></i>) range, the range does not
--   move.
--   
--   <i>Since: 2.14</i>
sequenceMoveRange :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> SequenceIter -> m ()

-- | Adds a new item to the front of <i><tt>seq</tt></i>
--   
--   <i>Since: 2.14</i>
sequencePrepend :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> m SequenceIter

-- | Finds an iterator somewhere in the range (<i><tt>begin</tt></i>,
--   <i><tt>end</tt></i>). This iterator will be close to the middle of the
--   range, but is not guaranteed to be exactly in the middle.
--   
--   The <i><tt>begin</tt></i> and <i><tt>end</tt></i> iterators must both
--   point to the same sequence and <i><tt>begin</tt></i> must come before
--   or be equal to <i><tt>end</tt></i> in the sequence.
--   
--   <i>Since: 2.14</i>
sequenceRangeGetMidpoint :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m SequenceIter

-- | Removes the item pointed to by <i><tt>iter</tt></i>. 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.
--   
--   <i>Since: 2.14</i>
sequenceRemove :: (HasCallStack, MonadIO m) => SequenceIter -> m ()

-- | Removes all items in the (<i><tt>begin</tt></i>, <i><tt>end</tt></i>)
--   range.
--   
--   If the sequence has a data destroy function associated with it, this
--   function is called on the data for the removed items.
--   
--   <i>Since: 2.14</i>
sequenceRemoveRange :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()

-- | Returns an iterator pointing to the position where
--   <i><tt>data</tt></i> would be inserted according to
--   <i><tt>cmpFunc</tt></i> and <i><tt>cmpData</tt></i>.
--   
--   <i><tt>cmpFunc</tt></i> is called with two items of the
--   <i><tt>seq</tt></i>, and <i><tt>cmpData</tt></i>. 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 <a>sequenceLookup</a>.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   <i>Since: 2.14</i>
sequenceSearch :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> CompareDataFunc -> m SequenceIter

-- | Like <a>sequenceSearch</a>, but uses a <a>SequenceIterCompareFunc</a>
--   instead of a <a>CompareDataFunc</a> as the compare function.
--   
--   <i><tt>iterCmp</tt></i> is called with two iterators pointing into
--   <i><tt>seq</tt></i>. 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 <a>sequenceLookupIter</a>.
--   
--   This function will fail if the data contained in the sequence is
--   unsorted.
--   
--   <i>Since: 2.14</i>
sequenceSearchIter :: (HasCallStack, MonadIO m) => Sequence -> Ptr () -> SequenceIterCompareFunc -> m SequenceIter

-- | Changes the data for the item pointed to by <i><tt>iter</tt></i> to be
--   <i><tt>data</tt></i>. If the sequence has a data destroy function
--   associated with it, that function is called on the existing data that
--   <i><tt>iter</tt></i> pointed to.
--   
--   <i>Since: 2.14</i>
sequenceSet :: (HasCallStack, MonadIO m) => SequenceIter -> Ptr () -> m ()

-- | Sorts <i><tt>seq</tt></i> using <i><tt>cmpFunc</tt></i>.
--   
--   <i><tt>cmpFunc</tt></i> is passed two items of <i><tt>seq</tt></i> 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.
--   
--   <i>Since: 2.14</i>
sequenceSort :: (HasCallStack, MonadIO m) => Sequence -> CompareDataFunc -> m ()

-- | Moves the data pointed to by <i><tt>iter</tt></i> to a new position as
--   indicated by <i><tt>cmpFunc</tt></i>. This function should be called
--   for items in a sequence already sorted according to
--   <i><tt>cmpFunc</tt></i> whenever some aspect of an item changes so
--   that <i><tt>cmpFunc</tt></i> may return different values for that
--   item.
--   
--   <i><tt>cmpFunc</tt></i> is called with two items of the
--   <i><tt>seq</tt></i>, and <i><tt>cmpData</tt></i>. 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.
--   
--   <i>Since: 2.14</i>
sequenceSortChanged :: (HasCallStack, MonadIO m) => SequenceIter -> CompareDataFunc -> m ()

-- | Like <a>sequenceSortChanged</a>, but uses a
--   <a>SequenceIterCompareFunc</a> instead of a <a>CompareDataFunc</a> as
--   the compare function.
--   
--   <i><tt>iterCmp</tt></i> is called with two iterators pointing into the
--   <a>Sequence</a> that <i><tt>iter</tt></i> 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.
--   
--   <i>Since: 2.14</i>
sequenceSortChangedIter :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIterCompareFunc -> m ()

-- | Like <a>sequenceSort</a>, but uses a <a>SequenceIterCompareFunc</a>
--   instead of a <a>CompareDataFunc</a> as the compare function
--   
--   <i><tt>cmpFunc</tt></i> is called with two iterators pointing into
--   <i><tt>seq</tt></i>. 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.
--   
--   <i>Since: 2.14</i>
sequenceSortIter :: (HasCallStack, MonadIO m) => Sequence -> SequenceIterCompareFunc -> m ()

-- | Swaps the items pointed to by <i><tt>a</tt></i> and <i><tt>b</tt></i>.
--   It is allowed for <i><tt>a</tt></i> and <i><tt>b</tt></i> to point
--   into difference sequences.
--   
--   <i>Since: 2.14</i>
sequenceSwap :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Sequence.Sequence
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Sequence.Sequence
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.Sequence.Sequence


-- | <tt>GScanner</tt> provides a general-purpose lexical scanner.
--   
--   You should set <i><tt>inputName</tt></i> 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 <i><tt>userData</tt></i> and <i><tt>maxParseErrors</tt></i> 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
--   <i><tt>msgHandler</tt></i> field. The type of the message handler
--   function is declared by <a>ScannerMsgFunc</a>.
module GI.GLib.Structs.Scanner

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

-- | Construct a <a>Scanner</a> 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 <a>scannerGetNextToken</a>.
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
--   <a>scannerGetNextToken</a>.
scannerCurPosition :: (HasCallStack, MonadIO m) => Scanner -> m Word32

-- | Gets the current token type. This is simply the <i><tt>token</tt></i>
--   field in the <a>Scanner</a> structure.
scannerCurToken :: (HasCallStack, MonadIO m) => Scanner -> m TokenType

-- | Frees all memory used by the <a>Scanner</a>.
scannerDestroy :: (HasCallStack, MonadIO m) => Scanner -> m ()

-- | Returns <a>True</a> 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 <a>scannerPeekNextToken</a> and also
--   removes it from the input stream. The token data is placed in the
--   <i><tt>token</tt></i>, <i><tt>value</tt></i>, <i><tt>line</tt></i>,
--   and <i><tt>position</tt></i> fields of the <a>Scanner</a> 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, <a>Nothing</a> 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 <i><tt>nextToken</tt></i>,
--   <i><tt>nextValue</tt></i>, <i><tt>nextLine</tt></i>, and
--   <i><tt>nextPosition</tt></i> fields of the <a>Scanner</a> structure.
--   
--   Note that, while the token is not removed from the input stream (i.e.
--   the next call to <a>scannerGetNextToken</a> 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 <a>Scanner</a>. The function is passed the symbol
--   and value of each pair, and the given <i><tt>userData</tt></i>
--   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, <a>Nothing</a> 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
--   <a>scannerPeekNextToken</a> followed by <a>scannerUnexpToken</a>
--   without an intermediate call to <a>scannerGetNextToken</a>, as
--   <a>scannerUnexpToken</a> 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 “<tt>config</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #config
--   </pre>
clearScannerConfig :: MonadIO m => Scanner -> m ()

-- | Get the value of the “<tt>config</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #config
--   </pre>
getScannerConfig :: MonadIO m => Scanner -> m (Maybe ScannerConfig)

-- | Set the value of the “<tt>config</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #config <a>:=</a> value ]
--   </pre>
setScannerConfig :: MonadIO m => Scanner -> Ptr ScannerConfig -> m ()

-- | Set the value of the “<tt>input_name</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #inputName
--   </pre>
clearScannerInputName :: MonadIO m => Scanner -> m ()

-- | Get the value of the “<tt>input_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #inputName
--   </pre>
getScannerInputName :: MonadIO m => Scanner -> m (Maybe Text)

-- | Set the value of the “<tt>input_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #inputName <a>:=</a> value ]
--   </pre>
setScannerInputName :: MonadIO m => Scanner -> CString -> m ()

-- | Get the value of the “<tt>line</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #line
--   </pre>
getScannerLine :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>line</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #line <a>:=</a> value ]
--   </pre>
setScannerLine :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “<tt>max_parse_errors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #maxParseErrors
--   </pre>
getScannerMaxParseErrors :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>max_parse_errors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #maxParseErrors <a>:=</a> value ]
--   </pre>
setScannerMaxParseErrors :: MonadIO m => Scanner -> Word32 -> m ()

-- | Set the value of the “<tt>msg_handler</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #msgHandler
--   </pre>
clearScannerMsgHandler :: MonadIO m => Scanner -> m ()

-- | Get the value of the “<tt>msg_handler</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #msgHandler
--   </pre>
getScannerMsgHandler :: MonadIO m => Scanner -> m (Maybe ScannerMsgFunc)

-- | Set the value of the “<tt>msg_handler</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #msgHandler <a>:=</a> value ]
--   </pre>
setScannerMsgHandler :: MonadIO m => Scanner -> FunPtr C_ScannerMsgFunc -> m ()

-- | Get the value of the “<tt>next_line</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #nextLine
--   </pre>
getScannerNextLine :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>next_line</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #nextLine <a>:=</a> value ]
--   </pre>
setScannerNextLine :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “<tt>next_position</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #nextPosition
--   </pre>
getScannerNextPosition :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>next_position</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #nextPosition <a>:=</a> value ]
--   </pre>
setScannerNextPosition :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “<tt>next_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #nextToken
--   </pre>
getScannerNextToken :: MonadIO m => Scanner -> m TokenType

-- | Set the value of the “<tt>next_token</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #nextToken <a>:=</a> value ]
--   </pre>
setScannerNextToken :: MonadIO m => Scanner -> TokenType -> m ()

-- | Get the value of the “<tt>next_value</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #nextValue
--   </pre>
getScannerNextValue :: MonadIO m => Scanner -> m TokenValue

-- | Get the value of the “<tt>parse_errors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #parseErrors
--   </pre>
getScannerParseErrors :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>parse_errors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #parseErrors <a>:=</a> value ]
--   </pre>
setScannerParseErrors :: MonadIO m => Scanner -> Word32 -> m ()

-- | Get the value of the “<tt>position</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #position
--   </pre>
getScannerPosition :: MonadIO m => Scanner -> m Word32

-- | Set the value of the “<tt>position</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #position <a>:=</a> value ]
--   </pre>
setScannerPosition :: MonadIO m => Scanner -> Word32 -> m ()

-- | Set the value of the “<tt>qdata</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #qdata
--   </pre>
clearScannerQdata :: MonadIO m => Scanner -> m ()

-- | Get the value of the “<tt>qdata</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #qdata
--   </pre>
getScannerQdata :: MonadIO m => Scanner -> m (Maybe Data)

-- | Set the value of the “<tt>qdata</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #qdata <a>:=</a> value ]
--   </pre>
setScannerQdata :: MonadIO m => Scanner -> Ptr Data -> m ()

-- | Get the value of the “<tt>token</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #token
--   </pre>
getScannerToken :: MonadIO m => Scanner -> m TokenType

-- | Set the value of the “<tt>token</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #token <a>:=</a> value ]
--   </pre>
setScannerToken :: MonadIO m => Scanner -> TokenType -> m ()

-- | Set the value of the “<tt>user_data</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #userData
--   </pre>
clearScannerUserData :: MonadIO m => Scanner -> m ()

-- | Get the value of the “<tt>user_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #userData
--   </pre>
getScannerUserData :: MonadIO m => Scanner -> m (Ptr ())

-- | Set the value of the “<tt>user_data</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> scanner [ #userData <a>:=</a> value ]
--   </pre>
setScannerUserData :: MonadIO m => Scanner -> Ptr () -> m ()

-- | Get the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> scanner #value
--   </pre>
getScannerValue :: MonadIO m => Scanner -> m TokenValue
instance GHC.Classes.Eq GI.GLib.Structs.Scanner.Scanner
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Scanner.Scanner
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


-- | A <tt>GRegex</tt> is the "compiled" form of a regular expression
--   pattern.
--   
--   <tt>GRegex</tt> implements regular expression pattern matching using
--   syntax and semantics similar to Perl regular expression. See the
--   <a>PCRE documentation</a>) for the syntax definition.
--   
--   Some functions accept a <i><tt>startPosition</tt></i> argument,
--   setting it differs from just passing over a shortened string and
--   setting <a>RegexMatchFlagsNotbol</a> in the case of a pattern that
--   begins with any kind of lookbehind assertion. For example, consider
--   the pattern "\Biss\B" which finds occurrences of "iss" in the middle
--   of words. ("\B" matches only if the current position in the subject is
--   not a word boundary.) When applied to the string "Mississipi" from the
--   fourth byte, namely "issipi", it does not match, because "\B" is
--   always false at the start of the subject, which is deemed to be a word
--   boundary. However, if the entire string is passed , but with
--   <i><tt>startPosition</tt></i> set to 4, it finds the second occurrence
--   of "iss" because it is able to look behind the starting point to
--   discover that it is preceded by a letter.
--   
--   Note that, unless you set the <a>RegexCompileFlagsRaw</a> flag, all
--   the strings passed to these functions must be encoded in UTF-8. The
--   lengths and the positions inside the strings are in bytes and not in
--   characters, so, for instance, "\xc3\xa0" (i.e. "à") is two bytes long
--   but it is treated as a single character. If you set
--   <a>RegexCompileFlagsRaw</a> the strings can be non-valid UTF-8 strings
--   and a byte is treated as a character, so "\xc3\xa0" is two bytes and
--   two characters long.
--   
--   When matching a pattern, "\n" matches only against a "\n" character in
--   the string, and "\r" matches only a "\r" character. To match any
--   newline sequence use "\R". This particular group matches either the
--   two-character sequence CR + LF ("\r\n"), or one of the single
--   characters LF (linefeed, U+000A, "\n"), VT vertical tab, U+000B,
--   "\v"), FF (formfeed, U+000C, "\f"), CR (carriage return, U+000D,
--   "\r"), NEL (next line, U+0085), LS (line separator, U+2028), or PS
--   (paragraph separator, U+2029).
--   
--   The behaviour of the dot, circumflex, and dollar metacharacters are
--   affected by newline characters, the default is to recognize any
--   newline character (the same characters recognized by "\R"). This can
--   be changed with <tt>G_REGEX_NEWLINE_CR</tt>,
--   <tt>G_REGEX_NEWLINE_LF</tt> and <tt>G_REGEX_NEWLINE_CRLF</tt> compile
--   options, and with <tt>G_REGEX_MATCH_NEWLINE_ANY</tt>,
--   <tt>G_REGEX_MATCH_NEWLINE_CR</tt>, <tt>G_REGEX_MATCH_NEWLINE_LF</tt>
--   and <tt>G_REGEX_MATCH_NEWLINE_CRLF</tt> match options. These settings
--   are also relevant when compiling a pattern if
--   <tt>G_REGEX_EXTENDED</tt> is set, and an unescaped "#" outside a
--   character class is encountered. This indicates a comment that lasts
--   until after the next newline.
--   
--   Creating and manipulating the same <tt>GRegex</tt> structure from
--   different threads is not a problem as <tt>GRegex</tt> does not modify
--   its internal state between creation and destruction, on the other hand
--   <tt>GMatchInfo</tt> is not threadsafe.
--   
--   The regular expressions low-level functionalities are obtained through
--   the excellent <a>PCRE</a> library written by Philip Hazel.
--   
--   <i>Since: 2.14</i>
module GI.GLib.Structs.Regex

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

-- | Checks whether <i><tt>replacement</tt></i> is a valid replacement
--   string (see <a>regexReplace</a>), i.e. that all escape sequences in it
--   are valid.
--   
--   If <i><tt>hasReferences</tt></i> is not <a>Nothing</a> then
--   <i><tt>replacement</tt></i> 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 <a>MatchInfo</a>
--   object.
--   
--   <i>Since: 2.14</i>
regexCheckReplacement :: (HasCallStack, MonadIO m) => Text -> m Bool

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

-- | Escapes the nul characters in <i><tt>string</tt></i> to "\x00". It can
--   be used to compile a regex with embedded nul characters.
--   
--   For completeness, <i><tt>length</tt></i> can be -1 for a
--   nul-terminated string. In this case the output string will be of
--   course equal to <i><tt>string</tt></i>.
--   
--   <i>Since: 2.30</i>
regexEscapeNul :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Text

-- | Escapes the special characters used for regular expressions in
--   <i><tt>string</tt></i>, for instance "a.b*c" becomes "a\.b\*c". This
--   function is useful to dynamically generate regular expressions.
--   
--   <i><tt>string</tt></i> can contain nul characters that are replaced
--   with "\0", in this case remember to specify the correct length of
--   <i><tt>string</tt></i> in <i><tt>length</tt></i>.
--   
--   <i>Since: 2.14</i>
regexEscapeString :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Text

-- | Returns the number of capturing subpatterns in the pattern.
--   
--   <i>Since: 2.14</i>
regexGetCaptureCount :: (HasCallStack, MonadIO m) => Regex -> m Int32

-- | Returns the compile options that <i><tt>regex</tt></i> 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 <tt>(?i)</tt> found at
--   the top-level within the compiled pattern.
--   
--   <i>Since: 2.26</i>
regexGetCompileFlags :: (HasCallStack, MonadIO m) => Regex -> m [RegexCompileFlags]

-- | Checks whether the pattern contains explicit CR or LF references.
--   
--   <i>Since: 2.34</i>
regexGetHasCrOrLf :: (HasCallStack, MonadIO m) => Regex -> m Bool

-- | Returns the match options that <i><tt>regex</tt></i> was created with.
--   
--   <i>Since: 2.26</i>
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.
--   
--   <i>Since: 2.14</i>
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.
--   
--   <i>Since: 2.38</i>
regexGetMaxLookbehind :: (HasCallStack, MonadIO m) => Regex -> m Int32

-- | Gets the pattern string associated with <i><tt>regex</tt></i>, i.e. a
--   copy of the string passed to <a>regexNew</a>.
--   
--   <i>Since: 2.14</i>
regexGetPattern :: (HasCallStack, MonadIO m) => Regex -> m Text

-- | Retrieves the number of the subexpression named <i><tt>name</tt></i>.
--   
--   <i>Since: 2.14</i>
regexGetStringNumber :: (HasCallStack, MonadIO m) => Regex -> Text -> m Int32

-- | Scans for a match in <i><tt>string</tt></i> for the pattern in
--   <i><tt>regex</tt></i>. The <i><tt>matchOptions</tt></i> are combined
--   with the match options specified when the <i><tt>regex</tt></i>
--   structure was created, letting you have more flexibility in reusing
--   <a>Regex</a> structures.
--   
--   Unless <a>RegexCompileFlagsRaw</a> is specified in the options,
--   <i><tt>string</tt></i> must be valid UTF-8.
--   
--   A <a>MatchInfo</a> structure, used to get information on the match, is
--   stored in <i><tt>matchInfo</tt></i> if not <a>Nothing</a>. Note that
--   if <i><tt>matchInfo</tt></i> is not <a>Nothing</a> then it is created
--   even if the function returns <a>False</a>, 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 <a>matchInfoNext</a>.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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, &amp;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);
--   }
--   </pre>
--   
--   <i><tt>string</tt></i> is not copied and is used in <a>MatchInfo</a>
--   internally. If you use any <a>MatchInfo</a> method (except
--   <a>matchInfoFree</a>) after freeing or modifying
--   <i><tt>string</tt></i> then the behaviour is undefined.
--   
--   <i>Since: 2.14</i>
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 <a>regexMatchAllFull</a>.
--   
--   A <a>MatchInfo</a> structure, used to get information on the match, is
--   stored in <i><tt>matchInfo</tt></i> if not <a>Nothing</a>. Note that
--   if <i><tt>matchInfo</tt></i> is not <a>Nothing</a> then it is created
--   even if the function returns <a>False</a>, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   <i><tt>string</tt></i> is not copied and is used in <a>MatchInfo</a>
--   internally. If you use any <a>MatchInfo</a> method (except
--   <a>matchInfoFree</a>) after freeing or modifying
--   <i><tt>string</tt></i> then the behaviour is undefined.
--   
--   <i>Since: 2.14</i>
regexMatchAll :: (HasCallStack, MonadIO m) => Regex -> Text -> [RegexMatchFlags] -> m (Bool, MatchInfo)

-- | Using the standard algorithm for regular expression matching only the
--   longest match in the <i><tt>string</tt></i> is retrieved, it is not
--   possible to obtain all the available matches. For instance matching
--   "&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern "&lt;.*&gt;" you
--   get "&lt;a&gt; &lt;b&gt; &lt;c&gt;".
--   
--   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 "&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern
--   "&lt;.*&gt;;" you would obtain three matches: "&lt;a&gt; &lt;b&gt;
--   &lt;c&gt;", "&lt;a&gt; &lt;b&gt;" and "&lt;a&gt;".
--   
--   The number of matched strings is retrieved using
--   <a>matchInfoGetMatchCount</a>. To obtain the matched strings and their
--   position you can use, respectively, <a>matchInfoFetch</a> and
--   <a>matchInfoFetchPos</a>. 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 <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   Unless <a>RegexCompileFlagsRaw</a> is specified in the options,
--   <i><tt>string</tt></i> must be valid UTF-8.
--   
--   A <a>MatchInfo</a> structure, used to get information on the match, is
--   stored in <i><tt>matchInfo</tt></i> if not <a>Nothing</a>. Note that
--   if <i><tt>matchInfo</tt></i> is not <a>Nothing</a> then it is created
--   even if the function returns <a>False</a>, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   <i><tt>string</tt></i> is not copied and is used in <a>MatchInfo</a>
--   internally. If you use any <a>MatchInfo</a> method (except
--   <a>matchInfoFree</a>) after freeing or modifying
--   <i><tt>string</tt></i> then the behaviour is undefined.
--   
--   <i>Since: 2.14</i>
regexMatchAllFull :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> m MatchInfo

-- | Scans for a match in <i><tt>string</tt></i> for the pattern in
--   <i><tt>regex</tt></i>. The <i><tt>matchOptions</tt></i> are combined
--   with the match options specified when the <i><tt>regex</tt></i>
--   structure was created, letting you have more flexibility in reusing
--   <a>Regex</a> structures.
--   
--   Setting <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   Unless <a>RegexCompileFlagsRaw</a> is specified in the options,
--   <i><tt>string</tt></i> must be valid UTF-8.
--   
--   A <a>MatchInfo</a> structure, used to get information on the match, is
--   stored in <i><tt>matchInfo</tt></i> if not <a>Nothing</a>. Note that
--   if <i><tt>matchInfo</tt></i> is not <a>Nothing</a> then it is created
--   even if the function returns <a>False</a>, i.e. you must free it
--   regardless if regular expression actually matched.
--   
--   <i><tt>string</tt></i> is not copied and is used in <a>MatchInfo</a>
--   internally. If you use any <a>MatchInfo</a> method (except
--   <a>matchInfoFree</a>) after freeing or modifying
--   <i><tt>string</tt></i> then the behaviour is undefined.
--   
--   To retrieve all the non-overlapping matches of the pattern in string
--   you can use <a>matchInfoNext</a>.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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, &amp;match_info, &amp;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, &amp;error);
--       }
--     g_match_info_free (match_info);
--     g_regex_unref (regex);
--     if (error != NULL)
--       {
--         g_printerr ("Error while matching: %s\n", error-&gt;message);
--         g_error_free (error);
--       }
--   }
--   </pre>
--   
--   <i>Since: 2.14</i>
regexMatchFull :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> m MatchInfo

-- | Scans for a match in <i><tt>string</tt></i> for
--   <i><tt>pattern</tt></i>.
--   
--   This function is equivalent to <a>regexMatch</a> but it does not
--   require to compile the pattern with <a>regexNew</a>, 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 <i><tt>pattern</tt></i>
--   more than once, it's more efficient to compile the pattern once with
--   <a>regexNew</a> and then use <a>regexMatch</a>.
--   
--   <i>Since: 2.14</i>
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 <a>Regex</a> structure.
--   
--   <i>Since: 2.14</i>
regexNew :: (HasCallStack, MonadIO m) => Text -> [RegexCompileFlags] -> [RegexMatchFlags] -> m (Maybe Regex)

-- | Increases reference count of <i><tt>regex</tt></i> by 1.
--   
--   <i>Since: 2.14</i>
regexRef :: (HasCallStack, MonadIO m) => Regex -> m Regex

-- | Replaces all occurrences of the pattern in <i><tt>regex</tt></i> with
--   the replacement text. Backreferences of the form '\number' or
--   '\g&lt;number&gt;' in the replacement text are interpolated by the
--   number-th captured subexpression of the match, '\g&lt;name&gt;' 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:
--   
--   <ul>
--   <li>\l: Convert to lower case the next character</li>
--   <li>\u: Convert to upper case the next character</li>
--   <li>\L: Convert to lower case till \E</li>
--   <li>\U: Convert to upper case till \E</li>
--   <li>\E: End case modification</li>
--   </ul>
--   
--   If you do not need to use backreferences use
--   <a>regexReplaceLiteral</a>.
--   
--   The <i><tt>replacement</tt></i> string must be UTF-8 encoded even if
--   <a>RegexCompileFlagsRaw</a> was passed to <a>regexNew</a>. If you want
--   to use not UTF-8 encoded strings you can use
--   <a>regexReplaceLiteral</a>.
--   
--   Setting <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   <i>Since: 2.14</i>
regexReplace :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> Text -> [RegexMatchFlags] -> m Text

-- | Replaces occurrences of the pattern in regex with the output of
--   <i><tt>eval</tt></i> for that occurrence.
--   
--   Setting <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   The following example uses <a>regexReplaceEval</a> to replace multiple
--   strings at once:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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);
--   
--   ...
--   </pre>
--   
--   <i>Since: 2.14</i>
regexReplaceEval :: (HasCallStack, MonadIO m) => Regex -> [Text] -> Int32 -> [RegexMatchFlags] -> RegexEvalCallback -> m Text

-- | Replaces all occurrences of the pattern in <i><tt>regex</tt></i> with
--   the replacement text. <i><tt>replacement</tt></i> is replaced
--   literally, to include backreferences use <a>regexReplace</a>.
--   
--   Setting <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   <i>Since: 2.14</i>
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 <i><tt>string</tt></i>
--   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".
--   
--   <i>Since: 2.14</i>
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 <i><tt>string</tt></i>
--   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 <i><tt>startPosition</tt></i> differs from just passing over a
--   shortened string and setting <a>RegexMatchFlagsNotbol</a> in the case
--   of a pattern that begins with any kind of lookbehind assertion, such
--   as "\b".
--   
--   <i>Since: 2.14</i>
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 <a>regexSplit</a> but it does not
--   require to compile the pattern with <a>regexNew</a>, 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 <i><tt>pattern</tt></i>
--   more than once, it's more efficient to compile the pattern once with
--   <a>regexNew</a> and then use <a>regexSplit</a>.
--   
--   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 <i><tt>string</tt></i>
--   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".
--   
--   <i>Since: 2.14</i>
regexSplitSimple :: (HasCallStack, MonadIO m) => Text -> Text -> [RegexCompileFlags] -> [RegexMatchFlags] -> m [Text]

-- | Decreases reference count of <i><tt>regex</tt></i> by 1. When
--   reference count drops to zero, it frees all the memory associated with
--   the regex structure.
--   
--   <i>Since: 2.14</i>
regexUnref :: (HasCallStack, MonadIO m) => Regex -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.Regex.Regex
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.Regex.Regex)


-- | Contains the public fields of a [Queue][glib-Double-ended-Queues].
module GI.GLib.Structs.Queue

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

-- | Construct a <a>Queue</a> struct initialized to zero.
newZeroQueue :: MonadIO m => m Queue

-- | Removes all the elements in <i><tt>queue</tt></i>. If queue elements
--   contain dynamically-allocated memory, they should be freed first.
--   
--   <i>Since: 2.14</i>
queueClear :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Convenience method, which frees all the memory used by a <a>Queue</a>,
--   and calls the provided <i><tt>freeFunc</tt></i> on each item in the
--   <a>Queue</a>.
--   
--   <i>Since: 2.60</i>
queueClearFull :: (HasCallStack, MonadIO m) => Queue -> Maybe DestroyNotify -> m ()

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

-- | Frees the memory allocated for the <a>Queue</a>. Only call this
--   function if <i><tt>queue</tt></i> was created with
--   <tt><i>g_queue_new()</i></tt>. If queue elements contain
--   dynamically-allocated memory, they should be freed first.
--   
--   If queue elements contain dynamically-allocated memory, you should
--   either use <a>queueFreeFull</a> or free them manually first.
queueFree :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Convenience method, which frees all the memory used by a <a>Queue</a>,
--   and calls the specified destroy function on every element's data.
--   
--   <i><tt>freeFunc</tt></i> should not modify the queue (eg, by removing
--   the freed element from it).
--   
--   <i>Since: 2.32</i>
queueFreeFull :: (HasCallStack, MonadIO m) => Queue -> DestroyNotify -> m ()

-- | Returns the number of items in <i><tt>queue</tt></i>.
--   
--   <i>Since: 2.4</i>
queueGetLength :: (HasCallStack, MonadIO m) => Queue -> m Word32

-- | Returns the position of the first element in <i><tt>queue</tt></i>
--   which contains <i><tt>data</tt></i>.
--   
--   <i>Since: 2.4</i>
queueIndex :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Int32

-- | A statically-allocated <a>Queue</a> must be initialized with this
--   function before it can be used. Alternatively you can initialize it
--   with <tt><i>G_QUEUE_INIT</i></tt>. It is not necessary to initialize
--   queues created with <tt><i>g_queue_new()</i></tt>.
--   
--   <i>Since: 2.14</i>
queueInit :: (HasCallStack, MonadIO m) => Queue -> m ()

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

-- | Returns <a>True</a> 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 <i><tt>n</tt></i>'th element of <i><tt>queue</tt></i>.
--   
--   <i>Since: 2.4</i>
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 <i><tt>n</tt></i>'th element of <i><tt>queue</tt></i> and
--   returns its data.
--   
--   <i>Since: 2.4</i>
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 <i><tt>queue</tt></i> at the given
--   position.
--   
--   <i>Since: 2.4</i>
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 <i><tt>queue</tt></i> that contains
--   <i><tt>data</tt></i>.
--   
--   <i>Since: 2.4</i>
queueRemove :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Bool

-- | Remove all elements whose data equals <i><tt>data</tt></i> from
--   <i><tt>queue</tt></i>.
--   
--   <i>Since: 2.4</i>
queueRemoveAll :: (HasCallStack, MonadIO m) => Queue -> Ptr () -> m Word32

-- | Reverses the order of the items in <i><tt>queue</tt></i>.
--   
--   <i>Since: 2.4</i>
queueReverse :: (HasCallStack, MonadIO m) => Queue -> m ()

-- | Sorts <i><tt>queue</tt></i> using <i><tt>compareFunc</tt></i>.
--   
--   <i>Since: 2.4</i>
queueSort :: (HasCallStack, MonadIO m) => Queue -> CompareDataFunc -> m ()

-- | Set the value of the “<tt>head</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #head
--   </pre>
clearQueueHead :: MonadIO m => Queue -> m ()

-- | Get the value of the “<tt>head</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> queue #head
--   </pre>
getQueueHead :: MonadIO m => Queue -> m [Ptr ()]

-- | Set the value of the “<tt>head</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> queue [ #head <a>:=</a> value ]
--   </pre>
setQueueHead :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()

-- | Get the value of the “<tt>length</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> queue #length
--   </pre>
getQueueLength :: MonadIO m => Queue -> m Word32

-- | Set the value of the “<tt>length</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> queue [ #length <a>:=</a> value ]
--   </pre>
setQueueLength :: MonadIO m => Queue -> Word32 -> m ()

-- | Set the value of the “<tt>tail</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #tail
--   </pre>
clearQueueTail :: MonadIO m => Queue -> m ()

-- | Get the value of the “<tt>tail</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> queue #tail
--   </pre>
getQueueTail :: MonadIO m => Queue -> m [Ptr ()]

-- | Set the value of the “<tt>tail</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> queue [ #tail <a>:=</a> value ]
--   </pre>
setQueueTail :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Queue.Queue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Queue.Queue
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


-- | A <tt>GOptionGroup</tt> 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 <tt>GOptionGroup</tt> holding their options,
--   which the application can then add to its <a>OptionContext</a>.
module GI.GLib.Structs.OptionGroup

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

-- | Adds the options specified in <i><tt>entries</tt></i> to
--   <i><tt>group</tt></i>.
--   
--   <i>Since: 2.6</i>
optionGroupAddEntries :: (HasCallStack, MonadIO m) => OptionGroup -> [OptionEntry] -> m ()

-- | Frees a <a>OptionGroup</a>. Note that you must not free groups which
--   have been added to a <a>OptionContext</a>.
--   
--   <i>Since: 2.6</i>

-- | <i>Deprecated: (Since version 2.44)Use <a>optionGroupUnref</a>
--   instead.</i>
optionGroupFree :: (HasCallStack, MonadIO m) => OptionGroup -> m ()

-- | Creates a new <a>OptionGroup</a>.
--   
--   <i><tt>description</tt></i> 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:’.
--   
--   <i>Since: 2.6</i>
optionGroupNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> Ptr () -> Maybe DestroyNotify -> m OptionGroup

-- | Increments the reference count of <i><tt>group</tt></i> by one.
--   
--   <i>Since: 2.44</i>
optionGroupRef :: (HasCallStack, MonadIO m) => OptionGroup -> m OptionGroup

-- | Sets the function which is used to translate user-visible strings, for
--   <tt>--help</tt> output. Different groups can use different
--   <tt><i>GTranslateFuncs</i></tt>. If <i><tt>func</tt></i> is
--   <a>Nothing</a>, strings are not translated.
--   
--   If you are using <tt><i>gettext()</i></tt>, you only need to set the
--   translation domain, see <a>optionGroupSetTranslationDomain</a>.
--   
--   <i>Since: 2.6</i>
optionGroupSetTranslateFunc :: (HasCallStack, MonadIO m) => OptionGroup -> Maybe TranslateFunc -> m ()

-- | A convenience function to use <tt><i>gettext()</i></tt> for
--   translating user-visible strings.
--   
--   <i>Since: 2.6</i>
optionGroupSetTranslationDomain :: (HasCallStack, MonadIO m) => OptionGroup -> Text -> m ()

-- | Decrements the reference count of <i><tt>group</tt></i> by one. If the
--   reference count drops to 0, the <i><tt>group</tt></i> will be freed.
--   and all memory allocated by the <i><tt>group</tt></i> is released.
--   
--   <i>Since: 2.44</i>
optionGroupUnref :: (HasCallStack, MonadIO m) => OptionGroup -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.OptionGroup.OptionGroup
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.OptionGroup.OptionGroup)


-- | A <tt>GOptionContext</tt> 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 <a>OptionGroup</a> to the <i><tt>context</tt></i>, so that
--   parsing with <i><tt>context</tt></i> will recognize the options in the
--   group. Note that this will take ownership of the <i><tt>group</tt></i>
--   and thus the <i><tt>group</tt></i> should not be freed.
--   
--   <i>Since: 2.6</i>
optionContextAddGroup :: (HasCallStack, MonadIO m) => OptionContext -> OptionGroup -> m ()

-- | A convenience function which creates a main group if it doesn't exist,
--   adds the <i><tt>entries</tt></i> to it and sets the translation
--   domain.
--   
--   <i>Since: 2.6</i>
optionContextAddMainEntries :: (HasCallStack, MonadIO m) => OptionContext -> [OptionEntry] -> Maybe Text -> m ()

-- | Returns the description. See <a>optionContextSetDescription</a>.
--   
--   <i>Since: 2.12</i>
optionContextGetDescription :: (HasCallStack, MonadIO m) => OptionContext -> m Text

-- | Returns a formatted, translated help text for the given context. To
--   obtain the text produced by <tt>--help</tt>, call
--   <tt>g_option_context_get_help (context, TRUE, NULL)</tt>. To obtain
--   the text produced by <tt>--help-all</tt>, call
--   <tt>g_option_context_get_help (context, FALSE, NULL)</tt>. To obtain
--   the help text for an option group, call <tt>g_option_context_get_help
--   (context, FALSE, group)</tt>.
--   
--   <i>Since: 2.14</i>
optionContextGetHelp :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> Maybe OptionGroup -> m Text

-- | Returns whether automatic <tt>--help</tt> generation is turned on for
--   <i><tt>context</tt></i>. See <a>optionContextSetHelpEnabled</a>.
--   
--   <i>Since: 2.6</i>
optionContextGetHelpEnabled :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns whether unknown options are ignored or not. See
--   <a>optionContextSetIgnoreUnknownOptions</a>.
--   
--   <i>Since: 2.6</i>
optionContextGetIgnoreUnknownOptions :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns a pointer to the main group of <i><tt>context</tt></i>.
--   
--   <i>Since: 2.6</i>
optionContextGetMainGroup :: (HasCallStack, MonadIO m) => OptionContext -> m OptionGroup

-- | Returns whether strict POSIX code is enabled.
--   
--   See <a>optionContextSetStrictPosix</a> for more information.
--   
--   <i>Since: 2.44</i>
optionContextGetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> m Bool

-- | Returns the summary. See <a>optionContextSetSummary</a>.
--   
--   <i>Since: 2.12</i>
optionContextGetSummary :: (HasCallStack, MonadIO m) => OptionContext -> m Text

-- | Parses the command line arguments, recognizing options which have been
--   added to <i><tt>context</tt></i>. A side-effect of calling this
--   function is that <a>setPrgname</a> will be called.
--   
--   If the parsing is successful, any parsed arguments are removed from
--   the array and <i><tt>argc</tt></i> and <i><tt>argv</tt></i> are
--   updated accordingly. A '--' option is stripped from
--   <i><tt>argv</tt></i> unless there are unparsed options before and
--   after it, or some of the options after it start with '-'. In case of
--   an error, <i><tt>argc</tt></i> and <i><tt>argv</tt></i> are left
--   unmodified.
--   
--   If automatic <tt>--help</tt> support is enabled (see
--   <a>optionContextSetHelpEnabled</a>), and the <i><tt>argv</tt></i>
--   array contains one of the recognized help options, this function will
--   produce help output to stdout and call <tt>exit (0)</tt>.
--   
--   Note that function depends on the [current locale][setlocale] for
--   automatic character set conversion of string and filename arguments.
--   
--   <i>Since: 2.6</i>
optionContextParse :: (HasCallStack, MonadIO m) => OptionContext -> Maybe [Text] -> m (Maybe [Text])

-- | Adds a string to be displayed in <tt>--help</tt> output after the list
--   of options. This text often includes a bug reporting address.
--   
--   Note that the summary is translated (see
--   <a>optionContextSetTranslateFunc</a>).
--   
--   <i>Since: 2.12</i>
optionContextSetDescription :: (HasCallStack, MonadIO m) => OptionContext -> Maybe Text -> m ()

-- | Enables or disables automatic generation of <tt>--help</tt> output. By
--   default, <a>optionContextParse</a> recognizes <tt>--help</tt>,
--   <tt>-h</tt>, <tt>-?</tt>, <tt>--help-all</tt> and
--   <tt>--help-groupname</tt> and creates suitable output to stdout.
--   
--   <i>Since: 2.6</i>
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 <i><tt>argv</tt></i> array after parsing.
--   By default, <a>optionContextParse</a> 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.
--   
--   <i>Since: 2.6</i>
optionContextSetIgnoreUnknownOptions :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()

-- | Sets a <a>OptionGroup</a> as main group of the
--   <i><tt>context</tt></i>. This has the same effect as calling
--   <a>optionContextAddGroup</a>, the only difference is that the options
--   in the main group are treated differently when generating
--   <tt>--help</tt> output.
--   
--   <i>Since: 2.6</i>
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).
--   
--   <i>Since: 2.44</i>
optionContextSetStrictPosix :: (HasCallStack, MonadIO m) => OptionContext -> Bool -> m ()

-- | Adds a string to be displayed in <tt>--help</tt> output before the
--   list of options. This is typically a summary of the program
--   functionality.
--   
--   Note that the summary is translated (see
--   <a>optionContextSetTranslateFunc</a> and
--   <a>optionContextSetTranslationDomain</a>).
--   
--   <i>Since: 2.12</i>
optionContextSetSummary :: (HasCallStack, MonadIO m) => OptionContext -> Maybe Text -> m ()

-- | Sets the function which is used to translate the contexts user-visible
--   strings, for <tt>--help</tt> output. If <i><tt>func</tt></i> is
--   <a>Nothing</a>, strings are not translated.
--   
--   Note that option groups have their own translation functions, this
--   function only affects the <i><tt>parameterString</tt></i> (see
--   <tt><i>g_option_context_new()</i></tt>), the summary (see
--   <a>optionContextSetSummary</a>) and the description (see
--   <a>optionContextSetDescription</a>).
--   
--   If you are using <tt><i>gettext()</i></tt>, you only need to set the
--   translation domain, see <a>optionContextSetTranslationDomain</a>.
--   
--   <i>Since: 2.12</i>
optionContextSetTranslateFunc :: (HasCallStack, MonadIO m) => OptionContext -> Maybe TranslateFunc -> m ()

-- | A convenience function to use <tt><i>gettext()</i></tt> for
--   translating user-visible strings.
--   
--   <i>Since: 2.12</i>
optionContextSetTranslationDomain :: (HasCallStack, MonadIO m) => OptionContext -> Text -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.OptionContext.OptionContext
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.OptionContext.OptionContext
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.OptionContext.OptionContext


-- | The <a>Node</a> struct represents one node in a [n-ary
--   tree][glib-N-ary-Trees].
module GI.GLib.Structs.Node

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

-- | Construct a <a>Node</a> struct initialized to zero.
newZeroNode :: MonadIO m => m Node

-- | Gets the position of the first child of a <a>Node</a> which contains
--   the given data.
nodeChildIndex :: (HasCallStack, MonadIO m) => Node -> Ptr () -> m Int32

-- | Gets the position of a <a>Node</a> with respect to its siblings.
--   <i><tt>child</tt></i> must be a child of <i><tt>node</tt></i>. 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 <a>Node</a>. Note that
--   it doesn't descend beneath the child nodes. <i><tt>func</tt></i> 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 <a>Node</a>.
--   
--   If <i><tt>node</tt></i> is <a>Nothing</a> 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 <i><tt>root</tt></i> and its children from the tree, freeing
--   any memory allocated.
nodeDestroy :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Returns <a>True</a> if <i><tt>node</tt></i> is an ancestor of
--   <i><tt>descendant</tt></i>. This is true if node is the parent of
--   <i><tt>descendant</tt></i>, or if node is the grandparent of
--   <i><tt>descendant</tt></i> etc.
nodeIsAncestor :: (HasCallStack, MonadIO m) => Node -> Node -> m Bool

-- | Gets the maximum height of all branches beneath a <a>Node</a>. This is
--   the maximum distance from the <a>Node</a> to all leaf nodes.
--   
--   If <i><tt>root</tt></i> is <a>Nothing</a>, 0 is returned. If
--   <i><tt>root</tt></i> has no children, 1 is returned. If
--   <i><tt>root</tt></i> has children, 2 is returned. And so on.
nodeMaxHeight :: (HasCallStack, MonadIO m) => Node -> m Word32

-- | Gets the number of children of a <a>Node</a>.
nodeNChildren :: (HasCallStack, MonadIO m) => Node -> m Word32

-- | Gets the number of nodes in a tree.
nodeNNodes :: (HasCallStack, MonadIO m) => Node -> [TraverseFlags] -> m Word32

-- | <i>No description available in the introspection data.</i>
nodePopAllocator :: (HasCallStack, MonadIO m) => m ()

-- | <i>No description available in the introspection data.</i>
nodePushAllocator :: (HasCallStack, MonadIO m) => Allocator -> m ()

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

-- | Traverses a tree starting at the given root <a>Node</a>. It calls the
--   given function for each node visited. The traversal can be halted at
--   any point by returning <a>True</a> from <i><tt>func</tt></i>.
--   <i><tt>func</tt></i> must not do anything that would modify the
--   structure of the tree.
nodeTraverse :: (HasCallStack, MonadIO m) => Node -> TraverseType -> [TraverseFlags] -> Int32 -> NodeTraverseFunc -> m ()

-- | Unlinks a <a>Node</a> from a tree, resulting in two separate trees.
nodeUnlink :: (HasCallStack, MonadIO m) => Node -> m ()

-- | Set the value of the “<tt>children</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #children
--   </pre>
clearNodeChildren :: MonadIO m => Node -> m ()

-- | Get the value of the “<tt>children</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> node #children
--   </pre>
getNodeChildren :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “<tt>children</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> node [ #children <a>:=</a> value ]
--   </pre>
setNodeChildren :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “<tt>data</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #data
--   </pre>
clearNodeData :: MonadIO m => Node -> m ()

-- | Get the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> node #data
--   </pre>
getNodeData :: MonadIO m => Node -> m (Ptr ())

-- | Set the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> node [ #data <a>:=</a> value ]
--   </pre>
setNodeData :: MonadIO m => Node -> Ptr () -> m ()

-- | Set the value of the “<tt>next</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #next
--   </pre>
clearNodeNext :: MonadIO m => Node -> m ()

-- | Get the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> node #next
--   </pre>
getNodeNext :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> node [ #next <a>:=</a> value ]
--   </pre>
setNodeNext :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “<tt>parent</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #parent
--   </pre>
clearNodeParent :: MonadIO m => Node -> m ()

-- | Get the value of the “<tt>parent</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> node #parent
--   </pre>
getNodeParent :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “<tt>parent</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> node [ #parent <a>:=</a> value ]
--   </pre>
setNodeParent :: MonadIO m => Node -> Ptr Node -> m ()

-- | Set the value of the “<tt>prev</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #prev
--   </pre>
clearNodePrev :: MonadIO m => Node -> m ()

-- | Get the value of the “<tt>prev</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> node #prev
--   </pre>
getNodePrev :: MonadIO m => Node -> m (Maybe Node)

-- | Set the value of the “<tt>prev</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> node [ #prev <a>:=</a> value ]
--   </pre>
setNodePrev :: MonadIO m => Node -> Ptr Node -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Node.Node
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Node.Node
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


-- | A set of functions used to perform memory allocation. The same
--   <a>MemVTable</a> must be used for all allocations in the same program;
--   a call to <a>memSetVtable</a>, 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 <a>MemVTable</a> struct initialized to zero.
newZeroMemVTable :: MonadIO m => m MemVTable

-- | Set the value of the “<tt>calloc</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #calloc
--   </pre>
clearMemVTableCalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>calloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #calloc
--   </pre>
getMemVTableCalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableCallocFieldCallback)

-- | Set the value of the “<tt>calloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #calloc <a>:=</a> value ]
--   </pre>
setMemVTableCalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableCallocFieldCallback -> m ()

-- | Set the value of the “<tt>free</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #free
--   </pre>
clearMemVTableFree :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>free</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #free
--   </pre>
getMemVTableFree :: MonadIO m => MemVTable -> m (Maybe MemVTableFreeFieldCallback_WithClosures)

-- | Set the value of the “<tt>free</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #free <a>:=</a> value ]
--   </pre>
setMemVTableFree :: MonadIO m => MemVTable -> FunPtr C_MemVTableFreeFieldCallback -> m ()

-- | Set the value of the “<tt>malloc</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #malloc
--   </pre>
clearMemVTableMalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>malloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #malloc
--   </pre>
getMemVTableMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableMallocFieldCallback)

-- | Set the value of the “<tt>malloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #malloc <a>:=</a> value ]
--   </pre>
setMemVTableMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableMallocFieldCallback -> m ()

-- | Set the value of the “<tt>realloc</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #realloc
--   </pre>
clearMemVTableRealloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>realloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #realloc
--   </pre>
getMemVTableRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableReallocFieldCallback)

-- | Set the value of the “<tt>realloc</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #realloc <a>:=</a> value ]
--   </pre>
setMemVTableRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableReallocFieldCallback -> m ()

-- | Set the value of the “<tt>try_malloc</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #tryMalloc
--   </pre>
clearMemVTableTryMalloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>try_malloc</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #tryMalloc
--   </pre>
getMemVTableTryMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryMallocFieldCallback)

-- | Set the value of the “<tt>try_malloc</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #tryMalloc <a>:=</a> value ]
--   </pre>
setMemVTableTryMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryMallocFieldCallback -> m ()

-- | Set the value of the “<tt>try_realloc</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #tryRealloc
--   </pre>
clearMemVTableTryRealloc :: MonadIO m => MemVTable -> m ()

-- | Get the value of the “<tt>try_realloc</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memVTable #tryRealloc
--   </pre>
getMemVTableTryRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryReallocFieldCallback)

-- | Set the value of the “<tt>try_realloc</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> memVTable [ #tryRealloc <a>:=</a> value ]
--   </pre>
setMemVTableTryRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryReallocFieldCallback -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MemVTable.MemVTable
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MemVTable.MemVTable
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


-- | 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
--   <i><tt>stringToExpand</tt></i> with references and escape sequences
--   expanded. References refer to the last match done with
--   <i><tt>string</tt></i> against <i><tt>regex</tt></i> and have the same
--   syntax used by <a>regexReplace</a>.
--   
--   The <i><tt>stringToExpand</tt></i> must be UTF-8 encoded even if
--   <a>RegexCompileFlagsRaw</a> was passed to <a>regexNew</a>.
--   
--   The backreferences are extracted from the string passed to the match
--   function, so you cannot call this function after freeing the string.
--   
--   <i><tt>matchInfo</tt></i> may be <a>Nothing</a> in which case
--   <i><tt>stringToExpand</tt></i> 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 <a>regexCheckReplacement</a> to
--   find out whether <i><tt>stringToExpand</tt></i> contains references.
--   
--   <i>Since: 2.14</i>
matchInfoExpandReferences :: (HasCallStack, MonadIO m) => Maybe MatchInfo -> Text -> m (Maybe Text)

-- | Retrieves the text matching the <i><tt>matchNum</tt></i>'th capturing
--   parentheses. 0 is the full text of the match, 1 is the first paren
--   set, 2 the second, and so on.
--   
--   If <i><tt>matchNum</tt></i> 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
--   <a>regexMatchAll</a> or <a>regexMatchAllFull</a>, 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.
--   
--   <i>Since: 2.14</i>
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
--   <a>regexMatchAll</a> or <a>regexMatchAllFull</a>, 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.
--   
--   <i>Since: 2.14</i>
matchInfoFetchAll :: (HasCallStack, MonadIO m) => MatchInfo -> m [Text]

-- | Retrieves the text matching the capturing parentheses named
--   <i><tt>name</tt></i>.
--   
--   If <i><tt>name</tt></i> is a valid sub pattern name but it didn't
--   match anything (e.g. sub pattern "X", matching "b" against
--   "(?P&lt;X&gt;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.
--   
--   <i>Since: 2.14</i>
matchInfoFetchNamed :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Maybe Text)

-- | Retrieves the position in bytes of the capturing parentheses named
--   <i><tt>name</tt></i>.
--   
--   If <i><tt>name</tt></i> is a valid sub pattern name but it didn't
--   match anything (e.g. sub pattern "X", matching "b" against
--   "(?P&lt;X&gt;a)?b") then <i><tt>startPos</tt></i> and
--   <i><tt>endPos</tt></i> are set to -1 and <a>True</a> is returned.
--   
--   <i>Since: 2.14</i>
matchInfoFetchNamedPos :: (HasCallStack, MonadIO m) => MatchInfo -> Text -> m (Bool, Int32, Int32)

-- | Retrieves the position in bytes of the <i><tt>matchNum</tt></i>'th
--   capturing parentheses. 0 is the full text of the match, 1 is the first
--   paren set, 2 the second, and so on.
--   
--   If <i><tt>matchNum</tt></i> is a valid sub pattern but it didn't match
--   anything (e.g. sub pattern 1, matching "b" against "(a)?b") then
--   <i><tt>startPos</tt></i> and <i><tt>endPos</tt></i> are set to -1 and
--   <a>True</a> is returned.
--   
--   If the match was obtained using the DFA algorithm, that is using
--   <a>regexMatchAll</a> or <a>regexMatchAllFull</a>, the retrieved
--   position is not that of a set of parentheses but that of a matched
--   substring. Substrings are matched in reverse order of length, so 0 is
--   the longest match.
--   
--   <i>Since: 2.14</i>
matchInfoFetchPos :: (HasCallStack, MonadIO m) => MatchInfo -> Int32 -> m (Bool, Int32, Int32)

-- | If <i><tt>matchInfo</tt></i> is not <a>Nothing</a>, calls
--   <a>matchInfoUnref</a>; otherwise does nothing.
--   
--   <i>Since: 2.14</i>
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
--   <a>regexMatchAll</a> or <a>regexMatchAllFull</a>, the retrieved count
--   is not that of the number of capturing parentheses but that of the
--   number of matched substrings.
--   
--   <i>Since: 2.14</i>
matchInfoGetMatchCount :: (HasCallStack, MonadIO m) => MatchInfo -> m Int32

-- | Returns <a>Regex</a> object used in <i><tt>matchInfo</tt></i>. It
--   belongs to Glib and must not be freed. Use <a>regexRef</a> if you need
--   to keep it after you free <i><tt>matchInfo</tt></i> object.
--   
--   <i>Since: 2.14</i>
matchInfoGetRegex :: (HasCallStack, MonadIO m) => MatchInfo -> m Regex

-- | Returns the string searched with <i><tt>matchInfo</tt></i>. This is
--   the string passed to <a>regexMatch</a> or <a>regexReplace</a> so you
--   may not free it before calling this function.
--   
--   <i>Since: 2.14</i>
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, <a>False</a> 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
--   <a>RegexMatchFlagsPartialSoft</a> and
--   <a>RegexMatchFlagsPartialHard</a> flags. When they are used, the
--   return code for <a>regexMatch</a> or <a>regexMatchFull</a> is, as
--   usual, <a>True</a> for a complete match, <a>False</a> otherwise. But,
--   when these functions return <a>False</a>, you can check if the match
--   was partial calling <a>matchInfoIsPartialMatch</a>.
--   
--   The difference between <a>RegexMatchFlagsPartialSoft</a> and
--   <a>RegexMatchFlagsPartialHard</a> is that when a partial match is
--   encountered with <a>RegexMatchFlagsPartialSoft</a>, matching continues
--   to search for a possible complete match, while with
--   <a>RegexMatchFlagsPartialHard</a> matching stops at the partial match.
--   When both <a>RegexMatchFlagsPartialSoft</a> and
--   <a>RegexMatchFlagsPartialHard</a> 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.
--   
--   <i>Since: 2.14</i>
matchInfoIsPartialMatch :: (HasCallStack, MonadIO m) => MatchInfo -> m Bool

-- | Returns whether the previous match operation succeeded.
--   
--   <i>Since: 2.14</i>
matchInfoMatches :: (HasCallStack, MonadIO m) => MatchInfo -> m Bool

-- | Scans for the next match using the same parameters of the previous
--   call to <a>regexMatchFull</a> or <a>regexMatch</a> that returned
--   <i><tt>matchInfo</tt></i>.
--   
--   The match is done on the string passed to the match function, so you
--   cannot free it before calling this function.
--   
--   <i>Since: 2.14</i>
matchInfoNext :: (HasCallStack, MonadIO m) => MatchInfo -> m ()

-- | Increases reference count of <i><tt>matchInfo</tt></i> by 1.
--   
--   <i>Since: 2.30</i>
matchInfoRef :: (HasCallStack, MonadIO m) => MatchInfo -> m MatchInfo

-- | Decreases reference count of <i><tt>matchInfo</tt></i> by 1. When
--   reference count drops to zero, it frees all the memory associated with
--   the match_info structure.
--   
--   <i>Since: 2.30</i>
matchInfoUnref :: (HasCallStack, MonadIO m) => MatchInfo -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MatchInfo.MatchInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.MatchInfo.MatchInfo)


-- | Any of the fields in <a>MarkupParser</a> can be <a>Nothing</a>, in
--   which case they will be ignored. Except for the <i><tt>error</tt></i>
--   function, any of these callbacks can set an error; in particular the
--   <a>MarkupErrorUnknownElement</a>, <a>MarkupErrorUnknownAttribute</a>,
--   and <a>MarkupErrorInvalidContent</a> errors are intended to be set
--   from these callbacks. If you set an error from a callback,
--   <a>markupParseContextParse</a> will report that error back to its
--   caller.
module GI.GLib.Structs.MarkupParser

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

-- | Construct a <a>MarkupParser</a> struct initialized to zero.
newZeroMarkupParser :: MonadIO m => m MarkupParser

-- | Set the value of the “<tt>end_element</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #endElement
--   </pre>
clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “<tt>end_element</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> markupParser #endElement
--   </pre>
getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)

-- | Set the value of the “<tt>end_element</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> markupParser [ #endElement <a>:=</a> value ]
--   </pre>
setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserEndElementFieldCallback -> m ()

-- | Set the value of the “<tt>error</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #error
--   </pre>
clearMarkupParserError :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “<tt>error</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> markupParser #error
--   </pre>
getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)

-- | Set the value of the “<tt>error</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> markupParser [ #error <a>:=</a> value ]
--   </pre>
setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m ()

-- | Set the value of the “<tt>passthrough</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #passthrough
--   </pre>
clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “<tt>passthrough</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> markupParser #passthrough
--   </pre>
getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe MarkupParserPassthroughFieldCallback_WithClosures)

-- | Set the value of the “<tt>passthrough</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> markupParser [ #passthrough <a>:=</a> value ]
--   </pre>
setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserPassthroughFieldCallback -> m ()

-- | Set the value of the “<tt>start_element</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #startElement
--   </pre>
clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “<tt>start_element</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> markupParser #startElement
--   </pre>
getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)

-- | Set the value of the “<tt>start_element</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> markupParser [ #startElement <a>:=</a> value ]
--   </pre>
setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserStartElementFieldCallback -> m ()

-- | Set the value of the “<tt>text</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #text
--   </pre>
clearMarkupParserText :: MonadIO m => MarkupParser -> m ()

-- | Get the value of the “<tt>text</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> markupParser #text
--   </pre>
getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe MarkupParserTextFieldCallback_WithClosures)

-- | Set the value of the “<tt>text</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> markupParser [ #text <a>:=</a> value ]
--   </pre>
setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MarkupParser.MarkupParser
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MarkupParser.MarkupParser
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


-- | A parse context is used to parse a stream of bytes that you expect to
--   contain marked-up text.
--   
--   See <a>markupParseContextNew</a>, <a>MarkupParser</a>, and so on for
--   more details.
module GI.GLib.Structs.MarkupParseContext

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

-- | Signals to the <a>MarkupParseContext</a> that all data has been fed
--   into the parse context with <a>markupParseContextParse</a>.
--   
--   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 <a>MarkupParseContext</a>.
--   
--   This function can't be called from inside one of the
--   <a>MarkupParser</a> 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 <a>markupParseContextGetElementStack</a>.
--   
--   <i>Since: 2.2</i>
markupParseContextGetElement :: (HasCallStack, MonadIO m) => MarkupParseContext -> m Text

-- | Retrieves the element stack from the internal state of the parser.
--   
--   The returned <a>SList</a> is a list of strings where the first item is
--   the currently open tag (as would be returned by
--   <a>markupParseContextGetElement</a>) and the next item is its
--   immediate parent.
--   
--   This function is intended to be used in the start_element and
--   end_element handlers where <a>markupParseContextGetElement</a> would
--   merely return the name of the element that is being processed.
--   
--   <i>Since: 2.16</i>
markupParseContextGetElementStack :: (HasCallStack, MonadIO m) => MarkupParseContext -> m [Text]

-- | 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 <i><tt>context</tt></i>.
--   
--   This will either be the user_data that was provided to
--   <a>markupParseContextNew</a> or to the most recent call of
--   <a>markupParseContextPush</a>.
--   
--   <i>Since: 2.18</i>
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 <a>MarkupParseContext</a>.
--   
--   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 <a>MarkupParseContext</a>; 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 <a>markupParseContextPush</a>. It must be called in the
--   end_element handler corresponding to the start_element handler during
--   which <a>markupParseContextPush</a> was called. You must not call this
--   function from the error callback -- the <i><tt>userData</tt></i> 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.
--   
--   <i>Since: 2.18</i>
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
--   <a>MarkupParser</a>. It must be matched with a corresponding call to
--   <a>markupParseContextPop</a> 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 <i><tt>parser</tt></i>.
--   <i><tt>userData</tt></i> is used as the user_data for that parser.
--   <i><tt>userData</tt></i> 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 <a>markupParseContextPop</a> is provided to allow "one
--   last access" to the <i><tt>userData</tt></i> provided to this
--   function. In the case of error, the <i><tt>userData</tt></i> provided
--   here is passed directly to the error callback of the subparser and
--   <a>markupParseContextPop</a> should not be called. In either case, if
--   <i><tt>userData</tt></i> 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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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-&gt;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
--   };
--   </pre>
--   
--   In order to allow this parser to be easily used as a subparser, the
--   following interface is provided:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   void
--   start_counting (GMarkupParseContext *context)
--   {
--     CounterData *data = g_slice_new (CounterData);
--   
--     data-&gt;tag_count = 0;
--     g_markup_parse_context_push (context, &amp;counter_subparser, data);
--   }
--   
--   gint
--   end_counting (GMarkupParseContext *context)
--   {
--     CounterData *data = g_markup_parse_context_pop (context);
--     int result;
--   
--     result = data-&gt;tag_count;
--     g_slice_free (CounterData, data);
--   
--     return result;
--   }
--   </pre>
--   
--   The subparser would then be used as follows:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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...
--   }
--   </pre>
--   
--   <i>Since: 2.18</i>
markupParseContextPush :: (HasCallStack, MonadIO m) => MarkupParseContext -> MarkupParser -> Ptr () -> m ()

-- | Increases the reference count of <i><tt>context</tt></i>.
--   
--   <i>Since: 2.36</i>
markupParseContextRef :: (HasCallStack, MonadIO m) => MarkupParseContext -> m MarkupParseContext

-- | Decreases the reference count of <i><tt>context</tt></i>. When its
--   reference count drops to 0, it is freed.
--   
--   <i>Since: 2.36</i>
markupParseContextUnref :: (HasCallStack, MonadIO m) => MarkupParseContext -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MarkupParseContext.MarkupParseContext
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.MarkupParseContext.MarkupParseContext)


-- | The <tt>GMainLoop</tt> 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 <a>MainContext</a> of <i><tt>loop</tt></i>.
mainLoopGetContext :: (HasCallStack, MonadIO m) => MainLoop -> m MainContext

-- | Checks to see if the main loop is currently being run via
--   <a>mainLoopRun</a>.
mainLoopIsRunning :: (HasCallStack, MonadIO m) => MainLoop -> m Bool

-- | Creates a new <a>MainLoop</a> structure.
mainLoopNew :: (HasCallStack, MonadIO m) => Maybe MainContext -> Bool -> m MainLoop

-- | Stops a <a>MainLoop</a> from running. Any calls to <a>mainLoopRun</a>
--   for the loop will return.
--   
--   Note that sources that have already been dispatched when
--   <a>mainLoopQuit</a> is called will still be executed.
mainLoopQuit :: (HasCallStack, MonadIO m) => MainLoop -> m ()

-- | Increases the reference count on a <a>MainLoop</a> object by one.
mainLoopRef :: (HasCallStack, MonadIO m) => MainLoop -> m MainLoop

-- | Runs a main loop until <a>mainLoopQuit</a> is called on the loop. If
--   this is called for the thread of the loop's <a>MainContext</a>, it
--   will process events from the loop, otherwise it will simply wait.
mainLoopRun :: (HasCallStack, MonadIO m) => MainLoop -> m ()

-- | Decreases the reference count on a <a>MainLoop</a> object by one. If
--   the result is zero, free the loop and free all associated memory.
mainLoopUnref :: (HasCallStack, MonadIO m) => MainLoop -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MainLoop.MainLoop
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.MainLoop.MainLoop)


-- | The <tt>GMainContext</tt> 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 <a>False</a> immediately.
--   Ownership is properly recursive: the owner can require ownership again
--   and will release ownership when <a>mainContextRelease</a> is called as
--   many times as <a>mainContextAcquire</a>.
--   
--   You must be the owner of a context before you can call
--   <a>mainContextPrepare</a>, <a>mainContextQuery</a>,
--   <a>mainContextCheck</a>, <a>mainContextDispatch</a>,
--   <a>mainContextRelease</a>.
--   
--   Since 2.76 <i><tt>context</tt></i> can be <a>Nothing</a> 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 <a>sourceAddUnixFd</a> 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 <i><tt>fds</tt></i> and its length
--   <i><tt>nFds</tt></i> as received from <a>mainContextQuery</a>, as this
--   functions relies on assumptions on how <i><tt>fds</tt></i> is filled.
--   
--   You must have successfully acquired the context with
--   <a>mainContextAcquire</a> before you may call this function.
--   
--   Since 2.76 <i><tt>context</tt></i> can be <a>Nothing</a> 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
--   <a>mainContextGetThreadDefault</a>.
mainContextDefault :: (HasCallStack, MonadIO m) => m MainContext

-- | Dispatches all pending sources.
--   
--   You must have successfully acquired the context with
--   <a>mainContextAcquire</a> before you may call this function.
--   
--   Since 2.76 <i><tt>context</tt></i> can be <a>Nothing</a> 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 Source

-- | Finds a <a>Source</a> 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
--   <tt><i>g_idle_add()</i></tt>: 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 Source

-- | Gets the thread-default <a>MainContext</a> 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
--   <a>mainContextRefThreadDefault</a> to get a <a>MainContext</a> to add
--   their <tt><i>GSources</i></tt> 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 <a>Nothing</a> if you are running in the default thread.)
--   
--   If you need to hold a reference on the context, use
--   <a>mainContextRefThreadDefault</a> instead.
--   
--   <i>Since: 2.22</i>
mainContextGetThreadDefault :: (HasCallStack, MonadIO m) => m (Maybe MainContext)

-- | Invokes a function in such a way that <i><tt>context</tt></i> is owned
--   during the invocation of <i><tt>function</tt></i>.
--   
--   This function is the same as <tt><i>g_main_context_invoke()</i></tt>
--   except that it lets you specify the priority in case
--   <i><tt>function</tt></i> ends up being scheduled as an idle and also
--   lets you give a <a>DestroyNotify</a> for <i><tt>data</tt></i>.
--   
--   <i><tt>notify</tt></i> should not assume that it is called from any
--   particular thread or with any particular context acquired.
--   
--   <i>Since: 2.28</i>
mainContextInvokeFull :: (HasCallStack, MonadIO m) => Maybe MainContext -> Int32 -> SourceFunc -> m ()

-- | Determines whether this thread holds the (recursive) ownership of this
--   <a>MainContext</a>. This is useful to know before waiting on another
--   thread that may be blocking to get ownership of
--   <i><tt>context</tt></i>.
--   
--   <i>Since: 2.10</i>
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 <i><tt>mayBlock</tt></i> is
--   <a>True</a>, waiting for a source to become ready, then dispatching
--   the highest priority events sources that are ready. Otherwise, if
--   <i><tt>mayBlock</tt></i> is <a>False</a> sources are not waited to
--   become ready, only those highest priority events sources will be
--   dispatched (if any), that are ready at this given moment without
--   further waiting.
--   
--   Note that even when <i><tt>mayBlock</tt></i> is <a>True</a>, it is
--   still possible for <a>mainContextIteration</a> to return <a>False</a>,
--   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 <a>MainContext</a> structure.
mainContextNew :: (HasCallStack, MonadIO m) => m MainContext

-- | Creates a new <a>MainContext</a> structure.
--   
--   <i>Since: 2.72</i>
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 <i><tt>context</tt></i> off the thread-default context stack
--   (verifying that it was on the top of the stack).
--   
--   <i>Since: 2.22</i>
mainContextPopThreadDefault :: (HasCallStack, MonadIO m) => Maybe MainContext -> m ()

-- | Prepares to poll sources within a main loop. The resulting information
--   for polling is determined by calling g_main_context_query ().
--   
--   You must have successfully acquired the context with
--   <a>mainContextAcquire</a> before you may call this function.
mainContextPrepare :: (HasCallStack, MonadIO m) => Maybe MainContext -> m (Bool, Int32)

-- | Acquires <i><tt>context</tt></i> and sets it as the thread-default
--   context for the current thread. This will cause certain asynchronous
--   operations (such as most [gio][gio]-based I/O) which are started in
--   this thread to run under <i><tt>context</tt></i> 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 <a>mainContextGetThreadDefault</a>,
--   not the one returned by <a>mainContextDefault</a>, so it does not
--   affect the context used by functions like
--   <tt><i>g_idle_add()</i></tt>.
--   
--   Normally you would call this function shortly after creating a new
--   thread, passing it a <a>MainContext</a> which will be run by a
--   <a>MainLoop</a> 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 <a>mainContextPopThreadDefault</a>, assuming you want the new
--   <a>MainContext</a> 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 <a>ThreadPool</a>), it is always suggested to wrap the
--   logic that needs to use the new <a>MainContext</a> inside a
--   <a>mainContextPushThreadDefault</a> /
--   <a>mainContextPopThreadDefault</a> pair, otherwise threads that are
--   re-used will end up never explicitly releasing the <a>MainContext</a>
--   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 <a>mainContextPushThreadDefault</a> /
--   <a>mainContextPopThreadDefault</a> pair, but it is up to you to ensure
--   that no other asynchronous operations accidentally get started while
--   the non-default context is active.
--   
--   Beware that libraries that predate this function may not correctly
--   handle being used from a thread with a thread-default context. Eg, see
--   <tt><i>g_file_supports_thread_contexts()</i></tt>.
--   
--   <i>Since: 2.22</i>
mainContextPushThreadDefault :: (HasCallStack, MonadIO m) => Maybe MainContext -> m ()

-- | Determines information necessary to poll this main loop. You should be
--   careful to pass the resulting <i><tt>fds</tt></i> array and its length
--   <i><tt>nFds</tt></i> as is when calling <a>mainContextCheck</a>, as
--   this function relies on assumptions made when the array is filled.
--   
--   You must have successfully acquired the context with
--   <a>mainContextAcquire</a> before you may call this function.
mainContextQuery :: (HasCallStack, MonadIO m) => Maybe MainContext -> Int32 -> [PollFD] -> m (Int32, Int32, [PollFD])

-- | Increases the reference count on a <a>MainContext</a> object by one.
mainContextRef :: (HasCallStack, MonadIO m) => MainContext -> m MainContext

-- | Gets the thread-default <a>MainContext</a> for this thread, as with
--   <a>mainContextGetThreadDefault</a>, but also adds a reference to it
--   with <a>mainContextRef</a>. In addition, unlike
--   <a>mainContextGetThreadDefault</a>, if the thread-default context is
--   the global-default context, this will return that <a>MainContext</a>
--   (with a ref added to it) rather than returning <a>Nothing</a>.
--   
--   <i>Since: 2.32</i>
mainContextRefThreadDefault :: (HasCallStack, MonadIO m) => m MainContext

-- | Releases ownership of a context previously acquired by this thread
--   with <a>mainContextAcquire</a>. If the context was acquired multiple
--   times, the ownership will be released only when
--   <a>mainContextRelease</a> is called as many times as it was acquired.
--   
--   You must have successfully acquired the context with
--   <a>mainContextAcquire</a> 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 <a>MainContext</a> object by one.
--   If the result is zero, free the context and free all associated
--   memory.
mainContextUnref :: (HasCallStack, MonadIO m) => MainContext -> m ()

-- | Tries to become the owner of the specified context, as with
--   <a>mainContextAcquire</a>. But if another thread is the owner,
--   atomically drop <i><tt>mutex</tt></i> and wait on <i><tt>cond</tt></i>
--   until that owner releases ownership or until <i><tt>cond</tt></i> is
--   signaled, then try again (once) to become the owner.

-- | <i>Deprecated: (Since version 2.58)Use <a>mainContextIsOwner</a> and
--   separate locking instead.</i>
mainContextWait :: (HasCallStack, MonadIO m) => Maybe MainContext -> Cond -> Mutex -> m Bool

-- | If <i><tt>context</tt></i> is currently blocking in
--   <a>mainContextIteration</a> waiting for a source to become ready,
--   cause it to stop blocking and return. Otherwise, cause the next
--   invocation of <a>mainContextIteration</a> to return without blocking.
--   
--   This API is useful for low-level control over <a>MainContext</a>; for
--   example, integrating it with main loop implementations such as
--   <a>MainLoop</a>.
--   
--   Another related use for this function is when implementing a main loop
--   with a termination condition, computed from multiple threads:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   #define NUM_TASKS 10
--   static gint tasks_remaining = NUM_TASKS;  // (atomic)
--   ...
--   
--   while (g_atomic_int_get (&amp;tasks_remaining) != 0)
--     g_main_context_iteration (NULL, TRUE);
--   </pre>
--   
--   Then in a thread:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   perform_work();
--   
--   if (g_atomic_int_dec_and_test (&amp;tasks_remaining))
--     g_main_context_wakeup (NULL);
--   </pre>
mainContextWakeup :: (HasCallStack, MonadIO m) => Maybe MainContext -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.MainContext.MainContext
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.MainContext.MainContext)


-- | A table of functions used to handle different types of
--   <a>IOChannel</a> in a generic way.
module GI.GLib.Structs.IOFuncs

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

-- | Construct a <a>IOFuncs</a> struct initialized to zero.
newZeroIOFuncs :: MonadIO m => m IOFuncs

-- | Set the value of the “<tt>io_close</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioClose
--   </pre>
clearIOFuncsIoClose :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_close</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioClose
--   </pre>
getIOFuncsIoClose :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCloseFieldCallback)

-- | Set the value of the “<tt>io_close</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioClose <a>:=</a> value ]
--   </pre>
setIOFuncsIoClose :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCloseFieldCallback -> m ()

-- | Set the value of the “<tt>io_create_watch</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #ioCreateWatch
--   </pre>
clearIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_create_watch</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioCreateWatch
--   </pre>
getIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCreateWatchFieldCallback)

-- | Set the value of the “<tt>io_create_watch</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioCreateWatch <a>:=</a> value ]
--   </pre>
setIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCreateWatchFieldCallback -> m ()

-- | Set the value of the “<tt>io_free</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioFree
--   </pre>
clearIOFuncsIoFree :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_free</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioFree
--   </pre>
getIOFuncsIoFree :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoFreeFieldCallback)

-- | Set the value of the “<tt>io_free</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioFree <a>:=</a> value ]
--   </pre>
setIOFuncsIoFree :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoFreeFieldCallback -> m ()

-- | Set the value of the “<tt>io_get_flags</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioGetFlags
--   </pre>
clearIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_get_flags</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioGetFlags
--   </pre>
getIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoGetFlagsFieldCallback)

-- | Set the value of the “<tt>io_get_flags</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioGetFlags <a>:=</a> value ]
--   </pre>
setIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoGetFlagsFieldCallback -> m ()

-- | Set the value of the “<tt>io_read</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioRead
--   </pre>
clearIOFuncsIoRead :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_read</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioRead
--   </pre>
getIOFuncsIoRead :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoReadFieldCallback)

-- | Set the value of the “<tt>io_read</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioRead <a>:=</a> value ]
--   </pre>
setIOFuncsIoRead :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoReadFieldCallback -> m ()

-- | Set the value of the “<tt>io_seek</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioSeek
--   </pre>
clearIOFuncsIoSeek :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_seek</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioSeek
--   </pre>
getIOFuncsIoSeek :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSeekFieldCallback)

-- | Set the value of the “<tt>io_seek</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioSeek <a>:=</a> value ]
--   </pre>
setIOFuncsIoSeek :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSeekFieldCallback -> m ()

-- | Set the value of the “<tt>io_set_flags</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioSetFlags
--   </pre>
clearIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_set_flags</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioSetFlags
--   </pre>
getIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSetFlagsFieldCallback)

-- | Set the value of the “<tt>io_set_flags</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioSetFlags <a>:=</a> value ]
--   </pre>
setIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSetFlagsFieldCallback -> m ()

-- | Set the value of the “<tt>io_write</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #ioWrite
--   </pre>
clearIOFuncsIoWrite :: MonadIO m => IOFuncs -> m ()

-- | Get the value of the “<tt>io_write</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOFuncs #ioWrite
--   </pre>
getIOFuncsIoWrite :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoWriteFieldCallback)

-- | Set the value of the “<tt>io_write</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> iOFuncs [ #ioWrite <a>:=</a> value ]
--   </pre>
setIOFuncsIoWrite :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoWriteFieldCallback -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.IOFuncs.IOFuncs
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.IOFuncs.IOFuncs
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


-- | The <a>HookList</a> struct represents a list of hook functions.
module GI.GLib.Structs.HookList

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

-- | Construct a <a>HookList</a> struct initialized to zero.
newZeroHookList :: MonadIO m => m HookList

-- | Removes all the <a>Hook</a> elements from a <a>HookList</a>.
hookListClear :: (HasCallStack, MonadIO m) => HookList -> m ()

-- | Initializes a <a>HookList</a>. This must be called before the
--   <a>HookList</a> is used.
hookListInit :: (HasCallStack, MonadIO m) => HookList -> Word32 -> m ()

-- | Calls all of the <a>Hook</a> functions in a <a>HookList</a>.
hookListInvoke :: (HasCallStack, MonadIO m) => HookList -> Bool -> m ()

-- | Calls all of the <a>Hook</a> functions in a <a>HookList</a>. Any
--   function which returns <a>False</a> is removed from the
--   <a>HookList</a>.
hookListInvokeCheck :: (HasCallStack, MonadIO m) => HookList -> Bool -> m ()

-- | Calls a function on each valid <a>Hook</a>.
hookListMarshal :: (HasCallStack, MonadIO m) => HookList -> Bool -> HookMarshaller -> m ()

-- | Calls a function on each valid <a>Hook</a> and destroys it if the
--   function returns <a>False</a>.
hookListMarshalCheck :: (HasCallStack, MonadIO m) => HookList -> Bool -> HookCheckMarshaller -> m ()

-- | Set the value of the “<tt>dummy3</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #dummy3
--   </pre>
clearHookListDummy3 :: MonadIO m => HookList -> m ()

-- | Get the value of the “<tt>dummy3</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #dummy3
--   </pre>
getHookListDummy3 :: MonadIO m => HookList -> m (Ptr ())

-- | Set the value of the “<tt>dummy3</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #dummy3 <a>:=</a> value ]
--   </pre>
setHookListDummy3 :: MonadIO m => HookList -> Ptr () -> m ()

-- | Set the value of the “<tt>finalize_hook</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #finalizeHook
--   </pre>
clearHookListFinalizeHook :: MonadIO m => HookList -> m ()

-- | Get the value of the “<tt>finalize_hook</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #finalizeHook
--   </pre>
getHookListFinalizeHook :: MonadIO m => HookList -> m (Maybe HookFinalizeFunc)

-- | Set the value of the “<tt>finalize_hook</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #finalizeHook <a>:=</a> value ]
--   </pre>
setHookListFinalizeHook :: MonadIO m => HookList -> FunPtr C_HookFinalizeFunc -> m ()

-- | Get the value of the “<tt>hook_size</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #hookSize
--   </pre>
getHookListHookSize :: MonadIO m => HookList -> m Word32

-- | Set the value of the “<tt>hook_size</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #hookSize <a>:=</a> value ]
--   </pre>
setHookListHookSize :: MonadIO m => HookList -> Word32 -> m ()

-- | Set the value of the “<tt>hooks</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #hooks
--   </pre>
clearHookListHooks :: MonadIO m => HookList -> m ()

-- | Get the value of the “<tt>hooks</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #hooks
--   </pre>
getHookListHooks :: MonadIO m => HookList -> m (Maybe Hook)

-- | Set the value of the “<tt>hooks</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #hooks <a>:=</a> value ]
--   </pre>
setHookListHooks :: MonadIO m => HookList -> Ptr Hook -> m ()

-- | Get the value of the “<tt>is_setup</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #isSetup
--   </pre>
getHookListIsSetup :: MonadIO m => HookList -> m Word32

-- | Set the value of the “<tt>is_setup</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #isSetup <a>:=</a> value ]
--   </pre>
setHookListIsSetup :: MonadIO m => HookList -> Word32 -> m ()

-- | Get the value of the “<tt>seq_id</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hookList #seqId
--   </pre>
getHookListSeqId :: MonadIO m => HookList -> m CULong

-- | Set the value of the “<tt>seq_id</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hookList [ #seqId <a>:=</a> value ]
--   </pre>
setHookListSeqId :: MonadIO m => HookList -> CULong -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.HookList.HookList
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.HookList.HookList
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


-- | The <a>Hook</a> struct represents a single hook function in a
--   <a>HookList</a>.
module GI.GLib.Structs.Hook

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

-- | Construct a <a>Hook</a> struct initialized to zero.
newZeroHook :: MonadIO m => m Hook

-- | Compares the ids of two <a>Hook</a> elements, returning a negative
--   value if the second id is greater than the first.
hookCompareIds :: (HasCallStack, MonadIO m) => Hook -> Hook -> m Int32

-- | Destroys a <a>Hook</a>, given its ID.
hookDestroy :: (HasCallStack, MonadIO m) => HookList -> CULong -> m Bool

-- | Removes one <a>Hook</a> from a <a>HookList</a>, marking it inactive
--   and calling <a>hookUnref</a> on it.
hookDestroyLink :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Calls the <a>HookList</a> <i><tt>finalizeHook</tt></i> function if it
--   exists, and frees the memory allocated for the <a>Hook</a>.
hookFree :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Inserts a <a>Hook</a> into a <a>HookList</a>, before a given
--   <a>Hook</a>.
hookInsertBefore :: (HasCallStack, MonadIO m) => HookList -> Maybe Hook -> Hook -> m ()

-- | Inserts a <a>Hook</a> into a <a>HookList</a>, sorted by the given
--   function.
hookInsertSorted :: (HasCallStack, MonadIO m) => HookList -> Hook -> HookCompareFunc -> m ()

-- | Prepends a <a>Hook</a> on the start of a <a>HookList</a>.
hookPrepend :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Decrements the reference count of a <a>Hook</a>. If the reference
--   count falls to 0, the <a>Hook</a> is removed from the <a>HookList</a>
--   and <a>hookFree</a> is called to free it.
hookUnref :: (HasCallStack, MonadIO m) => HookList -> Hook -> m ()

-- | Set the value of the “<tt>data</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #data
--   </pre>
clearHookData :: MonadIO m => Hook -> m ()

-- | Get the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #data
--   </pre>
getHookData :: MonadIO m => Hook -> m (Ptr ())

-- | Set the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #data <a>:=</a> value ]
--   </pre>
setHookData :: MonadIO m => Hook -> Ptr () -> m ()

-- | Set the value of the “<tt>destroy</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #destroy
--   </pre>
clearHookDestroy :: MonadIO m => Hook -> m ()

-- | Get the value of the “<tt>destroy</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #destroy
--   </pre>
getHookDestroy :: MonadIO m => Hook -> m (Maybe DestroyNotify_WithClosures)

-- | Set the value of the “<tt>destroy</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #destroy <a>:=</a> value ]
--   </pre>
setHookDestroy :: MonadIO m => Hook -> FunPtr C_DestroyNotify -> m ()

-- | Get the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #flags
--   </pre>
getHookFlags :: MonadIO m => Hook -> m Word32

-- | Set the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #flags <a>:=</a> value ]
--   </pre>
setHookFlags :: MonadIO m => Hook -> Word32 -> m ()

-- | Set the value of the “<tt>func</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #func
--   </pre>
clearHookFunc :: MonadIO m => Hook -> m ()

-- | Get the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #func
--   </pre>
getHookFunc :: MonadIO m => Hook -> m (Ptr ())

-- | Set the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #func <a>:=</a> value ]
--   </pre>
setHookFunc :: MonadIO m => Hook -> Ptr () -> m ()

-- | Get the value of the “<tt>hook_id</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #hookId
--   </pre>
getHookHookId :: MonadIO m => Hook -> m CULong

-- | Set the value of the “<tt>hook_id</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #hookId <a>:=</a> value ]
--   </pre>
setHookHookId :: MonadIO m => Hook -> CULong -> m ()

-- | Set the value of the “<tt>next</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #next
--   </pre>
clearHookNext :: MonadIO m => Hook -> m ()

-- | Get the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #next
--   </pre>
getHookNext :: MonadIO m => Hook -> m (Maybe Hook)

-- | Set the value of the “<tt>next</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #next <a>:=</a> value ]
--   </pre>
setHookNext :: MonadIO m => Hook -> Ptr Hook -> m ()

-- | Set the value of the “<tt>prev</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #prev
--   </pre>
clearHookPrev :: MonadIO m => Hook -> m ()

-- | Get the value of the “<tt>prev</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #prev
--   </pre>
getHookPrev :: MonadIO m => Hook -> m (Maybe Hook)

-- | Set the value of the “<tt>prev</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #prev <a>:=</a> value ]
--   </pre>
setHookPrev :: MonadIO m => Hook -> Ptr Hook -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> hook #refCount
--   </pre>
getHookRefCount :: MonadIO m => Hook -> m Word32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> hook [ #refCount <a>:=</a> value ]
--   </pre>
setHookRefCount :: MonadIO m => Hook -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Hook.Hook
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Hook.Hook
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


-- | <tt>GCompletion</tt> 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 <tt>GCompletion</tt> is created using
--   [func<i><tt>gLib</tt></i>.Completion.new]. Target items are added and
--   removed with <a>Completion</a>.<tt><i>add_items</i></tt>(),
--   <a>Completion</a>.<tt><i>remove_items</i></tt>() and
--   <a>completionClearItems</a>. A completion attempt is requested with
--   <a>Completion</a>.<tt><i>complete</i></tt>() or
--   <a>completionCompleteUtf8</a>. When no longer needed, the
--   <tt>GCompletion</tt> is freed with <a>completionFree</a>.
--   
--   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 [type<i><tt>gLib</tt></i>.CompletionFunc] in
--   [func<i><tt>gLib</tt></i>.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
--   [type<i><tt>gLib</tt></i>.CompletionStrncmpFunc] in
--   <a>Completion</a>.<tt><i>set_compare</i></tt>().
--   
--   <tt>GCompletion</tt> 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 <a>Completion</a> struct initialized to zero.
newZeroCompletion :: MonadIO m => m Completion

-- | Removes all items from the <a>Completion</a>. The items are not freed,
--   so if the memory was dynamically allocated, it should be freed after
--   calling this function.

-- | <i>Deprecated: (Since version 2.26)Rarely used API</i>
completionClearItems :: (HasCallStack, MonadIO m) => Completion -> m ()

-- | Attempts to complete the string <i><tt>prefix</tt></i> using the
--   <a>Completion</a> target items. In contrast to
--   <tt><i>g_completion_complete()</i></tt>, 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
--   <tt><i>g_completion_complete()</i></tt> if your items are UTF-8
--   strings.
--   
--   <i>Since: 2.4</i>

-- | <i>Deprecated: (Since version 2.26)Rarely used API</i>
completionCompleteUtf8 :: (HasCallStack, MonadIO m) => Completion -> Text -> Text -> m [Text]

-- | Frees all memory used by the <a>Completion</a>. The items are not
--   freed, so if the memory was dynamically allocated, it should be freed
--   after calling this function.

-- | <i>Deprecated: (Since version 2.26)Rarely used API</i>
completionFree :: (HasCallStack, MonadIO m) => Completion -> m ()

-- | Set the value of the “<tt>cache</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #cache
--   </pre>
clearCompletionCache :: MonadIO m => Completion -> m ()

-- | Get the value of the “<tt>cache</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> completion #cache
--   </pre>
getCompletionCache :: MonadIO m => Completion -> m [Ptr ()]

-- | Set the value of the “<tt>cache</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> completion [ #cache <a>:=</a> value ]
--   </pre>
setCompletionCache :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()

-- | Set the value of the “<tt>func</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #func
--   </pre>
clearCompletionFunc :: MonadIO m => Completion -> m ()

-- | Get the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> completion #func
--   </pre>
getCompletionFunc :: MonadIO m => Completion -> m (Maybe CompletionFunc_WithClosures)

-- | Set the value of the “<tt>func</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> completion [ #func <a>:=</a> value ]
--   </pre>
setCompletionFunc :: MonadIO m => Completion -> FunPtr C_CompletionFunc -> m ()

-- | Set the value of the “<tt>items</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #items
--   </pre>
clearCompletionItems :: MonadIO m => Completion -> m ()

-- | Get the value of the “<tt>items</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> completion #items
--   </pre>
getCompletionItems :: MonadIO m => Completion -> m [Ptr ()]

-- | Set the value of the “<tt>items</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> completion [ #items <a>:=</a> value ]
--   </pre>
setCompletionItems :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()

-- | Set the value of the “<tt>prefix</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #prefix
--   </pre>
clearCompletionPrefix :: MonadIO m => Completion -> m ()

-- | Get the value of the “<tt>prefix</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> completion #prefix
--   </pre>
getCompletionPrefix :: MonadIO m => Completion -> m (Maybe Text)

-- | Set the value of the “<tt>prefix</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> completion [ #prefix <a>:=</a> value ]
--   </pre>
setCompletionPrefix :: MonadIO m => Completion -> CString -> m ()

-- | Set the value of the “<tt>strncmp_func</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #strncmpFunc
--   </pre>
clearCompletionStrncmpFunc :: MonadIO m => Completion -> m ()

-- | Get the value of the “<tt>strncmp_func</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> completion #strncmpFunc
--   </pre>
getCompletionStrncmpFunc :: MonadIO m => Completion -> m (Maybe CompletionStrncmpFunc)

-- | Set the value of the “<tt>strncmp_func</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> completion [ #strncmpFunc <a>:=</a> value ]
--   </pre>
setCompletionStrncmpFunc :: MonadIO m => Completion -> FunPtr C_CompletionStrncmpFunc -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Completion.Completion
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Completion.Completion
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


-- | A <tt>GCache</tt> allows sharing of complex data structures, in order
--   to save system resources.
--   
--   <tt>GCache</tt> uses keys and values. A <tt>GCache</tt> key describes
--   the properties of a particular resource. A <tt>GCache</tt> value is
--   the actual resource.
--   
--   <tt>GCache</tt> 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 <a>Cache</a>.
--   
--   Note that it does not destroy the keys and values which were contained
--   in the <a>Cache</a>.

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
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
--   <a>Cache</a>, by using the <i><tt>keyEqualFunc</tt></i> function
--   passed to <tt><i>g_cache_new()</i></tt>. 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
--   <i><tt>valueNewFunc</tt></i>. The key is duplicated by calling
--   <i><tt>keyDupFunc</tt></i> and the duplicated key and value are
--   inserted into the <a>Cache</a>.

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
cacheInsert :: (HasCallStack, MonadIO m) => Cache -> Ptr () -> m (Ptr ())

-- | Calls the given function for each of the keys in the <a>Cache</a>.
--   
--   NOTE <i><tt>func</tt></i> is passed three parameters, the value and
--   key of a cache entry and the <i><tt>userData</tt></i>. The order of
--   value and key is different from the order in which
--   <a>hashTableForeach</a> passes key-value pairs to its callback
--   function !

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
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
--   <i><tt>valueDestroyFunc</tt></i> and <i><tt>keyDestroyFunc</tt></i>
--   passed to <tt><i>g_cache_new()</i></tt>.

-- | <i>Deprecated: (Since version 2.32)Use a <a>HashTable</a> instead</i>
cacheRemove :: (HasCallStack, MonadIO m) => Cache -> Ptr () -> m ()

-- | Calls the given function for each of the values in the <a>Cache</a>.

-- | <i>Deprecated: (Since version 2.10)The reason is that it passes
--   pointers to internal data structures to <i><tt>func</tt></i>; use
--   <a>cacheKeyForeach</a> instead</i>
cacheValueForeach :: (HasCallStack, MonadIO m) => Cache -> HFunc -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.Cache.Cache
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.Cache.Cache
instance Data.GI.Base.BasicTypes.BoxedPtr 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 <a>ByteArray</a> struct initialized to zero.
newZeroByteArray :: MonadIO m => m ByteArray

-- | Adds the given bytes to the end of the <a>ByteArray</a>. The array
--   will grow in size automatically if necessary.
byteArrayAppend :: (HasCallStack, MonadIO m) => ByteString -> Word8 -> Word32 -> m ByteString

-- | Frees the memory allocated by the <a>ByteArray</a>. If
--   <i><tt>freeSegment</tt></i> is <a>True</a> it frees the actual byte
--   data. If the reference count of <i><tt>array</tt></i> is greater than
--   one, the <a>ByteArray</a> wrapper is preserved but the size of
--   <i><tt>array</tt></i> will be set to zero.
byteArrayFree :: (HasCallStack, MonadIO m) => ByteString -> Bool -> m Word8

-- | Transfers the data from the <a>ByteArray</a> into a new immutable
--   <a>Bytes</a>.
--   
--   The <a>ByteArray</a> is freed unless the reference count of
--   <i><tt>array</tt></i> is greater than one, the <a>ByteArray</a>
--   wrapper is preserved but the size of <i><tt>array</tt></i> will be set
--   to zero.
--   
--   This is identical to using <a>bytesNewTake</a> and
--   <a>byteArrayFree</a> together.
--   
--   <i>Since: 2.32</i>
byteArrayFreeToBytes :: (HasCallStack, MonadIO m) => ByteString -> m Bytes

-- | Creates a new <a>ByteArray</a> with a reference count of 1.
byteArrayNew :: (HasCallStack, MonadIO m) => m ByteString

-- | Creates a byte array containing the <i><tt>data</tt></i>. After this
--   call, <i><tt>data</tt></i> belongs to the <a>ByteArray</a> and may no
--   longer be modified by the caller. The memory of <i><tt>data</tt></i>
--   has to be dynamically allocated and will eventually be freed with
--   <a>free</a>.
--   
--   Do not use it if <i><tt>len</tt></i> is greater than
--   <tt><i>G_MAXUINT</i></tt>. <a>ByteArray</a> stores the length of its
--   data in <tt><i>guint</i></tt>, which may be shorter than
--   <tt><i>gsize</i></tt>.
--   
--   <i>Since: 2.32</i>
byteArrayNewTake :: (HasCallStack, MonadIO m) => ByteString -> m ByteString

-- | Adds the given data to the start of the <a>ByteArray</a>. The array
--   will grow in size automatically if necessary.
byteArrayPrepend :: (HasCallStack, MonadIO m) => ByteString -> Word8 -> Word32 -> m ByteString

-- | Atomically increments the reference count of <i><tt>array</tt></i> by
--   one. This function is thread-safe and may be called from any thread.
--   
--   <i>Since: 2.22</i>
byteArrayRef :: (HasCallStack, MonadIO m) => ByteString -> m ByteString

-- | Removes the byte at the given index from a <a>ByteArray</a>. 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 <a>ByteArray</a>. The last
--   element in the array is used to fill in the space, so this function
--   does not preserve the order of the <a>ByteArray</a>. But it is faster
--   than <a>byteArrayRemoveIndex</a>.
byteArrayRemoveIndexFast :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> m ByteString

-- | Removes the given number of bytes starting at the given index from a
--   <a>ByteArray</a>. The following elements are moved to close the gap.
--   
--   <i>Since: 2.4</i>
byteArrayRemoveRange :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> Word32 -> m ByteString

-- | Sets the size of the <a>ByteArray</a>, expanding it if necessary.
byteArraySetSize :: (HasCallStack, MonadIO m) => ByteString -> Word32 -> m ByteString

-- | Creates a new <a>ByteArray</a> with <i><tt>reservedSize</tt></i> 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 <i><tt>compareFunc</tt></i> which should be
--   a <tt><i>qsort()</i></tt>-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 <a>byteArraySort</a>, 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.
--   
--   <i>Since: 2.64</i>
byteArraySteal :: (HasCallStack, MonadIO m) => ByteString -> m (Word8, CSize)

-- | Atomically decrements the reference count of <i><tt>array</tt></i> 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.
--   
--   <i>Since: 2.22</i>
byteArrayUnref :: (HasCallStack, MonadIO m) => ByteString -> m ()

-- | Get the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> byteArray #data
--   </pre>
getByteArrayData :: MonadIO m => ByteArray -> m Word8

-- | Set the value of the “<tt>data</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> byteArray [ #data <a>:=</a> value ]
--   </pre>
setByteArrayData :: MonadIO m => ByteArray -> Word8 -> m ()

-- | Get the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> byteArray #len
--   </pre>
getByteArrayLen :: MonadIO m => ByteArray -> m Word32

-- | Set the value of the “<tt>len</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> byteArray [ #len <a>:=</a> value ]
--   </pre>
setByteArrayLen :: MonadIO m => ByteArray -> Word32 -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.Overloading.HasParentTypes GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.BasicTypes.TypedObject GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.BasicTypes.GBoxed GI.GLib.Structs.ByteArray.ByteArray
instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.GLib.Structs.ByteArray.ByteArray)
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.GLib.Structs.ByteArray.ByteArray tag


-- | An opaque data structure which represents an asynchronous queue.
--   
--   It should only be accessed through the <tt>g_async_queue_*</tt>
--   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
--   <i><tt>queue</tt></i>. 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
--   <i><tt>queue</tt></i>. 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 <i><tt>queue</tt></i>'s
--   lock.
asyncQueueLengthUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m Int32

-- | Acquires the <i><tt>queue</tt></i>'s lock. If another thread is
--   already holding the lock, this call will block until the lock becomes
--   available.
--   
--   Call <a>asyncQueueUnlock</a> to drop the lock again.
--   
--   While holding the lock, you can only call the
--   g_async_queue_*<tt><i>_unlocked()</i></tt> functions on
--   <i><tt>queue</tt></i>. Otherwise, deadlock may occur.
asyncQueueLock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Pops data from the <i><tt>queue</tt></i>. If <i><tt>queue</tt></i> is
--   empty, this function blocks until data becomes available.
asyncQueuePop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Pops data from the <i><tt>queue</tt></i>. If <i><tt>queue</tt></i> is
--   empty, this function blocks until data becomes available.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
asyncQueuePopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Pushes the <i><tt>data</tt></i> into the <i><tt>queue</tt></i>.
--   
--   The <i><tt>data</tt></i> parameter must not be <a>Nothing</a>.
asyncQueuePush :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Pushes the <i><tt>item</tt></i> into the <i><tt>queue</tt></i>.
--   <i><tt>item</tt></i> must not be <a>Nothing</a>. In contrast to
--   <a>asyncQueuePush</a>, 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.
--   
--   <i>Since: 2.46</i>
asyncQueuePushFront :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Pushes the <i><tt>item</tt></i> into the <i><tt>queue</tt></i>.
--   <i><tt>item</tt></i> must not be <a>Nothing</a>. In contrast to
--   <a>asyncQueuePushUnlocked</a>, 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 <i><tt>queue</tt></i>'s
--   lock.
--   
--   <i>Since: 2.46</i>
asyncQueuePushFrontUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Inserts <i><tt>data</tt></i> into <i><tt>queue</tt></i> using
--   <i><tt>func</tt></i> to determine the new position.
--   
--   This function requires that the <i><tt>queue</tt></i> is sorted before
--   pushing on new elements, see <a>asyncQueueSort</a>.
--   
--   This function will lock <i><tt>queue</tt></i> before it sorts the
--   queue and unlock it when it is finished.
--   
--   For an example of <i><tt>func</tt></i> see <a>asyncQueueSort</a>.
--   
--   <i>Since: 2.10</i>
asyncQueuePushSorted :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()

-- | Inserts <i><tt>data</tt></i> into <i><tt>queue</tt></i> using
--   <i><tt>func</tt></i> to determine the new position.
--   
--   The sort function <i><tt>func</tt></i> is passed two elements of the
--   <i><tt>queue</tt></i>. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   <i><tt>queue</tt></i> or a positive value if the first element should
--   be lower in the <i><tt>queue</tt></i> than the second element.
--   
--   This function requires that the <i><tt>queue</tt></i> is sorted before
--   pushing on new elements, see <a>asyncQueueSort</a>.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
--   
--   For an example of <i><tt>func</tt></i> see <a>asyncQueueSort</a>.
--   
--   <i>Since: 2.10</i>
asyncQueuePushSortedUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()

-- | Pushes the <i><tt>data</tt></i> into the <i><tt>queue</tt></i>.
--   
--   The <i><tt>data</tt></i> parameter must not be <a>Nothing</a>.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
asyncQueuePushUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()

-- | Increases the reference count of the asynchronous
--   <i><tt>queue</tt></i> by 1.

-- | <i>Deprecated: (Since version 2.8)Reference counting is done
--   atomically.so <tt><i>g_async_queue_ref()</i></tt> can be used
--   regardless of the <i><tt>queue</tt></i>'slock.</i>
asyncQueueRefUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Remove an item from the queue.
--   
--   <i>Since: 2.46</i>
asyncQueueRemove :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool

-- | Remove an item from the queue.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
--   
--   <i>Since: 2.46</i>
asyncQueueRemoveUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool

-- | Sorts <i><tt>queue</tt></i> using <i><tt>func</tt></i>.
--   
--   The sort function <i><tt>func</tt></i> is passed two elements of the
--   <i><tt>queue</tt></i>. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   <i><tt>queue</tt></i> or a positive value if the first element should
--   be lower in the <i><tt>queue</tt></i> than the second element.
--   
--   This function will lock <i><tt>queue</tt></i> 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   gint32 id1;
--   gint32 id2;
--   
--   id1 = GPOINTER_TO_INT (element1);
--   id2 = GPOINTER_TO_INT (element2);
--   
--   return (id1 &gt; id2 ? +1 : id1 == id2 ? 0 : -1);
--   </pre>
--   
--   <i>Since: 2.10</i>
asyncQueueSort :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()

-- | Sorts <i><tt>queue</tt></i> using <i><tt>func</tt></i>.
--   
--   The sort function <i><tt>func</tt></i> is passed two elements of the
--   <i><tt>queue</tt></i>. It should return 0 if they are equal, a
--   negative value if the first element should be higher in the
--   <i><tt>queue</tt></i> or a positive value if the first element should
--   be lower in the <i><tt>queue</tt></i> than the second element.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
--   
--   <i>Since: 2.10</i>
asyncQueueSortUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()

-- | Pops data from the <i><tt>queue</tt></i>. If the queue is empty,
--   blocks until <i><tt>endTime</tt></i> or until data becomes available.
--   
--   If no data is received before <i><tt>endTime</tt></i>, <a>Nothing</a>
--   is returned.
--   
--   To easily calculate <i><tt>endTime</tt></i>, a combination of
--   <a>getRealTime</a> and <a>timeValAdd</a> can be used.

-- | <i>Deprecated: use <a>asyncQueueTimeoutPop</a>.</i>
asyncQueueTimedPop :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())

-- | Pops data from the <i><tt>queue</tt></i>. If the queue is empty,
--   blocks until <i><tt>endTime</tt></i> or until data becomes available.
--   
--   If no data is received before <i><tt>endTime</tt></i>, <a>Nothing</a>
--   is returned.
--   
--   To easily calculate <i><tt>endTime</tt></i>, a combination of
--   <a>getRealTime</a> and <a>timeValAdd</a> can be used.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.

-- | <i>Deprecated: use <a>asyncQueueTimeoutPopUnlocked</a>.</i>
asyncQueueTimedPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())

-- | Pops data from the <i><tt>queue</tt></i>. If the queue is empty,
--   blocks for <i><tt>timeout</tt></i> microseconds, or until data becomes
--   available.
--   
--   If no data is received before the timeout, <a>Nothing</a> is returned.
asyncQueueTimeoutPop :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())

-- | Pops data from the <i><tt>queue</tt></i>. If the queue is empty,
--   blocks for <i><tt>timeout</tt></i> microseconds, or until data becomes
--   available.
--   
--   If no data is received before the timeout, <a>Nothing</a> is returned.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
asyncQueueTimeoutPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())

-- | Tries to pop data from the <i><tt>queue</tt></i>. If no data is
--   available, <a>Nothing</a> is returned.
asyncQueueTryPop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Tries to pop data from the <i><tt>queue</tt></i>. If no data is
--   available, <a>Nothing</a> is returned.
--   
--   This function must be called while holding the <i><tt>queue</tt></i>'s
--   lock.
asyncQueueTryPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())

-- | Releases the queue's lock.
--   
--   Calling this function when you have not acquired the with
--   <a>asyncQueueLock</a> leads to undefined behaviour.
asyncQueueUnlock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()

-- | Decreases the reference count of the asynchronous
--   <i><tt>queue</tt></i> by 1 and releases the lock. This function must
--   be called while holding the <i><tt>queue</tt></i>'s lock. If the
--   reference count went to 0, the <i><tt>queue</tt></i> will be destroyed
--   and the memory allocated will be freed.

-- | <i>Deprecated: (Since version 2.8)Reference counting is done
--   atomically.so <a>asyncQueueUnref</a> can be used regardless of the
--   <i><tt>queue</tt></i>'slock.</i>
asyncQueueUnrefAndUnlock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()
instance GHC.Classes.Eq GI.GLib.Structs.AsyncQueue.AsyncQueue
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GLib.Structs.AsyncQueue.AsyncQueue
instance Data.GI.Base.BasicTypes.BoxedPtr GI.GLib.Structs.AsyncQueue.AsyncQueue


module GI.GLib.Structs


module GI.GLib.Functions

-- | A wrapper for the POSIX <tt><i>access()</i></tt> 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
--   <tt><i>access()</i></tt>.
--   
--   <i>Since: 2.8</i>
access :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | This function is similar to <a>malloc</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) 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 <a>alignedFreeSized</a> or <a>alignedFree</a>.
--   
--   <i>Since: 2.72</i>
alignedAlloc :: (HasCallStack, MonadIO m) => CSize -> CSize -> CSize -> m (Ptr ())

-- | This function is similar to <a>alignedAlloc</a>, but it will also
--   clear the allocated memory before returning it.
--   
--   <i>Since: 2.72</i>
alignedAlloc0 :: (HasCallStack, MonadIO m) => CSize -> CSize -> CSize -> m (Ptr ())

-- | Frees the memory allocated by <a>alignedAlloc</a>.
--   
--   <i>Since: 2.72</i>
alignedFree :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Frees the memory pointed to by <i><tt>mem</tt></i>, assuming it is has
--   the given <i><tt>size</tt></i> and <i><tt>alignment</tt></i>.
--   
--   If <i><tt>mem</tt></i> is <a>Nothing</a> this is a no-op (and
--   <i><tt>size</tt></i> is ignored).
--   
--   It is an error if <i><tt>size</tt></i> doesn’t match the size, or
--   <i><tt>alignment</tt></i> doesn’t match the alignment, passed when
--   <i><tt>mem</tt></i> was allocated. <i><tt>size</tt></i> and
--   <i><tt>alignment</tt></i> are passed to this function to allow
--   optimizations in the allocator. If you don’t know either of them, use
--   <a>alignedFree</a> instead.
--   
--   <i>Since: 2.76</i>
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
--   <tt><i>GLib.ascii_isdigit</i></tt>, <tt>-1</tt> is returned.
--   
--   Differs from <a>unicharDigitValue</a> 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 <tt>gdouble</tt> to a string, using the '.' as decimal
--   point.
--   
--   This function generates enough precision that converting the string
--   back using <a>asciiStrtod</a> 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
--   [const<i><tt>gLib</tt></i>.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 <tt>gdouble</tt> to a string, using the '.' as decimal
--   point. To format the number you pass in a <tt>printf()</tt>-style
--   format string. Allowed conversion specifiers are 'e', 'E', 'f', 'F',
--   'g' and 'G'.
--   
--   The <i><tt>format</tt></i> must just be a single format specifier
--   starting with <tt>%</tt>, expecting a <tt>gdouble</tt> argument.
--   
--   The returned buffer is guaranteed to be nul-terminated.
--   
--   If you just want to want to serialize the value into a string, use
--   <a>asciiDtostr</a>.
asciiFormatd :: (HasCallStack, MonadIO m) => Text -> Int32 -> Text -> Double -> m Text

-- | Compare two strings, ignoring the case of ASCII characters.
--   
--   Unlike the BSD <tt>strcasecmp()</tt> 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 <i><tt>s1</tt></i> and <i><tt>s2</tt></i> must be
--   non-<tt>NULL</tt>.
asciiStrcasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> m Int32

-- | Converts all upper case ASCII letters to lower case ASCII letters,
--   with semantics that exactly match <a>asciiTolower</a>.
asciiStrdown :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | A convenience function for converting a string to a signed number.
--   
--   This function assumes that <i><tt>str</tt></i> contains only a number
--   of the given <i><tt>base</tt></i> that is within inclusive bounds
--   limited by <i><tt>min</tt></i> and <i><tt>max</tt></i>. If this is
--   true, then the converted number is stored in <i><tt>outNum</tt></i>.
--   An empty string is not a valid input. A string with leading or
--   trailing whitespace is also an invalid input.
--   
--   <i><tt>base</tt></i> 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
--   <tt>G_NUMBER_PARSER_ERROR</tt> domain. If the input is invalid, the
--   error code will be
--   [error<i><tt>gLib</tt></i>.NumberParserError.INVALID]. If the parsed
--   number is out of bounds -
--   [error<i><tt>gLib</tt></i>.NumberParserError.OUT_OF_BOUNDS].
--   
--   See <a>asciiStrtoll</a> if you have more complex needs such as parsing
--   a string which starts with a number, but then has other characters.
--   
--   <i>Since: 2.54</i>
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 <i><tt>str</tt></i> contains only a number
--   of the given <i><tt>base</tt></i> that is within inclusive bounds
--   limited by <i><tt>min</tt></i> and <i><tt>max</tt></i>. If this is
--   true, then the converted number is stored in <i><tt>outNum</tt></i>.
--   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 (<tt>-</tt> or <tt>+</tt>) is not a valid input for the unsigned
--   parser.
--   
--   <i><tt>base</tt></i> 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
--   <tt>G_NUMBER_PARSER_ERROR</tt> domain. If the input is invalid, the
--   error code will be
--   [error<i><tt>gLib</tt></i>.NumberParserError.INVALID]. If the parsed
--   number is out of bounds -
--   [error<i><tt>gLib</tt></i>.NumberParserError.OUT_OF_BOUNDS].
--   
--   See <a>asciiStrtoull</a> if you have more complex needs such as
--   parsing a string which starts with a number, but then has other
--   characters.
--   
--   <i>Since: 2.54</i>
asciiStringToUnsigned :: (HasCallStack, MonadIO m) => Text -> Word32 -> Word64 -> Word64 -> m Word64

-- | Compare <i><tt>s1</tt></i> and <i><tt>s2</tt></i>, ignoring the case
--   of ASCII characters and any characters after the first
--   <i><tt>n</tt></i> in each string. If either string is less than
--   <i><tt>n</tt></i> bytes long, comparison will stop at the first nul
--   byte encountered.
--   
--   Unlike the BSD <tt>strncasecmp()</tt> 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 <a>asciiStrcasecmp</a> 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 <tt>strtod()</tt> 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 <tt>strtod()</tt> function.
--   
--   To convert from a gdouble to a string in a locale-insensitive way, use
--   <a>asciiDtostr</a>.
--   
--   If the correct value would cause overflow, plus or minus
--   <tt>HUGE_VAL</tt> is returned (according to the sign of the value),
--   and <tt>ERANGE</tt> is stored in <tt>errno</tt>. If the correct value
--   would cause underflow, zero is returned and <tt>ERANGE</tt> is stored
--   in <tt>errno</tt>.
--   
--   This function resets <tt>errno</tt> before calling <tt>strtod()</tt>
--   so that you can reliably detect overflow and underflow.
asciiStrtod :: (HasCallStack, MonadIO m) => Text -> m (Double, Text)

-- | Converts a string to a <tt>gint64</tt> value.
--   
--   This function behaves like the standard <tt>strtoll()</tt> 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 <tt>strtoll()</tt> function.
--   
--   If the correct value would cause overflow,
--   [const<i><tt>gLib</tt></i>.MAXINT64] or
--   [const<i><tt>gLib</tt></i>.MININT64] is returned, and <tt>ERANGE</tt>
--   is stored in <tt>errno</tt>. If the base is outside the valid range,
--   zero is returned, and <tt>EINVAL</tt> is stored in <tt>errno</tt>. If
--   the string conversion fails, zero is returned, and
--   <i><tt>endptr</tt></i> returns <i><tt>nptr</tt></i> (if
--   <i><tt>endptr</tt></i> is non-<tt>NULL</tt>).
--   
--   <i>Since: 2.12</i>
asciiStrtoll :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Int64, Text)

-- | Converts a string to a <tt>guint64</tt> value.
--   
--   This function behaves like the standard <tt>strtoull()</tt> 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 (<tt>-</tt>) is accepted,
--   and will return the negation of the parsed number, unless that would
--   overflow a <tt>guint64</tt>. 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 <tt>-</tt>.
--   
--   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 <tt>strtoull()</tt> function.
--   
--   If the correct value would cause overflow,
--   [const<i><tt>gLib</tt></i>.MAXUINT64] is returned, and <tt>ERANGE</tt>
--   is stored in <tt>errno</tt>. If the base is outside the valid range,
--   zero is returned, and <tt>EINVAL</tt> is stored in <tt>errno</tt>. If
--   the string conversion fails, zero is returned, and
--   <i><tt>endptr</tt></i> returns <i><tt>nptr</tt></i> (if
--   <i><tt>endptr</tt></i> is non-<tt>NULL</tt>).
--   
--   <i>Since: 2.2</i>
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 <a>asciiToupper</a>.
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 <tt>tolower()</tt> 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 <tt>EOF</tt> but no need to worry about casting to
--   <tt>guchar</tt> 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 <tt>toupper()</tt> 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 <tt>EOF</tt> but no need to worry about casting to
--   <tt>guchar</tt> 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
--   <tt><i>GLib.ascii_isxdigit</i></tt>, <tt>-1</tt> is returned.
--   
--   Differs from <a>unicharXdigitValue</a> because it takes a char, so
--   there's no worry about sign extension if characters are signed.
--   
--   Differs from <a>unicharXdigitValue</a> because it takes a char, so
--   there's no worry about sign extension if characters are signed.
asciiXdigitValue :: (HasCallStack, MonadIO m) => Int8 -> m Int32

-- | <i>No description available in the introspection data.</i>
assertWarning :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> m ()

-- | <i>No description available in the introspection data.</i>
assertionMessage :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> m ()

-- | <i>No description available in the introspection data.</i>
assertionMessageCmpint :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Word64 -> Text -> Word64 -> Int8 -> m ()

-- | <i>No description available in the introspection data.</i>
assertionMessageCmpstr :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Text -> Text -> Text -> m ()

-- | <i>No description available in the introspection data.</i>
assertionMessageCmpstrv :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Text -> Text -> Text -> CSize -> m ()

-- | <i>No description available in the introspection data.</i>
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 <a>atexit</a> actually is a preprocessor
--   macro that maps to a call to the <tt><i>atexit()</i></tt> function in
--   the C library. This means that in case the code that calls
--   <a>atexit</a>, i.e. <tt><i>atexit()</i></tt>, 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 <a>atexit</a>
--   was a function in the GLib DLL.
--   
--   The behaviour of <tt><i>atexit()</i></tt> in the context of
--   dynamically loaded modules is not formally specified and varies
--   wildly.
--   
--   On POSIX systems, calling <a>atexit</a> (or <tt><i>atexit()</i></tt>)
--   in a dynamically loaded module which is unloaded before the program
--   terminates might well cause a crash at program exit.
--   
--   Some POSIX systems implement <tt><i>atexit()</i></tt> 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 <a>atexit</a> (or <tt><i>atexit()</i></tt>) except in the main
--   executable of a program.

-- | <i>Deprecated: (Since version 2.32)It is best to avoid
--   <a>atexit</a>.</i>
atexit :: (HasCallStack, MonadIO m) => VoidFunc -> m ()

-- | Atomically adds <i><tt>val</tt></i> to the value of
--   <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic += val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Before version 2.30, this function did not return a value (but
--   <a>atomicIntExchangeAndAdd</a> did, and had the same meaning).
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Performs an atomic bitwise 'and' of the value of
--   <i><tt>atomic</tt></i> and <i><tt>val</tt></i>, storing the result
--   back in <i><tt>atomic</tt></i>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic &amp;= val; return tmp; }</tt>.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
atomicIntAnd :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Compares <i><tt>atomic</tt></i> to <i><tt>oldval</tt></i> and, if
--   equal, sets it to <i><tt>newval</tt></i>. If <i><tt>atomic</tt></i>
--   was not equal to <i><tt>oldval</tt></i> then no change occurs.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ if (*atomic ==
--   oldval) { *atomic = newval; return TRUE; } else return FALSE; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntCompareAndExchange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> m Bool

-- | Compares <i><tt>atomic</tt></i> to <i><tt>oldval</tt></i> and, if
--   equal, sets it to <i><tt>newval</tt></i>. If <i><tt>atomic</tt></i>
--   was not equal to <i><tt>oldval</tt></i> then no change occurs. In any
--   case the value of <i><tt>atomic</tt></i> before this operation is
--   stored in <i><tt>preval</tt></i>.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ *preval =
--   *atomic; if (*atomic == oldval) { *atomic = newval; return TRUE; }
--   else return FALSE; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   See also <a>atomicIntCompareAndExchange</a>
--   
--   <i>Since: 2.74</i>
atomicIntCompareAndExchangeFull :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> m (Bool, Int32)

-- | Decrements the value of <i><tt>atomic</tt></i> by 1.
--   
--   Think of this operation as an atomic version of <tt>{ *atomic -= 1;
--   return (*atomic == 0); }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntDecAndTest :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Sets the <i><tt>atomic</tt></i> to <i><tt>newval</tt></i> and returns
--   the old value from <i><tt>atomic</tt></i>.
--   
--   This exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic = val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   <i>Since: 2.74</i>
atomicIntExchange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | This function existed before <a>atomicIntAdd</a> 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.
--   
--   <i>Since: 2.4</i>

-- | <i>Deprecated: (Since version 2.30)Use <a>atomicIntAdd</a>
--   instead.</i>
atomicIntExchangeAndAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Gets the current value of <i><tt>atomic</tt></i>.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntGet :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Increments the value of <i><tt>atomic</tt></i> by 1.
--   
--   Think of this operation as an atomic version of <tt>{ *atomic += 1;
--   }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Performs an atomic bitwise 'or' of the value of <i><tt>atomic</tt></i>
--   and <i><tt>val</tt></i>, storing the result back in
--   <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic |= val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
atomicIntOr :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Sets the value of <i><tt>atomic</tt></i> to <i><tt>newval</tt></i>.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicIntSet :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Performs an atomic bitwise 'xor' of the value of
--   <i><tt>atomic</tt></i> and <i><tt>val</tt></i>, storing the result
--   back in <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic ^= val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
atomicIntXor :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Word32

-- | Atomically adds <i><tt>val</tt></i> to the value of
--   <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic += val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   In GLib 2.80, the return type was changed from <tt><i>gssize</i></tt>
--   to <tt><i>gintptr</i></tt> to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   <i>Since: 2.30</i>
atomicPointerAdd :: (HasCallStack, MonadIO m) => Ptr () -> Int64 -> m CIntPtr

-- | Performs an atomic bitwise 'and' of the value of
--   <i><tt>atomic</tt></i> and <i><tt>val</tt></i>, storing the result
--   back in <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic &amp;= val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   In GLib 2.80, the return type was changed from <tt><i>gsize</i></tt>
--   to <tt><i>guintptr</i></tt> to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   <i>Since: 2.30</i>
atomicPointerAnd :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | Compares <i><tt>atomic</tt></i> to <i><tt>oldval</tt></i> and, if
--   equal, sets it to <i><tt>newval</tt></i>. If <i><tt>atomic</tt></i>
--   was not equal to <i><tt>oldval</tt></i> then no change occurs.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ if (*atomic ==
--   oldval) { *atomic = newval; return TRUE; } else return FALSE; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicPointerCompareAndExchange :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> Ptr () -> m Bool

-- | Compares <i><tt>atomic</tt></i> to <i><tt>oldval</tt></i> and, if
--   equal, sets it to <i><tt>newval</tt></i>. If <i><tt>atomic</tt></i>
--   was not equal to <i><tt>oldval</tt></i> then no change occurs. In any
--   case the value of <i><tt>atomic</tt></i> before this operation is
--   stored in <i><tt>preval</tt></i>.
--   
--   This compare and exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ *preval =
--   *atomic; if (*atomic == oldval) { *atomic = newval; return TRUE; }
--   else return FALSE; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   See also <a>atomicPointerCompareAndExchange</a>
--   
--   <i>Since: 2.74</i>
atomicPointerCompareAndExchangeFull :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> Ptr () -> m (Bool, Ptr ())

-- | Sets the <i><tt>atomic</tt></i> to <i><tt>newval</tt></i> and returns
--   the old value from <i><tt>atomic</tt></i>.
--   
--   This exchange is done atomically.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic = val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   <i>Since: 2.74</i>
atomicPointerExchange :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m (Ptr ())

-- | Gets the current value of <i><tt>atomic</tt></i>.
--   
--   This call acts as a full compiler and hardware memory barrier (before
--   the get).
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicPointerGet :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Performs an atomic bitwise 'or' of the value of <i><tt>atomic</tt></i>
--   and <i><tt>val</tt></i>, storing the result back in
--   <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic |= val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   In GLib 2.80, the return type was changed from <tt><i>gsize</i></tt>
--   to <tt><i>guintptr</i></tt> to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   <i>Since: 2.30</i>
atomicPointerOr :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | Sets the value of <i><tt>atomic</tt></i> to <i><tt>newval</tt></i>.
--   
--   This call acts as a full compiler and hardware memory barrier (after
--   the set).
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.4</i>
atomicPointerSet :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m ()

-- | Performs an atomic bitwise 'xor' of the value of
--   <i><tt>atomic</tt></i> and <i><tt>val</tt></i>, storing the result
--   back in <i><tt>atomic</tt></i>.
--   
--   Think of this operation as an atomic version of <tt>{ tmp = *atomic;
--   *atomic ^= val; return tmp; }</tt>.
--   
--   This call acts as a full compiler and hardware memory barrier.
--   
--   While <i><tt>atomic</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the pointer passed to it should not be
--   <tt>volatile</tt>.
--   
--   In GLib 2.80, the return type was changed from <tt><i>gsize</i></tt>
--   to <tt><i>guintptr</i></tt> to add support for platforms with 128-bit
--   pointers. This should not affect existing code.
--   
--   <i>Since: 2.30</i>
atomicPointerXor :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m CUIntPtr

-- | Atomically acquires a reference on the data pointed by
--   <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
atomicRcBoxAcquire :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Allocates <i><tt>blockSize</tt></i> 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.
--   
--   <i>Since: 2.58</i>
atomicRcBoxAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates <i><tt>blockSize</tt></i> 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.
--   
--   <i>Since: 2.58</i>
atomicRcBoxAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a new block of data with atomic reference counting
--   semantics, and copies <i><tt>blockSize</tt></i> bytes of
--   <i><tt>memBlock</tt></i> into it.
--   
--   <i>Since: 2.58</i>
atomicRcBoxDup :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
atomicRcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m CSize

-- | Atomically releases a reference on the data pointed by
--   <i><tt>memBlock</tt></i>.
--   
--   If the reference was the last one, it will free the resources
--   allocated for <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
atomicRcBoxRelease :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Atomically releases a reference on the data pointed by
--   <i><tt>memBlock</tt></i>.
--   
--   If the reference was the last one, it will call
--   <i><tt>clearFunc</tt></i> to clear the contents of
--   <i><tt>memBlock</tt></i>, and then will free the resources allocated
--   for <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
atomicRcBoxReleaseFull :: (HasCallStack, MonadIO m) => Ptr () -> DestroyNotify -> m ()

-- | Atomically compares the current value of <i><tt>arc</tt></i> with
--   <i><tt>val</tt></i>.
--   
--   <i>Since: 2.58</i>
atomicRefCountCompare :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Atomically decreases the reference count.
--   
--   If <a>True</a> is returned, the reference count reached 0. After this
--   point, <i><tt>arc</tt></i> is an undefined state and must be
--   reinitialized with <a>atomicRefCountInit</a> to be used again.
--   
--   <i>Since: 2.58</i>
atomicRefCountDec :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Atomically increases the reference count.
--   
--   <i>Since: 2.58</i>
atomicRefCountInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Initializes a reference count variable to 1.
--   
--   <i>Since: 2.58</i>
atomicRefCountInit :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Decode a sequence of Base-64 encoded text into binary data. Note that
--   the returned binary data is not necessarily zero-terminated, so it
--   should not be used as a character string.
--   
--   <i>Since: 2.12</i>
base64Decode :: (HasCallStack, MonadIO m) => Text -> m ByteString

-- | Decode a sequence of Base-64 encoded text into binary data by
--   overwriting the input data.
--   
--   <i>Since: 2.20</i>
base64DecodeInplace :: (HasCallStack, MonadIO m) => ByteString -> m (Word8, ByteString)

-- | Encode a sequence of binary data into its Base-64 stringified
--   representation.
--   
--   <i>Since: 2.12</i>
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.

-- | <i>Deprecated: (Since version 2.2)Use <a>pathGetBasename</a> instead,
--   but notice that <a>pathGetBasename</a> allocates new memory for the
--   returned string, unlike this function which returns a pointer into the
--   argument.</i>
basename :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Sets the indicated <i><tt>lockBit</tt></i> in <i><tt>address</tt></i>.
--   If the bit is already set, this call will block until <a>bitUnlock</a>
--   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 &lt;&lt; <i><tt>bit</tt></i>).
--   If <i><tt>bit</tt></i> is not between 0 and 31 then the result is
--   undefined.
--   
--   This function accesses <i><tt>address</tt></i> atomically. All other
--   accesses to <i><tt>address</tt></i> must be atomic in order for this
--   function to work reliably. While <i><tt>address</tt></i> has a
--   <tt>volatile</tt> qualifier, this is a historical artifact and the
--   argument passed to it should not be <tt>volatile</tt>.
--   
--   <i>Since: 2.24</i>
bitLock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | Find the position of the first bit set in <i><tt>mask</tt></i>,
--   searching from (but not including) <i><tt>nthBit</tt></i> upwards.
--   Bits are numbered from 0 (least significant) to
--   sizeof(<tt><i>gulong</i></tt>) * 8 - 1 (31 or 63, usually). To start
--   searching from the 0th bit, set <i><tt>nthBit</tt></i> to -1.
bitNthLsf :: (HasCallStack, MonadIO m) => CULong -> Int32 -> m Int32

-- | Find the position of the first bit set in <i><tt>mask</tt></i>,
--   searching from (but not including) <i><tt>nthBit</tt></i> downwards.
--   Bits are numbered from 0 (least significant) to
--   sizeof(<tt><i>gulong</i></tt>) * 8 - 1 (31 or 63, usually). To start
--   searching from the last bit, set <i><tt>nthBit</tt></i> to -1 or
--   GLIB_SIZEOF_LONG * 8.
bitNthMsf :: (HasCallStack, MonadIO m) => CULong -> Int32 -> m Int32

-- | Gets the number of bits used to hold <i><tt>number</tt></i>, e.g. if
--   <i><tt>number</tt></i> is 4, 3 bits are needed.
bitStorage :: (HasCallStack, MonadIO m) => CULong -> m Word32

-- | Sets the indicated <i><tt>lockBit</tt></i> in <i><tt>address</tt></i>,
--   returning <a>True</a> if successful. If the bit is already set,
--   returns <a>False</a> 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 &lt;&lt; <i><tt>bit</tt></i>).
--   If <i><tt>bit</tt></i> is not between 0 and 31 then the result is
--   undefined.
--   
--   This function accesses <i><tt>address</tt></i> atomically. All other
--   accesses to <i><tt>address</tt></i> must be atomic in order for this
--   function to work reliably. While <i><tt>address</tt></i> has a
--   <tt>volatile</tt> qualifier, this is a historical artifact and the
--   argument passed to it should not be <tt>volatile</tt>.
--   
--   <i>Since: 2.24</i>
bitTrylock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Clears the indicated <i><tt>lockBit</tt></i> in
--   <i><tt>address</tt></i>. If another thread is currently blocked in
--   <a>bitLock</a> on this same bit then it will be woken up.
--   
--   This function accesses <i><tt>address</tt></i> atomically. All other
--   accesses to <i><tt>address</tt></i> must be atomic in order for this
--   function to work reliably. While <i><tt>address</tt></i> has a
--   <tt>volatile</tt> qualifier, this is a historical artifact and the
--   argument passed to it should not be <tt>volatile</tt>.
--   
--   <i>Since: 2.24</i>
bitUnlock :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m ()

-- | <i>No description available in the introspection data.</i>
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 <tt><i>g_build_filename()</i></tt>,
--   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
--   <a>PathBuf</a> instead.
--   
--   <i>Since: 2.8</i>
buildFilenamev :: (HasCallStack, MonadIO m) => [[Char]] -> m [Char]

-- | Behaves exactly like <tt><i>g_build_path()</i></tt>, but takes the
--   path elements as a string array, instead of variadic arguments.
--   
--   This function is mainly meant for language bindings.
--   
--   <i>Since: 2.8</i>
buildPathv :: (HasCallStack, MonadIO m) => Text -> [[Char]] -> m [Char]

-- | Gets the canonical file name from <i><tt>filename</tt></i>. All triple
--   slashes are turned into single slashes, and all <tt>..</tt> and
--   <tt>.</tt>s resolved against <i><tt>relativeTo</tt></i>.
--   
--   Symlinks are not followed, and the returned path is guaranteed to be
--   absolute.
--   
--   If <i><tt>filename</tt></i> is an absolute path,
--   <i><tt>relativeTo</tt></i> is ignored. Otherwise,
--   <i><tt>relativeTo</tt></i> will be prepended to
--   <i><tt>filename</tt></i> to make it absolute.
--   <i><tt>relativeTo</tt></i> must be an absolute path, or
--   <a>Nothing</a>. If <i><tt>relativeTo</tt></i> is <a>Nothing</a>, it'll
--   fallback to <a>getCurrentDir</a>.
--   
--   This function never fails, and will canonicalize file paths even if
--   they don't exist.
--   
--   No file system I/O is done.
--   
--   <i>Since: 2.58</i>
canonicalizeFilename :: (HasCallStack, MonadIO m) => [Char] -> Maybe [Char] -> m [Char]

-- | A wrapper for the POSIX <tt><i>chdir()</i></tt> function. The function
--   changes the current directory of the process to <i><tt>path</tt></i>.
--   
--   See your C library manual for more details about
--   <tt><i>chdir()</i></tt>.
--   
--   <i>Since: 2.8</i>
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 <a>MAJOR_VERSION</a>,
--   <a>MINOR_VERSION</a>, <a>MICRO_VERSION</a> 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
--   <tt>@required_major.required_minor.@required_micro</tt>. Second the
--   running library must be binary compatible with the version
--   <tt>@required_major.@required_minor.@required_micro</tt> (same major
--   version.)
--   
--   <i>Since: 2.6</i>
checkVersion :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> Word32 -> m (Maybe Text)

-- | Sets a function to be called when the child indicated by
--   <i><tt>pid</tt></i> exits, at the priority <i><tt>priority</tt></i>.
--   
--   If you obtain <i><tt>pid</tt></i> from <a>spawnAsync</a> or
--   <a>spawnAsyncWithPipes</a> you will need to pass
--   <a>SpawnFlagsDoNotReapChild</a> as flag to the spawn function for the
--   child watching to work.
--   
--   In many programs, you will want to call <a>spawnCheckWaitStatus</a> in
--   the callback to determine whether or not the child exited
--   successfully.
--   
--   Also, note that on platforms where <tt><i>GPid</i></tt> must be
--   explicitly closed (see <a>spawnClosePid</a>) <i><tt>pid</tt></i> must
--   not be closed while the source is still active. Typically, you should
--   invoke <a>spawnClosePid</a> in the callback function for the source.
--   
--   GLib supports only a single callback per process id. On POSIX
--   platforms, the same restrictions mentioned for
--   <a>childWatchSourceNew</a> apply to this function.
--   
--   This internally creates a main loop source using
--   <a>childWatchSourceNew</a> and attaches it to the main loop context
--   using <a>sourceAttach</a>. You can do these steps manually if you need
--   greater control.
--   
--   <i>Since: 2.4</i>
childWatchAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> ChildWatchFunc -> m Word32

-- | Creates a new child_watch source.
--   
--   The source will not initially be associated with any
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   before it will be executed.
--   
--   Note that child watch sources can only be used in conjunction with
--   <tt>g_spawn...</tt> when the <a>SpawnFlagsDoNotReapChild</a> flag is
--   used.
--   
--   Note that on platforms where <tt><i>GPid</i></tt> must be explicitly
--   closed (see <a>spawnClosePid</a>) <i><tt>pid</tt></i> must not be
--   closed while the source is still active. Typically, you will want to
--   call <a>spawnClosePid</a> in the callback function for the source.
--   
--   On POSIX platforms, the following restrictions apply to this API due
--   to limitations in POSIX process interfaces:
--   
--   <ul>
--   <li><i><tt>pid</tt></i> must be a child of this process</li>
--   <li><i><tt>pid</tt></i> must be positive</li>
--   <li>the application must not call <tt>waitpid</tt> with a non-positive
--   first argument, for instance in another thread</li>
--   <li>the application must not wait for <i><tt>pid</tt></i> to exit by
--   any other mechanism, including <tt>waitpid(pid, ...)</tt> or a second
--   child-watch source for the same <i><tt>pid</tt></i></li>
--   <li>the application must not ignore <tt>SIGCHLD</tt></li>
--   <li>Before 2.78, the application could not send a signal
--   (<tt>kill()</tt>) to the watched <i><tt>pid</tt></i> in a race free
--   manner. Since 2.78, you can do that while the associated
--   <a>MainContext</a> is acquired.</li>
--   <li>Before 2.78, even after destroying the <a>Source</a>, you could
--   not be sure that <i><tt>pid</tt></i> wasn't already reaped. Hence, it
--   was also not safe to <tt>kill()</tt> or <tt>waitpid()</tt> 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.</li>
--   </ul>
--   
--   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 <tt>ECHILD</tt> was received by <tt>waitpid</tt>.
--   
--   Calling <tt>waitpid</tt> for specific processes other than
--   <i><tt>pid</tt></i> remains a valid thing to do.
--   
--   <i>Since: 2.4</i>
childWatchSourceNew :: (HasCallStack, MonadIO m) => Int32 -> m Source

-- | A wrapper for the POSIX <tt><i>chmod()</i></tt> function. The
--   <tt><i>chmod()</i></tt> 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 <tt><i>chmod()</i></tt> 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
--   <tt><i>chmod()</i></tt>.
--   
--   <i>Since: 2.8</i>
chmod :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | If <i><tt>err</tt></i> or *<i><tt>err</tt></i> is <a>Nothing</a>, does
--   nothing. Otherwise, calls <a>errorFree</a> on *<i><tt>err</tt></i> and
--   sets *<i><tt>err</tt></i> to <a>Nothing</a>.
clearError :: (HasCallStack, MonadIO m) => m ()

-- | This wraps the <tt><i>close()</i></tt> call. In case of error,
--   <tt><i>errno</i></tt> will be preserved, but the error will also be
--   stored as a <a>GError</a> in <i><tt>error</tt></i>. In case of
--   success, <tt><i>errno</i></tt> is undefined.
--   
--   Besides using <a>GError</a>, there is another major reason to prefer
--   this function over the call provided by the system; on Unix, it will
--   attempt to correctly handle <tt><i>EINTR</i></tt>, 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) <i><tt>error</tt></i> is <a>Nothing</a> and
--   <i><tt>fd</tt></i> is a valid open file descriptor. This makes it safe
--   to call from a signal handler or a <a>SpawnChildSetupFunc</a> under
--   those conditions. See <a>`signal(7)`</a>) and
--   <a>`signal-safety(7)`</a>) for more details.
--   
--   <i>Since: 2.36</i>
close :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Close every file descriptor equal to or greater than
--   <i><tt>lowfd</tt></i>.
--   
--   Typically <i><tt>lowfd</tt></i> will be 3, to leave standard input,
--   standard output and standard error open.
--   
--   This is the same as Linux <tt>close_range (lowfd, ~0U, 0)</tt>, but
--   portable to other OSs and to older versions of Linux. Equivalently, it
--   is the same as BSD <tt>closefrom (lowfd)</tt>, 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
--   [callback<i><tt>gLib</tt></i>.SpawnChildSetupFunc], as long as
--   <i><tt>lowfd</tt></i> is non-negative. See <a>`signal(7)`</a>) and
--   <a>`signal-safety(7)`</a>) for more details.
--   
--   <i>Since: 2.80</i>
closefrom :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Computes the checksum for a binary <i><tt>data</tt></i>. This is a
--   convenience wrapper for <a>checksumNew</a>, <a>checksumGetString</a>
--   and <a>checksumFree</a>.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.34</i>
computeChecksumForBytes :: (HasCallStack, MonadIO m) => ChecksumType -> Bytes -> m (Maybe Text)

-- | Computes the checksum for a binary <i><tt>data</tt></i> of
--   <i><tt>length</tt></i>. This is a convenience wrapper for
--   <a>checksumNew</a>, <a>checksumGetString</a> and <a>checksumFree</a>.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.16</i>
computeChecksumForData :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> m (Maybe Text)

-- | Computes the checksum of a string.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.16</i>
computeChecksumForString :: (HasCallStack, MonadIO m) => ChecksumType -> Text -> Int64 -> m (Maybe Text)

-- | Computes the HMAC for a binary <i><tt>data</tt></i>. This is a
--   convenience wrapper for <a>hmacNew</a>, <a>hmacGetString</a> and
--   <a>hmacUnref</a>.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.50</i>
computeHmacForBytes :: (HasCallStack, MonadIO m) => ChecksumType -> Bytes -> Bytes -> m Text

-- | Computes the HMAC for a binary <i><tt>data</tt></i> of
--   <i><tt>length</tt></i>. This is a convenience wrapper for
--   <a>hmacNew</a>, <a>hmacGetString</a> and <a>hmacUnref</a>.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.30</i>
computeHmacForData :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> ByteString -> m Text

-- | Computes the HMAC for a string.
--   
--   The hexadecimal string returned will be in lower case.
--   
--   <i>Since: 2.30</i>
computeHmacForString :: (HasCallStack, MonadIO m) => ChecksumType -> ByteString -> Text -> Int64 -> m Text

-- | Converts a string from one character set to another.
--   
--   Note that you should use <tt><i>g_iconv()</i></tt> for streaming
--   conversions. Despite the fact that <i><tt>bytesRead</tt></i> 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 <a>convert</a>,
--   <tt><i>g_convert_with_iconv()</i></tt> or <a>convertWithFallback</a>.
--   (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 <a>strToAscii</a> instead.
convert :: (HasCallStack, MonadIO m) => ByteString -> Text -> Text -> m (ByteString, CSize)

-- | <i>No description available in the introspection data.</i>
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 <i><tt>fallback</tt></i> will be honored. Some
--   systems may do an approximate conversion from
--   <i><tt>fromCodeset</tt></i> to <i><tt>toCodeset</tt></i> in their
--   <tt><i>iconv()</i></tt> functions, in which case GLib will simply
--   return that approximate conversion.
--   
--   Note that you should use <tt><i>g_iconv()</i></tt> for streaming
--   conversions. Despite the fact that <i><tt>bytesRead</tt></i> 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 <a>convert</a>,
--   <tt><i>g_convert_with_iconv()</i></tt> or <a>convertWithFallback</a>.
--   (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 <tt><i>creat()</i></tt> function. The
--   <tt><i>creat()</i></tt> 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
--   <tt><i>creat()</i></tt> and file descriptors. The actual Windows API
--   for opening files is different, see MSDN documentation for
--   <tt><i>CreateFile()</i></tt>. 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
--   <tt><i>write()</i></tt> or <tt><i>read()</i></tt>.
--   
--   See your C library manual for more details about
--   <tt><i>creat()</i></tt>.
--   
--   <i>Since: 2.8</i>
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 <tt><i>GQuark</i></tt> id
--   and data, together with the given <i><tt>userData</tt></i> parameter.
--   Note that this function is NOT thread-safe. So unless
--   <i><tt>datalist</tt></i> can be protected from any modifications
--   during invocation of this function, it should not be called.
--   
--   <i><tt>func</tt></i> can make changes to <i><tt>datalist</tt></i>, but
--   the iteration will not reflect changes made during the
--   <a>datalistForeach</a> 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
--   <a>datalistIdGetData</a> because it compares strings.
datalistGetData :: (HasCallStack, MonadIO m) => Data -> Text -> m (Ptr ())

-- | Gets flags values packed in together with the datalist. See
--   <a>datalistSetFlags</a>.
--   
--   <i>Since: 2.8</i>
datalistGetFlags :: (HasCallStack, MonadIO m) => Data -> m Word32

-- | Retrieves the data element corresponding to <i><tt>keyId</tt></i>.
datalistIdGetData :: (HasCallStack, MonadIO m) => Data -> Word32 -> m (Ptr ())

-- | Removes multiple keys from a datalist.
--   
--   This is more efficient than calling
--   <tt><i>g_datalist_id_remove_data()</i></tt> multiple times in a row.
--   
--   Before 2.80, <i><tt>nKeys</tt></i> had to be not larger than 16. Now
--   it can be larger, but note that GData does a linear search, so an
--   excessive number of keys will perform badly.
--   
--   <i>Since: 2.74</i>
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
--   <tt><i>GObject</i></tt> type, for example.)
--   
--   <i>Since: 2.8</i>
datalistSetFlags :: (HasCallStack, MonadIO m) => Data -> Word32 -> m ()

-- | Turns off flag values for a data list. See <a>datalistUnsetFlags</a>
--   
--   <i>Since: 2.8</i>
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 <i><tt>datasetLocation</tt></i> can be protected from any
--   modifications during invocation of this function, it should not be
--   called.
--   
--   <i><tt>func</tt></i> can make changes to the dataset, but the
--   iteration will not reflect changes made during the
--   <a>datasetForeach</a> call, other than skipping over elements that are
--   removed.
datasetForeach :: (HasCallStack, MonadIO m) => Ptr () -> DataForeachFunc -> m ()

-- | Gets the data element corresponding to a <tt><i>GQuark</i></tt>.
datasetIdGetData :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())

-- | This is a variant of <a>dgettext</a> that allows specifying a locale
--   category instead of always using <tt>LC_MESSAGES</tt>. See
--   <a>dgettext</a> for more information about how this functions differs
--   from calling <tt><i>dcgettext()</i></tt> directly.
--   
--   <i>Since: 2.26</i>
dcgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Int32 -> m Text

-- | This function is a wrapper of <tt><i>dgettext()</i></tt> which does
--   not translate the message if the default domain as set with
--   <tt><i>textdomain()</i></tt> has no translations for the current
--   locale.
--   
--   The advantage of using this function over <tt><i>dgettext()</i></tt>
--   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 <tt><i>textdomain()</i></tt> and
--   <tt><i>setlocale()</i></tt> should precede any <a>dgettext</a>
--   invocations. For GTK, it means calling <tt><i>textdomain()</i></tt>
--   before gtk_init or its variants.
--   
--   This function disables translations if and only if upon its first call
--   all the following conditions hold:
--   
--   <ul>
--   <li><i><tt>domain</tt></i> is not <a>Nothing</a></li>
--   <li><tt><i>textdomain()</i></tt> has been called to set a default text
--   domain</li>
--   <li>there is no translations available for the default text domain and
--   the current locale</li>
--   <li>current locale is not "C" or any English locales (those starting
--   with "en_")</li>
--   </ul>
--   
--   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
--   <tt><i>textdomain()</i></tt> after initializing GTK.
--   
--   Applications should normally not use this function directly, but use
--   the <tt><i>_()</i></tt> macro for translations.
--   
--   <i>Since: 2.18</i>
dgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m Text

-- | Compares two <tt><i>gpointer</i></tt> arguments and returns
--   <a>True</a> if they are equal. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>keyEqualFunc</tt></i>
--   parameter, when using opaque pointers compared by pointer value as
--   keys in a <a>HashTable</a>.
--   
--   This equality function is also appropriate for keys that are integers
--   stored in pointers, such as <tt>GINT_TO_POINTER (n)</tt>.
directEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a gpointer to a hash value. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>hashFunc</tt></i>
--   parameter, when using opaque pointers compared by pointer value as
--   keys in a <a>HashTable</a>.
--   
--   This hash function is also appropriate for keys that are integers
--   stored in pointers, such as <tt>GINT_TO_POINTER (n)</tt>.
directHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | This function is a wrapper of <tt><i>dngettext()</i></tt> which does
--   not translate the message if the default domain as set with
--   <tt><i>textdomain()</i></tt> has no translations for the current
--   locale.
--   
--   See <a>dgettext</a> for details of how this differs from
--   <tt><i>dngettext()</i></tt> proper.
--   
--   <i>Since: 2.18</i>
dngettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Text -> CULong -> m Text

-- | Compares the two <tt><i>gdouble</i></tt> values being pointed to and
--   returns <a>True</a> if they are equal. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>keyEqualFunc</tt></i>
--   parameter, when using non-<a>Nothing</a> pointers to doubles as keys
--   in a <a>HashTable</a>.
--   
--   <i>Since: 2.22</i>
doubleEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a <tt><i>gdouble</i></tt> to a hash value. It
--   can be passed to <tt><i>g_hash_table_new()</i></tt> as the
--   <i><tt>hashFunc</tt></i> parameter, It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>hashFunc</tt></i>
--   parameter, when using non-<a>Nothing</a> pointers to doubles as keys
--   in a <a>HashTable</a>.
--   
--   <i>Since: 2.22</i>
doubleHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | This function is a variant of <a>dgettext</a> which supports a
--   disambiguating message context. GNU gettext uses the '\004' character
--   to separate the message context and message id in
--   <i><tt>msgctxtid</tt></i>. If 0 is passed as
--   <i><tt>msgidoffset</tt></i>, this function will fall back to trying to
--   use the deprecated convention of using "|" as a separation character.
--   
--   This uses <a>dgettext</a> internally. See that functions for
--   differences with <tt><i>dgettext()</i></tt> proper.
--   
--   Applications should normally not use this function directly, but use
--   the <tt><i>C_()</i></tt> macro for translations with context.
--   
--   <i>Since: 2.16</i>
dpgettext :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> CSize -> m Text

-- | This function is a variant of <a>dgettext</a> which supports a
--   disambiguating message context. GNU gettext uses the '\004' character
--   to separate the message context and message id in
--   <i><tt>msgctxtid</tt></i>.
--   
--   This uses <a>dgettext</a> internally. See that functions for
--   differences with <tt><i>dgettext()</i></tt> proper.
--   
--   This function differs from <tt><i>C_()</i></tt> in that it is not a
--   macro and thus you may use non-string-literals as context and msgid
--   arguments.
--   
--   <i>Since: 2.18</i>
dpgettext2 :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Text -> m Text

-- | Returns the value of the environment variable <i><tt>variable</tt></i>
--   in the provided list <i><tt>envp</tt></i>.
--   
--   <i>Since: 2.32</i>
environGetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> m (Maybe [Char])

-- | Sets the environment variable <i><tt>variable</tt></i> in the provided
--   list <i><tt>envp</tt></i> to <i><tt>value</tt></i>.
--   
--   <i>Since: 2.32</i>
environSetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> [Char] -> Bool -> m [[Char]]

-- | Removes the environment variable <i><tt>variable</tt></i> from the
--   provided environment <i><tt>envp</tt></i>.
--   
--   <i>Since: 2.32</i>
environUnsetenv :: (HasCallStack, MonadIO m) => Maybe [[Char]] -> [Char] -> m [[Char]]

-- | Mark every file descriptor equal to or greater than
--   <i><tt>lowfd</tt></i> to be closed at the next <tt>execve()</tt> or
--   similar, as if via the <tt>FD_CLOEXEC</tt> flag.
--   
--   Typically <i><tt>lowfd</tt></i> will be 3, to leave standard input,
--   standard output and standard error open after exec.
--   
--   This is the same as Linux <tt>close_range (lowfd, ~0U,
--   CLOSE_RANGE_CLOEXEC)</tt>, 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
--   [callback<i><tt>gLib</tt></i>.SpawnChildSetupFunc], as long as
--   <i><tt>lowfd</tt></i> is non-negative. See <a>`signal(7)`</a>) and
--   <a>`signal-safety(7)`</a>) for more details.
--   
--   <i>Since: 2.80</i>
fdwalkSetCloexec :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Gets a <a>FileError</a> constant based on the passed-in
--   <i><tt>errNo</tt></i>.
--   
--   For example, if you pass in <tt>EEXIST</tt> this function returns
--   <a>FileErrorExist</a>. Unlike <tt>errno</tt> values, you can portably
--   assume that all <a>FileError</a> values will exist.
--   
--   Normally a <a>FileError</a> value goes into a <a>GError</a> returned
--   from a function that manipulates files. So you would use
--   <a>fileErrorFromErrno</a> when constructing a <a>GError</a>.
fileErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m FileError

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

-- | Reads an entire file into allocated memory, with good error checking.
--   
--   If the call was successful, it returns <a>True</a> and sets
--   <i><tt>contents</tt></i> to the file contents and
--   <i><tt>length</tt></i> to the length of the file contents in bytes.
--   The string stored in <i><tt>contents</tt></i> will be nul-terminated,
--   so for text files you can pass <a>Nothing</a> for the
--   <i><tt>length</tt></i> argument. If the call was not successful, it
--   returns <a>False</a> and sets <i><tt>error</tt></i>. The error domain
--   is <tt><i>G_FILE_ERROR</i></tt>. Possible error codes are those in the
--   <a>FileError</a> enumeration. In the error case,
--   <i><tt>contents</tt></i> is set to <a>Nothing</a> and
--   <i><tt>length</tt></i> 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 <a>getTmpDir</a>).
--   
--   <i><tt>tmpl</tt></i> should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, as the parameter to
--   <tt><i>g_mkstemp()</i></tt>. However, unlike these functions, the
--   template should only be a basename, no directory components are
--   allowed. If template is <a>Nothing</a>, a default template is used.
--   
--   Note that in contrast to <tt><i>g_mkstemp()</i></tt> (and
--   <tt><i>mkstemp()</i></tt>) <i><tt>tmpl</tt></i> is not modified, and
--   might thus be a read-only literal string.
--   
--   Upon success, and if <i><tt>nameUsed</tt></i> is non-<a>Nothing</a>,
--   the actual name used is returned in <i><tt>nameUsed</tt></i>. This
--   string should be freed with <a>free</a> 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 <i><tt>filename</tt></i> like
--   the POSIX <tt>readlink()</tt> function.
--   
--   The returned string is in the encoding used for filenames. Use
--   <a>filenameToUtf8</a> to convert it to UTF-8.
--   
--   The returned string may also be a relative path. Use
--   <tt><i>g_build_filename()</i></tt> to convert it to an absolute path:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_autoptr(GError) local_error = NULL;
--   g_autofree gchar *link_target = g_file_read_link ("/etc/localtime", &amp;local_error);
--   
--   if (local_error != NULL)
--     g_error ("Error reading link: %s", local_error-&gt;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 (&amp;absolute_link_target);
--     }
--   </pre>
--   
--   <i>Since: 2.4</i>
fileReadLink :: (HasCallStack, MonadIO m) => [Char] -> m [Char]

-- | Writes all of <i><tt>contents</tt></i> to a file named
--   <i><tt>filename</tt></i>. This is a convenience wrapper around calling
--   <a>fileSetContentsFull</a> with <tt>flags</tt> set to
--   <tt>G_FILE_SET_CONTENTS_CONSISTENT |
--   G_FILE_SET_CONTENTS_ONLY_EXISTING</tt> and <tt>mode</tt> set to
--   <tt>0666</tt>.
--   
--   <i>Since: 2.8</i>
fileSetContents :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> m ()

-- | Writes all of <i><tt>contents</tt></i> to a file named
--   <i><tt>filename</tt></i>, with good error checking. If a file called
--   <i><tt>filename</tt></i> already exists it will be overwritten.
--   
--   <i><tt>flags</tt></i> 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 <i><tt>flags</tt></i>
--   has any value other than <a>FileSetContentsFlagsNone</a> then this
--   function may call <tt>fsync()</tt>.
--   
--   If <a>FileSetContentsFlagsConsistent</a> is set in
--   <i><tt>flags</tt></i>, 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:
--   
--   <ul>
--   <li>On UNIX, if <i><tt>filename</tt></i> already exists hard links to
--   <i><tt>filename</tt></i> will break. Also since the file is recreated,
--   existing permissions, access control lists, metadata etc. may be lost.
--   If <i><tt>filename</tt></i> is a symbolic link, the link itself will
--   be replaced, not the linked file.</li>
--   <li>On UNIX, if <i><tt>filename</tt></i> already exists and is
--   non-empty, and if the system supports it (via a journalling filesystem
--   or equivalent), and if <a>FileSetContentsFlagsConsistent</a> is set in
--   <i><tt>flags</tt></i>, the <tt>fsync()</tt> call (or equivalent) will
--   be used to ensure atomic replacement: <i><tt>filename</tt></i> will
--   contain either its old contents or <i><tt>contents</tt></i>, even in
--   the face of system power loss, the disk being unsafely removed,
--   etc.</li>
--   <li>On UNIX, if <i><tt>filename</tt></i> does not already exist or is
--   empty, there is a possibility that system power loss etc. after
--   calling this function will leave <i><tt>filename</tt></i> empty or
--   full of NUL bytes, depending on the underlying filesystem, unless
--   <a>FileSetContentsFlagsDurable</a> and
--   <a>FileSetContentsFlagsConsistent</a> are set in
--   <i><tt>flags</tt></i>.</li>
--   <li>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.</li>
--   <li>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
--   <i><tt>filename</tt></i> already exists and is open.</li>
--   </ul>
--   
--   If the call was successful, it returns <a>True</a>. If the call was
--   not successful, it returns <a>False</a> and sets
--   <i><tt>error</tt></i>. The error domain is
--   <tt><i>G_FILE_ERROR</i></tt>. Possible error codes are those in the
--   <a>FileError</a> enumeration.
--   
--   Note that the name for the temporary file is constructed by appending
--   up to 7 characters to <i><tt>filename</tt></i>.
--   
--   If the file didn’t exist before and is created, it will be given the
--   permissions from <i><tt>mode</tt></i>. Otherwise, the permissions of
--   the existing file may be changed to <i><tt>mode</tt></i> depending on
--   <i><tt>flags</tt></i>, or they may remain unchanged.
--   
--   <i>Since: 2.66</i>
fileSetContentsFull :: (HasCallStack, MonadIO m) => [Char] -> ByteString -> [FileSetContentsFlags] -> Int32 -> m ()

-- | Returns <a>True</a> if any of the tests in the bitfield
--   <i><tt>test</tt></i> are <a>True</a>. For example,
--   <tt>(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)</tt> will return
--   <a>True</a> if the file exists; the check whether it's a directory
--   doesn't matter since the existence test is <a>True</a>. With the
--   current set of available tests, there's no point passing in more than
--   one test at a time.
--   
--   Apart from <a>FileTestIsSymlink</a> all tests follow symbolic links,
--   so for a symbolic link to a regular file <a>fileTest</a> will return
--   <a>True</a> for both <a>FileTestIsSymlink</a> and
--   <a>FileTestIsRegular</a>.
--   
--   Note, that for a dangling symbolic link <a>fileTest</a> will return
--   <a>True</a> for <a>FileTestIsSymlink</a> and <a>False</a> for all
--   other flags.
--   
--   You should never use <a>fileTest</a> 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
--   <a>TOCTOU</a>.
--   
--   For example, you might think you could use <a>FileTestIsSymlink</a> to
--   know whether it is safe to write to a file without being tricked into
--   writing into a different location. It doesn't work!
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   // 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
--     }
--   </pre>
--   
--   Another thing to note is that <a>FileTestExists</a> and
--   <a>FileTestIsExecutable</a> are implemented using the
--   <tt><i>access()</i></tt> 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
--   <a>FileTestIsSymlink</a> will always return <a>False</a>. Testing for
--   <a>FileTestIsExecutable</a> 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 <tt>PATHEXT</tt> 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 <i><tt>filename</tt></i>,
--   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 <i><tt>filename</tt></i> 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 <a>filenameDisplayName</a> if you know
--   the whole path, as it allows translation.
--   
--   <i>Since: 2.6</i>
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
--   <a>filenameToUtf8</a>, the result is guaranteed to be
--   non-<a>Nothing</a> even if the filename actually isn't in the GLib
--   file name encoding.
--   
--   If GLib cannot make sense of the encoding of <i><tt>filename</tt></i>,
--   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 <i><tt>filename</tt></i> was in an invalid encoding.
--   
--   If you know the whole pathname of the file you should use
--   <a>filenameDisplayBasename</a>, since that allows location-based
--   translation of filenames.
--   
--   <i>Since: 2.6</i>
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/<tt><i>file</i></tt>-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][setlocale].
--   
--   The input string shall not contain nul characters even if the
--   <i><tt>len</tt></i> argument is positive. A nul character found inside
--   the string will result in error <a>ConvertErrorIllegalSequence</a>. If
--   the filename encoding is not UTF-8 and the conversion output contains
--   a nul character, the error <a>ConvertErrorEmbeddedNul</a> is set and
--   the function returns <a>Nothing</a>.
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][setlocale].
--   
--   The input string shall not contain nul characters even if the
--   <i><tt>len</tt></i> argument is positive. A nul character found inside
--   the string will result in error <a>ConvertErrorIllegalSequence</a>. If
--   the source encoding is not UTF-8 and the conversion output contains a
--   nul character, the error <a>ConvertErrorEmbeddedNul</a> is set and the
--   function returns <a>Nothing</a>. Use <a>convert</a> to produce output
--   that may contain embedded nul characters.
filenameToUtf8 :: (HasCallStack, MonadIO m) => [Char] -> Int64 -> m (Text, CSize, CSize)

-- | Locates the first executable named <i><tt>program</tt></i> in the
--   user's path, in the same way that <tt><i>execvp()</i></tt> would
--   locate it. Returns an allocated string with the absolute path name, or
--   <a>Nothing</a> if the program is not found in the path. If
--   <i><tt>program</tt></i> is already an absolute path, returns a copy of
--   <i><tt>program</tt></i> if <i><tt>program</tt></i> exists and is
--   executable, and <a>Nothing</a> otherwise.
--   
--   On Windows, if <i><tt>program</tt></i> does not have a file type
--   suffix, tries with the suffixes .exe, .cmd, .bat and .com, and the
--   suffixes in the <tt>PATHEXT</tt> environment variable.
--   
--   On Windows, it looks for the file in the same way as
--   <tt><i>CreateProcess()</i></tt> 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
--   <tt>PATH</tt> 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 <tt>fopen()</tt> function. The
--   <tt>fopen()</tt> 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 <tt>FILE</tt> struct, the
--   <tt>FILE*</tt> 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 <tt>fprintf()</tt> or
--   <tt>fread()</tt>.
--   
--   See your C library manual for more details about <tt>fopen()</tt>.
--   
--   As <tt>close()</tt> and <tt>fclose()</tt> 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 <a>fileSetContentsFull</a> avoid this
--   problem.
--   
--   <i>Since: 2.6</i>
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 <a>free</a> when not needed any
--   longer.
--   
--   See <a>formatSizeFull</a> for more options about how the size might be
--   formatted.
--   
--   <i>Since: 2.30</i>
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 <a>free</a> when not needed any
--   longer.
--   
--   <i>Since: 2.16</i>

-- | <i>Deprecated: (Since version 2.30)This function is broken due to its
--   use of SI suffixes to denote IEC units. Use <a>formatSize</a>
--   instead.</i>
formatSizeForDisplay :: (HasCallStack, MonadIO m) => Int64 -> m Text

-- | Formats a size.
--   
--   This function is similar to <a>formatSize</a> but allows for flags
--   that modify the output. See <a>FormatSizeFlags</a>.
--   
--   <i>Since: 2.30</i>
formatSizeFull :: (HasCallStack, MonadIO m) => Word64 -> [FormatSizeFlags] -> m Text

-- | Frees the memory pointed to by <i><tt>mem</tt></i>.
--   
--   If you know the allocated size of <i><tt>mem</tt></i>, calling
--   <a>freeSized</a> 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
--   &lt;<a>https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html</a>
--   documentation of `__builtin_object_size()`&gt; to understand its
--   caveats).
--   
--   If <i><tt>mem</tt></i> is <a>Nothing</a> it simply returns, so there
--   is no need to check <i><tt>mem</tt></i> against <a>Nothing</a> before
--   calling this function.
free :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Frees the memory pointed to by <i><tt>mem</tt></i>, assuming it is has
--   the given <i><tt>size</tt></i>.
--   
--   If <i><tt>mem</tt></i> is <a>Nothing</a> this is a no-op (and
--   <i><tt>size</tt></i> is ignored).
--   
--   It is an error if <i><tt>size</tt></i> doesn’t match the size passed
--   when <i><tt>mem</tt></i> was allocated. <i><tt>size</tt></i> is passed
--   to this function to allow optimizations in the allocator. If you don’t
--   know the allocation size, use <a>free</a> instead.
--   
--   In case a GCC compatible compiler is used, this function may be used
--   automatically via <a>free</a> if the allocated size is known at
--   compile time, since GLib 2.78.
--   
--   <i>Since: 2.76</i>
freeSized :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m ()

-- | A wrapper for the POSIX <tt><i>freopen()</i></tt> function. The
--   <tt><i>freopen()</i></tt> function opens a file and associates it with
--   an existing stream.
--   
--   See your C library manual for more details about
--   <tt><i>freopen()</i></tt>.
--   
--   <i>Since: 2.6</i>
freopen :: (HasCallStack, MonadIO m) => [Char] -> Text -> Ptr () -> m (Ptr ())

-- | A wrapper for the POSIX <tt>fsync()</tt> function. On Windows,
--   <tt>_commit()</tt> will be used. On macOS, <tt>fcntl(F_FULLFSYNC)</tt>
--   will be used. The <tt>fsync()</tt> function is used to synchronize a
--   file's in-core state with that of the disk.
--   
--   This wrapper will handle retrying on <tt>EINTR</tt>.
--   
--   See the C library manual for more details about
--   <tt><i>fsync()</i></tt>.
--   
--   <i>Since: 2.64</i>
fsync :: (HasCallStack, MonadIO m) => Int32 -> m Int32

-- | Gets a human-readable name for the application, as set by
--   <a>setApplicationName</a>. This name should be localized if possible,
--   and is intended for display to the user. Contrast with
--   <a>getPrgname</a>, which gets a non-localized name. If
--   <a>setApplicationName</a> has not been called, returns the result of
--   <a>getPrgname</a> (which may be <a>Nothing</a> if <a>setPrgname</a>
--   has also not been called).
--   
--   <i>Since: 2.2</i>
getApplicationName :: (HasCallStack, MonadIO m) => m (Maybe Text)

-- | Obtains the character set for the [current locale][setlocale]; you
--   might use this character set as an argument to <a>convert</a>, to
--   convert from the current locale's encoding to some other encoding.
--   (Frequently <a>localeToUtf8</a> and <a>localeFromUtf8</a> 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
--   <tt><i>nl_langinfo()</i></tt> if available. If not, the environment
--   variables <tt>LC_ALL</tt>, <tt>LC_CTYPE</tt>, <tt>LANG</tt> and
--   <tt>CHARSET</tt> are queried in order. <tt><i>nl_langinfo()</i></tt>
--   returns the C locale if no locale has been loaded by
--   <tt><i>setlocale()</i></tt>.
--   
--   The return value is <a>True</a> if the locale's encoding is UTF-8, in
--   that case you can perhaps avoid calling <a>convert</a>.
--   
--   The string returned in <i><tt>charset</tt></i> 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 <a>getCharset</a>, 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 <a>True</a> if the locale's encoding is UTF-8, in
--   that case you can perhaps avoid calling <a>convert</a>.
--   
--   The string returned in <i><tt>charset</tt></i> is not allocated, and
--   should not be freed.
--   
--   <i>Since: 2.62</i>
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]

-- | Equivalent to the UNIX <tt><i>gettimeofday()</i></tt> function, but
--   portable.
--   
--   You may find <a>getRealTime</a> to be more convenient.

-- | <i>Deprecated: (Since version 2.62)t<a>TimeVal</a> is not
--   year-2038-safe. Use <a>getRealTime</a> instead.</i>
getCurrentTime :: (HasCallStack, MonadIO m) => TimeVal -> m ()

-- | Gets the list of environment variables for the current process.
--   
--   The list is <a>Nothing</a> 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
--   <a>strfreev</a> when it is no longer needed.
--   
--   <i>Since: 2.28</i>
getEnviron :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Determines the preferred character sets used for filenames. The first
--   character set from the <i><tt>charsets</tt></i> is the filename
--   encoding, the subsequent character sets are used when trying to
--   generate a displayable representation of a filename, see
--   <a>filenameDisplayName</a>.
--   
--   On Unix, the character sets are determined by consulting the
--   environment variables <tt>G_FILENAME_ENCODING</tt> and
--   <tt>G_BROKEN_FILENAMES</tt>. On Windows, the character set used in the
--   GLib API is always UTF-8 and said environment variables have no
--   effect.
--   
--   <tt>G_FILENAME_ENCODING</tt> may be set to a comma-separated list of
--   character set names. The special token "@locale" is taken to mean the
--   character set for the [current locale][setlocale]. If
--   <tt>G_FILENAME_ENCODING</tt> is not set, but
--   <tt>G_BROKEN_FILENAMES</tt> 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 <i><tt>charsets</tt></i> belong to GLib and must not be
--   freed.
--   
--   Note that on Unix, regardless of the locale character set or
--   <tt>G_FILENAME_ENCODING</tt> value, the actual file names present on a
--   system might be in any random encoding or just gibberish.
--   
--   <i>Since: 2.6</i>
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
--   <tt>HOME</tt> environment variable if it is set to an existing
--   absolute path name, falling back to the <tt>passwd</tt> file in the
--   case that it is unset.
--   
--   If the path given in <tt>HOME</tt> is non-absolute, does not exist, or
--   is not a directory, the result is undefined.
--   
--   Before version 2.36 this function would ignore the <tt>HOME</tt>
--   environment variable, taking the value from the <tt>passwd</tt>
--   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 <tt>HOME</tt> 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.
--   
--   <i>Since: 2.8</i>
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 <tt>LANGUAGE</tt>,
--   <tt>LC_ALL</tt>, <tt>LC_MESSAGES</tt> and <tt>LANG</tt> to find the
--   list of locales specified by the user.
--   
--   <i>Since: 2.6</i>
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 <tt>LANGUAGE</tt>,
--   <tt>LC_ALL</tt>, <i><tt>categoryName</tt></i>, and <tt>LANG</tt> to
--   find the list of locales specified by the user.
--   
--   <a>getLanguageNames</a> returns
--   g_get_language_names_with_category("LC_MESSAGES").
--   
--   <i>Since: 2.58</i>
getLanguageNamesWithCategory :: (HasCallStack, MonadIO m) => Text -> m [Text]

-- | Returns a list of derived variants of <i><tt>locale</tt></i>, 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 <a>`setlocale(3)`</a> for information about locales and
--   their format.
--   
--   <i><tt>locale</tt></i> itself is guaranteed to be returned in the
--   output.
--   
--   For example, if <i><tt>locale</tt></i> is <tt>fr_BE</tt>, then the
--   returned list is <tt>fr_BE</tt>, <tt>fr</tt>. If
--   <i><tt>locale</tt></i> is <tt>en_GB.UTF-8@euro</tt>, then the returned
--   list is <tt>en_GB.UTF-8@euro</tt>, <tt>en_GB.UTF-8</tt>,
--   <tt>en_GB@euro</tt>, <tt>en_GB</tt>, <tt>en.UTF-8@euro</tt>,
--   <tt>en.UTF-8</tt>, <tt>en@euro</tt>, <tt>en</tt>.
--   
--   If you need the list of variants for the current locale, use
--   <a>getLanguageNames</a>.
--   
--   <i>Since: 2.28</i>
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
--   <tt><i>poll()</i></tt> but it may not always be possible to do this.
--   
--   <i>Since: 2.28</i>
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 <tt><i>g_thread_pool_new()</i></tt> for CPU bound
--   tasks and similar cases.
--   
--   <i>Since: 2.36</i>
getNumProcessors :: (HasCallStack, MonadIO m) => m Word32

-- | Get information about the operating system.
--   
--   On Linux this comes from the <tt>/etc/os-release</tt> file. On other
--   systems, it may come from a variety of sources. You can either use the
--   standard key names like <tt><i>G_OS_INFO_KEY_NAME</i></tt> or pass any
--   UTF-8 string key name. For example, <tt>/etc/os-release</tt> 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 <a>Nothing</a>.
--   
--   <i>Since: 2.64</i>
getOsInfo :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Gets the name of the program. This name should not be localized, in
--   contrast to <a>getApplicationName</a>.
--   
--   If you are using <tt><i>GApplication</i></tt> the program name is set
--   in <tt><i>g_application_run()</i></tt>. In case of GDK or GTK it is
--   set in <tt><i>gdk_init()</i></tt>, which is called by
--   <tt><i>gtk_init()</i></tt> and the
--   <tt><i>GtkApplication::startup</i></tt> handler. The program name is
--   found by taking the last component of <i><tt>argv</tt></i>[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 <tt>passwd</tt> file. The encoding of the returned string
--   is system-defined. (On Windows, it is, however, always UTF-8.) If the
--   real user name cannot be determined, the string "Unknown" is returned.
getRealName :: (HasCallStack, MonadIO m) => m [Char]

-- | Queries the system wall-clock time.
--   
--   This call is functionally equivalent to <a>getCurrentTime</a> except
--   that the return value is often more convenient than dealing with a
--   <a>TimeVal</a>.
--   
--   You should only use this call if you are actually interested in the
--   real wall-clock time. <a>getMonotonicTime</a> is probably more useful
--   for measuring intervals.
--   
--   <i>Since: 2.28</i>
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 <a>XDG Base Directory Specification</a>. In this case the list of
--   directories retrieved will be <tt>XDG_CONFIG_DIRS</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_CONFIG_DIRS</tt> is defined. If <tt>XDG_CONFIG_DIRS</tt> is
--   undefined, the directory that contains application data for all users
--   is used instead. A typical path is <tt>C:\Documents and Settings\All
--   Users\Application Data</tt>. 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.
--   
--   <i>Since: 2.6</i>
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 <a>XDG Base Directory Specification</a> In this case the list of
--   directories retrieved will be <tt>XDG_DATA_DIRS</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_DATA_DIRS</tt> is defined. If <tt>XDG_DATA_DIRS</tt> 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.
--   
--   <i>Since: 2.6</i>
getSystemDataDirs :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Gets the directory to use for temporary files.
--   
--   On UNIX, this is taken from the <tt>TMPDIR</tt> environment variable.
--   If the variable is not set, <tt>P_tmpdir</tt> is used, as defined by
--   the system C library. Failing that, a hard-coded default of "/tmp" is
--   returned.
--   
--   On Windows, the <tt>TEMP</tt> 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 <a>Nothing</a> 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 <a>XDG Base Directory Specification</a>. In this case the
--   directory retrieved will be <tt>XDG_CACHE_HOME</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_CACHE_HOME</tt> is defined. If <tt>XDG_CACHE_HOME</tt> is
--   undefined, the directory that serves as a common repository for
--   temporary Internet files is used instead. A typical path is
--   <tt>C:\Documents and Settings\username\Local Settings\Temporary
--   Internet Files</tt>. See the <a>documentation for
--   `FOLDERID_InternetCache`</a>.
--   
--   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.
--   
--   <i>Since: 2.6</i>
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 <a>XDG Base Directory Specification</a>. In this case the
--   directory retrieved will be <tt>XDG_CONFIG_HOME</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_CONFIG_HOME</tt> is defined. If <tt>XDG_CONFIG_HOME</tt> is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the <a>documentation for
--   `FOLDERID_LocalAppData`</a>. Note that in this case on Windows it will
--   be the same as what <a>getUserDataDir</a> 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.
--   
--   <i>Since: 2.6</i>
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 <a>XDG Base Directory Specification</a>. In this case the
--   directory retrieved will be <tt>XDG_DATA_HOME</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_DATA_HOME</tt> is defined. If <tt>XDG_DATA_HOME</tt> is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the <a>documentation for
--   `FOLDERID_LocalAppData`</a>. Note that in this case on Windows it will
--   be the same as what <a>getUserConfigDir</a> 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.
--   
--   <i>Since: 2.6</i>
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 <a>XDG Base
--   Directory Specification</a>. This is the directory specified in the
--   <tt>XDG_RUNTIME_DIR</tt> environment variable. In the case that this
--   variable is not set, we return the value of <a>getUserCacheDir</a>,
--   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.
--   
--   <i>Since: 2.28</i>
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,
--   <a>UserDirectoryDirectoryDesktop</a> falls back to
--   <tt>$HOME/Desktop</tt> 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.
--   
--   <i>Since: 2.14</i>
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 <a>XDG Base Directory Specification</a>. In this case the
--   directory retrieved will be <tt>XDG_STATE_HOME</tt>.
--   
--   On Windows it follows XDG Base Directory Specification if
--   <tt>XDG_STATE_HOME</tt> is defined. If <tt>XDG_STATE_HOME</tt> is
--   undefined, the folder to use for local (as opposed to roaming)
--   application data is used instead. See the <a>documentation for
--   `FOLDERID_LocalAppData`</a>. Note that in this case on Windows it will
--   be the same as what <a>getUserDataDir</a> 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.
--   
--   <i>Since: 2.72</i>
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 <i><tt>hostname</tt></i> contains segments with an
--   ASCII-compatible encoding of an Internationalized Domain Name. If this
--   returns <a>True</a>, you should decode the hostname with
--   <a>hostnameToUnicode</a> 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 <a>hostnameIsNonAscii</a> and
--   <a>hostnameIsAsciiEncoded</a> to both return <a>True</a> for a name.
--   
--   <i>Since: 2.22</i>
hostnameIsAsciiEncoded :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Tests if <i><tt>hostname</tt></i> 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).
--   
--   <i>Since: 2.22</i>
hostnameIsIpAddress :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Tests if <i><tt>hostname</tt></i> contains Unicode characters. If this
--   returns <a>True</a>, you need to encode the hostname with
--   <a>hostnameToAscii</a> 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 <a>hostnameIsNonAscii</a> and
--   <a>hostnameIsAsciiEncoded</a> to both return <a>True</a> for a name.
--   
--   <i>Since: 2.22</i>
hostnameIsNonAscii :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Converts <i><tt>hostname</tt></i> to its canonical ASCII form; an
--   ASCII-only string containing no uppercase letters and not ending with
--   a trailing dot.
--   
--   <i>Since: 2.22</i>
hostnameToAscii :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Converts <i><tt>hostname</tt></i> 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 <i><tt>hostname</tt></i> is not an internationalized
--   hostname, then the canonical presentation form will be entirely ASCII.
--   
--   <i>Since: 2.22</i>
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 <a>SOURCE_REMOVE</a> or <a>False</a> it is
--   automatically removed from the list of event sources and will not be
--   called again.
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   <i><tt>data</tt></i>.
--   
--   This internally creates a main loop source using <a>idleSourceNew</a>
--   and attaches it to the global <a>MainContext</a> using
--   <a>sourceAttach</a>, 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
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   before it will be executed. Note that the default priority for idle
--   sources is <a>PRIORITY_DEFAULT_IDLE</a>, as compared to other sources
--   which have a default priority of <a>PRIORITY_DEFAULT</a>.
idleSourceNew :: (HasCallStack, MonadIO m) => m Source

-- | Compares the two <tt><i>gint64</i></tt> values being pointed to and
--   returns <a>True</a> if they are equal. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>keyEqualFunc</tt></i>
--   parameter, when using non-<a>Nothing</a> pointers to 64-bit integers
--   as keys in a <a>HashTable</a>.
--   
--   <i>Since: 2.22</i>
int64Equal :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a <tt><i>gint64</i></tt> to a hash value.
--   
--   It can be passed to <tt><i>g_hash_table_new()</i></tt> as the
--   <i><tt>hashFunc</tt></i> parameter, when using non-<a>Nothing</a>
--   pointers to 64-bit integer values as keys in a <a>HashTable</a>.
--   
--   <i>Since: 2.22</i>
int64Hash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Compares the two <tt><i>gint</i></tt> values being pointed to and
--   returns <a>True</a> if they are equal. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>keyEqualFunc</tt></i>
--   parameter, when using non-<a>Nothing</a> pointers to integers as keys
--   in a <a>HashTable</a>.
--   
--   Note that this function acts on pointers to <tt><i>gint</i></tt>, not
--   on <tt><i>gint</i></tt> directly: if your hash table's keys are of the
--   form <tt>GINT_TO_POINTER (n)</tt>, use <a>directEqual</a> instead.
intEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Converts a pointer to a <tt><i>gint</i></tt> to a hash value. It can
--   be passed to <tt><i>g_hash_table_new()</i></tt> as the
--   <i><tt>hashFunc</tt></i> parameter, when using non-<a>Nothing</a>
--   pointers to integer values as keys in a <a>HashTable</a>.
--   
--   Note that this function acts on pointers to <tt><i>gint</i></tt>, not
--   on <tt><i>gint</i></tt> directly: if your hash table's keys are of the
--   form <tt>GINT_TO_POINTER (n)</tt>, use <a>directHash</a> instead.
intHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32

-- | Returns a canonical representation for <i><tt>string</tt></i>.
--   Interned strings can be compared for equality by comparing the
--   pointers, instead of using <tt><i>strcmp()</i></tt>.
--   <a>internStaticString</a> does not copy the string, therefore
--   <i><tt>string</tt></i> 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++.
--   
--   <i>Since: 2.10</i>
internStaticString :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Returns a canonical representation for <i><tt>string</tt></i>.
--   Interned strings can be compared for equality by comparing the
--   pointers, instead of using <tt><i>strcmp()</i></tt>.
--   
--   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++.
--   
--   <i>Since: 2.10</i>
internString :: (HasCallStack, MonadIO m) => Maybe Text -> m Text

-- | Adds the <a>IOChannel</a> into the default main loop context with the
--   given priority.
--   
--   This internally creates a main loop source using <a>ioCreateWatch</a>
--   and attaches it to the main loop context with <a>sourceAttach</a>. You
--   can do these steps manually if you need greater control.
ioAddWatch :: (HasCallStack, MonadIO m) => IOChannel -> Int32 -> [IOCondition] -> IOFunc -> m Word32

-- | Creates a <a>Source</a> that's dispatched when
--   <i><tt>condition</tt></i> is met for the given
--   <i><tt>channel</tt></i>. For example, if condition is
--   <a>IOConditionIn</a>, the source will be dispatched when there's data
--   available for reading.
--   
--   The callback function invoked by the <a>Source</a> should be added
--   with <a>sourceSetCallback</a>, but it has type <a>IOFunc</a> (not
--   <a>SourceFunc</a>).
--   
--   <tt><i>g_io_add_watch()</i></tt> 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 <a>Source</a> 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 <a>getenv</a> 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 <a>getenv</a> provide.
--   
--   <i>Since: 2.8</i>
listenv :: (HasCallStack, MonadIO m) => m [[Char]]

-- | Converts a string from UTF-8 to the encoding used for strings by the C
--   runtime (usually the same as that used by the operating system) in the
--   [current locale][setlocale]. On Windows this means the system
--   codepage.
--   
--   The input string shall not contain nul characters even if the
--   <i><tt>len</tt></i> argument is positive. A nul character found inside
--   the string will result in error <a>ConvertErrorIllegalSequence</a>.
--   Use <a>convert</a> 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][setlocale] into a UTF-8 string.
--   
--   If the source encoding is not UTF-8 and the conversion output contains
--   a nul character, the error <a>ConvertErrorEmbeddedNul</a> is set and
--   the function returns <a>Nothing</a>. If the source encoding is UTF-8,
--   an embedded nul character is treated with the
--   <a>ConvertErrorIllegalSequence</a> error for backward compatibility
--   with earlier versions of this library. Use <a>convert</a> 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;
--   <tt><i>GLib.log_set_default_handler</i></tt> 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
--   <tt>stderr</tt> or <tt>stdout</tt> and if the log level is fatal it
--   calls <tt><i>GLib.BREAKPOINT</i></tt>. It automatically prints a
--   new-line character after the message, so one does not need to be
--   manually included in <i><tt>message</tt></i>.
--   
--   The behavior of this log handler can be influenced by a number of
--   environment variables:
--   
--   <ul>
--   <li><tt>G_MESSAGES_PREFIXED</tt>: A <tt>:</tt>-separated list of log
--   levels for which messages should be prefixed by the program name and
--   PID of the application.</li>
--   <li><tt>G_MESSAGES_DEBUG</tt>: 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 <a>logWriterDefaultSetDebugDomains</a>.</li>
--   </ul>
--   
--   <tt>stderr</tt> is used for levels
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_ERROR],
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_CRITICAL],
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_WARNING] and
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_MESSAGE].
--   <tt>stdout</tt> is used for the rest, unless <tt>stderr</tt> was
--   requested by <a>logWriterDefaultSetUseStderr</a>.
--   
--   This has no effect if structured logging is enabled; see <a>Using
--   Structured Logging</a>.
logDefaultHandler :: (HasCallStack, MonadIO m) => Maybe Text -> [LogLevelFlags] -> Maybe Text -> Ptr () -> m ()

-- | Return whether debug output from the GLib logging system is enabled.
--   
--   Note that this should not be used to conditionalise calls to
--   <tt><i>GLib.debug</i></tt> or other logging functions; it should only
--   be used from [type<i><tt>gLib</tt></i>.LogWriterFunc] implementations.
--   
--   Note also that the value of this does not depend on
--   <tt>G_MESSAGES_DEBUG</tt>, nor <a>logWriterDefaultSetDebugDomains</a>;
--   see the docs for <a>logSetDebugEnabled</a>.
--   
--   <i>Since: 2.72</i>
logGetDebugEnabled :: (HasCallStack, MonadIO m) => m Bool

-- | Removes the log handler.
--   
--   This has no effect if structured logging is enabled; see <a>Using
--   Structured Logging</a>.
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.
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_ERROR] is always fatal.
--   
--   You can also make some message levels fatal at runtime by setting the
--   <tt>G_DEBUG</tt> environment variable (see <a>Running GLib
--   Applications</a>).
--   
--   Libraries should not call this function, as it affects all messages
--   logged by a process, including those from other libraries.
--   
--   Structured log messages (using <tt><i>GLib.log_structured</i></tt> and
--   <a>logStructuredArray</a>) 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 <a>Using Structured Logging</a>.
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 <tt>G_MESSAGES_DEBUG</tt> and
--   <a>logWriterDefaultSetDebugDomains</a> — 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.
--   
--   <i>Since: 2.72</i>
logSetDebugEnabled :: (HasCallStack, MonadIO m) => Bool -> m ()

-- | Sets the log levels which are fatal in the given domain.
--   
--   <ul>
--   <li><i>flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_ERROR</i> is
--   always fatal.</li>
--   </ul>
--   
--   This has no effect on structured log messages (using
--   <tt><i>GLib.log_structured</i></tt> or <a>logStructuredArray</a>). To
--   change the fatal behaviour for specific log messages, programs must
--   install a custom log writer function using <a>logSetWriterFunc</a>.
--   See <a>Using Structured Logging</a>.
--   
--   This function is mostly intended to be used with
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_CRITICAL]. You should
--   typically not set
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_WARNING],
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_MESSAGE],
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_INFO] or
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_DEBUG] as fatal except
--   inside of test programs.
logSetFatalMask :: (HasCallStack, MonadIO m) => Text -> [LogLevelFlags] -> m [LogLevelFlags]

-- | Like <a>logSetHandler</a>, but takes a destroy notify for the
--   <i><tt>userData</tt></i>.
--   
--   This has no effect if structured logging is enabled; see <a>Using
--   Structured Logging</a>.
--   
--   <i>Since: 2.46</i>
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
--   (<a>logWriterDefault</a>) 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.
--   
--   <i>Since: 2.50</i>
logSetWriterFunc :: (HasCallStack, MonadIO m) => Maybe LogWriterFunc -> m ()

-- | Log a message with structured data.
--   
--   The message will be passed through to the log writer set by the
--   application using <a>logSetWriterFunc</a>. If the message is fatal
--   (i.e. its log level is
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_ERROR]), the program
--   will be aborted at the end of this function.
--   
--   See <tt><i>GLib.log_structured</i></tt> for more documentation.
--   
--   This assumes that <i><tt>logLevel</tt></i> is already present in
--   <i><tt>fields</tt></i> (typically as the <tt>PRIORITY</tt> field).
--   
--   <i>Since: 2.50</i>
logStructuredArray :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> m ()

-- | Log a message with structured data, accepting the data within a
--   [type<i><tt>gLib</tt></i>.Variant].
--   
--   This version is especially useful for use in other languages, via
--   introspection.
--   
--   The only mandatory item in the <i><tt>fields</tt></i> dictionary is
--   the <tt>"MESSAGE"</tt> which must contain the text shown to the user.
--   
--   The values in the <i><tt>fields</tt></i> dictionary are likely to be
--   of type <tt>G_VARIANT_TYPE_STRING</tt>. Array of bytes
--   (<tt>G_VARIANT_TYPE_BYTESTRING</tt>) 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
--   <tt>G_MAXSSIZE</tt>. Otherwise it will be truncated to this size. For
--   other types <a>variantPrint</a> will be used to convert the value into
--   a string.
--   
--   For more details on its usage and about the parameters, see
--   <tt><i>GLib.log_structured</i></tt>.
--   
--   <i>Since: 2.50</i>
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
--   <tt>stdout</tt> or <tt>stderr</tt> 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
--   [type<i><tt>gLib</tt></i>.LogWriterFunc], and is the default writer
--   used if no other is set using <a>logSetWriterFunc</a>.
--   
--   As with <a>logDefaultHandler</a>, this function drops debug and
--   informational messages unless their log domain (or <tt>all</tt>) is
--   listed in the space-separated <tt>G_MESSAGES_DEBUG</tt> environment
--   variable, or set at runtime by <a>logWriterDefaultSetDebugDomains</a>.
--   
--   <a>logWriterDefault</a> uses the mask set by <a>logSetAlwaysFatal</a>
--   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.
--   
--   <i>Since: 2.50</i>
logWriterDefault :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Reset the list of domains to be logged, that might be initially set by
--   the <tt>G_MESSAGES_DEBUG</tt> environment variable.
--   
--   This function is thread-safe.
--   
--   <i>Since: 2.80</i>
logWriterDefaultSetDebugDomains :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | Configure whether the built-in log functions will output all log
--   messages to <tt>stderr</tt>.
--   
--   The built-in log functions are <a>logDefaultHandler</a> for the
--   old-style API, and both <a>logWriterDefault</a> and
--   <a>logWriterStandardStreams</a> for the structured API.
--   
--   By default, log messages of levels
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_INFO] and
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_DEBUG] are sent to
--   <tt>stdout</tt>, and other log messages are sent to <tt>stderr</tt>.
--   This is problematic for applications that intend to reserve
--   <tt>stdout</tt> 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.
--   
--   <i>Since: 2.68</i>
logWriterDefaultSetUseStderr :: (HasCallStack, MonadIO m) => Bool -> m ()

-- | Check whether <a>logWriterDefault</a> and <a>logDefaultHandler</a>
--   would ignore a message with the given domain and level.
--   
--   As with <a>logDefaultHandler</a>, this function drops debug and
--   informational messages unless their log domain (or <tt>all</tt>) is
--   listed in the space-separated <tt>G_MESSAGES_DEBUG</tt> environment
--   variable, or by <a>logWriterDefaultSetDebugDomains</a>.
--   
--   This can be used when implementing log writers with the same filtering
--   behaviour as the default, but a different destination or output
--   format:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   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` is not set:
--   </pre>
--   
--   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: <tt><i>s</i></tt>", result); } ```
--   
--   <i>Since: 2.68</i>
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 <tt>MESSAGE</tt> and <tt>GLIB_DOMAIN</tt> (see the
--   documentation for <tt><i>GLib.log_structured</i></tt>). 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.
--   
--   <i>Since: 2.50</i>
logWriterFormatFields :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Bool -> m Text

-- | Check whether the given <i><tt>outputFd</tt></i> file descriptor is a
--   connection to the systemd journal, or something else (like a log file
--   or <tt>stdout</tt> or <tt>stderr</tt>).
--   
--   Invalid file descriptors are accepted and return <tt>FALSE</tt>, which
--   allows for the following construct without needing any additional
--   error handling:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   is_journald = g_log_writer_is_journald (fileno (stderr));
--   </pre>
--   
--   <i>Since: 2.50</i>
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
--   [type<i><tt>gLib</tt></i>.LogWriterFunc].
--   
--   If GLib has been compiled without systemd support, this function is
--   still defined, but will always return
--   [enum<i><tt>gLib</tt></i>.LogWriterOutput.UNHANDLED].
--   
--   <i>Since: 2.50</i>
logWriterJournald :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Format a structured log message and print it to either <tt>stdout</tt>
--   or <tt>stderr</tt>, depending on its log level.
--   
--   <ul>
--   <li><i>flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_INFO</i> and
--   [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_DEBUG] messages are
--   sent to <tt>stdout</tt>, or to <tt>stderr</tt> if requested by
--   <a>logWriterDefaultSetUseStderr</a>; all other log levels are sent to
--   <tt>stderr</tt>. Only fields which are understood by this function are
--   included in the formatted string which is printed.</li>
--   </ul>
--   
--   If the output stream supports <a>ANSI color escape sequences</a>, 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
--   [type<i><tt>gLib</tt></i>.LogWriterFunc].
--   
--   <i>Since: 2.50</i>
logWriterStandardStreams :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | Check whether the given <i><tt>outputFd</tt></i> file descriptor
--   supports <a>ANSI color escape sequences</a>.
--   
--   If so, they can safely be used when formatting log messages.
--   
--   <i>Since: 2.50</i>
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
--   [type<i><tt>gLib</tt></i>.LogWriterFunc].
--   
--   If syslog is not supported, this function is still defined, but will
--   always return [enum<i><tt>gLib</tt></i>.LogWriterOutput.UNHANDLED].
--   
--   <i>Since: 2.80</i>
logWriterSyslog :: (HasCallStack, MonadIO m) => [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput

-- | A wrapper for the POSIX <tt><i>lstat()</i></tt> function. The
--   <tt><i>lstat()</i></tt> function is like <tt><i>stat()</i></tt> 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 <a>lstat</a> is identical to
--   <a>stat</a>.
--   
--   See your C library manual for more details about
--   <tt><i>lstat()</i></tt>.
--   
--   <i>Since: 2.6</i>
lstat :: (HasCallStack, MonadIO m) => [Char] -> StatBuf -> m Int32

-- | Returns the currently firing source for this thread.
--   
--   <i>Since: 2.12</i>
mainCurrentSource :: (HasCallStack, MonadIO m) => m (Maybe Source)

-- | Returns the depth of the stack of calls to <a>mainContextDispatch</a>
--   on any <a>MainContext</a> in the current thread. That is, when called
--   from the toplevel, it gives 0. When called from within a callback from
--   <a>mainContextIteration</a> (or <a>mainLoopRun</a>, etc.) it returns
--   1. When called from within a callback to a recursive call to
--   <a>mainContextIteration</a>, it returns 2. And so forth.
--   
--   This function is useful in a situation like the following: Imagine an
--   extremely simple "garbage collected" system.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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-&gt;next);
--       g_free (l-&gt;data);
--     g_list_free (free_list);
--     free_list = NULL;
--    }
--   
--   [...]
--   
--   while (TRUE);
--    {
--      g_main_context_iteration (NULL, TRUE);
--      free_allocated_memory();
--     }
--   </pre>
--   
--   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 <tt><i>free_allocated_memory()</i></tt>,
--   but that doesn't work, since the idle function could be called from a
--   recursive callback. This can be fixed by using <a>mainDepth</a>
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   gpointer
--   allocate_memory (gsize size)
--   {
--     FreeListBlock *block = g_new (FreeListBlock, 1);
--     block-&gt;mem = g_malloc (size);
--     block-&gt;depth = g_main_depth ();
--     free_list = g_list_prepend (free_list, block);
--     return block-&gt;mem;
--   }
--   
--   void
--   free_allocated_memory (void)
--   {
--     GList *l;
--     
--     int depth = g_main_depth ();
--     for (l = free_list; l; );
--       {
--         GList *next = l-&gt;next;
--         FreeListBlock *block = l-&gt;data;
--         if (block-&gt;depth &gt; depth)
--           {
--             g_free (block-&gt;mem);
--             g_free (block);
--             free_list = g_list_delete_link (free_list, l);
--           }
--                 
--         l = next;
--       }
--     }
--   </pre>
--   
--   There is a temptation to use <a>mainDepth</a> 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 <a>mainDepth</a> 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:
--   
--   <ol>
--   <li>Use <tt><i>gtk_widget_set_sensitive()</i></tt> or modal dialogs to
--   prevent the user from interacting with elements while the main loop is
--   recursing.</li>
--   <li>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.</li>
--   </ol>
mainDepth :: (HasCallStack, MonadIO m) => m Int32

-- | Allocates <i><tt>nBytes</tt></i> bytes of memory. If
--   <i><tt>nBytes</tt></i> is 0 it returns <a>Nothing</a>.
--   
--   If the allocation fails (because the system is out of memory), the
--   program is terminated.
malloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates <i><tt>nBytes</tt></i> bytes of memory, initialized to 0's.
--   If <i><tt>nBytes</tt></i> is 0 it returns <a>Nothing</a>.
--   
--   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 <a>malloc0</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) 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.
--   
--   <i>Since: 2.24</i>
malloc0N :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())

-- | This function is similar to <a>malloc</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) 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.
--   
--   <i>Since: 2.24</i>
mallocN :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())

-- | <i>No description available in the introspection data.</i>
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 &amp;<tt><i>x1</i></tt>; ... &amp;<tt><i>x1f</i></tt>; 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 <a>malloc</a> is the system's
--   malloc implementation. If it returns <a>True</a> memory allocated with
--   <tt><i>malloc()</i></tt> can be used interchangeably with memory
--   allocated using <a>malloc</a>. This function is useful for avoiding an
--   extra copy of allocated memory returned by a non-GLib-based API.

-- | <i>Deprecated: (Since version 2.46)GLib always uses the system malloc,
--   so this function alwaysreturns <a>True</a>.</i>
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.

-- | <i>Deprecated: (Since version 2.46)Use other memory profiling tools
--   instead</i>
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.

-- | <i>Deprecated: (Since version 2.46)This function now does nothing. Use
--   other memoryprofiling tools instead</i>
memSetVtable :: (HasCallStack, MonadIO m) => MemVTable -> m ()

-- | Allocates <i><tt>byteSize</tt></i> bytes of memory, and copies
--   <i><tt>byteSize</tt></i> bytes into it from <i><tt>mem</tt></i>. If
--   <i><tt>mem</tt></i> is <tt>NULL</tt> it returns <tt>NULL</tt>.

-- | <i>Deprecated: (Since version 2.68)Use <a>memdup2</a> instead, as it
--   accepts a gsize argument for <i><tt>byteSize</tt></i>, avoiding the
--   possibility of overflow in a <tt>gsize</tt> → <tt>guint</tt>
--   conversion</i>
memdup :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m (Ptr ())

-- | Allocates <i><tt>byteSize</tt></i> bytes of memory, and copies
--   <i><tt>byteSize</tt></i> bytes into it from <i><tt>mem</tt></i>. If
--   <i><tt>mem</tt></i> is <tt>NULL</tt> it returns <tt>NULL</tt>.
--   
--   This replaces <a>memdup</a>, which was prone to integer overflows when
--   converting the argument from a <tt>gsize</tt> to a <tt>guint</tt>.
--   
--   <i>Since: 2.68</i>
memdup2 :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())

-- | A wrapper for the POSIX <tt><i>mkdir()</i></tt> function. The
--   <tt><i>mkdir()</i></tt> 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
--   <tt><i>mkdir()</i></tt>.
--   
--   <i>Since: 2.6</i>
mkdir :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | Create a directory if it doesn't already exist. Create intermediate
--   parent directories as needed, too.
--   
--   <i>Since: 2.8</i>
mkdirWithParents :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> m Int32

-- | Set the pointer at the specified location to <a>Nothing</a>.
nullifyPointer :: (HasCallStack, MonadIO m) => Ptr () -> m ()

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

-- | Prompts the user with <tt>[E]xit, [H]alt, show [S]tack trace or
--   [P]roceed</tt>. This function is intended to be used for debugging use
--   only. The following example shows how it can be used together with the
--   <tt><i>g_log()</i></tt> functions.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   #include &lt;glib.h&gt;
--   
--   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);
--     ...
--   </pre>
--   
--   If "[E]xit" is selected, the application terminates with a call to
--   _exit(0).
--   
--   If "[S]tack" trace is selected, <a>onErrorStackTrace</a> 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 <tt>G_DEBUGGER</tt> environment variable
--   (see <a>Running GLib Applications</a>) and calling
--   <a>onErrorStackTrace</a> instead.
onErrorQuery :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Invokes gdb, which attaches to the current process and shows a stack
--   trace. Called by <a>onErrorQuery</a> when the "[S]tack trace" option
--   is selected. You can get the current process's program name with
--   <a>getPrgname</a>, assuming that you have called
--   <tt><i>gtk_init()</i></tt> or <tt><i>gdk_init()</i></tt>.
--   
--   This function may cause different actions on non-UNIX platforms.
--   
--   When running on Windows, this function is *not* called by
--   <a>onErrorQuery</a>. If called directly, it will raise an exception,
--   which will crash the program. If the <tt>G_DEBUGGER</tt> environment
--   variable is set, a debugger will be invoked to attach and handle that
--   exception (see <a>Running GLib Applications</a>).
onErrorStackTrace :: (HasCallStack, MonadIO m) => Text -> m ()

-- | A wrapper for the POSIX <tt><i>open()</i></tt> function. The
--   <tt><i>open()</i></tt> 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
--   <tt><i>open()</i></tt> and file descriptors. The actual Win32 API for
--   opening files is quite different, see MSDN documentation for
--   <tt><i>CreateFile()</i></tt>. 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
--   <tt><i>write()</i></tt> or <tt><i>read()</i></tt>.
--   
--   See your C library manual for more details about
--   <tt><i>open()</i></tt>.
--   
--   <i>Since: 2.6</i>
open :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> Int32 -> m Int32

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

-- | Parses a string containing debugging options into a
--   <tt><i>guint</i></tt> 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 <i><tt>string</tt></i> is equal to "all", all flags are set. Any
--   flags specified along with "all" in <i><tt>string</tt></i> are
--   inverted; thus, "all,foo,bar" or "foo,bar,all" sets all flags except
--   those corresponding to "foo" and "bar".
--   
--   If <i><tt>string</tt></i> is equal to "help", all the available keys
--   in <i><tt>keys</tt></i> are printed out to standard error.
parseDebugString :: (HasCallStack, MonadIO m) => Maybe Text -> [DebugKey] -> m Word32

-- | Gets the last component of the filename.
--   
--   If <i><tt>fileName</tt></i> ends with a directory separator it gets
--   the component before the last slash. If <i><tt>fileName</tt></i>
--   consists only of directory separators (and on Windows, possibly a
--   drive letter), a single separator is returned. If
--   <i><tt>fileName</tt></i> 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 <tt>/usr/bin/test</tt> is <tt>/usr/bin</tt>.
--   The directory component of <tt>/</tt> is <tt>/</tt>.
--   
--   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 <a>True</a> if the given <i><tt>fileName</tt></i> 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 <tt><i>getcwd()</i></tt> or <a>getCurrentDir</a> 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 <i><tt>fileName</tt></i> after the root
--   component, i.e. after the "/" in UNIX or "C:\" under Windows. If
--   <i><tt>fileName</tt></i> is not an absolute path it returns
--   <a>Nothing</a>.
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 <a>patternSpecNew</a> and call
--   <tt><i>g_pattern_match_string()</i></tt> 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 <i><tt>address</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
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.
--   
--   <i>Since: 2.80</i>
pointerBitLockAndGet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> m CUIntPtr

-- | This mangles <i><tt>ptr</tt></i> as <a>pointerBitLock</a> and
--   <a>pointerBitUnlock</a> do.
--   
--   <i>Since: 2.80</i>
pointerBitLockMaskPtr :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Bool -> CUIntPtr -> Ptr () -> m (Ptr ())

-- | This is equivalent to <a>bitTrylock</a>, 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 <i><tt>address</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
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 <i><tt>address</tt></i> has a <tt>volatile</tt> qualifier, this
--   is a historical artifact and the argument passed to it should not be
--   <tt>volatile</tt>.
--   
--   <i>Since: 2.30</i>
pointerBitUnlock :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> m ()

-- | This is equivalent to <a>pointerBitUnlock</a> 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 <i><tt>ptr</tt></i>,
--   an assertion fails. In other words, <i><tt>ptr</tt></i> must have
--   <i><tt>lockBit</tt></i> unset. This also means, you usually can only
--   use this on the lowest bits.
--   
--   <i>Since: 2.80</i>
pointerBitUnlockAndSet :: (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Ptr () -> CUIntPtr -> m ()

-- | Polls <i><tt>fds</tt></i>, as with the <tt><i>poll()</i></tt> system
--   call, but portably. (On systems that don't have
--   <tt><i>poll()</i></tt>, it is emulated using
--   <tt><i>select()</i></tt>.) This is used internally by
--   <a>MainContext</a>, 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 <i><tt>fds</tt></i> is a <a>PollFD</a> describing a
--   single file descriptor to poll. The <i><tt>fd</tt></i> field indicates
--   the file descriptor, and the <i><tt>events</tt></i> field indicates
--   the events to poll for. On return, the <i><tt>revents</tt></i> fields
--   will be filled with the events that actually occurred.
--   
--   On POSIX systems, the file descriptors in <i><tt>fds</tt></i> can be
--   any sort of file descriptor, but the situation is much more
--   complicated on Windows. If you need to use <a>poll</a> in code that
--   has to run on Windows, the easiest solution is to construct all of
--   your <tt><i>GPollFDs</i></tt> with
--   <tt><i>g_io_channel_win32_make_pollfd()</i></tt>.
--   
--   <i>Since: 2.20</i>
poll :: (HasCallStack, MonadIO m) => PollFD -> Word32 -> Int32 -> m Int32

-- | Prefixes <i><tt>prefix</tt></i> to an existing error message. If
--   <i><tt>err</tt></i> or *<i><tt>err</tt></i> is <a>Nothing</a> (i.e.:
--   no error variable) then do nothing.
--   
--   <i>Since: 2.70</i>
prefixErrorLiteral :: (HasCallStack, MonadIO m) => Maybe GError -> Text -> m (Maybe GError)

-- | If <i><tt>dest</tt></i> is <a>Nothing</a>, free <i><tt>src</tt></i>;
--   otherwise, moves <i><tt>src</tt></i> into *<i><tt>dest</tt></i>. The
--   error variable <i><tt>dest</tt></i> points to must be <a>Nothing</a>.
--   
--   <i><tt>src</tt></i> must be non-<a>Nothing</a>.
--   
--   Note that <i><tt>src</tt></i> is no longer valid after this call. If
--   you want to keep using the same GError*, you need to set it to
--   <a>Nothing</a> after calling this function on it.
propagateError :: (HasCallStack, MonadIO m) => GError -> m (Maybe GError)

-- | This is just like the standard C <tt><i>qsort()</i></tt> function, but
--   the comparison routine accepts a user data argument.
--   
--   This is guaranteed to be a stable sort since version 2.32.
qsortWithData :: (HasCallStack, MonadIO m) => Ptr () -> Int32 -> CSize -> CompareDataFunc -> m ()

-- | Gets the <tt><i>GQuark</i></tt> identifying the given (static) string.
--   If the string does not currently have an associated
--   <tt><i>GQuark</i></tt>, a new <tt><i>GQuark</i></tt> is created,
--   linked to the given string.
--   
--   Note that this function is identical to <a>quarkFromString</a> except
--   that if a new <tt><i>GQuark</i></tt> 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 <tt><i>GQuark</i></tt> identifying the given string. If the
--   string does not currently have an associated <tt><i>GQuark</i></tt>, a
--   new <tt><i>GQuark</i></tt> 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 <tt><i>GQuark</i></tt>.
quarkToString :: (HasCallStack, MonadIO m) => Word32 -> m Text

-- | Gets the <tt><i>GQuark</i></tt> associated with the given string, or 0
--   if string is <a>Nothing</a> or it has no associated
--   <tt><i>GQuark</i></tt>.
--   
--   If you want the GQuark to be created if it doesn't already exist, use
--   <a>quarkFromString</a> or <a>quarkFromStaticString</a>.
--   
--   This function must not be used before library constructors have
--   finished running.
quarkTryString :: (HasCallStack, MonadIO m) => Maybe Text -> m Word32

-- | Returns a random <tt><i>gdouble</i></tt> equally distributed over the
--   range [0..1).
randomDouble :: (HasCallStack, MonadIO m) => m Double

-- | Returns a random <tt><i>gdouble</i></tt> equally distributed over the
--   range [<i><tt>begin</tt></i>..<i><tt>end</tt></i>).
randomDoubleRange :: (HasCallStack, MonadIO m) => Double -> Double -> m Double

-- | Return a random <tt><i>guint32</i></tt> equally distributed over the
--   range [0..2^32-1].
randomInt :: (HasCallStack, MonadIO m) => m Word32

-- | Returns a random <tt><i>gint32</i></tt> equally distributed over the
--   range [<i><tt>begin</tt></i>..<i><tt>end</tt></i>-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 <i><tt>seed</tt></i>.
randomSetSeed :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Acquires a reference on the data pointed by <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
rcBoxAcquire :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())

-- | Allocates <i><tt>blockSize</tt></i> 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.
--   
--   <i>Since: 2.58</i>
rcBoxAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates <i><tt>blockSize</tt></i> 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.
--   
--   <i>Since: 2.58</i>
rcBoxAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a new block of data with reference counting semantics, and
--   copies <i><tt>blockSize</tt></i> bytes of <i><tt>memBlock</tt></i>
--   into it.
--   
--   <i>Since: 2.58</i>
rcBoxDup :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> m (Ptr ())

-- | Retrieves the size of the reference counted data pointed by
--   <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
rcBoxGetSize :: (HasCallStack, MonadIO m) => Ptr () -> m CSize

-- | Releases a reference on the data pointed by <i><tt>memBlock</tt></i>.
--   
--   If the reference was the last one, it will free the resources
--   allocated for <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
rcBoxRelease :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Releases a reference on the data pointed by <i><tt>memBlock</tt></i>.
--   
--   If the reference was the last one, it will call
--   <i><tt>clearFunc</tt></i> to clear the contents of
--   <i><tt>memBlock</tt></i>, and then will free the resources allocated
--   for <i><tt>memBlock</tt></i>.
--   
--   <i>Since: 2.58</i>
rcBoxReleaseFull :: (HasCallStack, MonadIO m) => Ptr () -> DestroyNotify -> m ()

-- | Reallocates the memory pointed to by <i><tt>mem</tt></i>, so that it
--   now has space for <i><tt>nBytes</tt></i> bytes of memory. It returns
--   the new address of the memory, which may have been moved.
--   <i><tt>mem</tt></i> may be <a>Nothing</a>, in which case it's
--   considered to have zero-length. <i><tt>nBytes</tt></i> may be 0, in
--   which case <a>Nothing</a> will be returned and <i><tt>mem</tt></i>
--   will be freed unless it is <a>Nothing</a>.
--   
--   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 <a>realloc</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) 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.
--   
--   <i>Since: 2.24</i>
reallocN :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> CSize -> m (Ptr ())

-- | Compares the current value of <i><tt>rc</tt></i> with
--   <i><tt>val</tt></i>.
--   
--   <i>Since: 2.58</i>
refCountCompare :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Bool

-- | Decreases the reference count.
--   
--   If <a>True</a> is returned, the reference count reached 0. After this
--   point, <i><tt>rc</tt></i> is an undefined state and must be
--   reinitialized with <a>refCountInit</a> to be used again.
--   
--   <i>Since: 2.58</i>
refCountDec :: (HasCallStack, MonadIO m) => Int32 -> m Bool

-- | Increases the reference count.
--   
--   <i>Since: 2.58</i>
refCountInc :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Initializes a reference count variable to 1.
--   
--   <i>Since: 2.58</i>
refCountInit :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Acquires a reference on a string.
--   
--   <i>Since: 2.58</i>
refStringAcquire :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Retrieves the length of <i><tt>str</tt></i>.
--   
--   <i>Since: 2.58</i>
refStringLength :: (HasCallStack, MonadIO m) => Text -> m CSize

-- | Creates a new reference counted string and copies the contents of
--   <i><tt>str</tt></i> into it.
--   
--   <i>Since: 2.58</i>
refStringNew :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Creates a new reference counted string and copies the content of
--   <i><tt>str</tt></i> into it.
--   
--   If you call this function multiple times with the same
--   <i><tt>str</tt></i>, or with the same contents of <i><tt>str</tt></i>,
--   it will return a new reference, instead of creating a new string.
--   
--   <i>Since: 2.58</i>
refStringNewIntern :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Creates a new reference counted string and copies the contents of
--   <i><tt>str</tt></i> into it, up to <i><tt>len</tt></i> bytes.
--   
--   Since this function does not stop at nul bytes, it is the caller's
--   responsibility to ensure that <i><tt>str</tt></i> has at least
--   <i><tt>len</tt></i> addressable bytes.
--   
--   <i>Since: 2.58</i>
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.
--   
--   <i>Since: 2.58</i>
refStringRelease :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Resets the cache used for <a>getUserSpecialDir</a>, 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 <a>getUserSpecialDir</a> that can't be
--   freed. We ensure to only leak the data for the directories that
--   actually changed value though.
--   
--   <i>Since: 2.22</i>
reloadUserSpecialDirsCache :: (HasCallStack, MonadIO m) => m ()

-- | A wrapper for the POSIX <tt><i>remove()</i></tt> function. The
--   <tt><i>remove()</i></tt> function deletes a name from the filesystem.
--   
--   See your C library manual for more details about how
--   <tt><i>remove()</i></tt> works on your system. On Unix,
--   <tt><i>remove()</i></tt> removes also directories, as it calls
--   <tt><i>unlink()</i></tt> for files and <tt><i>rmdir()</i></tt> for
--   directories. On Windows, although <tt><i>remove()</i></tt> in the C
--   library only works for files, this function tries first
--   <tt><i>remove()</i></tt> and then if that fails
--   <tt><i>rmdir()</i></tt>, 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. <tt><i>rmdir()</i></tt> is tried regardless of what
--   caused <tt><i>remove()</i></tt> to fail. Any errno value set by
--   <tt><i>remove()</i></tt> will be overwritten by that set by
--   <tt><i>rmdir()</i></tt>.
--   
--   <i>Since: 2.6</i>
remove :: (HasCallStack, MonadIO m) => [Char] -> m Int32

-- | A wrapper for the POSIX <tt><i>rename()</i></tt> function. The
--   <tt><i>rename()</i></tt> function renames a file, moving it between
--   directories if required.
--   
--   See your C library manual for more details about how
--   <tt><i>rename()</i></tt> works on your system. It is not possible in
--   general on Windows to rename a file that is open to some process.
--   
--   <i>Since: 2.6</i>
rename :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m Int32

-- | A wrapper for the POSIX <tt><i>rmdir()</i></tt> function. The
--   <tt><i>rmdir()</i></tt> function deletes a directory from the
--   filesystem.
--   
--   See your C library manual for more details about how
--   <tt><i>rmdir()</i></tt> works on your system.
--   
--   <i>Since: 2.6</i>
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 <a>setPrgname</a>, which sets a non-localized name.
--   <a>setPrgname</a> will be called automatically by
--   <tt><i>gtk_init()</i></tt>, but <a>setApplicationName</a> 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.
--   
--   <i>Since: 2.2</i>
setApplicationName :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Does nothing if <i><tt>err</tt></i> is <a>Nothing</a>; if
--   <i><tt>err</tt></i> is non-<a>Nothing</a>, then *<i><tt>err</tt></i>
--   must be <a>Nothing</a>. A new <a>GError</a> is created and assigned to
--   *<i><tt>err</tt></i>. Unlike <tt><i>g_set_error()</i></tt>,
--   <i><tt>message</tt></i> is not a <tt><i>printf()</i></tt>-style format
--   string. Use this function if <i><tt>message</tt></i> contains text you
--   don't have control over, that could include <tt><i>printf()</i></tt>
--   escape sequences.
--   
--   <i>Since: 2.18</i>
setErrorLiteral :: (HasCallStack, MonadIO m) => Word32 -> Int32 -> Text -> m GError

-- | Sets the name of the program. This name should not be localized, in
--   contrast to <a>setApplicationName</a>.
--   
--   If you are using <tt><i>GApplication</i></tt> the program name is set
--   in <tt><i>g_application_run()</i></tt>. In case of GDK or GTK it is
--   set in <tt><i>gdk_init()</i></tt>, which is called by
--   <tt><i>gtk_init()</i></tt> and the
--   <tt><i>GtkApplication::startup</i></tt> handler. The program name is
--   found by taking the last component of <i><tt>argv</tt></i>[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.
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 <a>setenv</a> while another thread is calling
--   <tt><i>getenv()</i></tt>. (And note that many functions, such as
--   <tt><i>gettext()</i></tt>, call <tt><i>getenv()</i></tt> 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
--   <a>getEnviron</a> to get an environment array, modify that with
--   <a>environSetenv</a> and <a>environUnsetenv</a>, and then pass that
--   array directly to <tt><i>execvpe()</i></tt>, <a>spawnAsync</a>, or the
--   like.
--   
--   <i>Since: 2.4</i>
setenv :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> Bool -> m Bool

-- | <i>No description available in the introspection data.</i>
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 <tt>/bin/sh</tt>, 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 <tt><i>G_SHELL_ERROR</i></tt>
--   domain.
--   
--   In particular, if <i><tt>commandLine</tt></i> is an empty string (or a
--   string containing only whitespace), <a>ShellErrorEmptyString</a> will
--   be returned. It’s guaranteed that <i><tt>argvp</tt></i> will be a
--   non-empty array if this function returns successfully.
--   
--   Free the returned vector with <a>strfreev</a>.
shellParseArgv :: (HasCallStack, MonadIO m) => [Char] -> m (Int32, [[Char]])

-- | Quotes a string so that the shell (/bin/sh) will interpret the quoted
--   string to mean <i><tt>unquotedString</tt></i>.
--   
--   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 <a>free</a>.
--   
--   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
--   <a>shellQuote</a>. If it fails, it returns <a>Nothing</a> and sets the
--   error.
--   
--   The <i><tt>quotedString</tt></i> need not actually contain quoted or
--   escaped text; <a>shellUnquote</a> 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 <a>free</a>.
--   
--   Possible errors are in the <tt><i>G_SHELL_ERROR</i></tt> domain.
--   
--   Shell quoting rules are a bit strange. Single quotes preserve the
--   literal string exactly. escape sequences are not allowed; not even
--   <tt>\'</tt> - if you want a <tt>'</tt> in the quoted text, you have to
--   do something like <tt>'foo'\''bar'</tt>. Double quotes allow
--   <tt>$</tt>, ``<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
--   <tt>1 * sizeof (void*)</tt>.
--   
--   Since GLib 2.76 this always uses the system <tt><i>malloc()</i></tt>
--   implementation internally.
--   
--   <i>Since: 2.10</i>
sliceAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a block of memory via <a>sliceAlloc</a> and initializes the
--   returned memory to 0.
--   
--   Since GLib 2.76 this always uses the system <tt><i>malloc()</i></tt>
--   implementation internally.
--   
--   <i>Since: 2.10</i>
sliceAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Allocates a block of memory from the slice allocator and copies
--   <i><tt>blockSize</tt></i> bytes into it from <i><tt>memBlock</tt></i>.
--   
--   <i><tt>memBlock</tt></i> must be non-<a>Nothing</a> if
--   <i><tt>blockSize</tt></i> is non-zero.
--   
--   Since GLib 2.76 this always uses the system <tt><i>malloc()</i></tt>
--   implementation internally.
--   
--   <i>Since: 2.14</i>
sliceCopy :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> m (Ptr ())

-- | Frees a block of memory.
--   
--   The memory must have been allocated via <a>sliceAlloc</a> or
--   <a>sliceAlloc0</a> and the <i><tt>blockSize</tt></i> has to match the
--   size specified upon allocation. Note that the exact release behaviour
--   can be changed with the [<tt>G_DEBUG=gc-friendly</tt>][G_DEBUG]
--   environment variable.
--   
--   If <i><tt>memBlock</tt></i> is <a>Nothing</a>, this function does
--   nothing.
--   
--   Since GLib 2.76 this always uses the system
--   <tt><i>free_sized()</i></tt> implementation internally.
--   
--   <i>Since: 2.10</i>
sliceFree1 :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> m ()

-- | Frees a linked list of memory blocks of structure type
--   <i><tt>type</tt></i>.
--   
--   The memory blocks must be equal-sized, allocated via <a>sliceAlloc</a>
--   or <a>sliceAlloc0</a> and linked together by a <i><tt>next</tt></i>
--   pointer (similar to <a>SList</a>). The offset of the
--   <i><tt>next</tt></i> field in each block is passed as third argument.
--   Note that the exact release behaviour can be changed with the
--   [<tt>G_DEBUG=gc-friendly</tt>][G_DEBUG] environment variable.
--   
--   If <i><tt>memChain</tt></i> is <a>Nothing</a>, this function does
--   nothing.
--   
--   Since GLib 2.76 this always uses the system
--   <tt><i>free_sized()</i></tt> implementation internally.
--   
--   <i>Since: 2.10</i>
sliceFreeChainWithOffset :: (HasCallStack, MonadIO m) => CSize -> Ptr () -> CSize -> m ()

-- | <i>No description available in the introspection data.</i>
sliceGetConfig :: (HasCallStack, MonadIO m) => SliceConfig -> m Int64

-- | <i>No description available in the introspection data.</i>
sliceGetConfigState :: (HasCallStack, MonadIO m) => SliceConfig -> Int64 -> Word32 -> m Int64

-- | <i>No description available in the introspection data.</i>
sliceSetConfig :: (HasCallStack, MonadIO m) => SliceConfig -> Int64 -> m ()

-- | Gets the smallest prime number from a built-in array of primes which
--   is larger than <i><tt>num</tt></i>. This is used within GLib to
--   calculate the optimum size of a <a>HashTable</a>.
--   
--   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 <a>spawnAsyncWithPipes</a> for a full description; this function
--   simply calls the <a>spawnAsyncWithPipes</a> without any pipes.
--   
--   You should call <a>spawnClosePid</a> 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
--   <tt><i>GdkAppLaunchContext</i></tt>,
--   <tt><i>GAppLaunchContext</i></tt>, or set the <tt><i>DISPLAY</i></tt>
--   environment variable.
--   
--   Note that the returned <i><tt>childPid</tt></i> 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 <a>spawnAsyncWithPipesAndFds</a> but with <tt>n_fds</tt>
--   set to zero, so no FD assignments are used.
--   
--   <i>Since: 2.58</i>
spawnAsyncWithFds :: (HasCallStack, MonadIO m) => Maybe [Char] -> [Text] -> Maybe [Text] -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Int32 -> Int32 -> Int32 -> m Int32

-- | Identical to <a>spawnAsyncWithPipesAndFds</a> but with <tt>n_fds</tt>
--   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, <i><tt>argv</tt></i>. <i><tt>argv</tt></i> should be a
--   <a>Nothing</a>-terminated array of strings, to be passed as the
--   argument vector for the child. The first string in
--   <i><tt>argv</tt></i> is of course the name of the program to execute.
--   By default, the name of the program must be a full path. If
--   <i><tt>flags</tt></i> contains the <a>SpawnFlagsSearchPath</a> flag,
--   the <tt>PATH</tt> environment variable is used to search for the
--   executable. If <i><tt>flags</tt></i> contains the
--   <a>SpawnFlagsSearchPathFromEnvp</a> flag, the <tt>PATH</tt> variable
--   from <i><tt>envp</tt></i> is used to search for the executable. If
--   both the <a>SpawnFlagsSearchPath</a> and
--   <a>SpawnFlagsSearchPathFromEnvp</a> flags are set, the <tt>PATH</tt>
--   variable from <i><tt>envp</tt></i> takes precedence over the
--   environment variable.
--   
--   If the program name is not a full path and <a>SpawnFlagsSearchPath</a>
--   flag is not used, then the program will be run from the current
--   directory (or <i><tt>workingDirectory</tt></i>, 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 <tt>g_spawn*()</tt> 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
--   <tt>wmain()</tt> instead of <tt>main()</tt>. <tt>wmain()</tt> has a
--   wide character argument vector as parameter.
--   
--   At least currently, mingw doesn't support <tt>wmain()</tt>, so if you
--   use mingw to develop the spawned program, it should call
--   <tt><i>g_win32_get_command_line()</i></tt> to get arguments in UTF-8.
--   
--   On Windows the low-level child process creation API
--   <tt>CreateProcess()</tt> doesn't use argument vectors, but a command
--   line. The C runtime library's <tt>spawn*()</tt> family of functions
--   (which <a>spawnAsyncWithPipes</a> 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 <tt>main()</tt>. Complications
--   arise when you have argument vector elements that contain spaces or
--   double quotes. The <tt>spawn*()</tt> 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,
--   <a>spawnAsyncWithPipes</a> will do quoting and escaping on argument
--   vector elements that need it before calling the C runtime
--   <tt>spawn()</tt> function.
--   
--   The returned <i><tt>childPid</tt></i> on Windows is a handle to the
--   child process, not its identifier. Process handles and process
--   identifiers are different concepts on Windows.
--   
--   <i><tt>envp</tt></i> is a <a>Nothing</a>-terminated array of strings,
--   where each string has the form <tt>KEY=VALUE</tt>. This will become
--   the child's environment. If <i><tt>envp</tt></i> is <a>Nothing</a>,
--   the child inherits its parent's environment.
--   
--   <i><tt>flags</tt></i> should be the bitwise OR of any flags you want
--   to affect the function's behaviour. The
--   <a>SpawnFlagsDoNotReapChild</a> means that the child will not
--   automatically be reaped; you must use a child watch
--   (<tt><i>g_child_watch_add()</i></tt>) 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
--   <a>spawnClosePid</a> on the <i><tt>childPid</tt></i>, in order to free
--   resources which may be associated with the child process. (On Unix,
--   using a child watch is equivalent to calling <tt><i>waitpid()</i></tt>
--   or handling the <tt>SIGCHLD</tt> signal manually. On Windows, calling
--   <a>spawnClosePid</a> is equivalent to calling <tt>CloseHandle()</tt>
--   on the process handle returned in <i><tt>childPid</tt></i>). See
--   <tt><i>g_child_watch_add()</i></tt>.
--   
--   Open UNIX file descriptors marked as <tt>FD_CLOEXEC</tt> will be
--   automatically closed in the child process.
--   <a>SpawnFlagsLeaveDescriptorsOpen</a> means that other open file
--   descriptors will be inherited by the child; otherwise all descriptors
--   except stdin/stdout/stderr will be closed before calling
--   <tt>exec()</tt> in the child. <a>SpawnFlagsSearchPath</a> means that
--   <i><tt>argv</tt></i>[0] need not be an absolute path, it will be
--   looked for in the <tt>PATH</tt> environment variable.
--   <a>SpawnFlagsSearchPathFromEnvp</a> means need not be an absolute
--   path, it will be looked for in the <tt>PATH</tt> variable from
--   <i><tt>envp</tt></i>. If both <a>SpawnFlagsSearchPath</a> and
--   <a>SpawnFlagsSearchPathFromEnvp</a> are used, the value from
--   <i><tt>envp</tt></i> takes precedence over the environment.
--   
--   <a>SpawnFlagsChildInheritsStdin</a> means that the child will inherit
--   the parent's standard input (by default, the child's standard input is
--   attached to <tt>/dev/null</tt>). <a>SpawnFlagsStdinFromDevNull</a>
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the <i><tt>stdinPipeOut</tt></i>
--   argument is ignored.
--   
--   <a>SpawnFlagsStdoutToDevNull</a> means that the child's standard
--   output will be discarded (by default, it goes to the same location as
--   the parent's standard output). <a>SpawnFlagsChildInheritsStdout</a>
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the <i><tt>stdoutPipeOut</tt></i>
--   argument is ignored.
--   
--   <a>SpawnFlagsStderrToDevNull</a> means that the child's standard error
--   will be discarded (by default, it goes to the same location as the
--   parent's standard error). <a>SpawnFlagsChildInheritsStderr</a>
--   explicitly imposes the default behavior. Both flags cannot be enabled
--   at the same time and, in both cases, the <i><tt>stderrPipeOut</tt></i>
--   argument is ignored.
--   
--   It is valid to pass the same FD in multiple parameters (e.g. you can
--   pass a single FD for both <i><tt>stdoutFd</tt></i> and
--   <i><tt>stderrFd</tt></i>, and include it in <i><tt>sourceFds</tt></i>
--   too).
--   
--   <i><tt>sourceFds</tt></i> and <i><tt>targetFds</tt></i> allow zero or
--   more FDs from this process to be remapped to different FDs in the
--   spawned process. If <i><tt>nFds</tt></i> is greater than zero,
--   <i><tt>sourceFds</tt></i> and <i><tt>targetFds</tt></i> must both be
--   non-<a>Nothing</a> and the same length. Each FD in
--   <i><tt>sourceFds</tt></i> is remapped to the FD number at the same
--   index in <i><tt>targetFds</tt></i>. 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
--   <i><tt>stdinFd</tt></i>, <i><tt>stdoutFd</tt></i> or
--   <i><tt>stderrFd</tt></i> will overwrite them in the spawned process.
--   
--   <i><tt>sourceFds</tt></i> is supported on Windows since 2.72.
--   
--   <a>SpawnFlagsFileAndArgvZero</a> means that the first element of
--   <i><tt>argv</tt></i> is the file to execute, while the remaining
--   elements are the actual argument vector to pass to the file. Normally
--   <a>spawnAsyncWithPipes</a> uses <i><tt>argv</tt></i>[0] as the file to
--   execute, and passes all of <i><tt>argv</tt></i> to the child.
--   
--   <i><tt>childSetup</tt></i> and <i><tt>userData</tt></i> 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
--   <tt>exec()</tt>. That is, <i><tt>childSetup</tt></i> is called just
--   before calling <tt>exec()</tt> in the child. Obviously actions taken
--   in this function will only affect the child, not the parent.
--   
--   On Windows, there is no separate <tt>fork()</tt> and <tt>exec()</tt>
--   functionality. Child processes are created and run with a single API
--   call, <tt>CreateProcess()</tt>. There is no sensible thing
--   <i><tt>childSetup</tt></i> could be used for on Windows so it is
--   ignored and not called.
--   
--   If non-<a>Nothing</a>, <i><tt>childPid</tt></i> 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 <tt><i>g_child_watch_add()</i></tt>
--   (or <tt>waitpid()</tt>) if you specified the
--   <a>SpawnFlagsDoNotReapChild</a> flag. On Windows,
--   <i><tt>childPid</tt></i> will be filled with a handle to the child
--   process only if you specified the <a>SpawnFlagsDoNotReapChild</a>
--   flag. You can then access the child process using the Win32 API, for
--   example wait for its termination with the <tt>WaitFor*()</tt>
--   functions, or examine its exit code with
--   <tt>GetExitCodeProcess()</tt>. You should close the handle with
--   <tt>CloseHandle()</tt> or <a>spawnClosePid</a> when you no longer need
--   it.
--   
--   If non-<a>Nothing</a>, the <i><tt>stdinPipeOut</tt></i>,
--   <i><tt>stdoutPipeOut</tt></i>, <i><tt>stderrPipeOut</tt></i> 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 <a>spawnAsyncWithPipes</a> must close these file
--   descriptors when they are no longer in use. If these parameters are
--   <a>Nothing</a>, the corresponding pipe won't be created.
--   
--   If <i><tt>stdinPipeOut</tt></i> is <a>Nothing</a>, the child's
--   standard input is attached to <tt>/dev/null</tt> unless
--   <a>SpawnFlagsChildInheritsStdin</a> is set.
--   
--   If <i><tt>stderrPipeOut</tt></i> is NULL, the child's standard error
--   goes to the same location as the parent's standard error unless
--   <a>SpawnFlagsStderrToDevNull</a> is set.
--   
--   If <i><tt>stdoutPipeOut</tt></i> is NULL, the child's standard output
--   goes to the same location as the parent's standard output unless
--   <a>SpawnFlagsStdoutToDevNull</a> is set.
--   
--   <i><tt>error</tt></i> can be <a>Nothing</a> to ignore errors, or
--   non-<a>Nothing</a> to report errors. If an error is set, the function
--   returns <a>False</a>. Errors are reported even if they occur in the
--   child (for example if the executable in <tt>@argv[0]</tt> is not
--   found). Typically the <tt>message</tt> field of returned errors should
--   be displayed to users. Possible errors are those from the
--   <tt><i>G_SPAWN_ERROR</i></tt> domain.
--   
--   If an error occurs, <i><tt>childPid</tt></i>,
--   <i><tt>stdinPipeOut</tt></i>, <i><tt>stdoutPipeOut</tt></i>, and
--   <i><tt>stderrPipeOut</tt></i> will not be filled with valid values.
--   
--   If <i><tt>childPid</tt></i> is not <a>Nothing</a> and an error does
--   not occur then the returned process reference must be closed using
--   <a>spawnClosePid</a>.
--   
--   On modern UNIX platforms, GLib can use an efficient process launching
--   codepath driven internally by <tt>posix_spawn()</tt>. 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:
--   
--   <ol>
--   <li><a>SpawnFlagsDoNotReapChild</a> is set</li>
--   <li><a>SpawnFlagsLeaveDescriptorsOpen</a> is set</li>
--   <li><a>SpawnFlagsSearchPathFromEnvp</a> is not set</li>
--   <li><i><tt>workingDirectory</tt></i> is <a>Nothing</a></li>
--   <li><i><tt>childSetup</tt></i> is <a>Nothing</a></li>
--   <li>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.</li>
--   </ol>
--   
--   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
--   <tt><i>GdkAppLaunchContext</i></tt>,
--   <tt><i>GAppLaunchContext</i></tt>, or set the <tt>DISPLAY</tt>
--   environment variable.
--   
--   <i>Since: 2.68</i>
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 <a>spawnCheckWaitStatus</a>, deprecated because its
--   name is misleading.
--   
--   Despite the name of the function, <i><tt>waitStatus</tt></i> must be
--   the wait status as returned by <a>spawnSync</a>,
--   <tt><i>g_subprocess_get_status()</i></tt>, <tt>waitpid()</tt>, etc. On
--   Unix platforms, it is incorrect for it to be the exit status as passed
--   to <tt>exit()</tt> or returned by
--   <tt><i>g_subprocess_get_exit_status()</i></tt> or
--   <tt>WEXITSTATUS()</tt>.
--   
--   <i>Since: 2.34</i>

-- | <i>Deprecated: (Since version 2.70)Use <a>spawnCheckWaitStatus</a>
--   instead, and check whether your code is conflating wait and exit
--   statuses.</i>
spawnCheckExitStatus :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | Set <i><tt>error</tt></i> if <i><tt>waitStatus</tt></i> indicates the
--   child exited abnormally (e.g. with a nonzero exit code, or via a fatal
--   signal).
--   
--   The <a>spawnSync</a> and <tt><i>g_child_watch_add()</i></tt> 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
--   <tt><i>waitpid()</i></tt> returns, and on Windows it is guaranteed to
--   be the result of <tt><i>GetExitCodeProcess()</i></tt>.
--   
--   Prior to the introduction of this function in GLib 2.34, interpreting
--   <i><tt>waitStatus</tt></i> 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 <a>GError</a> or
--   print a message to standard error. In that common case, this function
--   can be used. Note that the error message in <i><tt>error</tt></i> will
--   contain human-readable information about the wait status.
--   
--   The <i><tt>domain</tt></i> and <i><tt>code</tt></i> of
--   <i><tt>error</tt></i> 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 <tt><i>WIFEXITED()</i></tt> would be true of
--   <i><tt>waitStatus</tt></i>. On Windows, it is always the case.
--   
--   The special semantics are that the actual exit code will be the code
--   set in <i><tt>error</tt></i>, and the domain will be
--   <tt><i>G_SPAWN_EXIT_ERROR</i></tt>. 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
--   <tt><i>G_SPAWN_ERROR</i></tt> and the code will be
--   <a>SpawnErrorFailed</a>.
--   
--   This function just offers convenience; you can of course also check
--   the available platform via a macro such as <tt><i>G_OS_UNIX</i></tt>,
--   and use <tt><i>WIFEXITED()</i></tt> and <tt><i>WEXITSTATUS()</i></tt>
--   on <i><tt>waitStatus</tt></i> 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, <a>spawnCheckExitStatus</a> provides the same
--   functionality, although under a misleading name.
--   
--   <i>Since: 2.70</i>
spawnCheckWaitStatus :: (HasCallStack, MonadIO m) => Int32 -> m ()

-- | On some platforms, notably Windows, the <tt><i>GPid</i></tt> type
--   represents a resource which must be closed to prevent resource
--   leaking. <a>spawnClosePid</a> 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 <a>spawnAsync</a> that parses a command line with
--   <a>shellParseArgv</a> and passes it to <a>spawnAsync</a>.
--   
--   Runs a command line in the background. Unlike <a>spawnAsync</a>, the
--   <a>SpawnFlagsSearchPath</a> flag is enabled, other flags are not. Note
--   that <a>SpawnFlagsSearchPath</a> can have security implications, so
--   consider using <a>spawnAsync</a> directly if appropriate. Possible
--   errors are those from <a>shellParseArgv</a> and <a>spawnAsync</a>.
--   
--   The same concerns on Windows apply as for <a>spawnCommandLineSync</a>.
spawnCommandLineAsync :: (HasCallStack, MonadIO m) => [Char] -> m ()

-- | A simple version of <a>spawnSync</a> with little-used parameters
--   removed, taking a command line instead of an argument vector.
--   
--   See <a>spawnSync</a> for full details.
--   
--   The <i><tt>commandLine</tt></i> argument will be parsed by
--   <a>shellParseArgv</a>.
--   
--   Unlike <a>spawnSync</a>, the <a>SpawnFlagsSearchPath</a> flag is
--   enabled. Note that <a>SpawnFlagsSearchPath</a> can have security
--   implications, so consider using <a>spawnSync</a> directly if
--   appropriate.
--   
--   Possible errors are those from <a>spawnSync</a> and those from
--   <a>shellParseArgv</a>.
--   
--   If <i><tt>waitStatus</tt></i> is non-<a>Nothing</a>, the
--   platform-specific status of the child is stored there; see the
--   documentation of <a>spawnCheckWaitStatus</a> for how to use and
--   interpret this. On Unix platforms, note that it is usually not equal
--   to the integer passed to <tt>exit()</tt> or returned from
--   <tt>main()</tt>.
--   
--   On Windows, please note the implications of <a>shellParseArgv</a>
--   parsing <i><tt>commandLine</tt></i>. 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
--   <i><tt>commandLine</tt></i> 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)

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

-- | <i>No description available in the introspection data.</i>
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 <i><tt>standardOutput</tt></i>
--   and <i><tt>standardError</tt></i>, if those parameters are
--   non-<a>Nothing</a>. Note that you must set the
--   <a>SpawnFlagsStdoutToDevNull</a> and <a>SpawnFlagsStderrToDevNull</a>
--   flags when passing <a>Nothing</a> for <i><tt>standardOutput</tt></i>
--   and <i><tt>standardError</tt></i>.
--   
--   If <i><tt>waitStatus</tt></i> is non-<a>Nothing</a>, the
--   platform-specific status of the child is stored there; see the
--   documentation of <a>spawnCheckWaitStatus</a> for how to use and
--   interpret this. On Unix platforms, note that it is usually not equal
--   to the integer passed to <tt>exit()</tt> or returned from
--   <tt>main()</tt>.
--   
--   Note that it is invalid to pass <a>SpawnFlagsDoNotReapChild</a> in
--   <i><tt>flags</tt></i>, and on POSIX platforms, the same restrictions
--   as for <a>childWatchSourceNew</a> apply.
--   
--   If an error occurs, no data is returned in
--   <i><tt>standardOutput</tt></i>, <i><tt>standardError</tt></i>, or
--   <i><tt>waitStatus</tt></i>.
--   
--   This function calls <a>spawnAsyncWithPipes</a> 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 <tt><i>stat()</i></tt> function. The
--   <tt><i>stat()</i></tt> function returns information about a file. On
--   Windows the <tt><i>stat()</i></tt> 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 <i><tt>stMode</tt></i>
--   field are a fabrication of little use.
--   
--   On Windows the Microsoft C libraries have several variants of the stat
--   struct and <tt><i>stat()</i></tt> function with names like
--   <tt><i>_stat()</i></tt>, <tt><i>_stat32()</i></tt>,
--   <tt><i>_stat32i64()</i></tt> and <tt><i>_stat64i32()</i></tt>. The one
--   used here is for 32-bit code the one with 32-bit size and time fields,
--   specifically called <tt><i>_stat32()</i></tt>.
--   
--   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 <a>StatBuf</a> 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, <tt><i>stat()</i></tt>
--   might be a macro.
--   
--   See your C library manual for more details about
--   <tt><i>stat()</i></tt>.
--   
--   <i>Since: 2.6</i>
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 <tt>dest</tt>. 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 <a>True</a>
--   if they are equal. It can be passed to
--   <tt><i>g_hash_table_new()</i></tt> as the <i><tt>keyEqualFunc</tt></i>
--   parameter, when using non-<a>Nothing</a> strings as keys in a
--   <a>HashTable</a>.
--   
--   This function is typically used for hash table comparisons, but can be
--   used for general purpose comparisons of non-<a>Nothing</a> strings.
--   For a <a>Nothing</a>-safe string comparison function, see
--   <a>strcmp0</a>.
strEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool

-- | Looks whether the string <i><tt>str</tt></i> begins with
--   <i><tt>prefix</tt></i>.
--   
--   <i>Since: 2.2</i>
strHasPrefix :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Looks whether a string ends with <i><tt>suffix</tt></i>.
--   
--   <i>Since: 2.2</i>
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: <tt>hash = hash * 33 + c</tt>. This function uses the signed
--   value of each byte.
--   
--   It can be passed to <tt><i>g_hash_table_new()</i></tt> as the
--   <i><tt>hashFunc</tt></i> parameter, when using non-<a>Nothing</a>
--   strings as keys in a <a>HashTable</a>.
--   
--   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.
--   
--   <i>Since: 2.40</i>
strIsAscii :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if a search conducted for <i><tt>searchTerm</tt></i> should
--   match <i><tt>potentialHit</tt></i>.
--   
--   This function calls <a>strTokenizeAndFold</a> on both
--   <i><tt>searchTerm</tt></i> and <i><tt>potentialHit</tt></i>. ASCII
--   alternates are never taken for <i><tt>searchTerm</tt></i> but will be
--   taken for <i><tt>potentialHit</tt></i> according to the value of
--   <i><tt>acceptAlternates</tt></i>.
--   
--   A hit occurs when each folded token in <i><tt>searchTerm</tt></i> is a
--   prefix of a folded token from <i><tt>potentialHit</tt></i>.
--   
--   Depending on how you're performing the search, it will typically be
--   faster to call <tt>g_str_tokenize_and_fold()</tt> on each string in
--   your corpus and build an index on the returned folded tokens, then
--   call <tt>g_str_tokenize_and_fold()</tt> 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).
--   
--   <i>Since: 2.40</i>
strMatchString :: (HasCallStack, MonadIO m) => Text -> Text -> Bool -> m Bool

-- | Transliterate <i><tt>str</tt></i> to plain ASCII.
--   
--   For best results, <i><tt>str</tt></i> 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 <i><tt>str</tt></i> is known, it can used to
--   improve the accuracy of the translation by passing it as
--   <i><tt>fromLocale</tt></i>. It should be a valid POSIX locale string
--   (of the form <tt>language[_territory][.codeset][@modifier]</tt>).
--   
--   If <i><tt>fromLocale</tt></i> is <a>Nothing</a> 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 <tt>"C"</tt>
--   for <i><tt>fromLocale</tt></i>.
--   
--   <i>Since: 2.40</i>
strToAscii :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m Text

-- | Tokenizes <i><tt>string</tt></i> 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
--   <a>unicharIsalnum</a> or <a>unicharIsmark</a>.
--   
--   Each token is then (Unicode) normalised and case-folded. If
--   <i><tt>asciiAlternates</tt></i> is non-<tt>NULL</tt> 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 <i><tt>translitLocale</tt></i> (if
--   specified) may improve the transliteration if the language of the
--   source string is known.
--   
--   <i>Since: 2.40</i>
strTokenizeAndFold :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m ([Text], [Text])

-- | For each character in <i><tt>string</tt></i>, if the character is not
--   in <i><tt>validChars</tt></i>, replaces the character with
--   <i><tt>substitutor</tt></i>.
--   
--   Modifies <i><tt>string</tt></i> in place, and return
--   <i><tt>string</tt></i> itself, not a copy. The return value is to
--   allow nesting such as:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_ascii_strup (g_strcanon (str, "abc", '?'))
--   </pre>
--   
--   In order to modify a copy, you may use <a>strdup</a>:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   reformatted = g_strcanon (g_strdup (const_str), "abc", '?');
--   …
--   g_free (reformatted);
--   </pre>
strcanon :: (HasCallStack, MonadIO m) => Text -> Text -> Int8 -> m Text

-- | A case-insensitive string comparison, corresponding to the standard
--   <tt>strcasecmp()</tt> function on platforms which support it.

-- | <i>Deprecated: (Since version 2.2)See <a>strncasecmp</a> for a
--   discussion of why this function is deprecated and how to replace
--   it.</i>
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
--   <i><tt>string</tt></i> in place. Therefore, it cannot be used on
--   statically allocated strings.
--   
--   The pointer to <i><tt>string</tt></i> is returned to allow the nesting
--   of functions.
--   
--   Also see <a>strchug</a> and <tt><i>GLib.strstrip</i></tt>.
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
--   <i><tt>string</tt></i> in place. Therefore, it cannot be used on
--   statically allocated strings.
--   
--   The pointer to <i><tt>string</tt></i> is returned to allow the nesting
--   of functions.
--   
--   Also see <a>strchomp</a> and <tt><i>GLib.strstrip</i></tt>.
strchug :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Compares <i><tt>str1</tt></i> and <i><tt>str2</tt></i> like
--   <tt><i>strcmp()</i></tt>. Handles <a>Nothing</a> gracefully by sorting
--   it before non-<a>Nothing</a> strings. Comparing two <a>Nothing</a>
--   pointers returns 0.
--   
--   <i>Since: 2.16</i>
strcmp0 :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> m Int32

-- | Replaces all escaped characters with their one byte equivalent.
--   
--   This function does the reverse conversion of <a>strescape</a>.
strcompress :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Converts any delimiter characters in <i><tt>string</tt></i> to
--   <i><tt>newDelimiter</tt></i>.
--   
--   Any characters in <i><tt>string</tt></i> which are found in
--   <i><tt>delimiters</tt></i> are changed to the
--   <i><tt>newDelimiter</tt></i> character. Modifies
--   <i><tt>string</tt></i> in place, and returns <i><tt>string</tt></i>
--   itself, not a copy.
--   
--   The return value is to allow nesting such as:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_ascii_strup (g_strdelimit (str, "abc", '?'))
--   </pre>
--   
--   In order to modify a copy, you may use <a>strdup</a>:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   reformatted = g_strdelimit (g_strdup (const_str), "abc", '?');
--   …
--   g_free (reformatted);
--   </pre>
strdelimit :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Int8 -> m Text

-- | Converts a string to lower case.

-- | <i>Deprecated: (Since version 2.2)This function is totally broken for
--   the reasons discussed in the <a>strncasecmp</a> docs — use
--   <a>asciiStrdown</a> or <a>utf8Strdown</a> instead.</i>
strdown :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Duplicates a string. If <i><tt>str</tt></i> is <tt>NULL</tt> it
--   returns <tt>NULL</tt>.
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 <tt>NULL</tt> value, <tt>g_strdupv()</tt> simply
--   returns <tt>NULL</tt>.
strdupv :: (HasCallStack, MonadIO m) => Maybe [Text] -> m (Maybe [Text])

-- | Returns a string corresponding to the given error code, e.g. "no such
--   process".
--   
--   Unlike <tt>strerror()</tt>, 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 &lt;code\&gt;”.
--   
--   Note that the string may be translated according to the current
--   locale.
--   
--   The value of <tt>errno</tt> 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:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   int saved_errno;
--   
--   ret = read (blah);
--   saved_errno = errno;
--   
--   g_strerror (saved_errno);
--   </pre>
strerror :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\'
--   and '"' in the string <i><tt>source</tt></i> by inserting a '\' before
--   them. Additionally all characters in the range 0x01-0x1F (everything
--   below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are
--   replaced with a '\' followed by their octal representation. Characters
--   supplied in <i><tt>exceptions</tt></i> are not escaped.
--   
--   <a>strcompress</a> 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 <i><tt>strArray</tt></i> is <tt>NULL</tt>, this function simply
--   returns.
strfreev :: (HasCallStack, MonadIO m) => Maybe [Text] -> m ()

-- | An auxiliary function for <tt><i>gettext()</i></tt> support (see
--   <tt><i>Q_()</i></tt>).
--   
--   <i>Since: 2.4</i>
stripContext :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Joins an array of strings together to form one long string, with the
--   optional <i><tt>separator</tt></i> inserted between each of them.
--   
--   If <i><tt>strArray</tt></i> has no items, the return value will be an
--   empty string. If <i><tt>strArray</tt></i> contains a single item,
--   <i><tt>separator</tt></i> will not appear in the resulting string.
strjoinv :: (HasCallStack, MonadIO m) => Maybe Text -> [Text] -> m Text

-- | Portability wrapper that calls <tt>strlcat()</tt> on systems which
--   have it, and emulates it otherwise. Appends nul-terminated
--   <i><tt>src</tt></i> string to <i><tt>dest</tt></i>, guaranteeing
--   nul-termination for <i><tt>dest</tt></i>. The total size of
--   <i><tt>dest</tt></i> won't exceed <i><tt>destSize</tt></i>.
--   
--   At most <i><tt>destSize</tt></i> - 1 characters will be copied. Unlike
--   <tt>strncat()</tt>, <i><tt>destSize</tt></i> is the full size of dest,
--   not the space left over. This function does not allocate memory. It
--   always nul-terminates (unless <i><tt>destSize</tt></i> == 0 or there
--   were no nul characters in the <i><tt>destSize</tt></i> characters of
--   dest to start with).
--   
--   Caveat: this is supposedly a more secure alternative to
--   <tt>strcat()</tt> or <tt>strncat()</tt>, but for real security
--   <tt><i>GLib.strconcat</i></tt> is harder to mess up.
strlcat :: (HasCallStack, MonadIO m) => Text -> Text -> CSize -> m CSize

-- | Portability wrapper that calls <tt>strlcpy()</tt> on systems which
--   have it, and emulates <tt>strlcpy()</tt> otherwise. Copies
--   <i><tt>src</tt></i> to <i><tt>dest</tt></i>; <i><tt>dest</tt></i> is
--   guaranteed to be nul-terminated; <i><tt>src</tt></i> must be
--   nul-terminated; <i><tt>destSize</tt></i> is the buffer size, not the
--   number of bytes to copy.
--   
--   At most <i><tt>destSize</tt></i> - 1 characters will be copied. Always
--   nul-terminates (unless <i><tt>destSize</tt></i> is 0). This function
--   does not allocate memory. Unlike <tt>strncpy()</tt>, this function
--   doesn't pad <i><tt>dest</tt></i> (so it's often faster). It returns
--   the size of the attempted result, <tt>strlen (src)</tt>, so if
--   <i><tt>retval</tt></i> &gt;= <i><tt>destSize</tt></i>, truncation
--   occurred.
--   
--   Caveat: <tt>strlcpy()</tt> is supposedly more secure than
--   <tt>strcpy()</tt> or <tt>strncpy()</tt>, but if you really want to
--   avoid screwups, <a>strdup</a> is an even better idea.
strlcpy :: (HasCallStack, MonadIO m) => Text -> Text -> CSize -> m CSize

-- | A case-insensitive string comparison, corresponding to the standard
--   <tt>strncasecmp()</tt> function on platforms which support it. It is
--   similar to <a>strcasecmp</a> except it only compares the first
--   <i><tt>n</tt></i> characters of the strings.

-- | <i>Deprecated: (Since version 2.2)The problem with
--   <tt>g_strncasecmp()</tt> is that it does the comparison by calling
--   <tt>toupper()</tt>/<tt>tolower()</tt>. These functions are
--   locale-specific and operate on single bytes. However, it is impossible
--   to handle things correctly from an internationalization standpoint by
--   operating on bytes, since characters may be multibyte. Thus
--   <tt>g_strncasecmp()</tt> is broken if your string is guaranteed to be
--   ASCII, since it is locale-sensitive, and it's broken if your string is
--   localized, since it doesn't work on many encodings at all, including
--   UTF-8, EUC-JP, etc. There are therefore two replacement techniques:
--   <a>asciiStrncasecmp</a>, which only works on ASCII and is not
--   locale-sensitive, and <a>utf8Casefold</a> followed by
--   <tt>strcmp()</tt> on the resulting strings, which is good for
--   case-insensitive sorting of UTF-8.</i>
strncasecmp :: (HasCallStack, MonadIO m) => Text -> Text -> Word32 -> m Int32

-- | Duplicates the first <i><tt>n</tt></i> bytes of a string, returning a
--   newly-allocated buffer <i><tt>n</tt></i> + 1 bytes long which will
--   always be nul-terminated. If <i><tt>str</tt></i> is less than
--   <i><tt>n</tt></i> bytes long the buffer is padded with nuls. If
--   <i><tt>str</tt></i> is <tt>NULL</tt> it returns <tt>NULL</tt>.
--   
--   To copy a number of characters from a UTF-8 encoded string, use
--   <a>utf8Strncpy</a> instead.
strndup :: (HasCallStack, MonadIO m) => Maybe Text -> CSize -> m (Maybe Text)

-- | Creates a new string <i><tt>length</tt></i> bytes long filled with
--   <i><tt>fillChar</tt></i>.
strnfill :: (HasCallStack, MonadIO m) => CSize -> Int8 -> m Text

-- | Reverses all of the bytes in a string. For example, <tt>g_strreverse
--   ("abcdef")</tt> will result in "fedcba".
--   
--   Note that <tt>g_strreverse()</tt> doesn't work on UTF-8 strings
--   containing multibyte characters. For that purpose, use
--   <a>utf8Strreverse</a>.
strreverse :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Searches the string <i><tt>haystack</tt></i> for the last occurrence
--   of the string <i><tt>needle</tt></i>.
strrstr :: (HasCallStack, MonadIO m) => Text -> Text -> m Text

-- | Searches the string <i><tt>haystack</tt></i> for the last occurrence
--   of the string <i><tt>needle</tt></i>, limiting the length of the
--   search to <i><tt>haystackLen</tt></i>.
strrstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m Text

-- | Returns a string describing the given signal, e.g. "Segmentation
--   fault". If the signal is unknown, it returns “unknown signal
--   (&lt;signum\&gt;)”.
--   
--   You should use this function in preference to <tt>strsignal()</tt>,
--   because it returns a string in UTF-8 encoding, and since not all
--   platforms support the <tt>strsignal()</tt> function.
strsignal :: (HasCallStack, MonadIO m) => Int32 -> m Text

-- | Splits a string into a maximum of <i><tt>maxTokens</tt></i> pieces,
--   using the given <i><tt>delimiter</tt></i>. If
--   <i><tt>maxTokens</tt></i> is reached, the remainder of
--   <i><tt>string</tt></i> is appended to the last token.
--   
--   As an example, the result of <tt>g_strsplit (":a:bc::d:", ":",
--   -1)</tt> 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 <tt>g_strsplit()</tt>.
strsplit :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> m [Text]

-- | Splits <i><tt>string</tt></i> into a number of tokens not containing
--   any of the characters in <i><tt>delimiters</tt></i>. A token is the
--   (possibly empty) longest string that does not contain any of the
--   characters in <i><tt>delimiters</tt></i>. If <i><tt>maxTokens</tt></i>
--   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:", ":/", -1) is an array
--   containing the four strings "", "def", "ghi", 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 <tt>g_strsplit_set()</tt>.
--   
--   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.
--   
--   <i>Since: 2.4</i>
strsplitSet :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> m [Text]

-- | Searches the string <i><tt>haystack</tt></i> for the first occurrence
--   of the string <i><tt>needle</tt></i>, limiting the length of the
--   search to <i><tt>haystackLen</tt></i> or a nul terminator byte
--   (whichever is reached first).
--   
--   A length of <tt>-1</tt> can be used to mean “search the entire
--   string”, like <tt>strstr()</tt>.
strstrLen :: (HasCallStack, MonadIO m) => Text -> Int64 -> Text -> m Text

-- | Converts a string to a floating point value.
--   
--   It calls the standard <tt>strtod()</tt> function to handle the
--   conversion, but if the string is not completely converted it attempts
--   the conversion again with <a>asciiStrtod</a>, and returns the best
--   match.
--   
--   This function should seldom be used. The normal situation when reading
--   numbers not for human consumption is to use <a>asciiStrtod</a>. 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.

-- | <i>Deprecated: (Since version 2.2)This function is totally broken for
--   the reasons discussed in the <a>strncasecmp</a> docs — use
--   <a>asciiStrup</a> or <a>utf8Strup</a> instead.</i>
strup :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Checks if an array of strings contains the string <i><tt>str</tt></i>
--   according to <a>strEqual</a>. <i><tt>strv</tt></i> must not be
--   <tt>NULL</tt>.
--   
--   <i>Since: 2.44</i>
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 <a>strEqual</a>. To match independently of
--   order, sort the arrays first (using <a>qsortWithData</a> or similar).
--   
--   Elements are compared using <a>strEqual</a>. To match independently of
--   order, sort the arrays first (using <a>qsortWithData</a> or similar).
--   
--   Two empty arrays are considered equal. Neither <i><tt>strv1</tt></i>
--   nor <i><tt>strv2</tt></i> may be <tt>NULL</tt>.
--   
--   <i>Since: 2.60</i>
strvEqual :: (HasCallStack, MonadIO m) => [Text] -> [Text] -> m Bool

-- | <i>No description available in the introspection data.</i>
strvGetType :: (HasCallStack, MonadIO m) => m GType

-- | Returns the length of an array of strings. <i><tt>strArray</tt></i>
--   must not be <tt>NULL</tt>.
--   
--   <i>Since: 2.6</i>
strvLength :: (HasCallStack, MonadIO m) => [Text] -> m Word32

-- | Create a new test case, similar to
--   <tt><i>g_test_create_case()</i></tt>. However the test is assumed to
--   use no fixture, and test suites are automatically created on the fly
--   and added to the root fixture, based on the slash-separated portions
--   of <i><tt>testpath</tt></i>. The <i><tt>testData</tt></i> argument
--   will be passed as first argument to <i><tt>testFunc</tt></i>.
--   
--   If <i><tt>testpath</tt></i> includes the component "subprocess"
--   anywhere in it, the test will be skipped by default, and only run if
--   explicitly required via the <tt>-p</tt> command-line option or
--   <a>testTrapSubprocess</a>.
--   
--   No component of <i><tt>testpath</tt></i> may start with a dot
--   (<tt>.</tt>) if the <a>TEST_OPTION_ISOLATE_DIRS</a> option is being
--   used; and it is recommended to do so even if it isn’t.
--   
--   <i>Since: 2.16</i>
testAddDataFunc :: (HasCallStack, MonadIO m) => Text -> Ptr () -> TestDataFunc -> m ()

-- | Create a new test case, similar to
--   <tt><i>g_test_create_case()</i></tt>. However the test is assumed to
--   use no fixture, and test suites are automatically created on the fly
--   and added to the root fixture, based on the slash-separated portions
--   of <i><tt>testpath</tt></i>.
--   
--   If <i><tt>testpath</tt></i> includes the component "subprocess"
--   anywhere in it, the test will be skipped by default, and only run if
--   explicitly required via the <tt>-p</tt> command-line option or
--   <a>testTrapSubprocess</a>.
--   
--   No component of <i><tt>testpath</tt></i> may start with a dot
--   (<tt>.</tt>) if the <a>TEST_OPTION_ISOLATE_DIRS</a> option is being
--   used; and it is recommended to do so even if it isn’t.
--   
--   <i>Since: 2.16</i>
testAddFunc :: (HasCallStack, MonadIO m) => Text -> TestFunc -> m ()

-- | <i>No description available in the introspection data.</i>
testAssertExpectedMessagesInternal :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> m ()

-- | This function adds a message to test reports that associates a bug URI
--   with a test case.
--   
--   Bug URIs are constructed from a base URI set with <a>testBugBase</a>
--   and <i><tt>bugUriSnippet</tt></i>. If <a>testBugBase</a> has not been
--   called, it is assumed to be the empty string, so a full URI can be
--   provided to <a>testBug</a> instead.
--   
--   Since GLib 2.70, the base URI is not prepended to
--   <i><tt>bugUriSnippet</tt></i> if it is already a valid URI.
--   
--   <i>Since: 2.16</i>
testBug :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Specify the base URI for bug reports.
--   
--   The base URI is used to construct bug report messages for
--   <tt><i>g_test_message()</i></tt> when <a>testBug</a> 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 <i><tt>uriPattern</tt></i>,
--   or by replacing the special string <tt>%s</tt> within
--   <i><tt>uriPattern</tt></i> if that is present.
--   
--   If <a>testBugBase</a> is not called, bug URIs are formed solely from
--   the value provided by <a>testBug</a>.
--   
--   <i>Since: 2.16</i>
testBugBase :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Attempt 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.
--   
--   <i>Since: 2.78</i>
testDisableCrashReporting :: (HasCallStack, MonadIO m) => m ()

-- | Indicates that a message with the given <i><tt>logDomain</tt></i> and
--   <i><tt>logLevel</tt></i>, with text matching <i><tt>pattern</tt></i>,
--   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
--   (<tt><i>GLib.log</i></tt> without <tt>G_LOG_USE_STRUCTURED</tt>
--   defined). It will not work with the structured logging API. See
--   <a>Testing for Messages</a>.
--   
--   Use <tt><i>GLib.test_assert_expected_messages</i></tt> 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 <a>testExpectMessage</a>.)
--   
--   For example:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   // 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 ();
--   </pre>
--   
--   Note that you cannot use this to test <tt><i>GLib.error</i></tt>
--   messages, since <tt><i>GLib.error</i></tt> intentionally never returns
--   even if the program doesn’t abort; use <a>testTrapSubprocess</a> in
--   this case.
--   
--   If messages at [flags<i><tt>gLib</tt></i>.LogLevelFlags.LEVEL_DEBUG]
--   are emitted, but not explicitly expected via <a>testExpectMessage</a>
--   then they will be ignored.
--   
--   <i>Since: 2.34</i>
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 <a>testSkip</a> and <a>testIncomplete</a>, this
--   function does not log a message alongside the test failure. If details
--   of the test failure are available, either log them with
--   <tt><i>g_test_message()</i></tt> before <a>testFail</a>, or use
--   <tt><i>g_test_fail_printf()</i></tt> instead.
--   
--   <i>Since: 2.30</i>
testFail :: (HasCallStack, MonadIO m) => m ()

-- | Returns whether a test has already failed. This will be the case when
--   <a>testFail</a>, <a>testIncomplete</a> or <a>testSkip</a> 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.
--   
--   <i>Since: 2.38</i>
testFailed :: (HasCallStack, MonadIO m) => m Bool

-- | Gets the pathname of the directory containing test files of the type
--   specified by <i><tt>fileType</tt></i>.
--   
--   This is approximately the same as calling g_test_build_filename("."),
--   but you don't need to free the return value.
--   
--   <i>Since: 2.38</i>
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. <tt><i>g_test_add()</i></tt> 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.
--   
--   <i>Since: 2.68</i>
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.
--   
--   <i>Since: 2.38</i>
testIncomplete :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | <i>No description available in the introspection data.</i>
testLogTypeName :: (HasCallStack, MonadIO m) => TestLogType -> m Text

-- | Enqueues a callback <i><tt>destroyFunc</tt></i> 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 <tt>A</tt> before callback <tt>B</tt> will
--   cause <tt>B()</tt> to be called before <tt>A()</tt> during teardown.
--   
--   <i>Since: 2.16</i>
testQueueDestroy :: (HasCallStack, MonadIO m) => DestroyNotify -> Ptr () -> m ()

-- | Enqueue a pointer to be released with <a>free</a> during the next
--   teardown phase. This is equivalent to calling <a>testQueueDestroy</a>
--   with a destroy callback of <a>free</a>.
--   
--   <i>Since: 2.16</i>
testQueueFree :: (HasCallStack, MonadIO m) => Ptr () -> m ()

-- | Get a reproducible random floating point number, see
--   <a>testRandInt</a> for details on test case random numbers.
--   
--   <i>Since: 2.16</i>
testRandDouble :: (HasCallStack, MonadIO m) => m Double

-- | Get a reproducible random floating pointer number out of a specified
--   range, see <a>testRandInt</a> for details on test case random numbers.
--   
--   <i>Since: 2.16</i>
testRandDoubleRange :: (HasCallStack, MonadIO m) => Double -> Double -> m Double

-- | Get a reproducible random integer number.
--   
--   The random numbers generated by the g_test_rand_*() family of
--   functions change with every new test program start, unless the --seed
--   option is given when starting test programs.
--   
--   For individual test cases however, the random number generator is
--   reseeded, to avoid dependencies between tests and to make --seed
--   effective for all test cases.
--   
--   <i>Since: 2.16</i>
testRandInt :: (HasCallStack, MonadIO m) => m Int32

-- | Get a reproducible random integer number out of a specified range, see
--   <a>testRandInt</a> for details on test case random numbers.
--   
--   <i>Since: 2.16</i>
testRandIntRange :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32

-- | Runs all tests under the toplevel suite which can be retrieved with
--   <tt><i>g_test_get_root()</i></tt>. Similar to <a>testRunSuite</a>, the
--   test cases to be run are filtered according to test path arguments
--   (<tt>-p testpath</tt> and <tt>-s testpath</tt>) as parsed by
--   <tt><i>g_test_init()</i></tt>. <a>testRunSuite</a> or <a>testRun</a>
--   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 <tt>g_test_add_*</tt> 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 <a>testRun</a> 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
--   <tt><i>g_test_add()</i></tt>, 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.
--   
--   <i>Since: 2.16</i>
testRun :: (HasCallStack, MonadIO m) => m Int32

-- | Execute the tests within <i><tt>suite</tt></i> and all nested
--   <tt><i>GTestSuites</i></tt>. The test suites to be executed are
--   filtered according to test path arguments (<tt>-p testpath</tt> and
--   <tt>-s testpath</tt>) as parsed by <tt><i>g_test_init()</i></tt>. See
--   the <a>testRun</a> documentation for more information on the order
--   that tests are run in.
--   
--   <a>testRunSuite</a> or <a>testRun</a> may only be called once in a
--   program.
--   
--   <i>Since: 2.16</i>
testRunSuite :: (HasCallStack, MonadIO m) => TestSuite -> m Int32

-- | Changes the behaviour of the various <tt>g_assert_*()</tt> macros,
--   <tt><i>g_test_assert_expected_messages()</i></tt> and the various
--   <tt>g_test_trap_assert_*()</tt> macros to not abort to program, but
--   instead call <a>testFail</a> and continue. (This also changes the
--   behavior of <a>testFail</a> so that it will not cause the test program
--   to abort after completing the failed test.)
--   
--   Note that the <tt><i>g_assert_not_reached()</i></tt> and
--   <tt><i>g_assert()</i></tt> macros are not affected by this.
--   
--   This function can only be called after <tt><i>g_test_init()</i></tt>.
--   
--   <i>Since: 2.38</i>
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.
--   
--   <i>Since: 2.38</i>
testSkip :: (HasCallStack, MonadIO m) => Maybe Text -> m ()

-- | Returns <a>True</a> (after <tt><i>g_test_init()</i></tt> has been
--   called) if the test program is running under
--   <a>testTrapSubprocess</a>.
--   
--   <i>Since: 2.38</i>
testSubprocess :: (HasCallStack, MonadIO m) => m Bool

-- | Set the summary for a test, which describes what the test checks, and
--   how it goes about checking it. 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.
--   
--   This should be called at the top of a test function.
--   
--   For example:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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.");
--   
--     …
--   }
--   </pre>
--   
--   <i>Since: 2.62</i>
testSummary :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Get the number of seconds since the last start of the timer with
--   <a>testTimerStart</a>.
--   
--   <i>Since: 2.16</i>
testTimerElapsed :: (HasCallStack, MonadIO m) => m Double

-- | Report the last result of <a>testTimerElapsed</a>.
--   
--   <i>Since: 2.16</i>
testTimerLast :: (HasCallStack, MonadIO m) => m Double

-- | Start a timing test. Call <a>testTimerElapsed</a> when the task is
--   supposed to be done. Call this function again to restart the timer.
--   
--   <i>Since: 2.16</i>
testTimerStart :: (HasCallStack, MonadIO m) => m ()

-- | <i>No description available in the introspection data.</i>
testTrapAssertions :: (HasCallStack, MonadIO m) => Text -> Text -> Int32 -> Text -> Word64 -> Text -> m ()

-- | Fork the current test program to execute a test case that might not
--   return or that might abort.
--   
--   If <i><tt>usecTimeout</tt></i> is non-0, the forked test case is
--   aborted and considered failing if its run time exceeds it.
--   
--   The forking behavior can be configured with the <a>TestTrapFlags</a>
--   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.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static void
--   test_fork_patterns (void)
--   {
--     if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
--       {
--         g_print ("some stdout text: somagic17\n");
--         g_printerr ("some stderr text: semagic43\n");
--         exit (0); // successful test run
--       }
--     g_test_trap_assert_passed ();
--     g_test_trap_assert_stdout ("*somagic17*");
--     g_test_trap_assert_stderr ("*semagic43*");
--   }
--   </pre>
--   
--   <i>Since: 2.16</i>

-- | <i>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
--   <a>testTrapSubprocess</a> instead.</i>
testTrapFork :: (HasCallStack, MonadIO m) => Word64 -> [TestTrapFlags] -> m Bool

-- | Check the result of the last <a>testTrapSubprocess</a> call.
--   
--   <i>Since: 2.16</i>
testTrapHasPassed :: (HasCallStack, MonadIO m) => m Bool

-- | Check the result of the last <a>testTrapSubprocess</a> call.
--   
--   <i>Since: 2.16</i>
testTrapReachedTimeout :: (HasCallStack, MonadIO m) => m Bool

-- | Respawns the test program to run only <i><tt>testPath</tt></i> in a
--   subprocess.
--   
--   This is equivalent to calling <a>testTrapSubprocessWithEnvp</a> with
--   <tt>envp</tt> set to <a>Nothing</a>. See the documentation for that
--   function for full details.
--   
--   <i>Since: 2.38</i>
testTrapSubprocess :: (HasCallStack, MonadIO m) => Maybe Text -> Word64 -> [TestSubprocessFlags] -> m ()

-- | Respawns the test program to run only <i><tt>testPath</tt></i> in a
--   subprocess with the given <i><tt>envp</tt></i> environment.
--   
--   This can be used for a test case that might not return, or that might
--   abort.
--   
--   If <i><tt>testPath</tt></i> is <a>Nothing</a> then the same test is
--   re-run in a subprocess. You can use <a>testSubprocess</a> to determine
--   whether the test is in a subprocess or not.
--   
--   <i><tt>testPath</tt></i> can also be the name of the parent test,
--   followed by "<tt>/subprocess/</tt>" and then a name for the specific
--   subtest (or just ending with "<tt>/subprocess</tt>" if the test only
--   has one child test); tests with names of this form will automatically
--   be skipped in the parent process.
--   
--   If <i><tt>envp</tt></i> is <a>Nothing</a>, the parent process’
--   environment will be inherited.
--   
--   If <i><tt>usecTimeout</tt></i> is non-0, the test subprocess is
--   aborted and considered failing if its run time exceeds it.
--   
--   The subprocess behavior can be configured with the
--   <a>TestSubprocessFlags</a> flags.
--   
--   You can use methods such as
--   <tt><i>g_test_trap_assert_passed()</i></tt>,
--   <tt><i>g_test_trap_assert_failed()</i></tt>, and
--   <tt><i>g_test_trap_assert_stderr()</i></tt> to check the results of
--   the subprocess. (But note that
--   <tt><i>g_test_trap_assert_stdout()</i></tt> and
--   <tt><i>g_test_trap_assert_stderr()</i></tt> cannot be used if
--   <i><tt>testFlags</tt></i> specifies that the child should inherit the
--   parent stdout/stderr.)
--   
--   If your <tt>main ()</tt> needs to behave differently in the
--   subprocess, you can call <a>testSubprocess</a> (after calling
--   <tt><i>g_test_init()</i></tt>) to see whether you are in a subprocess.
--   
--   Internally, this function tracks the child process using
--   <a>childWatchSourceNew</a>, so your process must not ignore
--   <tt>SIGCHLD</tt>, and must not attempt to watch or wait for the child
--   process via another mechanism.
--   
--   The following example tests that calling
--   <tt>my_object_new(1000000)</tt> will abort with an error message.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   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_autoptr(GStrv) envp = g_get_environ ();
--     envp = g_environ_setenv (g_steal_pointer (&amp;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 (&amp;argc, &amp;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 ();
--   }
--   </pre>
--   
--   <i>Since: 2.80</i>
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
--   <a>False</a>, at which point the timeout is automatically destroyed
--   and the function will not be called again. The <i><tt>notify</tt></i>
--   function is called when the timeout is destroyed. The first call to
--   the function will be at the end of the first <i><tt>interval</tt></i>.
--   
--   Note that timeout functions may be delayed, due to the processing of
--   other event sources. Thus they should not be relied on for precise
--   timing. After each call to the timeout function, the time of the next
--   timeout is recalculated based on the current time and the given
--   interval (it does not try to 'catch up' time lost in delays).
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   <i><tt>data</tt></i>.
--   
--   This internally creates a main loop source using
--   <a>timeoutSourceNew</a> and attaches it to the global
--   <a>MainContext</a> using <a>sourceAttach</a>, 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 <a>getMonotonicTime</a>.
timeoutAdd :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

-- | Sets a function to be called at regular intervals, with
--   <i><tt>priority</tt></i>.
--   
--   The function is called repeatedly until it returns
--   <a>SOURCE_REMOVE</a> or <a>False</a>, at which point the timeout is
--   automatically destroyed and the function will not be called again.
--   
--   Unlike <tt><i>g_timeout_add()</i></tt>, 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 <i><tt>interval</tt></i> 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
--   <i><tt>interval</tt></i>
--   
--   See [memory management of sources][mainloop-memory-management] for
--   details on how to handle the return value and memory management of
--   <i><tt>data</tt></i>.
--   
--   If you want timing more precise than whole seconds, use
--   <tt><i>g_timeout_add()</i></tt> 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 <tt><i>g_timeout_add_seconds()</i></tt> is preferred
--   over <tt><i>g_timeout_add()</i></tt>.
--   
--   This internally creates a main loop source using
--   <a>timeoutSourceNewSeconds</a> and attaches it to the main loop
--   context using <a>sourceAttach</a>. 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 <a>getMonotonicTime</a>.
--   
--   <i>Since: 2.14</i>
timeoutAddSeconds :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

-- | Creates a new timeout source.
--   
--   The source will not initially be associated with any
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   before it will be executed.
--   
--   The interval given is in terms of monotonic time, not wall clock time.
--   See <a>getMonotonicTime</a>.
timeoutSourceNew :: (HasCallStack, MonadIO m) => Word32 -> m Source

-- | Creates a new timeout source.
--   
--   The source will not initially be associated with any
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   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 <a>getMonotonicTime</a>.
--   
--   <i>Since: 2.14</i>
timeoutSourceNewSeconds :: (HasCallStack, MonadIO m) => Word32 -> m Source

-- | Attempts to allocate <i><tt>nBytes</tt></i>, and returns
--   <a>Nothing</a> on failure. Contrast with <a>malloc</a>, which aborts
--   the program on failure.
tryMalloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | Attempts to allocate <i><tt>nBytes</tt></i>, initialized to 0's, and
--   returns <a>Nothing</a> on failure. Contrast with <a>malloc0</a>, which
--   aborts the program on failure.
--   
--   <i>Since: 2.8</i>
tryMalloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())

-- | This function is similar to <a>tryMalloc0</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   <i>Since: 2.24</i>
tryMalloc0N :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())

-- | This function is similar to <a>tryMalloc</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   <i>Since: 2.24</i>
tryMallocN :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())

-- | Attempts to realloc <i><tt>mem</tt></i> to a new size,
--   <i><tt>nBytes</tt></i>, and returns <a>Nothing</a> on failure.
--   Contrast with <a>realloc</a>, which aborts the program on failure.
--   
--   If <i><tt>mem</tt></i> is <a>Nothing</a>, behaves the same as
--   <a>tryMalloc</a>.
tryRealloc :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())

-- | This function is similar to <a>tryRealloc</a>, allocating
--   (<i><tt>nBlocks</tt></i> * <i><tt>nBlockBytes</tt></i>) bytes, but
--   care is taken to detect possible overflow during multiplication.
--   
--   <i>Since: 2.24</i>
tryReallocN :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> CSize -> m (Ptr ())

-- | Convert a string from UCS-4 to UTF-16. A 0 character 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 0 byte.
ucs4ToUtf8 :: (HasCallStack, MonadIO m) => [Char] -> m (Text, CLong, CLong)

-- | Determines the break type of <i><tt>c</tt></i>. <i><tt>c</tt></i>
--   should be a Unicode character (to derive a character from UTF-8
--   encoded text, use <a>utf8GetChar</a>). 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 <tt><i>pango_break()</i></tt> instead of caring about break
--   types yourself.
unicharBreakType :: (HasCallStack, MonadIO m) => Char -> m UnicodeBreakType

-- | Determines the canonical combining class of a Unicode character.
--   
--   <i>Since: 2.14</i>
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 <a>unicharDecompose</a>. No composition can
--   have either of <i><tt>a</tt></i> or <i><tt>b</tt></i> 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
--   &lt;<i><tt>a</tt></i>,<i><tt>b</tt></i>&gt;. See the Unicode Standard
--   for the definition of Primary Composite.
--   
--   If <i><tt>a</tt></i> and <i><tt>b</tt></i> do not compose a new
--   character, <i><tt>ch</tt></i> is set to zero.
--   
--   See <a>UAX#15</a> for details.
--   
--   <i>Since: 2.30</i>
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 *<i><tt>b</tt></i> will be set to
--   zero.
--   
--   If <i><tt>ch</tt></i> is not decomposable, *<i><tt>a</tt></i> is set
--   to <i><tt>ch</tt></i> and *<i><tt>b</tt></i> is set to zero.
--   
--   Note that the way Unicode decomposition pairs are defined, it is
--   guaranteed that <i><tt>b</tt></i> would not decompose further, but
--   <i><tt>a</tt></i> may itself decompose. To get the full canonical
--   decomposition for <i><tt>ch</tt></i>, one would need to recursively
--   call this function on <i><tt>a</tt></i>. Or use
--   <tt><i>g_unichar_fully_decompose()</i></tt>.
--   
--   See <a>UAX#15</a> for details.
--   
--   <i>Since: 2.30</i>
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 <i><tt>ch</tt></i> has the Unicode mirrored property and there is
--   another unicode character that typically has a glyph that is the
--   mirror image of <i><tt>ch</tt></i>'s glyph and
--   <i><tt>mirroredCh</tt></i> is set, it puts that character in the
--   address pointed to by <i><tt>mirroredCh</tt></i>. Otherwise the
--   original character is put.
--   
--   <i>Since: 2.4</i>
unicharGetMirrorChar :: (HasCallStack, MonadIO m) => Char -> m (Bool, Char)

-- | Looks up the <a>UnicodeScript</a> for a particular character (as
--   defined by Unicode Standard Annex #24). No check is made for
--   <i><tt>ch</tt></i> being a valid Unicode character; if you pass in
--   invalid character, the result is undefined.
--   
--   This function is equivalent to
--   <tt><i>pango_script_for_unichar()</i></tt> and the two are
--   interchangeable.
--   
--   <i>Since: 2.14</i>
unicharGetScript :: (HasCallStack, MonadIO m) => Char -> m UnicodeScript

-- | Determines whether a character is alphanumeric. Given some UTF-8 text,
--   obtain a character value with <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
unicharIsdigit :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is printable and not a space (returns
--   <a>False</a> for control characters, format characters, and spaces).
--   <a>unicharIsprint</a> is similar, but returns <a>True</a> for spaces.
--   Given some UTF-8 text, obtain a character value with
--   <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
--   
--   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.
--   
--   <i>Since: 2.14</i>
unicharIsmark :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines whether a character is printable. Unlike
--   <a>unicharIsgraph</a>, returns <a>True</a> for spaces. Given some
--   UTF-8 text, obtain a character value with <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
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 <a>utf8GetChar</a>.
--   
--   (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
--   <a>unicharIswide</a>, then it is also reported wide with this
--   function, but the converse is not necessarily true. See the <a>Unicode
--   Standard Annex #11</a> for details.
--   
--   If a character passes the <a>unicharIswide</a> test then it will also
--   pass this test, but not the other way around. Note that some
--   characters may pass both this test and <a>unicharIszerowidth</a>.
--   
--   <i>Since: 2.12</i>
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 <a>True</a> 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 <a>unicharIswide</a> or
--   <a>unicharIswideCjk</a> 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.
--   
--   <i>Since: 2.14</i>
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 <i><tt>ch</tt></i> is a valid Unicode character. Some
--   possible integer values of <i><tt>ch</tt></i> will not be valid. 0 is
--   considered a valid character, though it's normally a string
--   terminator.
unicharValidate :: (HasCallStack, MonadIO m) => Char -> m Bool

-- | Determines the numeric value of a character as a hexadecimal digit.
unicharXdigitValue :: (HasCallStack, MonadIO m) => Char -> m Int32

-- | Computes the canonical decomposition of a Unicode character.

-- | <i>Deprecated: (Since version 2.30)Use the more flexible
--   <tt><i>g_unichar_fully_decompose()</i></tt> instead.</i>
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 ()

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

-- | Sets a function to be called when the IO condition, as specified by
--   <i><tt>condition</tt></i> becomes true for <i><tt>fd</tt></i>.
--   
--   This is the same as <tt><i>g_unix_fd_add()</i></tt>, except that it
--   allows you to specify a non-default priority and a provide a
--   <a>DestroyNotify</a> for <i><tt>userData</tt></i>.
--   
--   <i>Since: 2.36</i>
unixFdAddFull :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> [IOCondition] -> UnixFDSourceFunc -> m Word32

-- | Creates a <a>Source</a> to watch for a particular I/O condition on a
--   file descriptor.
--   
--   The source will never close the <i><tt>fd</tt></i> — you must do it
--   yourself.
--   
--   Any callback attached to the returned <a>Source</a> must have type
--   <a>UnixFDSourceFunc</a>.
--   
--   <i>Since: 2.36</i>
unixFdSourceNew :: (HasCallStack, MonadIO m) => Int32 -> [IOCondition] -> m Source

-- | Get the <tt>passwd</tt> file entry for the given
--   <i><tt>userName</tt></i> using <tt>getpwnam_r()</tt>. This can fail if
--   the given <i><tt>userName</tt></i> doesn’t exist.
--   
--   The returned <tt>struct passwd</tt> has been allocated using
--   <a>malloc</a> and should be freed using <a>free</a>. The strings
--   referenced by the returned struct are included in the same allocation,
--   so are valid until the <tt>struct passwd</tt> is freed.
--   
--   This function is safe to call from multiple threads concurrently.
--   
--   You will need to include <tt>pwd.h</tt> to get the definition of
--   <tt>struct passwd</tt>.
--   
--   <i>Since: 2.64</i>
unixGetPasswdEntry :: (HasCallStack, MonadIO m) => Text -> m (Ptr ())

-- | Similar to the UNIX <tt><i>pipe()</i></tt> call, but on modern systems
--   like Linux uses the <tt><i>pipe2()</i></tt> system call, which
--   atomically creates a pipe with the configured flags.
--   
--   As of GLib 2.78, the supported flags are
--   <tt>O_CLOEXEC</tt>/<tt>FD_CLOEXEC</tt> (see below) and
--   <tt>O_NONBLOCK</tt>. Prior to GLib 2.78, only <tt>FD_CLOEXEC</tt> was
--   supported — if you wanted to configure <tt>O_NONBLOCK</tt> then that
--   had to be done separately with <tt>fcntl()</tt>.
--   
--   Since GLib 2.80, the constants <a>UnixPipeEndRead</a> and
--   <a>UnixPipeEndWrite</a> can be used as mnemonic indexes in
--   <i><tt>fds</tt></i>.
--   
--   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 <tt>O_CLOEXEC</tt> in, rather
--   than <tt>FD_CLOEXEC</tt>, as that matches the underlying
--   <tt>pipe()</tt> API more closely. Prior to 2.78, only
--   <tt>FD_CLOEXEC</tt> was supported. Support for <tt>FD_CLOEXEC</tt> may
--   be deprecated and removed in future.
--   
--   <i>Since: 2.30</i>
unixOpenPipe :: (HasCallStack, MonadIO m) => [Int32] -> Int32 -> m ()

-- | Control the non-blocking state of the given file descriptor, according
--   to <i><tt>nonblock</tt></i>. On most systems this uses
--   <tt><i>O_NONBLOCK</i></tt>, but on some older ones may use
--   <tt><i>O_NDELAY</i></tt>.
--   
--   <i>Since: 2.30</i>
unixSetFdNonblocking :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m ()

-- | A convenience function for <a>unixSignalSourceNew</a>, which attaches
--   to the default <a>MainContext</a>. You can remove the watch using
--   <a>sourceRemove</a>.
--   
--   <i>Since: 2.30</i>
unixSignalAdd :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> SourceFunc -> m Word32

-- | Create a <a>Source</a> that will be dispatched upon delivery of the
--   UNIX signal <i><tt>signum</tt></i>. In GLib versions before 2.36, only
--   <tt>SIGHUP</tt>, <tt>SIGINT</tt>, <tt>SIGTERM</tt> can be monitored.
--   In GLib 2.36, <tt>SIGUSR1</tt> and <tt>SIGUSR2</tt> were added. In
--   GLib 2.54, <tt>SIGWINCH</tt> was added.
--   
--   Note that unlike the UNIX default, all sources which have created a
--   watch will be dispatched, regardless of which underlying thread
--   invoked <a>unixSignalSourceNew</a>.
--   
--   For example, an effective use of this function is to handle
--   <tt>SIGTERM</tt> cleanly; flushing any outstanding files, and then
--   calling <a>mainLoopQuit</a>. It is not safe to do any of this from a
--   regular UNIX signal handler; such a handler may be invoked while
--   <tt><i>malloc()</i></tt> 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 <tt><i>sigprocmask()</i></tt> is not defined.
--   
--   The source will not initially be associated with any
--   <a>MainContext</a> and must be added to one with <a>sourceAttach</a>
--   before it will be executed.
--   
--   <i>Since: 2.30</i>
unixSignalSourceNew :: (HasCallStack, MonadIO m) => Int32 -> m Source

-- | A wrapper for the POSIX <tt><i>unlink()</i></tt> function. The
--   <tt><i>unlink()</i></tt> 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
--   <tt><i>unlink()</i></tt>. Note that on Windows, it is in general not
--   possible to delete files that are open to some process, or mapped into
--   memory.
--   
--   <i>Since: 2.6</i>
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 <a>unsetenv</a> while another thread is calling
--   <tt><i>getenv()</i></tt>. (And note that many functions, such as
--   <tt><i>gettext()</i></tt>, call <tt><i>getenv()</i></tt> 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
--   <a>getEnviron</a> to get an environment array, modify that with
--   <a>environSetenv</a> and <a>environUnsetenv</a>, and then pass that
--   array directly to <tt><i>execvpe()</i></tt>, <a>spawnAsync</a>, or the
--   like.
--   
--   <i>Since: 2.4</i>
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
--   <a>USEC_PER_SEC</a> macro). <a>usleep</a> 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 0 byte.
--   
--   Note that the input is expected to be already in native endianness, an
--   initial byte-order-mark character is not handled specially.
--   <a>convert</a> 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 e.g. 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 <a>utf8Casefold</a> on
--   other strings.
--   
--   Note that calling <a>utf8Casefold</a> followed by <a>utf8Collate</a>
--   is only an approximation to the correct linguistic case insensitive
--   ordering, though it is a fairly good one. Getting this exactly right
--   would require a more sophisticated collation function that takes case
--   sensitivity into account. GLib does not currently provide such a
--   function.
utf8Casefold :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Compares two strings for ordering using the linguistically correct
--   rules for the [current locale][setlocale]. When sorting a large number
--   of strings, it will be significantly faster to obtain collation keys
--   with <a>utf8CollateKey</a> and compare the keys with
--   <tt><i>strcmp()</i></tt> 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
--   <tt><i>strcmp()</i></tt>.
--   
--   The results of comparing the collation keys of two strings with
--   <tt><i>strcmp()</i></tt> will always be the same as comparing the two
--   original keys with <a>utf8Collate</a>.
--   
--   Note that this function depends on the [current locale][setlocale].
utf8CollateKey :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Converts a string into a collation key that can be compared with other
--   collation keys produced by the same function using
--   <tt><i>strcmp()</i></tt>.
--   
--   In order to sort filenames correctly, this function treats the dot '.'
--   as a special case. Most dictionary orderings seem to consider it
--   insignificant, thus producing the ordering "event.c"
--   "eventgenerator.c" "event.h" instead of "event.c" "event.h"
--   "eventgenerator.c". Also, we would like to treat numbers intelligently
--   so that "file1" "file10" "file5" is sorted as "file1" "file5"
--   "file10".
--   
--   Note that this function depends on the [current locale][setlocale].
--   
--   <i>Since: 2.8</i>
utf8CollateKeyForFilename :: (HasCallStack, MonadIO m) => Text -> Int64 -> m Text

-- | Finds the start of the next UTF-8 character in the string after
--   <i><tt>p</tt></i>.
--   
--   <i><tt>p</tt></i> 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 <i><tt>end</tt></i> is <a>Nothing</a>, the return value will never
--   be <a>Nothing</a>: if the end of the string is reached, a pointer to
--   the terminating nul byte is returned. If <i><tt>end</tt></i> is
--   non-<a>Nothing</a>, the return value will be <a>Nothing</a> if the end
--   of the string is reached.
utf8FindNextChar :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m (Maybe Text)

-- | Given a position <i><tt>p</tt></i> with a UTF-8 encoded string
--   <i><tt>str</tt></i>, find the start of the previous UTF-8 character
--   starting before <i><tt>p</tt></i>. Returns <a>Nothing</a> if no UTF-8
--   characters are present in <i><tt>str</tt></i> before
--   <i><tt>p</tt></i>.
--   
--   <i><tt>p</tt></i> 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 <i><tt>p</tt></i> 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
--   <a>utf8GetCharValidated</a> 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 <a>utf8GetCharValidated</a> returns (gunichar)-2 if
--   <i><tt>maxLen</tt></i> 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.
--   
--   <i>Since: 2.52</i>
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 <a>Nothing</a> is returned. You
--   should generally call <a>utf8Normalize</a> before comparing two
--   Unicode strings.
--   
--   The normalization mode <a>NormalizeModeDefault</a> only standardizes
--   differences that do not affect the text content, such as the
--   above-mentioned accent representation. <a>NormalizeModeAll</a> 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.
--   
--   <a>NormalizeModeDefaultCompose</a> and <a>NormalizeModeAllCompose</a>
--   are like <a>NormalizeModeDefault</a> and <a>NormalizeModeAll</a>, 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
--   <i><tt>offset</tt></i> to step backwards. It is usually worth stepping
--   backwards from the end instead of forwards if <i><tt>offset</tt></i>
--   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
--   <i><tt>str</tt></i>. Therefore you should be sure that
--   <i><tt>offset</tt></i> is within string boundaries before calling that
--   function. Call <a>utf8Strlen</a> 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 <i><tt>pos</tt></i> to be before
--   <i><tt>str</tt></i>, 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
--   <i><tt>p</tt></i>.
--   
--   <i><tt>p</tt></i> 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
--   <i><tt>p</tt></i> might be the first character of the string, you must
--   use <a>utf8FindPrevChar</a> 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 <i><tt>len</tt></i>
--   bytes. If <i><tt>len</tt></i> 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 <i><tt>max</tt></i>'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 <tt><i>strncpy()</i></tt> function, but copies a
--   given number of characters instead of a given number of bytes. The
--   <i><tt>src</tt></i> string must be valid UTF-8 encoded text. (Use
--   <a>utf8Validate</a> on all text before trying to use UTF-8 utility
--   functions with it.)
--   
--   Note you must ensure <i><tt>dest</tt></i> is at least 4 *
--   <i><tt>n</tt></i> + 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 <i><tt>len</tt></i>
--   bytes. If <i><tt>len</tt></i> is -1, allow unbounded search.
utf8Strrchr :: (HasCallStack, MonadIO m) => Text -> Int64 -> Char -> m (Maybe Text)

-- | Reverses a UTF-8 string. <i><tt>str</tt></i> must be valid UTF-8
--   encoded text. (Use <a>utf8Validate</a> 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 <a>strreverse</a>, this function returns
--   newly-allocated memory, which should be freed with <a>free</a> when no
--   longer needed.
--   
--   <i>Since: 2.2</i>
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 <i><tt>endPos</tt></i> - <i><tt>startPos</tt></i> characters.
--   
--   Since GLib 2.72, <tt>-1</tt> can be passed to <i><tt>endPos</tt></i>
--   to indicate the end of the string.
--   
--   <i>Since: 2.30</i>
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 0 character 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 <a>utf8ToUcs4</a> but does no error checking on the input. A
--   trailing 0 character 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 0 character 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
--   <i><tt>truncateLength</tt></i> characters at the beginning and half at
--   the end.
--   
--   If <i><tt>string</tt></i> is already short enough, this returns a copy
--   of <i><tt>string</tt></i>. If <i><tt>truncateLength</tt></i> is
--   <tt>0</tt>, an empty string is returned.
--   
--   <i>Since: 2.78</i>
utf8TruncateMiddle :: (HasCallStack, MonadIO m) => Text -> CSize -> m Text

-- | Validates UTF-8 encoded text. <i><tt>str</tt></i> is the text to
--   validate; if <i><tt>str</tt></i> is nul-terminated, then
--   <i><tt>maxLen</tt></i> can be -1, otherwise <i><tt>maxLen</tt></i>
--   should be the number of bytes to validate. If <i><tt>end</tt></i> is
--   non-<a>Nothing</a>, then the end of the valid range will be stored
--   there (i.e. the start of the first invalid character if some bytes
--   were invalid, or the end of the text being validated otherwise).
--   
--   Note that <a>utf8Validate</a> returns <a>False</a> if
--   <i><tt>maxLen</tt></i> is positive and any of the
--   <i><tt>maxLen</tt></i> bytes are nul.
--   
--   Returns <a>True</a> if all of <i><tt>str</tt></i> 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 <a>utf8Validate</a> before
--   doing anything else with it.
utf8Validate :: (HasCallStack, MonadIO m) => ByteString -> m (Bool, Text)

-- | Validates UTF-8 encoded text.
--   
--   As with <a>utf8Validate</a>, but <i><tt>maxLen</tt></i> must be set,
--   and hence this function will always return <a>False</a> if any of the
--   bytes of <i><tt>str</tt></i> are nul.
--   
--   <i>Since: 2.60</i>
utf8ValidateLen :: (HasCallStack, MonadIO m) => ByteString -> m (Bool, Text)

-- | A wrapper for the POSIX <tt><i>utime()</i></tt> function. The
--   <tt><i>utime()</i></tt> function sets the access and modification
--   timestamps of a file.
--   
--   See your C library manual for more details about how
--   <tt><i>utime()</i></tt> works on your system.
--   
--   <i>Since: 2.18</i>
utime :: (HasCallStack, MonadIO m) => [Char] -> Ptr () -> m Int32

-- | Parses the string <i><tt>str</tt></i> and verify if it is a UUID.
--   
--   The function accepts the following syntax:
--   
--   <ul>
--   <li>simple forms (e.g.
--   <tt>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</tt>)</li>
--   </ul>
--   
--   Note that hyphens are required within the UUID string itself, as per
--   the aforementioned RFC.
--   
--   <i>Since: 2.52</i>
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 <a>Rand</a>, so must not be used for
--   cryptographic purposes such as key generation, nonces, salts or
--   one-time pads.
--   
--   <i>Since: 2.52</i>
uuidStringRandom :: (HasCallStack, MonadIO m) => m Text

-- | <i>No description available in the introspection data.</i>
variantGetGtype :: (HasCallStack, MonadIO m) => m GType


module GI.GLib
