Index

Package: Theming_Engine

Description

package Gtk.Theming_Engine is

Gtk.Theming_Engine.Gtk_Theming_Engine is the object used for rendering themed content in GTK+ widgets. Even though GTK+ has a default implementation, it can be overridden in CSS files by enforcing a Gtk.Theming_Engine.Gtk_Theming_Engine object to be loaded as a module.

In order to implement a theming engine, a Gtk.Theming_Engine.Gtk_Theming_Engine subclass must be created, alongside the CSS file that will reference it, the theming engine would be created as an .so library, and installed in $(gtk-modules-dir)/theming-engines/.

Gtk.Theming_Engine.Gtk_Theming_Engine<!-- -->s have limited access to the object they are rendering, the Gtk.Theming_Engine.Gtk_Theming_Engine API has read-only accessors to the style information contained in the rendered object's Gtk.Style_Context.Gtk_Style_Context.

Classes

Gtk_Theming_Engine_Record

type Gtk_Theming_Engine_Record is new GObject_Record with null record;

Ancestors:

Primitive operations:

Get_Background_Color
Get_Border_Color
Get_Direction
Get_Junction_Sides
Get_Property
Get_Style_Property
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Lookup_Color
State_Is_Running

Types

Gtk_Theming_Engine

type Gtk_Theming_Engine is access all Gtk_Theming_Engine_Record'Class;

Constants & Global variables

Name_Property (Glib.Properties.Property_String)

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;

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;

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 "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 "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 "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 "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;

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;

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

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 "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 "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

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 "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.

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

Get_Style_Property

procedure Get_Style_Property 
(Self: not null access Gtk_Theming_Engine_Record;
Property_Name: UTF8_String;
Value: in out Glib.Values.GValue);
Gets the value for a widget style property. Since: gtk+ 3.0 "property_name": the name of the widget style property "value": Return location for the property value, free with g_value_unset after use.

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 "style_class": class name to look up

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 "style_region": a region name "flags": return location for region flags

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. "color_name": color name to lookup "color": Return location for the looked up color

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;

Load

function Load 
(Name: UTF8_String) return Gtk_Theming_Engine;
Loads and initializes a theming engine module from the standard directories. "name": Theme engine name to load