gi-gtk-3.0.31: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.CssSection

Contents

Description

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

Since: 3.2

Synopsis

Exported types

newtype CssSection Source #

Memory-managed wrapper type.

Instances
BoxedObject CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

Methods

getEndLine

cssSectionGetEndLine Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m Word32

Returns: the line number

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: 3.2

getEndPosition

cssSectionGetEndPosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m Word32

Returns: the offset in bytes from the start of the line.

Returns the offset in bytes from the start of the current line returned via cssSectionGetEndLine. 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: 3.2

getFile

cssSectionGetFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m File

Returns: the File that section was parsed from or Nothing if section was parsed from other data

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

Since: 3.2

getParent

cssSectionGetParent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m (Maybe CssSection)

Returns: the parent section or Nothing if none

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 Nothing if they are the original CSS document that was loaded by cssProviderLoadFromFile or a section of type GTK_CSS_SECTION_IMPORT if it was loaded with an import rule from a different file.

Since: 3.2

getSectionType

cssSectionGetSectionType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m CssSectionType

Returns: the type of section

Gets the type of information that section describes.

Since: 3.2

getStartLine

cssSectionGetStartLine Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m Word32

Returns: the line number

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: 3.2

getStartPosition

cssSectionGetStartPosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m Word32

Returns: the offset in bytes from the start of the line.

Returns the offset in bytes from the start of the current line returned via cssSectionGetStartLine.

Since: 3.2

ref

cssSectionRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a CssSection

-> m CssSection

Returns: section itself.

Increments the reference count on section.

Since: 3.2

unref

cssSectionUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a CssSection

-> m () 

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

Since: 3.2