Atspi.MatchRule

g Atspi.MatchRule Atspi.MatchRule GObject.Object GObject.Object GObject.Object->Atspi.MatchRule

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (states, statematchtype, attributes, attributematchtype, roles, rolematchtype, interfaces, interfacematchtype, invert)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

attributematchtype

Atspi.CollectionMatchType

r

attributes

{object: object}

r

interfacematchtype

Atspi.CollectionMatchType

r

interfaces

[object]

r

invert

bool

r

parent

GObject.Object

r

rolematchtype

Atspi.CollectionMatchType

r

roles

[int]

r

statematchtype

Atspi.CollectionMatchType

r

states

Atspi.StateSet

r

Class Details

class Atspi.MatchRule(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Atspi.MatchRuleClass

An interface that allows the definition of match rules for accessible objects.

classmethod new(states, statematchtype, attributes, attributematchtype, roles, rolematchtype, interfaces, interfacematchtype, invert)
Parameters:
  • states (Atspi.StateSet or None) – An Atspi.StateSet specifying the states to match or None if none.

  • statematchtype (Atspi.CollectionMatchType) – An Atspi.CollectionMatchType specifying how to interpret states.

  • attributes ({str: str} or None) – A GLib.HashTable specifying attributes to match. To specify multiple attribute values, separate each value with a :: If an attribute value contains a :, then it can be escaped by preceding it with a \. A backslash can likewise be escaped by inserting a double backslash.

  • attributematchtype (Atspi.CollectionMatchType) – An Atspi.CollectionMatchType specifying how to interpret attributes.

  • roles ([Atspi.Role] or None) – A GLib.Array of roles to match, or None if not applicable.

  • rolematchtype (Atspi.CollectionMatchType) – An Atspi.CollectionMatchType specifying how to interpret roles.

  • interfaces ([str] or None) – An array of interfaces to match, or None if not applicable. Interface names should be specified by the final component of their DBus names (Accessible, Component, etc). For Action, it is possible to specify an action name by enclosing it in parenthesis after the interface name, in which case only accessibles that implement that particular action will be returned. For instance, Action(click) will return accessibles that provide an action called “click”.

  • interfacematchtype (Atspi.CollectionMatchType) – An Atspi.CollectionMatchType specifying how to interpret interfaces.

  • invert (bool) – if True, the match rule should be denied (inverted); if False, it should not. For example, if the match rule defines that a match is an object of ROLE_HEADING which has STATE_FOCUSABLE and a click action, inverting it would match all objects that are not of ROLE_HEADING, focusable and clickable at the same time.

Returns:

A new Atspi.MatchRule.

Return type:

Atspi.MatchRule

Creates a new Atspi.MatchRule with specified states, attributes, interfaces, and roles.