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//focus_tracking_presenter.pyo
z#Jc@sdZdZdZdZdZdZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZddkZddklZd	eifd
YZdS(s-Provides the FocusTrackingPresenter for Orca.s$Id$s
$Revision$s$Date$s-Copyright (c) 2005-2009 Sun Microsystems Inc.tLGPLiN(t_tFocusTrackingPresentercBseZdZdZdZdZdZdZdZdZ	dZ
d	Zdd
Z
dZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(sdMaintain a set of scripts for all running applications, and
    also keeps the notion of an activeScript.  All object events are
    passed to the associated script for that application, regardless if
    the application has keyboard focus or not.  All keyboard events are
    passed to the active script only if it has indicated interest in the
    event.cCstii|ti|_h|_h|_d|_	t
i
d|_d|_t
i|_d|_|iddd|_d|_d|_tio|intiod|_d|_ndS(Nigt__init__(tpresentation_managertPresentationManagerRtpyatspitRegistrytregistryt
_knownScriptst_knownAppSettingstNonet_oldAppSettingstQueuet_eventQueuet_gidleIdt	threadingtLockt
_gidleLocktnoFocusTimestamptsetActiveScriptt_defaultScriptt
_appStateInfot_listenerCountstsettingstlistenAllEventst_registerAllEventstdebugEventQueuet_enqueueEventCountt_dequeueEventCount(tself((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR6s$								

	cCsN||ijo|i|cd7<n$|ii|i|d|i|<dS(swTells this module to listen for the given event type.

        Arguments:
        - eventType: the event type.
        iN(RRtregisterEventListenert
_enqueueEvent(Rt	eventType((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_registerEventListenercs
cCsO|i|cd8<|i|djo$|ii|i||i|=ndS(sTells this module to stop listening for the given event type.

        Arguments:
        - eventType: the event type.
        iiN(RRtderegisterEventListenerR (RR!((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_deregisterEventListenerqs
cCs@tdti}x$|D]}|ii|i|qWdS(s?Register all top-level event types except for "mouse".
        cSsd|jo
d|jS(t:tmouse((tet((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt<lambda>sN(tfilterRt
EVENT_TREERRR (RttopLevelEventst
event_type((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR~s		cCs@tdti}x$|D]}|ii|i|qWdS(NcSsd|jo
d|jS(R%R&((R'((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR(s(R)RR*RR#R (RR+R,((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_deregisterAllEventss		cCs:tiodSx$|iiD]}|i|qWdS(sTells the FocusTrackingPresenter to listen for all
        the event types of interest to the script.

        Arguments:
        - script: the script.
        N(RRt	listenerstkeysR"(RtscriptR!((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_registerEventListenerss

cCs:tiodSx$|iiD]}|i|qWdS(sTells the FocusTrackingPresenter to stop listening for all the
        event types of interest to the script.

        Arguments:
        - script: the script.
        N(RRR.R/R$(RR0R!((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_deregisterEventListenerss

cCsd	}tioSti}ti|}d	}|ot|ox|D]}t|o|d|}n|}yQtitid|t	|t
tdg}titid|PWqItj
otitid|qIti
tititid|qIXqIWn|o1y|i|}Wq_ti
tiq_Xqcn|o|ot|dd	ox|D]}|odi||if}n
|i}ybtitid|it	|t
tdg}|i|}titid|Wqtj
o!titid|iqti
tititid|iqXqWn|pti|}n|S(
sFor the given application name, create a new script instance.
        We'll first see if a mapping from appName to module name exists.
        If it does, we use that.  If it doesn't, we try the app name.
        If all else fails, we fall back to the default script.
        t.sLooking for script at %s.py...ts...found %s.pys...could not find %s.pysWhile attempting to import %sttoolkitNames#Looking for toolkit script %s.py...N(RRtenableCustomScriptstscriptPackagestgetScriptModuleNametlentdebugtprintlntLEVEL_FINESTt
__import__tglobalstlocalstImportErrortprintExceptiontLEVEL_SEVEREtScripttgetattrtjoinR5t
LEVEL_FINEtdefault(RtappR0R7t
moduleNametmoduletpackagetname((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt
_createScripts|
		
"	cCs|p=|ip&tid|_|i|in|i}nK||ijo|i|}n*|i|}||i|<|i||S(sGet a script for an app (and make it if necessary).  This is used
        instead of a simple calls to Script's constructor.

        Arguments:
        - app: the Python app

        Returns an instance of a Script.
        N(RRGRCRR1R	RM(RRHR0((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt	getScripts




cCsyD|iptii|_ntii|itiiWnnX|t_ytiiWnnXtio'titi	dtii
|fndS(snSet the new active script.

        Arguments:
        - newScript: the new script to be made active.
        sACTIVE SCRIPT: %s (reason=%s)N(Rt
orca_statetactiveScripttsaveOldAppSettingstrestoreOldAppSettingst
deactivatetactivateR:R;RFRL(Rt	newScripttreason((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR.s 
	
	
cCs!d}titid|dS(sLLooks for defunct accessible objects in the cache and removes them.
        is"_cleanupCache: %d objects removed.N(R:R;R<(RtobjectsRemoved((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt
_cleanupCacheOscCspddk}|ixS|iD]H}y8t|tiio|ii||inWq q Xq WdS(sCleans up garbage on the heap.iN(	tgctcollecttgarbaget
isinstanceRt
Accessibilityt
Accessibletremovet__del__(RRYtobj((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_cleanupGarbageWs

cCsyk|iid}xR|iiD]A}||jo.|i|}|i||i|=~~q%q%WWntitinXdS(sqCompares the list of known scripts to the list of known apps,
        deleting any scripts as necessary.
        iN(Rt
getDesktopR	R/R2R:RAR<(RtdesktopRHR0((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_reclaimScriptscs



c	Cs|i}ti}ti|}|ot|o~x{|D]o}t|o|d|}n|}ytitid|||ijo)t	|t
tdg|i|<nt|i|titid|t
|i|do6|i|i|_|i|i||i|_nt
|i|do6|i|i|_|i|i||i|_nPWq<tj
otitid|q<Xq<WndS(	sLoad the users application specific settings for an app.

        Arguments:
        - script: the current active script.
        R3s Looking for settings at %s.py...R4s...found %s.pytoverrideAppKeyBindingstoverridePronunciationss...could not find %s.pyN(RHRtsettingsPackagesR8R9R:R;R<R
R=R>R?treloadthasattrRftkeyBindingsRgtapp_pronunciation_dictR@(RR0RHRhRIRKRL((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pytloadAppSettingss>		
)





cCsPtioBytii|WqLtitititiqLXndS(sProcesses the given keyboard event based on the keybinding from the
        currently active script.

        Arguments:
        - keyboardEvent: an instance of input_event.KeyboardEvent
        N(RORPtprocessKeyboardEventR:RAt
LEVEL_WARNINGt
printStack(Rt
keyboardEvent((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_processKeyboardEvents
cCsPtioBytii|WqLtitititiqLXndS(sCalled whenever a cursor key is pressed on the Braille display.

        Arguments:
        - brailleEvent: an instance of input_event.BrailleEvent
        N(RORPtprocessBrailleEventR:RARoRp(RtbrailleEvent((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_processBrailleEvents
c
Csptiti|y|iitijoetioqt	t
iti
o9t
iidjo&tit
iidjodSqdSnWnnX|iidoQ|i|iidjo0|i|itio|iqndSy|io|ii}|itiotitid|iido]t
io6t
iio)t
iidddddt
i_nt!i"|ddt
_#ndSnti$p ti$oJti$i%|io4|iid	pti&tid
|iqnWnUt'j
o2ti(ti)titi)d|idSti(ti)dSX|iptiti)ddSd}t
i*}yR|iid	p&|i+|i,p
|ii-}n
t
i}|pdSWn0d}ti(ti)titi)d
nXx=|o5||i.jo%ya|ii}|iti/p:|i}|dj}d}|o|o
d}n|p&|ido|iiti0j}|o|o
d}n|p9|ido)|iiti1jo|iti2}|o|o
d}n|p[|idp|ido7|i3o-t
io|i,ot
ii4|i,j}qn|oN|i+|i,p
|ii-}	|	i5|}|o|o
d}qn|o|o
d}n|oY|i6|i+|i,p
|ii-||i7t
it8i9t
ii:i;n|i<||otiti)d|qnPWq/t'j
oti(ti)titi)d|i|d7}||i.jo4|t
_*titi)d|ti=|i>qgtiti)d|dq/ti(ti)Pq/Xq/WdS(scHandles all events destined for scripts.

        Arguments:
        - e: an at-spi event.
        tF1g?Nsobject:children-changed:removeisIGNORING DEFUNCT OBJECTswindow:deactivateismouse:s    s,LookupError above while processing event: %ss(ERROR: received an event with no source.s,ERROR: received an event, but Script is Noneswindow:activateswindow:activate eventtfocussframe received focussobject:state-changed:showingsmodal panel is showingsobject:state-changed:focusedsscript requested itsobject received focuss  SUCCEEDED AFTER %d TRIESs&LookupError above while processing: %sis  TRYING AGAIN (%d)s  GIVING UP AFTER %d TRIES(?R:tprintObjectEventR<tsourcetgetRoleRt
ROLE_TOOL_TIPRtpresentToolTipsR\ROtlastInputEventtinput_eventt
KeyboardEventtlastNonModifierKeyEventtevent_stringttimettypet
startswithRRcReRXtdebugMemoryUsageRbtgetStatetcontainst
STATE_DEFUNCTR;RPtflatReviewContexttdrawOutlineRtorcatsetLocusOfFocustactiveWindowteventDebugFiltertmatchtprintDetailstLookupErrorRARotlocusOfFocusRNthost_applicationtgetApplicationtcommFailureAttemptLimittSTATE_ICONIFIEDt
ROLE_FRAMEt
ROLE_PANELtSTATE_MODALtdetail1RHtisActivatableEventRRmtbrailletsetupKeyRangestbrailleBindingsR/tprocessObjectEventtsleeptcommFailureWaitTime(
Rteventtstatet
retryCounttoldLocusOfFocuststeTypetsetNewActiveScriptRVt	theScript((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_processObjectEvents
	
	

	






	
%
				






	


	cCsati}tio;|iotitid|in|id7_nd}t|t	i
o~|iti
jo'titid|i|ifn;|itijo'titid|i|ifn|}nt|t	io*titidt|i|}n|itijo"tio|id8_ndS|iido"tio|id8_ndS|iido"tio|id8_ndS|iid	o>|i|iid
jo"tio|id8_ndS|}|ip<titid|itio|id8_ndStip tio4tii|iotitid|iny$|iitijo
t}nWnnX|odtiotitid
n|i i!tioJtitidtitidtitid|i"i#n|i"i$|tiotitidn|oB|i%o7ti&ot'i(ti&nt)i*|i+|_%ntiotitidn|i i,tiotitidn|p|i+q@ntio|id8_ndS(scHandles all events destined for scripts.

        Arguments:
        - e: an at-spi event.
        sSfocus_tracking_presenter._enqueueEvent has been entered before exiting (count = %d)is'----------> QUEUEING KEYPRESS '%s' (%d)s)----------> QUEUEING KEYRELEASE '%s' (%d)s'----------> QUEUEING BRAILLE COMMAND %sNsobject:state-changed:defuncts(object:property-change:accessible-parentsobject:children-changed:removeis$---------> IGNORING INVALID EVENT %ss---------> QUEUEING EVENT %ss           acquiring lock...s           ...acquireds           calling queue.put...s           (full=%s)s           ...put completes           releasing lock...s           ...released(-Rt	asyncModeRRR:R;t	LEVEL_ALLRR\R~RRRtKEY_PRESSED_EVENTRthw_codetKEY_RELEASED_EVENTtBrailleEventtreprRtignoredEventsListRRyRRcR<RRRR5tsynchronousToolkitstFalseRtacquireRtfulltputRtgilSleepTimeRRtgobjecttidle_addt
_dequeueEventtrelease(RteRR((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR s	










	









cCst}tio1titidd|i|id7_ny"|ii}t	|t
io|it
ijo-titid|i|ifd}nA|it
ijo-titid|i|ifd}ntitid||if|i|titid	||ifn>t	|t
ioqtitid
t|ititidt|i|i|titidt|intip tioNtii|io8titid
|ititid|in|i|tip tio4tii|iotitid|intiptio|itij}|ii |ii!o|oti"ot#i$ti"nt%d}ti&ti'jot(i)|nti*ti'jot+i,|nti|_nd|_-t.}n|ii/WnIt0i1j
o$titi2ddt.}nti3ti2nXtio1|id8_titidd|in|S(sYHandles all events destined for scripts.  Called by the GTK
        idle thread.
        s/Entering focus_tracking_presenter._dequeueEvents %dis'DEQUEUED KEYPRESS '%s' (%d) <----------tPRESSs)DEQUEUED KEYRELEASE '%s' (%d) <----------tRELEASEs$
vvvvv PROCESS KEY %s EVENT %s vvvvvs$
^^^^^ PROCESS KEY %s EVENT %s ^^^^^s'DEQUEUED BRAILLE COMMAND %s <----------s%
vvvvv PROCESS BRAILLE EVENT %s vvvvvs%
^^^^^ PROCESS BRAILLE EVENT %s ^^^^^sDEQUEUED EVENT %s <----------s$
vvvvv PROCESS OBJECT EVENT %s vvvvvs$^^^^^ PROCESS OBJECT EVENT %s ^^^^^
sNo focusis(focus_tracking_presenter:_dequeueEvent: s the event queue is empty!s.Leaving focus_tracking_presenter._dequeueEvent(4tTrueRRR:R;RRRt
get_nowaitR\R~RRRRRRRteventDebugLevelRrRRRRuRRRRORPRRRRtemptyRRRRtbrailleVerbosityLeveltVERBOSITY_LEVEL_VERBOSERtdisplayMessagetspeechVerbosityLeveltspeechtspeakRRRR
tEmptyRBRA(RtrerunRtpressReleasetnoFocustmessage((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRfs











	


cCsMt}tio9tii|o&ti}|o|i|qIn|S(sProcesses the given keyboard event based on the keybinding from the
        currently active script. This method is called synchronously from the
        at-spi registry and should be performant.  In addition, it must return
        True if it has consumed the event (and False if not).

        Arguments:
        - keyboardEvent: an instance of input_event.KeyboardEvent

        Returns True if the event should be consumed.
        (RRORPtconsumesKeyboardEventtbypassNextCommandR (RRqtconsume((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRns

cCs7tio%tii|o|i|tStSdS(sCalled whenever a cursor key is pressed on the Braille display.

        Arguments:
        - brailleEvent: an instance of input_event.BrailleEvent

        Returns True if the command was consumed; otherwise False
        N(RORPtconsumesBrailleEventR RR(RRt((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRss
	

cCs(tiotii|||ndS(sCalled when the visual object with focus changes.

        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(RORPtlocusOfFocusChanged(RRRtnewLocusOfFocus((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRs	
cCs%tiotii||ndS(sSCalled when the visual appearance of an object changes.
        This method should not be called for objects whose visual
        appearance changes solely because of focus -- locusOfFocusChanged
        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.

        Arguments:
        - event: if not None, the Event that caused this to happen
        - obj: the Accessible whose visual appearance changed.
        N(RORPtvisualAppearanceChanged(RRRa((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRs
cCsFg|_x6|iiD]%}|ii|i|igqWdS(s/Saves script and application state information.N(RR	tvaluestappendRHtgetAppState(RR0((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_saveAppStatess	cCsQy:x3|iD](\}}|i|}|i|q
WWnnXd|_dS(s2Restores script and application state information.N(RRNtsetAppStateR(RRHtappStateR0((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt_restoreAppStatess
cCsh|_h|_h|_d
|_d
|_|i|i|id
dt	i
tii
i|id|id|idtii}|oddddY}dddY}||dd	d	|}tii|}|i|nd
S(
s3Called when this presentation manager is activated.RTswindow:activateswindow:deactivatesobject:children-changed:removet
_FakeEventcBseZdZRS(cSs1||_||_||_||_||_dS(N(RyRRtdetail2tany_data(RRyR!RRR((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRCs
				(t__name__t
__module__R(((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRBst	_FakeDatacBseZdZdZRS(cSsdS(N((R((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRLscSsdS(N(R(R((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pytvalueNs(RRRR(((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRKs	iN(((RR	R
RRRRRRNRRRORPRR/R"tfindActiveWindowRRtEventR (RtwinRRtfeR((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRT(s$					



	cCs{|ix-|iiD]}|ii|i|qWh|_h|_h|_d|_	d|_
|idddS(s5Called when this presentation manager is deactivated.RSN(RRR/RR#R R	R
RRRR(RR!((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyRSUs
					N(RRt__doc__RR"R$RR-R1R2RMRNRRRXRbReRmRrRuRR RRnRsRRRRRTRS(((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyR.s8	-		
						^	!			%	=		
			m							-(Rt__id__t__version__t__date__t
__copyright__t__license__RR
RRRRRGR:R~RRORRRt	orca_i18nRRR(((sA/usr/lib/python2.6/site-packages/orca/focus_tracking_presenter.pyt<module>s*

Youez - 2016 - github.com/yon3zu
LinuXploit