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.
function From_Object (Object : System.Address) return Gtk_Css_Section
function From_Object_Free (B : access Gtk_Css_Section'Class) return Gtk_Css_Section
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
the line number
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
the offset in bytes from the start of the line.
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
the parent section or null if none
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
the type of Section
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
the line number
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
the offset in bytes from the start of the line.
function Get_Type return Glib.GType
type Gtk_Css_Section is new Glib.C_Boxed with null record;
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.
package Gtk_Css_Section_Type_Properties is
new Generic_Internal_Discrete_Property (Gtk_Css_Section_Type);
Null_Gtk_Css_Section : constant Gtk_Css_Section;
type Property_Gtk_Css_Section_Type is new Gtk_Css_Section_Type_Properties.Property;
function Ref (Self : Gtk_Css_Section) return Gtk_Css_Section
Increments the reference count on Section. Since: gtk+ 3.2
Section itself.
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