Object Info

G-Golf Object Info low level API.
GIObjectInfo — Structs representing a GObject.

Procedures

gi-object-show
gi-object-property-names
gi-object-method-names
gi-object-method-find-by-name
g-object-info-get-abstract
g-object-info-get-parent
g-object-info-get-type-name
g-object-info-get-type-init
g-object-info-get-n-constants
g-object-info-get-constant
g-object-info-get-n-fields
g-object-info-get-field
g-object-info-get-n-interfaces
g-object-info-get-interface
g-object-info-get-n-methods
g-object-info-get-method
g-object-info-find-method
g-object-info-get-n-properties
g-object-info-get-property
g-object-info-get-n-signals
g-object-info-get-signal
g-object-info-find-signal
g-object-info-get-n-vfuncs
g-object-info-get-vfunc
g-object-info-get-class-struct
g-object-info-get-set-value-function
g-object-info-get-set-value-function-pointer
g-object-info-get-get-value-function
g-object-info-get-get-value-function-pointer

Struct Hierarchy

GIBaseInfo
  +— GIRegisteredTypeInfo
            +— GIObjectInfo

Description

GIObjectInfo represents a classed type.

Classed types in GType inherit from GTypeInstance. The most common type is GObject. This doesn’t represent a specific instance of a GObject, instead this represent the object type (eg class).

A GIObjectInfo has methods, fields, properties, signals, interfaces, constants and virtual functions.

Procedures

Note: in this section, unless otherwise specified, the info argument is [must be] a pointer to a GIObjectInfo.

Procedure: gi-object-show info

Returns nothing.

Obtains and displays the following informations about the object (and its parent) pointed to by info:

,use (g-golf)
(g-irepository-require "Clutter")
⇒ $2 = #<pointer 0x56396a4f9f80>

(g-irepository-find-by-name "Clutter" "Actor")
⇒ $3 = #<pointer 0x56396a4fdc00>

(gi-object-show $3)
-|
-| #<pointer 0x56396a4fdc00> is a (pointer to a) GIObjectInfo:
-|
-|   Parent:
-|           namespace: "GObject"
-|                name: "InitiallyUnowned"
-|              g-type: 94804596757600
-|         g-type-name: "GInitiallyUnowned"
-|
-|   Object:
-|           namespace: "Clutter"
-|                name: "Actor"
-|              g-type: 94804596864480
-|         g-type-name: "ClutterActor"
-|            abstract: #f
-|         n-constants: 0
-|            n-fields: 4
-|        n-interfaces: 4
-|           n-methods: 238
-|        n-properties: 82
-|           n-signals: 26
-|           n-vfuncts: 35

Procedure: gi-object-property-names info

Returns a (possibly empty) list.

Obtains and returns the (possibly empty) list of the (untranslated) GI property names for info (see g-name->name to obtain their scheme representation).

Procedure: gi-object-method-names info

Returns a (possibly empty) list.

Obtains and returns the (possibly empty) list of pairs of the (untranslated) GI method names for info (see g-name->name to obtain their scheme representation).

Each pair is composed of the info g-function-info-get-symbol and g-base-info-get-name names.

Procedure: gi-object-method-find-by-name info name

Returns a pointer or #f.

Obtains and returns a pointer to the method GIFunctionInfo contained in info, for which g-function-info-get-symbol is string=? to name. If there is such method, it returns #f.

Procedure: g-object-info-get-abstract info

Returns #t if the info object type is abstract.

Obtain if the object type is an abstract type, eg if it cannot be instantiated.

Procedure: g-object-info-get-parent info

Returns a pointer or #f.

Obtains and returns a pointer to the info’s parent GIObjectInfo, or #f if info has no parent.

Procedure: g-object-info-get-type-name info

Returns the name of the object type for info.

Obtain the name of the object class/type for info.

Procedure: g-object-info-get-type-init info

Returns a function name (a string).

Obtain the function name which when called will return the GType function for which this object type is registered.

Procedure: g-object-info-get-n-constants info

Returns the number of constants for info.

Obtain the number of constants that this object type has.

Procedure: g-object-info-get-constant info n

Returns a pointer to the nth GIConstantInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-fields info

Returns the number of fields for info.

Obtain the number of fields that this object type has.

Procedure: g-object-info-get-field info n

Returns a pointer to the nth GIFieldInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-interfaces info

Returns the number of interfaces for info.

Obtain the number of interfaces that this object type has.

Procedure: g-object-info-get-interface info n

Returns a pointer to the nth GIInterfaceInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-methods info

Returns the number of methods for info.

Obtain the number of methods that this object type has.

Procedure: g-object-info-get-method info n

Returns a pointer to the nth GIFunctionInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-find-method info name

Returns a pointer to a GIFunctionInfo or #f if there is no method available with that name.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-properties info

Returns the number of properties for info.

Obtain the number of properties that this object type has.

Procedure: g-object-info-get-property info n

Returns a pointer to the nth GIPropertyInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-signals info

Returns the number of signals for info.

Obtain the number of signals that this object type has.

Procedure: g-object-info-get-signal info n

Returns a pointer to the nth GISignalInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-find-signal info name

Returns a pointer to a GISignalInfo or #f if there is no signal available with that name.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-n-vfuncs info

Returns the number of vfuncs for info.

Obtain the number of vfuncs that this object type has.

Procedure: g-object-info-get-vfunc info n

Returns a pointer to the nth GIVfuncInfo of info.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-class-struct info

Returns a pointer to the nth GIStructInfo of info, or #f.

Every GObject has two structures: an instance structure and a class structure. This function returns a pointer to the info class structure.

It must be freed by calling g-base-info-unref when done accessing the data.

Procedure: g-object-info-get-set-value-function info

Returns a string.

Obtain the symbol name (within the GI context, a symbol name is a string) of the function that should be called to set a GValue giving an object instance pointer of this object type.

Procedure: g-object-info-get-set-value-function-pointer info

Returns a pointer.

Obtain a pointer to a function which can be used to set a GValue giving an object instance pointer of this object type. This takes derivation into account and will reversely traverse the base classes of this type, starting at the top type.

Procedure: g-object-info-get-get-value-function info

Returns a string.

Obtain the symbol name (within the GI context, a symbol name is a string) of the function that should be called to get a GValue instance pointer of this object type giving an object instance pointer of this object type.

Procedure: g-object-info-get-get-value-function-pointer info

Returns a pointer.

Obtain a pointer to a function which can be used to get a GValue instance pointer giving an object instance pointer of this object type. This takes derivation into account and will reversely traverse the base classes of this type, starting at the top type.