package gobject-introspection

  1. Overview
  2. Docs

Field_info — Struct representing a struct or union field

type t

A Field_info struct represents a field of a struct (see Struct_info), union (see Union_info) or an object (see Object_info). The Field_info is fetched by calling Struct_info.get_field, Union_info.get_field or Object_info.get_field. A field has a size, type and a struct offset asssociated and a set of flags, which is currently GI_FIELD_IS_READABLE or GI_FIELD_IS_WRITABLE.

val fieldinfo : t Ctypes.structure Ctypes.typ

Obtain the flags for this Field_info. See Field_info.flags for possible flag values.

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

Obtain the offset in bits of the field member, this is relative to the beginning of the struct or union.

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

Obtain the size in bits of the field member, this is how much space you need to allocate to store the field.

Obtain the type of a field as a Type_info.

Just cast OCaml Ctypes base info to field info.

Just cast OCaml Ctypes field info to base info

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

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