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

Description

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

newZeroCssLocation :: MonadIO m => m CssLocation Source #

Construct a CssLocation struct initialized to zero.

Methods

Overloaded 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 ]