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.

  • ptr

    Untyped pointer to the underlying GtkBitsetIter instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • _ptr Default implementation

    Typed pointer to the underlying GtkBitsetIter instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkBitsetIter instance.

    Declaration

    Swift

    var _ptr: UnsafeMutablePointer<GtkBitsetIter>! { get }
  • Required Initialiser for types conforming to BitsetIterProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

BitsetIter Record: BitsetIterProtocol extension (methods and fields)

  • getValue() Extension method

    Gets the current value that iter points to.

    If iter is not valid and [methodGtk.BitsetIter.is_valid] returns false, this function returns 0.

    Declaration

    Swift

    @inlinable
    func getValue() -> Int
  • next(value:) Extension method

    Moves iter to the next value in the set.

    If it was already pointing to the last value in the set, false is returned and iter is invalidated.

    Declaration

    Swift

    @inlinable
    func next(value: UnsafeMutablePointer<guint>! = nil) -> Bool
  • previous(value:) Extension method

    Moves iter to the previous value in the set.

    If it was already pointing to the first value in the set, false is returned and iter is invalidated.

    Declaration

    Swift

    @inlinable
    func previous(value: UnsafeMutablePointer<guint>! = nil) -> Bool
  • initAt(set:target:value:) Extension method

    Initializes iter to point to target.

    If target is not found, finds the next value after it. If no value >= target exists in set, this function returns false.

    Declaration

    Swift

    @inlinable
    func initAt<BitsetT>(set: BitsetT, target: Int, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • initFirst(set:value:) Extension method

    Initializes an iterator for set and points it to the first value in set.

    If set is empty, false is returned and value is set to G_MAXUINT.

    Declaration

    Swift

    @inlinable
    func initFirst<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • initLast(set:value:) Extension method

    Initializes an iterator for set and points it to the last value in set.

    If set is empty, false is returned.

    Declaration

    Swift

    @inlinable
    func initLast<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • Initializes iter to point to target.

    If target is not found, finds the next value after it. If no value >= target exists in set, this function returns false.

    Declaration

    Swift

    @inlinable
    func bitsetIterInitAt<BitsetT>(set: BitsetT, target: Int, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • Initializes an iterator for set and points it to the first value in set.

    If set is empty, false is returned and value is set to G_MAXUINT.

    Declaration

    Swift

    @inlinable
    func bitsetIterInitFirst<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • Initializes an iterator for set and points it to the last value in set.

    If set is empty, false is returned.

    Declaration

    Swift

    @inlinable
    func bitsetIterInitLast<BitsetT>(set: BitsetT, value: UnsafeMutablePointer<guint>! = nil) -> Bool where BitsetT : BitsetProtocol
  • isValid Extension method

    Checks if iter points to a valid value.

    Declaration

    Swift

    @inlinable
    var isValid: Bool { get }
  • value Extension method

    Gets the current value that iter points to.

    If iter is not valid and [methodGtk.BitsetIter.is_valid] returns false, this function returns 0.

    Declaration

    Swift

    @inlinable
    var value: Int { get }