Shumate.VectorValue

Fields

None

Methods

class

new ()

class

new_boolean (boolean)

class

new_color (color)

class

new_from_value (value)

class

new_number (number)

class

new_string (string)

array_append (element)

dup ()

equal (b)

free ()

get_boolean ()

get_color ()

get_number ()

get_string ()

get_value_type ()

hash ()

is_null ()

set_boolean (boolean)

set_color (color)

set_number (number)

set_string (string)

start_array ()

unset ()

Details

class Shumate.VectorValue

A mutable value used in the vector style specification.

New in version 1.6.

classmethod new()
Returns:

a new [struct`VectorValue`] with a null value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] with a null value.

New in version 1.6.

classmethod new_boolean(boolean)
Parameters:

boolean (bool) – a boolean value

Returns:

a new [struct`VectorValue`] with the given boolean value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] with a boolean value.

New in version 1.6.

classmethod new_color(color)
Parameters:

color (Gdk.RGBA) – a [struct`Gdk`.RGBA]

Returns:

a new [struct`VectorValue`] with the given color value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] with a color value.

New in version 1.6.

classmethod new_from_value(value)
Parameters:

value (GObject.Value) – a [struct`GObject`.Value]

Returns:

a new [struct`VectorValue`] with the value from value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] from a [struct`GObject`.Value].

New in version 1.6.

classmethod new_number(number)
Parameters:

number (float) – a number value

Returns:

a new [struct`VectorValue`] with the given number value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] with a number value.

New in version 1.6.

classmethod new_string(string)
Parameters:

string (str) – a string value

Returns:

a new [struct`VectorValue`] with the given string value

Return type:

Shumate.VectorValue

Creates a new [struct`VectorValue`] with a string value.

New in version 1.6.

array_append(element)
Parameters:

element (Shumate.VectorValue) – a [struct`VectorValue`] to append to the array

Appends element to the array value of self. The value of element is copied.

New in version 1.6.

dup()
Returns:

a new [struct`VectorValue`] which is a duplicate of self

Return type:

Shumate.VectorValue

Creates a duplicate of self.

New in version 1.6.

equal(b)
Parameters:

b (Shumate.VectorValue) – a [struct`VectorValue`]

Returns:

True if self and b are equal, False otherwise

Return type:

bool

Compares two [struct`VectorValue`]s for equality.

New in version 1.6.

free()

Frees a [struct`VectorValue`].

New in version 1.6.

get_boolean()
Returns:

True if self is a boolean value and boolean was set, False otherwise

boolean:

a location to store the boolean value

Return type:

(bool, boolean: bool)

Gets the boolean value of self.

New in version 1.6.

get_color()
Returns:

True if self is a color value and color was set, False otherwise

color:

a location to store the color value

Return type:

(bool, color: Gdk.RGBA)

Gets the color value of self.

If self is a string value, it will attempt to parse the string as a color.

New in version 1.6.

get_number()
Returns:

True if self is a number value and number was set, False otherwise

number:

a location to store the number value

Return type:

(bool, number: float)

Gets the number value of self.

New in version 1.6.

get_string()
Returns:

True if self is a string value and string was set, False otherwise

string:

a location to store the string value

Return type:

(bool, string: str or None)

Gets the string value of self.

New in version 1.6.

get_value_type()
Returns:

the type of self

Return type:

Shumate.VectorValueType

Gets the type of value stored in self.

New in version 1.6.

hash()
Returns:

a hash value for self

Return type:

int

Calculates a hash value for self.

New in version 1.6.

is_null()
Returns:

True if self is a null value, False otherwise

Return type:

bool

Checks if self is a null value.

New in version 1.6.

set_boolean(boolean)
Parameters:

boolean (bool) – a boolean value

Sets self to a boolean value.

New in version 1.6.

set_color(color)
Parameters:

color (Gdk.RGBA) – a [struct`Gdk`.RGBA]

Sets self to a color value.

New in version 1.6.

set_number(number)
Parameters:

number (float) – a number value

Sets self to a number value.

New in version 1.6.

set_string(string)
Parameters:

string (str) – a string value

Sets self to a string value.

New in version 1.6.

start_array()

Sets self to an empty array value.

New in version 1.6.

unset()

Sets self to a null value.

New in version 1.6.