Gtk.Css_Section

Entities

Simple Types

Tagged Types

Constants

Subprograms

Generic Instantiations

Description

Defines a part of a CSS document. Because sections are nested into one another, you can use Gtk.Css_Section.Get_Parent to get the containing region.

From_Object

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

From_Object_Free

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

Get_End_Line

function Get_End_Line (Self : Gtk_Css_Section) return Guint

Returns the line in the CSS document where this section end. The line number is 0-indexed, so the first line of the document will return 0. This value may change in future invocations of this function if Section is not yet parsed completely. This will for example happen in the GtkCssProvider::parsing-error signal. The end position and line may be identical to the start position and line for sections which failed to parse anything successfully. Since: gtk+ 3.2

Parameters
Self
Return Value

the line number

Get_End_Position

function Get_End_Position (Self : Gtk_Css_Section) return Guint

Returns the offset in bytes from the start of the current line returned via Gtk.Css_Section.Get_End_Line. This value may change in future invocations of this function if Section is not yet parsed completely. This will for example happen in the GtkCssProvider::parsing-error signal. The end position and line may be identical to the start position and line for sections which failed to parse anything successfully. Since: gtk+ 3.2

Parameters
Self
Return Value

the offset in bytes from the start of the line.

Get_Parent

function Get_Parent (Self : Gtk_Css_Section) return Gtk_Css_Section

Gets the parent section for the given Section. The parent section is the section that contains this Section. A special case are sections of type GTK_CSS_SECTION_DOCUMENT. Their parent will either be null if they are the original CSS document that was loaded by gtk_css_provider_load_from_file or a section of type GTK_CSS_SECTION_IMPORT if it was loaded with an import rule from a different file. Since: gtk+ 3.2

Parameters
Self
Return Value

the parent section or null if none

Get_Section_Type

function Get_Section_Type
   (Self : Gtk_Css_Section) return Gtk_Css_Section_Type

Gets the type of information that Section describes. Since: gtk+ 3.2

Parameters
Self
Return Value

the type of Section

Get_Start_Line

function Get_Start_Line (Self : Gtk_Css_Section) return Guint

Returns the line in the CSS document where this section starts. The line number is 0-indexed, so the first line of the document will return 0. Since: gtk+ 3.2

Parameters
Self
Return Value

the line number

Get_Start_Position

function Get_Start_Position (Self : Gtk_Css_Section) return Guint

Returns the offset in bytes from the start of the current line returned via Gtk.Css_Section.Get_Start_Line. Since: gtk+ 3.2

Parameters
Self
Return Value

the offset in bytes from the start of the line.

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Css_Section

type Gtk_Css_Section is new Glib.C_Boxed with null record;

Gtk_Css_Section_Type

type Gtk_Css_Section_Type is (
   Css_Section_Document,
   Css_Section_Import,
   Css_Section_Color_Definition,
   Css_Section_Binding_Set,
   Css_Section_Ruleset,
   Css_Section_Selector,
   Css_Section_Declaration,
   Css_Section_Value,
   Css_Section_Keyframes);

The different types of sections indicate parts of a CSS document as parsed by GTK's CSS parser. They are oriented towards the CSS Grammar, but may contain extensions.

More types might be added in the future as the parser incorporates more features.

Enumeration Literal
Css_Section_Document
Css_Section_Import
Css_Section_Color_Definition
Css_Section_Binding_Set
Css_Section_Ruleset
Css_Section_Selector
Css_Section_Declaration
Css_Section_Value
Css_Section_Keyframes

Gtk_Css_Section_Type_Properties

package Gtk_Css_Section_Type_Properties is
   new Generic_Internal_Discrete_Property (Gtk_Css_Section_Type);

Null_Gtk_Css_Section

Null_Gtk_Css_Section : constant Gtk_Css_Section;

Property_Gtk_Css_Section_Type

type Property_Gtk_Css_Section_Type is new Gtk_Css_Section_Type_Properties.Property;

Ref

function Ref (Self : Gtk_Css_Section) return Gtk_Css_Section

Increments the reference count on Section. Since: gtk+ 3.2

Parameters
Self
Return Value

Section itself.

Unref

procedure Unref (Self : Gtk_Css_Section)

Decrements the reference count on Section, freeing the structure if the reference count reaches 0. Since: gtk+ 3.2

Parameters
Self