Atk.StateSet

g Atk.StateSet Atk.StateSet GObject.Object GObject.Object GObject.Object->Atk.StateSet

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_state (type)

add_states (types)

and_sets (compare_set)

clear_states ()

contains_state (type)

contains_states (types)

is_empty ()

or_sets (compare_set)

remove_state (type)

xor_sets (compare_set)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Atk.StateSet(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Atk.StateSetClass

An Atk.StateSet contains the states of an object.

An Atk.StateSet 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.

classmethod new()[source]
Returns:

a new Atk.StateSet

Return type:

Atk.StateSet

Creates a new empty state set.

add_state(type)[source]
Parameters:

type (Atk.StateType) – an Atk.StateType

Returns:

True if the state for type is not already in self.

Return type:

bool

Adds the state of the specified type to the state set if it is not already present.

Note that because an Atk.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.

add_states(types)[source]
Parameters:

types ([Atk.StateType]) – an array of Atk.StateType

Adds the states of the specified types to the state set.

Note that because an Atk.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.

and_sets(compare_set)[source]
Parameters:

compare_set (Atk.StateSet) – another Atk.StateSet

Returns:

a new Atk.StateSet which is the intersection of the two sets.

Return type:

Atk.StateSet

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

clear_states()[source]

Removes all states from the state set.

contains_state(type)[source]
Parameters:

type (Atk.StateType) – an Atk.StateType

Returns:

True if type is the state type is in self.

Return type:

bool

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

contains_states(types)[source]
Parameters:

types ([Atk.StateType]) – an array of Atk.StateType

Returns:

True if all the states for type are in self.

Return type:

bool

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

is_empty()[source]
Returns:

True if self has no states set, otherwise False

Return type:

bool

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

or_sets(compare_set)[source]
Parameters:

compare_set (Atk.StateSet) – another Atk.StateSet

Returns:

a new Atk.StateSet which is the union of the two sets, returning None is empty.

Return type:

Atk.StateSet or None

Constructs the union of the two sets.

remove_state(type)[source]
Parameters:

type (Atk.StateType) – an #AtkType

Returns:

True if type was the state type is in self.

Return type:

bool

Removes the state for the specified type from the state set.

Note that because an Atk.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.

xor_sets(compare_set)[source]
Parameters:

compare_set (Atk.StateSet) – another Atk.StateSet

Returns:

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

Return type:

Atk.StateSet

Constructs the exclusive-or of the two sets, returning None is empty. The set returned by this operation contains the states in exactly one of the two sets.