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

GI.Gtk.Structs.CssLocation

Description

CssLocation is used to present a location in a file - or other source of data parsed by the CSS engine.

The bytes and lineBytes offsets are meant to be used to programmatically match data. The lines and lineChars offsets can be used for printing the location in a file.

Note that the lines parameter starts from 0 and is increased whenever a CSS line break is encountered. (CSS defines the C character sequences "\r\n", "\r", "\n" and "\f" as newlines.) If your document uses different rules for line breaking, you might want run into problems here.

Synopsis

Exported types

newtype CssLocation Source #

Memory-managed wrapper type.

Constructors

CssLocation (ManagedPtr CssLocation) 

Instances

Instances details
Eq CssLocation Source # 
Instance details

Defined in GI.Gtk.Structs.CssLocation

BoxedPtr CssLocation Source # 
Instance details

Defined in GI.Gtk.Structs.CssLocation

CallocPtr CssLocation Source # 
Instance details

Defined in GI.Gtk.Structs.CssLocation

ManagedPtrNewtype CssLocation Source # 
Instance details

Defined in GI.Gtk.Structs.CssLocation

Methods

toManagedPtr :: CssLocation -> ManagedPtr CssLocation

tag ~ 'AttrSet => Constructible CssLocation tag Source # 
Instance details

Defined in GI.Gtk.Structs.CssLocation

Methods

new :: MonadIO m => (ManagedPtr CssLocation -> CssLocation) -> [AttrOp CssLocation tag] -> m CssLocation

newZeroCssLocation :: MonadIO m => m CssLocation Source #

Construct a CssLocation struct initialized to zero.

Methods

Properties

bytes

number of bytes parsed since the beginning

getCssLocationBytes :: MonadIO m => CssLocation -> m Word64 Source #

Get the value of the “bytes” field. When overloading is enabled, this is equivalent to

get cssLocation #bytes

setCssLocationBytes :: MonadIO m => CssLocation -> Word64 -> m () Source #

Set the value of the “bytes” field. When overloading is enabled, this is equivalent to

set cssLocation [ #bytes := value ]

chars

number of characters parsed since the beginning

getCssLocationChars :: MonadIO m => CssLocation -> m Word64 Source #

Get the value of the “chars” field. When overloading is enabled, this is equivalent to

get cssLocation #chars

setCssLocationChars :: MonadIO m => CssLocation -> Word64 -> m () Source #

Set the value of the “chars” field. When overloading is enabled, this is equivalent to

set cssLocation [ #chars := value ]

lineBytes

Number of bytes parsed since the last line break

getCssLocationLineBytes :: MonadIO m => CssLocation -> m Word64 Source #

Get the value of the “line_bytes” field. When overloading is enabled, this is equivalent to

get cssLocation #lineBytes

setCssLocationLineBytes :: MonadIO m => CssLocation -> Word64 -> m () Source #

Set the value of the “line_bytes” field. When overloading is enabled, this is equivalent to

set cssLocation [ #lineBytes := value ]

lineChars

Number of characters parsed since the last line break

getCssLocationLineChars :: MonadIO m => CssLocation -> m Word64 Source #

Get the value of the “line_chars” field. When overloading is enabled, this is equivalent to

get cssLocation #lineChars

setCssLocationLineChars :: MonadIO m => CssLocation -> Word64 -> m () Source #

Set the value of the “line_chars” field. When overloading is enabled, this is equivalent to

set cssLocation [ #lineChars := value ]

lines

number of full lines that have been parsed If you want to display this as a line number, you need to add 1 to this.

getCssLocationLines :: MonadIO m => CssLocation -> m Word64 Source #

Get the value of the “lines” field. When overloading is enabled, this is equivalent to

get cssLocation #lines

setCssLocationLines :: MonadIO m => CssLocation -> Word64 -> m () Source #

Set the value of the “lines” field. When overloading is enabled, this is equivalent to

set cssLocation [ #lines := value ]