Up: cl-cffi-gtk4 API documentation
Package gobject
GObject provides the object system used for Pango and GTK.
This is the API documentation of a Lisp binding to GObject.
About This PackageVarious types and functions Generic Values Parameters and Values GObject Signals GBinding Type InformationIntroduction to type information
The GType API is the foundation of the GObject system. It provides the
facilities for registering and managing all fundamental data types,
user-defined objects and interface types. For type creation and registration purposes, all types fall into one of two categories: static or dynamic. Static types are never loaded or unloaded at run-time as dynamic types may be. Static types are created with the function g_type_register_static() that gets type specific information passed in via a GTypeInfo structure. Dynamic types are created with the function g_type_register_dynamic() which takes a GTypePlugin structure instead. The remaining type information (the GTypeInfo structure) is retrieved during runtime through the GTypePlugin structure and the g_type_plugin_*() API. These registration functions are usually called only once from a function whose only purpose is to return the type identifier for a specific class. Once the type (or class or interface) is registered, it may be instantiated, inherited, or implemented depending on exactly what sort of type it is. There is also a third registration function for registering fundamental types called g_type_register_fundamental() which requires both a GTypeInfo structure and a GTypeFundamentalInfo structure but it is seldom used since most fundamental types are predefined rather than user-defined. Type instance and class structures are limited to a total of 64 KiB, including all parent types. Similarly, type instances' private data (as created by the function g_type_class_add_private()) are limited to a total of 64 KiB. If a type instance needs a large static buffer, allocate it separately (typically by using a GArray or GPtrArray structure) and put a pointer to the buffer in the structure. A final word about type names. Such an identifier needs to be at least three characters long. There is no upper length limit. The first character needs to be a letter (a-z or A-Z) or an underscore '_'. Subsequent characters can be letters, numbers or any of '-_+'. Types and functions for type information The g:gtype structure represents the unique identifier of a registered foreign GType type on the Lisp side. ... Returns the name of the GType type. ... Returns the unique identifier for the GType type. ... Returns the Lisp symbol for the given name-or-gtype argument. ... An opaque structure used as the base of all classes. ... An opaque structure used as the base of all interface types. ... An opaque structure used as the base of all type instances. ... Checks if gtype is an abstract type. ... Checks if gtype is derived or in object oriented terminology
inherited from another type. ... Checks if gtype is a fundamental type. ... Checks if gtype is a classed type. ... Checks if gtype is an interface type. ... Gets the type identifier from a given instance. ... Gets the type identifier from a given class instance. ... Gets the type identifier from a given interface instance. ... Get the class structure of a given instance. ...
Get the unique name that is assigned to a type ID. ... Returns the direct parent type of the passed in gtype. ... Returns a list of type IDs, listing the child types of gtype. ... Returns the length of the ancestry of the passed in gtype. ... Given a leaf and a root which is contained in its anchestry, return the type that root is the immediate parent of. ... If the is-a-type argument is a derivable type, check whether the gtype argument is a descendant of is-a-type. ...
Increments the reference count of the class instance belonging to gtype and returns the pointer to the class instance. ... This function is essentially the same as the g:type-class-ref
function, except that the classes reference count is not incremented. ...
Decrements the reference count of the class instance being passed in. ...
This is a convenience function often needed in class initializers. It returns the class intance of the immediate parent type of the class
passed in. ...
Returns the interface structure of an interface to which the passed in class conforms. ...
Increments the reference count for the interface type, and returns the default interface vtable for the type. ...
Decrements the reference count for the type corresponding to the interface default vtable of iface. ... Returns a list of type IDs, listing the interface types that gtype
conforms to. ...
Returns the prerequisites of an interfaces type. ... The g:type-qdata function obtains data which has previously been attached to gtype with the (setf g:type-qdata) function. ... The fundamental type which is the ancestor of the gtype argument. ... Ensures that the indicated gtype has been registered with the type
system, and its initializer method has been run. ... Various types and functionsIntroduction to enumeration and Flag Types
The GLib type system provides fundamental types for enumeration and flags
types. Flags types are like enumerations, but allow their values to be
combined by bitwise OR. A registered enumeration or flags type associates
a name and a nickname with each allowed value. When an enumeration or
flags type is registered with the GLib type system, it can be used as value type for object properties, using the g:param-spec-enum or g:param-spec-flags functions. Types and functions for enumeration and flags types
The class of an enumeration type holds information about its possible
values. ...
A structure which contains a single enum value, its name, and its nickname. ...
The class of a flags type holds information about its possible values. ...
A structure which contains a single flags value, its name, and its nickname. ... Introduction to boxed types
A mechanism to wrap opaque C structures registered by the type system GBoxed is a generic wrapper mechanism for arbitrary C structures. The only thing the type system needs to know about the structures is how to copy and free them, beyond that they are treated as opaque chunks of memory. Boxed types are useful for simple value-holder structures like rectangles or points. They can also be used for wrapping structures defined in non-GObject based libraries. They allow arbitrary structures to be handled in a uniform way, allowing uniform copying (or referencing) and freeing (or unreferencing) of them, and uniform representation of the type of the contained structure. In turn, this allows any type which can be boxed to be set as the data in a GValue, which allows for polymorphic handling of a much wider range of data types, and hence usage of such types as GObject property values. GBoxed is designed so that reference counted types can be boxed. Use the type’s ‘ref’ function as the GBoxedCopyFunc, and its ‘unref’ function as the GBoxedFreeFunc. For example, for GBytes, the GBoxedCopyFunc is g_bytes_ref(), and the GBoxedFreeFunc is g_bytes_unref(). Functions for boxed typesGeneric Values The g:value structure is a variable container that consists of a
type identifier and a specific value of that type. ... The g:with-value macro allocates a new g:value
instance, initializes it with the given values and executes the body that uses gvalue. ... The g:with-values macro creates new variable bindings and executes
the body that use these bindings. ... Get the type identifier of gvalue. ... Gets the the type name of gvalue. ... Clears the current value in gvalue and resets it to the default value
as if the value had just been initialized. ... Clears the current value in gvalue and "unsets" the type, this releases all resources associated with this gvalue instance. ... Returns whether a g:value instance of type src can be copied into a g:value instance of type dest. ... Parameters and ValuesIntroduction to parameters and values
Standard Parameter and Value Types GValue provides an abstract container structure which can be copied, transformed and compared while holding a value of any (derived) type, which is registered as a GType with a GTypeValueTable in its GTypeInfo structure. Parameter specifications for most value types can be created as GParamSpec derived instances, to implement, for example, GObject properties which operate on GValue containers. Parameter names need to start with a letter (a-z or A-Z). Subsequent characters can be letters, numbers or a '-'. All other characters are replaced by a '-' during construction. Functions for GParamSpec Through the g:param-flags flag values, certain aspects of
parameters can be configured. ... The g:param-spec structure is an object structure that encapsulates
the metadata required to specify parameters, such as, for example g:object properties. ... Increments the reference count of pspec. ...
Decrements the reference count of a pspec. ... Convenience function to ref and sink a g:param-spec instance. ... Gets the name of a g:param-spec instance. ... Get the nickname of a g:param-spec instance. ... Gets the short description of a g:param-spec instance. ...
Creates a new parameter specification instance. ... Types and functions for parameters and values The g:param-spec derived structure that contains the meta data for
boolean properties. ...
Creates a new parameter specification instance specifying a property of "gboolean" type. ... The g:param-spec derived structure that contains the meta data for
character properties. ...
Creates a new parameter specification instance specifying a property of "gchar" type. ... The g:param-spec derived structure that contains the meta data for
unsigned character properties. ...
Creates a new parameter specification instance specifying a property of "guchar" type. ... A g:param-spec derived structure that contains the meta data for
integer properties. ...
Creates a new parameter specification instance specifying a property of "gint" type. ... Integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
unsigned integer properties. ...
Creates a new parameter specificaton instance specifying a property of "guint" type. ... Unsigned integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
long integer properties. ...
Creates a new parameter specification instance specifying a property of "glong" type. ... Long integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
unsigned long integer properties. ...
Creates a new parameter specification instance specifying a property of "gulong" type. ... Unsigned long integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
64 bit integer properties. ...
Creates a new parameter specification instance specifying a property of "gint64" type. ... The 64-bit integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
unsigned 64 bit integer properties. ...
Creates a new parameter specification instance specifying a property of "guint64" type. ... Unsigned 64-bit integer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
float properties. ...
Creates a new parameter specification instance specifying a property of "gfloat" type. ... Float contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
double properties. ...
Creates a new parameter specification instance specifying a property of "gdouble" type. ... Double float contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
enum properties. ...
Creates a new parameter specification instance specifying a property of "GEnum" type. ... Enumeration value contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
flags properties. ...
Creates a new parameter specification instance specifying a property of "GFlags" type. ... Flags contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
string properties. ...
Creates a new parameter specification instance specifying a property of "gchararray" type. ... String content of gvalue. ...
Creates a new parameter specification instance specifying a property of "GParam" type. ... A g:param-spec derived structure that contains the meta data for
boxed properties. ...
Creates a new parameter specification instance specifying a property derived of "GBoxed" type. ... Boxed contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
pointer properties. ...
Creates a new parameter specification instance specifying a property of "gpointer" type. ... Pointer contents of gvalue. ... A g:param-spec derived structure that contains the meta data for
object properties. ...
Creates a new parameter specification instance specifying a property of a "GObject" dervived type. ... Object contents of gvalue. ... Creates a new parameter specification instance specifying a "GType"
property. ... Variant contents of gvalue. ... GObject The g:object class is the fundamental type providing the common
attributes and methods for all object types in GTK, Pango and other
libraries. ... Checks if the passed in type ID is a "GObject" type or derived
from it. ... Looks up the g:param-spec instance for a property of an object
class type. ... Gets a list of g:param-spec instances for all properties of an
object class type. ... Find the g:param-spec instance with the given property name for
an interface type. ...
Lists the properties of an interface type. ... Increases the reference count of object. ... Returns the reference count of the object. ... Decreases the reference count of object. ... Emits a "notify" signal for the property on the object. ...
Increases the freeze count on the object. ... Reverts the effect of a previous call to the g:object-freeze-notify
function. ...
Each object carries around a table of associations from strings to pointers. ...
Specifies the type of function which is called when a data element is
destroyed. ... Like the g:object-data function except it adds notification for
when the association is destroyed, either by setting it to a different
value or when the object is destroyed. ... Accessor of the property of an object. ... SignalsIntroduction to signals
The basic concept of the signal system is that of the emission of a
signal. Signals are introduced per-type and are identified through
strings. Signals introduced for a parent type are available in derived
types as well, so basically they are a per-type facility that is
inherited. A signal emission mainly involves invocation of a certain set of callbacks in precisely defined manner. There are two main categories of such callbacks, per-object ones and user provided ones. The per-object callbacks are most often referred to as "object method handler" or "default (signal) handler", while user provided callbacks are usually just called "signal handler". The object method handler is provided at signal creation time, this most frequently happens at the end of an object class' creation, while user provided handlers are frequently connected and disconnected to/from a certain signal on certain object instances. A signal emission consists of five stages, unless prematurely stopped:
All handlers may prematurely stop a signal emission, and any number of handlers may be connected, disconnected, blocked or unblocked during a signal emission. There are certain criteria for skipping user handlers in stages 2 and 4 of a signal emission. First, user handlers may be blocked. Blocked handlers are omitted during callback invocation, to return from the blocked state, a handler has to get unblocked exactly the same amount of times it has been blocked before. Second, upon emission of a :detailed signal, an additional detail argument passed in to the g:signal-emit function has to match the detail argument of the signal handler currently subject to invocation. Specification of no detail argument for signal handlers (omission of the detail part of the signal specification upon connection) serves as a wildcard and matches any detail argument passed in to emission. While the detail argument is typically used to pass an object property name, as with "notify", no specific format is mandated for the detail string, other than that it must be non-empty. Types and functions for signals
The signal flags are used to specify the behaviour of the signal, the
overall signal description outlines how the flags control the stages of a
signal emission. ...
The connection flags are used to specify the behaviour of the connection
of the signal. ...
A structure holding in-depth information for a specific signal. ...
Returns the signal info. ...
Given the name of the signal and the type of object it connects to, gets
the identifying integer of the signal. ...
Given the identifier of the signal, finds its name. ...
Lists the signals by ID that a certain instance or interface type created. ... Emits a signal. ...
Connects a Lisp callback function to a signal for a particular object. ...
Blocks a handler of an instance so it will not be called during any signal
emissions unless it is unblocked again. ... Undoes the effect of a previous call of the g:signal-handler-block
function. ...
Disconnects a handler from an instance so it will not be called during any
future or currently ongoing emissions of the signal it has been connected
to. ... Finds the first signal handler that matches the given signal-id. ... Returns whether there are any handlers connected to instance for the given signal ID and detail. ...
Stops a current emission of the signal. ... GBinding The g:binding object is the representation of a binding between a property on a g:object instance, or source, and another property on another g:object instance, or target. ...
Explicitly releases the binding between the source and the target property expressed by binding. ... The callback function for the g:object-bind-property-full function to be called to transform from to to. ... Complete version of the g:object-bind-property function. ... | Exported Symbol Index |