Up: cl-cffi-gtk4 API documentation

Package glib

GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on. It works on many UNIX-like platforms, as well as Windows and OS X. GLib is released under the GNU Library General Public License (GNU LGPL).

This is the API documentation of a Lisp binding to the library GLib. Only a small part of GLib is implemented in Lisp which is necessary to implement GTK in Lisp.

About This Package

Version Information
Miscellaneous
The Main Event Loop
GBytes
Command line option parser
Key-value file parser
GVariantType
GVariant

Version Information

The major version number of the GLib C library against which the Lisp binding is running. ...

The minor version number of the GLib C library against which the Lisp binding is running. ...

The micro version number of the GLib C library against which the Lisp binding is running. ...

Checks if the GLib C library that is used is compatible with the given Lisp binding. ...

Provides information about the version of the loaded GLIB library against which the Lisp binding is running. ...

Miscellaneous


Introduction to miscellaneous

Documentation of several type definitions and functions, which are needed for the implementation of the GTK library. Only a small part of the GLib library is implemented.

String Utility Functions

The g:strv-t type specifier represents and performs automatic conversion between a list of Lisp strings and an array of C strings of the CFFI :string type. ...


Doubly-Linked Lists

The g:list-t type specifier represents a C doubly linked list with elements of the GList structure. ...


Singly-Linked Lists

The g:slist-t type specifier represents a C singly linked list with elements of the GSList structure. ...


Quarks

Quarks are associations between strings and integer identifiers. ...


GDateTime

The g:date-time type specifier represents the C GDateTime type which represents a date and time. ...


Unicode manipulation

The g:unichar type specifier represents the C gunichar type which can hold any UCS-4 character code. ...


GError

The glib:error structure contains information about an error that has occurred. ...


Memory Allocation

Allocates nbytes bytes of memory. ...

Frees the memory pointed to by the mem foreign pointer. ...


Utility Functions

Accessor of a human readable name for the application. ...

Accessor of the name of the program. ...

The Main Event Loop


GMainLoop

Use this for high priority event sources. ...

Use this for default priority event sources. ...

Use this for high priority idle functions. ...

Use this for default priority idle functions. ...

Use this for very low priority background tasks. ...

Use this constant as the return value of a g:source-func callback function to leave the g:source instance in the main loop. ...

Use this constant as the return value of a g:source-func callback function to remove the g:source instance from the main loop. ...

The main event loop manages all the available sources of events for GLib and GTK applications. These events can come from any number of different types of sources such as file descriptors (plain files, pipes or sockets) and timeouts. ...

Creates a new main loop. ...

Increases the reference count on a main loop by one. ...

Decreases the reference count on a main loop by one. ...

Runs a main loop until the g:main-loop-quit function is called on the main loop. ...

Stops a main loop from running. ...

Checks to see if the main loop is currently being run via the g:main-loop-run function. ...

Returns the context of the main loop. ...


GMainContext

The g:main-context structure is an opaque data type representing a set of sources to be handled in a main loop. ...

Creates a new context. ...

Increases the reference count on a context by one. ...

Decreases the reference count on a context by one. ...

Returns the global default context. ...

Runs a single iteration for the given main loop. ...

Checks if any sources have pending events for the given main context. ...

Finds a source given a pair of context and ID. ...

Determines whether this thread holds the (recursive) ownership of this context. ...


GSource

The g:source structure is an opaque data type representing an event source. ...

Creates a new timeout source. ...

Creates a new timeout source. ...

Sets a function to be called at regular intervals, with priority. ...

Sets a function to be called at regular intervals with priority. ...

Creates a new idle source. ...

Adds a function to be called whenever there are no higher priority events pending to the default main loop. ...

Adds a source to a context so that it will be executed within that context. ...

Removes a source from its context, if any, and mark it as destroyed. ...

Returns whether the source has been destroyed. ...

The g:source-priority function gets the priority of the source. ...

The g:source-can-recurse function checks whether the source is allowed to be called recursively. ...

Returns the numeric ID for a particular source. ...

The g:source-name function gets a name for the source, used in debugging and profiling. ...

Sets the name of a source using its ID. ...

Gets the context with which the source is associated. ...

Specifies the type of callback function passed to the g:timeout-add, and g:idle-add functions. ...

Sets the callback function for a source. ...

Adds child to source as a "polled" source. ...

Detaches child from source and destroys it. ...

Gets the time to be used when checking this source. ...

The g:source-ready-time function gets the "ready time" of the source. ...

Removes the source with the given ID from the default main context. ...

GBytes

The g:bytes structure is a simple refcounted data type representing an immutable sequence of zero or more bytes from an unspecified origin. ...

Creates a new g:bytes instance from data. ...

Get the byte data in the g:bytes instance. ...

Get the size of the byte data in the g:bytes instance. ...

Command line option parser

The g:option-arg enumeration determines which type of extra argument the options expect to find. ...

Flags which modify individual options. ...

The GOption command line parser is intended to be a simpler replacement for the popt library. ...

The g:with-option-context macro allocates a new g:option-context instance, initializes the option context with the optional parameter value and executes the body that uses the context. ...

Creates a new option context. ...

Frees context and all the groups which have been added to it. ...

The g:option-context-summary function returns the summary. ...

The g:option-context-description function returns the description. ...

The type of functions which are used to translate user visible strings, for --help output. ...

Sets the function which is used to translate the user visible strings of the option context, for --help output. ...

A convenience function to use GNU gettext for translating user visible strings. ...

Parses the command line arguments, recognizing options which have been added to the option context. ...

Parses the command line arguments. ...

Enables or disables automatic generation of --help output. ...

The g:option-context-ignore-unknown-options function returns whether unknown options are ignored or not. ...

Returns a formatted, translated help text for the given option context. ...

The g:option-context-strict-posix function returns whether strict POSIX code is enabled. ...

A convenience function which creates a main group if it does not exist, adds the option entries to it and sets the translation domain. ...

Adds a g:option-group instance to the option context, so that parsing with the option context will recognize the options in the group. ...

The g:option-context-main-group function returns the main group of context. ...

The g:option-group structure defines the options in a single group. ...

The g:with-option-group macro allocates a new g:option-group instance, initializes the option group with the given arguments and executes the body that uses the option group. ...

Creates a new g:option-group instance. ...

Increments the reference count of group by one. ...

Decrements the reference count of group by one. ...

Adds the options specified in entries to group. ...

Sets the function which is used to translate user visible strings, for --help output. ...

A convenience function to use GNU gettext for translating user visible strings. ...

Key-value file parser

Flags which influence the parsing of key values. ...

The g:key-file structure lets you parse, edit or create files containing groups of key-value pairs, which we call key files for lack of a better name. ...

The g:with-key-file macro allocates a new g:key-file instance and executes the body that uses the key file. ...

The g:with-key-file-from-file macro allocates a new g:key-file instance and executes the body that uses the key file. ...

The g:with-key-file-from-data macro allocates a new g:key-file instance and executes the body that uses the key file. ...

Creates a new empty g:key-file instance. ...

Clears all keys and groups from keyfile, and decreases the reference count by 1. ...

Increases the reference count of keyfile. ...

Decreases the reference count of keyfile by 1. ...

Sets the character which is used to separate values in lists. ...

Loads a key file into a g:key-file instance. ...

Loads a key file from memory into a g:key-file instance. ...

Loads a key file from the data in the g:bytes instance. ...

This function looks for a key file named file in the paths returned from the g_get_user_data_dir() and g_get_system_data_dirs() functions, loads the file into keyfile and returns the full path of the file. ...

This function looks for a key file named file in the paths specified in dirs, loads the file into keyfile and returns the full path of the file. ...

Outputs the key file as a string. ...

Writes the contents of the key file to a file. ...

Returns the name of the start group of the key file. ...

Returns all groups in the key file loaded with keyfile. ...

Returns all keys for the group name. ...

Looks whether the key file has the group group. ...

Looks whether the key file has the key key in the group group. ...

The g:key-file-value function returns the raw value associated with key under group. ...

The g:key-file-string function returns the string value associated with key under group. ...

The g:key-file-locale-string function returns the value associated with key under group translated in the given locale if available. ...

Returns the actual locale which the result of the g:key-file-locale-string or g:key-file-locale-string-list function came from. ...

The g:key-file-boolean function returns the value associated with key under group as a boolean. ...

The g:key-file-integer function returns the value associated with key under group as an integer. ...

The g:key-file-int64 function returns the value associated with key under group as an integer. ...

The g:key-file-uint64 function returns the value associated with key under group as an integer. ...

The g:key-file-double function returns the value associated with key under group as a double float. ...

The g:key-file-string-list function returns the values associated with key under group. ...

The g:key-file-locale-string-list function returns the values associated with key under group translated in the given locale if available. ...

The g:key-file-boolean-list function returns the values associated with key under group as boolean values. ...

The g:key-file-integer-list function returns the values associated with key under group as integers. ...

The g:key-file-double-list function returns the values associated with key under group as double floats. ...

The g:key-file-comment retrieves a comment above key from group. ...

Removes the specified group from the key file. ...

Removes the specified key from the key file. ...

Removes a comment above key from group. ...

GVariantType

The GVariant type system is based, in large part, on the D-Bus type system, with two major changes and some minor lifting of restrictions. ...

Creates a new variant type corresponding to the type string given by string. ...

Makes a copy of a variant type. ...

Checks if string is a valid variant type string. ...

Returns a newly allocated copy of the variant type string corresponding to vtype. ...

Determines if the given variant type is definite, that is not indefinite. ...

Determines if the given variant type is a container type. ...

Determines if the given variant type is a basic type. ...

Determines if the given variant type is a maybe type. ...

Determines if the given variant type is an array type. ...

Determines if the given variant type is a tuple type. ...

Determines if the given variant type is a dictionary entry type. ...

Determines if the given variant type is the variant type. ...

The has value of the given variant type. ...

Compares two variant types for equality. ...

Checks if vtype is a subtype of supertype. ...

Constructs the variant type corresponding to a maybe instance containing vtype or nothing. ...

Constructs the variant type corresponding to an array of elements of the vtype type. ...

Constructs a new tuple type, from items. ...

Constructs the variant type corresponding to a dictionary entry with a key of key type and a value of value type. ...

Determines the element type of an array or maybe type. ...

Determines the number of items contained in a tuple or dictionary entry vtype. ...

Determines the first item type of a tuple or dictionary entry type. ...

Determines the next item type of a tuple or dictionary entry type. ...

Determines the key type of a dictionary entry type. ...

Determines the value type of a dictionary entry type. ...

GVariant

The range of possible toplevel types of g:variant parameters. ...

The g:variant structure is a variant datatype. ...

Increases the reference count of value. ...

Decreases the reference count of value. ...

The g:variant structure uses a floating reference count system. ...

If value is floating, sink it. Otherwise, do nothing. ...

Checks whether value has a floating reference count. ...

Determines the variant type of value. ...

Returns the variant type string of value. ...

Checks if a value has a variant type matching the provided vtype. ...

Checks if value is a container. ...

Compares value1 and value2. ...

Classifies value according to its toplevel type. ...

Creates a new g:variant instance with the boolean value. ...

Returns the boolean value of value. ...

Creates a new g:variant instance with the :uchar value. ...

Returns the :uchar value of value. ...

Creates a new g:variant instance with the :int16 value. ...

Returns the 16-bit signed integer of value. ...

Creates a new g:variant instance with the :uint16 value. ...

Returns the 16-bit unsigned integer of value. ...

Creates a new g:variant instance with the :int32 value. ...

Returns the 32-bit signed integer of value. ...

Creates a new g:variant instance with the :uint32 value. ...

Returns the 32-bit unsigned integer of value. ...

Creates a new g:variant instance with the :int64 value. ...

Returns the 64-bit signed integer of value. ...

Creates a new g:variant instance with the :uint64 value. ...

Returns the 64-bit unsigned integer of value. ...

Creates a new g:variant instance with a handle. ...

Returns the 32-bit signed integer of value. ...

Creates a new g:variant instance with a double float. ...

Returns the double precision floating point value of value. ...

Creates a g:variant instance with a string value. ...

Returns the string value of value. ...

Creates a g:variant instance with the D-Bus object path in string. ...

Determines if a given string is a valid D-Bus object path. ...

Creates a g:variant instance with a D-Bus type signature in string. ...

Determines if a given string is a valid D-Bus type signature. ...

The result is a g:variant instance representing a variant containing the original value. ...

Creates a new tuple g:variant instance out of the items. ...

Checks if value and value have the same type and value. ...

Pretty-prints value in the format understood by the g:variant-parse function. ...

The g:variant-dict structure is a mutable interface to g:variant dictionaries. ...

Allocates and initialises a new g:variant-dict instance. ...

Checks if the key exists in the dictionary. ...

Looks up a value in a g:variant-dict instance. ...

Inserts, or replaces, a key in a g:variant-dict instance. ...

Removes a key and its associated value from a g:variant-dict instance. ...

Returns the current value of dict as a g:variant instance, clearing it in the process. ...

Parses a g:variant instance from a text representation. ...

Exported Symbol Index

boxed-cstruct-info, Struct  (undocumented)
boxed-opaque-info, Struct  (undocumented)
boxed-variant-info, Struct  (undocumented)
bytes, GBoxed
error, GBoxed
gtype, Struct  (undocumented)
variant-dict, GBoxed
variant-type, GBoxed
application-name, Function
boxed-copy-fn, Generic Function  (undocumented)
boxed-opaque-pointer, Generic Function  (undocumented)
bytes-data, Function
bytes-new, Function
bytes-size, Function
check-version, Function
cl-cffi-glib-build-info, Function
cleanup-translated-object-for-callback, Generic Function  (undocumented)
free, Function
gtype, Function
gtype-id, Function
gtype-name, Function
idle-add, Function
idle-source-new, Function
key-file-boolean, Function
key-file-boolean-list, Function
key-file-comment, Function
key-file-double, Function
key-file-double-list, Function
key-file-free, Function
key-file-groups, Function
key-file-has-group, Function
key-file-has-key, Function
key-file-int64, Function
key-file-integer, Function
key-file-integer-list, Function
key-file-keys, Function
key-file-load-from-bytes, Function
key-file-load-from-data, Function
key-file-load-from-data-dirs, Function
key-file-load-from-dirs, Function
key-file-load-from-file, Function
key-file-locale-for-key, Function
key-file-locale-string, Function
key-file-locale-string-list, Function
key-file-new, Function
key-file-ref, Function
key-file-remove-comment, Function
key-file-remove-group, Function
key-file-remove-key, Function
key-file-save-to-file, Function
key-file-set-list-separator, Function
key-file-start-group, Function
key-file-string, Function
key-file-string-list, Function
key-file-to-data, Function
key-file-uint64, Function
key-file-unref, Function
key-file-value, Function
main-context-default, Function
main-context-find-source-by-id, Function
main-context-is-owner, Function
main-context-iteration, Function
main-context-new, Function
main-context-pending, Function
main-context-ref, Function
main-context-unref, Function
main-loop-context, Function
main-loop-is-running, Function
main-loop-new, Function
main-loop-quit, Function
main-loop-ref, Function
main-loop-run, Function
main-loop-unref, Function
make-boxed-type, Generic Function  (undocumented)
malloc, Function
option-context-add-group, Function
option-context-add-main-entries, Function
option-context-description, Function
option-context-free, Function
option-context-help, Function
option-context-help-enabled, Function
option-context-ignore-unknown-options, Function
option-context-main-group, Function
option-context-new, Function
option-context-parse, Function
option-context-parse-strv, Function
option-context-set-translate-func, Function
option-context-set-translation-domain, Function
option-context-strict-posix, Function
option-context-summary, Function
option-group-add-entries, Function
option-group-new, Function
option-group-ref, Function
option-group-set-translate-func, Function
option-group-set-translation-domain, Function
option-group-unref, Function
pointer, Generic Function  (undocumented)
prgname, Function
source-add-child-source, Function
source-attach, Function
source-can-recurse, Function
source-context, Function
source-destroy, Function
source-id, Function
source-is-destroyed, Function
source-name, Function
source-priority, Function
source-ready-time, Function
source-remove, Function
source-remove-child-source, Function
source-set-callback, Function
source-set-name-by-id, Function
source-time, Function
symbol-for-gtype, Function
timeout-add, Function
timeout-add-seconds, Function
timeout-source-new, Function
timeout-source-new-seconds, Function
variant-boolean, Function
variant-byte, Function
variant-classify, Function
variant-compare, Function
variant-dict-contains, Function
variant-dict-end, Function
variant-dict-insert-value, Function
variant-dict-lookup-value, Function
variant-dict-new, Function
variant-dict-remove, Function
variant-double, Function
variant-equal, Function
variant-handle, Function
variant-int16, Function
variant-int32, Function
variant-int64, Function
variant-is-container, Function
variant-is-floating, Function
variant-is-object-path, Function
variant-is-of-type, Function
variant-is-signature, Function
variant-new-boolean, Function
variant-new-byte, Function
variant-new-double, Function
variant-new-handle, Function
variant-new-int16, Function
variant-new-int32, Function
variant-new-int64, Function
variant-new-object-path, Function
variant-new-signature, Function
variant-new-string, Function
variant-new-tuple, Function
variant-new-uint16, Function
variant-new-uint32, Function
variant-new-uint64, Function
variant-new-variant, Function
variant-parse, Function
variant-print, Function
variant-ref, Function
variant-ref-sink, Function
variant-string, Function
variant-take-ref, Function
variant-type, Function
variant-type-copy, Function
variant-type-dup-string, Function
variant-type-element, Function
variant-type-equal, Function
variant-type-first, Function
variant-type-hash, Function
variant-type-is-array, Function
variant-type-is-basic, Function
variant-type-is-container, Function
variant-type-is-definite, Function
variant-type-is-dict-entry, Function
variant-type-is-maybe, Function
variant-type-is-subtype-of, Function
variant-type-is-tuple, Function
variant-type-is-variant, Function
variant-type-key, Function
variant-type-n-items, Function
variant-type-new, Function
variant-type-new-array, Function
variant-type-new-dict-entry, Function
variant-type-new-maybe, Function
variant-type-new-tuple, Function
variant-type-next, Function
variant-type-string, Function
variant-type-string-is-valid, Function
variant-type-value, Function
variant-uint16, Function
variant-uint32, Function
variant-uint64, Function
variant-unref, Function
with-key-file, Macro
with-key-file-from-data, Macro
with-key-file-from-file, Macro
with-option-context, Macro
with-option-group, Macro
+major-version+, Constant
+micro-version+, Constant
+minor-version+, Constant
gtype, Struct
key-file-flags, Bitfield
option-arg, CEnum
option-flags, Bitfield
source-func, Callback
translate-func, Callback
variant, CStruct
variant-class, CEnum
date-time, Type
key-file, CStruct
list-t, Type
main-context, CStruct
main-loop, CStruct
option-context, CStruct
option-group, CStruct
quark-as-string, Type
slist-t, Type
source, CStruct
strv-t, Type
unichar, Type
+priority-default+, Constant
+priority-default-idle+, Constant
+priority-high+, Constant
+priority-high-idle+, Constant
+priority-low+, Constant
+source-continue+, Constant
+source-remove+, Constant