gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.CssSection

Description

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

Synopsis

Exported types

newtype CssSection Source #

Memory-managed wrapper type.

Instances

Instances details
Eq CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

IsGValue CssSection Source #

Convert CssSection to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Structs.CssSection

ManagedPtrNewtype CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

TypedObject CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

Methods

glibType :: IO GType #

GBoxed CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

HasParentTypes CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

type ParentTypes CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

type ParentTypes CssSection = '[] :: [Type]

Methods

Overloaded methods

getEndLocation

cssSectionGetEndLocation Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m CssLocation

Returns: The end location of this section

Returns the location in the CSS document where this section ends.

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.

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.

getStartLocation

cssSectionGetStartLocation Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m CssLocation

Returns: The start location of this section

Returns the location in the CSS document where this section starts.

new

cssSectionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> Maybe a

file: The file this section refers to

-> CssLocation

start: The start location

-> CssLocation

end: The end location

-> m CssSection

Returns: a new CssSection

Creates a new CssSection referring to the section in the given file from the start location to the end location.

print

cssSectionPrint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a section

-> String

string: a String to print to

-> m () 

Prints the section into string in a human-readable form. This is a form like gtk.css:32:1-23 to denote line 32, characters 1 to 23 in the file gtk.css.

ref

cssSectionRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a CssSection

-> m CssSection

Returns: section itself.

Increments the reference count on section.

toString

cssSectionToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a CssSection

-> m Text

Returns: A new string.

Prints the section into a human-readable text form using cssSectionPrint.

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.