Package: gtk

CStruct gtk:css-location

Declaration

(cffi:defcstruct css-location
  (bytes :size)
  (chars :size)
  (lines :size)
  (line-bytes :size)
  (line-chars :size))  

Values

bytes
Number of bytes parsed since the beginning.
chars
Number of characters parsed since the beginning.
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.
line-bytes
Number of bytes parsed since the last line break.
line-chars
Number of characters parsed since the last line break.

Details

The gtk:css-location structure is used to present 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.
 

Slot Access Functions

See also

2024-4-23