ScriptIterProtocol
public protocol ScriptIterProtocol
A PangoScriptIter
is used to iterate through a string
and identify ranges in different scripts.
The ScriptIterProtocol
protocol exposes the methods and properties of an underlying PangoScriptIter
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 ScriptIter
.
Alternatively, use ScriptIterRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
PangoScriptIter
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
script_iter_ptr
Default implementationTyped pointer to the underlying
PangoScriptIter
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
PangoScriptIter
instance.Declaration
Swift
var script_iter_ptr: UnsafeMutablePointer<PangoScriptIter>! { get }
-
Required Initialiser for types conforming to
ScriptIterProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
free()
Extension methodFrees a
PangoScriptIter
.Declaration
Swift
@inlinable func free()
-
getRange(start:
Extension methodend: script: ) Gets information about the range to which
iter
currently points.The range is the set of locations p where *start <= p < *end. (That is, it doesn’t include the character stored at *end)
Note that while the type of the
script
argument is declared asPangoScript
, as of Pango 1.18, this function simply returnsGUnicodeScript
values. Callers must be prepared to handle unknown values.Declaration
Swift
@inlinable func getRange(start: UnsafeMutablePointer<UnsafePointer<CChar>?>! = nil, end: UnsafeMutablePointer<UnsafePointer<CChar>?>! = nil, script: UnsafeMutablePointer<PangoScript>! = nil)
-
next()
Extension methodAdvances a
PangoScriptIter
to the next range.If
iter
is already at the end, it is left unchanged andfalse
is returned.Declaration
Swift
@inlinable func next() -> Bool