T-value
Gnome::GObject::T-value
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
Class initialization
new
Initialization of a type class is simple and only needed when the standalone functions are used.
method new ( )
#------------------------------------------------------------------------------- #--[Record Structure Documentation]--------------------------------------------- #-------------------------------------------------------------------------------
Record N-Value
class N-Value:auth<github:MARTIMM>:api<2> is export is repr('CStruct') {
has GType $.g-type;
has gchar-pptr $.data;
}
g-type;
data;
#------------------------------------------------------------------------------- #--[Constants]------------------------------------------------------------------ #-------------------------------------------------------------------------------
Constants
G_VALUE_INTERNED_STRING
For string values, indicates that the string contained is canonical and will
exist for the duration of the process. See .set-interned-string().
G_VALUE_NOCOPY_CONTENTS
If passed to G_VALUE_COLLECT(), allocated data won't be copied
but used verbatim. This does not affect ref-counted types like
objects. This does not affect usage of .copy(), the data will
be copied if it is not ref-counted.
#------------------------------------------------------------------------------- #--[Callback Functions]--------------------------------------------------------- #-------------------------------------------------------------------------------
Callback Functions
ValueTransform
Signature
:( N-Object $src-value, N-Object $dest-value )
src-value; Source value.
dest-value; Target value.
#------------------------------------------------------------------------------- #--[Standalone Functions]------------------------------------------------------- #-------------------------------------------------------------------------------
Standalone Functions
#-------------------------------------------------------------------------------
value-register-transform-func
Registers a value transformation function for use in .transform().
A previously registered transformation function for $src-type and $dest-type
will be replaced.
method value-register-transform-func ( GType $src-type, GType $dest-type, &transform-func )
$src-type; Source type..
$dest-type; Target type..
&transform-func; a function which transforms values of type
$src-typeinto value of type$dest-type. Tthe function must be specified with following signature;:( N-Object $src-value, N-Object $dest-value ).
#-------------------------------------------------------------------------------
value-type-compatible
Returns whether a Gnome::GObject::T-value of type $src-type can be copied into
a Gnome::GObject::T-value of type $dest-type.
method value-type-compatible ( GType $src-type, GType $dest-type --> Bool )
$src-type; source type to be copied..
$dest-type; destination type for copying..
Return value; True if .copy() is possible with $src-type and $dest-type..
#-------------------------------------------------------------------------------
value-type-transformable
Check whether .transform() is able to transform values
of type $src-type into values of type $dest-type. Note that for
the types to be transformable, they must be compatible or a
transformation function must be registered.
method value-type-transformable ( GType $src-type, GType $dest-type --> Bool )
$src-type; Source type..
$dest-type; Target type..
Return value; True if the transformation is possible, False otherwise..