About gobject.type-info:

This package contains functions for querying the basic type information from GObject type system. For an overview of GObject type system, see GObject documentation

Types are identified by GType designators that are specified in g-type-designator. Functions of this package provide means to query basic information about type.



This is a list of variables and functions that correspond to basic types:

Other functions in gobject.type-info

Function g-closure-get-type ()
Details:
Returns the type designator (see g-type-designator) for GClosure type. As a side effect, ensure that the type is registered.
See also:

Function g-strv-get-type ()
Details:
Returns the type designator (see g-type-designator) for GStrv type. As a side effect, ensures that the type is registered.
See also:

Function g-type-children (g-type)
Arguments:
Returns:
list of GType designators
Details:
Returns the list of types inherited from g-type.

Example:
(g-type-children "GtkObject")
=> ("GtkWidget" "GtkAdjustment" "GtkTreeViewColumn" "GtkCellRenderer"
    "GtkFileFilter" "GtkRecentFilter" "GtkTooltips")
See also:

Function g-type-depth (type)
Arguments:
Returns:
an integer
Details:
Returns the length of the ancestry of type. This includes the type itself, so that e.g. a fundamental type has depth 1.

Example:
(g-type-depth "GtkLabel")
=> 6
See also:

Function g-type-from-name (name)
Arguments:
  • name -- a string - name of GType
Returns:
an integer
Details:
Returns the numeric identifier of a GType by its name.

Example:
(g-type-from-name "GtkLabel")
=> 7151952
(g-type-name 7151952)
=> "GtkLabel"
See also:

Function g-type-fundamental (type)
Arguments:
Returns:
GType designator
Details:
Returns the fundamental type which is the ancestor of type.

Example:
(g-type-fundamental "GtkWindowType")
=> "GEnum"
(g-type-fundamental "GtkLabel")
=> "GObject"
See also:

Function g-type-interface-prerequisites (g-type)
Arguments:
Returns:
list of GType designators
Details:
Returns the prerequisites of an interface type. Prerequisite is a type that must be a superclass of an implementing class or an interface that the object must also implement.

Example:
(g-type-interface-prerequisites "GtkTreeModel")
=> ("GObject")
See also:

Function g-type-interfaces (g-type)
Arguments:
Returns:
list of GType designators
Details:
Returns the list of interfaces the g-type conforms to.

Example:
(g-type-interfaces "GtkButton")
=> ("AtkImplementorIface" "GtkBuildable" "GtkActivatable")
See also:

Function g-type-is-a (type is-a-type)
Arguments:
Returns:
boolean
Details:
If is-a-type is a derivable type, check whether type is a descendant of is-a-type. If is-a-type is an interface, check whether type conforms to it.

Example:
(g-type-is-a "GtkButton" "GtkWidget")
=> T
(g-type-is-a "GtkButton" "AtkImplementorIface")
=> T
(g-type-is-a "GtkButton" "GtkLabel")
=> NIL
See also:

Function g-type-name (type)
Arguments:
Returns:
a string
Details:
Returns the name of a GType.

Example:
(g-type-from-name "GtkLabel")
=> 7151952
(g-type-name 7151952)
=> "GtkLabel"
See also:

Function g-type-next-base (leaf-type root-type)
Arguments:
Returns:
GType designator
Details:
Determines the type that is derived directly from root-type which is also a base class of leaf-type.

Example:
(g-type-next-base "GtkButton" "GtkWidget")
=> "GtkContainer"
See also:

Function g-type-parent (type)
Arguments:
Returns:
GType designator
Details:
Returns the parent of a GType.

Example:
(g-type-parent "GtkLabel")
=> "GtkMisc"
See also:

Other classes in gobject.type-info

Class g-type-designator
Superclasses:
cffi::enhanced-foreign-type, cffi::foreign-type-alias, cffi::foreign-type, common-lisp:standard-object, sb-pcl::slot-object, common-lisp:t
Documented Subclasses:
None
Details:
Values of this CFFI foreign type identify the GType. GType is designated by a its name (a string) or a numeric identifier. Functions accept GType designators as a string or integer and return them as a string. Functions g-type-name and g-type-from-name are used to convert between name and numeric identifier.

Numeric identifier of GType may be different between different program runs. But string identifier of GType does not change.
See also:

Other variables in gobject.type-info

Variable +g-type-boolean+
Details:
The fundamental type corresponding to gboolean.

Variable +g-type-boxed+
Details:
The fundamental type from which all boxed types are derived.

Variable +g-type-char+
Details:
The fundamental type corresponding to gchar. The type designated by +g-type-char+ is unconditionally an 8-bit signed integer. This may or may not be the same type a the C type gchar.
See also:

Variable +g-type-double+
Details:
The fundamental type corresponding to gdouble.

Variable +g-type-enum+
Details:
The fundamental type from which all enumeration types are derived.

Variable +g-type-flags+
Details:
The fundamental type from which all flags types are derived.

Variable +g-type-float+
Details:
The fundamental type corresponding to gfloat.

Variable +g-type-int+
Details:
The fundamental type corresponding to gint.

Variable +g-type-int64+
Details:
The fundamental type corresponding to gint64.

Variable +g-type-interface+
Details:
The fundamental type from which all interfaces are derived.

Variable +g-type-invalid+
Details:
An invalid GType used as error return value in some functions which return a GType.

Variable +g-type-long+
Details:
The fundamental type corresponding to glong.

Variable +g-type-object+
Details:
The fundamental type for GObject.

Variable +g-type-param+
Details:
The fundamental type from which all GParamSpec types are derived.

Variable +g-type-pointer+
Details:
The fundamental type corresponding to gpointer.

Variable +g-type-string+
Details:
The fundamental type corresponding to null-terminated C strings.

Variable +g-type-uchar+
Details:
The fundamental type corresponding to guchar.

Variable +g-type-uint+
Details:
The fundamental type corresponding to guint.

Variable +g-type-uint64+
Details:
The fundamental type corresponding to guint64.

Variable +g-type-ulong+
Details:
The fundamental type corresponding to gulong.

Variable +g-type-void+
Details:
A fundamental type which is used as a replacement for the C void return type.

Index of exported symbols

gobject.type-info:+g-type-boolean+, variable
gobject.type-info:+g-type-boxed+, variable
gobject.type-info:+g-type-char+, variable
gobject.type-info:+g-type-double+, variable
gobject.type-info:+g-type-enum+, variable
gobject.type-info:+g-type-flags+, variable
gobject.type-info:+g-type-float+, variable
gobject.type-info:+g-type-int+, variable
gobject.type-info:+g-type-int64+, variable
gobject.type-info:+g-type-interface+, variable
gobject.type-info:+g-type-invalid+, variable
gobject.type-info:+g-type-long+, variable
gobject.type-info:+g-type-object+, variable
gobject.type-info:+g-type-param+, variable
gobject.type-info:+g-type-pointer+, variable
gobject.type-info:+g-type-string+, variable
gobject.type-info:+g-type-uchar+, variable
gobject.type-info:+g-type-uint+, variable
gobject.type-info:+g-type-uint64+, variable
gobject.type-info:+g-type-ulong+, variable
gobject.type-info:+g-type-void+, variable
gobject.type-info:g-closure-get-type, function
gobject.type-info:g-strv-get-type, function
gobject.type-info:g-type-children, function
gobject.type-info:g-type-depth, function
gobject.type-info:g-type-designator, class
gobject.type-info:g-type-from-name, function
gobject.type-info:g-type-fundamental, function
gobject.type-info:g-type-interface-prerequisites, function
gobject.type-info:g-type-interfaces, function
gobject.type-info:g-type-is-a, function
gobject.type-info:g-type-name, function
gobject.type-info:g-type-next-base, function
gobject.type-info:g-type-parent, function