G-Golf Function Info low level API.
GIFunctionInfo — Struct representing a function.
GIBaseInfoInfo
+— GICallableInfo
+— GIFunctionInfo
+— GISignalInfo
+— GIVFuncInfo
GIFunctionInfo
represents a function, method or constructor. To
find out what kind of entity a GIFunctionInfo represents, call
g-function-info-get-flags.
See also Callable Info for information on how to retreive arguments and other metadata.
Note: in this section, the info argument is [must be] a pointer to
a GIFunctionInfo
.
Returns #t
if info is a method, that is if is-method
is a member of the info flags. Otherwise, it returns #f
.
The optional flags argument, if passed, must be the list of the function info flags as returned by g-function-info-get-flags.
Returns a list of %g-function-info-flags.
Obtain the GIFunctionInfoFlags
for info.
Returns a pointer or #f
.
Obtains the GIPropertyInfo
associated with info. Only
GIFunctionInfo
with the flag is-getter
or
is-setter
have a property set. For other cases, #f
will be
returned.
The GIPropertyInfo
must be freed by calling
g-base-info-unref when done.
Returns a string.
Obtain the ‘symbol’ of the function32.
Returns a pointer or #f
.
Obtains the GIVFuncInfo
associated with info. Only
GIFunctionInfo
with the flag wraps-vfunc
has its virtual
function set. For other cases, #f
will be returned.
The GIVFuncInfo
must be freed by calling g-base-info-unref
when done.
Returns #t
if the function has been invoked, #f
if an
error occured.
Invokes the function described in info with the given
arguments. Note that inout
parameters must appear in both
argument lists. The arguments are:
info
a pointer to a
GIFunctionInfo
describing the function to invoke.in-args
a pointer to an array of
GIArguments
, one for eachin
andinout
parameter of info. If there are noin
parameter, in-args must be the%null-pointer
.n-in
the length of the in-args array.
out-args
a pointer to an array of
GIArguments
, one for eachout
andinout
parameter of info. If there are noout
parameter, out-args must be the%null-pointer
.n-out
the length of the out-args array.
r-val
a pointer to a
GIArguments
, the return location for the return value of the function. If the function returnsvoid
, r-val must be the%null-pointer
.g-error
a pointer to a newly allocated (and ‘empty’)
GError
(the recommended way for procedure calls that need such a pointer is to ‘surround’ the call using with-gerror).
<gi-flags>
: %g-function-info-flags ¶An instance of <gi-flags>, who’s members are the scheme
representation of the GIFunctionInfoFlags
:
g-name: GIFunctionInfoFlags
name: gi-function-info-flags
enum-set:
is-method
Is a method.
is-constructor
Is a constructor.
is-getter
Is a getter of a
GIPropertyInfo
.is-setter
Is a setter of a
GIPropertyInfo
.wraps-vfunc
Represent a virtul function.
throws
The function may throw an error.
As you have noticed
already, since g-function-info-get-symbol
returns a string, in
the Glib, GObject and GObject Instrospection worlds, symbol has a
different meaning then in the Lisp/Scheme worlds. However, since the
procedure is part of the G-Golf low-level API, we decided to keep its
name as close as the original name as possible, which in Glib
terms is the name of the exported function, ‘suitable to be used as
an argument to g_module_symbol()’