G-Golf class, accessors, methods and procedures to deal with C struct types.
G-Golf class, accessors, methods and procedures to deal with C struct types.
<gi-struct>
is a class. It’s an instance of <class>
.
Superclasses are:
<object>
Class Precedence List is:
<g-struct>
<object>
<top>
Directs slots are:
g-type
g-name
name
alignment
size
is-gtype-struct?
is-foreign?
field-types
field-desc
scm-types
init-vals
is-opaque?
is-semi-opaque?
Instances of the <gi-struct>
are immutable (to be precise, there
are not meant to be mutated, see GOOPS Notes and Conventions,
’Slots are not Immutable’).
Returns the content of their respective slot for inst.
Returns #t
if inst is ‘opaque’, otherwise,
it returns #f
.
A <gi-struct> instance is said to be ‘opaque’ when the call to
g-struct-info-get-size
upon its GIStructInfo pointer returns
zero
. In scheme, these <gi-struct> instances have no fields.
‘Opaque’ boxed types should never be ‘decoded’, nor ‘encoded’. Instead, procedures, accessors and methods should ‘blindingly’ receive, pass and/or return their pointer(s).
Returns #t
if inst is ‘semi-opaque’, otherwise,
it returns #f
.
A <gi-struct> instance is said to be ‘semi-opaque’ when one of its
field types is void
, interface
or if the total size of the
scm-types
differs from the inst size slot vlue.
‘Semi-opaque’ boxed types should never be ‘decoded’, nor ‘encoded’. Instead, procedures, accessors and methods should ‘blindingly’ receive, pass and/or return their pointer(s).
Returns an integer.
Obtain and returns the field-name offset for inst, It is an error to call this method if there is no such field-name defined for inst.