Gtk.Style_Properties

Entities

Tagged Types

Access Types

Subprograms

Generic Instantiations

Description

GtkStyleProperties provides the storage for style information that is used by Gtk.Style_Context.Gtk_Style_Context and other Gtk.Style_Provider.Gtk_Style_Provider implementations.

Before style properties can be stored in GtkStyleProperties, they must be registered with gtk_style_properties_register_property.

Unless you are writing a Gtk.Style_Provider.Gtk_Style_Provider implementation, you are unlikely to use this API directly, as gtk_style_context_get and its variants are the preferred way to access styling information from widget implementations and theming engine implementations should use the APIs provided by Gtk.Theming_Engine.Gtk_Theming_Engine instead.

Gtk.Style_Properties.Gtk_Style_Properties has been deprecated in GTK 3.16. The CSS machinery does not use it anymore and all users of this object have been deprecated.

"+"

function "+"
  (Widget : access Gtk_Style_Properties_Record'Class)
return Gtk.Style_Provider.Gtk_Style_Provider
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Style_Provider.Gtk_Style_Provider)
return Gtk_Style_Properties
Parameters
Interf
Return Value

Clear

procedure Clear (Self : not null access Gtk_Style_Properties_Record)

Clears all style information from Props. Deprecated since 3.16, 1

Parameters
Self

Get_Property

procedure Get_Property
   (Self     : not null access Gtk_Style_Properties_Record;
    Property : UTF8_String;
    State    : Gtk.Enums.Gtk_State_Flags;
    Value    : out Glib.Values.GValue;
    Exists   : out Boolean)

Gets a style property from Props for the given state. When done with Value, g_value_unset needs to be called to free any allocated memory. Since: gtk+ 3.0 Deprecated since 3.16, 1

Parameters
Self
Property

style property name

State

state to retrieve the property value for

Value

return location for the style property value. @return True if the property exists in Props, False otherwise

Exists

Get_Style_Property

procedure Get_Style_Property
   (Self  : not null access Gtk_Style_Properties_Record;
    Path  : Gtk.Widget.Gtk_Widget_Path;
    State : Gtk.Enums.Gtk_State_Flags;
    Pspec : in out Glib.Param_Spec;
    Value : out Glib.Values.GValue;
    Found : out Boolean)
Parameters
Self
Path
State
Pspec
Value
Found

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New

procedure Gtk_New (Self : out Gtk_Style_Properties)

Returns a newly created Gtk.Style_Properties.Gtk_Style_Properties Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Gtk_Style_Properties

type Gtk_Style_Properties is access all Gtk_Style_Properties_Record'Class;

Gtk_Style_Properties_New

function Gtk_Style_Properties_New return Gtk_Style_Properties

Returns a newly created Gtk.Style_Properties.Gtk_Style_Properties

Return Value

Gtk_Style_Properties_Record

type Gtk_Style_Properties_Record is new GObject_Record with null record;

Implements_Gtk_Style_Provider

package Implements_Gtk_Style_Provider is new Glib.Types.Implements
  (Gtk.Style_Provider.Gtk_Style_Provider, Gtk_Style_Properties_Record, Gtk_Style_Properties);

Initialize

procedure Initialize
   (Self : not null access Gtk_Style_Properties_Record'Class)

Returns a newly created Gtk.Style_Properties.Gtk_Style_Properties Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Lookup_Color

function Lookup_Color
   (Self : not null access Gtk_Style_Properties_Record;
    Name : UTF8_String) return Gtk.Symbolic_Color.Gtk_Symbolic_Color

Returns the symbolic color that is mapped to Name. Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self
Name

color name to lookup

Return Value

The mapped color

Map_Color

procedure Map_Color
   (Self  : not null access Gtk_Style_Properties_Record;
    Name  : UTF8_String;
    Color : Gtk.Symbolic_Color.Gtk_Symbolic_Color)

Maps Color so it can be referenced by Name. See Gtk.Style_Properties.Lookup_Color Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self
Name

color name

Color

Gtk.Symbolic_Color.Gtk_Symbolic_Color to map Name to

Merge

procedure Merge
   (Self           : not null access Gtk_Style_Properties_Record;
    Props_To_Merge : not null access Gtk_Style_Properties_Record'Class;
    Replace        : Boolean)

Merges into Props all the style information contained in Props_To_Merge. If Replace is True, the values will be overwritten, if it is False, the older values will prevail. Since: gtk+ 3.0 Deprecated since 3.16, 1

Parameters
Self
Props_To_Merge

a second Gtk.Style_Properties.Gtk_Style_Properties

Replace

whether to replace values or not

Set_Property

procedure Set_Property
   (Self     : not null access Gtk_Style_Properties_Record;
    Property : UTF8_String;
    State    : Gtk.Enums.Gtk_State_Flags;
    Value    : in out Glib.Values.GValue)

Sets a styling property in Props. Since: gtk+ 3.0 Deprecated since 3.16, 1

Parameters
Self
Property

styling property to set

State

state to set the value for

Value

new value for the property

Unset_Property

procedure Unset_Property
   (Self     : not null access Gtk_Style_Properties_Record;
    Property : UTF8_String;
    State    : Gtk.Enums.Gtk_State_Flags)

Unsets a style property in Props. Since: gtk+ 3.0 Deprecated since 3.16, 1

Parameters
Self
Property

property to unset

State

state to unset