Top | ![]() |
![]() |
![]() |
![]() |
GICallableInfo represents an entity which is callable. Currently a function (GIFunctionInfo), virtual function, (GIVFuncInfo) or callback (GICallbackInfo).
A callable has a list of arguments (GIArgInfo), a return type, direction and a flag which decides if it returns null.
GIBaseInfo +----GICallableInfo +----GIFunctionInfo +----GISignalInfo +----GIVFuncInfo
GITypeInfo *
g_callable_info_get_return_type (GICallableInfo *info
);
Obtain the return type of a callable item as a GITypeInfo.
GITransfer
g_callable_info_get_caller_owns (GICallableInfo *info
);
See whether the caller owns the return value of this callable. GITransfer contains a list of possible transfer values.
gboolean
g_callable_info_may_return_null (GICallableInfo *info
);
See if a callable could return NULL
.
const gchar * g_callable_info_get_return_attribute (GICallableInfo *info
,const gchar *name
);
Retrieve an arbitrary attribute associated with the return value.
gboolean g_callable_info_iterate_return_attributes (GICallableInfo *info
,GIAttributeIter *iterator
,char **name
,char **value
);
Iterate over all attributes associated with the return value. The
iterator structure is typically stack allocated, and must have its
first member initialized to NULL
.
Both the name
and value
should be treated as constants
and must not be freed.
See g_base_info_iterate_attributes()
for an example of how to use a
similar API.
info |
||
iterator |
a GIAttributeIter structure, must be initialized; see below |
|
name |
Returned name, must not be freed. |
[out][transfer none] |
value |
Returned name, must not be freed. |
[out][transfer none] |
gint
g_callable_info_get_n_args (GICallableInfo *info
);
Obtain the number of arguments (both IN and OUT) for this callable.
GIArgInfo * g_callable_info_get_arg (GICallableInfo *info
,gint n
);
Obtain information about a particular argument of this callable.
void g_callable_info_load_arg (GICallableInfo *info
,gint n
,GIArgInfo *arg
);
Obtain information about a particular argument of this callable; this
function is a variant of g_callable_info_get_arg()
designed for stack
allocation.
The initialized arg
must not be referenced after info
is deallocated.
void g_callable_info_load_return_type (GICallableInfo *info
,GITypeInfo *type
);
Obtain information about a return value of callable; this
function is a variant of g_callable_info_get_return_type()
designed for stack
allocation.
The initialized type
must not be referenced after info
is deallocated.
typedef GIBaseInfo GICallableInfo;
Represents a callable, either GIFunctionInfo, GICallbackInfo or GIVFuncInfo.