G-Golf GObject Parameters and Values low level API.
Parameters and Values — Standard Parameter and Value Types
g-value-type
g-value-type-tag
g-value-type-name
g-value-ref
g-value-set!
g-param-spec-boolean
g-value-get-boolean
g-value-set-boolean
g-param-spec-int
g-value-get-int
g-value-set-int
g-param-spec-uint
g-value-get-uint
g-value-set-uint
g-param-spec-float
g-value-get-float
g-value-set-float
g-param-spec-double
g-value-get-double
g-value-set-double
g-param-spec-enum
g-value-get-enum
g-value-set-enum
g-param-spec-flags
g-value-get-flags
g-value-set-flags
g-param-spec-string
g-value-get-string
g-value-set-string
g-param-spec-param
g-value-get-param
g-value-set-param
g-param-spec-boxed
g-value-get-boxed
g-value-set-boxed
g-value-get-pointer
g-value-set-pointer
g-param-spec-object
g-value-get-object
g-value-set-object
g-value-get-variant
g-type-param-boolean
g-type-param-char
g-type-param-uchar
g-type-param-int
g-type-param-uint
g-type-param-long
g-type-param-ulong
g-type-param-int64
g-type-param-uint64
g-type-param-float
g-type-param-double
g-type-param-enum
g-type-param-flags
g-type-param-string
g-type-param-param
g-type-param-boxed
g-type-param-pointer
g-type-param-object
g-type-param-unichar
g-type-param-override
g-type-param-gtype
g-type-param-variant
GValue
provides an abstract container structure which can be
copied, transformed and compared while holding a value of any (derived)
type, which is registered as a GType with a GTypeValueTable in its
GTypeInfo structure. Parameter specifications for most value types can
be created as GParamSpec
derived instances, to implement
e.g. GObject properties
which operate on GValue containers.
Parameter names need to start with a letter (a-z or A-Z). Subsequent characters can be letters, numbers or a ’-’. All other characters are replaced by a ’-’ during construction.
Note: in this section, the g-value argument is [must be] a pointer
to a GValue
.
Returns an integer, a symbol or a string, respectively.
Obtains and returns the GType
, the GType
tag (see
%g-type-fundamental-types) or the GType
name (see
g-type-name for g-value, respectively.
Returns the content of g-value.
Obtains and returns the content of g-value. Supported
GType
(their scheme representaion) for g-value are:
boolean
, uint
, int
, float
, double
,
enum
, flags
, string
, boxed
, pointer
,
object
, interface
.
Returns nothing.
Sets the content of g-value to value. Supported
GType
(their scheme representaion) for g-value are:
boolean
, uint
, int
, float
, double
,
enum
, flags
, string
, boxed
, pointer
,
object
, interface
.
Note that this procedure cannot cope with invalid values (the type of
value must correspond to the GType
for g-value,
otherwise it will most likely lead to a crash.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecBoolean
instance
specifying a G_TYPE_BOOLEAN
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, default the default value and flags the flags - for the property specified.
Returns #t
or #f
.
Obtains the content of g-value and returns #f
if it is
0
, otherwise it returns #t
.
Returns nothing.
Sets the content of g-value to 0
if val is
#f
, otherwise sets the content to 1
.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecInt
instance
specifying a G_TYPE_INT
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, minimum the minimum value, maximum the maximum value, default the default value and flags the flags - for the property specified.
Returns a integer.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to int.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecUInt
instance
specifying a G_TYPE_UINT
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, minimum the minimum value, maximum the maximum value, default the default value and flags the flags - for the property specified.
Returns an unsigned integer.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to uint.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecFloat
instance
specifying a G_TYPE_FLOAT
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, minimum the minimum value, maximum the maximum value, default the default value and flags the flags - for the property specified.
Returns a float.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to float.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecDouble
instance
specifying a G_TYPE_DOUBLE
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, minimum the minimum value, maximum the maximum value, default the default value and flags the flags - for the property specified.
Returns a double.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to double.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecEnum
instance
specifying a G_TYPE_ENUM
property.
The name is the canonical name of the property specified,
nick its nick name, blurb its description, type a
<gi-enum>
instance, default the default value and
flags the flags - for the property specified.
Returns a symbol.
Obtains and returns the (registered) enum type info symbol for g-value.
Returns nothing.
Sets the content of g-value to id, or to the id corresponding to sym respectively. The id or the sym must be valid (as in being a valid member of the (registered) enum type info for g-value), otherwise an exception is raised.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecFlags
instance
specifying a G_TYPE_FLAGS
property.
The name is the canonical name of the property specified,
nick its nick name, blurb its description, type a
<gi-flags>
instance, default the default value and
flags the flags - for the property specified.
Returns a list.
Obtains and returns the (registered) list of flags for g-value.
Returns nothing.
Sets the content of g-value to val, or to the value given by calling flags->integer upon the list of flags, respectively. The val or the flags must be valid (as in being a valid member of the (registered) gi-flags type for g-value), otherwise an exception is raised.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecString
instance
specifying a G_TYPE_STRING
property.
The name is the canonical name of the property specified, nick its nick name, blurb its description, default the default value and flags the flags - for the property specified.
Returns a string or #f
.
Obtains and returns the content of g-value, a string or #f
if the g-value content is the %null-pointer
.
Returns nothing.
Sets the content of g-value to str.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecParam
instance
specifying a G_TYPE_PARAM
property.
The name is the canonical name of the property specified,
nick its nick name, blurb its description, type a
GType derived from G_TYPE_PARAM
and flags the flags - for
the property specified.
Returns a (pointer to) GParamSpec
or #f
.
Obtains and returns the content of g-value, a (pointer to)
GParamSpec
or #f
if the g-value content is the
%null-pointer
.
Returns nothing.
Sets the content of g-value to param.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecBoxed
instance
specifying a G_TYPE_BOXED
derived property.
The name is the canonical name of the property specified,
nick its nick name, blurb its description, type a
GType derived from G_TYPE_BOXED
and flags the flags - for
the property specified.
Returns either a list of values, or a pointer.
Obtains and returns the content of g-value. If the boxed type !is-opaque? or !is-semi-opaque?, it ‘blindingly’ returns the boxed instance g-value pointer. Otherwise, the boxed instance is ‘decoded’, and a list of its field values is returned.
Returns nothing.
Sets the content of g-value to boxed. If the boxed type !is-opaque? or !is-semi-opaque?, then boxed is (supposed to be) a pointer, used to ‘blindingly’ set g-value. Otherwise, the boxed instance is (supposed to be) a list of values, that are ‘encoded’, and its (newly created) pointer is used to set g-value.
Returns a pointer.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to pointer.
Returns a pointer.
Creates and returns a pointer to a new GParamSpecBoxed
instance
specifying a G_TYPE_OBJECT
derived property.
The name is the canonical name of the property specified,
nick its nick name, blurb its description, type a
<gobject>
derived type of this property and flags the flags
- for the property specified.
Returns a pointer.
Obtains and returns the content of g-value.
Returns nothing.
Sets the content of g-value to object (a pointer to a
GObject
instance) and increases the object reference count.
Returns a pointer or #f.
Obtains and returns content of a variant g-value, or #f (may be NULL).
Note: in GObject, G_TYPE_PARAM_BOOLEAN, G_TYPE_PARAM_CHAR, etc., are defined as macros. In G-Golf, we define a procedure for each of those types, which binds a libg-golf function which merely invoques the macro, the expansion of which returns the corresponding (dynamic - runtime) GType value.
Returns a GType.
Obtains and returns the GType of GParamSpecBoolean
,
GParamSpecChar
, etc.