BitsetIterProtocol
public protocol BitsetIterProtocol
An opaque, stack-allocated struct for iterating
over the elements of a GtkBitset.
Before a GtkBitsetIter can be used, it needs to be initialized with
[funcGtk.BitsetIter.init_first], [funcGtk.BitsetIter.init_last]
or [funcGtk.BitsetIter.init_at].
The BitsetIterProtocol protocol exposes the methods and properties of an underlying GtkBitsetIter 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 BitsetIter.
Alternatively, use BitsetIterRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkBitsetIterinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
_ptrDefault implementationTyped pointer to the underlying
GtkBitsetIterinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkBitsetIterinstance.Declaration
Swift
var _ptr: UnsafeMutablePointer<GtkBitsetIter>! { get } -
Required Initialiser for types conforming to
BitsetIterProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getValue()Extension methodGets the current value that
iterpoints to.If
iteris not valid and [methodGtk.BitsetIter.is_valid] returnsfalse, this function returns 0.Declaration
Swift
@inlinable func getValue() -> Int -
next(value:Extension method) Moves
iterto the next value in the set.If it was already pointing to the last value in the set,
falseis returned anditeris invalidated.Declaration
Swift
@inlinable func next(value: UnsafeMutablePointer<guint>! = nil) -> Bool -
previous(value:Extension method) Moves
iterto the previous value in the set.If it was already pointing to the first value in the set,
falseis returned anditeris invalidated.Declaration
Swift
@inlinable func previous(value: UnsafeMutablePointer<guint>! = nil) -> Bool -
initAt(set:Extension methodtarget: value: ) Initializes
iterto point totarget.If
targetis not found, finds the next value after it. If no value >=targetexists inset, this function returnsfalse.Declaration
Swift
@inlinable func initAt<BitsetT>(set: BitsetT, target: Int, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
initFirst(set:Extension methodvalue: ) Initializes an iterator for
setand points it to the first value inset.If
setis empty,falseis returned andvalueis set toG_MAXUINT.Declaration
Swift
@inlinable func initFirst<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
initLast(set:Extension methodvalue: ) Initializes an iterator for
setand points it to the last value inset.If
setis empty,falseis returned.Declaration
Swift
@inlinable func initLast<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
bitsetIterInitAt(set:Extension methodtarget: value: ) Initializes
iterto point totarget.If
targetis not found, finds the next value after it. If no value >=targetexists inset, this function returnsfalse.Declaration
Swift
@inlinable func bitsetIterInitAt<BitsetT>(set: BitsetT, target: Int, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
bitsetIterInitFirst(set:Extension methodvalue: ) Initializes an iterator for
setand points it to the first value inset.If
setis empty,falseis returned andvalueis set toG_MAXUINT.Declaration
Swift
@inlinable func bitsetIterInitFirst<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
bitsetIterInitLast(set:Extension methodvalue: ) Initializes an iterator for
setand points it to the last value inset.If
setis empty,falseis returned.Declaration
Swift
@inlinable func bitsetIterInitLast<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol -
isValidExtension methodChecks if
iterpoints to a valid value.Declaration
Swift
@inlinable var isValid: Bool { get } -
valueExtension methodGets the current value that
iterpoints to.If
iteris not valid and [methodGtk.BitsetIter.is_valid] returnsfalse, this function returns 0.Declaration
Swift
@inlinable var value: Int { get }
View on GitHub
Install in Dash
BitsetIterProtocol Protocol Reference