Gtk.Symbolic_Color

Entities

Tagged Types

Constants

Subprograms

Description

GtkSymbolicColor is a boxed type that represents a symbolic color. It is the result of parsing a [color expression][gtkcssprovider-symbolic-colors]. To obtain the color represented by a GtkSymbolicColor, it has to be resolved with gtk_symbolic_color_resolve, which replaces all symbolic color references by the colors they refer to (in a given context) and evaluates mix, shade and other expressions, resulting in a Gdk.RGBA.Gdk_RGBA value.

It is not normally necessary to deal directly with Gtk_Symbolic_Colors, since they are mostly used behind the scenes by Gtk.Style_Context.Gtk_Style_Context and Gtk.Css_Provider.Gtk_Css_Provider.

Gtk.Symbolic_Color.Gtk_Symbolic_Color is deprecated. Symbolic colors are considered an implementation detail of GTK+.

From_Object

function From_Object (Object : System.Address) return Gtk_Symbolic_Color
Parameters
Object
Return Value

From_Object_Free

function From_Object_Free (B : access Gtk_Symbolic_Color'Class) return Gtk_Symbolic_Color
Parameters
B
Return Value

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New_Alpha

procedure Gtk_New_Alpha
   (Self   : out Gtk_Symbolic_Color;
    Color  : Gtk_Symbolic_Color;
    Factor : Gdouble)

Creates a symbolic color by modifying the relative alpha value of Color. A factor < 1.0 would resolve to a more transparent color, while > 1.0 would resolve to a more opaque color. Since: gtk+ 3.0

Parameters
Self
Color

another Gtk.Symbolic_Color.Gtk_Symbolic_Color

Factor

factor to apply to Color alpha

Gtk_New_Literal

procedure Gtk_New_Literal
   (Self  : out Gtk_Symbolic_Color;
    Color : Gdk.RGBA.Gdk_RGBA)

Creates a symbolic color pointing to a literal color. Since: gtk+ 3.0

Parameters
Self
Color

a Gdk.RGBA.Gdk_RGBA

Gtk_New_Mix

procedure Gtk_New_Mix
   (Self   : out Gtk_Symbolic_Color;
    Color1 : Gtk_Symbolic_Color;
    Color2 : Gtk_Symbolic_Color;
    Factor : Gdouble)

Creates a symbolic color defined as a mix of another two colors. a mix factor of 0 would resolve to Color1, while a factor of 1 would resolve to Color2. Since: gtk+ 3.0

Parameters
Self
Color1

color to mix

Color2

another color to mix

Factor

mix factor

Gtk_New_Name

procedure Gtk_New_Name
   (Self : out Gtk_Symbolic_Color;
    Name : UTF8_String)

Creates a symbolic color pointing to an unresolved named color. See Gtk.Style_Context.Lookup_Color and Gtk.Style_Properties.Lookup_Color. Since: gtk+ 3.0

Parameters
Self
Name

color name

Gtk_New_Shade

procedure Gtk_New_Shade
   (Self   : out Gtk_Symbolic_Color;
    Color  : Gtk_Symbolic_Color;
    Factor : Gdouble)

Creates a symbolic color defined as a shade of another color. A factor > 1.0 would resolve to a brighter color, while < 1.0 would resolve to a darker color. Since: gtk+ 3.0

Parameters
Self
Color

another Gtk.Symbolic_Color.Gtk_Symbolic_Color

Factor

shading factor to apply to Color

Gtk_New_Win32

procedure Gtk_New_Win32
   (Self        : out Gtk_Symbolic_Color;
    Theme_Class : UTF8_String;
    Id          : Glib.Gint)

Creates a symbolic color based on the current win32 theme. Note that while this call is available on all platforms the actual value returned is not reliable on non-win32 platforms. Since: gtk+ 3.4

Parameters
Self
Theme_Class

The theme class to pull color from

Id

The color id

Gtk_Symbolic_Color

type Gtk_Symbolic_Color is new Glib.C_Boxed with null record;

Gtk_Symbolic_Color_New_Alpha

function Gtk_Symbolic_Color_New_Alpha
   (Color  : Gtk_Symbolic_Color;
    Factor : Gdouble) return Gtk_Symbolic_Color

Creates a symbolic color by modifying the relative alpha value of Color. A factor < 1.0 would resolve to a more transparent color, while > 1.0 would resolve to a more opaque color. Since: gtk+ 3.0

Parameters
Color

another Gtk.Symbolic_Color.Gtk_Symbolic_Color

Factor

factor to apply to Color alpha

Return Value

Gtk_Symbolic_Color_New_Literal

function Gtk_Symbolic_Color_New_Literal
   (Color : Gdk.RGBA.Gdk_RGBA) return Gtk_Symbolic_Color

Creates a symbolic color pointing to a literal color. Since: gtk+ 3.0

Parameters
Color

a Gdk.RGBA.Gdk_RGBA

Return Value

Gtk_Symbolic_Color_New_Mix

function Gtk_Symbolic_Color_New_Mix
   (Color1 : Gtk_Symbolic_Color;
    Color2 : Gtk_Symbolic_Color;
    Factor : Gdouble) return Gtk_Symbolic_Color

Creates a symbolic color defined as a mix of another two colors. a mix factor of 0 would resolve to Color1, while a factor of 1 would resolve to Color2. Since: gtk+ 3.0

Parameters
Color1

color to mix

Color2

another color to mix

Factor

mix factor

Return Value

Gtk_Symbolic_Color_New_Name

function Gtk_Symbolic_Color_New_Name
   (Name : UTF8_String) return Gtk_Symbolic_Color

Creates a symbolic color pointing to an unresolved named color. See Gtk.Style_Context.Lookup_Color and Gtk.Style_Properties.Lookup_Color. Since: gtk+ 3.0

Parameters
Name

color name

Return Value

Gtk_Symbolic_Color_New_Shade

function Gtk_Symbolic_Color_New_Shade
   (Color  : Gtk_Symbolic_Color;
    Factor : Gdouble) return Gtk_Symbolic_Color

Creates a symbolic color defined as a shade of another color. A factor > 1.0 would resolve to a brighter color, while < 1.0 would resolve to a darker color. Since: gtk+ 3.0

Parameters
Color

another Gtk.Symbolic_Color.Gtk_Symbolic_Color

Factor

shading factor to apply to Color

Return Value

Gtk_Symbolic_Color_New_Win32

function Gtk_Symbolic_Color_New_Win32
   (Theme_Class : UTF8_String;
    Id          : Glib.Gint) return Gtk_Symbolic_Color

Creates a symbolic color based on the current win32 theme. Note that while this call is available on all platforms the actual value returned is not reliable on non-win32 platforms. Since: gtk+ 3.4

Parameters
Theme_Class

The theme class to pull color from

Id

The color id

Return Value

Null_Gtk_Symbolic_Color

Null_Gtk_Symbolic_Color : constant Gtk_Symbolic_Color;

Ref

function Ref (Self : Gtk_Symbolic_Color) return Gtk_Symbolic_Color

Increases the reference count of Color Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self
Return Value

the same Color

To_String

function To_String (Self : Gtk_Symbolic_Color) return UTF8_String

Converts the given Color to a string representation. This is useful both for debugging and for serialization of strings. The format of the string may change between different versions of GTK, but it is guaranteed that the GTK css parser is able to read the string and create the same symbolic color from it. Deprecated since 3.8, 1

Parameters
Self
Return Value

a new string representing Color

Unref

procedure Unref (Self : Gtk_Symbolic_Color)

Decreases the reference count of Color, freeing its memory if the reference count reaches 0. Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self