G-Golf Base Info low level API.
GIBaseInfo — Base struct for all GITypelib structs.
GIBaseInfo
+— GIArgInfo
+— GICallableInfo
+— GIConstantInfo
+— GIFieldInfo
+— GIPropertyInfo
+— GIRegisteredTypeInfo
+— GITypeInfo
GIBaseInfo
is the common base struct of all other *Info structs
accessible through the GIRepository API
.
Most GIRepository APIs
returning a GIBaseInfo
is actually
creating a new struct, in other words, g-base-info-unref has to be
called when done accessing the data. GIBaseInfos
are normally
accessed by calling either g-irepository-find-by-name,
g-irepository-find-by-gtype or g-irepository-get-info.
Example: Getting the Button of the Gtk typelib
,use (g-golf gi) (g-irepository-require "Gtk") (g-irepository-find-by-name "Gtk" "Button") ⇒ $4 = #<pointer 0x20e0000> ... use button info ... (g-base-info-unref $4)
Note: in this section, the info, info1 and info2
arguments are [must be] pointers to a GIBaseInfo
.
Returns the same info.
Increases the reference count of info.
Returns nothing.
Decreases the reference count of info. When its reference count drops to 0, the info is freed.
Returns #t if and only if info1 equals info2.
Compares two GIBaseInfo
.
Using pointer comparison is not practical since many functions return
different instances of GIBaseInfo
that refers to the same part of
the typelib: use this procedure instead to do GIBaseInfo
comparisons.
Returns the info type of info.
Returns a pointer to the GITypelib
the info belongs to.
Returns the namespace of info
Returns the name of info or #f
if it lacks a name.
What the name represents depends on the GIInfoType
of the
info. For instance for GIFunctionInfo
it is the name of the
function.
Returns the value of the attribute or #f
if not such attribute
exists.
Returns nothing.
Iterate and calls proc over all attributes associated with this node. proc must be a procedure of two arguments, the name and the value of the attribute.
Returns a pointer to a GIBaseInfo
.
The container is the parent GIBaseInfo
. For instance, the parent
of a GIFunctionInfo
is an GIObjectInfo
or
GIInterfaceInfo
.
Returns #t
if deprecated.
Obtain whether info represents a metadata which is deprecated or not.
<gi-enum>
: %gi-info-type ¶An instance of <gi-enum>
, who’s members are the scheme
representation of the type of a GIBaseInfo
struct:
g-name: GIInfoType
name: gi-info-type
enum-set:invalid
function
callback
struct
boxed
enum
flags
object
interface
constant
error-domain
union
value
signal
vfunc
property
field
arg
type
unresolved