403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/orca/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/orca//script.pyo
z#Jc@sdZdZdZdZdZdZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZdd
d	YZdS(s.Each script maintains a set of key bindings, braille bindings, and
AT-SPI event listeners.  The key bindings are an instance of
KeyBindings.  The braille bindings are also a dictionary where the
keys are BrlTTY command integers and the values are instances of
InputEventHandler.  The listeners field is a dictionary where the keys
are AT-SPI event names and the values are function pointers.

Instances of scripts are intended to be created solely by the
focus_tracking_presenter.

This Script class is not intended to be instantiated directly.
Instead, it is expected that subclasses of the Script class will be
created in their own module.  The module defining the Script subclass
is also required to have a 'getScript(app)' method that returns an
instance of the Script subclass.  See default.py for an example.s$Id$s
$Revision$s$Date$s-Copyright (c) 2005-2009 Sun Microsystems Inc.tLGPLiNtScriptcBsIeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%RS($s:The specific focus tracking scripts for applications.
    cCsp||_|o|ii|_n
d|_|id|id7_|i|_t|_|i|_h|_	h|_
|i|i|_
|i|_|i|_|i|_|i|_|i|_h|_|i|_|i|_ti|_|i|_ t!i"|_#t$|_%ti&|_&ti'|_'t(i)t(i*d|idS(sCreates 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
        tdefaults	 (module=t)sNEW SCRIPT: %sN(+tapptnamet
__module__tgetListenerst	listenerstTruetpresentIfInactivetgetStructuralNavigationtstructuralNavigationtinputEventHandlerstpointOfReferencetsetupInputEventHandlerstgetKeyBindingstkeyBindingstgetBrailleBindingstbrailleBindingstgetPronunciationstapp_pronunciation_dictt
getFormattingt
formattingtgetBrailleGeneratortbrailleGeneratortgetSpeechGeneratortspeechGeneratortgeneratorCachetgetWhereAmItwhereAmItgetBookmarkst	bookmarkstsettingstvoicestgetTutorialGeneratorttutorialGeneratortflat_reviewtContexttflatReviewContextClasstFalsetfindCommandRuntcommFailureWaitTimetcommFailureAttemptLimittdebugtprintlnt
LEVEL_FINE(tselfR((s//usr/lib/python2.6/site-packages/orca/script.pyt__init__=s6					
		cCshS(sSets 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.
        ((R/((s//usr/lib/python2.6/site-packages/orca/script.pyRtscCsdS(slDefines InputEventHandler fields for this script that can be
        called by the key and braille bindings.N((R/((s//usr/lib/python2.6/site-packages/orca/script.pyR|scCs
tiS(skDefines the key bindings for this script.

        Returns an instance of keybindings.KeyBindings.
        (tkeybindingstKeyBindings(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCsHti}x5|iiD]'}||ijo|i|qqW|S(s 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.
        (R1R2Rthandlertadd(R/tinputEventHandlertmatchestbinding((s//usr/lib/python2.6/site-packages/orca/script.pytgetKeyBindingsForInputHandlers
cCshS(sDefines the braille bindings for this script.

        Returns a dictionary where the keys are BrlTTY commands and the
        values are InputEventHandler instances.
        ((R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCshS(sDefines the application specific pronunciations for this script.

        Returns a dictionary where the keys are the actual text strings and
        the values are the replacement strings that are spoken instead.
        ((R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCs?g}|iiD]$\}}||jo||qq~S(snReturns 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.
        (Rt	iteritems(R/R5t_[1]tcommandR3((s//usr/lib/python2.6/site-packages/orca/script.pyt!getBrailleCommandsForInputHandlers
cCs
ti|S(s/Returns the formatting strings for this script.(Rt
Formatting(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCs
ti|S(s7Returns the braille generator for this script.
        (tbraille_generatortBrailleGenerator(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCs
ti|S(s6Returns the speech generator for this script.
        (tspeech_generatortSpeechGenerator(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCs
ti|S(s8Returns the tutorial generator for this script.
        (ttutorialgeneratortTutorialGenerator(R/((s//usr/lib/python2.6/site-packages/orca/script.pyR#scCsgS(saReturns a list of the structural navigation object types
        enabled in this script.
        ((R/((s//usr/lib/python2.6/site-packages/orca/script.pyt#getEnabledStructuralNavigationTypesscCs|i}ti||S(sCReturns the 'structural navigation' class for this script.
        (RDtstructural_navigationtStructuralNavigation(R/ttypes((s//usr/lib/python2.6/site-packages/orca/script.pyRscCs
|iiS(s5Returns True if we should use structural navigation. Most
        scripts will have no need to override this.  Gecko does however
        because within an HTML document there are times when we do want
        to use it and times when we don't even though it is enabled,
        e.g. in a form field.
        (Rtenabled(R/((s//usr/lib/python2.6/site-packages/orca/script.pytuseStructuralNavigationModelscCs
ti|S(s8Returns the "where am I" class for this script.
        (t
where_am_ItWhereAmI(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRscCstS(sDetermine whether this script should echo the current key event.
        Note that the keyEcho() method in orca.py will still take into
        account whatever the user's various preferences for key echoing
        are, which may override what is return by this echoKey() method.

        Arguments:
        - keyEvent - the key event

        Returns an indication of whether a key echo event should be
        allowed to happen for this script.
        (R	(R/tkeyEvent((s//usr/lib/python2.6/site-packages/orca/script.pytechoKeys
cCs;y|iSWn)tj
oti||_|iSXdS(s7Returns the "bookmarks" class for this script.
        N(R tAttributeErrort	Bookmarks(R/((s//usr/lib/python2.6/site-packages/orca/script.pyRs
cCsdS(suReturn a GtkVBox contain the application unique configuration
        GUI items for the current application.
        N(tNone(R/((s//usr/lib/python2.6/site-packages/orca/script.pytgetAppPreferencesGUIscCsdS(sWrite out the application specific preferences lines and set the
        new values.

        Arguments:
        - prefs: file handle for application preferences.
        N((R/tprefs((s//usr/lib/python2.6/site-packages/orca/script.pytsetAppPreferencesscCs|S(sAllow for the customization of application specific key bindings.

        Arguments:
        - script: the application script.
        - keyBindings: the set of key bindings for this script.
        ((R/tscriptR((s//usr/lib/python2.6/site-packages/orca/script.pytoverrideAppKeyBindingsscCs|S(sAllow for the customization of application specific pronunciations.

        Arguments:
        - script: the application script.
        - pronunciations: the dictionary of pronunciations for this script.
        ((R/RTtpronunciations((s//usr/lib/python2.6/site-packages/orca/script.pytoverridePronunciationsscCsdS(sReturns an object that can be passed to setAppState.  This
        object will be used by setAppState to restore any state
        information that was being maintained by the script.N(RP(R/((s//usr/lib/python2.6/site-packages/orca/script.pytgetAppState"scCsdS(sSets the application state using the given appState object.

        Arguments:
        - appState: an object obtained from getAppState
        N((R/tappState((s//usr/lib/python2.6/site-packages/orca/script.pytsetAppState(scCstiS(smReturn the count of the number of clicks a user has made to one
        of the keys on the keyboard.
        (t
orca_statet
clickCount(R/((s//usr/lib/python2.6/site-packages/orca/script.pyt
getClickCount0scCsti|jp|i}|iitijo%|otiti	jo
t
}n|pdSh|_x?|ii
D].}|ii|o|i||q|q|WdS(soProcesses 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
        N(R[tactiveScriptR
tsourcetgetRoletpyatspitROLE_PROGRESS_BARR!tprogressBarVerbositytPROGRESS_BAR_ALLR	RRtkeysttypet
startswith(R/teventtprocessEventtkey((s//usr/lib/python2.6/site-packages/orca/script.pytprocessObjectEvent@s	
	cCsd}ti}|i|jo||i}nd|jo|d}nt}|oG|i|}|o!|i|iijo|i	S|dj}n|pJ|i
i|}|o!|i|iijo|i	S|dj}n|S(sCalled when a key is pressed on the keyboard.

        Arguments:
        - keyboardEvent: an instance of input_event.KeyboardEvent

        Returns True if the event is of interest.
        RN(RPR!tkeyBindingsMapRR(tgetInputHandlertfunctionRt	functionsRIR(R/t
keyboardEventt
user_bindingstuser_bindings_maptconsumesR3((s//usr/lib/python2.6/site-packages/orca/script.pytconsumesKeyboardEventps(		
cCs||_d}ti}|i|jo||i}nd|jo|d}nt}|o|i||}n|p|ii||}n|S(sProcesses 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
        RN(RTRPR!RlRR(tconsumeKeyboardEventR(R/RpRqRrtconsumed((s//usr/lib/python2.6/site-packages/orca/script.pytprocessKeyboardEvents	
	
	

cCsd}ti}|i|jo||i}nd|jo|d}n|id}t}|o||j}n|p||ij}n|S(sCalled 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.
        RR;N(RPR!tbrailleBindingsMapRRhR(R(R/tbrailleEventRqRrR;Rs((s//usr/lib/python2.6/site-packages/orca/script.pytconsumesBrailleEvents	

cCs||_t}d}|id}ti}|i|jo||i}nd|jo|d}n|o-||jo ||}|i||}n|o3||ijo#|i|}|i||}n|S(sCalled 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
        R;RN(	RTR(RPRhR!RxRtprocessInputEventR(R/RyRvRqR;RrR3((s//usr/lib/python2.6/site-packages/orca/script.pytprocessBrailleEvents 	

	


cCsdS(s=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
        N((R/RhtoldLocusOfFocustnewLocusOfFocus((s//usr/lib/python2.6/site-packages/orca/script.pytlocusOfFocusChangedscCsdS(szCalled 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.
        N((R/Rhtobj((s//usr/lib/python2.6/site-packages/orca/script.pytvisualAppearanceChangedscCstS(sReturns 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.
        (R	(R/Rh((s//usr/lib/python2.6/site-packages/orca/script.pytisActivatableEvent.s	cCsdS(s%Called when this script is activated.N((R/((s//usr/lib/python2.6/site-packages/orca/script.pytactivate9scCsdS(s'Called when this script is deactivated.N((R/((s//usr/lib/python2.6/site-packages/orca/script.pyt
deactivate=s(&t__name__Rt__doc__R0RRRR8RRR<RRRR#RDRRIRRMRRQRSRURWRXRZR]RkRtRwRzR|RRRRR(((s//usr/lib/python2.6/site-packages/orca/script.pyR9sH	7																								
	
				0	!	.		1				((Rt__id__t__version__t__date__t
__copyright__t__license__RaR>R,R%RR1R[R!R@RERJR RBR(((s//usr/lib/python2.6/site-packages/orca/script.pyt<module>"s&

Youez - 2016 - github.com/yon3zu
LinuXploit