CssLocationProtocol
public protocol CssLocationProtocol
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.
The CssLocationProtocol protocol exposes the methods and properties of an underlying GtkCssLocation instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see CssLocation.
Alternatively, use CssLocationRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkCssLocationinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
_ptrDefault implementationTyped pointer to the underlying
GtkCssLocationinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkCssLocationinstance.Declaration
Swift
var _ptr: UnsafeMutablePointer<GtkCssLocation>! { get } -
Required Initialiser for types conforming to
CssLocationProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bytesExtension methodnumber of bytes parsed since the beginning
Declaration
Swift
@inlinable var bytes: gsize { get set } -
charsExtension methodnumber of characters parsed since the beginning
Declaration
Swift
@inlinable var chars: gsize { get set } -
linesExtension methodnumber of full lines that have been parsed. If you want to display this as a line number, you need to add 1 to this.
Declaration
Swift
@inlinable var lines: gsize { get set } -
lineBytesExtension methodNumber of bytes parsed since the last line break
Declaration
Swift
@inlinable var lineBytes: gsize { get set } -
lineCharsExtension methodNumber of characters parsed since the last line break
Declaration
Swift
@inlinable var lineChars: gsize { get set }
View on GitHub
Install in Dash
CssLocationProtocol Protocol Reference