package gobject-introspection

  1. Overview
  2. Docs

Callable_info — Struct representing a callable.

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.

Obtain information about a particular argument of this callable.

Obtain the return type of a callable item as a Type_info.

See whether the caller owns the return value of this callable. GITransfer contains a list of possible transfer values.

Just cast OCaml Ctypes base info to callable info.

Just cast OCaml Ctypes callable info to base info

Add unref of the C underlying structure whith Gc.finalise.

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.

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.

OCaml

Innovation. Community. Security.