Mini Shell

Direktori : /lib/python3.6/site-packages/orca/scripts/apps/evolution/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/orca/scripts/apps/evolution/__pycache__/script.cpython-36.pyc

3

�2[��@s�dZdZdZdZdZdZddlZddljZddl	j
jjZddl
j
jjZddljZddljZdd	lmZdd
lmZddlmZej�ZGdd
�d
ejej�ZdS)zCustom script for Evolution.z$Id$z
$Revision$z$Date$zLCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2013 Igalia, S.L.ZLGPL�N�)�BrailleGenerator)�SpeechGenerator)�	UtilitiescspeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z�fd
d�Z	dd�Z
dd�Zdd�Zdd�Z
�ZS)�Scriptcs0tjd�dkrtjdd�t�j|�d|_dS)z�Creates a new script for the given application.

        Arguments:
        - app: the application to create a script for.
        ZsayAllOnLoadNF)�_settingsManagerZ
getSettingZ
setSetting�super�__init__ZpresentIfInactive)�selfZapp)�	__class__��/usr/lib/python3.6/script.pyr	4szScript.__init__cCst|�S)N)r)r
rrr
�getBrailleGeneratorAszScript.getBrailleGeneratorcCst|�S)N)r)r
rrr
�getSpeechGeneratorDszScript.getSpeechGeneratorcCst|�S)N)r)r
rrr
�getUtilitiesGszScript.getUtilitiescCs,|jj|j�}|r(|j�jtj�r(dSdS)a�Returns True if the given event is one that should cause this
        script to become the active script.  This is only a hint to
        the focus tracking manager and it is not guaranteed this
        request will be honored.  Note that by the time the focus
        tracking manager calls this method, it thinks the script
        should become active.  This is an opportunity for the script
        to say it shouldn't.
        FT)�	utilitiesZtopLevelObject�source�getState�contains�pyatspiZSTATE_ACTIVE)r
�eventZwindowrrr
�isActivatableEventJs
zScript.isActivatableEventcCsdS)z�Whether or not speech should be stopped prior to setting the
        locusOfFocus in onActiveDescendantChanged.

        Arguments:
        - event: the Event

        Returns True if speech should be stopped; False otherwise.
        Fr)r
rrrr
�#stopSpeechOnActiveDescendantChangedZs
z*Script.stopSpeechOnActiveDescendantChangedcs\|js
dS|jj|j�rL|jj�jtj�r:tj	||j�ntj	||j�dSt
�j|�dS)zCCallback for object:active-descendant-changed accessibility events.N)Zany_datarZisComposeAutocompleterrrrZSTATE_SELECTED�orca�setLocusOfFocusr�onActiveDescendantChanged)r
r)rrr
rlsz Script.onActiveDescendantChangedcCsdS)z<Callback for object:state-changed:busy accessibility events.Nr)r
rrrr
�
onBusyChanged{szScript.onBusyChangedcCsR|jj|j�rdS|jj�tjkr@|jj|j�}tj||�dSt	j
j||�dS)z)Callback for focus: accessibility events.N)r�isWebKitGtkr�getRolerZROLE_LAYERED_PANEZrealActiveDescendantrr�gtkr�onFocus)r
r�objrrr
r szScript.onFocuscCs$|jj|j�rdStjj||�dS)z;Callback for object:property-change:accessible-name events.N)rrrrr�
onNameChanged)r
rrrr
r"�szScript.onNameChangedcCs<|j}|j�tjkr*|j�jtj�r*dStjj	||�dS)z;Callback for object:selection-changed accessibility events.N)
rrrZROLE_COMBO_BOXrrZ
STATE_FOCUSEDrr�onSelectionChanged)r
rr!rrr
r#�s
zScript.onSelectionChanged)�__name__�
__module__�__qualname__r	rrrrrrrr r"r#�
__classcell__rr)rr
r2s
r)�__doc__Z__id__�__version__Z__date__Z
__copyright__Z__license__rZ	orca.orcarZorca.scripts.toolkits.gtk�scriptsZtoolkitsrZorca.scripts.toolkits.WebKitGtkZ	WebKitGtkZ
orca.settingsZsettingsZorca.settings_managerZsettings_managerZbraille_generatorrZspeech_generatorrZscript_utilitiesrZ
getManagerrrrrrr
�<module>s