Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
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.
Synopsis
- newtype StateSet = StateSet (ManagedPtr StateSet)
- class (GObject o, IsDescendantOf StateSet o) => IsStateSet o
- toStateSet :: (MonadIO m, IsStateSet o) => o -> m StateSet
- noStateSet :: Maybe StateSet
- stateSetAddState :: (HasCallStack, MonadIO m, IsStateSet a) => a -> StateType -> m Bool
- stateSetAddStates :: (HasCallStack, MonadIO m, IsStateSet a) => a -> [StateType] -> m ()
- stateSetAndSets :: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) => a -> b -> m StateSet
- stateSetClearStates :: (HasCallStack, MonadIO m, IsStateSet a) => a -> m ()
- stateSetContainsState :: (HasCallStack, MonadIO m, IsStateSet a) => a -> StateType -> m Bool
- stateSetContainsStates :: (HasCallStack, MonadIO m, IsStateSet a) => a -> [StateType] -> m Bool
- stateSetIsEmpty :: (HasCallStack, MonadIO m, IsStateSet a) => a -> m Bool
- stateSetNew :: (HasCallStack, MonadIO m) => m StateSet
- stateSetOrSets :: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) => a -> b -> m (Maybe StateSet)
- stateSetRemoveState :: (HasCallStack, MonadIO m, IsStateSet a) => a -> StateType -> m Bool
- stateSetXorSets :: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) => a -> b -> m StateSet
Exported types
Memory-managed wrapper type.
Instances
GObject StateSet Source # | |
Defined in GI.Atk.Objects.StateSet gobjectType :: IO GType # | |
HasParentTypes StateSet Source # | |
Defined in GI.Atk.Objects.StateSet | |
type ParentTypes StateSet Source # | |
Defined in GI.Atk.Objects.StateSet |
class (GObject o, IsDescendantOf StateSet o) => IsStateSet o Source #
Type class for types which can be safely cast to StateSet
, for instance with toStateSet
.
Instances
(GObject o, IsDescendantOf StateSet o) => IsStateSet o Source # | |
Defined in GI.Atk.Objects.StateSet |
toStateSet :: (MonadIO m, IsStateSet o) => o -> m StateSet Source #
Methods
addState
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> StateType |
|
-> m Bool | Returns: |
Adds the state of the specified type to the state set if it is not already present.
Note that because an StateSet
is a read-only object, this method should
be used to add a state to a newly-created set which will then be returned by
atk_object_ref_state_set
. It should not be used to modify the existing state
of an object. See also atk_object_notify_state_change
.
addStates
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> [StateType] |
|
-> m () |
Adds the states of the specified types to the state set.
Note that because an StateSet
is a read-only object, this method should
be used to add states to a newly-created set which will then be returned by
atk_object_ref_state_set
. It should not be used to modify the existing state
of an object. See also atk_object_notify_state_change
.
andSets
:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) | |
=> a |
|
-> b |
|
-> m StateSet | Returns: a new |
Constructs the intersection of the two sets, returning Nothing
if the
intersection is empty.
clearStates
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> m () |
Removes all states from the state set.
containsState
stateSetContainsState Source #
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> StateType |
|
-> m Bool | Returns: |
Checks whether the state for the specified type is in the specified set.
containsStates
stateSetContainsStates Source #
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> [StateType] |
|
-> m Bool | Returns: |
Checks whether the states for all the specified types are in the specified set.
isEmpty
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> m Bool |
Checks whether the state set is empty, i.e. has no states set.
new
:: (HasCallStack, MonadIO m) | |
=> m StateSet | Returns: a new |
Creates a new empty state set.
orSets
:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) | |
=> a |
|
-> b |
|
-> m (Maybe StateSet) | Returns: a new |
Constructs the union of the two sets.
removeState
:: (HasCallStack, MonadIO m, IsStateSet a) | |
=> a |
|
-> StateType |
|
-> m Bool | Returns: |
Removes the state for the specified type from the state set.
Note that because an StateSet
is a read-only object, this method should
be used to remove a state to a newly-created set which will then be returned
by atk_object_ref_state_set
. It should not be used to modify the existing
state of an object. See also atk_object_notify_state_change
.
xorSets
:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) | |
=> a |
|
-> b |
|
-> m StateSet | Returns: a new |
Constructs the exclusive-or of the two sets, returning Nothing
is empty.
The set returned by this operation contains the states in exactly
one of the two sets.