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) #

def self.new(data : LibGtk::CssLocation, _transfer : GICrystal::Transfer) #

def self.new(bytes : UInt64? = nil, chars : UInt64? = nil, lines : UInt64? = nil, line_bytes : UInt64? = nil, line_chars : UInt64? = nil) #

Instance Method Detail

def ==(other : self) : Bool #

def bytes(*args, **options) #

def bytes(*args, **options, &) #

def bytes=(arg) #

def chars(*args, **options) #

def chars(*args, **options, &) #

def chars=(arg) #

def line_bytes(*args, **options) #

def line_bytes(*args, **options, &) #

def line_bytes=(arg) #

def line_chars(*args, **options) #

def line_chars(*args, **options, &) #

def line_chars=(arg) #

def lines(*args, **options) #

def lines(*args, **options, &) #

def lines=(arg) #