Atspi.StateSet

g Atspi.StateSet Atspi.StateSet GObject.Object GObject.Object GObject.Object->Atspi.StateSet

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (states)

add (state)

compare (set2)

contains (state)

equals (set2)

get_states ()

is_empty ()

remove (state)

set_by_name (name, enabled)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

accessible

object

r

parent

GObject.Object

r

states

int

r

Class Details

class Atspi.StateSet(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Atspi.StateSetClass

The atspi-stateset objects implement wrappers around a bitmap of accessible states.

classmethod new(states)
Parameters:

states ([Atspi.StateType]) – An array of states with which the method initializes the state set.

Returns:

A new Atspi.StateSet with the given states.

Return type:

Atspi.StateSet

Generates an Atspi.StateSet with the given states.

add(state)
Parameters:

state (Atspi.StateType) – an Atspi.StateType to be added to the specified Atspi.StateSet.

Adds a particular #AtspiState to an Atspi.StateSet (i.e. sets the given state to True in the stateset).

compare(set2)
Parameters:

set2 (Atspi.StateSet) – a pointer to the second Atspi.StateSet object on which to operate.

Returns:

an Atspi.StateSet object containing all states contained on one of the two sets but not the other.

Return type:

Atspi.StateSet

Determines the differences between two instances of Atspi.StateSet.

see Atspi.StateSet.equals.

contains(state)
Parameters:

state (Atspi.StateType) – an Atspi.StateType for which the specified Atspi.StateSet will be queried.

Returns:

True if state is true/included in the given Atspi.StateSet, otherwise False.

Return type:

bool

Determines whether a given Atspi.StateSet includes a given state; that is, whether state is true for the self in question.

equals(set2)
Parameters:

set2 (Atspi.StateSet) – a pointer to the second Atspi.StateSet object on which to operate.

Returns:

True if the two Atspi.StateSets are equivalent, otherwise False.

Return type:

bool

Determines whether two instances of Atspi.StateSet are equivalent (i.e. consist of the same #AtspiStates). Useful for checking multiple state variables at once.

see Atspi.StateSet.compare.

get_states()
Returns:

A GLib.Array of state types representing the current state.

Return type:

[Atspi.StateType]

Returns the states in an Atspi.StateSet as an array.

is_empty()
Returns:

True if the state set contains no states; False otherwise.

Return type:

bool

remove(state)
Parameters:

state (Atspi.StateType) – an Atspi.StateType to remove from the specified self.

Removes a particular #AtspiState to an Atspi.StateSet (i.e. sets the given state to False in the stateset.)

set_by_name(name, enabled)
Parameters:
  • name (str) – a string corresponding to a state name.

  • enabled (bool) – if True, name should be enabled in the self in question; otherwise, it should be disabled.

Enables/disables a state in an Atspi.StateSet according to its name.