Module GObject_introspection.Callable_info
type t
Callable_info represents an entity which is callable. Currently a function (Function_info), virtual function, (VFunc_info) or callback (GICallbackInfo). A callable has a list of arguments (Arg_info), a return type, direction and a flag which decides if it returns null
val callableinfo : t Ctypes.structure Ctypes.typ
val can_throw_gerror : t Ctypes.structure Ctypes.ptr -> bool
Does the function throws an error.
val get_n_args : t Ctypes.structure Ctypes.ptr -> int
Obtain the number of arguments (both IN and OUT) for this callable.
val get_return_attribute : t Ctypes.structure Ctypes.ptr -> string option
Retrieve an arbitrary attribute associated with the return value.
val is_method : t Ctypes.structure Ctypes.ptr -> bool
Determines if the callable info is a method. For VFunc_infos, GICallbackInfos, and Signal_infos, this is always true. Otherwise, this looks at the Function_info.Is_method flag on the Function_info. Concretely, this function returns whether Callable_info.get_n_args matches the number of arguments in the raw C method. For methods, there is one more C argument than is exposed by introspection: the "self" or "this" object.
val may_return_null : t Ctypes.structure Ctypes.ptr -> bool
See if a callable could return NULL.
val skip_return : t Ctypes.structure Ctypes.ptr -> bool
See if a callable's return value is only useful in C.
val get_arg : t Ctypes.structure Ctypes.ptr -> int -> Arg_info.t Ctypes.structure Ctypes.ptr
Obtain information about a particular argument of this callable.
val get_return_type : t Ctypes.structure Ctypes.ptr -> Type_info.t Ctypes.structure Ctypes.ptr
Obtain the return type of a callable item as a Type_info.
val get_caller_owns : t Ctypes.structure Ctypes.ptr -> Bindings.Arg_info.transfer
See whether the caller owns the return value of this callable. GITransfer contains a list of possible transfer values.
val cast_from_baseinfo : Base_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr
Just cast OCaml Ctypes base info to callable info.
val cast_to_baseinfo : t Ctypes.structure Ctypes.ptr -> Base_info.t Ctypes.structure Ctypes.ptr
Just cast OCaml Ctypes callable info to base info
val add_unref_finaliser : t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr
Add unref of the C underlying structure whith Gc.finalise.
val from_baseinfo : Base_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr
Return a Function_info.t from a Base_info.t, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.
val to_baseinfo : t Ctypes.structure Ctypes.ptr -> Base_info.t Ctypes.structure Ctypes.ptr
Return a Base_info.t from a Function_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.