StateSetProtocol
public protocol StateSetProtocol : ObjectProtocol
An AtkStateSet is a read-only representation of the full set of AtkStates
that apply to an object at a given time. This set is not meant to be
modified, but rather created when atk_object_ref_state_set() is called.
The StateSetProtocol protocol exposes the methods and properties of an underlying AtkStateSet 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 StateSet.
Alternatively, use StateSetRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
AtkStateSetinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
state_set_ptrDefault implementationTyped pointer to the underlying
AtkStateSetinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
AtkStateSetinstance.Declaration
Swift
var state_set_ptr: UnsafeMutablePointer<AtkStateSet>! { get } -
Required Initialiser for types conforming to
StateSetProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
addState(type:Extension method) Adds the state of the specified type to the state set if it is not already present.
Note that because an
AtkStateSetis a read-only object, this method should be used to add a state to a newly-created set which will then be returned byatk_object_ref_state_set. It should not be used to modify the existing state of an object. See alsoatk_object_notify_state_change.Declaration
Swift
@inlinable func addState(type: AtkStateType) -> Bool -
addStates(types:Extension methodnTypes: ) Adds the states of the specified types to the state set.
Note that because an
AtkStateSetis a read-only object, this method should be used to add states to a newly-created set which will then be returned byatk_object_ref_state_set. It should not be used to modify the existing state of an object. See alsoatk_object_notify_state_change.Declaration
Swift
@inlinable func addStates(types: UnsafeMutablePointer<AtkStateType>!, nTypes: Int) -
andSets(compareSet:Extension method) Constructs the intersection of the two sets, returning
nilif the intersection is empty.Declaration
Swift
@inlinable func andSets<StateSetT>(compareSet: StateSetT) -> Atk.StateSetRef! where StateSetT : StateSetProtocol -
clearStates()Extension methodRemoves all states from the state set.
Declaration
Swift
@inlinable func clearStates() -
containsState(type:Extension method) Checks whether the state for the specified type is in the specified set.
Declaration
Swift
@inlinable func containsState(type: AtkStateType) -> Bool -
containsStates(types:Extension methodnTypes: ) Checks whether the states for all the specified types are in the specified set.
Declaration
Swift
@inlinable func containsStates(types: UnsafeMutablePointer<AtkStateType>!, nTypes: Int) -> Bool -
orSets(compareSet:Extension method) Constructs the union of the two sets.
Declaration
Swift
@inlinable func orSets<StateSetT>(compareSet: StateSetT) -> Atk.StateSetRef! where StateSetT : StateSetProtocol -
removeState(type:Extension method) Removes the state for the specified type from the state set.
Note that because an
AtkStateSetis a read-only object, this method should be used to remove a state to a newly-created set which will then be returned byatk_object_ref_state_set. It should not be used to modify the existing state of an object. See alsoatk_object_notify_state_change.Declaration
Swift
@inlinable func removeState(type: AtkStateType) -> Bool -
xorSets(compareSet:Extension method) Constructs the exclusive-or of the two sets, returning
nilis empty. The set returned by this operation contains the states in exactly one of the two sets.Declaration
Swift
@inlinable func xorSets<StateSetT>(compareSet: StateSetT) -> Atk.StateSetRef! where StateSetT : StateSetProtocol -
isEmptyExtension methodChecks whether the state set is empty, i.e. has no states set.
Declaration
Swift
@inlinable var isEmpty: Bool { get } -
parentExtension methodUndocumented
Declaration
Swift
@inlinable var parent: GObject { get }
View on GitHub
Install in Dash
StateSetProtocol Protocol Reference