Basics
Guides
API Reference
Basics
Guides
API Reference
[14:7] extends: object
Defines a part of a CSS document. Because sections are nested into one another, you can use [method@CssSection.get_parent] to get the containing region.
GtkCssSection (file = null, start = null, end = null, end = null)
Creates a new
GtkCssSectionreferring to the section in the givenfilefrom thestartlocation to theendlocation.
file is The file this section refers to.start is The start location.end is The end location.end is The end location.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.get_bytes ()
Gets the bytes that @section was parsed from.
the GBytes from which the section was parsed.get_end_location ()
Returns the location in the CSS document where this section ends.
The end location of this section.get_file ()
Gets the file that @section was parsed from. If no such file exists, for example because the CSS was loaded via [method@Gtk.CssProvider.load_from_data], then
NULLis returned.
the GFile from which the section was parsed.get_parent ()
Gets the parent section for the given
section. The parent section is the section that contains thissection. A special case are sections of typeGTK_CSS_SECTION_DOCUMENT. Their parent will either beNULLif they are the original CSS document that was loaded by [method@Gtk.CssProvider.load_from_file] or a section of typeGTK_CSS_SECTION_IMPORTif it was loaded with an@importrule from a different file.
the parent section.get_start_location ()
Returns the location in the CSS document where this section starts.
The start location of this section.print (object arg1String)
Prints the
sectionintostringin a human-readable form. This is a form likegtk.css:32:1-23to denote line 32, characters 1 to 23 in the filegtk.css.
string is a GString to print to.None.ref ()
Increments the reference count on
section.
the CSS section itself..to_string ()
Prints the section into a human-readable text form using [method@Gtk.CssSection.print].
A new string..unref ()
Decrements the reference count on
section, freeing the structure if the reference count reaches 0.
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.