Class (GI Struct)

Gtk-3.0GtkCssSectionAbstractSince 3.2

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.

3.2

Index

Constructors

Properties

Methods

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

    Returns number

    the line number

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

    Returns number

    the offset in bytes from the start of the line.

  • Gets the file that section was parsed from. If no such file exists, for example because the CSS was loaded via gtk_css_provider_load_from_data(), then null is returned.

    Returns Gio.File

    the Gio.File that section was parsed from or null if section was parsed from other data

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

    Returns Gtk.CssSection

    the parent section or null if none

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

    Returns number

    the line number

  • Returns the offset in bytes from the start of the current line returned via gtk_css_section_get_start_line().

    Returns number

    the offset in bytes from the start of the line.

  • Decrements the reference count on section, freeing the structure if the reference count reaches 0.

    Returns void