| GObject Introspection Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
typedef GIVFuncInfo; enum GIVFuncInfoFlags; GIVFuncInfoFlags g_vfunc_info_get_flags (GIVFuncInfo *info); gint g_vfunc_info_get_offset (GIVFuncInfo *info); GISignalInfo * g_vfunc_info_get_signal (GIVFuncInfo *info); GIFunctionInfo * g_vfunc_info_get_invoker (GIVFuncInfo *info); gpointer g_vfunc_info_get_address (GIVFuncInfo *info,GType implementor_gtype,GError **error); gboolean g_vfunc_info_invoke (GIVFuncInfo *info,GType implementor,const GIArgument *in_args,int n_in_args,const GIArgument *out_args,int n_out_args,GIArgument *return_value,GError **error);
GIVfuncInfo represents a virtual function. A property belongs to either a GIObjectInfo or a GIInterfaceInfo.
GIBaseInfo +----GICallableInfo +----GIFunctionInfo +----GISignalInfo +----GIVFuncInfo
typedef enum {
GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
GI_VFUNC_MUST_OVERRIDE = 1 << 1,
GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
GI_VFUNC_THROWS = 1 << 3
} GIVFuncInfoFlags;
Flags of a GIVFuncInfo struct.
| chains up to the parent type | |
| overrides | |
| does not override | |
| Includes a GError |
GIVFuncInfoFlags g_vfunc_info_get_flags (GIVFuncInfo *info);
Obtain the flags for this virtual function info. See GIVFuncInfoFlags for more information about possible flag values.
|
a GIVFuncInfo |
Returns : |
the flags |
gint g_vfunc_info_get_offset (GIVFuncInfo *info);
Obtain the offset of the function pointer in the class struct. The value 0xFFFF indicates that the struct offset is unknown.
|
a GIVFuncInfo |
Returns : |
the struct offset or 0xFFFF if it's unknown |
GISignalInfo * g_vfunc_info_get_signal (GIVFuncInfo *info);
Obtain the signal for the virtual function if one is set. The signal comes from the object or interface to which this virtual function belongs.
|
a GIVFuncInfo |
Returns : |
the signal or NULL if none set. [transfer full]
|
GIFunctionInfo * g_vfunc_info_get_invoker (GIVFuncInfo *info);
If this virtual function has an associated invoker method, this method will return it. An invoker method is a C entry point.
Not all virtuals will have invokers.
|
a GIVFuncInfo |
Returns : |
the GIVFuncInfo or NULL. Free it with
g_base_info_unref() when done. [transfer full]
|
gpointer g_vfunc_info_get_address (GIVFuncInfo *info,GType implementor_gtype,GError **error);
This method will look up where inside the type struct of implementor_gtype
is the implementation for info.
|
a GIVFuncInfo |
|
GType implementing this virtual function |
|
return location for a GError |
Returns : |
address to a function or NULL if an error happened |
gboolean g_vfunc_info_invoke (GIVFuncInfo *info,GType implementor,const GIArgument *in_args,int n_in_args,const GIArgument *out_args,int n_out_args,GIArgument *return_value,GError **error);
Invokes the function described in info with the given
arguments. Note that inout parameters must appear in both
argument lists.
|
a GIVFuncInfo describing the virtual function to invoke |
|
GType of the type that implements this virtual function |
|
an array of GIArguments, one for each in
parameter of info. If there are no in parameter, in_args
can be NULL
|
|
the length of the in_args array |
|
an array of GIArguments, one for each out
parameter of info. If there are no out parameters, out_args
may be NULL
|
|
the length of the out_args array |
|
return location for the return value of the
function. If the function returns void, return_value may be
NULL
|
|
return location for detailed error information, or NULL
|
Returns : |
TRUE if the function has been invoked, FALSE if an
error occurred. |