CssSection

Defines a part of a CSS document. Because sections are nested into one another, you can use gtk.css_section.CssSection.getParent to get the containing region.

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

_cPtr
void* _cPtr(Flag!"Dup" dup)
getEndLine
uint getEndLine()

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.

getEndPosition
uint getEndPosition()

Returns the offset in bytes from the start of the current line returned via gtk.css_section.CssSection.getEndLine. 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.

getFile
gio.file.File getFile()

Gets the file that section was parsed from. If no such file exists, for example because the CSS was loaded via @gtk.css_provider.CssProvider.loadFromData, then null is returned.

getParent
gtk.css_section.CssSection getParent()

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.CssProvider.loadFromFile or a section of type #GTK_CSS_SECTION_IMPORT if it was loaded with an import rule from a different file.

getSectionType
gtk.types.CssSectionType getSectionType()

Gets the type of information that section describes.

getStartLine
uint getStartLine()

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.

getStartPosition
uint getStartPosition()

Returns the offset in bytes from the start of the current line returned via gtk.css_section.CssSection.getStartLine.

self
CssSection self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()

Inherited Members

From Boxed

_cInstancePtr
void* _cInstancePtr;

Pointer to the C boxed value

_getGType
GType _getGType()

Get the GType of this boxed type.

_gType
GType _gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

boxCopy
void* boxCopy()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.