| |
Methods defined here:
- __init__(self, app)
- Creates a script for the given application, if necessary.
This method should not be called by anyone except the
focus_tracking_presenter.
Arguments:
- app: the Python Accessible application to create a script for
- consumesBrailleEvent(self, brailleEvent)
- Called when a key is pressed on the braille display.
Arguments:
- brailleEvent: an instance of input_event.KeyboardEvent
Returns True if the event is of interest.
- consumesKeyboardEvent(self, keyboardEvent)
- Called when a key is pressed on the keyboard.
Arguments:
- keyboardEvent: an instance of input_event.KeyboardEvent
Returns True if the event is of interest.
- getBrailleBindings(self)
- Defines the braille bindings for this script.
Returns a dictionary where the keys are BrlTTY commands and the
values are InputEventHandler instances.
- getBrailleCommandsForInputHandler(self, inputEventHandler)
- Returns a list of BrlTTY commands (they're in braille.py) that
match the given inputEventHandler passed as argument.
Arguments:
- inputEventHandler: an instance of input_event.InputEventHandler
Returns a list (possibly empty) of BrlTTY commands (they're in
braille.py) that match the given inputEventHandler passed.
- getBrailleGenerator(self)
- Returns the braille generator for this script.
- getKeyBindings(self)
- Defines the key bindings for this script.
Returns an instance of keybindings.KeyBindings.
- getKeyBindingsForInputHandler(self, inputEventHandler)
- Returns a KeyBindings object with the list of KeyBindings that
matche the passed inputEventHandler as argument (at least the
inputEventHandler that has the same handler function)
Arguments:
- inputEventHandler: an instance of input_event.InputEventHandler
Returns an instance of keybindings.KeyBindings populated with
keybindings.KeyBinding instances that match the inputEventHandler.
- getListeners(self)
- Sets up the AT-SPI event listeners for this script.
Returns a dictionary where the keys are AT-SPI event names
and the values are script methods.
- getSpeechGenerator(self)
- Returns the speech generator for this script.
- locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus)
- Called when the visual object with focus changes.
The primary purpose of this method is to present locus of focus
information to the user.
NOTE: scripts should not call this method directly. Instead,
a script should call orca.setLocusOfFocus, which will eventually
result in this method being called.
Arguments:
- event: if not None, the Event that caused the change
- oldLocusOfFocus: Accessible that is the old locus of focus
- newLocusOfFocus: Accessible that is the new locus of focus
- processBrailleEvent(self, brailleEvent)
- Called whenever a key is pressed on the Braille display.
This method will primarily use the brailleBindings field of
this script instance see if this script has an interest in the
event.
NOTE: there is latent, but unsupported, logic for allowing
the user's user-settings.py file to extend and/or override
the brailleBindings for a script.
Arguments:
- brailleEvent: an instance of input_event.BrailleEvent
- processKeyboardEvent(self, keyboardEvent)
- Processes the given keyboard event.
This method will primarily use the keybindings field of this
script instance see if this script has an interest in the
event.
NOTE: there is latent, but unsupported, logic for allowing
the user's user-settings.py file to extend and/or override
the keybindings for a script.
Arguments:
- keyboardEvent: an instance of input_event.KeyboardEvent
- processObjectEvent(self, event)
- Processes all AT-SPI object events of interest to this
script. The interest in events is specified via the
'listeners' field that was defined during the construction of
this script.
In general, the primary purpose of handling object events is to
keep track of changes to the locus of focus and notify the
orca module of these changes via orca.setLocusOfFocus and
orca.visualAppearanceChanged.
Note that this script may be passed events it doesn't care
about, so it needs to react accordingly.
Arguments:
- event: the Event
- setupInputEventHandlers(self)
- Defines InputEventHandler fields for this script that can be
called by the key and braille bindings.
- visualAppearanceChanged(self, event, obj)
- Called when the visual appearance of an object changes.
This method should not be called for objects whose visual
appearance changes solely because of focus -- setLocusOfFocus
is used for that. Instead, it is intended mostly for objects
whose notional 'value' has changed, such as a checkbox
changing state, a progress bar advancing, a slider moving,
text inserted, caret moved, etc.
The primary purpose of this method is to present the changed
information to the user.
NOTE: scripts should not call this method directly. Instead,
a script should call orca.visualAppearanceChanged, which will
eventually result in this method being called.
Arguments:
- event: if not None, the Event that caused this to happen
- obj: the Accessible whose visual appearance changed.
|