CssLocationRef
public struct CssLocationRef : 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 CssLocationRef
type acts as a lightweight Swift reference to an underlying GtkCssLocation
instance.
It exposes methods that can operate on this data type through CssLocationProtocol
conformance.
Use CssLocationRef
only as an unowned
reference to an existing GtkCssLocation
instance.
-
Untyped pointer to the underlying `GtkCssLocation` instance.
For type-safe access, use the generated, typed pointer
_ptr
property instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkCssLocation>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkCssLocation>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkCssLocation>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkCssLocation>?)
-
Conditional initialiser from an optional
gpointer
Declaration
Swift
@inlinable init!(gpointer g: gpointer?)
-
Conditional initialiser from an optional, non-mutable
gconstpointer
Declaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?)
-
Reference intialiser for a related type that implements
CssLocationProtocol
Declaration
Swift
@inlinable init<T>(_ other: T) where T : CssLocationProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
CssLocationProtocol
.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>)
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
CssLocationProtocol
.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
CssLocationProtocol
.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
CssLocationProtocol
.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
CssLocationProtocol
.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)