gi-atk-2.0.28: Atk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Atk.Objects.StateSet

Contents

- Exported types
- Methods
  - addState
  - addStates
  - andSets
  - clearStates
  - containsState
  - containsStates
  - isEmpty
  - new
  - orSets
  - removeState
  - xorSets

Description

An AtkStateSet contains the states of an object.

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
- 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

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 Methods (==) :: StateSet -> StateSet -> Bool Source # (/=) :: StateSet -> StateSet -> Bool Source #
GObject StateSet Source # |
Instance details Defined in GI.Atk.Objects.StateSet
ManagedPtrNewtype StateSet Source # |
Instance details Defined in GI.Atk.Objects.StateSet Methods toManagedPtr :: StateSet -> ManagedPtr StateSet Source #
TypedObject StateSet Source # |
Instance details Defined in GI.Atk.Objects.StateSet Methods glibType :: IO GType Source #
HasParentTypes StateSet Source # |
Instance details Defined in GI.Atk.Objects.StateSet
IsGValue (Maybe StateSet) Source # | Convert `StateSet` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Atk.Objects.StateSet Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe StateSet -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe StateSet) Source #
type ParentTypes StateSet Source # |
Instance details Defined in GI.Atk.Objects.StateSet type ParentTypes StateSet = '[Object]

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`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

addState, addStates, andSets, bindProperty, bindPropertyFull, clearStates, containsState, containsStates, forceFloating, freezeNotify, getv, isEmpty, isFloating, notify, notifyByPspec, orSets, ref, refSink, removeState, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure, xorSets.

#### Getters

getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## 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.