:right-sidebar: True VectorValue =================================================================== .. currentmodule:: gi.repository.Shumate .. versionadded:: 1.6 .. class:: VectorValue(**kwargs) :no-contents-entry: A mutable value used in the vector style specification. Constructors ------------ .. rst-class:: interim-class .. class:: VectorValue :no-index: .. classmethod:: new() -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` with a null value. .. versionadded:: 1.6 .. classmethod:: new_boolean(boolean: bool) -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` with a boolean value. .. versionadded:: 1.6 :param boolean: a boolean value .. classmethod:: new_color(color: ~gi.repository.Gdk.RGBA) -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` with a color value. .. versionadded:: 1.6 :param color: a :obj:`~gi.repository.Gdk.RGBA` .. classmethod:: new_from_value(value: ~gi.repository.GObject.Value) -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` from a :obj:`~gi.repository.GObject.Value`\. .. versionadded:: 1.6 :param value: a :obj:`~gi.repository.GObject.Value` .. classmethod:: new_number(number: float) -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` with a number value. .. versionadded:: 1.6 :param number: a number value .. classmethod:: new_string(string: str) -> ~gi.repository.Shumate.VectorValue Creates a new :obj:`~gi.repository.Shumate.VectorValue` with a string value. .. versionadded:: 1.6 :param string: a string value Methods ------- .. rst-class:: interim-class .. class:: VectorValue :no-index: .. method:: array_append(element: ~gi.repository.Shumate.VectorValue) -> None Appends ``element`` to the array value of ``self``\. The value of ``element`` is copied. .. versionadded:: 1.6 :param element: a :obj:`~gi.repository.Shumate.VectorValue` to append to the array .. method:: dup() -> ~gi.repository.Shumate.VectorValue Creates a duplicate of ``self``\. .. versionadded:: 1.6 .. method:: equal(b: ~gi.repository.Shumate.VectorValue) -> bool Compares two :obj:`~gi.repository.Shumate.VectorValue`\s for equality. .. versionadded:: 1.6 :param b: a :obj:`~gi.repository.Shumate.VectorValue` .. method:: free() -> None Frees a :obj:`~gi.repository.Shumate.VectorValue`\. .. versionadded:: 1.6 .. method:: get_boolean() -> tuple[bool, bool] Gets the boolean value of ``self``\. .. versionadded:: 1.6 .. method:: get_color() -> tuple[bool, ~gi.repository.Gdk.RGBA] Gets the color value of ``self``\. If ``self`` is a string value, it will attempt to parse the string as a color. .. versionadded:: 1.6 .. method:: get_number() -> tuple[bool, float] Gets the number value of ``self``\. .. versionadded:: 1.6 .. method:: get_string() -> tuple[bool, str | None] Gets the string value of ``self``\. .. versionadded:: 1.6 .. method:: get_value_type() -> ~gi.repository.Shumate.VectorValueType Gets the type of value stored in ``self``\. .. versionadded:: 1.6 .. method:: hash() -> int Calculates a hash value for ``self``\. .. versionadded:: 1.6 .. method:: is_null() -> bool Checks if ``self`` is a null value. .. versionadded:: 1.6 .. method:: set_boolean(boolean: bool) -> None Sets ``self`` to a boolean value. .. versionadded:: 1.6 :param boolean: a boolean value .. method:: set_color(color: ~gi.repository.Gdk.RGBA) -> None Sets ``self`` to a color value. .. versionadded:: 1.6 :param color: a :obj:`~gi.repository.Gdk.RGBA` .. method:: set_number(number: float) -> None Sets ``self`` to a number value. .. versionadded:: 1.6 :param number: a number value .. method:: set_string(string: str) -> None Sets ``self`` to a string value. .. versionadded:: 1.6 :param string: a string value .. method:: start_array() -> None Sets ``self`` to an empty array value. .. versionadded:: 1.6 .. method:: unset() -> None Sets ``self`` to a null value. .. versionadded:: 1.6