package gobject-introspection

  1. Overview
  2. Docs

Object_info — Struct representing a GObject

type t

Object_info represents a GObject. This doesn't represent a specific instance of a GObject, instead this represent the object type (eg class). A GObject has methods, fields, properties, signals, interfaces, constants and virtual functions.

val objectinfo : t Ctypes.structure Ctypes.typ
val get_abstract : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the object type is an abstract type, eg if it cannot be instantiated

val get_fundamental : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the object type is of a fundamental type which is not G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.

Obtain the parent of the object type.

val get_type_name : t Ctypes.structure Ctypes.ptr -> string

Obtain the name of the objects class/type.

val get_type_init : t Ctypes.structure Ctypes.ptr -> string

Obtain the function which when called will return the GType function for which this object type is registered.

val get_n_constants : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of constants that this object type has.

Obtain an object type constant at index n .

val get_n_fields : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of fields that this object type has.

Obtain an object type field at index n .

val get_n_interfaces : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of interfaces that this object type has.

Obtain an object type interface at index n .

val get_n_methods : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of methods that this object type has.

Obtain an object type method at index n .

Obtain a method of the object type given a name . None will be returned if there's no method available with that name.

val get_n_properties : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of properties that this object type has.

Obtain an object type property at index n .

val get_n_signals : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of signals that this object type has.

Obtain an object type signal at index n .

Find a signal with a name.

val get_n_vfuncs : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of virtual functions that this object type has.

Obtain an object type virtual function at index n .

Locate a virtual function slot with name name . Note that the namespace for virtuals is distinct from that of methods; there may or may not be a concrete method associated for a virtual. If there is one, it may be retrieved using VFunc_info.get_invoker, otherwise None will be returned. See the documentation for VFunc_info.get_invoker for more information on invoking virtuals.

Every GObject has two structures; an instance structure and a class structure. This function returns the metadata for the class structure. It returns a Struct_info.t or None.

val find_method_using_interfaces : t Ctypes.structure Ctypes.ptr -> string -> Function_info.t Ctypes.structure Ctypes.ptr option * t Ctypes.structure Ctypes.ptr option

Obtain a method of the object given a name , searching both the object info and any interfaces it implements. None will be returned if there's no method available with that name. Note that this function does *not* search parent classes; you will have to chain up if that's desired.

val get_ref_function : t Ctypes.structure Ctypes.ptr -> string option

Obtain the symbol name of the function that should be called to ref this object type. It's mainly used fundamental types. The type signature for the symbol is Object_infoRefFunction, to fetch the function pointer see Object_info.get_ref_function.

val get_unref_function : t Ctypes.structure Ctypes.ptr -> string option

Obtain the symbol name of the function that should be called to unref this object type. It's mainly used fundamental types. The type signature for the symbol is Object_infoUnrefFunction, to fetch the function pointer see Object_info.get_unref_function.

val get_set_value_function : t Ctypes.structure Ctypes.ptr -> string option

Obtain the symbol name of the function that should be called to convert set a GValue giving an object instance pointer of this object type. I's mainly used fundamental types. The type signature for the symbol is Object_infoSetValueFunction, to fetch the function pointer see Object_info.get_set_value_function.

val get_get_value_function : t Ctypes.structure Ctypes.ptr -> string option

Obtain the symbol name of the function that should be called to convert an object instance pointer of this object type to a GValue. I's mainly used fundamental types. The type signature for the symbol is Object_infoGetValueFunction, to fetch the function pointer see Object_info.get_get_value_function.

val find_vfunc_using_interfaces : t Ctypes.structure Ctypes.ptr -> string -> VFunc_info.t Ctypes.structure Ctypes.ptr option * t Ctypes.structure Ctypes.ptr option

Locate a virtual function slot with name name , searching both the object info and any interfaces it implements. Note that the namespace for virtuals is distinct from that of methods; there may or may not be a concrete method associated for a virtual. If there is one, it may be retrieved using g_vfunc_info_get_invoker(), otherwise None will be returned. Note that this function does *not* search parent classes; you will have to chain up if that's desired.

Just cast OCaml Ctypes base info to object info.

Just cast OCaml Ctypes object info to base info

Return a Object_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 Object_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.

Just cast OCaml Ctypes registeredtype info to object info.

Just cast OCaml Ctypes object info to registeredtype info

Return a Object_info.t from a Registered_type_info.t, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Registered_type_info.registeredtypeinfo_unref.

Return a Registered_type_info.t form a Object_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Registered_type_info.registeredtypeinfo_unref.

OCaml

Innovation. Community. Security.