Module GObject_introspection.Struct_info

type t

Struct_info represents a generic C structure type. A structure has methods and fields.

val structinfo : t Ctypes.structure Ctypes.typ
val is_gtype_struct : t Ctypes.structure Ctypes.ptr -> bool

Return true if this structure represents the "class structure" for some GObject or GInterface. This function is mainly useful to hide this kind of structure from generated public APIs.

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

Obtain the required alignment of the structure.

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

Obtain the total size of the structure.

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

No doc yet

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

Obtain the number of fields this structure has.

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

Obtain the number of methods this structure has.

val get_field : t Ctypes.structure Ctypes.ptr -> int -> Field_info.t Ctypes.structure Ctypes.ptr

Obtain the type information for field with specified index.

val get_method : t Ctypes.structure Ctypes.ptr -> int -> Function_info.t Ctypes.structure Ctypes.ptr

Obtain the type information for method with specified index.

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

Obtain the type information for method named name .

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

val cast_from_registeredtypeinfo : Registered_type_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Just cast OCaml Ctypes registeredtype info to struct info.

val cast_to_registeredtypeinfo : t Ctypes.structure Ctypes.ptr -> Registered_type_info.t Ctypes.structure Ctypes.ptr

Just cast OCaml Ctypes struct info to registeredtype info

val from_registeredtypeinfo : Registered_type_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Return a Struct_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.

val to_registeredtypeinfo : t Ctypes.structure Ctypes.ptr -> Registered_type_info.t Ctypes.structure Ctypes.ptr

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