gi-gtk-4.0.8: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Structs.CssSection

Description

Defines a part of a CSS document.

Because sections are nested into one another, you can use [methodcssSection.get_parent] to get the containing region.

Synopsis

Exported types

newtype CssSection Source #

Memory-managed wrapper type.

Constructors

CssSection (ManagedPtr CssSection) 

Instances

Instances details
Eq CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

GBoxed CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

ManagedPtrNewtype CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

Methods

toManagedPtr :: CssSection -> ManagedPtr CssSection

TypedObject CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

Methods

glibType :: IO GType

HasParentTypes CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

IsGValue (Maybe CssSection) Source #

Convert CssSection to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Structs.CssSection

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CssSection -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CssSection)

type ParentTypes CssSection Source # 
Instance details

Defined in GI.Gtk.Structs.CssSection

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

Methods

Click to display all available methods, including inherited ones

Expand

Methods

print, ref, toString, unref.

Getters

getEndLocation, getFile, getParent, getStartLocation.

Setters

None.

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 (Maybe File)

Returns: the GFile from which the section was parsed

Gets the file that section was parsed from.

If no such file exists, for example because the CSS was loaded via cssProviderLoadFromData, then NULL is returned.

getParent

cssSectionGetParent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: the section

-> m (Maybe CssSection)

Returns: the parent section

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 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 GtkCssSection

Creates a new GtkCssSection 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 GString 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 GtkCssSection

-> m CssSection

Returns: the CSS section itself.

Increments the reference count on section.

toString

cssSectionToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CssSection

section: a GtkCssSection

-> 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 GtkCssSection

-> m () 

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