gi-atk-2.0.21: Atk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Atk.Objects.StateSet

Description

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

Exported types

newtype StateSet Source #

Memory-managed wrapper type.

Constructors

StateSet (ManagedPtr StateSet) 

Instances

Instances details
Eq StateSet Source # 
Instance details

Defined in GI.Atk.Objects.StateSet

GObject StateSet Source # 
Instance details

Defined in GI.Atk.Objects.StateSet

Methods

gobjectType :: IO GType #

IsGValue StateSet Source #

Convert StateSet to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Atk.Objects.StateSet

HasParentTypes StateSet Source # 
Instance details

Defined in GI.Atk.Objects.StateSet

type ParentTypes StateSet Source # 
Instance details

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

Instances details
(GObject o, IsDescendantOf StateSet o) => IsStateSet o Source # 
Instance details

Defined in GI.Atk.Objects.StateSet

toStateSet :: (MonadIO m, IsStateSet o) => o -> m StateSet Source #

Cast to StateSet, for types for which this is known to be safe. For general casts, use castTo.

noStateSet :: Maybe StateSet Source #

A convenience alias for Nothing :: Maybe StateSet.

Methods

Overloaded methods

addState

stateSetAddState Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> StateType

type: an StateType

-> m Bool

Returns: True if the state for type is not already in set.

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

stateSetAddStates Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> [StateType]

types: an array of 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

stateSetAndSets Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) 
=> a

set: an StateSet

-> b

compareSet: another StateSet

-> m StateSet

Returns: a new StateSet which is the intersection of the two sets.

Constructs the intersection of the two sets, returning Nothing if the intersection is empty.

clearStates

stateSetClearStates Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> m () 

Removes all states from the state set.

containsState

stateSetContainsState Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> StateType

type: an StateType

-> m Bool

Returns: True if type is the state type is in set.

Checks whether the state for the specified type is in the specified set.

containsStates

stateSetContainsStates Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> [StateType]

types: an array of StateType

-> m Bool

Returns: True if all the states for type are in set.

Checks whether the states for all the specified types are in the specified set.

isEmpty

stateSetIsEmpty Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateType

-> m Bool

Returns: True if set has no states set, otherwise False

Checks whether the state set is empty, i.e. has no states set.

new

stateSetNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m StateSet

Returns: a new StateSet

Creates a new empty state set.

orSets

stateSetOrSets Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) 
=> a

set: an StateSet

-> b

compareSet: another StateSet

-> m (Maybe StateSet)

Returns: a new StateSet which is the union of the two sets, returning Nothing is empty.

Constructs the union of the two sets.

removeState

stateSetRemoveState Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a) 
=> a

set: an StateSet

-> StateType

type: an AtkType

-> m Bool

Returns: True if type was the state type is in set.

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

stateSetXorSets Source #

Arguments

:: (HasCallStack, MonadIO m, IsStateSet a, IsStateSet b) 
=> a

set: an StateSet

-> b

compareSet: another StateSet

-> m StateSet

Returns: a new StateSet which contains the states which are in exactly one of the two sets.

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.