### ----------------------------------------------------
### -- Gnome::GObject
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/GObject/Value.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 3
 self._get-native-object-no-reffing,
  )
}

sub g_value_get_schar (
  N-GValue $value --> gint8
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-string:
=begin pod
=head2 get-string

Get the contents of a C<G-TYPE-STRING> B<Gnome::GObject::Value>.

Returns: string content of I<value>

  method get-string ( --> Str )

=end pod

method get-string ( --> Str ) {

  g_value_get_string(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_string (
  N-GValue $value --> gchar-ptr
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-uchar:
=begin pod
=head2 get-uchar

Get the contents of a C<G-TYPE-UCHAR> B<Gnome::GObject::Value>.

Returns: unsigned character contents of I<value>

  method get-uchar ( --> UInt )

=end pod

method get-uchar ( --> UInt ) {

  g_value_get_uchar(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_uchar (
  N-GValue $value --> guchar
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-uint:
=begin pod
=head2 get-uint

Get the contents of a C<G-TYPE-UINT> B<Gnome::GObject::Value>.

Returns: unsigned integer contents of I<value>

  method get-uint ( --> UInt )

=end pod

method get-uint ( --> UInt ) {

  g_value_get_uint(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_uint (
  N-GValue $value --> guint
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-uint64:
=begin pod
=head2 get-uint64

Get the contents of a C<G-TYPE-UINT64> B<Gnome::GObject::Value>.

Returns: unsigned 64bit integer contents of I<value>

  method get-uint64 ( --> UInt )

=end pod

method get-uint64 ( --> UInt ) {

  g_value_get_uint64(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_uint64 (
  N-GValue $value --> guint64
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-ulong:
=begin pod
=head2 get-ulong

Get the contents of a C<G-TYPE-ULONG> B<Gnome::GObject::Value>.

Returns: unsigned long integer contents of I<value>

  method get-ulong ( --> UInt )

=end pod

method get-ulong ( --> UInt ) {

  g_value_get_ulong(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_ulong (
  N-GValue $value --> gulong
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:get-variant:
=begin pod
=head2 get-variant

Get the contents of a variant B<Gnome::GObject::Value>.

Returns: variant contents of I<value> (may be C<undefined>)

  method get-variant ( --> N-GValue )

=end pod

method get-variant ( --> N-GValue ) {

  g_value_get_variant(
    self._get-native-object-no-reffing,
  )
}

sub g_value_get_variant (
  N-GValue $value --> N-GValue
) is native(&gobject-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# moved to Gnome::GObject::Type
# TM:0:gtype-get-type:
=begin pod
=head2 gtype-get-type

  method gtype-get-type ( --> UInt )

=end pod

sub g_gtype_get_type (  --> GType )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:init-from-instance:
=begin pod
=head2 init-from-instance

Initializes and sets I<value> from an instantiatable type via the value-table's C<collect-value()> function.

Note: The I<value> will be initialised with the exact type of I<instance>. If you wish to set the I<value>'s type to a different GType (such as a parent class GType), you need to manually call C<init()> and C<g-value-set-instance()>.

  method init-from-instance ( Pointer $instance )

=item Pointer $instance; (type GObject.TypeInstance): the instance
=end pod

method init-from-instance ( Pointer $instance ) {

  g_value_init_from_instance(
    self._get-native-object-no-reffing, $instance
  );
}

sub g_value_init_from_instance (
  N-GValue $value, gpointer $instance
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:peek-pointer:
=begin pod
=head2 peek-pointer

Returns the value contents as pointer. This function asserts that C<fits-pointer()> returned C<True> for the passed in value. This is an internal function introduced mainly for C marshallers.

Returns: the value contents as pointer

  method peek-pointer ( --> Pointer )

=end pod

method peek-pointer ( --> Pointer ) {

  g_value_peek_pointer(
    self._get-native-object-no-reffing,
  )
}

sub g_value_peek_pointer (
  N-GValue $value --> gpointer
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:pointer-type-register-static:
=begin pod
=head2 pointer-type-register-static

Creates a new C<G-TYPE-POINTER> derived type id for a new pointer type with name I<name>.

Returns: a new C<G-TYPE-POINTER> derived type id for I<name>.

  method g-pointer-type-register-static ( Str $name --> N-GValue )

=item Str $name; the name of the new pointer type.
=end pod

method pointer-type-register-static ( Str $name --> N-GValue ) {

  g_pointer_type_register_static(
    self._get-native-object-no-reffing, $name
  )
}

sub g_pointer_type_register_static (
  gchar-ptr $name --> N-GValue
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:register-transform-func:
=begin pod
=head2 register-transform-func

Registers a value transformation function for use in C<transform()>. A previously registered transformation function for I<src-type> and I<dest-type> will be replaced.

  method register-transform-func ( N-GValue $src_type, N-GValue $dest_type, GValueTransform $transform_func )

=item N-GValue $src_type; Source type.
=item N-GValue $dest_type; Target type.
=item GValueTransform $transform_func; a function which transforms values of type I<src-type> into value of type I<dest-type>
=end pod

method register-transform-func ( $src_type is copy, $dest_type is copy, GValueTransform $transform_func ) {
  $src_type .= _get-native-object-no-reffing unless $src_type ~~ N-GValue;
  $dest_type .= _get-native-object-no-reffing unless $dest_type ~~ N-GValue;

  g_value_register_transform_func(
    self._get-native-object-no-reffing, $src_type, $dest_type, $transform_func
  );
}

sub g_value_register_transform_func (
  N-GValue $src_type, N-GValue $dest_type, GValueTransform $transform_func
) is native(&gobject-lib)
  { * }
}}

#-------------------------------------------------------------------------------
# TM:0:reset:
=begin pod
=head2 reset

Clears the current value in I<value> and resets it to the default value (as if the value had just been initialized).

Returns: the B<Gnome::GObject::Value> structure that has been passed in

  method reset ( --> N-GValue )

=end pod

method reset ( --> N-GValue ) {
  g_value_reset( self._get-native-object-no-reffing )
}

sub g_value_reset (
  N-GValue $value --> N-GValue
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-boolean:
=begin pod
=head2 set-boolean

Set the contents of a C<G-TYPE-BOOLEAN> B<Gnome::GObject::Value> to I<v-boolean>.

  method set-boolean ( Bool $v_boolean )

=item Bool $v_boolean; boolean value to be set
=end pod

method set-boolean ( Bool $v_boolean ) {

  g_value_set_boolean(
    self._get-native-object-no-reffing, $v_boolean
  );
}

sub g_value_set_boolean (
  N-GValue $value, gboolean $v_boolean
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-double:
=begin pod
=head2 set-double

Set the contents of a C<G-TYPE-DOUBLE> B<Gnome::GObject::Value> to I<v-double>.

  method set-double ( Num() $v_double )

=item Num() $v_double; double value to be set
=end pod

method set-double ( Num() $v_double ) {

  g_value_set_double(
    self._get-native-object-no-reffing, $v_double
  );
}

sub g_value_set_double (
  N-GValue $value, gdouble $v_double
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-enum:
=begin pod
=head2 set-enum

Set the contents of a C<G-TYPE-ENUM> B<Gnome::GObject::Value> to I<v-enum>.

  method set-enum ( Int() $v_enum )

=item Int() $v_enum; enum value to be set
=end pod

method set-enum ( Int() $v_enum ) {

  g_value_set_enum(
    self._get-native-object-no-reffing, $v_enum
  );
}

sub g_value_set_enum (
  N-GValue $value, gint $v_enum
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-flags:
=begin pod
=head2 set-flags

Set the contents of a C<G-TYPE-FLAGS> B<Gnome::GObject::Value> to I<v-flags>.

  method set-flags ( UInt $v_flags )

=item UInt $v_flags; flags value to be set
=end pod

method set-flags ( UInt $v_flags ) {

  g_value_set_flags(
    self._get-native-object-no-reffing, $v_flags
  );
}

sub g_value_set_flags (
  N-GValue $value, guint $v_flags
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-float:
=begin pod
=head2 set-float

Set the contents of a C<G-TYPE-FLOAT> B<Gnome::GObject::Value> to I<v-float>.

  method set-float ( Num() $v_float )

=item Num() $v_float; float value to be set
=end pod

method set-float ( Num() $v_float ) {

  g_value_set_float(
    self._get-native-object-no-reffing, $v_float
  );
}

sub g_value_set_float (
  N-GValue $value, gfloat $v_float
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-gtype:
=begin pod
=head2 set-gtype

Set the contents of a C<G-TYPE-GTYPE> B<Gnome::GObject::Value> to I<v-gtype>.

  method set-gtype ( N-GValue $v_gtype )

=item N-GValue $v_gtype; B<Gnome::GObject::Type> to be set
=end pod

method set-gtype ( $v_gtype is copy ) {
  $v_gtype .= _get-native-object-no-reffing unless $v_gtype ~~ N-GValue;

  g_value_set_gtype(
    self._get-native-object-no-reffing, $v_gtype
  );
}

sub g_value_set_gtype (
  N-GValue $value, N-GValue $v_gtype
) is native(&gobject-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# TM:0:set-instance:
=begin pod
=head2 set-instance

Sets I<value> from an instantiatable type via the value-table's C<collect-value()> function.

  method set-instance ( Pointer $instance )

=item Pointer $instance; the instance
=end pod

method set-instance ( Pointer $instance ) {

  g_value_set_instance(
    self._get-native-object-no-reffing, $instance
  );
}

sub g_value_set_instance (
  N-GValue $value, gpointer $instance
) is native(&gobject-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:set-int:
=begin pod
=head2 set-int

Set the contents of a C<G-TYPE-INT> B<Gnome::GObject::Value> to I<v-int>.

  method set-int ( Int() $v_int )

=item Int() $v_int; integer value to be set
=end pod

method set-int ( Int() $v_int ) {

  g_value_set_int(
    self._get-native-object-no-reffing, $v_int
  );
}

sub g_value_set_int (
  N-GValue $value, gint $v_int
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-int64:
=begin pod
=head2 set-int64

Set the contents of a C<G-TYPE-INT64> B<Gnome::GObject::Value> to I<v-int64>.

  method set-int64 ( Int() $v_int64 )

=item Int() $v_int64; 64bit integer value to be set
=end pod

method set-int64 ( Int() $v_int64 ) {

  g_value_set_int64(
    self._get-native-object-no-reffing, $v_int64
  );
}

sub g_value_set_int64 (
  N-GValue $value, gint64 $v_int64
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-long:
=begin pod
=head2 set-long

Set the contents of a C<G-TYPE-LONG> B<Gnome::GObject::Value> to I<v-long>.

  method set-long ( Int() $v_long )

=item Int() $v_long; long integer value to be set
=end pod

method set-long ( Int() $v_long ) {
  g_value_set_long( self._get-native-object-no-reffing, $v_long);
}

sub g_value_set_long (
  N-GValue $value, glong $v_long
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-pointer:
=begin pod
=head2 set-pointer

Set the contents of a pointer B<Gnome::GObject::Value> to I<v-pointer>.

  method set-pointer ( Pointer $v_pointer )

=item Pointer $v_pointer; pointer value to be set
=end pod

method set-pointer ( Pointer $v_pointer ) {
  g_value_set_pointer( self._get-native-object-no-reffing, $v_pointer);
}

sub g_value_set_pointer (
  N-GValue $value, gpointer $v_pointer
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-schar:
=begin pod
=head2 set-schar

Set the contents of a C<G-TYPE-CHAR> B<Gnome::GObject::Value> to I<v-char>.

  method set-schar ( Int() $v_char )

=item Int() $v_char; signed 8 bit integer to be set
=end pod

method set-schar ( Int() $v_char ) {
  g_value_set_schar( self._get-native-object-no-reffing, $v_char);
}

sub g_value_set_schar (
  N-GValue $value, gint8 $v_char
) is native(&gobject-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# TM:0:set-static-string:
=begin pod
=head2 set-static-string

Set the contents of a C<G-TYPE-STRING> B<Gnome::GObject::Value> to I<v-string>. The string is assumed to be static, and is thus not duplicated when setting the B<Gnome::GObject::Value>.

  method set-static-string ( Str $v_string )

=item Str $v_string; static string to be set
=end pod

method set-static-string ( Str $v_string ) {

  g_value_set_static_string(
    self._get-native-object-no-reffing, $v_string
  );
}

sub g_value_set_static_string (
  N-GValue $value, gchar-ptr $v_string
) is native(&gobject-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:set-string:
=begin pod
=head2 set-string

Set the contents of a C<G-TYPE-STRING> B<Gnome::GObject::Value> to I<v-string>.

  method set-string ( Str $v_string )

=item Str $v_string; caller-owned string to be duplicated for the B<Gnome::GObject::Value>
=end pod

method set-string ( Str $v_string ) {

  g_value_set_string(
    self._get-native-object-no-reffing, $v_string
  );
}

sub g_value_set_string (
  N-GValue $value, gchar-ptr $v_string
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-uchar:
=begin pod
=head2 set-uchar

Set the contents of a C<G-TYPE-UCHAR> B<Gnome::GObject::Value> to I<v-uchar>.

  method set-uchar ( UInt $v_uchar )

=item UInt $v_uchar; unsigned character value to be set
=end pod

method set-uchar ( UInt $v_uchar ) {

  g_value_set_uchar(
    self._get-native-object-no-reffing, $v_uchar
  );
}

sub g_value_set_uchar (
  N-GValue $value, guchar $v_uchar
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-uint:
=begin pod
=head2 set-uint

Set the contents of a C<G-TYPE-UINT> B<Gnome::GObject::Value> to I<v-uint>.

  method set-uint ( UInt $v_uint )

=item UInt $v_uint; unsigned integer value to be set
=end pod

method set-uint ( UInt $v_uint ) {

  g_value_set_uint(
    self._get-native-object-no-reffing, $v_uint
  );
}

sub g_value_set_uint (
  N-GValue $value, guint $v_uint
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-uint64:
=begin pod
=head2 set-uint64

Set the contents of a C<G-TYPE-UINT64> B<Gnome::GObject::Value> to I<v-uint64>.

  method set-uint64 ( UInt $v_uint64 )

=item UInt $v_uint64; unsigned 64bit integer value to be set
=end pod

method set-uint64 ( UInt $v_uint64 ) {

  g_value_set_uint64(
    self._get-native-object-no-reffing, $v_uint64
  );
}

sub g_value_set_uint64 (
  N-GValue $value, guint64 $v_uint64
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-ulong:
=begin pod
=head2 set-ulong

Set the contents of a C<G-TYPE-ULONG> B<Gnome::GObject::Value> to I<v-ulong>.

  method set-ulong ( UInt $v_ulong )

=item UInt $v_ulong; unsigned long integer value to be set
=end pod

method set-ulong ( UInt $v_ulong ) {

  g_value_set_ulong(
    self._get-native-object-no-reffing, $v_ulong
  );
}

sub g_value_set_ulong (
  N-GValue $value, gulong $v_ulong
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-variant:
=begin pod
=head2 set-variant

Set the contents of a variant B<Gnome::GObject::Value> to I<variant>. If the variant is floating, it is consumed.

  method set-variant ( N-GValue $variant )

=item N-GValue $variant; a B<Gnome::GObject::Variant>, or C<undefined>
=end pod

method set-variant ( $variant is copy ) {
  $variant .= _get-native-object-no-reffing unless $variant ~~ N-GValue;

  g_value_set_variant(
    self._get-native-object-no-reffing, $variant
  );
}

sub g_value_set_variant (
  N-GValue $value, N-GValue $variant
) is native(&gobject-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# TM:0:strdup-value-contents:
=begin pod
=head2 strdup-value-contents

Return a newly allocated string, which describes the contents of a B<Gnome::GObject::Value>. The main purpose of this function is to describe B<Gnome::GObject::Value> contents for debugging output, the way in which the contents are described may change between different GLib versions.

Returns: Newly allocated string.

  method strdup-value-contents ( --> Str )

=end pod

method strdup-value-contents ( --> Str ) {

  g_strdup_value_contents(
    self._get-native-object-no-reffing,
  )
}

sub g_strdup_value_contents (
  N-GValue $value --> gchar-ptr
) is native(&gobject-lib)
  { * }
}}

#-------------------------------------------------------------------------------
# TM:0:take-string:
=begin pod
=head2 take-string

Sets the contents of a C<G-TYPE-STRING> B<Gnome::GObject::Value> to I<v-string>.

  method take-string ( Str $v_string )

=item Str $v_string; string to take ownership of
=end pod

method take-string ( Str $v_string ) {

  g_value_take_string(
    self._get-native-object-no-reffing, $v_string
  );
}

sub g_value_take_string (
  N-GValue $value, gchar-ptr $v_string
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:take-variant:
=begin pod
=head2 take-variant

Set the contents of a variant B<Gnome::GObject::Value> to I<variant>, and takes over the ownership of the caller's reference to I<variant>; the caller doesn't have to unref it any more (i.e. the reference count of the variant is not increased).

If I<variant> was floating then its floating reference is converted to a hard reference.

If you want the B<Gnome::GObject::Value> to hold its own reference to I<variant>, use C<set-variant()> instead.

This is an internal function introduced mainly for C marshallers.

  method take-variant ( N-GValue $variant )

=item N-GValue $variant; a B<Gnome::GObject::Variant>, or C<undefined>
=end pod

method take-variant ( $variant is copy ) {
  $variant .= _get-native-object-no-reffing unless $variant ~~ N-GValue;

  g_value_take_variant(
    self._get-native-object-no-reffing, $variant
  );
}

sub g_value_take_variant (
  N-GValue $value, N-GValue $variant
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:transform:
=begin pod
=head2 transform

Tries to cast the contents of this into a type appropriate to store in I<$dest-value>, e.g. to transform a C<G-TYPE-INT> value into a C<G-TYPE-FLOAT> value. Performing transformations between value types might incur precision lossage. Especially transformations into strings might reveal seemingly arbitrary results and shouldn't be relied upon for production code (such as rcfile value or object property serialization).

Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, I<$dest-value> is left untouched.

  method transform ( N-GValue $dest_value --> Bool )

=item N-GValue $dest_value; Target value.
=end pod

method transform ( $dest_value is copy --> Bool ) {
  $dest_value .= _get-native-object-no-reffing unless $dest_value ~~ N-GValue;
  g_value_transform( self._get-native-object-no-reffing, $dest_value).Bool
}

sub g_value_transform (
  N-GValue $src_value, N-GValue $dest_value --> gboolean
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:type-compatible:
=begin pod
=head2 type-compatible

Returns whether a B<N-GValue> of type I<$src-type> can be copied into a B<-GValue> of type I<$dest-type>.

Returns: C<True> if C<copy()> is possible with I<src-type> and I<dest-type>.

  method type-compatible ( UInt $src_type, UInt $dest_type --> Bool )

=item UInt $src_type; source type to be copied.
=item UInt $dest_type; destination type for copying.
=end pod

method type-compatible ( GType $src_type, GType $dest_type --> Bool ) {
  g_value_type_compatible( $src_type, $dest_type).Bool
}

sub g_value_type_compatible (
  GType $src_type, GType $dest_type --> gboolean
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:type-transformable:
=begin pod
=head2 type-transformable

Check whether C<transform()> is able to transform values of type I<src-type> into values of type I<dest-type>. Note that for the types to be transformable, they must be compatible or a transformation function must be registered.

Returns: C<True> if the transformation is possible, C<False> otherwise.

  method type-transformable ( UInt $src_type, UInt $dest_type --> Bool )

=item UInt $src_type; Source type.
=item UInt $dest_type; Target type.
=end pod

method type-transformable ( GType $src_type, GType $dest_type --> Bool ) {
  g_value_type_transformable( $src_type, $dest_type).Bool
}

sub g_value_type_transformable (
  GType $src_type, GType $dest_type --> gboolean
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:_g_value_unset:
#`{{
=begin pod
=head2 unset

Clears the current value in I<value> (if any) and "unsets" the type, this releases all resources associated with this GValue. An unset value is the same as an uninitialized (zero-filled) B<Gnome::GObject::Value> structure.

  method unset ( )

=end pod

method unset ( ) {
  g_value_unset(self._get-native-object-no-reffing);
}
}}

sub _g_value_unset (
  N-GValue $value
) is native(&gobject-lib)
  is symbol('g_value_unset')
  { * }

#-------------------------------------------------------------------------------
#TM:2:_g_value_init:new
#`{{
=begin pod
=head2 init

Initializes I<value> with the default value of I<type>.

Returns: the B<Gnome::GObject::Value> structure that has been passed in

  method init ( N-GValue $g_type --> N-GValue )

=item N-GValue $g_type; Type the B<Gnome::GObject::Value> should hold values of.
=end pod

method init ( $g_type is copy --> N-GValue ) {
  $g_type .= _get-native-object-no-reffing unless $g_type ~~ N-GValue;

  g_value_init(
    self._get-native-object-no-reffing, $g_type
  )
}
}}

sub _g_value_init (
  N-GValue $value, GType $g_type --> N-GValue
) is native(&gobject-lib)
  is symbol('g_value_init')
  { * }































=finish

#-------------------------------------------------------------------------------
#TM:2:g_value_init:new(:init)
=begin pod
=head2 [g_] value_init

Initializes with the default value of I<$g_type>.

Returns: the B<N-GValue> structure that has been passed in

  method g_value_init ( UInt $g_type --> N-GValue  )

=item UInt $g_type; Type the B<N-GValue> should hold values of.

=end pod

sub g_value_init ( N-GValue $value, GType $g_type --> N-GValue )
  is native(&gobject-lib)
  { * }

#`{{
# Useless sub. destination must be initialized with type and value of which
# value gets overwritten. So before copy, one must create the dest first
# before it can be used to copy to.
#-------------------------------------------------------------------------------
# TM:0:g_value_copy:
=begin pod
=head2 [g_] value_copy

Returns a copy of this object.

  method g_value_copy ( --> Gnome::GObject::Value )

=end pod

sub g_value_copy ( N-GValue $src_value --> Gnome::GObject::Value ) {
#note"type: ", $src_value.g-type;
  my N-GValue $nv .= new(:init($src_value.g-type));
  _g_value_copy( $src_value, $nv);
  Gnome::GObject::Value.new(:native-object($nv))
}

sub _g_value_copy ( N-GValue $src_value, N-GValue $dest_value is rw )
  is native(&gobject-lib)
  is symbol('g_value_copy')
  { * }
}}
#-------------------------------------------------------------------------------
#TM:1:g_value_reset:
=begin pod
=head2 [g_] value_reset

Clears the current value in this object and resets it to the default value (as if the value had just been initialized).

Returns: the B<N-GValue> structure that has been passed in

  method g_value_reset ( --> N-GValue )


=end pod

sub g_value_reset ( N-GValue $value --> N-GValue )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_unset:
=begin pod
=head2 [g_] value_unset

Clears the current value (if any) and "unsets" the type, this releases all resources associated with this GValue. An unset value is the same as an uninitialized (zero-filled) B<N-GValue> structure. The method C<.is-valid()> will return False after the call.

  method g_value_unset ( )

=end pod

sub g_value_unset ( N-GValue $value ) {
  Gnome::N::deprecate(
    '.g_value_unset', '.clear-object', '0.16.0', '0.18.0'
  );

  _g_value_unset($value);
}

sub _g_value_unset ( N-GValue $value )
  is native(&gobject-lib)
  is symbol('g_value_unset')
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_type_compatible:
=begin pod
=head2 [[g_] value_] type_compatible

Returns whether a B<N-GValue> of type I<$src_type> can be copied into a B<N-GValue> of type I<$dest_type>.

Returns: C<1> if C<g_value_copy()> is possible with I<$src_type> and I<dest_type>.

  method g_value_type_compatible (
    UInt $src_type, UInt $dest_type --> Int
  )

=item UInt $src_type; source type to be copied.
=item UInt $dest_type; destination type for copying.

=end pod

sub g_value_type_compatible ( GType $src_type, GType $dest_type --> gboolean )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_type_transformable:
=begin pod
=head2 [[g_] value_] type_transformable

Check whether C<g_value_transform()> is able to transform values of type I<$src_type> into values of type I<$dest_type>. Note that for the types to be transformable, they must be compatible or a transformation function must be registered.

Returns: C<1> if the transformation is possible, C<0> otherwise.

  method g_value_type_transformable (
    UInt $src_type, UInt $dest_type --> Int
  )

=item UInt $src_type; Source type.
=item UInt $dest_type; Target type.

=end pod

sub g_value_type_transformable (
  GType $src_type, GType $dest_type --> gboolean
) is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_transform:
=begin pod
=head2 [g_] value_transform

Tries to cast the contents of this value into a type appropriate to store in I<$dest_value>, e.g. to transform a C<G_TYPE_INT> value into a C<G_TYPE_FLOAT> value. Performing transformations between value types might incur precision lossage. Especially transformations into strings might reveal seemingly arbitrary results and shouldn't be relied upon for production code (such as rcfile value or object property serialization).

Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, I<$dest_value> is left untouched and C<0> is returned.

  method g_value_transform ( N-GValue $dest_value --> Int )

=item N-GValue $dest_value; Target value.

=end pod

sub g_value_transform ( N-GValue $src_value, N-GValue $dest_value --> gboolean )
  is native(&gobject-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# TM:0:g_value_register_transform_func:
=begin pod
=head2 [[g_] value_] register_transform_func

Registers a value transformation function for use in C<g_value_transform()>.
A previously registered transformation function for I<src_type> and I<dest_type>
will be replaced.

  method g_value_register_transform_func ( UInt $src_type, UInt $dest_type, GValueTransform $transform_func )

=item UInt $src_type; Source type.
=item UInt $dest_type; Target type.
=item GValueTransform $transform_func; a function which transforms values of type I<src_type> into value of type I<dest_type>

=end pod

sub g_value_register_transform_func ( uint64 $src_type, uint64 $dest_type, GValueTransform $transform_func )
  is native(&gobject-lib)
  { * }
}}




#-------------------------------------------------------------------------------
#TM:1:g_value_set_schar:
=begin pod
=head2 [g_] value_set_schar

Set the contents of a C<G_TYPE_CHAR> typed B<N-GValue> to I<$v_char>.

  method g_value_set_schar ( Int $v_char )

=item Int $v_char; signed 8 bit integer to be set

=end pod

sub g_value_set_schar ( N-GValue $value, gint8 $v_char )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_get_schar:
=begin pod
=head2 [g_] value_get_schar

Get the signed 8 bit integer contents of a C<G_TYPE_CHAR> typed B<N-GValue>.

  method g_value_get_schar ( --> Int  )

=end pod

sub g_value_get_schar ( N-GValue $value --> gint8 )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_set_uchar:
=begin pod
=head2 [g_] value_set_uchar

Set the contents of a C<G_TYPE_UCHAR> typed B<N-GValue> to I<$v_uchar>.

  method g_value_set_uchar ( UInt $v_uchar )

=item UInt $v_uchar; unsigned character value to be set

=end pod

sub g_value_set_uchar ( N-GValue $value, guint8 $v_uchar )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_get_uchar:
=begin pod
=head2 [g_] value_get_uchar

Get the contents of a C<G_TYPE_UCHAR> typed B<N-GValue>.

  method g_value_get_uchar ( --> UInt  )

=end pod

sub g_value_get_uchar ( N-GValue $value --> guint8 )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_set_boolean:
=begin pod
=head2 [g_] value_set_boolean

Set the contents of a C<G_TYPE_BOOLEAN> typed B<N-GValue> to I<$v_boolean>.

  method g_value_set_boolean ( Bool $v_boolean )

=item Int $v_boolean; boolean value to be set

=end pod

sub g_value_set_boolean ( N-GValue $value, gboolean $v_boolean )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_get_boolean:
=begin pod
=head2 [g_] value_get_boolean

Get the contents of a C<G_TYPE_BOOLEAN> typed B<N-GValue>. Returns 0 or 1.

  method g_value_get_boolean ( --> Int )

=end pod

sub g_value_get_boolean ( N-GValue $value --> gboolean )
  is native(&gobject-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:g_value_set_int:
=begin pod
=head2 [g_] value_set_int

Set the contents of a C<G_TYPE_INT> typed B<N-GValue> to I<$v_int>.

  method g_value_set_int ( Int $v_int )

=item Int $v_int; integer value to be set

=end pod

sub g_value_set_int ( N-GValue $value