| Copyright | Will Thompson and Iñaki García Etxebarria | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Gtk.Structs.CssLocation
Description
Represents 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
- newtype CssLocation = CssLocation (ManagedPtr CssLocation)
 - newZeroCssLocation :: MonadIO m => m CssLocation
 - getCssLocationBytes :: MonadIO m => CssLocation -> m Word64
 - setCssLocationBytes :: MonadIO m => CssLocation -> Word64 -> m ()
 - getCssLocationChars :: MonadIO m => CssLocation -> m Word64
 - setCssLocationChars :: MonadIO m => CssLocation -> Word64 -> m ()
 - getCssLocationLineBytes :: MonadIO m => CssLocation -> m Word64
 - setCssLocationLineBytes :: MonadIO m => CssLocation -> Word64 -> m ()
 - getCssLocationLineChars :: MonadIO m => CssLocation -> m Word64
 - setCssLocationLineChars :: MonadIO m => CssLocation -> Word64 -> m ()
 - getCssLocationLines :: MonadIO m => CssLocation -> m Word64
 - setCssLocationLines :: MonadIO m => CssLocation -> Word64 -> m ()
 
Exported types
newtype CssLocation Source #
Memory-managed wrapper type.
Constructors
| CssLocation (ManagedPtr CssLocation) | 
Instances
| Eq CssLocation Source # | |
Defined in GI.Gtk.Structs.CssLocation  | |
| BoxedPtr CssLocation Source # | |
Defined in GI.Gtk.Structs.CssLocation  | |
| CallocPtr CssLocation Source # | |
Defined in GI.Gtk.Structs.CssLocation Methods boxedPtrCalloc :: IO (Ptr CssLocation)  | |
| ManagedPtrNewtype CssLocation Source # | |
Defined in GI.Gtk.Structs.CssLocation Methods toManagedPtr :: CssLocation -> ManagedPtr CssLocation  | |
| tag ~ 'AttrSet => Constructible CssLocation tag Source # | |
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
setcssLocation [ #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
setcssLocation [ #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
setcssLocation [ #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
setcssLocation [ #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
setcssLocation [ #lines:=value ]