Gtk.Theming_Engine

Entities

Tagged Types

Access Types

Constants

Subprograms

Description

Gtk.Theming_Engine.Gtk_Theming_Engine was the object used for rendering themed content in GTK+ widgets. It used to allow overriding GTK+'s default implementation of rendering functions by allowing engines to be loaded as modules.

Gtk.Theming_Engine.Gtk_Theming_Engine has been deprecated in GTK+ 3.14 and will be ignored for rendering. The advancements in CSS theming are good enough to allow themers to achieve their goals without the need to modify source code.

Get_Background_Color

procedure Get_Background_Color
   (Self  : not null access Gtk_Theming_Engine_Record;
    State : Gtk.Enums.Gtk_State_Flags;
    Color : out Gdk.RGBA.Gdk_RGBA)

Gets the background color for a given state. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the color for

Color

return value for the background color

Get_Border

procedure Get_Border
   (Self   : not null access Gtk_Theming_Engine_Record;
    State  : Gtk.Enums.Gtk_State_Flags;
    Border : out Gtk.Style.Gtk_Border)

Gets the border for a given state as a Gtk.Style.Gtk_Border. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the border for

Border

return value for the border settings

Get_Border_Color

procedure Get_Border_Color
   (Self  : not null access Gtk_Theming_Engine_Record;
    State : Gtk.Enums.Gtk_State_Flags;
    Color : out Gdk.RGBA.Gdk_RGBA)

Gets the border color for a given state. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the color for

Color

return value for the border color

Get_Color

procedure Get_Color
   (Self  : not null access Gtk_Theming_Engine_Record;
    State : Gtk.Enums.Gtk_State_Flags;
    Color : out Gdk.RGBA.Gdk_RGBA)

Gets the foreground color for a given state. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the color for

Color

return value for the foreground color

Get_Direction

function Get_Direction
   (Self : not null access Gtk_Theming_Engine_Record)
    return Gtk.Enums.Gtk_Text_Direction

Returns the widget direction used for rendering. Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self
Return Value

the widget direction

Get_Font

function Get_Font
   (Self  : not null access Gtk_Theming_Engine_Record;
    State : Gtk.Enums.Gtk_State_Flags)
    return Pango.Font.Pango_Font_Description

Returns the font description for a given state. Since: gtk+ 3.0 Deprecated since 3.8, 1

Parameters
Self
State

state to retrieve the font for

Return Value

the Pango.Font.Pango_Font_Description for the given state. This object is owned by GTK+ and should not be freed.

Get_Junction_Sides

function Get_Junction_Sides
   (Self : not null access Gtk_Theming_Engine_Record)
    return Gtk.Enums.Gtk_Junction_Sides

Returns the widget direction used for rendering. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Return Value

the widget direction

Get_Margin

procedure Get_Margin
   (Self   : not null access Gtk_Theming_Engine_Record;
    State  : Gtk.Enums.Gtk_State_Flags;
    Margin : out Gtk.Style.Gtk_Border)

Gets the margin for a given state as a Gtk.Style.Gtk_Border. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the border for

Margin

return value for the margin settings

Get_Padding

procedure Get_Padding
   (Self    : not null access Gtk_Theming_Engine_Record;
    State   : Gtk.Enums.Gtk_State_Flags;
    Padding : out Gtk.Style.Gtk_Border)

Gets the padding for a given state as a Gtk.Style.Gtk_Border. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
State

state to retrieve the padding for

Padding

return value for the padding settings

Get_Path

function Get_Path
   (Self : not null access Gtk_Theming_Engine_Record)
    return Gtk.Widget.Gtk_Widget_Path

Returns the widget path used for style matching. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Return Value

A Gtk.Widget.Gtk_Widget_Path

Get_Property

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

Gets a property value as retrieved from the style settings that apply to the currently rendered element. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Property

the property name

State

state to retrieve the value for

Value

return location for the property value, you must free this memory using g_value_unset once you are done with it.

Get_Screen

function Get_Screen
   (Self : not null access Gtk_Theming_Engine_Record)
    return Gdk.Screen.Gdk_Screen

Returns the Gdk.Screen.Gdk_Screen to which Engine currently rendering to. Deprecated since 3.14, 1

Parameters
Self
Return Value

a Gdk.Screen.Gdk_Screen, or null.

Get_State

function Get_State
   (Self : not null access Gtk_Theming_Engine_Record)
    return Gtk.Enums.Gtk_State_Flags

returns the state used when rendering. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Return Value

the state flags

Get_Style_Property

procedure Get_Style_Property
   (Self          : not null access Gtk_Theming_Engine_Record;
    Property_Name : UTF8_String;
    Value         : out Glib.Values.GValue)

Gets the value for a widget style property. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Property_Name

the name of the widget style property

Value

Return location for the property value, free with g_value_unset after use.

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Theming_Engine

type Gtk_Theming_Engine is access all Gtk_Theming_Engine_Record'Class;

Gtk_Theming_Engine_Record

type Gtk_Theming_Engine_Record is new GObject_Record with null record;

Has_Class

function Has_Class
   (Self        : not null access Gtk_Theming_Engine_Record;
    Style_Class : UTF8_String) return Boolean

Returns True if the currently rendered contents have defined the given class name. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Style_Class

class name to look up

Return Value

True if Engine has Class_Name defined

Has_Region

function Has_Region
   (Self         : not null access Gtk_Theming_Engine_Record;
    Style_Region : UTF8_String;
    Flags        : access Gtk.Enums.Gtk_Region_Flags) return Boolean

Returns True if the currently rendered contents have the region defined. If Flags_Return is not null, it is set to the flags affecting the region. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Style_Region

a region name

Flags

return location for region flags

Return Value

True if region is defined

Load

function Load (Name : UTF8_String) return Gtk_Theming_Engine

Loads and initializes a theming engine module from the standard directories. Deprecated since 3.14, 1

Parameters
Name

Theme engine name to load

Return Value

A theming engine, or null if the engine Name doesn't exist.

Lookup_Color

function Lookup_Color
   (Self       : not null access Gtk_Theming_Engine_Record;
    Color_Name : UTF8_String;
    Color      : access Gdk.RGBA.Gdk_RGBA) return Boolean

Looks up and resolves a color name in the current style's color map. Since: gtk+ 3.0 Deprecated since 3.14, 1

Parameters
Self
Color_Name

color name to lookup

Color

Return location for the looked up color

Return Value

True if Color_Name was found and resolved, False otherwise

Name_Property

Name_Property : constant Glib.Properties.Property_String;

The theming engine name, this name will be used when registering custom properties, for a theming engine named "Clearlooks" registering a "glossy" custom property, it could be referenced in the CSS file as

-Clearlooks-glossy: true;

State_Is_Running

function State_Is_Running
   (Self     : not null access Gtk_Theming_Engine_Record;
    State    : Gtk.Enums.Gtk_State_Type;
    Progress : access Gdouble) return Boolean

Returns True if there is a transition animation running for the current region (see Gtk.Style_Context.Push_Animatable_Region). If Progress is not null, the animation progress will be returned there, 0.0 means the state is closest to being False, while 1.0 means it's closest to being True. This means transition animations will run from 0 to 1 when State is being set to True and from 1 to 0 when it's being set to False. Since: gtk+ 3.0 Deprecated since 3.6, 1

Parameters
Self
State

a widget state

Progress

return location for the transition progress

Return Value

True if there is a running transition animation for State.