struct Gtk::CssLocation

Overview

Represents a location in a file or other source of data parsed by the CSS engine.

The bytes and line_bytes offsets are meant to be used to programmatically match data. The lines and line_chars 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.

Defined in:

lib/gi-crystal/src/auto/gtk-4.0/css_location.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]
def self.new(data : LibGtk::CssLocation, _transfer : GICrystal::Transfer) #

[View source]
def self.new(bytes : UInt64 | Nil = nil, chars : UInt64 | Nil = nil, lines : UInt64 | Nil = nil, line_bytes : UInt64 | Nil = nil, line_chars : UInt64 | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def bytes(*args, **options) #

[View source]
def bytes(*args, **options, &) #

[View source]
def bytes=(arg) #

[View source]
def chars(*args, **options) #

[View source]
def chars(*args, **options, &) #

[View source]
def chars=(arg) #

[View source]
def line_bytes(*args, **options) #

[View source]
def line_bytes(*args, **options, &) #

[View source]
def line_bytes=(arg) #

[View source]
def line_chars(*args, **options) #

[View source]
def line_chars(*args, **options, &) #

[View source]
def line_chars=(arg) #

[View source]
def lines(*args, **options) #

[View source]
def lines(*args, **options, &) #

[View source]
def lines=(arg) #

[View source]