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/default.pyc
z#Jc"@s{dZdZdZdZdZdZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddk Z ddk!Z!ddk"l#Z#dd	k"l$Z$dd
k"l%Z%dei&fdYZ&hZ'd
e(fe'ei)<d
de(fe'ei*<de(fe'ei+<de(fe'ei,<d
e(fe'ei-<d
de(fe'ei.<d
de(fe'ei/<de(fe'ei0<de(fe'ei,<dS(sThe default Script for presenting information to the user using
both speech and Braille.  This is based primarily on the de-facto
standard implementation of the AT-SPI, which is the GAIL support
for GTK.s$Id$s
$Revision$s$Date$s-Copyright (c) 2004-2009 Sun Microsystems Inc.tLGPLiN(t_(tngettext(tC_tScriptcBseZdZdZeideiZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ e!dZ"dZ#dZ$dZ%d Z&d!Z'd"Z(d#Z)d$Z*d%Z+d&Z,d'Z-d(Z.d)Z/d*Z0d+Z1d,Z2e!d-Z3d.Z4d/Z5d0Z6e!d1Z7d2Z8d3Z9d4Z:d5Z;d6Z<d7Z=d8Z>d9Z?d:Z@d;ZAd<ZBd=ZCd>ZDd?ZEd@ZFdAZGdBZHdCZIdDZJdEZKdFZLe!dGZMdHZNdIZOdJZPdKZQe!dLZRdMZSe!dNZTe!dOZUe!dPZVdQZWdRZXdSZYdTZZe!dUZ[dVdWZ\dXZ]e!dVdYZ^e!dZZ_e!dVd[Z`e!d\Zae!d]Zbe!d^Zce!d_Zde!d`Zee!daZfdbZge!dcZhe!ddZie!deZjdfZkdgZldhZmdidjZndkZodlZpdmZqdnZrdoZsdVdpZtdVdqZudVdrZvdsZwdVdidtZxduZydvZzdwZ{dxZ|dyZ}didzZ~d{Zd|Zd}Zd~ZdZdZe!dZdZdZdZdZdZdZdZdZdZddZdZe!dZe!dZe!dZdZddZdZdZdZdZdZdZdZdZdZdZdZdZdZedZdZdZdZdVddZdZdZdZdZdZdZdZdZdZdZe!dZdZdZdZdZdZedZedZdZdZdZdeedZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZedZdZRS(uu s(\W+)tdisplayedLabelt
displayedTextt
keyBindingtnestingLevelt	nodeLeveltrealActiveDescendantcCstii||d|_d|_d|_d|_d|_t	|_
d|_d|_d|_
d|_g|_h|_h|_d|_h|_d|_ddg|_dS(sCreates a new script for the given application.

        Arguments:
        - app: the application to create a script for.
        t
0123456789s 	

iN(tscriptRt__init__tNonetflatReviewContexttwindowActivateTimetlastReviewCurrentEventtexitLearnModeKeyBindingttargetCursorCelltFalsetjustEnteredFlatReviewModetdigitst
whitespacetlastWhereAmIEventtlastSayAllEventt_unicodeCurrencySymbolstlastProgressBarTimetlastProgressBarValuetlastSelectedMenutattributeNamesDicttlastMouseRoutingTimetoldMouseCoordinates(tselftapp((s0/usr/lib/python2.6/site-packages/orca/default.pyR
Ss$																cCs	tititd|id<tititd|id<tititd|id<tititd|id<titi	td	|id
<titi
td|id<tititd
|id<tititd|id<tit
itd|id<tititd|id<tititd|id<tititd|id<tititd|id<tititd|id<tititd|id<tititd|id <tititd!|id"<tititd#|id$<tititd%|id&<tititd'|id(<tititd)|id*<tititd+|id,<tititd-|id.<tititd/|id0<tititd1|id2<tititd3|id4<titi td5|id6<titi!td7|id8<titi"td9|id:<titi#td;|id<<titi$td=|id><titi%td?|id@<titi&tdA|idB<titi'tdC|idD<titi(tdE|idF<titi)tdG|idH<titi*tdIt+|idJ<titi,tdKt+|idL<titi-tdM|idN<titi.tdO|idP<titi/tdQ|idR<titi0tdS|idT<titi1tdU|idV<titi2tdW|idX<titi3tdY|idZ<tit4i5td[|id\<tit4i6td]|id^<tit4i7td_|id`<tit4i8tda|idb<tit
i9tdc|idd<tit
i:tde|idf<tit
i;tdg|idh<tit
i<tdi|idj<titi=tdk|idl<tit
i>tdm|idn<titi?tdo|idp<titi@tdq|idr<titiAtds|idt<titiBtdu|idv<titiCtdw|idx<titiDtdy|idz<titiEtd{|id|<titiFtd}|id~<titiGtd|id<titHiItd|id<titHiJtd|id<titHiKtd|id<titHiLtd|id<titHiMtd|id<titHiNtd|id<titOiPtd|id<titiQtd|id<dS(slDefines InputEventHandler fields for this script that can be
        called by the key and braille bindings.s'Routes the pointer to the current item.troutePointerToItemHandlers0Performs left click on current flat review item.tleftClickReviewItemHandlers1Performs right click on current flat review item.trightClickReviewItemHandlersSpeaks entire document.t
sayAllHandlers(Performs the basic where am I operation.twhereAmIBasicHandlers+Performs the detailed where am I operation.twhereAmIDetailedHandlersSpeaks the title bar.tgetTitleHandlersSpeaks the status bar.tgetStatusBarHandlersOpens the Orca Find dialog.tfindHandlers+Searches for the next instance of a string.tfindNextHandlers/Searches for the previous instance of a string.tfindPreviousHandlers9Paints and prints the visible zones in the active window.tshowZonesHandlers"Enters and exits flat review mode.ttoggleFlatReviewModeHandlers8Moves flat review to the beginning of the previous line.treviewPreviousLineHandlers'Moves flat review to the home position.treviewHomeHandlers$Speaks the current flat review line.treviewCurrentLineHandlers$Spells the current flat review line.treviewSpellCurrentLineHandlers1Phonetically spells the current flat review line.t reviewPhoneticCurrentLineHandlers4Moves flat review to the beginning of the next line.treviewNextLineHandlers&Moves flat review to the end position.treviewEndHandlers/Moves flat review to the previous item or word.treviewPreviousItemHandlers5Moves flat review to the word above the current word.treviewAboveHandlers,Speaks the current flat review item or word.treviewCurrentItemHandlers,Spells the current flat review item or word.treviewSpellCurrentItemHandlers9Phonetically spells the current flat review item or word.t reviewPhoneticCurrentItemHandlers&Speaks the current flat review object.treviewCurrentAccessibleHandlers+Moves flat review to the next item or word.treviewNextItemHandlers5Moves flat review to the word below the current word.treviewBelowHandlers,Moves flat review to the previous character.treviewPreviousCharacterHandlers)Moves flat review to the end of the line.treviewEndOfLineHandlers)Speaks the current flat review character.treviewCurrentCharacterHandlers6Phonetically speaks the current flat review character.t"reviewSpellCurrentCharacterHandlers(Moves flat review to the next character.treviewNextCharacterHandlersEToggles whether to read just the current table cell or the whole row.ttoggleTableCellReadModeHandlers@Reads the attributes associated with the current text character.treadCharAttributesHandlers&Reports information on current script.treportScriptInfoHandlers%Pans the braille display to the left.tpanBrailleLeftHandlers&Pans the braille display to the right.tpanBrailleRightHandlers%Moves flat review to the bottom left.treviewBottomLeftHandlers&Returns to object with keyboard focus.tgoBrailleHomeHandlers$Turns contracted braille on and off.tcontractedBrailleHandlersProcesses a cursor routing key.tprocessRoutingKeyHandlers(Marks the beginning of a text selection.tprocessBrailleCutBeginHandlers"Marks the end of a text selection.tprocessBrailleCutLineHandlers4Enters learn mode.  Press escape to exit learn mode.tenterLearnModeHandlersDecreases the speech rate.tdecreaseSpeechRateHandlersIncreases the speech rate.tincreaseSpeechRateHandlersDecreases the speech pitch.tdecreaseSpeechPitchHandlersIncreases the speech pitch.tincreaseSpeechPitchHandlers
Quits OrcatshutdownHandlers.Displays the preferences configuration dialog.tpreferencesSettingsHandlers:Displays the application preferences configuration dialog.tappPreferencesSettingsHandlers Toggles the silencing of speech.ttoggleSilenceSpeechHandlersVPrints a debug listing of all known applications to the console where Orca is running.tlistAppsHandlers#Cycles the debug level at run time.tcycleDebugLevelHandlersEPrints debug information about the ancestry of the object with focus.tprintAncestryHandlers:Prints debug information about the application with focus.tprintHierarchyHandlers Prints memory usage information.tprintMemoryUsageHandlers5Bookmark where am I with respect to current position.tbookmarkCurrentWhereAmIsGo to bookmark.tgoToBookmarks
Add bookmark.taddBookmarksSave bookmarks.t
saveBookmarkssGo to next bookmark location.tgoToNextBookmarks!Go to previous bookmark location.tgoToPrevBookmarksToggles color enhancements.ttoggleColorEnhancementsHandlersToggles mouse enhancements.ttoggleMouseEnhancementsHandlers"Increases the magnification level.tincreaseMagnificationHandlers"Decreases the magnification level.tdecreaseMagnificationHandlersToggles the magnifier.ttoggleMagnifierHandlers&Cycles to the next magnifier position.tcycleZoomerTypeHandlersToggle mouse review mode.ttoggleMouseReviewHandlers6Passes the next command on to the current application.tbypassNextCommandHandlerN(Rtinput_eventtInputEventHandlerRtroutePointerToItemRtinputEventHandlerstleftClickReviewItemtrightClickReviewItemtsayAllt
whereAmIBasictwhereAmIDetailedtpresentTitletpresentStatusBartorcatshowFindGUItfindNexttfindPrevioust	showZonesttoggleFlatReviewModetreviewPreviousLinet
reviewHometreviewCurrentLinetreviewSpellCurrentLinetreviewPhoneticCurrentLinetreviewNextLinet	reviewEndtreviewPreviousItemtreviewAbovetreviewCurrentItemtreviewSpellCurrentItemtreviewPhoneticCurrentItemtreviewCurrentAccessibletreviewNextItemtreviewBelowtreviewPreviousCharactertreviewEndOfLinetreviewCurrentCharactertreviewSpellCurrentCharactertreviewNextCharacterttoggleTableCellReadModetreadCharAttributestreportScriptInfotpanBrailleLeftRtpanBrailleRighttreviewBottomLeftt
goBrailleHometsetContractedBrailletprocessRoutingKeytprocessBrailleCutBegintprocessBrailleCutLinetenterLearnModetspeechtdecreaseSpeechRatetincreaseSpeechRatetdecreaseSpeechPitchtincreaseSpeechPitchtquitOrcatshowPreferencesGUItshowAppPreferencesGUIttoggleSilenceSpeechtprintAppsHandlertcycleDebugLevelRZR[R\R]R^R_R`RaRbtmagttoggleColorEnhancementsttoggleMouseEnhancementstincreaseMagnificationtdecreaseMagnificationttoggleMagnifiertcycleZoomerTypetmouse_reviewttoggletbypassNextCommand(R!((s0/usr/lib/python2.6/site-packages/orca/default.pytsetupInputEventHandlerss	





	
		cCs6x/|iiD]\}}||jo|SqWdS(saReturns the name of the key that contains an inputEventHadler
        passed as argument
        N(Rnt	iteritemsR(R!tinputEventHandlertkeyNamethandler((s0/usr/lib/python2.6/site-packages/orca/default.pytgetInputEventHandlerKeys

	cCsNtii|}|i|d<|i|d<|i|d<|i|d<|i|d<|i|d<|i	|d<|i
|d<|i|d	<|i|d
<|i|d<|i|d<|i|d
<|i|d<|i|d<|i|d<|i|d<|i
|d<|i|d<|i|d<|i|d<|i|d<|i|d<|i|d<|S(s<Sets up the AT-SPI event listeners for this script.
        sfocus:smouse:buttons&object:property-change:accessible-namesobject:text-caret-movedsobject:text-changed:deletesobject:text-changed:inserts object:active-descendant-changedsobject:link-selectedsobject:state-changed:activesobject:state-changed:focusedsobject:state-changed:showingsobject:state-changed:checkedsobject:state-changed:presseds"object:state-changed:indeterminatesobject:state-changed:expandedsobject:state-changed:selectedsobject:text-attributes-changedsobject:text-selection-changedsobject:selection-changeds'object:property-change:accessible-valuesobject:value-changedswindow:activateswindow:deactivates
window:create(RRtgetListenerstonFocust
onMouseButtont
onNameChangedtonCaretMovedt
onTextDeletedtonTextInsertedtonActiveDescendantChangedtonLinkSelectedtonStateChangedtonTextAttributesChangedtonTextSelectionChangedtonSelectionChangedtonValueChangedtonWindowActivatedtonWindowDeactivatedtnoOp(R!t	listeners((s0/usr/lib/python2.6/site-packages/orca/default.pyRs4























cCs<	ti}|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id	|itid
titi|idd|itid
titi|id
d|itid
titi|idd|itid
titi|idd|itidtiti|id|itidtiti|id|itidtiti	|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|idd|itidtiti|idd|itidtiti|idd|itidtiti|idd|itidtiti|idd|itidtiti|idd|itidtiti|id |itid!titi|id |itidtiti|id"|itid!titi|id"|itid#titi|id$|itid%titi|id$|itid#titi|id&|itid%titi|id&|itid'titi|id(d|itid'titi|id)d|itid'titi|id*d|itid+titi|id(d|itid+titi|id)d|itid+titi|id*d|itid'titi|id,|itid+titi|id,|itid-titi|id.|itid/titi|id.|itid-titi|id0|itid/titi|id0|itid1titi|id2|itid3titi|id2|itid1titi|id4|itid3titi|id4|itid5titi|id6d|itid5titi|id7d|itid8titi|id6d|itid8titi|id7d|itid9titi|id:|itid;titi|id:|S(<sReturns an instance of keybindings.KeyBindings that use the
        numeric keypad for focus tracking and flat review.
        t	KP_DivideR#R$tKP_MultiplyR%tKP_SubtractR/tKP_AddR&tKP_EnterR'iR(iR)R*t	KP_DeleteR+R,R-tKP_7R0tKP_HomeR1tKP_8R2R3R4itKP_UptKP_9R5t
KP_Page_UpR6tKP_4R7tKP_LeftR8tKP_5R9R:R;tKP_BeginR<tKP_6R=tKP_RightR>tKP_1R?tKP_EndR@tKP_2RARBtKP_DowntKP_3RCtKP_Page_Down(
tkeybindingstKeyBindingstaddt
KeyBindingtsettingstdefaultModifierMasktORCA_MODIFIER_MASKRntNO_MODIFIER_MASKtORCA_SHIFT_MODIFIER_MASK(R!tkeyBindings((s0/usr/lib/python2.6/site-packages/orca/default.pyt__getDesktopBindings5s







































cCsti}|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itid	titi|id
|itidtiti|idd
|itidtiti|idd|itidtiti|idd
|itidtiti|idd|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|idd
|itidtiti|idd|itidtiti|idd|itid titi|id!|itid titi|id"|itid#titi|id$|itid#titi|id%|itid&titi|id'd
|itid&titi|id(d|itid&titi|id)d|itid&titi|id*|itid+titi|id,|itid+titi|id-|itid.titi|id/|itid.titi|id0|itid1titi|id2d
|itid1titi|id3d|itid4titi|id5|S(6sReturns an instance of keybindings.KeyBindings that use the
        the main keyboard keys for focus tracking and flat review.
        t9R#t7R$t8R%tpR/t	semicolonR&tReturnR'iR(itslashR)R*tbracketleftR+tbracketrightR,R-tuR0R1tiR2R3R4itoR5R6tjR7R8tkR9R:R;R<tlR=R>tmR?R@tcommaRARBtperiodRC(	RRRRRRRRntORCA_CTRL_MODIFIER_MASK(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyt__getLaptopBindingss























cCstii|}titijo+xO|iiD]}|i|q5Wn(x$|i	iD]}|i|q`W|it
idtiti
|id|it
idtiti
|id|it
idtiti
|id|it
idtiti
|id|it
idtiti
|id	|it
id
titi
|id|it
idtiti
|id
|it
idtiti|id|it
idtiti
|id|it
idtiti|id|it
idtiti|id|it
idtiti|id|it
idtiti|id|it
idtiti|id|it
idtiti|id|it
idtiti
|idxtddD]}|it
it|titi|id|it
it|titi
|id |it
it|titi|id!qGW|it
id"titi
|id#|it
id$titi|id%tio0|it
id$titi|id&n|it
id$titi|id'|it
id$titi|id(|it
id$titi|id)|it
id$titi|id*|it
id$titi|id+|it
id$titi|id,|it
id$titi|id-|it
id$titi|id.|it
id$titi|id/|it
id$titi|id0|it
id$titi|id1|it
id$titi|id2|it
id$titi|id3yti||}Wn*titid4titinX|S(5skDefines the key bindings for this script.

        Returns an instance of keybindings.KeyBindings.
        tNum_LockR.tF11RDtSunF36tfREthROtqRTtspaceRURVtsRWtEndRXtHomeRFtPage_UpRZt	Page_DownR[tbR`RbRaiiR_R^R]t	BackSpaceRjtRYR\RPRQRRRSRcRdReRfRgRhRGRHRis(WARNING: problem overriding keybindings:(RRtgetKeyBindingsRtkeyboardLayouttGENERAL_KEYBOARD_LAYOUT_DESKTOPt_Script__getDesktopBindingsRRt_Script__getLaptopBindingsRRRRRnRtORCA_CTRL_ALT_MODIFIER_MASKtORCA_ALT_MODIFIER_MASKRtxrangetstrtSHIFT_ALT_MODIFIER_MASKRtdebugMemoryUsagetoverrideKeyBindingstdebugtprintlnt
LEVEL_WARNINGtprintException(R!RRtkey((s0/usr/lib/python2.6/site-packages/orca/default.pyRs			
cCs[tii|}y|id|tii<|id|tii<|id|tii<|id|tii	<|id|tii
<|id|tii<|id|tii<|id|tii
<|id	|tii<|id
|tii<|id|tii<|id|tii<Wn*titid
titinX|S(sDefines the braille bindings for this script.

        Returns a dictionary where the keys are BrlTTY commands and the
        values are InputEventHandler instances.
        RGRHR8R>R/R1RIRJRKRLRMRNs&WARNING: braille bindings unavailable:(RRtgetBrailleBindingsRntbrailletbrlapitKEY_CMD_FWINLTtKEY_CMD_FWINRTtKEY_CMD_LNUPtKEY_CMD_LNDNtKEY_CMD_FREEZEtKEY_CMD_TOP_LEFTtKEY_CMD_BOT_LEFTtKEY_CMD_HOMEtKEY_CMD_SIXDOTSt
KEY_CMD_ROUTEtKEY_CMD_CUTBEGINtKEY_CMD_CUTLINERRtLEVEL_CONFIGURATIONR(R!tbrailleBindings((s0/usr/lib/python2.6/site-packages/orca/default.pyR s&cCstii||S(s%Processes the given keyboard event. It uses the super
        class equivalent to do most of the work. The only thing done here
        is to detect when the user is trying to get out of learn mode.

        Arguments:
        - keyboardEvent: an instance of input_event.KeyboardEvent
        (RRtprocessKeyboardEvent(R!t
keyboardEvent((s0/usr/lib/python2.6/site-packages/orca/default.pyR1s	cCs|ii}|tiijodS|tiijo|i|inA|tiijo-t	i
d|idt|i|in|i
o|id|i|indS(NtnotifyPresentationManageri(tobjt	queryTexttspeechservert
SayAllContexttPROGRESStINTERRUPTEDtsetCaretOffsett
currentOffsett	COMPLETEDRvtsetLocusOfFocusRRtgetNSelectionstsetSelection(R!tcontexttprogressTypettext((s0/usr/lib/python2.6/site-packages/orca/default.pyt__sayAllProgressCallback
s
cCss|i}|dj}||_|o|i}g}|ixgto_|itii\}}}}	}
|i	||i
tiitii}|pPqGqGWti
|n|itioytiiWnftj
oH|iiti}|i|iititti
|qotj
oqoXti|iti|intS(Ni(t
getClickCountRtgetFlatReviewContexttgoBegintTruet
getCurrenttflat_reviewtContexttZONEtappendtgoNextt	WRAP_LINERtspeakt
isTextAreat
orca_statetlocusOfFocusR5tNotImplementedErrortspeechGeneratortgenerateSpeechtextendttutorialGeneratortgetTutorialRtAttributeErrorRqt	textLinest_Script__sayAllProgressCallback(R!t
inputEventt
clickCounttdoubleClickR@t
utterancest
wordStringtxtytwidththeighttmoved((s0/usr/lib/python2.6/site-packages/orca/default.pyRq*s<	
$

	cCs)|o"|itititifjS(s{Returns True if obj is a GUI component that is for entering text.

        Arguments:
        - obj: an accessible
        (tgetRoletpyatspit	ROLE_TEXTtROLE_PARAGRAPHt
ROLE_TERMINAL(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pyRPVscCsl|i}|i|o$|itio|iti}titid|ti	|f|S(s;Returns True if obj is a text entry area that is read only.s'default.py:isReadOnlyTextArea=%s for %s(
tgetStateRPtcontainsRgtSTATE_FOCUSABLEtSTATE_EDITABLERRt	LEVEL_ALLtgetAccessibleDetails(R!R4tstatetreadOnly((s0/usr/lib/python2.6/site-packages/orca/default.pytisReadOnlyTextAreaascCs|ii||S(sReturns the substring of the given object's text specialization.

        Arguments:
        - obj: an accessible supporting the accessible text specialization
        - startOffset: the starting character position
        - endOffset: the ending character position
        (R5tgetText(R!R4tstartOffsett	endOffset((s0/usr/lib/python2.6/site-packages/orca/default.pyRtlscCs|i|||}t|oj|djo]|idio|iti}n|iti}|i|}t	i
||n|i|dS(s^Speaks the text of an Accessible object between the start and
        end offsets, unless the phrase is empty in which case it's ignored.

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
               interface
        - startOffset: the start text offset.
        - endOffset: the end text offset.
        s
sUTF-8N(RttlentdecodetisuppertvoicesRtUPPERCASE_VOICEt
DEFAULT_VOICEtadjustForRepeatsRROtsayCharacter(R!R4RuRvtphrasetvoice((s0/usr/lib/python2.6/site-packages/orca/default.pyt	sayPhrasevscCs|i|\}}}titid|t||ftitid|tift|o|djo|idio|i	ti
}n|i	ti}tio|i
||n|i|||}|i|}ti||n|i|dS(sSpeaks the line of an AccessibleText object that contains the
        caret, unless the line is empty in which case it's ignored.

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
               interface
        s&sayLine: line=<%s>, len=%d, start=%d, scaret=%d, speakBlankLines=%ss
sUTF-8N(tgetTextLineAtCaretRRtLEVEL_FINESTRwRtspeakBlankLinesRxRyRzR{R|tenableSpeechIndentationtspeakTextIndentationtadjustForLinksR}RROR~(R!R4tlinetcaretOffsetRuR((s0/usr/lib/python2.6/site-packages/orca/default.pytsayLines"
cCs|i}|i}tii}ti}|i|ti\}}}|djoit	|djoV|t	|d}	|	djo1||jo$|i
ti}
t
id|
qn|djoit	|djoV|t	|d}	|	djo1||jo$|i
ti}
t
id|
q4n|i||djo|i
ti}
n;|idio|i
ti}
n|i
ti}
|i|||i|}|t_t
i||
dS(sSpeaks the word at the caret.  [[[TODO: WDW - what if there is no
        word at the caret?]]]

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
               interface
        tRightiis
tLeftsUTF-8N(R5RRQtlastNonModifierKeyEventtevent_stringtlastWordtgetTextAtOffsetRgtTEXT_BOUNDARY_WORD_STARTRwRzRR|RtspeakCharactertgetLinkIndextHYPERLINK_VOICERxRyR{tspeakMisspelledIndicatorR}RO(R!R4RBtoffsettlastKeyRtwordRuRvtlastCharR((s0/usr/lib/python2.6/site-packages/orca/default.pytsayWords2				  	cCsY|idd}|id}d}d}d}d}xtox=|t|jo)||djo|d7}|d7}qFW|o"|tdd||d7}nx=|t|jo)||d	jo|d7}|d7}qW|o"|td
d||d7}n|p|pPnd}}q<Wt|oti|ndS(
sSpeaks a summary of the number of spaces and/or tabs at the
        beginning of the given line.

        Arguments:
        - obj: the text object.
        - line: the string to check for spaces and tabs.
        s t sUTF-8iRis%d spaces	%d spacess	s%d tabs%d tabsN(treplaceRxRGRwRRRO(R!R4Rt
spaceCountttabCountt	utteranceR((s0/usr/lib/python2.6/site-packages/orca/default.pyRs:
$
	$
	
c
Csy|i}Wntj
odSX|id}|id}|djp
|djodS|i|ti\}}}|i|ti\}}}|i||pdS|id}	|	}
xt|
djof|i|
ti\}}}|i|
dti\}}}|i||oPq|
d8}
qW|
|	jodS|i||
d|	d}|i||
ddjo|i	t
i}n;|idi
o|i	t
i}n|i	t
i}|i|}ti||dS(sSpeaks the sentence prior to the caret, as long as there is
        a sentence prior to the caret and there is no intervening sentence
        delimiter between the caret and the end of the sentence.

        The entry condition for this method is that the character
        prior to the current caret position is a sentence delimiter,
        and it's what caused this method to be called in the first
        place.

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
        interface.
        NiiisUTF-8(R5RSRRRgtTEXT_BOUNDARY_CHARtisSentenceDelimiterRtRRzRRRxRyR{R|R}RRO(
R!R4RBRtpreviousOffsettcurrentCharRuRvtpreviousChartsentenceEndOffsettsentenceStartOffsettsentenceR((s0/usr/lib/python2.6/site-packages/orca/default.pytechoPreviousSentence	sD



	


cCsy|i}Wntj
odSX|p|id}n|djodS|i|ti\}}}|i|pdS|d}|}xO|djoA|i|ti\}}}|i|oPq|d8}qW||jodS|i||d|d}	|i||ddjo|i	t
i}
n;|	idi
o|i	t
i}
n|i	t
i}
|i|	}	ti|	|
dS(svSpeaks the word prior to the caret, as long as there is
        a word prior to the caret and there is no intervening word
        delimiter between the caret and the end of the word.

        The entry condition for this method is that the character
        prior to the current caret position is a word delimiter,
        and it's what caused this method to be called in the first
        place.

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
               interface.
        - offset: if not None, the offset within the text to use as the
                  end of the word.
        NiisUTF-8(R5RSRRRgRtisWordDelimiterRtRRzRRRxRyR{R|R}RRO(R!R4RRBtcharRuRvt
wordEndOffsettwordStartOffsetRR((s0/usr/lib/python2.6/site-packages/orca/default.pytechoPreviousWordc	sB



c	Cs|i}|i}ytii}tii}Wnd}d}nX|ti@o|djo|d8}n|i|t	i
\}}}|p
d}n|i||djo|iti
}	n;|idio|iti}	n|iti}	titid||ftitid	||tif|djok|itd|t	i}
|
dp|
ddjo,tiotitd
|	tndSn|i||ti||	dS(
sSpeak the character at the caret.

        Arguments:
        - obj: an Accessible object that implements the AccessibleText
               interface
        iRRtDownis
sUTF-8s)sayCharacter: char=<%s>, startOffset=%d, s0caretOffset=%d, endOffset=%d, speakBlankLines=%stblankN(sRightR(R5RRQtlastInputEventt	modifiersRRtSHIFT_MODIFIER_MASKRRgRRRzRRxRyR{R|RRRRtmaxtTEXT_BOUNDARY_LINE_STARTRRORRRR(R!R4RBRtmodsteventStringt	characterRuRvRR((s0/usr/lib/python2.6/site-packages/orca/default.pyR~	sD	




	cCstS(sReturns true if the window is a functioning as a dialog.
        This method should be subclassed by application scripts as needed.
        (R(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pytisFunctionalDialog	scCsd}|i}|i|}|o|itijo|itijop|i|o_x\|D]P}|itijp&|itijp|i|o|d7}qlqlWn|S(scIf the current application has one or more alert or dialog
        windows and the currently focused window is not an alert or a dialog,
        return a count of the number of alert and dialog windows, otherwise
        return a count of zero.

        Arguments:
        - obj: the Accessible object

        Returns the alert and dialog count.
        ii(tgetApplicationtgetTopLevelRfRgt
ROLE_ALERTtROLE_DIALOGR(R!R4talertAndDialogCountR"twindowtchild((s0/usr/lib/python2.6/site-packages/orca/default.pytgetUnfocusedAlertAndDialogCount	scCsd}|io|i}}n |ii|t}|d}titid||oti|n|ot	i
|ndS(sH
        Speaks the tooltip for the current object of interest.
        RispresentToolTip: text='%s'N(tdescriptiontwhereAmItgetWhereAmIRGRRRRROR!tdisplayMessage(R!R4RBtspeechResultt
brailleResult((s0/usr/lib/python2.6/site-packages/orca/default.pytpresentToolTip
s	

cCs)ti}|i||ii||S(snPeforms the whereAmI operation.

        Arguments:
        - inputEvent:     The original inputEvent
        (RQRRt
updateBrailleR(R!R\t	basicOnlyR4((s0/usr/lib/python2.6/site-packages/orca/default.pyt
doWhereAmI-
s	
cCs|i|tdS(sGSpeaks basic information about the current object of interest.
        N(RRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRr9
scCs|i|tdS(sYSpeaks detailed/custom information about the current object of
        interest.
        N(RR(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs?
scCs3ti}|i|ti|ii|dS(s@Speaks and brailles the title of the window with focus.
        N(RQRRRRRORTt
generateTitle(R!R\R4((s0/usr/lib/python2.6/site-packages/orca/default.pyRtF
s	
cCsti}|i||i|\}}|oti|ii|n|p|}|oti|ii|ndS(ssSpeaks and brailles the contents of the status bar and/or default
        button of the window with focus.
        N(	RQRRRtfindFrameAndDialogRRORTtgenerateStatusBartgenerateDefaultButton(R!R\R4tframetdialogR((s0/usr/lib/python2.6/site-packages/orca/default.pyRuN
s	

cCstititig}|iitip|i|jodSd}x}t	|i
dddD]b}||itijo||}n)|||jo|i||}n|oPqiqiW|S(sAReturns the status bar in the window which contains obj.
        Nii(
Rgt	ROLE_TREEtROLE_TREE_TABLEt
ROLE_TABLERkRltSTATE_MANAGES_DESCENDANTSRfRtranget
childCounttROLE_STATUS_BARt
findStatusBar(R!R4t	skipRolest	statusBarR((s0/usr/lib/python2.6/site-packages/orca/default.pyRc
s 	cCstititig}|iitip|i|jodSd}xt	|i
dddD]}||itijo+||iitio||}n/||i|jo|i
||}n|oPqiqiW|S(s3Returns the default button in dialog, obj.
        Nii(RgRRRRkRlRRfRRRtROLE_PUSH_BUTTONtSTATE_IS_DEFAULTtfindDefaultButton(R!R4Rt
defaultButtonR((s0/usr/lib/python2.6/site-packages/orca/default.pyR
s"	cCsddg}|i}xv|on|i|jo^|itijo||d<n|ititigjo||d<n|i}qW|S(sSReturns the frame and (possibly) the dialog containing
        the object.
        iiN(RtparentRfRgt
ROLE_FRAMERtROLE_FILE_CHOOSER(R!R4tresultsR((s0/usr/lib/python2.6/site-packages/orca/default.pyR
s	c	
Cstitid|p|odS||jo|S|g}yL|i}x2|o*|i|jo|i||i}qRW|iWntitinX|g}yL|i}x2|o*|i|jo|i||i}qW|iWntitinXd}tt	|t	|}d}xF||jo8|i
||||o||}|d7}qBPqBWtitid|S(sFinds the common ancestor between Accessible a and Accessible b.

        Arguments:
        - a: Accessible
        - b: Accessible
        sdefault.findCommonAncestor...iis...default.findCommonAncestorN(RRRRRRLtreverseRtminRwtisSameObject(	R!taRtaParentsRtbParentstcommonAncestort	maxSearchR((s0/usr/lib/python2.6/site-packages/orca/default.pytfindCommonAncestor
sL
		
		


c	Cstiot}titijo
t}nhtitijo%|i|i||i	}n0t
io%|i|it
ii}n|obt
i
}d}|dg}x|iiD]n\}}	|	|djo||	g}ny|iiti}
Wn
t}
nX|
o|d7}qqW|t|ijoh|_h|_n||ijod|i|<n||ijod|i|<n|i|}|i|}|i}	t|	i|	i|	id}
||tijp
|
djo||
jog}t|idjoqd}xh|iiD]S}||jo6||djo%td|d}|i|qP|d7}qPWn|i |i!i"|dtt#i$|||i|<|
|i|<qqqndS(	sDetermine whether this progress bar event should be spoken or not.
        It should be spoken if:
        1/ settings.enableProgressBarUpdates is True.
        2/ settings.progressBarVerbosity matches the current location of the
           progress bar.
        3/ The time of this event exceeds the
           settings.progressBarUpdateInterval value.  This value
           indicates the time (in seconds) between potential spoken
           progress bar updates.
        4/ The new value of the progress bar (converted to an integer),
           is different from the last one or equals 100 (i.e complete).

        Arguments:
        - event: if not None, the Event that caused this to happen
        - obj:  the Accessible progress bar object.
        iiggY@idsProgress bar %d.talreadyFocusedN(%RtenableProgressBarUpdatesRtprogressBarVerbositytPROGRESS_BAR_ALLRGtPROGRESS_BAR_WINDOWRRtfindActiveWindowRQRRRttimeRtitemsRkRlRgt
STATE_DEFUNCTRwRRt
queryValuetinttcurrentValuetmaximumValuetminimumValuetprogressBarUpdateIntervaltkeysRRLRVRTRURRO(R!teventR4tmakeAnnouncmenttmakeAnnouncementtcurrentTimetdefunctBarstmostRecentUpdateRtvaluet	isDefunctRRtpercentValueR_tindextlabel((s0/usr/lib/python2.6/site-packages/orca/default.pythandleProgressBarUpdate
sn


	
	


	





cCs|o|iitiodSy|iodSWnnX|oti||n|io|in|i	||odS|o
|i
}nd}|o
|i
}nd}|dj	oe||joX|iti
tigjo9x?|iiD]!}|djo|i|=q
q
Wn
h|_|o|i|titi
tititig}|i||o#|iidjo
tt_n
tt_|o4|iido!|ioti|idj}|iti jo|i!t"i#}	n|i!t"i$}	|i%i&|d|}
t'i(|
|	||itijoey|i)}WnqX|i*|}|i+|}
|
|id<|i,|}||id<qntit_-dS(	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
        NtlastRowt
lastColumnRvsfocus:g?tpriorObj(RR	(.RkRlRgRtfindCommandRunRtmagnifyAccessibleRR{RRRRfRRtpointOfReferenceRRtROLE_TABLE_CELLtROLE_SCROLL_PANEt
ROLE_PANELtisDesiredFocusedItemRtnameRRQtusePronunciationDictionaryRGttypet
startswithRRt	ROLE_LINKRzRRR|RTRURROt
queryTabletgetCellIndextgetColumnAtIndext
getRowAtIndextnoFocusTimeStamp(R!RtoldLocusOfFocustnewLocusOfFocust	oldParentt	newParentRt	rolesListtshouldNotInterruptRR_ttableRtcolumntrow((s0/usr/lib/python2.6/site-packages/orca/default.pytlocusOfFocusChangedJsx	
	




	

	
		
cCs|itijo|i||n|io/|i||iio|indSto|iti	jo|i
djo|i|ot}|i
}xq|oi|ob||i
joR|itijo<titidd|iiti}|i
}qW|oHg}|i|}x|D]}|i|iqFWti|dSn|i}x|D]}	|	itijov|	id}
|
tijoS|i |
|i!i"|
dt}|i#|i$i%|
tti|dSqqW|iti&jo|iitiox|D]}	|	iti'jov|	id}
|
tijoS|i |
|i!i"|
dt}|i#|i$i%|
tti|dSqUqUWn|i|tipdS|iti(jo)ti)oti)i*djoqIdSn|o0titi+d	|i|i|i,fn'titi+d
|i|ift-i.|||i ||i!i"|dt}|i#|i$i%|tti|dS(sGCalled 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.

        Arguments:
        - event: if not None, the Event that caused this to happen
        - obj: the Accessible whose visual appearance changed.
        Nis"default.visualAppearanceChanged - schecking parentiRRRs%VISUAL CHANGE: '%s' '%s' (event='%s')s%VISUAL CHANGE: '%s' '%s' (event=None)(Rsspace(/RfRgtROLE_PROGRESS_BARRRRtgetCurrentAccessibletupdateBrailleReviewRRtdetail1t
isInActiveAppRGRtROLE_APPLICATIONRRRRkRlt
STATE_SHOWINGtfindUnrelatedLabelsRLRRROtgetRelationSettgetRelationTypetRELATION_CONTROLLED_BYt	getTargetRQRRRRTRURVRWRXt
ROLE_LABELtRELATION_LABEL_FORtROLE_RADIO_BUTTONRRt
LEVEL_FINERRR(R!RR4t
reallyShowingRR_tlabelsRt	relationstrelationttarget((s0/usr/lib/python2.6/site-packages/orca/default.pytvisualAppearanceChangeds
	
		

	


	

	

	
	
!
	cCs|pdStiti}ti|y|i}Wntj
o
d}nX|ii|}|i	|d|o|i
|n|oti|nti|dtit
dS(sUpdates the braille display to show the give object.

        Arguments:
        - obj: the Accessible
        - extra: extra Region to add to the end
        Nii(R!tcleartLinetaddLineR5RSRtbrailleGeneratortgenerateBraillet
addRegionst	addRegiontsetFocustrefreshRG(R!R4textraRegionRRBtresult((s0/usr/lib/python2.6/site-packages/orca/default.pyRas"

c	CsE|ii}|titititifjo0y"|iiidjodSWqdqdXn|i}|ti	ti
titifjo|ii
od|ijo!|id\}}||}q-y|ii}Wntj
o
d}nX|o#|idjo|id}q-q1nti||dS(s]Called whenever an object gets focus.

        Arguments:
        - event: the Event
        iNtactiveDescendantInfo(tsourceRfRgt	ROLE_MENUtROLE_MENU_ITEMtROLE_CHECK_MENU_ITEMtROLE_RADIO_MENU_ITEMtquerySelectiontnSelectedChildrentROLE_LAYERED_PANERRRRR
RSRtgetSelectedChildRvR=(R!RtroletnewFocusRRt	selection((s0/usr/lib/python2.6/site-packages/orca/default.pyRs4					
cCs|io1|iitijo|itijodS|iidd|ii	jodS|ii	|id<t
i||idS(shCalled whenever a property on an object changes.

        Arguments:
        - event: the Event
        NtoldName(RHRfRgRRQRRR
tgetRRRvR;(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRs#"c
Cs\|iid}|i|d|p!|tijo|ddjotSt}|}x|iD]}|i|jo|id}|i	}|ti
jo|d|i}}	nd|d}}	|idjoO|i
|\}
}}|p|}|	p|}|i|||t}qT|i|||	t}qhqhW|S(sCheck if the contiguous object has a selection. If it does, then
        speak it. If the user pressed Shift-Down, then look for an object
        with a RELATION_FLOWS_FROM relationship. If they pressed Shift-Up,
        then look for a RELATION_FLOWS_TO relationship.

        Arguments:
        - the current text object
        - the flows relationship (RELATION_FLOWS_FROM or RELATION_FLOWS_TO).

        Returns an indication of whether anything was spoken.
        tlastCursorPositionii(R
RURRgtRELATION_FLOWS_TORR.R/R1R5tRELATION_FLOWS_FROMtcharacterCountR>tgetSelectedTextRRG(
R!R4trelationshiptlastPost	selSpokentcurrentR9tobjTexttstarttendttextContentsRuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyt_speakContiguousSelections.
!



cCs|p|i}|i}|oti||nt}ti}x]|iD]R}t|ti	o9|i
|jo)|iotitt
}nPqSqSW|o|i|ntipdSttitio#tiip|i|ndSttitipdStii}tii}	|	ti@}
|	ti@}|iid}|dj}
|djp
|djo5|
o|o|
o|djoo|i|d|p|i |i!}}n|i"|\}}|i#||||i$|t%i&}q|i$|t%i'}|i|d|pd|i }}n|i"|\}}||jo|i#|||qq|i(|\}}|i|n|djp
|djo|
o|i|d|}|
oB|o:|o3|
o,|i"|\}}|i#|||q|
oL|oD|i)|\}}||jo|i*|q|i+|q|i,|\}}|i*|n|djo|
o:|o3|
o,|i"|\}}|i#|||q|
o&|i,|\}}|i*|q|i(|\}}|i|n6|d	jog|
o:|o3|
o,|i"|\}}|i#|||q|i(|\}}|i|n|d
jp
|djo|
o;|o4|
o,|i"|\}}|i#|||q|
o&|i(|\}}|i|q|i,|\}}|i*|n|i }|i }|i-||i |i.||dS(s`Updates braille, magnification, and outputs speech for the
        event.source or the otherObj.NRVtUpRiRRR
RR	R(/RHR5RRRGR!tgetShowingLinetregionst
isinstancetTextt
accessibletrepositionCursorRDRRRQRRktMouseButtonEventtpressedRt
KeyboardEventRRRRtCTRL_MODIFIER_MASKRR
RURRRRYtgetOffsetsForPhraseRRcRgRWRXtgetOffsetsForLinetgetOffsetsForWordR~RtgetOffsetsForChart_saveLastCursorPositiont_saveSpokenTextRange(R!RtotherObjR4RBtbrailleNeedsRepaintingRtregiont	keyStringRtisControlKeyt
isShiftKeyR\t
hasLastPosRuRvR]tinNewObj((s0/usr/lib/python2.6/site-packages/orca/default.pyt_presentTextAtNewCaretPosition2
s



	

	



		



		cCsW|itijo|iitijodS|io|in|i|dS(sXCalled whenever the caret moves.

        Arguments:
        - event: the Event
        N(RHRQRRRRR{R}(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyR
s
c
Cs|itijo|iitijodS|iitijodS|i|itipt	tit
iodStii
}tiiti@}|ii}|djo
|i}nQ|djp|djo2|o+|i}|i|ti\}}}ndS|i|i|idjo|iti}	n;|idio|iti}	n|iti}	t|iddjoti||	nti ||	t!dS(	sgCalled whenever text is deleted from an object.

        Arguments:
        - event: the Event
        NR
tDeletetDisUTF-8sutf-8i("RHRQRRRRfRgtROLE_SLIDERRRRgRkRmRRRRRnR5tany_dataRRRRRzRRxRyR{R|RwRRROR(
R!RRxtcontrolPressedRBRRRuRvR((s0/usr/lib/python2.6/site-packages/orca/default.pyR
s>
		



	cCstiotio|itiptiitijoXtiitijp0|i	tio+tii
itio|i
ti@S(sGiven a keyboard event containing an alphanumeric key,
        determine if the script is likely to echo it as a character.
        (RtenableEchoByCharacterRQRRRPRfRgt
ROLE_ENTRYRjRsRkRlRmRR(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pytwillEchoCharacterIs




cCsn|itijo|iitijodS|iitijodS|i|i|i}|iiti	jo-|i
|i\}}}ti|dSt
}ttitiotii}|iitijo|iii}tiiti@}	|djo
|djp
||joq|	p|o
t}q|iitijo$tiotiod}t}qn4ttitiotiidjo
t}n|pCti o9|o2|iitijot!|i"ddj}|oE|i"di#oti||i$ti%qcti|ny|ii}Wnt&j
odSXt'|i(|i)d}
|
d}|
djp
|djodS|i*|
ti+\}}}
|i*|ti+\}}}
ti,o'|i-||o|i.|in/ti/o$|i0|o|i1|indS(	shCalled whenever text is inserted into an object.

        Arguments:
        - event: the Event
        NRRt*t2sUTF-8ii(2RHRQRRRRfRgRRRtROLE_SPIN_BUTTONRRRORRgRRkRmRRRhR5R>RRtCOMMAND_MODIFIER_MASKRGtROLE_PASSWORD_TEXTt
enableKeyEchotenablePrintableKeysRktbuttonRRwRxRyRzR{RSRR)RRRtenableEchoBySentenceRRtenableEchoByWordRR(R!RRBt	spinValueRRut	speakThisRxtwasAutoCompletet
wasCommandRRRRvR((s0/usr/lib/python2.6/site-packages/orca/default.pyRasp	
	


	






cCstS(sWhether 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.
        (RG(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyt#stopSpeechOnActiveDescendantChangeds
cCs|iiitipdS|i}|o2|i|otint	i
||nt	i
||itio9ti|ijo&tii
tiig|id<ndS(sCalled when an object who manages its own descendants detects a
        change in one of its children.

        Arguments:
        - event: the Event
        NRG(RHRkRlRgt
STATE_FOCUSEDRRRtstopRvR=RQRRRtgetIndexInParentR
(R!RR((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	
	cCsti||idS(skCalled when a hyperlink is selected in a text area.

        Arguments:
        - event: the Event
        N(RvR=RH(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRscCs|iido&|iot|_|idSn|iidotiottit	i
owtiotii}nd}tii}|ti@}tii}t}|itio|i|itio|djoF|o
t}q9|ii}|iti}|o|i}n|djp
|djo6|iitijo|itio
t}qn|oK|io titdddtntitdd	dtdSqn|iid
o|t}	y.|i|i}
|
iiti }	Wnt!i"t!i#dnX|	p |io|i$|ndSn|iiti%jo|i}|iido|id
jo|i&|qXtio~ttit	i
ohtiidjoU|i'ti|i(i)ti}|i*|i+i,titti|qXndS|iit-joqt-|ii}
t}x3|
D]+}|o|ii.|ot}PqqW|ot/i0||iqndS(sbCalled whenever an object's state changes.

        Arguments:
        - event: the Event
        sobject:state-changed:activeNsobject:state-changed:selectedRRRdRBtselectedt
unselectedsobject:state-changed:focuseds3onStateChanged: could not get frame of focused itemsobject:state-changed:showingitF1(1RRRRtfindRQRRRgRRkRmRRRRRRnRkRlRgRRRHRGtSTATE_SELECTEDR)RfRRRORRtSTATE_ICONIFIEDRRRRt
ROLE_TOOL_TIPRRRTRURVRWRXtstate_change_notifierstendswithRvR;(R!RRxRRyRqt
announceStatet
eventStateRt	iconifiedRR4R_t	notifierstfound((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	
	
	
	





 

		
	
	
		cCsx|i}|iid}|d}|i}||jo
|djp
|djo|}|}|}n||gS(svReturn the start and end offset for the given phrase

        Arguments:
        - obj: the Accessible object
        RVii(R5R
RUR(R!R4RBR\RuRvttemp((s0/usr/lib/python2.6/site-packages/orca/default.pyRos
	

cCs"|i|\}}}||gS(stReturn the start and end offset for the given line

        Arguments:
        - obj: the Accessible object
        (R(R!R4RRvRu((s0/usr/lib/python2.6/site-packages/orca/default.pyRpscCs=|i}|i}|i|ti\}}}||gS(stReturn the start and end offset for the given word

        Arguments:
        - obj: the Accessible object
        (R5RRRgR(R!R4RBRRRuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyRqs
		cCsp|i}|i}tii}|ti@o'tiidjo|d}|}n|}|d}||gS(syReturn the start and end offset for the given character

        Arguments:
        - obj: the Accessible object
        Ri(	R5RRQRRRRRR(R!R4RBRRRuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyRrs	


cCstitijo|i|itioy|ii}WndSX|i|i	dt
i}|i|i	dt
i}|i|i|dp|i|i|dot
itdqndS(s6Called when an object's text attributes change. Right now this
        method is only to handle the presentation of spelling errors on
        the fly. Also note that right now, the Gecko toolkit is the only
        one to present this information to us.

        Arguments:
        - event: the Event
        Nit
misspelled(RtspeechVerbosityLeveltVERBOSITY_LEVEL_VERBOSERRHRQRRR5RRRgRtisWordMisspelledRROR(R!RRBtprevWordAndOffsetstnextWordAndOffsets((s0/usr/lib/python2.6/site-packages/orca/default.pyRs

cCs#|i}|iidp
ddg}|\}}|iitip|iid}|pdS||djodS|di|i}t|djodS|djoD||jo7y|di	}WnqX||i
jodSnd}	xd|diD]R}
|
i
titigjo-|i||
ido|
i
}	PqqWd}x|o|o~y&|i	i
}td|d}WnnX|pCx@|iD]-}
|
i
|	jo|
id}PqqWPqzqzWn|i|||dS(sgCalled when an object's text selection changes.

        Arguments:
        - event: the Event
        tspokenTextRangeiRVNi(RHR
RURkRlRgRRtabsR5RYRR.R/RXRWRR1RtspeakTextSelectionState(R!RR4tspokenRangeRuRvR\tdiffRBtrelationTypeR9((s0/usr/lib/python2.6/site-packages/orca/default.pyRsV			
	cCs.|p|iodS|iititifjo|i|_n|iiitiodS|iitijot	i
||in|itijo||iiiti
o`|i}|iio6|ii}|idjo|id}qnt	i||ndS(sbCalled when an object's selection changes.

        Arguments:
        - event: the Event
        Ni(RHRfRgtROLE_COMBO_BOXRIRRkRlRRvR;RQRRRRRMRNRPR=(R!RRRRS((s0/usr/lib/python2.6/site-packages/orca/default.pyRes"	
cCs|iitijodS|ii}d|ijo|i|idjodSti||i|ii	i
tio|i|id<ndS(sCalled whenever an object's value changes.  Currently, the
        value changes for non-focused objects are ignored.

        Arguments:
        - event: the Event
        NtoldValue(RHRfRgRRR
RRvR;RkRlR(R!RR((s0/usr/lib/python2.6/site-packages/orca/default.pyRscCs2ti|_ti||i|it_dS(sgCalled whenever a toplevel window is activated.

        Arguments:
        - event: the Event
        N(RRRvR=RHRQtactiveWindow(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRscCstiottii|iijoUtiti|io3|i	ddddd|_|itiq~n|itijot
i|ddt_ndS(siCalled whenever a toplevel window is deactivated.

        Arguments:
        - event: the Event
        iiN(RQRRRRHRRR!R<RtdrawOutlineRRRRvR=(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRs



	c	Cs|id}|djoti}y|i}WnqX|i|\}}}|o:g}|i||itddti|n|i	tindS(stCalled whenever the user presses or releases a mouse button.

        Arguments:
        - event: the Event
        itrRBRN(
RRQRRR5tgetAllSelectedTextRLRRROR(	R!RRqR4RBRbRuRvR_((s0/usr/lib/python2.6/site-packages/orca/default.pyRs

	
cCsdS(sTJust here to capture events.

        Arguments:
        - event: the Event
        N((R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRscCst}|o|i}nd}|oJ|itijo4|o-x|D]}|djot}PqNqNWnr|oj|itijoT|i|}|i	|}|o
t
|p|o
t
|p
t}qn|otiti
d|n|S(sTReturns True if the given object is a table and is for layout
        purposes only.slayout-guess:trues0Object deemed to be for layout purposes only: %sN(Rt
getAttributesRRfRgRRGRtgetDisplayedTexttgetDisplayedLabelRwRRR(R!R4t
layoutOnlyt
attributest	attributeRBR((s0/usr/lib/python2.6/site-packages/orca/default.pytisLayoutOnlys($

(cCsDtit_tiotd}n
td}ti|tS(sjToggles an indicator for whether we should just read the current
        table cell or read the whole row.s	Speak rows
Speak cell(RtreadTableCellRowRRRORG(R!R\R((s0/usr/lib/python2.6/site-packages/orca/default.pyR:s


cCs|ii||S(saConverts the given attribute name into the Atk equivalent. This
        is necessary because an application or toolkit (e.g. Gecko) might
        invent entirely new names for the same attributes.

        Arguments:
        - attribName: The name of the text attribute

        Returns the Atk equivalent name if found or attribName otherwise.
        (RRU(R!t
attribName((s0/usr/lib/python2.6/site-packages/orca/default.pytgetAtkNameForAttributePscCs6x/|iiD]\}}||jo|SqW|S(sConverts the given Atk attribute name into the application's
        equivalent. This is necessary because an application or toolkit
        (e.g. Gecko) might invent entirely new names for the same text
        attributes.

        Arguments:
        - attribName: The name of the text attribute

        Returns the application's equivalent name if found or attribName
        otherwise.
        (RR(R!RRR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetAppNameForAttribute]s


	c	Csg}h}|id}xk|D]c}|id}t|djo;|di}|di}|i||||<q"q"W||gS(sConverts a string of text attribute tokens of the form
        <key>:<value>; into a dictionary of keys and values.
        Text before the colon is the key and text afterwards is the
        value. If there is a final semi-colon, then it's ignored.

        Arguments:
        - tokenString: the string of tokens containing <key>:<value>; pairs.

        Returns a list containing two items:
        A list of the keys in the order they were extracted from the
        text attribute string and a dictionary of key/value items.
        t;t:iii(tsplitRwtstripRL(	R!ttokenStringtkeyListt
dictionaryt	allTokensttokentitemRR((s0/usr/lib/python2.6/site-packages/orca/default.pyttextAttrsToDictionaryps
cCsx|D]}ti|}||jod}||}ti|}|o|i|}|djo0|djpt|djotd}n|djostid}|t|d}	|	|jp|	|ijo.t	d	d
t|h|d6|d6}qn|djo\|i
d}
t|
djo6t	d	d
t|
dh|d6|
dd6}qn4|djo&|i
ddiid}n|p|d|}t
i|qqqWdS(sSpeak each of the text attributes given dictionary.

        Arguments:
        - attributes: a dictionary of text attributes to speak.
        Rtweighttboldisleft-marginsright-margint
decimal_pointis%(key)s %(value)s pixels%(key)s %(value)s pixelsRRtindenttsizetpxisfamily-namet,t"RN(sleft-marginsright-margin(sindentssize(ttext_attribute_namestgetTextAttributeNameRRRtlocalet
localeconvRwRRRtfloatRRRO(R!RRRtlocalizedKeyRRtlocalizedValuetnumericPointRR((s0/usr/lib/python2.6/site-packages/orca/default.pytoutputCharAttributessD


 





&c
Csytii}WnnX|i}|i}titid||i|\}}|}|i	|}|doS|i|d\}	}
|o)x,|
i
D]}|
|||<qWq|
}n|iti\}}
h}xk|D]c}||joP|i
|}|
i
|}||jpt|djo|||<qYqqW|i|||iti|djotitdntS(sSReads the attributes associated with the current text character.
        Calls outCharAttributes to speak a list of attributes. By default,
        a certain set of attributes will be spoken. If this is not desired,
        then individual application scripts should override this method to
        only speak the subset required.
        s/readCharAttributes: default text attributes: %sitlink(RQRRR5RtgetDefaultAttributesRRRRRRRtenabledSpokenTextAttributesRURwRRRRORRG(R!R\RBRt
defAttributestdefUsertdefDictt
allAttributestcharAttributestcharListtcharDictRtuserAttrListtuserAttrDictRttextAttrtuserAttr((s0/usr/lib/python2.6/site-packages/orca/default.pyRs@	


 cCs%t}t}|i}|i}|o
t}nt}|i}|id|i|}|idjpt|djo|}t}x|ot}x|iD]}	|	i	t
ijo{|	id}
|
i}|idjo
t}n?|id|i|}t|djo|
}t}nPqqWqW|}t}x|ot}x|iD]}	|	i	t
i
jo{|	id}|i}
|
idjo
t}n?|
id|i|
}t|djo|}t}nPqwqwWq]Wn||gS(sReturn an indication of whether this object has selected text.
        Note that it's possible that this object has no selection, but is part
        of a selected text area. Because of this, we need to check the
        objects on either side to see if they are none zero length and
        have text selections.

        Arguments:
        - obj: the text object to start checking for selected text.

        Returns: an indication of whether this object has selected text,
        or adjacent text objects have selected text.
        i(RR5R>RGRttgetTextEndOffsetRRwR.R/RgRXR1RW(R!R4tcurrentSelectedt
otherSelectedRBtnSelectionsRR^tmorePossibleSelectionsR9tprevObjtprevObjTexttnextObjtnextObjText((s0/usr/lib/python2.6/site-packages/orca/default.pythasTextSelectionssb
#
	

	

	

	
c	Csd|i}tii}tio|o|d|i7}y|d|i7}Wn|d7}nXy|d|i7}Wn|d7}nXtiti||GHt	i
|ti|nt
S(sOutput useful information on the current script via speech
        and braille.  This information will be helpful to script writers.
        sSCRIPT INFO: Script name='%s's Application name='%s's Toolkit name='%s's Toolkit unknowns
 Version='%s's Version unknown(RRQRRRttoolkitNametversionRRt	LEVEL_OFFRROR!RRG(R!R\t
infoStringR"((s0/usr/lib/python2.6/site-packages/orca/default.pyRXs(

cCs titdtt_tS(sCauses the next keyboard command to be ignored by Orca
        and passed along to the current application.

        Returns True to indicate the input event has been consumed.
        sBypass mode enabled.(RRORRGRQR(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRvs	cCsBtiotStitdtitdtt_tS(sTurns learn mode on.  The user must press the escape key to exit
        learn mode.

        Returns True to indicate the input event has been consumed.
        sdEntering learn mode.  Press any key to hear its function.  To exit learn mode, press the escape key.s"Learn mode.  Press escape to exit.(RtlearnModeEnabledRGRRORR!R(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
	
	cCs?y|i}WntititSX|itiSdS(sODetermines if we should look any further at the object
        for flat review.N(RkRRRRRlRgR,(R!R4Rq((s0/usr/lib/python2.6/site-packages/orca/default.pytpursueForFlatReviewscCs|pgS|iitip|idjogSy|i}Wntj
ogSXg}|id}y|i}Wntj
o
d}nX|oxt
d|iD]}|i|}|o|iid}|i}	|	iti
o|idjo~|idjon|idjo^|idjoN|i|i|i|i|i|i|i|i|io|i|qqqWnd}
|i}xF||i|ijo.|i}ti}
x||i|ijo|i||dd}|o|iid}|idjoW|idjoG|i|i}t|
|i}
|i|p|i|qq||
}n||
}||jo||
7}q|}qW|
tijo
|
}
n||
7}qW|S(sGiven a parent that manages its descendants, return a list of
        Accessible children that are actually showing.  This algorithm
        was inspired a little by the srw_elements_from_accessible logic
        in Gnopernicus, and makes the assumption that the children of
        an object that manages its descendants are arranged in a row
        and column format.

        Arguments:
        - parent: The accessible which manages its descendants

        Returns a list of Accessible descendants which are showing.
        i2iiiN(RkRlRgRRtqueryComponentRSt
getExtentsRRRtnColumnstgetColumnHeaderR,RaRbRcRdtvisibleRLtsystmaxinttgetAccessibleAtPointRtcount(R!Rt
icomponenttdescendantst
parentExtentsR"RtheadertextentststatesettgridSizetcurrentYtcurrentXt	minHeightRtnewX((s0/usr/lib/python2.6/site-packages/orca/default.pytgetShowingDescendantssp  
			 


c	Cst||||}	t||}
t||||}t||}t}
|
|	jo||jo
t}
ne|djo:|djo|
|	jo
||j}
q||j}
n|djo|
|	j}
n|
S(sCReturns true if any portion of region 'a' is in region 'b'
        i(RRRRG(R!taxtaytawidthtaheighttbxtbytbwidthtbheightt
highestBottomt	lowestToptleftMostRightEdgetrightMostLeftEdgeR((s0/usr/lib/python2.6/site-packages/orca/default.pyRs 






cCs<|ip+|i||_t|_ti|_n|iS(s;Returns the flat review context, creating one if necessary.(RtflatReviewContextClassRGRR!t
cursorCellR(R!((s0/usr/lib/python2.6/site-packages/orca/default.pyRE1s

	cCs|ioh|o.titijotitdq?n|iddddd|_|i	t
in|o.titijotitdqn|i}|i
tii\}}}}}|i|||||i||itS(s9Toggles between flat review mode and focus tracking mode.sLeaving flat review.iisEntering flat review.N(RRRtVERBOSITY_LEVEL_BRIEFRRORRRRRQRRRERHRIRJtWORDt_reviewCurrentItemRRG(R!R\R@R`RaRbRcRd((s0/usr/lib/python2.6/site-packages/orca/default.pyR{As"

	
$icCs|i}|i\}}|pg}d}nti}|i|ti|gti|t|oti	|i
|in|io ti
t|it|_nti
t|dS(s@Obtains the braille regions for the current flat review line
        and displays them on the braille display.  If the targetCursorCell
        is non-0, then an attempt will be made to postion the review cursor
        at that cell.  Otherwise, we will pan in display-sized increments
        to show the review cursor.N(REtgetCurrentBrailleRegionsRR!R=RAtsetLinesRCRtpanToOffsett
brailleOffsettcursorOffsetRRDRGR(R!RR@RftregionWithFocusR((s0/usr/lib/python2.6/site-packages/orca/default.pyR(ms 



c	Cs>|i}|i\}}x|D]}|it|iidtidjot|ti	pt|ti
ot|itid}||i}|itid|_|i
i|\}}|o/|ii|i
ii|i
i|i|n)|ii|i
ii|i
iddPq%q%WdS(sqSets the character of interest to be the first character showing
        at the beginning of the braille display.sUTF-8iN(RER$R'RwtstringRxR!tviewportRgt
ReviewTexttReviewComponentRRtzonetgetWordAtOffsetRt
setCurrentRR(	R!R@RfR)RwtpositionRRt
charOffset((s0/usr/lib/python2.6/site-packages/orca/default.pyt0_setFlatReviewContextToBeginningOfBrailleDisplays2
				cCs|iotio'|iitii|i|nti||i	|ii
tii\}}}}}|i||||d|_
|i|i
ntiotio|itiotii}|i|iti\}	}
}t}|
djo|i|
d}n|oItiitijo0|i}
|
itii|i|qn+ti|tititdttS(sPans the braille display to the left.  If panAmount is non-zero,
        the display is panned by that many cells.  If it is 0, the display
        is panned one full display width.  In flat review mode, panning
        beyond the beginning will take you to the end of the previous line.

        In focus tracking mode, the cursor stays at its logical position.
        In flat review mode, the review cursor moves to character
        associated with cell 0.iit	stopFlash(RR!tbeginningIsShowingRFRIRJtLINERtpanLeftR3RHtCHARRRR(RQRRRPR5RRRgRRR:RfRjREtresetFlashTimerRDRG(R!R\t	panAmountt
charStringRaRbRcRdRBt
lineStringRuRvt
movedCaretR@((s0/usr/lib/python2.6/site-packages/orca/default.pyRs:




'	




cCs|i|ddS(sNudges the braille display one character to the left.

        In focus tracking mode, the cursor stays at its logical position.
        In flat review mode, the review cursor moves to character
        associated with cell 0.iN(R(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pytpanBrailleLeftOneCharscCsV|iotio'|iitii|i|nti||i	|ii
tii\}}}}}|i||||d|_
|i|i
ntiortioh|itioUtii}|i|iti\}	}
}||ijo|i|qRn+ti|tititdttS(sPans the braille display to the right.  If panAmount is non-zero,
        the display is panned by that many cells.  If it is 0, the display
        is panned one full display width.  In flat review mode, panning
        beyond the end will take you to the begininng of the next line.

        In focus tracking mode, the cursor stays at its logical position.
        In flat review mode, the review cursor moves to character
        associated with cell 0.iR4(RR!tendIsShowingtgoEndRIRJR6RtpanRightR3RHR8RRR(RQRRRPR5RRRgRRYR:R9RDRRG(R!R\R:R;RaRbRcRdRBR<RuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyRs,




'	

cCs|i|ddS(sNudges the braille display one character to the right.

        In focus tracking mode, the cursor stays at its logical position.
        In flat review mode, the review cursor moves to character
        associated with cell 0.iN(R(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pytpanBrailleRightOneChar%scCs)|io|i|Sti|SdS(s$Returns to the component with focus.N(RR{R!treturnToRegionWithFocus(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR.s
cCsti|tS(sToggles contracted braille.(R!RRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR6s
cCsti|tS(sProcesses a cursor routing key.(R!RRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR<s
cCsGti|\}}|djo!|i||i||ntS(scClears the selection and moves the caret offset in the currently
        active text area.
        i(R!tgetCaretContexttclearTextSelectionR:RG(R!R\R4R((s0/usr/lib/python2.6/site-packages/orca/default.pyRBs


c	Csti|\}}|djof|i|||i}|id\}}ddk}|i}|i|i||nt	S(sExtends the text selection in the currently active text
        area and also copies the selected text to the system clipboard.iiN(
R!RDtadjustTextSelectionR5tgetSelectiontgtkt
clipboard_gettset_textRtRG(	R!R\R4RttextiRuRvRHt	clipboard((s0/usr/lib/python2.6/site-packages/orca/default.pyROs
cCsCddk}|iii}|i\}}}||fS(s0Gets the absolute position of the mouse pointer.iN(RHtWindowt
get_screentget_root_windowtget_pointer(R!RHt
rootWindowRaRbR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetAbsoluteMouseCoordinates_scCs|i|_ti|_|io|iinPytiti	Wn8yti
ti	Wqtit
dqXnXtS(s,Moves the mouse pointer to the current item.s Could not find current location.(RRR RRRtrouteToCurrentteventsynthesizertrouteToCharacterRQRRt
routeToObjectRRORRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRmhs
cCsw|io|iidnVytitidWn;ytitidWqstit	dqsXnXt
S(s7Performs a left mouse button click on the current item.is Could not find current location.(RtclickCurrentRTtclickCharacterRQRRtclickObjectRRORRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRos
cCsw|io|iidnVytitidWn;ytitidWqstit	dqsXnXt
S(s8Performs a right mouse button click on the current item.is Could not find current location.(RRWRTRXRQRRRYRRORRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRps
cCs|i|d||_tS(s1Brailles and speaks the current flat review line.i(t_reviewCurrentLineRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR~s	cCs|i|d||_tS(s1Brailles and spells the current flat review line.i(RZRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	cCs|i|d||_tS(s>Brailles and phonetically spells the current flat review line.i(RZRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	ic	Cso|i}|itii\}}}}}|i||||t|tip|pt	|p
|djot
itdqa|i
ot
itdqa|idio8|djp
|djot
i||itiqa|djo|i|qa|djo|i|qa|i|}t
i|n|itS(sPresents the current flat review line via braille and speech.

        Arguments:
        - inputEvent - the current input event.
        - speechType - the desired presentation: speak (1), spell (2), or
                       phonetic (3)
        s
Rswhite spacesUTF-8ii(RERHRIRJR6RRgRktBrailleEventRwRRORtisspaceRxRyRzRR{tspellCurrentItemtphoneticSpellCurrentItemR}R(RG(	R!R\t
speechTypeR@R<RaRbRcRd((s0/usr/lib/python2.6/site-packages/orca/default.pyRZs*	$




cCsR|i}|itiitii}|o|i|ti|_	nt
S(sLMoves the flat review context to the beginning of the
        previous line.(REt
goPreviousRIRJR6RNRZR!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyR|s
cCs3|i}|i|i|ti|_tS(sLMoves the flat review context to the top left of the current
        window.(RERFRZR!R RRG(R!R\R@((s0/usr/lib/python2.6/site-packages/orca/default.pyR}s


cCsR|i}|itiitii}|o|i|ti|_	nt
S(sMoves the flat review context to the beginning of the
        next line.  Places the flat review cursor at the beginning
        of the line.(RERMRIRJR6RNRZR!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCsO|i}|itii|itii|i|ti	|_
tS(sMoves the flat review context to the beginning of the
        last line in the window.  Places the flat review cursor at
        the beginning of the line.(RER@RIRJtWINDOWRFR6RZR!R RRG(R!R\R@((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCs3|i}|i|i|ti|_tS(sMoves the flat review context to the end of the
        last line in the window.  Places the flat review cursor
        at the end of the line.(RER@RZR!R RRG(R!R\R@((s0/usr/lib/python2.6/site-packages/orca/default.pyR*s


cCs |i||d||_tS(s1Brailles and speaks the current item to the user.i(R#RRG(R!R\R((s0/usr/lib/python2.6/site-packages/orca/default.pyR7s	cCs |i||d||_tS(s1Brailles and spells the current item to the user.i(R#RRG(R!R\R((s0/usr/lib/python2.6/site-packages/orca/default.pyR?s	cCs |i||d||_tS(s>Brailles and phonetically spells the current item to the user.i(R#RRG(R!R\R((s0/usr/lib/python2.6/site-packages/orca/default.pyRGs	cCstxmt|idD]V\}}|io'ti|id|itiqti|idqWdS(ssSpell the current flat review word or line.

        Arguments:
        - itemString: the string to spell.
        sUTF-8N(	t	enumerateRxRyRROtencodeRzRR{(R!t
itemStringt	charIndexR((s0/usr/lib/python2.6/site-packages/orca/default.pyR]Os
cCs|i}|itii\}}}}}	|i||||	t|tipT|pt	|p
|djot
itdq|itii
\}
}}}}	|
djot
itdq|iot
itdq|idio+|djot
i||itiq|djo|i|q|djo|i|q|djo |i|}t
i|qn|i|tS(s,Presents the current item to the user.

        Arguments:
        - inputEvent - the current input event.
        - targetCursorCell - if non-zero, the target braille cursor cell.
        - speechType - the desired presentation: speak (1), spell (2), or
                       phonetic (3).
        s
Rswhite spacesUTF-8iii(RERHRIRJR"RRgRkR[RwRRORR6R\RxRyRzRR{R]R^R}R(RG(R!R\RR_R@R`RaRbRcRdR<((s0/usr/lib/python2.6/site-packages/orca/default.pyR#]s2$
$

#	



c	Cs|i}|itii\}}}}}|i||||t|tipK|i	i
|i}|i|i
i|itti|ntS(N(RERHRIRJRKRRgRkR[RTRUR'RVRWRXRRRORG(	R!R\R@t
zoneStringRaRbRcRdR_((s0/usr/lib/python2.6/site-packages/orca/default.pyRs$	cCsR|i}|itiitii}|o|i|ti|_	nt
S(sxMoves the flat review context to the previous item.  Places
        the flat review cursor at the beginning of the item.(RER`RIRJR"RNR#R!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCsR|i}|itiitii}|o|i|ti|_	nt
S(stMoves the flat review context to the next item.  Places
        the flat review cursor at the beginning of the item.(RERMRIRJR"RNR#R!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCs|i|d||_tS(s6Brailles and speaks the current flat review character.i(t_reviewCurrentCharacterRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	cCs|i|d||_tS(sXBrailles and 'spells' (phonetically) the current flat review
        character.
        i(RgRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	c
Cs?|i}|itii\}}}}}|i||||t|tip|pt	|ot
itdq1|itii
\}	}}}}|	djot
itdq1|djo|i|q1|idiot
i||itiq1t
i|n|itS(sPresents the current flat review character via braille and speech.

        Arguments:
        - inputEvent - the current input event.
        - speechType - the desired presentation: speak (1) or phonetic (2)
        Rs
isUTF-8(RERHRIRJR8RRgRkR[RwRRORR6R^RxRyRRzRR{R(RG(
R!R\R_R@R;RaRbRcRdR<((s0/usr/lib/python2.6/site-packages/orca/default.pyRgs"$$

	
cCsR|i}|itiitii}|o|i|ti|_	nt
S(smMoves the flat review context to the previous character.  Places
        the flat review cursor at character.(RER`RIRJR8RNRgR!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCs<|i}|itii|i|ti|_t	S(stMoves the flat review context to the end of the line.  Places
        the flat review cursor at the end of the line.(
RER@RIRJR6RR!R RRG(R!R\R@((s0/usr/lib/python2.6/site-packages/orca/default.pyRs

cCsR|i}|itiitii}|o|i|ti|_	nt
S(siMoves the flat review context to the next character.  Places
        the flat review cursor at character.(RERMRIRJR8RNRgR!R RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCsL|i}|itiitii}|o|i||intS(sMoves the flat review context to the character most directly
        above the current flat review cursor.  Places the flat review
        cursor at character.(	REtgoAboveRIRJR8RNR#RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyR*scCsL|i}|itiitii}|o|i||intS(sMoves the flat review context to the character most directly
        below the current flat review cursor.  Places the flat review
        cursor at character.(	REtgoBelowRIRJR8RNR#RRG(R!R\R@Re((s0/usr/lib/python2.6/site-packages/orca/default.pyR9scCs|i}|i}x[|D]S}d}x1|iD]&}|d|i|iif7}q2Wtiti|qWd|_
dS(sDebug routine to paint rectangles around the discrete
        interesting (e.g., text)  zones in the active window for
        this application.
        Rs
 '%s' [%s]N(REtlinestzonesR*RitgetRoleNameRRRRR(R!R\RRjRR<R.((s0/usr/lib/python2.6/site-packages/orca/default.pyRzHs	
cCs|pti}n|o|i}|i||i}|p*td}ti|ti	|q|i
|i|i|i
|i|idti|_ndS(sSearches for the specified query.  If no query is specified,
        it searches for the query specified in the Orca Find dialog.

        Arguments:
        - query: The search query to find.
        sstring not foundN(RtgetLastQueryREt	findQueryRRR!RRROR0t	lineIndext	zoneIndext	wordIndexReRRR R(R!tqueryR@tlocationtmessage((s0/usr/lib/python2.6/site-packages/orca/default.pyRXs

cCsDti}|o#t|_t|_|i|ntidS(s Searches forward for the next instance of the string
        searched for via the Orca Find dialog.  Other than direction
        and the starting point, the search options initially specified
        (case sensitivity, window wrap, and full/partial match) are
        preserved.
        N(RRmRtsearchBackwardst
startAtTopRvRw(R!R\t	lastQuery((s0/usr/lib/python2.6/site-packages/orca/default.pyRxus		cCsDti}|o#t|_t|_|i|ntidS(s%Searches backwards for the next instance of the string
        searched for via the Orca Find dialog.  Other than direction
        and the starting point, the search options initially specified
        (case sensitivity, window wrap, and full/or partial match) are
        preserved.
        N(RRmRGRuRRvRvRw(R!R\Rw((s0/usr/lib/python2.6/site-packages/orca/default.pyRys		cCs|i}|i|dS(s_ Go to the bookmark indexed by inputEvent.hw_code.  Delegates to
        Bookmark.goToBookmark N(tgetBookmarksR^(R!R\t	bookmarks((s0/usr/lib/python2.6/site-packages/orca/default.pyR^scCs|i}|i|dS(sc Add an in-page accessible object bookmark for this key.
        Delegates to Bookmark.addBookmark N(RxR_(R!R\Ry((s0/usr/lib/python2.6/site-packages/orca/default.pyR_scCs|i}|i|dS(s Report "Where am I" information for this bookmark relative to the
        current pointer location.  Delegates to
        Bookmark.bookmarkCurrentWhereAmIN(RxR](R!R\Ry((s0/usr/lib/python2.6/site-packages/orca/default.pyR]scCs|i}|i|dS(sQ Save the bookmarks for this script. Delegates to
        Bookmark.saveBookmarks N(RxR`(R!R\Ry((s0/usr/lib/python2.6/site-packages/orca/default.pyR`scCs|i}|i|dS(s Go to the next bookmark location.  If no bookmark has yet to be
        selected, the first bookmark will be used.  Delegates to
        Bookmark.goToNextBookmark N(RxRa(R!R\Ry((s0/usr/lib/python2.6/site-packages/orca/default.pyRascCs|i}|i|dS(s Go to the previous bookmark location.  If no bookmark has yet to
        be selected, the first bookmark will be used.  Delegates to
        Bookmark.goToPrevBookmark N(RxRb(R!R\Ry((s0/usr/lib/python2.6/site-packages/orca/default.pyRbscCsddk}t}t|ddo[|ii}|d jo>y0|i|i}|ido
t}nWq|q|Xqn|S(!Nit	__class__tfunctionRtlisttdictttupletwrapper_descriptortmoduletmethod_descriptortmember_descriptortinstancemethodtbuiltin_function_or_methodRtclassmethodtclassmethod_descriptort_EnvirontMemoryErrort_Printert_Helpertgetset_descriptortweakreftpropertytcelltstaticmethodt
EventListenertKeystrokeListenerRRltRolenameRv(R{stypeslistsdictstupleRsmoduleRRRRsframesclassmethodRs_EnvironsMemoryErrors_Printers_HelperRRspropertyscellsstaticmethodRRs
KeyBindingsInputEventHandlerR(	tinspectRtgetattrRRzt__name__t
getabsfileRRG(R!R4RtinterestingRtfilename((s0/usr/lib/python2.6/site-packages/orca/default.pyt_isInterestingObjsN
Rc
Csddk}|i|xs|i|D]b}y;|i|o'|i|o|GdG|
GHnPnWnnX|i||d|q)W|i|dS(s2Attempts to discover a cycle in object references.iNs	CYCLE!!!!R(tgcRLt
get_referentsRRt_detectCycletremove(R!R4tvisitedObjsRRtreferent((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
	cCs	dGHdS(s Prints memory usage information.s1TODO: print something useful for memory debuggingN((R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR\scCs|itS(s,Prints a list of all applications to stdout.(t	printAppsRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRs
cCs|ititS(s0Prints the ancestry for the current locusOfFocus(t
printAncestryRQRRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyRZ	scCs.tio |itiitintS(s3Prints the application for the current locusOfFocus(RQRRtprintHierarchyRRG(R!R\((s0/usr/lib/python2.6/site-packages/orca/default.pyR[s
cCsY||jotS|p|otSyx|i|ijp|i|ijotS|iiti}|iiti}|i|ijo>|i	|i	jo+|i
|i
jo|i|ijotS|}|}xu|om|of|ii
tioM|ii
tio4|i|ijotS|i}|i}qW|o7|o0||jo#|i|i|i|ijSWnnXy|}|}xo|og|o`|itijoJ|itijo4|i|ijotS|i}|i}qW|o|o||jotSWnnXtS(N(RGRRRfRRRgtDESKTOP_COORDSRaRbRcRdRkRltSTATE_TRANSIENTRRtgetRealActiveDescendantR2(R!tobj1tobj2textents1textents2tparent1tparent2((s0/usr/lib/python2.6/site-packages/orca/default.pyRs\
,	

			RcCsI|pt|djo|S|ot|o
|||S|SdS(sAppends the newText to the given text with the delimiter in between
        and returns the new string.  Edge cases, such as no initial text or
        no newText, are handled gracefully.iN(Rw(R!RBtnewTextt	delimiter((s0/usr/lib/python2.6/site-packages/orca/default.pytappendString_s

cCs_|p|itijotS|i}x)|D]!}|itijotSq6WtS(sCheck if label has a LABEL_FOR relation

        Arguments:
        - label: the label in question

        Returns TRUE if label has a LABEL_FOR relation.
        (RfRgR2RR.R/R3RG(R!RR8R9((s0/usr/lib/python2.6/site-packages/orca/default.pyt__hasLabelForRelationks	
	cCs|p|p|itijotS|i}|ptSxi|D]a}|itijoExBtd|iD]'}|i	|}||jot
Sq|WqJqJWtS(sCheck if label is connected via  LABEL_FOR relation with object

        Arguments:
        - obj: the object in question
        - labeled: the label in question

        Returns TRUE if label has a relation LABEL_FOR for object.
        i(RfRgR2RR.R/R3RtgetNTargetsR1RG(R!RR4R8R9RR:((s0/usr/lib/python2.6/site-packages/orca/default.pyt__isLabelings"
	

cCs|ipddddddddd	d
ddd
ddddddg|_xAttdtddD]}|iit|qlWn|iS(sReturn a list of the unicode currency symbols, populating the list
        if this is the first time that this routine has been called.

        Returns a list of unicode currency symbols.
        u$u¢u£u¤u¥uƒu؋u৲u৳u૱u௹u฿u៛uℳu元u円u圆u圓u﷼u₠u₵i(RRtordRLtunichr(R!tordChar((s0/usr/lib/python2.6/site-packages/orca/default.pytgetUnicodeCurrencySymbolss0
 c	Cs!g}|i}g}x|D]z}|itijo^x[td|iD]@}|i|}||jo|i||i|qQqQWqqWt|psg}t	}	|i
tijo|}
x|
io|
d}
qW|
i
}
x/|
D]'}|i
tijo|}
PqqWx|
D]3}|i
tijot}	|i|q0q0Wn|i
tijp|i
tijo|idjo|\}}
|i
}|
i
}|tijoA|i|o0|titigjot}	|i|q|tijoA|i|
o0|titigjot}	|i|
qn|i
}|oz|i
tijp|i
tijoNxK|D]?}y/|i||}	|	o|i|PnWqqXqWn|	ot|o
|}qn|S(sReturn a list of the objects that are labelling this object.

        Argument:
        - obj: the object in question

        Returns a list of the objects that are labelling this object.
        ii(R.R/RgtRELATION_LABELLED_BYRRR1RLRwRRft
ROLE_EMBEDDEDRRtROLE_FILLERR2RGRt_Script__hasLabelForRelationt_Script__isLabeling(R!R4RR8t
allTargetsR9RR:tpotentialLabelstuseLabelt	candidateRtchild0tchild1tchild0_roletchild1_roleRtpotentialLabel((s0/usr/lib/python2.6/site-packages/orca/default.pytfindDisplayedLabels	
	



					
	cCsy|i|i|SWn7|ii|iph|i|i<nd}nX|i|}x)|D]!}|i||i|}qfW||i|i|<|i|i|S(sXIf there is an object labelling the given object, return the
        text being displayed for the object labelling this object.
        Otherwise, return None.

        Argument:
        - obj: the object in question

        Returns the string of the object labelling this object, or None
        if there is nothing of interest here.
        N(tgeneratorCachetDISPLAYED_LABELthas_keyRRRR(R!R4tlabelStringR7R((s0/usr/lib/python2.6/site-packages/orca/default.pyR0s
	c	Csd}d}x5|D]-}|o |itijo
|}qqW|o|i|\}}}ny|i}|id}Wn
d}nX|o|i|}nM|iot	|io
|i}n&|i|\}}}|pd}|S(sReturns the text being displayed in a combo box.  If nothing is
        displayed, then None is returned.

        Arguments:
        - combo: the combo box

        Returns the text in the combo box or an empty string if nothing is
        displayed.
        iN(
RRfRgRhRRMRPRRRw(	R!tcomboRttextObjRRRutcomboSelectiontselectedItem((s0/usr/lib/python2.6/site-packages/orca/default.pyt__getDisplayedTextInComboBoxKs(


c	Csiy|i|i|SWn7|ii|iph|i|i<nd}nX|i}|tijo6|i|}||i|i|<|i|i|Sy|i}Wnt	j
onX|i
d|i|}|id}|olt
|djoY|d|ijoE|idjo5y|i|d}WqtitiqXnK|oCx@tdt
|D]%}|||ijod}PqqWn|p
|i}n|ox|tijohxe|D]Y}|itijo=|i|}|o#t
|o|i||}q;qqWn||i|i|<|i|i|S(sReturns the text being displayed for an object.

        Arguments:
        - obj: the object

        Returns the text being displayed for an object or None if there isn't
        any text being shown.
        isUTF-8iN(RtDISPLAYED_TEXTRRRfRgRt#_Script__getDisplayedTextInComboBoxR5RSRtRRxRwtEMBEDDED_OBJECT_CHARACTERRRRRRRRRR2R(	R!R4RRQRBtunicodeTextRRt	childText((s0/usr/lib/python2.6/site-packages/orca/default.pyRsV

	

	c	Cs;|i}x'|D]}|ido	|dSqWy|i}Wntj
odSXy
|i}Wn
d}nX|djo|i|id}nytdti	|}Wnay tdti	|i}Wq y tdti	|i}Wqd}qXq XnXd|}||i
}|S(sReturns the text to be displayed for the object's current value.

        Arguments:
        - obj: the Accessible object that may or may not have a value.

        Returns a string representing the value.
        t	valuetexti
RggY@is%%.%df(RRRRStminimumIncrementRRRtmathtlog10R(	R!R4RRRRt
decimalPlacest	formattertvalueString((s0/usr/lib/python2.6/site-packages/orca/default.pytgetTextForValues:





  

cCs\|iitio|Sx7|D]/}y|i|}|o|SWq%q%Xq%WdS(s*Returns the accessible that has focus under or including the
        given root.

        TODO: This will currently traverse all children, whether they are
        visible or not and/or whether they are children of parents that
        manage their descendants.  At some point, this method should be
        optimized to take such things into account.

        Arguments:
        - root: the root object where to start searching

        Returns the object with the FOCUSED state or None if no object with
        the FOCUSED state can be found.
        N(RkRlRgRtfindFocusedObjectR(R!trootRR((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	c
Csjy|i|i|SWn7|ii|iph|i|i<nd}nX|itijo|iot}x.|D]&}|itijo
t	}q}q}W|pdxa|D]U}y|i
}Wntj
o
qqX|id|i
|o
|}qqWqn|o|o|io|d}n|p||i|i|<|i|i|S(s2Given an object that should be a child of an object that
        manages its descendants, return the child that is the real
        active descendant carrying useful information.

        Arguments:
        - obj: an object that should be a child of an object that
        manages its descendants.
        iiN(RtREAL_ACTIVE_DESCENDANTRRRfRgRRRRGR5RSRtR(R!R4R
tnonTableCellFoundRRB((s0/usr/lib/python2.6/site-packages/orca/default.pyR3s2

 cCs|}x|D]}|djotSt|tp
|g}nt|dto|i}n
|i}||jotS|i}q
WtS(sYCalled to determine if the given object and it's hierarchy of
           parent objects, each have the desired roles.

        Arguments:
        - obj: the accessible object to check.
        - rolesList: the list of desired roles for the components and the
          hierarchy of its parents.

        Returns True if all roles match.
        iN(	RRRgR|RRlRfRRG(R!R4R R^RQtcurrent_role((s0/usr/lib/python2.6/site-packages/orca/default.pyRos



c	Csxtdt|D]}||i|o|d}|djo
d}n|d}|t|djot|d}ntd|g}di|||d!}|itd|di|}ti|qqWdS(sCalled by various spell checking routine to speak the misspelt word,
           plus the context that it is being used in.

        Arguments:
        - allTokens: a list of all the words.
        - badWord: the misspelt word.
        iiisMisspelled word: %sRs
Context is %sN(RRwRRtjoinRLRRO(	R!RtbadWordRtminIndextmaxIndexR_t
contextPhraseRB((s0/usr/lib/python2.6/site-packages/orca/default.pytspeakMisspeltWords




c	csCy|i}WndSX|i}|i}titijo
ti}n*titijo
ti	}n
ti	}t
}x|pd}x||jo|i||\}}	}
|p(ti	}|i||\}}	}
n|	djoPn|
|jo$t|d|d}|
}qn|
}|
}|i
|}|idiotiti}ntiti}ti|||	|
|gVqWt
}|i}
xt|
D]l}|itijoP|id}y|i}Wntj
odSX|i}d}t}PqqW|p
t}qqWdS(sCreates a generator that can be used to iterate over each line
        of a text object, starting at the caret offset.

        Arguments:
        - obj: an Accessible that has a text specialization

        Returns an iterator that produces elements of the form:
        [SayAllContext, acss], where SayAllContext has the text to be
        spoken and acss is an ACSS instance for speaking the text.
        NiiisUTF-8(R5RYRRtsayAllStyletSAYALL_STYLE_SENTENCERgtTEXT_BOUNDARY_SENTENCE_ENDtSAYALL_STYLE_LINERRRRR}RxRyRzR{R|R6R7R.R/RWR1RSRG(R!R4RBtlengthRtmodetdonet
lastEndOffsetR<RuRvRt	moreLinesR8R9((s0/usr/lib/python2.6/site-packages/orca/default.pyRZsl		

	
	

	
	
		c
	Csti}t}yti|d\}}Wn
t}nXt|}|tijo|d|ijom|p|oP||joCt	i
|d}	|dtdd|h|d6|	d67}q||7}n||7}|S(sAdd in the latest line segment, adjusting for repeat characters
        and punctuation.

        Arguments:
        - segment: the segment of repeated characters.
        - line: the current built-up line to characters to speak.
        - respectPunctuation: if False, ignore punctuation level.

        Returns: the current built-up line plus the new segment, after
        adjusting for repeat character counts and punctuation.
        iRs"%(count)d %(repeatChar)s characters#%(count)d %(repeatChar)s charactersRt
repeatChar(RtverbalizePunctuationStyleRGtpunctuation_settingstgetPunctuationInfoRRwtrepeatCharacterLimitRtchnamestgetCharacterNameR(
R!tsegmentRtrespectPunctuationtstyletisPunctChartleveltactionRR((s0/usr/lib/python2.6/site-packages/orca/default.pyt_addRepeatSegments(
	

c
Cs\|id}|t|}y|i}|i}Wn
d}nXt|}xt|ddD]}|i|d}	||	ijo
|jno|	i|}
n9||	ijo
|jnot|d}
nqjdt	d}||
}||i
jp
ti|p|d7}n|||
|
+qjWdi
|idS(s|Adjust line to include the word "link" after any hypertext links.

        Arguments:
        - obj: the accessible object that this line came from.
        - line: the string to adjust for links.
        - startOffset: the caret offset at the start of the line.

        Returns: a new line adjusted to add the speaking of "link" after
        text which is also a link.
        sUTF-8iiiRRR(RxRwtqueryHypertextt	getNLinksR|RtgetLinktendIndext
startIndexRRRRRRc(
R!R4RRuRvt	hyperTexttnLinkstadjustedLinetnRRt
linkStringtnextChar((s0/usr/lib/python2.6/site-packages/orca/default.pyREs.
!!
cCs|id}t|djptidjo|idSd}|d}}t}xltdt|D]U}|||jo|||7}n#t}|i||}||}||}qpW|i|||}|idS(sAdjust line to include repeat character counts.
        As some people will want this and others might not,
        there is a setting in settings.py that determines
        whether this functionality is enabled.

        repeatCharacterLimit = <n>

        If <n> is 0, then there would be no repeat characters.
        Otherwise <n> would be the number of same characters (or more)
        in a row that cause the repeat character count output.
        If the value is set to 1, 2 or 3 then it's treated as if it was
        zero. In other words, no repeat character count is given.

        Arguments:
        - line: the string to adjust for repeat character counts.

        Returns: a new line adjusted for repeat character counts (if enabled).
        sUTF-8iuii(	RxRwRRRcRRRGR(R!RtnewLineRRt
multipleCharsR((s0/usr/lib/python2.6/site-packages/orca/default.pyR}ws #
cCsfy|i}Wntj
o
d}n8Xy|iiWntj
o
d}nX|i}|S(sReturns the character offset of the embedded object
        character for this object in its parent's accessible text.

        Arguments:
        - obj: an Accessible that should implement the accessible hyperlink
               specialization.

        Returns an integer representing the character offset of the
        embedded object character for this hyperlink in its parent's
        accessible text, or -1 something was amuck.
        i(tqueryHyperlinkRSRR5R(R!R4t	hyperlinkR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetCharacterOffsetInParents
	ic	CsZ|pdSd}y|i}Wn
d}nX|o|io|i||}|id}|o|i|jod}x3|D]+}|i||joPn|d7}qWt|}	|	i|i}
xgt	|
D]Y}|	i
|i}|||}|i|}
|
p
d}
n|
id|	|<qWdi|	}qVn|S(srExpands the current object replacing EMBEDDED_OBJECT_CHARACTERS
        with their text.

        Arguments
        - obj: the object whose text should be expanded
        - startOffset: the offset of the first character to be included
        - endOffset: the offset of the last character to be included

        Returns the fully expanded text for the object.
        sUTF-8iiRN(
RR5RYRtRxRRR|RRRt
expandEOCsR(R!R4RuRvR*RBRtchildOffsetRttoBuildRRRR((s0/usr/lib/python2.6/site-packages/orca/default.pyR
s<


cCs9ti||i}||joti|}n|S(s&Adjust the word segment to potentially replace it with what
        those words actually sound like. Two pronunciation dictionaries
        are checked. First the application specific one (which might be
        empty), then the default (global) one.

        Arguments:
        - segment: the string to adjust for words in the pronunciation
          dictionaries.

        Returns: a new word segment adjusted for words found in the
        pronunciation dictionaries, or the original word segment if there
        was no dictionary entry.
        (tpronunciation_dicttgetPronunciationtapp_pronunciation_dict(R!Rt
newSegment((s0/usr/lib/python2.6/site-packages/orca/default.pyt_getPronunciationForSegments
	
cCsd}|ii|id}x8|D]0}|io|i|}n||7}q(W||jo+titid||f|idS|SdS(s@Adjust the line to replace words in the pronunciation dictionary,
        with what those words actually sound like.

        Arguments:
        - line: the string to adjust for words in the pronunciation dictionary.

        Returns: a new line adjusted for words found in the pronunciation
        dictionary.
        RsUTF-8s0adjustForPronunciation: 
  From '%s'
  To   '%s'N(	tWORDS_RERRxtisalnumRRRRRc(R!RRtwordsR((s0/usr/lib/python2.6/site-packages/orca/default.pytadjustForPronunciations

c	Cs|pdSy|iWntj
odSXy|i}Wntj
odSXxNt|iD]:}|i|}||ijo||ijo|SqkWdS(sA brute force method to see if an offset is a link.  This
        is provided because not all Accessible Hypertext implementations
        properly support the getLinkIndex method.  Returns an index of
        0 or greater of the characterIndex is on a hyperlink.

        Arguments:
        -obj: the Accessible object with the Accessible Hypertext specialization
        -characterIndex: the text position to check
        i(R5RSRRRRRR(R!R4tcharacterIndext	hypertextRR((s0/usr/lib/python2.6/site-packages/orca/default.pyR+s"	cCs
|iS(sReturns the index of the cell which should be used with the
        table interface.  This is necessary because in some apps we
        cannot count on getIndexInParent() returning the index we need.

        Arguments:
        -obj: the table cell whose index we need.
        (R(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pyRKscCst|tp|id}nt|tp|id}n|djp
|djotS||ijo
|djS(sReturns True if we are positioned at the end of a sentence.
        This is determined by checking if the current character is a
        white space character and the previous character is one of the
        normal end-of-sentence punctuation characters.

        Arguments:
        - currentChar:  the current character
        - previousChar: the previous character

        Returns True if the given character is a sentence delimiter.
        sUTF-8s
s
s!.?:;(RgtunicodeRxRGR(R!RR((s0/usr/lib/python2.6/site-packages/orca/default.pyRUs
cCsMt|tp|id}n||ijp|djp
||ijS(sReturns True if the given character is a word delimiter.

        Arguments:
        - character: the character in question

        Returns True if the given character is a word delimiter.
        sUTF-8s!*+,-./:;<=>?@[\]^_{|}(RgRRxRtNO_BREAK_SPACE_CHARACTER(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pyRms
	
cCstitid|ipdxg|o_||ijoO|itijo9|i}|o%titid|ipdq$q$W|o|itijond}|S(sReturns the frame containing this object, or None if this object
        is not inside a frame.

        Arguments:
        - obj: the Accessible object
        sFinding frame for source.name=Rs
--> obj.name=N(	RRRRRRfRgRR(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pytgetFrame}s	cCstitid|ipdxi|oa|ioW||ijoG|iitijo.|i}titid|ipdq$W|o'|io|iitijond}|S(sReturns the top-level object (frame, dialog ...) containing this
        object, or None if this object is not inside a top-level object.

        Arguments:
        - obj: the Accessible object
        s)Finding top-level object for source.name=Rs
--> obj.name=N(	RRRRRRfRgR+R(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pyRs 
	cCs2|i|}|p|iodS|iSdS(sD Returns the name of the top-level object. See getTopLevel.
        RN(RR(R!R4ttop((s0/usr/lib/python2.6/site-packages/orca/default.pytgetTopLevelNamescCsdS(s0Returns the offset which should be used as the end offset.
        By default, this is -1. However, this value triggers an assertion
        in certain apps. See bug 598797.

        Argument:
        - textInterface: the accessible text interface for which the end
          offset is desired.

        i((R!t
textInterface((s0/usr/lib/python2.6/site-packages/orca/default.pyRsc
CsPy|i}Wntj
odddgSX|i|ijo9td|id}|i||did}n|i}d}|i|ijo|djod}|}n}|idjo |i||d}|}n|i|t	i
\}}}	|id}|ddjo|d }n|id|i|gS(sGets the line of text where the caret is.

        Argument:
        - obj: an Accessible object that implements the AccessibleText
          interface
        - offset: an optional caret offset to use. (Not used here at the
          moment, but needed in the Gecko script)

        Returns the [string, caretOffset, startOffset] for the line of text
        where the caret is.
        RiisUTF-8s
iN(R5RSRRYRRtRxRRRgRRc(
R!R4RRBRRtcontentRuR<Rv((s0/usr/lib/python2.6/site-packages/orca/default.pyRs.		


cCs|pdSy|i|i|SWn1|ii|iph|i|i<qVnXd}|i}x1|iitijo|d7}|i}qhW||i|i|<|i|i|S(sDetermines the nesting level of this object in a list.  If this
        object is not in a list relation, then 0 will be returned.

        Arguments:
        -obj: the Accessible object
        ii(Rt
NESTING_LEVELRRRfRgt	ROLE_LIST(R!R4RR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetNestingLevel
s	
c
Cso|pdSy|i|i|SWn1|ii|iph|i|i<qVnXg}|}t}x|p|i}d}x8|D]0}|itijo|i	d}PqqWt
|djp|i|oti
tidt}qk|o.|i|ti
tidt
|qkt}qkWt
|d|i|i|<|i|i|S(sDetermines the node level of this object if it is in a tree
        relation, with 0 being the top level node.  If this object is
        not in a tree relation, then -1 will be returned.

        Arguments:
        -obj: the Accessible object
        iiids'Script.getNodeLevel detected a cycle!!!sScript.getNodeLevel %diN(Rt
NODE_LEVELRRR.RR/RgtRELATION_NODE_CHILD_OFR1RwRRRRRGRLR(R!R4tnodestnodeRR8R9((s0/usr/lib/python2.6/site-packages/orca/default.pytgetNodeLevel's>		
	#

cCsXy|ii}WngSX|iitipgSg}|i|}|i|}|i|}|i	|}t
}xt|d|iD]}	|i
|	|}
|
i}x|D]z}|itijo^|id}
|i||
o|i|
n'|i	|
}||jo
t}nPqqW|oPqqW|S(sGets all of the children that have RELATION_NODE_CHILD_OF pointing
        to this expanded table cell.

        Arguments:
        -obj: the Accessible Object

        Returns: a list of all the child nodes
        ii(RRRkRlRgtSTATE_EXPANDEDRRRR)RRtnRowstgetAccessibleAtR.R/R&R1RRLRG(R!R4R"R'RR$tcolR	RRRR8R9tnodeOftcurrentLevel((s0/usr/lib/python2.6/site-packages/orca/default.pyt
getChildNodesWs<
	


		cCsvy|i|i|SWn1|ii|iph|i|i<qJnXy|i}Wn?tj
o3dddg|i|i|<|i|i|SX|ididid}t|djo"|d}|d}|d}nXt|djo2d}|d}y|d}WqId}qIXnd}d}d}|i	dd}|i	d	d
}|i	dd
i
}|id
o|td7}n|i	dd}|i	d	d
i
}|id
o|td7}n|i	dd}|i	d	d
i
}t
it
id
t|||g|||g|i|i|<|i|i|S(s2Gets the mnemonic, accelerator string and possibly shortcut
        for the given object.  These are based upon the first accessible
        action for the object.

        Arguments:
        - obj: the Accessible object

        Returns: list containing strings: [mnemonic, shortcut, accelerator]
        RisUTF-8Riiit<t>RRRsdefault.getKeyBinding: (RtKEY_BINDINGRtqueryActionRSt
getKeyBindingRxRRwRRRRRRRtrepr(R!R4RtbindingStringstmnemonictfullShortcuttaccelerator((s0/usr/lib/python2.6/site-packages/orca/default.pyR5sP	!


cCsHtitidtdtiid}titid|S(snRetrieves the list of currently running apps for the desktop
        as a list of Accessible objects.
        sScript.getKnownApplications...cSs
|dj	S(N(R(Ra((s0/usr/lib/python2.6/site-packages/orca/default.pyt<lambda>sis...Script.getKnownApplications(RRRtfilterRgtRegistryt
getDesktop(R!tapps((s0/usr/lib/python2.6/site-packages/orca/default.pytgetKnownApplicationss	cCsg}|idjo|Sxt|D]\}}titid||o|p |ov|iitio]|i	||iiti
djo-|idjo|i|i||qq(q(W|S(sReturns a list of all objects under the given root.  Objects
        are returned in no particular order - this function does a simple
        tree traversal, ignoring the children of objects which report the
        MANAGES_DESCENDANTS state.

        Arguments:
        - root:        the Accessible object to traverse
        - onlyShowing: examine only those objects that are SHOWING

        Returns: a list of all objects under the specified object
        is%Script.getObjects looking at child %d(
RRbRRRRkRlRgR,RLRRVt
getObjects(R!RtonlyShowingtobjlistRR((s0/usr/lib/python2.6/site-packages/orca/default.pyRAs 

%cCsQg}|i||}x2|D]*}|i|jo|i|qqW|S(sReturns a list of all objects of a specific role beneath the
        given root.  [[[TODO: MM - This is very inefficient - this should
        do it's own traversal and not add objects to the list that aren't
        of the specified role.  Instead it uses the traversal from
        getObjects and then deletes objects from the list that aren't of
        the specified role.  Logged as bugzilla bug 319740.]]]

        Arguments:
        - root the Accessible object to traverse
        - role the string describing the Accessible role of the object
        - onlyShowing: examine only those objects that are SHOWING

        Returns a list of descendants of the root that are of the given role.
        (RARfRL(R!RRQRBRCtallobjsR((s0/usr/lib/python2.6/site-packages/orca/default.pyt
findByRolescCs|i|ti}g}x|D]}|i}t|djo|i}|o|itijoq|o-|itijo|i	|i	joq|i
itio|i
|qq"q"Wg}x|D]}|iiti}d}	xn|D]f}
|
iiti}|i|ijp&|i|ijo!|i|ijo|	d7}	qPqW|i|	|qW|S(sReturns a list containing all the unrelated (i.e., have no
        relations to anything and are not a fundamental element of a
        more atomic component like a combo box) labels under the given
        root.  Note that the labels must also be showing on the display.

        Arguments:
        - root the Accessible object to traverse

        Returns a list of unrelated labels under the given root.
        ii(RERgR2R.RwRRfRRRRkRlR,RLRRRRbRatinsert(R!Rt	allLabelstunrelatedLabelsRR8RtsortedLabelst
label_extentsRtsortedLabeltsorted_extents((s0/usr/lib/python2.6/site-packages/orca/default.pyR-s<	cCsxt|idD]h\}}|io titi}|i}ntiti}ti	|}t
i||qWdS(sPhonetically spell the current flat review word or line.

        Arguments:
        - itemString: the string to phonetically spell.
        sUTF-8N(RbRxRyRRzR{tlowerR|t	phonnamestgetPhoneticNameRRO(R!RdReRRtphoneticString((s0/usr/lib/python2.6/site-packages/orca/default.pyR^as
cCs|pdS|g}|i}x5|o-|i|jo|id||i}q!Wd}xG|D]?}|dti|}titi||GH|d7}qcWdS(s1Prints a hierarchical view of a child's ancestry.NiRs+- s  (RRFRRpRR(R!RtancestorListRRtancestorR((s0/usr/lib/python2.6/site-packages/orca/default.pyRqs		c
Cs|pdS||jo|dti|}n|dti|}titi||GH|iiti}x|D]}||jo*|dd}titi||GHq|p*|dd}titi||GHq|i|jo*|dd}titi||GHq|p|o|iiti	}	|	o|p|o|}	|	o!|i
|||d||qqWdS(skPrints the accessible hierarchy of all children

        Arguments:
        -indent:      Indentation string
        -root:        Accessible where to start
        -ooi:         Accessible object of interest
        -onlyShowing: If True, only show children painted on the screen
        -omitManaged: If True, omit children that are managed descendants
        Ns(*) s+- s  sWARNING CHILD == PARENT!!!sWARNING CHILD IS NONE!!!s!WARNING CHILD.PARENT != PARENT!!!(RRpRRRkRlRgRRR,R(
R!RtooiRRBtomitManagedRtrootManagesDescendantsRtpaint((s0/usr/lib/python2.6/site-packages/orca/default.pyRsD

				cCs|i}dt|}titi||GHx|D]}ti|dt}titi||GHxb|D]Z}ti|dt}titi||GH|i|jotitidququWq;WtS(s,Prints a list of all applications to stdout.s$There are %d Accessible applicationss  App: s    Window: s+      WARNING: child's parent is not app!!!(	R@RwRRRRpRRRG(R!R?RR"R((s0/usr/lib/python2.6/site-packages/orca/default.pyRs$cCs3|ptStiotii|ijSdS(sReturns True if the given object is from the same application that
        currently has keyboard focus.

        Arguments:
        - obj: an Accessible object
        N(RRQRRR(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pyR*s

cCsd}|i}xg|D]_}xV|D]N}y.|i}|itio|}PnWq&titiq&Xq&WqW|S(sTraverses the list of known apps looking for one who has an
        immediate child (i.e., a window) whose state includes the active state.

        Returns the Python Accessible of the window that's active or None if
        no windows are active.
        N(	RR@RkRlRgtSTATE_ACTIVERRR(R!RR?R"RRq((s0/usr/lib/python2.6/site-packages/orca/default.pyRs	cCs|pdSt|gip
|g}nt|gip
|g}nd}|i}x[|oS||ijoC|i|jo|}Pq^|i|joPq^|i}q^W|S(scReturns the object of the specified roles which contains the
        given object, or None if the given object is not contained within
        an object the specified roles.

        Arguments:
        - obj: the Accessible object
        - ancestorRoles: the list of roles to look for
        - stopRoles: the list of roles to stop the search at
        N(RRgRzRRf(R!R4t
ancestorRolest	stopRolesRR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetAncestors"

	cCs
tiS(sSave a copy of all the existing application specific settings
        (as specified by the settings.userCustomizableSettings dictionary).(t
orca_prefstreadPreferences(R!((s0/usr/lib/python2.6/site-packages/orca/default.pytsaveOldAppSettingsscCs=x6tiD]+}||jott|||q
q
WdS(sRestore a copy of all the previous saved application settings.

        Arguments:
        - prefsDict: the dictionary containing the old application settings.
        N(RtuserCustomizableSettingstsetattr(R!t	prefsDictR((s0/usr/lib/python2.6/site-packages/orca/default.pytrestoreOldAppSettingss

cCs\|djo5|djo(|djo|djotinti||||dS(s^Draws an outline around the accessible, erasing the
        last drawn outline in the process.iiN(toutlineterasetdraw(R!RaRbRcRd((s0/usr/lib/python2.6/site-packages/orca/default.pyR,s4cCsy|i}Wn;tj
o|iddddnHtj
on6X|iti}|i|i|i|i	|i
dS(skDraws a rectangular outline around the accessible, erasing the
        last drawn rectangle in the process.iiN(RRYRRSRRgRRaRbRcRd(R!Rit	componenttvisibleRectangle((s0/usr/lib/python2.6/site-packages/orca/default.pytoutlineAccessible5scCs||jotSy|i}WntSXxNt|iD]:}|i|\}}||jo||jotSq@WtS(s{Returns an indication of whether the text is selected by
        comparing the text offset with the various selected regions of
        text for this accessible object.

        Arguments:
        - obj: the Accessible object.
        - startOffset: text start offset.
        - endOffset: text end offset.

        Returns an indication of whether the text is selected.
        (RR5RR>RGRG(R!R4RuRvRBRtstartSelOffsettendSelOffset((s0/usr/lib/python2.6/site-packages/orca/default.pytisTextSelectedEs
	cCs||g|id<dS(sOSave away the start and end offset of the range of text that
        was spoken. It will be used by speakTextSelectionState, to try
        to determine if the text was selected or unselected.

        Arguments:
        - startOffset: the start of the spoken text range.
        - endOffset: the end of the spoken text range.
        RN(R
(R!RuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyRtds
cCs||g|id<dS(sSave away the current text cursor position for next time.

        Arguments:
        - obj: the current accessible
        - caretOffset: the cursor position within this object
        RVN(R
(R!R4R((s0/usr/lib/python2.6/site-packages/orca/default.pyRspscCsKg|id<x7t|iD]#}|idi|i|q WdS(srSave away the list of text selections for next time.

        Arguments:
        - text: the text object.
        tlastSelectionsN(R
RR>RLRG(R!RBR((s0/usr/lib/python2.6/site-packages/orca/default.pyt_saveLastTextSelectionszs


cCs(tdtdtdtdgS(Ns,paragraph selected down from cursor positions.paragraph unselected down from cursor positions*paragraph selected up from cursor positions,paragraph unselected up from cursor position(R(R!((s0/usr/lib/python2.6/site-packages/orca/default.pyt_getCtrlShiftSelectionsStringss			cCsy|i}WndSXttitiotii}tii}n
d}d}|t
i@}|t
i@}|i
dj}	t}
|djo$|o|ot}
td}n|djo$|o|ot}
td}nf|djo<|o5|o-t}
|	otd}qRtd}n|djo<|o5|o-t}
|	otd	}qRtd
}n|djoC|o<|o5t}
|i}|	o|d}qR|d}n|d
joC|o<|o5t}
|i}|	o|d}qR|d}n4|djo;|o4|o-t}
|	otd}qRtd}n|djo;|o4|o-t}
|	otd}qRtd}n|djo|o|i}
xtd|i
D]h}|i|\}}|idjo=|djo0||
jo#t}
|i|td}qqWn|
oti|dtdS||jodSyy|i||id}Wn
d}nXt|}|djoxC||jo5|i||do|d8}|d8}qPqWd}xC||jo1|i||o|d7}|d7}qPqWnWntitinX|i |||o tit!dddtn:t|i||o tit!dddtn|i"|dS(sSpeak "selected" if the text was just selected, "unselected" if
        it was just unselected.

        Arguments:
        - obj: the Accessible object.
        - startOffset: text start offset.
        - endOffset: text end offset.
        NiRs2line selected to end from previous cursor positionR
s4line selected from start to previous cursor positions"page selected from cursor positions$page unselected from cursor positions page selected to cursor positions"page unselected to cursor positionRiRdiiR	s$document selected to cursor positions&document unselected to cursor positionRs&document selected from cursor positions(document unselected from cursor positiontAsentire document selectedsUTF-8uRBRR(#R5RgRQRRkRmRRRRRRnRR>RRGRRmRYRRGRRRRORtRxRwRRRRRjRRl(R!R4RuRvRBteventStrRRyRztselectedTexttspecialCaseFoundRtstringst	charCountRttmpStrR((s0/usr/lib/python2.6/site-packages/orca/default.pyRs


	

	





  cCs|iidS(sjReturn the URI for a given link object.

        Arguments:
        - obj: the Accessible object.
        i(R
tgetURI(R!R4((s0/usr/lib/python2.6/site-packages/orca/default.pyRu`scCsdS(sDummy method used as a reminder to refactor whereamI for links,
        possibly subclassing whereamI for the Gecko script.
        N(R(R!((s0/usr/lib/python2.6/site-packages/orca/default.pytgetDocumentFramehscCs	dGHdS(sRings the system bell.  This is really a hack.  Ideally, we want
        a method that will present an earcon (any sound designated representing
        an error, event etc)
        sN((R!((s0/usr/lib/python2.6/site-packages/orca/default.pyt
systemBeepnscCsLy|i}WndSXx*td|iD]}|idq1WdS(s4Clears the text selection if the object supports it.Ni(R5RR>tremoveSelection(R!R4RKR((s0/usr/lib/python2.6/site-packages/orca/default.pyREuscCsy|i}WndSX|ip;|i}t||}t||}|i||nF|id\}}||jo
|}n|}|id||dS(s)Adjusts the end point of a text selectionNi(R5R>RRRtaddSelectionRGR?(R!R4RRKRRuRv((s0/usr/lib/python2.6/site-packages/orca/default.pyRFs
	

cCs,y|i}WndSX|i|dS(sSet the caret offset on a given accessible. Similar to
        Accessible.setCaretOffset()

        Arguments:
        - obj: Given accessible object.
        - offset: Offset to hich to set the caret.
        N(R5RR:(R!R4RRK((s0/usr/lib/python2.6/site-packages/orca/default.pyR:s
cCsGy,ttd|ididSWntj
ohSXdS(sCreates a Python dict from a typical attributes list returned from
        different AT-SPI methods.

        Arguments:
        - dict_string: A list of colon seperated key/value pairs seperated by
        semicolons.
        Returns a Python dict of the given attributes.
        cSs|iidS(R(RR(tpair((s0/usr/lib/python2.6/site-packages/orca/default.pyR;ss; RN(R}tmapRRt
ValueError(R!tdict_string((s0/usr/lib/python2.6/site-packages/orca/default.pytattributeStringToDictionarys		 cCsg}|ioy|ii}Wntj
odSX|idjo|idg}n
|i}xo|D]c}y|i}Wntj
o
qpnX|i||ti	o|i
tijo|SqpWndS(sSince pop-up items often don't contain nested components, we need
        a way to efficiently determine if the cursor is over a menu item.

        Arguments:
        - x: X coordinate.
        - y: Y coordinate.

        Returns a menu item the mouse is over, or None.
        iN(RRMRSRRNRPRRlRgRtgetLayertLAYER_POPUP(R!RaRbtsuspect_childrentsiRtci((s0/usr/lib/python2.6/site-packages/orca/default.pyt_getPopupItemAtDesktopCoordss$

	c	
Cs|i||}|o|S|}xto|itijo=y#|i}|idd}Wqtj
oqXny|i}WndSX|}|i
||ti}|p|i|joPq'q'W||jodS|SdS(sGet the descendant component at the given desktop coordinates.

        Arguments:

        - parent: The parent component we are searching below.
        - x: X coordinate.
        - y: Y coordinate.

        Returns end-node that contains the given coordinates, or None.
        iN(RRGRfRgtROLE_PAGE_TAB_LISTRMRPRSRRRR(	R!RRaRbtacct	containerRRtinner_container((s0/usr/lib/python2.6/site-packages/orca/default.pytgetComponentAtDesktopCoordss.	

c	Csd}|i}|i}xtd|D]}|i|\}}titid||f|i||}titid||djo|d7}n||7}q.W|||gS(sGet the text selection for the given object.

        Arguments:
        - obj: the text object to extract the selected text from.

        Returns: the selected text contents plus the start and end
        offsets within the text.
        Ris+getSelectedText: selection start=%d, end=%ds#getSelectedText: selected text=<%s>R(R5R>RRGRRRRt(	R!R4RbRRRRuRvRp((s0/usr/lib/python2.6/site-packages/orca/default.pyRZs 

cCsDd}d}d}|i}|idjo|i|\}}}n|}t}x|ot}x|iD]}|itijo|i	d}	|	i}
|
idjo6|i|	\}}}
|d|}|	}t}n?|
i
d|i|
}t|djo|	}t}nPqvqvWq\W|}t}x|ot}x|iD]}|iti
jo|i	d}|i}|idjo6|i|\}}}
|d|7}|}t}n?|i
d|i|}t|djo|}t}nPqkqkWqQW|||gS(sGet all the text applicable text selections for the given object.
        including any previous or next text objects that also have
        selected text and add in their text contents.

        Arguments:
        - obj: the text object to start extracting the selected text from.

        Returns: all the selected text contents plus the start and end
        offsets within the text for the given object.
        RiR(R5R>RZRGRR.R/RgRXR1RtRRwRW(R!R4RbRuRvRBR^RR9RRtnewTextContentsR`RaRRR((s0/usr/lib/python2.6/site-packages/orca/default.pyR sf
	

	

	

	
cCsXg}y|i}Wn|SXx0t|iD]}|i|i|q4W|S(snGet a list of text selections in the given accessible object,
        equivelent to getNSelections()*texti.getSelection()

        Arguments:
        - acc: An accessible.

        Returns list of start and end offsets for multiple selections, or an
        empty list if nothing is selected or if the accessible does not support
        the text interface.
        (R5RR>RLRG(R!RtrvRKR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetAllTextSelections] scCs|o|iitiS(sDetermine if the speak-word-under-mouse capability applies to
        the given accessible.

        Arguments:
        - acc: Accessible to test.

        Returns True if this accessible should provide the single word.
        (RkRlRgRn(R!R((s0/usr/lib/python2.6/site-packages/orca/default.pytspeakWordUnderMouses s	cCstitijoy|i}WndSX|i|ti}|dip|i|do|dt	_
dS|i|ti}|i||o+|dt	i
jot
itdn|dt	_
ndS(sSpeaks an announcement indicating that a given word is misspelled.

        Arguments:
        - obj: An accessible which implements the accessible text interface.
        - offset: Offset in the accessible's text for which to retrieve the
          attributes.
        NiR(RRRR5RRgRRRRQtlastWordCheckedForSpellingRRRROR(R!R4RRBtcharAndOffsetstwordAndOffsets((s0/usr/lib/python2.6/site-packages/orca/default.pyR~ s	
cCstS(s[Identifies if the current word is flagged as misspelled by the
        application.

        Arguments:
        - obj: An accessible which implements the accessible text interface.
        - offset: Offset in the accessible's text for which to retrieve the
          attributes.

        Returns True if the word is flagged as misspelled.
        (R(R!R4R((s0/usr/lib/python2.6/site-packages/orca/default.pyR sc	Csh}y|i}Wn|ddfSX|o |i|i|in|i|\}}}|i|i||||fS(s
Get the text attributes run for a given offset in a given accessible

        Arguments:
        - acc: An accessible.
        - offset: Offset in the accessible's text for which to retrieve the
        attributes.
        - get_defaults: Get the default attributes as well as the unique ones.
        Default is True

        Returns a dictionary of attributes, a start offset where the attributes
        begin, and an end offset. Returns ({}, 0, 0) if the accessible does not
        supprt the text attribute.
        i(R5tupdateR~RR(	R!RRtget_defaultsRRKt
attrib_strR`Ra((s0/usr/lib/python2.6/site-packages/orca/default.pytgetTextAttributes scCsMy|i}Wntj
odSX|id|i|}g}d}xotogy|id|}Wn-tj
o!|i|t|fPnX|i||f|d}qQWx|D]~\}	}
|i	|	|
t
i\}}}
}ti
|||
|}|i||o#d}g}x}touy||	|
!id|}Wn4tj
o(|i|t||	|
!fPnX|i||f|d}q1Wx|D]\}}|i	|	||	|t
i\}}}
}ti
|||
|}|i||o%||	||	|!|	||	|fSqWqqWdS(sGet the word at the given coords in the accessible.

        Arguments:
        - acc: Accessible that supports the Text interface.
        - x: X coordinate.
        - y: Y coordinate.

        Returns a tuple containing the word, start offset, and end offset.
        Ris
iR(Rii(Rii(R5RSRtRRGRR|RLRwtgetRangeExtentsRgRRtBoundingBoxtisInBox(R!RRaRbttit
text_contentstline_offsetststart_offsett
end_offsetR`RaRRtbwtbhtbbtword_offsetsRR((s0/usr/lib/python2.6/site-packages/orca/default.pytgetWordAtCoords sR
$	1(Rt
__module__RRtretcompiletUNICODERRRR3R"R%RR
RRRRRRR R1R[RqRPRsRtRRRRRRRR~RRRRRrRsRtRuRRRRRR%R;RRRRcR}RRRRRRRRRoRpRqRrRRRRRRRRRRRRRRRRRRRRRRRER{R(R3RR>RRBRRRRRRRRmRoRpR~RRRZR|R}RRRRRRR]R#RRRRRRgRRRRRRzRRxRyR^R_R]R`RaRbRRR\RRZR[RRRRRRRRRRRRRRRZRGRRR}RR
RRRRRRRRRRRR$R)R0R5R@RARER-R^RRRR*RRZR]RaRRgRjRtRsRlRmRRuRvRwRERFR:R~RRRZRRRRRRRR(((s0/usr/lib/python2.6/site-packages/orca/default.pyRGs	:	g		9			 	&			,			
		#	1	2	ML	=			 									5	g		,	A		J		U		}		!				
	
		'	W	+			)	 			
			DH	A#		_		,	A	4	
					.		
			
	6					
+														
	,		F			%	n		A	N	<		<		)	e*	2	5	1			 	
							
C		0	1	L	$	B		4				"								
							
					*		D			&	tcheckedt
indeterminatetshowingRltexpanded(1t__doc__t__id__t__version__t__date__t
__copyright__t__license__RRRRRRgR!RRRTRRIRkRRRbRvR[RQRNRRRRRR6RRt	orca_i18nRRRRRRRKtROLE_CHECK_BOXRR2R4tROLE_TOGGLE_BUTTONRtROLE_LIST_ITEM(((s0/usr/lib/python2.6/site-packages/orca/default.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit