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/scripts/toolkits/Gecko/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyc
y#Jc@sdZdZdZdZdZdZddkZddkZddkZddk	Z	ddk
Z
ddkZddki
Z
ddkiZddkiZddkiZddkiZddkiZddkiZddkiZddkiZddkiZddk i!Z!ddk"i#Z#ddk$i%Z%ddk&i'Z'ddk(Z(ddk)l*Z*dd	k+l,Z,dd
k-l.Z.ddk/l0Z0ddk1l2Z2dd
k3l4Z4ddk5l6Z6dei7fdYZ7dS(sCustom script for Gecko toolkit.
Please refer to the following URL for more information on the AT-SPI
implementation in Gecko:
http://developer.mozilla.org/en/docs/Accessibility/ATSPI_Support
s$Id$s
$Revision$s$Date$s-Copyright (c) 2005-2008 Sun Microsystems Inc.tLGPLiN(tBrailleGenerator(tSpeechGenerator(t
Formatting(tGeckoBookmarks(tGeckoStructuralNavigation(t_(tPausetScriptcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0dd/Z2d0Z3d1Z4d2Z5dd3d4Z6dd3d5Z7d6Z8d7Z9d8Z:d9Z;dd:Z<d;Z=dd<Z>dd=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFddEZGdFZHdGZIdHZJdIZKdJZLdKdLZMdMZNdNZOdOZPdPZQdQZRdRZSdSZTdTZUdUZVdVZWdWZXdXZYdYZZdZZ[d[Z\d\Z]d]Z^dd^Z_d_Z`d`ZadaZbdbZcdcZdddZedeZfegdfZhdgZiddhegdiZjddhegdjZkdkZldlZmdmZndnZoddhdoZpddpZqdqZresdrZtdsZuegdtZvduZwddvZxdwZydxZzdyZ{egdzZ|d{Z}egd|Z~d}Zd~ZdZdZdZdZdZdZdZegdZegdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(sThe script for Firefox.cCstii||d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_tititititititititititig|_titititi g|_!t"i#ot$i%t$i&dnt$i%t$i&dt'|_(d|_)h|_*t'|_+d|_,t'|_-t.i/||_0d|_1d|_2d|_3h|_4h|_5d|_6d|_7d|_8d|_9hdd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6|_:d|_;d|_<d|_=d|_>dd*g|_?t'|_@dS(+NsOrca is controlling the caret.sGecko is controlling the caret.gsbackground-color:; color:; font-family:; font-size:; font-style:normal; font-weight:400; language:none; text-line-through-style:; text-align:start; text-indent:0px; text-underline-style:; text-position:baseline; invalid:none; writing-mode:lr;sfont-size:; font-family:; font-weight:400; text-indent:0px; text-underline-style:none; text-align:start; text-line-through-style:none; font-style:normal; invalid:none;tweightsfont-weightsfamily-namesfont-familytstyles
font-stylet
justifications
text-aligntindentstext-indenttsizes	font-sizesbg-colorsbackground-colorsfg-colortcolort
strikethroughstext-line-through-stylet	underlinestext-underline-stylesvertical-aligns
text-positiont	directionswriting-modetlefts	-moz-lefttrights
-moz-righttcenters-moz-centersno justificationtstarttsingletunderlinesolidtsolidsline-throughsolidi(AtdefaultRt__init__tNonetarrowToLineBeginningCheckButtontchangedLinesOnlyCheckButtont!controlCaretNavigationCheckButtontminimumFindLengthAdjustmenttminimumFindLengthLabeltminimumFindLengthSpinButtontsayAllOnLoadCheckButtontskipBlankCellsCheckButtontspeakCellCoordinatesCheckButtontspeakCellHeadersCheckButtontspeakCellSpanCheckButtont!speakResultsDuringFindCheckButtontstructuralNavigationCheckButtontgoNextCharactertgoPreviousCharactert
goNextWordtgoPreviousWordt
goNextLinetgoPreviousLinetexpandComboBoxtgoTopOfFiletgoBottomOfFiletgoBeginningOfLinetgoEndOfLinet_caretNavigationFunctionstsetLivePolitenessOfftadvanceLivePolitenesstmonitorLiveRegionstreviewLiveAnnouncementt_liveRegionFunctionstscript_settingstcontrolCaretNavigationtdebugtprintlntLEVEL_CONFIGURATIONtFalset_loadingDocumentContentt_loadingDocumentTimet_documentFrameCaretContexttmadeFindAnnouncementt_objectForFocusGrabt_autocompleteVisibletliveregionstLiveRegionManagertliveMngrt_previousLineContentstcurrentLineContentst_nextLineContentst_guessedLabelst
_currentAttrst
_currentFrametallTextAttributestenabledBrailledTextAttributestenabledSpokenTextAttributestattributeNamesDictt"savedEnabledBrailledTextAttributest savedEnabledSpokenTextAttributestsavedAllTextAttributestlastMouseOverObjecttpreMouseOverContexttinMouseOverObject(tselftapp((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRZs													
															
				cCsLti|_|it_ti|_|it_ti|_|it_dS(s%Called when this script is activated.N(tsettingsRPRSRQRTRORU(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytactivatescCs(|it_|it_|it_dS(s'Called when this script is deactivated.N(RSR[RPRTRQRURO(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt
deactivate#scCs8y|iSWn&tj
ot||_|iSXdS(s7Returns the "bookmarks" class for this script.
        N(t	bookmarkstAttributeErrorR(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetBookmarks+s
cCs
t|S(s7Returns the braille generator for this script.
        (R(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetBrailleGenerator4scCs
t|S(s6Returns the speech generator for this script.
        (R(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetSpeechGenerator9scCs
t|S(s/Returns the formatting strings for this script.(R(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt
getFormatting>scCs|tititititititititi	ti
tititi
titititititig}|S(saReturns a list of the structural navigation object types
        enabled in this script.
        (RtANCHORt
BLOCKQUOTEtBUTTONt	CHECK_BOXtCHUNKt	COMBO_BOXtENTRYt
FORM_FIELDtHEADINGtLANDMARKtLISTt	LIST_ITEMtLIVE_REGIONt	PARAGRAPHtRADIO_BUTTONtTABLEt
TABLE_CELLtUNVISITED_LINKtVISITED_LINK(RYtenabledTypes((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt#getEnabledStructuralNavigationTypesBs(cCs%|i}ti}t|||S(sCReturns the 'structural navigation' class for this script.
        (RxR:tstructuralNavigationEnabledR(RYttypestenable((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetStructuralNavigation]s	cCs8tii||ii|iititid|id<titi	t
d|id<titit
d|id<titit
d|id<titi
t
d	|id
<titit
d|id<titit
d
|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id<titit
d|id <titit
d!|id"<titit
d#|id$<titit
d%|id&<titit
d'|id(<titit
d)t|id*<titit
d+t|id,<titi t
d-|id.<d/S(0suDefines InputEventHandler fields for this script that can be
        called by the key and braille bindings.
        s!Dumps document content to stdout.tdumpContentsHandlersGoes to next character.tgoNextCharacterHandlersGoes to previous character.tgoPreviousCharacterHandlersGoes to next word.tgoNextWordHandlersGoes to previous word.tgoPreviousWordHandlersGoes to next line.tgoNextLineHandlersGoes to previous line.tgoPreviousLineHandlersGoes to the top of the file.tgoTopOfFileHandlersGoes to the bottom of the file.tgoBottomOfFileHandlers"Goes to the beginning of the line.tgoBeginningOfLineHandlersGoes to the end of the line.tgoEndOfLineHandlers,Causes the current combo box to be expanded.texpandComboBoxHandlers'Advance live region politeness setting.R6s0Set default live region politeness level to off.R5sMonitor live regions.R7s Review live region announcement.R8sGoes to the previous object.tgoPreviousObjectInOrderHandlersGoes to the next object.tgoNextObjectInOrderHandlers8Switches between Gecko native and Orca caret navigation.ttoggleCaretNavigationHandlersSpeaks entire document.t
sayAllHandlers%Pans the braille display to the left.tpanBrailleLeftHandlers&Pans the braille display to the right.tpanBrailleRightHandlers6Moves focus into and away from the current mouse over.tmoveToMouseOverHandlerN(!RRtsetupInputEventHandlerstinputEventHandlerstupdatetstructuralNavigationtinput_eventtInputEventHandlertdumpContentsR)RR*R+R,R-R.R0R1R2R3R/R6R5R7R8tgoPreviousObjectInOrdertgoNextObjectInOrderttoggleCaretNavigationtsayAlltpanBrailleLeftR?tpanBrailleRighttmoveToMouseOver(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRds	
	
	
		cCstii|}|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.
        sdocument:reloadsdocument:load-completesdocument:load-stoppedsobject:state-changed:showingsobject:state-changed:checkeds"object:state-changed:indeterminatesobject:state-changed:busysobject:children-changedsobject:text-changed:insertsobject:state-changed:focuseds'object:property-change:accessible_value(RRtgetListenerstonDocumentReloadtonDocumentLoadCompletetonDocumentLoadStoppedtonStateChangedtonChildrenChangedtonTextInsertedtonStateFocusedtonValueChanged(RYt	listeners((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR@s










cCsti}|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itidtiti|id|itid	titi|id
|itid	titi	|id|itidtiti|id
|itidtiti|id|itidtiti|id|itidtiti|id|S(stReturns an instance of keybindings.KeyBindings that use the
        arrow keys for navigating HTML content.
        tRightR~tLeftRRRtUpRtDownRRtHomeRtEndRRR(
tkeybindingstKeyBindingstaddt
KeyBindingR[tdefaultModifierMasktNO_MODIFIER_MASKRtCTRL_MODIFIER_MASKtALT_MODIFIER_MASK(RYtkeyBindings((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt__getArrowBindingscsc	Cstii|}ddddddddd	g	}x:|D]2}|iti|titi|i	d
q:W|itidtiti
|i	d|itidtiti|i	d
|itidtiti|i	d|itidtiti|i	d|itidtiti|i	d|itidtiti|i	d|itidtiti|i	dt
iit
iijo0|itidtiti|i	dn-|itidtiti|i	dtio+x(|iiD]}|i|q3Wn|ii}x|iD]}|i|qdW|S(skDefines the key bindings for this script.

        Returns an instance of keybindings.KeyBindings.
        tF1tF2tF3tF4tF5tF6tF7tF8tF9R8t	backslashR5R7R6tF12RtSunF37RRRRtKP_MultiplyRt0(RRtgetKeyBindingsRRRR[RtORCA_MODIFIER_MASKRtSHIFT_MODIFIER_MASKtORCA_SHIFT_MODIFIER_MASKRtorcatkeyboardLayouttGENERAL_KEYBOARD_LAYOUT_DESKTOPR:R;t_Script__getArrowBindingsRR(RYRtmessageKeyst
messageKeyt
keyBindingtbindings((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs!	

cCstitd}|idtii|ti}tii|tii||ttdti	dddd}tii|ti
i||ti	i|ddddtitd}tii|ti
i||t
d}ti||_tii|itii||ittdtii|itit
d}ti||_tii|itii||ittdtii|i|iit
d}ti||_tii|itii||ittdtii|itit
d	}ti||_tii|itii||ittdtii|ititid
t
d}tii|tii||tii|tti}tii|tii||ttdti	dddd}tii|ti
i||ti	i|ddddtitd}	tii|	ti
i||	t
d}ti||_tii|itii|	|ittdtii|it i!t
d
}ti||_"tii|i"tii|	|i"ttdtii|i"t i#t
d}ti||_$tii|i$tii|	|i$ttdtii|i$t i%t
d}ti||_&tii|i&tii|	|i&ttdtii|i&t i'tid
t
d}
tii|
tii||
tii|
tti}tii|tii||ttdti	dddd}tii|ti
i||ti	i|ddddtitd}
tii|
ti
i||
t
d}ti||_(tii|i(tii|
|i(ttdtii|i(ti)t
d}ti||_*tii|i*tii|
|i*ttdtii|i*ti+ti,td}tii|tii|
|ttdtit
d|_-|i-i.ddtii|i-tii||i-ttdti/ti0ddd|_1ti2|i1dd|_3tii|i3tii||i3ttdg}|i-i4}|i5}|i3i4}|i6|t7i8|d}|i9dt7i:|i|tid
t
d}tii|tii||tii|t|S(suReturn a GtkVBox contain the application unique configuration
        GUI items for the current application.
        iiig?isUse _Orca Caret NavigationsUse Orca _Structural Navigations<_Position cursor at start of line when navigating verticallys<Automatically start speaking a page when it is first _loadeds	<b>%s</b>sPage NavigationsSpeak _cell coordinatessSpeak _multiple cell spanssAnnounce cell _headersSkip _blank cellssTable NavigationsSpeak results during _finds%Onl_y speak changed lines during findsMinimum length of matched text:igs
relation-typesFind Options(;tgtktVBoxR?tset_border_widthtWidgettshowtFrametBoxt
pack_startt	Alignmentt	ContainerRtset_paddingRtCheckButtonRtToggleButtont
set_activeR:R;R(RtenabledRtarrowToLineBeginningR"tsayAllOnLoadtLabeltset_label_widgettset_use_markuptTrueR$R[tspeakCellCoordinatesR&t
speakCellSpanR%tspeakCellHeadersR#tskipBlankCellsR'tspeakResultsDuringFindRtonlySpeakChangedLinesDuringFindtHBoxR t
set_alignmentt
AdjustmenttminimumFindLengthRt
SpinButtonR!tget_accessibletref_relation_settappendtatktRelationtset_propertytRELATION_LABEL_FOR(RYtvboxtgeneralFrametgeneralAlignmenttgeneralVBoxtlabeltgeneralLabelt
tableFramettableAlignmentt	tableVBoxt
tableLabelt	findFramet
findAlignmenttfindVBoxthboxtacc_targetstacc_srctrelation_settacc_targtrelationt	findLabel((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetAppPreferencesGUIs
	



	


















cCs|idd}|ii}|id||f|t_|ii}|id||f|t_|ii}|id||f|t_|i	i}|id||f|t_
|ii}|id||f|t_|i
i}|id||f|t_|ii}|id	||f|t_|ii}|id
||t_|ii}|id||t_|ii}|id||t_|ii}|id
||t_dS(sWrite out the application specific preferences lines and set the
        new values.

        Arguments:
        - prefs: file handle for application preferences.
        s
s+orca.scripts.toolkits.Gecko.script_settingss%s.controlCaretNavigation = %s
s$%s.structuralNavigationEnabled = %s
s%s.arrowToLineBeginning = %s
s%s.sayAllOnLoad = %s
s%s.speakResultsDuringFind = %s
s(%s.onlySpeakChangedLinesDuringFind = %s
s%s.minimumFindLength = %s
s(orca.settings.speakCellCoordinates = %s
s!orca.settings.speakCellSpan = %s
s$orca.settings.speakCellHeaders = %s
s"orca.settings.skipBlankCells = %s
N(t
writelinesRt
get_activeR:R;R(RyRRR"RR'RRRR!t	get_valueRR$R[RR&RR%RR#R(RYtprefstprefixtvalue((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytsetAppPreferencessJ
													cCstii||igS(sReturns an object that can be passed to setAppState.  This
        object will be use by setAppState to restore any state information
        that was being maintained by the script.(RRtgetAppStateRB(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRDscCsDy&|\}|_tii||WntitinXdS(sSets the application state using the given appState object.

        Arguments:
        - appState: an object obtained from getAppState
        N(RBRRtsetAppStateR<tprintExceptiont
LEVEL_WARNING(RYtappStatetdefaultAppState((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRKs
cCsjd}ti}|i|jo||i}nd|jo|d}nt}|o|i|}|o!|i|ijo|i|S|o4|i|i	i
jp|i|ijo|iS|dj}n|p|i
i|}|o!|i|ijo|i|S|o4|i|i	i
jp|i|ijo|iS|dj}n|S(sCalled when a key is pressed on the keyboard.

        Arguments:
        - keyboardEvent: an instance of input_event.KeyboardEvent

        Returns True if the event is of interest.
        RN(RR[tkeyBindingsMapt
__module__R?tgetInputHandlertfunctionR4tuseCaretNavigationModelRt	functionsR9tuseStructuralNavigationModelR(RYt
keyboardEventt
user_bindingstuser_bindings_maptconsumesthandler((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytconsumesKeyboardEventXs4	
c	cstitij}|i\}}|o|i|}|o|i|ti\}}}d}|ioldddg}	xL|	D]D}
y4|i	|
d||}||jo
|}nWqqXqW||}q|i
||\}}qnt}xv|pn|o|i||}
n|i
||}
|i|
}|i|}xtt|D]}|
t|t|
d\}}}}||\}}t|to|i|}nt|toqnnti|||||gVqnW|
dd}td|
ddd}|o|i
||\}}n|i||\}}|dj}qWdS(	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.
        is. s? s! iiiN(R[tsayAllStyletSAYALL_STYLE_SENTENCEtgetCaretContexttqueryNonEmptyTexttgetTextAtOffsettpyatspitTEXT_BOUNDARY_LINE_STARTtstriptrindextfindNextCaretInOrderR?tgetObjectContentsAtOffsettgetLineContentsAtOffsettgetUtterancesFromContentstclumpUtterancestxrangetlentmint
isinstancet
basestringtadjustForRepeatsRtspeechservert
SayAllContexttmaxtfindNextLineR(RYtobjtsayAllBySentencetcharacterOffsetttexttlinetstartOffsett	endOffsettbeginAttterminatorst
terminatortindextdonetcontentst
utterancestclumpedtitelementtvoice((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt	textLiness^	
	

 )	cCs|tiijo|idjoq|iitititi	gjoI|ii
itijo-|iii
}|i|i|dqn|tiijoay|i|i|iWn0|iii
}|i|i|dnX|i|inu|tiijoay|i|i|iWn0|iii
}|i|i|dnX|i|indS(Nii(R<R=tPROGRESSt
currentOffsetR@tgetRoleR-tROLE_HEADINGtROLE_SECTIONtROLE_PARAGRAPHtparentt	ROLE_LINKt	queryTexttcharacterCounttsetCaretPositiontINTERRUPTEDt
updateBraillet	COMPLETED(RYtcontexttcallbackTypeR\((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt__sayAllProgressCallbacks,c
Cslt}|i|}|oS|ioF|id\}}t||}||tijo
t}qon|i\}}|i	|||oti
o|i||d|}	|i||d|}
|i|	|
}|i
||o!||jo|o
t|_n|p|iptio,|i||}|i|t|_qhndS(s2Updates the caret context to the match indicated by obj and
        offset.  Then presents the results according to the user's
        preferences.

        Arguments:
        -obj: The accessible object within the document
        -offset: The offset with obj where the caret should be positioned
        iiN(R?R+tgetNSelectionstgetSelectionR>R:RRR*tsetCaretContextRt
getExtentst
onSameLinetisSameObjectRCRR3t
speakContents(
RYR@toffsettenoughSelectedRCRtendtorigObjt
origOffsettorigExtentst
newExtentstlineChangedRD((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytpresentFindResultss*
 

cCsD|iptii||Sti|iti|it	S(sSpeaks the contents of the document beginning with the present
        location.  Overridden in this script because the sayAll could have
        been started on an object without text (such as an image).
        (
tinDocumentContentRRRtspeechRRt
orca_statetlocusOfFocust_Script__sayAllProgressCallbackR(RYt
inputEvent((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR.s


cCstii||}|o|iitip|ititi	gjoX|i
}|o@|iitio'|i|}|p
|i
}qqn|S(s,Returns 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.  Overridden in this script because we have lots
        of whitespace we need to remove.
        (RRtgetDisplayedTexttgetStatetcontainsR-tSTATE_EDITABLERUt
ROLE_ENTRYtROLE_PASSWORD_TEXTR/t
STATE_FOCUSEDtgetDisplayedLabeltname(RYR@t
displayedTextR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRz=scCsd}|i|}x|D]}t}|ioM|ititigjo.|io |di|ij}qn|p6|i	|}|o|i
||i}qqqW|S(sIf there is an object labelling the given object, return the
        text being displayed for the object labelling this object.
        Otherwise, return None.  Overridden here to handle instances
        of bogus labels and form fields where a lack of labels necessitates
        our attempt to guess the text that is functioning as a label.

        Argument:
        - obj: the object in question

        Returns the string of the object labelling this object, or None
        if there is nothing of interest here.
        iN(RtfindDisplayedLabelR?RtRUR-tROLE_COMBO_BOXt	ROLE_LISTt
childCountt
expandEOCstappendStringR/(RYR@tstringtlabelsRtbogust
expandedLabel((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRZs

$$c
Cs-|ii}|ii}|i|i}y"tii}tii}Wn%d}ti}|i	}nXt
}|i\}}	td|	|i
jo|i||iodSttitiotii}
|itio|tijo|i|itiodS|tijodS|tijoQy%|iti}ti|}WnqX|o|dodSt}qs|tijodSqw|i|iptiodSqw|i tio!|i|itii!odS|oZ|ioLtioB|i"o|i#|i|i
n|i$|i|i
dSn|o|i |io|iitijo"|i%|i|i
\}}	n|i|i
}}	|i$||	t&i'||d||odSnt(i)i*||dS(sCaret movement in Gecko is somewhat unreliable and
        unpredictable, but we need to handle it.  When we detect caret
        movement, we make sure we update our own notion of the caret
        position: our caretContext is an [obj, characterOffset] that
        points to our current item and character (if applicable) of
        interest.  If our current item doesn't implement the
        accessible text specialization, the characterOffset value
        is meaningless (and typically -1).iNitnotifyPresentationManager(+tsourceRUR{RtRvRwRR-tStateSettrawR?R*R>tdetail1RiR9tlastInputEventRt
KeyboardEventtlastNonModifierKeyEventtevent_stringRR~t
ROLE_IMAGERZtgetURIturlparseRRWtisNavigableAriaR:R;tisAriaWidgetRYt
inFindToolbarRsRftfindFirstCaretContextRtsetLocusOfFocusRRtonCaretMoved(
RYteventteventSourceRoleteventSourceStateteventSourceInDocumenttlocusOfFocusRoletlocusOfFocusStatetnotifyPresentationManagersR@RBRturituriInfo((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRsv
	
	
	

	"	cCs|i|iiitipqh|_|ioZ|i}xN|oB||i	jo2|i
|i|o|iPn|i	}qEWqnti
i||dS(sbCalled whenever text is from an an object.

        Arguments:
        - event: the Event
        N(t_destroyLineCacheRR{R|R-R}RLRXRVRYRitrestorePreMouseOverContextRRt
onTextDeleted(RYRR@((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs
	
	
cCso|i|iiitip
h|_n|i|o|ii	|dSt
ii||dS(shCalled whenever text is inserted into an object.

        Arguments:
        - event: the Event
        N(
RRR{R|R-R}RLthandleAsLiveRegionRHthandleEventRRR(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR*s

cCs(tdtdtdtdgS(Ns'line selected down from cursor positions)line unselected down from cursor positions%line selected up from cursor positions'line unselected up from cursor position(R(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt_getCtrlShiftSelectionsStrings?s			cCsC|itio|i|iodStii||dS(sgCalled when an object's text selection changes.

        Arguments:
        - event: the Event
        N(RtRvRwRRRtonTextSelectionChanged(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRKscCsh|_|idjodS|iodti|ijo
djno{|iidohg}|itd|i	|i
i|idtt
i||i|_|i|_dS|i|o|ii|dS|iido|iitijo|iititigjocg}|iti|ititijo |i	|i
i|int
i|ndS(sCalled when a child node has changed.  In particular, we are looking
        for addition events often associated with Javascipt insertion.  One such
        such example would be the programmatic insertion of a tooltip or alert
        dialog.Niisobject:children-changed:addsNew item has been addedtforce( RLtany_dataRtlastMouseRoutingTimettimettypet
startswithRRtextendtspeechGeneratortgenerateSpeechRRutspeakRVR*RWRRHRRUR-t
ROLE_ALERTRtROLE_SCROLL_PANEt
ROLE_FRAMEt	rolenamestgetSpeechForRoleNameR[tspeechVerbosityLeveltVERBOSITY_LEVEL_VERBOSE(RYRRM((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRXs:		
+


cCs*|iitijo
t|_ndS(s4Called when the reload button is hit for a web page.N(RRUR-tROLE_DOCUMENT_FRAMERR@(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRscCsF|iitijo)|iit|_ti|_	ndS(s)Called when a web page load is completed.N(
RRUR-RRHtresetR?R@RRA(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs
	cCs9|iitijot|_ti|_ndS(s+Called when a web page load is interrupted.N(RRUR-RR?R@RRA(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs	cCs.|iitijo|iindS(shCalled whenever a property on an object changes.

        Arguments:
        - event: the Event
        N(RRUR-RRHt
flushMessages(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt
onNameChangedsc	Csy|ii}WndSX|titigjodS|i|i|io1|i\}}|i|i|pdSnd|_|ti	jon|i
}|o|i|ijodS|it
iti	gtig}|i||iodSn|tijo~yp|i\}}|i}|itip;|itip|ioti||ndSWqqXn|tijo|i|io|i|io|i|id\}}|i|||i|i|p|i|t
ipgti||dt|tijo-ti|ii |i|i!|q|i"||ndSnt#i$i%||dS(s]Called whenever an object gets focus.

        Arguments:
        - event: the Event
        NiR(&RRUR-RtROLE_AUTOCOMPLETERiRDR*Rt
ROLE_PANELtgetDocumentFrameRYtgetAncestorRvRwRR{R|RtSTATE_FOCUSABLERtRRRZRRRfR?RRuRRRR_tpresentLineRRtonFocus(RYRRR@RBt
documentFrametcontainingPaneltstate((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs`			
			
	cCs|i|i}|ii}|i|i|i}|djoE|i|}|i|i|i}t	i
||iti
n^|o0|idd}t	i
||iti
n't	i
ti|i|iti
|i|idS(s!Called when a link gets selected.  Note that in Firefox 3,
        link selected events are not issued when a link is selected.
        Instead, a focus: event is issued.  This is 'old' code left
        over from Yelp and Firefox 2.

        Arguments:
        - event: the Event
        iiN(R+RtqueryHypertexttgetLinkIndextcaretOffsettgetLinktgetTextt
startIndextendIndexRuRtvoicesR[tHYPERLINK_VOICERRR_(RYRRCt	hypertextt	linkIndextlinktlinkText((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytonLinkSelecteds

	c	Cs|iido|io|iitijof|idjoV|i|ioC|i|io/t	t
iti
oti||idS|iido|io|iitijot
iot
iititigjo|i|_|ioztitij}|o2t	t
itiot
i}|idj}n|o#titi|itiqqqn|iido.|io|iiti joh|_!t"}t
io2t
iitijo|it
iodS|iot#|_$t%d}n@|ii&o t%d|ii&}t#}nt%d	}t#}t'i(|ti||o4|i|_)|i*\}}t"}|p&|i+|i*\}}t#}n|pdS|oF|i,i-ti.o,|i+|i*\}}|pdSn|i/||i,i-ti.oti|i0i1|qt2i3p|i4|i5||qti6o|i7dqqndSt9i:i;||dS(
sbCalled whenever an object's state changes.

        Arguments:
        - event: the Event
        sobject:state-changed:checkediNsobject:state-changed:showingRsobject:state-changed:busysLoading.  Please wait.sFinished loading %s.sFinished loading.(<RRRRUR-tROLE_RADIO_BUTTONRRtRR9RvRRtMouseButtonEventRtvisualAppearanceChangedtROLE_WINDOWRwR~tROLE_LIST_ITEMRER[RRRRRRuRRRRRRLR?RR@RRtbrailletdisplayMessageRNR*tclearCaretContextR{R|RR_RRR:RRjR3tenableSpeechRRRRR(	RYRtspeakIttkeyEventtfinishedLoadingtmessageR@RBtatTop((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR?s

	


	
	#
	


	






	

	
cCs@tii|||iitijo|io|i}|i|i	}|i
dd}|ip!||ijp|i
dodS||_ti|ititid|ititiif|i\}}|p&|i\}}|i||n|pdS|i||ndS(Nttagttbrowsers%s %s(RRRRRUR-RRt_getAttrDictionaryRYtgetR@RNtendswithRRRRutstopRRt
ROLE_PAGE_TABR*R1RfR(RYRRtparent_attribst
parent_tagR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs0
	
	
cCs d|_tii||dS(siCalled whenever a toplevel window is deactivated.

        Arguments:
        - event: the Event
        N(RRDRRtonWindowDeactivated(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs	cCsRtitititig}|i|i|ptii	|||ndS(sDetermine whether this progress bar event should be spoken or not.
        For Firefox, we don't want to speak the small "page load" progress
        bar. All other Firefox progress bars get passed onto the parent
        class for handling.

        Arguments:
        - event: if not None, the Event that caused this to happen
        - obj:  the Accessible progress bar object.
        N(
R-tROLE_PROGRESS_BARtROLE_STATUS_BARRtROLE_APPLICATIONtisDesiredFocusedItemRRRthandleProgressBarUpdate(RYRR@t	rolesList((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR	scCsc|itijo3|iitioti||dtnt	i
i|||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.
        RN(RUR-tROLE_CHECK_BOXR{R|RRRR?RRR(RYRR@((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs

c
Csn|i||odS|io|in|o|i|o|i|}|o|i}|o|i|op|i|}|i|}|i||p|iti	jo%|i
|||i||dSqnd}|i||\}}	|i
||	n
h|_|o|i|o
t|_n|i}
|
o|
iiti|_|iog|o`|ioVti	tig}|ii|jp|i|i|tig}|pdSqn|oV|itijo@|io|in|i|titi |dSt!i"i#||||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
        Ni($RitflatReviewContextttoggleFlatReviewModeRtR+RtgetFrameRUR-tROLE_DIALOGR]RRRfRLRR?RCRR{R|t
STATE_BUSYR@RRRRtROLE_HTML_CONTAINERR_RuRRRRRtlocusOfFocusChanged(
RYRtoldLocusOfFocustnewLocusOfFocusRCRtoldFrametnewFrameR@RBRtdialogRolestinDialog((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR/sZ

		

	



c
Cs|p|pt|odSd}x|D]}|\}}}}	|ititigjoS|iitio:|i||o&|i	|}|d}|i
}n|i||o2||jo
|jno|i|}Pq0q0W|S(sTDetermines if the item described by the object and offset is
        in the line contents.

        Arguments:
        - obj: the Accessible
        - offset: the character offset within obj
        - contents: a list of (obj, startOffset, endOffset, string) tuples

        Returns the index of the item if found; -1 if not found.
        ii(R7RUR-RRR{R|RRitgetCharacterOffsetInParentRYRJ(
RYR@RkRLRJtcontentt	candidateRRmR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytfindObjectOnLines$	

	cCs|i|||i}|djo|i|||i}|djo%|i|_|i|_d|_q|i|||i}|djo%|i|_|i|_d|_q|indS(sTries to intelligently update our stored lines. Destroying them if
        need be.

        Arguments:
        - obj: the Accessible
        - offset: the character offset within obj
        iN(R
RJRIRKRR(RYR@RkRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt_updateLineCaches"	
	

	

cCs(d|_d|_d|_h|_dS(s Removes all of the stored lines.N(RRIRJRKRM(RY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs			cCs|i}|i|||}|djo|i|||_nttitip|i|in|i	|dS(sPresents the current line in speech and in braille.

        Arguments:
        - obj: the Accessible at the caret
        - offset: the offset within obj
        iN(
RJR
R3R9RvRRtBrailleEventRjR_(RYR@RkRLRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs	
	c Csw|iptii|||dS|pdStiti}ti||i\}}t	}|}|i
|}|oD|i||d}	|	djotd|d}t
}qn|i|p.|i|p|id}}d}q
nt	}
|itijo
t
}
n|i}|i|td||}|djp|oF|i|td|}||_|i|td||}nt|pdSdd|ig}
d}xQt|D]C\}}||j}|\}}}}|pqn|
o|oqn|i}t|o|tijp|tititigjo-|ii |\}}|o
|}qnkti!|d|d|g}|ti"jo'|i#ti$dt%i&|n|o|d}n|t|dj}|ti'jo|p|i(o
|}n3|o%|i)|ti'gti*g}nd}|ol|i+|}t,d|}|i-dpd|}n|p|d7}n|i#ti$|nt|i.o|di/o|i.d	i/o|di/d|
jox|i.d	i/d	|
jo]||dd}|i.d	i0|di0jpO|i.d	i0ti1ti$gjp,|iti2jp|iti2jo|i3ti$dqti4ti5ti6g}||jo
|}n|i)||ti*g}|oo|i|ijo
|}n|i)||ti*g}|i7||p|i3ti$dqqn|i8||o'|i.d	i/i9d|i.d	_/n|iti:jo|i;i<ti=oPqqW|o|i3|nti>|d
t	ti?dt
d
t	dS(sUpdates the braille display to show the given object.

        Arguments:
        - obj: the Accessible
        - extra: extra Region to add to the end
        Nis
it RERFsh%ditgetLinkMasktpanToCursor(@RtRRR_RtcleartLinetaddLineR*R?R+RR>RRRRYRUR-tROLE_SLIDERRJR
R3R7tNO_BREAK_SPACE_CHARACTERRt	enumerateRXR~RRZtbrailleGeneratortgenerateBrailletTexttROLE_CAPTIONRtRegionRtgetBrailleForRoleNameRVRRRtgetHeadingLevelRRtregionsRt	__class__t	ComponentRt	addRegiontROLE_TABLE_CELLRWRRit
addRegionstrstriptROLE_MENU_ITEMR{R|RtsetFocustrefresh( RYR@textraRegionRDt
focusedObjtfocusedCharacterOffsett
needToRefreshtlineContentsOffsettfocusedObjTexttchartpresentOnlyFocusedObjRLRJt
whitespacet
focusedRegionRORtisFocusedObjRERFRtroleR tfRegiontisLastObjecttheadingtlevelt
headingStringtlastObjtlayoutRolestacc1tacc2((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR_s


	


						


	
			

	
	"
'	cCs|ip|itijotii||dS|i\}}|i|}|oV|i	dd}|t
|jo-|iiti
odGH|d8}qn|djo|i||ndS(s3Speaks the character at the current caret position.NiisYIKES in Gecko.sayCharacter!i(RtRUR-R~RRtsayCharacterR*R+RR7R{R|R}tspeakCharacterAtOffset(RYR@RBRCR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR?	s
c
Cs=|iptii||dS|i\}}|i|}|oV|idd}|t|jo-|ii	t
iodGH|d8}qn|i||}|d\}}}}	|i
|||it
ijo|i|n8|ii||}	ti|	g|i||	dS(s.Speaks the word at the current caret position.NiisYIKES in Gecko.sayWord!i(RtRRtsayWordR*R+RR7R{R|R-R}tgetWordContentsAtOffsettspeakMisspelledIndicatorRUR~RjR[RuRtgetACSS(
RYR@RBRCRtwordContentsttextObjRERFtword((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRA	s$
cCs|ip|itijotii||dS|i\}}|i|}|oV|i	dd}|t
|jo-|iiti
odGH|d8}qn|i|i||dS(s.Speaks the line at the current caret position.NiisYIKES in Gecko.sayLine!i(RtRUR-R~RRtsayLineR*R+RR7R{R|R}RjR3(RYR@RBRCR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRH
sicCs|ip,|itip|iptiotii	|||n0|i
|xtioq`Wtit
tS(sdIn document content, we want to use the panning keys to browse the
        entire document.
        (RRRvRwRtRtbeginningIsShowingRRRR.tpanRightR)R?R(RYRyt	panAmount((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR/
s



cCs|ip,|itip|iptiotii	|||n7|i
|o&xtioqcWtit
ntS(sdIn document content, we want to use the panning keys to browse the
        entire document.
        (RRRvRwRtRtendIsShowingRRRR-tpanLeftR)R?R(RYRyRK((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR?
s

cCs;|i|||\}}}}|i||||dS(s9Draws an outline around the given text for the object or the entire
        object if it has no text.  This is for debug purposes only.

        Arguments:
        -obj: the object
        -startOffset: character offset to start at
        -endOffset: character offset just after last character to end at
        N(RgtdrawOutline(RYR@RERFtxtytwidththeight((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytoutlineExtentsT
s	!cCs|io|i|indGH|i|}|o,|itijo|idd}nd}|G|iG|iG|ii	G|GH|i
|}|djo
dG|GHndS(s2Dumps the parental hierachy info of obj to stdout.s---iiRs
  offset =N(RYtdumpInfoR+RUR-RRRt
accessibletgetIndexInParentR
(RYR@RCRRk((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRT`
s

c
Csg}d}d}|i|i\}}xp|ohtp|iitio,|i|o|i	|||d}|djo?|o4|i
||o |idddg|}qnt|djp
||jo|i|||dgqz|d\}}}	||	jo|||	dg|d<qz|i|||dgn|i|ddg|}n|i
||\}}q1W|S(sReturns an ordered list where each element is composed of
        an [obj, startOffset, endOffset] tuple.  The list is created
        via an in-order traversal of the document contents starting at
        the current caret context (or the beginning of the document if
        there is no caret context).

        WARNING: THIS TRAVERSES A LARGE PART OF THE DOCUMENT AND IS
        INTENDED PRIMARILY FOR DEBUGGING PURPOSES ONLY.iiiN(iiii(RRR*RR{R|R-t
STATE_SHOWINGR+RgRhRR7R1(
RYRLR;tlastExtentsR@RBtcharacterExtentst
currentObjRERF((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetDocumentContentsr
sD

 
	 	
	
	c	Csd}d}d}|i\}}x|o~|o[|iitioB|i|||d}|o||jo|itijo|d7}n|iti	jo|d7}qj|d|djo|d7}qj|iti
joF|i}|i|}|i
i|djo|d7}qfqj|iti	jo|d7}qjn||i||7}|}|}n|i||\}}q'W|o$|iti	jo|d7}n|S(	sWTrivial debug utility to stringify the document contents
        showing on the screen.Ris
t>iRt<N(RR*R{R|R-RWRgRURRZR$RYtgetCellIndext
queryTabletgetColumnAtIndextgetCharacterAtOffsetR1(	RYRLR;tlastCharacterExtentsR@RBRYRYRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetDocumentString
s> 	
	c
Cs
|p|i}nd}d
}x|D]}|\}}}|o|i|i||||}|i|}	|	o*|d|i|	i||f7}q|d|i|if7}q*|d7}q*WdGH|GH|i|d|d|d|d	d
S(sDumps the document frame content to stdout.

        Arguments:
        -inputEvent: the input event that caused this to be called
        -contents: an ordered list of [obj, startOffset, endOffset] tuples
        Rs[%s] text='%s' s[%s] name='%s' s	
NEWLINE
s===========================iiiiN(	R[RtgetBoundaryRgR+RURRRN(
RYRyRLRtextentsRR@RERFRC((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR
s*		!cCs-y|i}WnnX|io|SdS(sGet the text interface associated with an object, if it is
        non-empty.

        Arguments:
        - obj: an accessible object
        N(R[R\R(RYR@RC((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR+
s
cCsS|p
ti}n|o4|itijo|iitijotStS(syReturns True if the given object is in the Find toolbar.

        Arguments:
        - obj: an accessible object
        (	RvRwRUR-R~RYt
ROLE_TOOL_BARRR?(RYR@((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR
s
cCs|p
ti}ny|id|SWn+|iidph|id<qUnXt}xL|oD|i}|tijp|tijot	}Pq^|i
}q^W||id|<|id|S(svReturns True if the given object (defaults to the current
        locus of focus is in the document content).
        Rt(RvRwtgeneratorCachethas_keyR?RUR-Rt
ROLE_EMBEDDEDRRY(RYR@tresultR5((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRts$
cCsd}x|iD]}|itijon|i}x_|D]S}|itijo7|id}|i	i
tioPqd}q?q?WqqW|p(|it
itigtig}n|S(s>Returns the document frame that holds the content being shown.iN(RRZRUR-RtgetRelationSettgetRelationTypetRELATION_EMBEDSt	getTargetR{R|RWRRvRwR(RYRtchildtrelationSetR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR1s&
	

	cCsGy|iiid}WndSXy|idSWndSXdS(sjReturn the URI for a given link object.

        Arguments:
        - obj: the Accessible object.
        iN(RYRRRR(RYR@t
ihyperlink((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRQscCst|i}|o]|iitip@|ii}x+|D]}|ido	|dSqEWqpndS(s5Returns the URI of the document frame that is active.tDocURLiN(	RR{R|R-t
STATE_DEFUNCTt
queryDocumentt
getAttributesRR(RYRtattrstattr((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetDocumentFrameURIfscCs?|i|}|o|iddid}nd}|S(sReturns the unicode text for an object or None if the object
        doesn't implement the accessible text specialization.
        iisUTF-8N(R+RtdecodeR(RYR@RCtunicodeText((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetUnicodeTextts
cCstiptS|iptS|itiptS|id
jotS|iotSt	}ti}|o1|i
tijo|i
}|i}|i}|iiti}t|}|idjotS|djp&|djo#|idddjo
t	}nV|djo|idj}n6|||jo|io|idj}nt}|o&|o|io|idj}qnE|iti@o|idjor|i\}}	|i||	}
|
djo||
i
tij}n|p|i
tij}q7qn|o)|i
tijo|idj}n~|o<|i
titigjo|iiti}n;|o3|i
tijo|iiti }n|S(s?Returns True if we should do our own caret navigation.
        tPage_Upt	Page_DownRRiiis
RRRR(R|R}(sHomesEnd(sUpsLeft(sDownsRight(sUpsDown(sLeftsRight(!R:R;R?RtRRvRwRR@RRUR-R~R[R\RR{R|tSTATE_SINGLE_LINEtintRREt	modifiersR[RR*t
getChildIndexRR'RRRR(RYR"t
weHandleItR@RCtlengthRt
singleLinetnewLineAdjustmentRkRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRsf


			

&




!cCsltititig}tititig}|iipt	S|i
tipt	S|i
ot	Sttitio)tii}|ti@}|otSnti}x|o|itijo|iitiS|i|jo|iitiS|i|jo|iitiS|itijot	S|i}qWt	S(sReturns True if we should do our own structural navigation.
        This should return False if we're in something like an entry
        or a list.
        (R-R~t	ROLE_TEXTRRRR'RRR?RRvRwR@R9RRRRR[RRRURR{R|R}RRRY(RYtletThemDoItEditableRolestletThemDoItSelectionRolestmodst	isOrcaKeyR@((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR!s<


		c
CsI|o|iitiotS|i|}|o.|i|o|i|i|inyddk	}|i
|dii|i
t
iotSd|jotS|itititititigjo |iititigjS|iitiSWnttfj
otSXdS(sReturns True if the object being examined is an ARIA widget where
           we want to provide Orca keyboard navigation.  Returning False
           indicates that we want Firefox to handle key commands.
        iNs	xml-rolesscontainer-live(R{R|R-RWRRRRRYtsetstSettsplittintersectionR[t
ariaLandmarksRUR~RZRRXRWRRRtKeyErrort	TypeError(RYR@RvR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs,
!
cCsy|id|SWn+|iidph|id<qAnX|pti}|i|}d|jo
d|j|id|<|id|S(sReturns True if the object being examined is an ARIA widget.

        Arguments:
        - obj: The accessible object of interest.  If None, the
        locusOfFocus is examined.
        tisArias	xml-rolestlive(RgRhRvRwR(RYR@Rv((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRGs$cCsC|phStg}|iD]}||iddq ~S(Nt:i(tdictRuR(RYR@t_[1]Rw((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRYscCs|iptiotS|iido9|iido|ii}|i	t
ip|i	t
iotS|i
|i}d|jotSd|jo|ddjotSd|joP|di}d|jod|jotSd|jotiotSqbq|i
|i}d|jod|dijotStSnk|iid	o|ii}|i	t
ip'|i	t
ip|i	t
iotS|i
|i}d|jotSd|jo|dd
jp|ddjotSd|jotSn|iido|ii}|i	t
ip'|i	t
ip|i	t
iotS|i
|i}d|jp|iit
ijStSti|id
jotStSdS(sReturns True if the given event (object:children-changed, object:
        text-insert only) should be considered a live region eventsobject:children-changeds:systemscontainer-liveRsxul:richlistboxs	xml-rolestalertttooltips!object:text-changed:insert:systemsxul:descriptions	xul:labelsobject:text-changed:insertg@N(R@R[tinferLiveRegionsR?RRRRR{R|R-tSTATE_SELECTABLEt
STATE_VISIBLERRRtpresentToolTipsRRRURRRA(RYRtstatesetRvtattrList((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR_sl









		
cCs?y|i}Wntj
o
d}nX|i|}|S(sGiven an object that implements accessible text, determine
        the index of the child that is represented by an
        EMBEDDED_OBJECT_CHARACTER at characterOffset in the object's
        accessible text.i(RtNotImplementedErrorR(RYR@RBRRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRscCs|pddddgS|i|}|o/|itijo|i||d}n|itijoS|iitijo:|iii	d}|i
|i|i|i
g}n4|ii	d}|i
|i|i|i
g}|S(sReturns [x, y, width, height] of the text at the given offsets
        if the object implements accessible text, or just the extents of
        the object if it doesn't implement accessible text.
        i(R+RUR-R'tgetRangeExtentst	ROLE_MENURYRtqueryComponentRgRORPRQRR(RYR@RERFRCRetext((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRgs	"cCs|p|S|p|St|d|d}t|d|d}t|d|d|d|d}t|d|d|d|d}||||||gS(sReturns the smallest [x, y, width, height] that encompasses
        both extents a and b.

        Arguments:
        -a: [x, y, width, height]
        -b: [x, y, width, height]
        iiii(R8R>(RYtatbt
smallestX1t
smallestY1t	largestX2t	largestY2((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRds''icCs||jotSt|d|ddjotSt|d|d|d|d}t|d|d}||djotStS(sDetermine if extents a and b are on the same line.

        Arguments:
        -a: [x, y, width, height]
        -b: [x, y, width, height]

        Returns True if a and b are on the same line.
        iii(RtabsR?R8R>(RYRRt
pixelDeltat
highestBottomt	lowestTop((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRh

s
'cCs|itijodS|i}|pdSx~|D]v}|itijoZxWtd|iD]<}|i	|}x$|D]}|d|jo|SqWqlWq:q:WdS(sGiven and obj and a list of [obj, startOffset, endOffset] tuples,
        determine if obj is labelling anything in the tuples.

        Returns the object being labelled, or None.
        iN(
RUR-t
ROLE_LABELRRkRlRtrangetgetNTargetsRn(RYR@RLRpRROttargetR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisLabellingContents:
s"	
cCs7x0|D](}|o|itijo|SqWdS(srReturns the ROLE_ENTRY object of a ROLE_AUTOCOMPLETE object or
        None if the entry cannot be found.
        N(RUR-R~R(RYR@Ro((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetAutocompleteEntryS
s
	c
Csd}|i|tititigtig}y|i}WnnlXtg}|iD]}||i	ddqa~}|i
d}|ot|}n
|i}|S(s)Returns the index of the cell which should be used with the
        table interface.  This is necessary because we cannot count on
        the index we need being the same as the index in the parent.
        See, for example, tables with captions and tables with rows
        that have attributes.iRistable-cell-index(
RR-t
ROLE_TABLEtROLE_TREE_TABLEt	ROLE_TREERR_RRuRRRRV(RYR@RJRYttableRRwRv((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR^^
s 		9cCs|itijo%|i|tigtig}n|i}y|i}Wnn8X|i|}|i|}|i	|}||gSddgS(sjReturns the [row, col] of a ROLE_TABLE_CELL or [0, 0]
        if the coordinates cannot be found.
        i(
RUR-R$RRRYR_R^t
getRowAtIndexR`(RYR@RYRRJtrowtcol((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetCellCoordinatesy
s			
cCs\|i|}|o|djotSx)|D]!}|itijotSq/WtSdS(sReturns True if the table cell is empty or consists of a single
        non-breaking space.

        Arguments:
        - obj: the table cell to examime
        u N(RzR?RUR-RZR(RYR@RCRo((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisBlankCell
s	cCsd}y|i}WnnX|id}|ot|ou|id}t|djozxw|D]k}|iddjoO|dip|dd!}n|dip|dd!}n|}PqlqlWn|idd}|ddjo$|dd!}|idd}q|idp
|}q|idd}|ido|idd}n|id	d}|id
d}|idd}n|S(
sReturns the relevant information from the URI.  The idea is
        to attempt to strip off all prefix and suffix, much like the
        basename command in a shell.it,is://iit/RJt.t?t#N(	RtqueryHyperlinkRR7RtfindtisalnumtcountR(RYR@tbasenamet	hyperlinkRt
expressiontitem((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetLinkBasename
s>


cCs|p|i|otStititititititi	g}|i
}|i|jo#|iti
o|iti}|S(s=Returns True if the given object is a field inside of a form.(RtR?R-RRRRR~RtROLE_PUSH_BUTTONR{RUR|RtSTATE_SENSITIVE(RYR@t	formRolesRtisField((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisFormField
scCs|ptSt}|i|}|o|itijotS|itititigjof|i	|}|pt
|djo8|i|}|pt
|djo
t}qqn|o&|i|ti
gtig}|o|itijox|iD]}|i	|oPqqW|iiti
jo$|ip|idj}qq|i|i}|oW|iddid}|i|idi}|p|idj}qqqt}qn|S(sReturns true if the given object is an obj that doesn't
        have any meaning associated with it and it is not inside a
        link.iisUTF-8R(RR?R+RUR-RXRR$RWRzR7RRRZRRYRRVRRytreplacetEMBEDDED_OBJECT_CHARACTERR/(RYR@tuselessRFRCRRo((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisUselessObject
sH		
	
cCsC|i|otitid|tStii||SdS(s=Returns True if the given object is for layout purposes only.sObject deemed to be useless: %sN(RR<R=tLEVEL_FINESTRRRtisLayoutOnly(RYR@((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR;s
cCsRy|i}WntititSX|itio|itiSdS(sODetermines if we should look any further at the object
        for flat review.N(	R{R<RRR?R|R-RWR(RYR@R((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytpursueForFlatReviewFscCs7|pgS|itijp)|iitip|idjotii	||Sy|i
}Wntj
ogSXg}g}xTt|i
D]C}|i|}|i|o|i||i|qqWt|pgSd}|i}x|D]7}	|i|	|d}
|i|
o|	}PqqWyD|iid}|id|d}
|
iid}WnnrXtd|i|i}
xUtd|i|
D]>}	|i|	|d}
|
o|i|
o|	}PqqWxt||iD]u}	|i|	|d}
|i|
oH|i|
x9|dt|!D]}|i|i|	|qnWq!Pq!Wxt|dddD]~}	|i|	|d}
|i|
oQ|
g}x4|dt|!D]}|i|i|	|qW||dd+qPqW|S(sGiven an accessible object, returns a list of accessible children
        that are actually showing/visible/pursable for flat review. We're
        overriding the default method here primarily to handle enormous
        tree tables (such as the Thunderbird message list) which do not
        manage their descendants.

        Arguments:
        - parent: The accessible which manages its descendants

        Returns a list of Accessible descendants which are showing.
        i2iii(RUR-RR{R|tSTATE_MANAGES_DESCENDANTSRRRtgetShowingDescendantsR_RRtnColumnstgetColumnHeaderRRR7tgetSelectedRowstgetAccessibleAtRRgR>RRtnRows(RYRYRtdescendantstvisibleColumnsROtheadertstartingRowtselectedRowsRtaccttableExtentstcellExtentstrowIncrementRtthisRow((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRZsz


		
!	cCsd}|djo|S|itijoa|i}|djo|Sx@|D]4}|idot|idd}PqSqSWn|S(shDetermines the heading level of the given object.  A value
        of 0 means there is no heading level.islevel:RiN(RRUR-RVRuRRR(RYR@R9t
attributest	attribute((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs


cCs|djp9|itijp#|io|iitijodSy|i}WndSX|itio(t	i
t	idt	it	idS|i
}|djodSx1|D])}|idot|ddSqWdS(s Determines the level of at which this object is at by using the
        object attribute 'level'.  To be consistent with default.getNodeLevel()
        this value is 0-based (Gecko return is 1-based) isgetNodeLevel - obj is defunctslevel:iiN(RRUR-RVRYRR{R|RsR<R=Rt
printStackRuRR(RYR@RRvRw((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetNodeLevels(##
cCs.|i}|i|d\}}||gS(sTReturns the object and first caret offset at the top of the
         document frame.i(RR(RYRR@Rk((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetTopOfFilescCs|i}|i|}|oB|i|id|i}||ijo||idgSn|i|}d}|itijob|i|i	}|oE|i|id|i}||ijo|i	|idgSqn|i|}|o|id}n|i
||}x^|oV|i||\}}|p |i||o||joPn||}}q-W||gS(sVReturns the object and last caret offset at the bottom of the
         document frame.ii(
RR+RR\Rt
getLastObjectRUR-RZRYtfindPreviousObjectR1Ri(RYRRCR0R@RkR;t
lastOffset((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetBottomOfFiles6 cCs\y||id}Wn
|}nXx0|o(|i||}|o
|}q(Pq(W|S(s-Returns the last object in the document framei(RtfindNextObject(RYRt	lastChildR;((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR)s

cCsd
}d}d}t}|p|itijo||||gS|i|\}}|ii}	|	i||}
|	i	||}d
}|djo!|djo||df}n|djo,|||	i
djo|||f}nh|djo!|djo|d|f}n:|djo,||
|	idjo||
|f}n|o|	i|d|d}|i
|d}
t|
o1|i|
dd|
dd|
dd}nx|
D]}|ditijo||di7}q|i|dp||d	7}qt}d}|diid}|i|i|i|ig}PqWn||||gS(sGiven a cell from which to start and a direction in which to
        search locates the next cell and returns it, along with its
        text, extents (as a tuple), and whether or not the cell contents
        consist of a form field.

        Arguments
        - cell: the table cell from which to start
        - direction: a string which can be one of four options: 'left',
                     'right', 'up', 'down'

        Returns [nextCell, text, extents, isField]
        RiRiRtuptdowniiN(iiii(RR?RUR-R$RRYR_tgetRowExtentAttgetColumnExtentAtRRRtgetObjectsFromEOCsR7RgRRRRRRORPRQRR(RYtcellRtnewCellRCReRRRRtrowspantcolspantnextCelltobjectsR@texts((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetNextCellInfo9sP


	cCs|pgS|o|itijot|do1|dititigjo|d}n|iidd}|ptiti	gSng}|i
|}|oK|o|i||\}}}q|}|i}|i
||}nd}d}d}|id}	|i||||	gti|i}
ti|
|	}d}x|D]}|id|}
|d}|
|d<|d|djo|in|	||id!|d<|idd}|i||
}||}|i|i|d|||
djo4|	|t|	!}|i||
d||gqoqoW|ititigjo~g}x*|D]"}|i|i|d|qWt|o:|i|dd|o|in|i|q
n|S(siExpands the current object replacing EMBEDDED_OBJECT_CHARACTERS
        with [obj, startOffset, endOffset, string] tuples.

        Arguments
        - obj: the object whose EOCs we need to expand into tuples
        - offset: the character offset after which
        - boundary: the pyatspi text boundary type

        Returns a list of object tuples.
        iRisUTF-8iii(RUR-RRRR_RR<RRR+tgetTextAfterOffsetR\RRyRtretcompileRtfinditerRtpopRRRR7RRi(RYR@RktboundaryRRCRRRmRztpatterntmatchestmtchildOffsetR;t
childIndexRot
restOfTextttoAdd((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRrsf		


% 
cCs|pt|ogSg}x|D]}|di}|tijo|i|d|oq(n=|tijo|i|d}t|d}x|o|djo||}|i|d}|o`|i|d|d}	|i	|	o1|i
t|t|	}
|d|
!}q:Pn|d8}qWn\|i|d}|oA|i|d|did}	t|	ipq(qn|i
|q(W|S(slAttempts to strip a list of (obj, start, end) tuples into one
        that contains only meaningful objects.iiisUTF-8(R7RUR-RRR~tguessLabelFromLineR+RRRRyR/R(RYRDtlineContentsRR5t
labelGuessRJtprevItemtprevTextRRRC((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetMeaningfulObjectsFromLines>

#cCsZtio=y|i}WqVtiti|i|}qVXn|i|}|S(sReturns the quantity of headings, forms, tables, visited links,
        and unvisited links on the page containing obj.
        (R[t
useCollectiont_collectionPageSummaryR<RtLEVEL_SEVEREt_iterativePageSummary(RYR@tsummary((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytgetPageSummarys
c
Cs|i}|i}d}d}d}d}d}d}ti}	titititig}
|i	|	i
|id|i|
|id|it
	}|i||idt}|i|x|D]}
|
i}|tijo|d7}q|tijo|d7}q|tijo|i|
o|d7}q|tijo5|
iitio|d7}q|d7}qqW||||||gS(s{Uses the Collection interface to get the quantity of headings,
        forms, tables, visited and unvisited links.
        iRiN(RtqueryCollectionRR-RRVRZRt	ROLE_FORMtcreateMatchRuleRt
MATCH_NONEt	MATCH_ANYR?t
getMatchestSORT_ORDER_CANONICALRt
freeMatchRuleRURR{R|t
STATE_VISITED(RYtdocframeRtheadingstformsttablestvlinkstuvlinkstpercentReadRtrolestruleRR@R5((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR$sB				
cCsvd}d}d}d}d}d}d}d}	|}
|id}x|o|d7}||
jo
|}	n|i}|tijo|d7}n|tijo|d7}nu|tijo|i|o|d7}nF|tijo5|i	i
tio|d7}q-|d7}n|i|}qIW|	ot
|	d|}n||||||gS(s\Reads the quantity of headings, forms, tables, visited and
        unvisited links.
        iiidN(RRRUR-RVRRRRZR{R|R!RR(RYR@R#R$R%R&R'R(t	nodetotalt	obj_indext
currentobjR5((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRQs>


cCs|i}|i|d|}|djo+|i|d}|i|d|}n||}|i|d|d|d}d}|}xt|dddD]}||\}	}
}}|i|	oPn|i|	|
|}
d|d|
d|
djo
djno$|p|	i}||}|
}qqW|iti	ti
gj}|itij}d}|}|o|p|oxt|dt|D]}||\}	}
}}|i|	o|p
d}nPn|i|	|
|}d|d|d|djo
djno$|p|	i}||7}|}qqWn|p|}|i
S(s6Attempts to guess what the label of an unlabeled form control
        might be by looking at surrounding contents from the same line.

        Arguments
        - obj: the form field about which to take a guess

        Returns the text which we think might be the label or None if we
        give up.
        iiiRiiK(RJR
R3RgRRRRUR-RRRR7R/(RYR@RtourIndextthisObjt
objExtentst	leftGuessReRORRRmRtprevExtentstpreferRighttpreventRightt
rightGuesstnextExtentstguess((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR
~sN	

!2

2

cCsd}|iid}|i|i|i|ig}|i|d|i}|djo3|i	o)|i	}|dd}|dd}n.|i
|dt\}}|i||}|i
tititititigjodd}	}
g}nk|i}|djo'|o |dd}	|dd}
n.|i|dt\}	}
|i|	|
}d}d}
xq|D]i}|i|d|d|d}|i|dp&|di
tititigj}|p||jo|o|d|d}dt|jo
djn}|o>d|jo
djno |d|d|dj}n|o|d}|d}qqnC|
d|
d}||ddjo|o||d7}nP|}
qWd}d	}
x|D]}|i|d|d|d}|i|dp&|di
tititigj}|pa||joP|oHdt|d|djo
djno|d}|d}qnC|
d|
d}||ddjo|o||d7}nP|}
qW|o|p
|}q|d|d}|d}|d|d}|d}||}||}||jp
|djo
|}q|}n|o
|}n|S(
s5Attempts to guess what the label of an unlabeled form control
        might be by looking at nearby contents from neighboring lines.

        Arguments
        - obj: the form field about which to take a guess

        Returns the text which we think might be the label or None if we
        give up.
        iiii2ii
N(iiii(iiii(RRRgRORPRQRRR
RJRItfindPreviousLineR?R3RUR-RRR'RRRKR?RRR(RYR@R7ReR0RJtprevLineContentstprevObjt
prevOffsettnextObjt
nextOffsettnextLineContentstaboveRXRtaboveExtentstaboveIsFormFieldtxDifft	guessThist
guessAbovetlastEndtbelowtbelowExtentstbelowIsFormFieldt
guessBelowt
bottomOfAbovet
topOfBelowtbottomOfObjttopOfObjecttaboveProximitytbelowProximity((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytguessLabelFromOtherLiness			

			!
#& 

!
0











c%Cs-d}|i|tigtig}|p|idjo|S|iid}|i|i	|i
|ig}|i|d\}}}}	|i|d\}
}}}
|i|d\}}}}|i
tititititigjo"dddtg\}}}}n|i|d\}}}}|o*|d|d}|d|d	j}n|o|	o
|}n|o|o|
o
|}n~|o|o|p|o
|}q)|d|d
}|d}|d|d
}|d}||}||}||jo
|}q)|}n|o|o
|}n|o|}x|o|i|d\}}}} |ot|d|d}!t|d
|d
}"|!djp
|"djo<| p0|i|\}#}$|#djo
|}qnPq qjqjWn|S(
s&Attempts to guess what the label of an unlabeled form control
        might be by looking at surrounding table cells.

        Arguments
        - obj: the form field about which to take a guess

        Returns the text which we think might be the label or None if we
        give up.
        iiRRRRRii2iN(iiii(RRR-R$RRRRgRORPRQRRRRURRR'RRR?RR(%RYR@R7tcontainingCellReR0tcellLefttleftTexttleftExtentstleftIsFieldt	cellRightt	rightTexttrightExtentstrightIsFieldt	cellAbovet	aboveTextR@taboveIsFieldt	cellBelowt	belowTextRGtbelowIsFieldt
canStartAttrightCloseEnoughRJRKRLRMRNRORRCRtdWidthtdHeightRR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytguessLabelFromTablevsl		"











c	Csd}|iiti}|ip|o|p|i|o|Sx5|iiD]$\}}|i	||o|Sq`W|i
}|i|}|iti
jo|d}n|i|}|p|i|}n|pf|itijp9|idjp)|o5|iddiddjo|i|}qZn|p
|i}n|i
iti
jo
|i
}n|i}||i|<|iS(s]Attempts to guess what the label of an unlabeled form control
        might be.

        Arguments
        - obj: the form field about which to take a guess
        - focusedOnly: If True, only take guesses about the form field
          with focus.

        Returns the text which we think might be the label or None if we
        give up.
        iiis
N(RR{R|R-RRtRRLtitemsRiRYR+RURR
RdR$RRRRPRR/(	RYR@tfocusedOnlyR7t	isFocusedtfieldRRYRC((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt
guessTheLabels:		)


cCs|i|}|oD|i|}|t|jo/|itijo|dgS||gSn|i||did}||ijod|i	djo|i
||dSy*|i||}|i
||dSWqV|dgSXq|i|||d}|djo,|dt|jo|i
||dS||gSn|iti
joe|do1|dititigjo|d}n|iidd}|i
|dS|dgSdS(sVGiven an object and a character offset, find the first
        [obj, characterOffset] that is actually presenting something
        on the display.  The reason we do this is that the
        [obj, characterOffset] passed in may actually be pointing
        to an embedded object character.  In those cases, we dig
        into the hierarchy to find the 'real' thing.

        Arguments:
        -obj: an accessible object
        -characterOffset: the offset of the character where to start
        looking for real rext

        Returns [obj, characterOffset] that points to real content.
        iisUTF-8iN(iiii(R+R{R7RUR-R~RRyRRRRRgRRRR_R(RYR@RBRCRzt	characterR
Re((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRDs>		

ic

Csf|p|i}n|p|i|oddgS|itijotitidddgS|i	i
tio|ititi
gj}|i|}|o|i|}t|djo,|ddjo|dt|d!}n|d}x^d|jot|jnov|||ijo||gS|io?||i||}|o|i|d|S|d7}q|d7}qWn|ioL|doA|o9y|i|dd|SWqutitiquXnj|ob|djoU|i|oD|iid}	|	idjo|	idjo|dgSn|i}
|i||
oddgSx|io||ijo|i|}|djo|i|i||S|id}||iijo<y|i|i|d|SWqNtitiqNXn|i}qWddgS(sGiven an object at a character offset, return the next
        caret context following an in-order traversal rule.

        Arguments:
        - root: the Accessible to start at.  If None, starts at the
        document frame.
        - startOffset: character position in the object text field
        (if it exists) to start at.  Defaults to -1, which means
        start at the beginning - that is, the next character is the
        first character in the object.
        - includeNonText: If False, only land on objects that support the
        accessible text interface; otherwise, include logical leaf
        nodes like check boxes, combo boxes, etc.

        Returns [obj, characterOffset] or [None, -1]
        is'findNextCaretInOrder: object is invalidiRiN(RRtRRUR-tROLE_INVALIDR<R=RR{R|RRRR+R{R7RRRR1RRRRgRQRRRiRYR
RV(
RYR@REtincludeNonTexttdoNotDescendRCRzR=RoReRtcharacterOffsetInParentRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR1s|$
$
	
 

c

Cs|p|i}n|p|i|oddgS|itijotitidddgS|i	i
tio|ititi
gj}|i|}|o|i|}t|djo,|ddjo|dt|d!}n|djp|t|jot|}n|d}xU|djov|||ijo||gS|io?||i||}|o|i|d|S|d8}qG|d8}qGWn|ioZ||idoH|o@y"|i||idd|SWqtitiqXnj|ob|djoU|i|oD|iid}	|	idjo|	idjo|dgSn|i}
|i||
oddgSx|io||ijo|i|}|djo|i|i||S|id}|djo<y|i|i|d|SWqotitiqoXn|i}qWddgS(sGiven an object an a character offset, return the previous
        caret context following an in order traversal rule.

        Arguments:
        - root: the Accessible to start at.  If None, starts at the
        document frame.
        - startOffset: character position in the object text field
        (if it exists) to start at.  Defaults to -1, which means
        start at the end - that is, the previous character is the
        last character of the object.

        Returns [obj, characterOffset] or [None, -1]
        is+findPreviousCaretInOrder: object is invalidiRiN(RRtRRUR-RkR<R=RR{R|RRRR+R{R7RRRtfindPreviousCaretInOrderRRRRgRQRRRiRYR
RV(
RYR@RERlRmRCRztpreviousOffsetRoReRRnRJ((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRos$ 



	$ 


cCsd}d}|i||o|i\}}n|pdS|id}|djo3|i||p
|i}q|i|}nx@t|tii	o(|djo|i|}|d8}qW|p*|i||p
|i}q|}n|i
}|tijo|iiS|tijo<|i}|i
itio|i|o|Snx,|io!|i
}|i
}|titigjoPnO|tijo)|itio|i|oPn|idjoPn|id}xw|djoi||}	|i|	}
t|	tii	o,|i||o
|
|jo|	}Pq|d8}qW|djoPq{q{W|i||o
d}n|S(sFinds the object prior to this one, where the tree we're
        dealing with is a DOM and 'prior' means the previous object
        in a linear presentation sense.

        Arguments:
        -obj: the object where to start.
        iiiN(RRiR*RVRYRR9R-t
Accessibilityt
AccessibleRUR'RR{R|RRRRRRR
(RYR@RtpreviousObjRBRJR5RYRRoR	((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR^sr	





		






cCsd}d}|i||o|i\}}n|pdS|i}|titigjo
t}ne|tijo4|i	i
tio|i|o
t}n!|i
djo
t}nt}d}x|o||i
jo||}|djo|d7}qn|i|}	t|tiio,|i||o
|	|jo|}Pq|d7}qW|pg|id}xT||ii
jo<|i|}t|tiio|}Pq|d7}qWn|}
x|px?|
i|
ii
djo!|i|
|o
|
i}
qW|i|
|pp|
id}xP||
ii
jo<|
i|}t|tiio|}Pqb|d7}qbW|
i}
qPqW|S(sFinds the object after to this one, where the tree we're
        dealing with is a DOM and 'next' means the next object
        in a linear presentation sense.

        Arguments:
        -obj: the object where to start.
        iiiN(RRiR*RUR-RRR?RR{R|RRRRR
R9RqRrRVRY(RYR@RR<RBR5tdescendRJRoR	R((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRsv	






	

cCsr|i}|itijo$|itio|iti}titi	d|ti
|f|S(s;Returns True if obj is a text entry area that is read only.s,Gecko.script.py:isReadOnlyTextArea=%s for %s(R{RUR-R~R|RR}R<R=t	LEVEL_ALLtgetAccessibleDetails(RYR@RtreadOnly((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisReadOnlyTextArea1scCs8|i}|iy|it|=WnnXdS(sTDeletes all knowledge of a character context for the current
        document frame.N(RRRBthash(RYR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR<s
cCsE|i}|pdS||g|it|<|i||dS(s6Sets the caret context for the current document frame.N(RRBRyR(RYR@RBR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRfGs
c	Cs|iitip"|itititigj}|i|p|ot	i
i|||S|i\}}t
d|}|i}|i|||djo|i||}n|i||o
|}n*y|i}Wn
d}n
X|i}xu|D]m}	|	\}
}}}
|i|
|oB|djp||jo
|jno|
id||fSqWt	i
i|||S(s)Gets the portion of the line of text where the caret (or optional
        offset) is. This is an override to accomodate the intricities of our
        caret navigation management and to deal with bogus line information
        being returned by Gecko when using getTextAtOffset.

        Argument:
        - obj: an Accessible object that implements the AccessibleText
          interface
        - offset: an optional caret offset to use.

        Returns the [string, caretOffset, startOffset] for the line of text
        where the caret is.
        isUTF-8N(R{R|R-R}RUR~RRRtRRtgetTextLineAtCaretR*R>RJR
R3RiR[RRtencode(RYR@RktisEntryt
contextObjt
contextOffsetRLRRCRRRERFR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRzXs2	

	+cCs7|i||t\}}}|id}|djS(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.
        tinvalidtspelling(tgetTextAttributesRR(RYR@RkRRRmterror((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytisWordMisspelledscCsv|iit|ph}|i|o|i|Stii||||}h||6|it|<|S(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.
        (RMRRyRhRRR(RYRRktget_defaultstattrsForObjRv((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRscCsddg}xs|oky|ii}Wn
d}qX||g}|i||}|djo|io||}qPqW|S(sAttempts to locate the caret on the page independent of our
        caret context. This functionality is needed when a page loads
        and the URL is for a fragment (anchor, id, named object) within
        that page.

        Arguments:
        - acc: The top-level accessible in which we suspect to find the
          caret (most likely the document frame).

        Returns the [obj, caretOffset] containing the caret if it can
        be determined. Otherwise [None, -1] is returned.
        iiN(RR[RRR(RYRRaRkR
((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytsearchForCaretLocations
cCs|i}|pddgSy|it|SWnK|i|\}}|i|td|d||it|<nX|it|\}}y|i}WnddgSX|it	i
o!titi
dd}}n||gS(sReturns the current [obj, caretOffset] if defined.  If not,
        it returns the first [obj, caretOffset] found by an in order
        traversal from the beginning of the document.iiN(RRRBRyRR1R>R{R|R-RsR<RR(RYRlRR@RR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR*s&		cCs3y$|i|}||idSWndSXdS(sReturns the character at the given characterOffset in the
        given object or None if the object does not implement the
        accessible text specialization.
        sUTF-8N(R{R{R(RYR@RBRz((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRas
cCs|pgS|pti}|i|}|oJ|i||}|d|jo|djno|d}q|n|i|||}t|djo/|dditijo|dg}n|S(slReturns an ordered list where each element is composed of an
        [obj, startOffset, endOffset, string] tuple.  The list is created
        via an in-order traversal of the document contents starting at
        the given object and characterOffset.  The first element in
        the list represents the beginning of the word.  The last
        element in the list represents the character just before the
        beginning of the next word.

        Arguments:
        -obj: the object to start at
        -characterOffset: the characterOffset in the object
        -boundary: the pyatsi word boundary to use
        iii(R-tTEXT_BOUNDARY_WORD_STARTR+R,RR7RUR(RYR@RBRRCRGRL((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRBs&c%Cs|pgS|i|p|i|p
|i}n|dddgg}|iid}|i|i|i|ig}xt	|i
d|iiD]w}|i|}|iid}|i|i|i|ig}|i||o|i
|dddgqPqWxt	|i
dddD]z}|i|}|iid}|i|i|i|ig}|i||o |dddgg|dd+q9Pq9W|Sti}	|i|}
|
p
d}n>|
i||	\}}}
||jo
|
jnp|
i|
|	\}}}
n||jo
|
jnp^|i||\}}|o;||}}|i|}
|
i||	\}}}
qn||jo
|
jnoK|i|ip
|}q"|i||}|djo||}|i|}|p|d}q|itijoJ|itijo4|
|djo|
|djo|d}qq|id}|i||	\}}}|djo:|i|io&|itijo|}|}q|d}q"n|i|||d}|i|||	}d}t}xk|pc|d\}}}
}|i||\}}|p|i||oPn|i|}
|
oT|
i||	}|d}|ddjo#|d|djo|d7}qn|i|||d}|i||ot||jog||joZ|i|||	}y|i|d}Wnt|}nX|d|!|dd+nP|}q_Wd}t}x|p|d\}}}
}|i ||
d\} }!|i|| o|i | |!\} }!n| p|i| |oPn|i| }
|
o |
i|!|	}|d}!n|i| |!|!d}"|i||"o||"jo
||"jp
|"djo&|i| |!|	}|i!|n| iti"ti#gjo|i$| o|i| |!|	}t%}xY|D]Q}#|i|#d|#d|#d}$|i||$o|i
|#t}qaqaW|oPqnP|"}qW|S(	s1Returns an ordered list where each element is composed of an
        [obj, startOffset, endOffset, string] tuple.  The list is created
        via an in-order traversal of the document contents starting at
        the given object and characterOffset.  The first element in
        the list represents the beginning of the line.  The last
        element in the list represents the character just before the
        beginning of the next line.

        Arguments:
        -obj: the object to start at
        -offset: the character offset in the object
        iiRii(iiii(iiii(iiii(&RRRYRRgRORPRQRRRRVRRhRR-R.R+R,RRoRRRRURXR\RRR?RiRJR7R1RRWR$RR(%RYR@RkRRReROtnewObjRqRRCRDRRmtpObjtpOffsetR
Rot	childTexttcOffsettcLinetcStarttcEndRXRKtfirstObjRR:R2RRJR;R<tnOffsetR6RtitemExtents((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR3>s
 

 	

#


"



&




!
	cCs|i||S(sReturns an ordered list where each element is composed of
        an [obj, startOffset, endOffset, string] tuple.  The list is 
        created via an in-order traversal of the document contents 
        starting and stopping at the given object.
        (R(RYR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR2'scCs|itijo|iti}nn|oVt|toF|idi	o0|idi
io|iti}n|iti
}|S(s5Returns the ACSS to speak anything for the given obj.sUTF-8(RUR-RZRR[RR9R:RytisupperR/tisalphatUPPERCASE_VOICEt
DEFAULT_VOICE(RYR@Rtacss((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRD8scCsDt|pgStitig}g}d}x
|D]}|\}}}	}
|i}|p7t|
ot|
idp|i||oq7n|tijoCt|
o5|i	}
t|djot|
oq7q.n;|ti
jo*|i|ot|djoq7n|o_|ititi
gjo@|iitio'|i||
ijoq7qn|ti
joN|i|o=|i|}|o#|i||i||gqnt|
p|titigjo|ii|}
n;|
g}
|o*||jo|
i|ii|n|i|t|dj}|tij}|oh|p|oZ|o
|}n"|i|tigtig}|o|
i|ii|qnx-|
D]%}|i||i||gq
W|}q7W|S(sReturns a list of [text, acss] tuples based upon the list
        of [obj, startOffset, endOffset, string] tuples passed in.

        Arguments:
        -contents: a list of [obj, startOffset, endOffset, string] tuples
        -speakRole: if True, speak the roles of objects
        RiN(R7R-RRVRRUR/RRXRRRRRR{R|RRiRRRRDR~RRRRtgetRoleNameRJR(RYRLt	speakRoletdoNotSpeakRolesRMR:RR@RERFRR5Rt	utteranceR7t	isHeadingR8R((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR4Esl	
$	! 
'	
		#
cCslg}x|D]\}}t|djo||gg}q
||ddjoct|toSt|ddto;|ddid|dd<|ddcd|7<q
|i||gq
Wt|djo?|dddjo*tiotd|ddggSnt|o;t|ddto#|ddid|dd<n|S(sReturns a list of utterances clumped together by acss.

        Arguments:
        -utterances: unclumped utterances
        -speakRole: if True, speak the roles of objects
        iiiRs
tblank(R7R9R:R&RR[tspeakBlankLinesR(RYRMRNRPR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR5s"(
 %#cCsr|i||}|i|}xJ|D]B\}}t|to|i|}nti||tq(WdS(s>Speaks each string in contents using the associated voice/acssN(R4R5R9R:R;RuRR?(RYRLRRMRNRPR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRjscCs|i||}|i|||ot|o0||ijo ti||i||q|itijo#|i	i
|}ti|qndS(sNSpeaks the character at the given characterOffset in the
        given object.N(RaRCRRutspeakCharacterRDRUR-R~RRR(RYR@RBRjRM((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR@s	cCs!|i|||i|dS(N(R]R_(RYR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pytsetCaretOffsetscCse|io|in|i}|i}|o||it|<n|||gjodS|i|||od|iti	ti
gjoE|iiti
o,|i|}|i}|i||n|tijotid|dt||_x|io|o|ii}|tijo|i|od|_Pn|iiiti
oPn<|tijo+|ii}|itijoPqn|ii|_qW|io|iiiqn|i|}|oU|i|||ijo4|d8}tid||i |||dqandS(s[Sets the caret position to the given character offset in the
        given object.
        NRi(!RRR*RRBRyRfRUR-RRR{R|RR
RYRvRwRRRR?RDRZR+RRt	grabFocusRR\tmagtmagnifyAccessibleRg(RYR@RBtcaretContextRR5RYRC((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR]sZ
		 	
	


		cCs|iptd}ti|dS|ip+|i}d}|o6|iitio|i	||\}}n|o-|iitio|i
in|o|i||}t
|djoD|ddio.|i||\}}|i||}n|i|||i||i|nt|_n*|i\}}ti|||idS(svPositions the caret offset to the next character or object
        in the mouse over which has just appeared.
        sMouse over object not found.Niii(RVRRuRRXR{R|R-RRRRR2R7R/R1R]RjR_RtoldMouseCoordinatesteventsynthesizertrouteToPointR(RYRyRR@RkRLRORP((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRls.


	! )

cCs|i\}}|o6|iitio|i||\}}n|o-|iitio|iinB|o:|i|||i	|i
|||i|nt|_
d|_dS(s;Cleans things up after a mouse-over object has been hidden.N(RWR{R|R-RRRRR]RjR2R_R?RXRRV(RYR@Rk((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRs! 	cCs|i\}}xI|oA|i||\}}|o|iitioPqqW|p|i\}}n|i|||i|||i	|dS(scPositions the caret offset to the next character or object
        in the document window.
        N(
R*R1R{R|R-RRR@R]R_(RYRyR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR)s	 
cCs|i\}}xI|oA|i||\}}|o|iitioPqqW|p|i\}}n|i|||i|||i	|dS(sgPositions the caret offset to the previous character or object
        in the document window.
        N(
R*RoR{R|R-RRR@R]R_(RYRyR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR*s 
c	CsC|i\}}|i||\}}ti}|i|||}t|pdS|d\}}}}t|djo||djoq|i||djoX|i||\}}|i|||}t|o|d\}}}}qn|i|||i||i	|||i
|dS(soPositions the caret offset to beginning of the previous
        word or object in the document window.
        NiiR(R*RoR-RRBR7RaR]R_RCRj(	RYRyR@RBRRLRERFR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR,s$	


c	Cs|i\}}td|d}|i||\}}ti}|i|||}t|o|ddpdS|d\}}}}|i|||i||i	||d|i
|dS(sePositions the caret offset to the end of next word or object
        in the document window.
        iiiiN(R*R>R1R-tTEXT_BOUNDARY_WORD_ENDRBR7R]R_RCRj(	RYRyR@RBRRLRERFR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR+s	
cCs|p|i\}}n|p|iS|i}|i|||}|djoJ|i|}|o|i|jo|d8}n|i||}n|dd}|dd}|i|dd|dd\}}|i|dd|dd|dd}	|i|||d}
xV|i	|	|
oB|	|
jo5|i||\}}|i|||d}
q1W|i
}|i|||}|djo|i||}n|pddgS|dd}|dd}d}xZ|djoL|oE||jo8|i||\}}|i||}|d7}qW||jo(|i}
|i
||
}d}n|i||d\}}tip|i|||d}	|	d}x|D]}|i|d|d|dd}	|	d}||	d}||jo
|jno|d}d}|i|}|o]|	d|	dd}|i||d}d|jo
|jno|}|}qnPqqWn|o|i|_||_n||gS(sLocates the caret offset at the previous line in the document
        window.

        Arguments:
        -obj:             the object from which the search should begin
        -characterOffset: the offset within obj from which the search should
                          begin
        -updateCache:     whether or not we should update the line cache

        Returns the [obj, characterOffset] at the beginning of the line.
        iiiiiiN(R*RRJR
R+R\R3RoRgRhRIRRRR1R:RtgetOffsetAtPointRK(RYR@RBtupdateCachetcurrentLineRJRCR:R;ReR2tprevLinetfailureCountRtoldXRtnewX1tnewX2Rt	newOffsettnewY((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR8s
	
(
	
!

	
	

%



cCs|p|i\}}n|p|iS|i}|i|||}|djo|i||}n|i|dd|ddd\}}|i|dd|dd|dd}|i|||d}	xV|i||	oB||	jo5|i||\}}|i|||d}	qW|i}
|i|||
}|djo|i||}
n|
pddgSd}xe|djoW|oP||
joC|i||\}}|o |i||}
|d7}qqW||
jo(|i
}|i||}d}n|djoG|i||djo.|i||d|i
jo|d7}n|i|td|d\}}tip
|i|||d}|d}
x|
D]}|i|d|d|dd}|d}||d}||
jo
|jnow|d}d}|i|}|oL|d|dd}|i|
|d}|djo|}|}qnPqqWn|o|i|_|
|_n||gS(	sLocates the caret offset at the next line in the document
        window.

        Arguments:
        -obj:             the object from which the search should begin
        -characterOffset: the offset within obj from which the search should
                          begin
        -updateCache:     whether or not we should update the line cache

        Returns the [obj, characterOffset] at the beginning of the line.
        iiiiis
iN(R*RRJR
R3R1RgRhRKRRRRaRR>R:RR+RRI(RYR@RBRRRJR<R=ReR6tnextLineRRRRRRRRRCR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR?|s
	

	
!




%
	

%




cCsZ|i\}}|i||\}}|ptS|i|||i||tS(sPositions the caret offset at the previous line in the document
        window, attempting to preserve horizontal caret position.

        Returns True if we actually moved.
        (R*R8R?R]RR(RYRyR@RBRstpreviousCharOffset((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR.scCsZ|i\}}|i||\}}|ptS|i|||i||tS(sPositions the caret offset at the next line in the document
        window, attempting to preserve horizontal caret position.

        Returns True if we actually moved.
        (R*R?R?R]RR(RYRyR@RBR<tnextCharOffset((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR-scCs|i\}}|i||}|dd|dd}}|i||ttitip|i||n|i	|dS(s8Positions the caret offset at the beginning of the line.iiN(
R*R3R]R9RvRRRR@R_(RYRyR@RBRD((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR2scCs|i\}}|i||}|dd|ddd}}|i||ttitip|i||n|i	|dS(s2Positions the caret offset at the end of the line.iiiiN(
R*R3R]R9RvRRRR@R_(RYRyR@RBRD((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR3$s!cCs6|i\}}|i|||i||dS(s<Positions the caret offset at the beginning of the document.N(RR]R(RYRyR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR0/scCs6|i\}}|i|||i||dS(s6Positions the caret offset at the end of the document.N(RR]R(RYRyR@RB((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR16sc	Cs!|i\}}d}|itijo%|i|tigtig}n.|i||}|djo||}n|pdSy|i	}WnnxXt
id||ii
xTtd|iD]@}|i|}|dtdgjo|i|PqqWdS(sWIf focus is on a menu item, but the containing combo box does not
        have focus, give the combo box focus and expand it.  Note that this
        is necessary because with Orca controlling the caret it is possible
        to arrow to a menu item within the combo box without actually giving
        the containing combo box focus.
        iNtopen(R*RRUR-R'RRRRtqueryActionRRRRRtnActionstgetNameRtdoAction(	RYRyR@RBtcomboBoxRJtactionROR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR/=s.		

cCs|i\}}|oA|iitio(|ii}|i|}d|_nt	d|}||}}t
}t
}|ip|i||}|}	|i|}
x|o|o|i
|||
}|i||pM|djpt|
djo
||	j}|pt}|}|}qnd|jot|
jnoR|
|dd}|
|dd}|djp
|dj}|p
t}qn<|i||o(d|jo
|jno
t}n|p{||_|i|dd|dd}|i}|i|}
|
dd}|
dd}|i|ijoPqmqqW|p}titd|i\}}|i||}|i|}
|
o |
dd}|
dd}n|dj	}nI|oA|io7|i||p |
|d}|
|d}q>n|oV||_|i|||i||i||}
|
dg}
|i|
ndS(s?Go to the previous object in order, regardless of type or size.iiisWrapping to bottom.N(R*R{R|R-RRYR
RRJR>R?R3RR
RiR7RRKR8RuRRRR]R_R2Rj(RYRyR@RBR:R;tfoundtmayHaveGoneTooFarRDt
startingPointtusefulRJRtobjectContents((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRas| 



$
	"		
		
cCs|i\}}|oA|iitio(|ii}|i|}d|_nt	d|}||}}t
}|ip|i||}x|o|o	|i|}|i
|||}	|i||p&|dd}|dd}t}qd|	jot|djno.||	dd}||	dd}t}q||_|i|dd|dd\}}|i}|i|ijoPqqW|p}titd|i\}}|i||}|i|}|o |dd}|dd}n|dj	}n|oV||_|i|||i||i||}
|
dg}
|i|
ndS(s;Go to the next object in order, regardless of type or size.iiiisWrapping to top.N(R*R{R|R-RRYR
RRJR>R?R3RR
RiRR7RIR?RuRRRR]R_R2Rj(RYRyR@RBR<R=RRDRRJR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRsZ 



(
		
	
		
cCs8tio|iitintitddS(s&Advances live region politeness level.sLive region support is offN(	R[RRHtadvancePolitenessRvRwRuRR(RYRy((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR6s
cCsWtip tt_titdn*tt_|iititddS(NsLive regions monitoring onsLive regions monitoring off(	R[RRRuRRR?RHR(RYRy((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR7s
		
cCs2tio|iintitddS(NsLive region support is off(R[RRHR5RuRR(RYRy((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR5s
cCsBtio!|iit|idntitddS(NisLive region support is off(	R[RRHR8RRRuRR(RYRy((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR8s
	cCstioFx*|iiD]}|ii|iqWtt_td}n@tt_x'|iiD]}|ii	|qiWtd}t
it
i|t
i|ti|dS(s9Toggles between Firefox native and Orca caret navigation.sGecko is controlling the caret.sOrca is controlling the caret.N(R:R;RRtremoveByHandlerR&R?RRRR<R=R>RuRRR(RYRyRR((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyR)s
		
cCsR|i|o+y|i}Wq;tj
otSXntii||dS(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.
        N(RtRRRRRtspeakWordUnderMouse(RYRtai((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRIs	
N(t__name__Rt__doc__RR\R]R`RaRbRcRxR|RRRRR
RRRR'RRRxRsRRzRRRRRRRRRRRRRRRRRRRR
RRRRR_R?RARHRRRSRTR[RcRR+RRtRRRxR{RR!RRRRRRgRdRhRRR^RRRRRRRRRRRRRRRRRRRR
RPRdRRiRR1RoRRRxRRfRzRR?RRR*RaRBR3R2RDR4R5RjR@RR]RRR)R*R,R+R8R?R.R-R2R3R0R1R/RRR6R7R5R8RR(((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyRQs0												#	V	]		@		
	0	Q	 	5			2					
	5							f	'		#	
			k	)					)				?	#$		 				g	/	1		l			0						8		M			e		 			-		9o	3		-	-	V		wW	@kk	b	q		A		-	 			
z	!				e	-				(	fo							$	]	?	
				
	 (8Rt__id__t__version__t__date__t
__copyright__t__license__RRR-RRRtorca.brailleRt
orca.debugR<torca.defaultRtorca.eventsynthesizerRtorca.input_eventRtorca.keybindingsRtorca.liveregionsRFtorca.magRt	orca.orcaRtorca.orca_stateRvtorca.rolenamesRt
orca.settingsR[torca.speechRutorca.speechserverR<R:tbraille_generatorRtspeech_generatorRt
formattingRR^Rtstructural_navigationRtorca.orca_i18nRtorca.speech_generatorRR(((sF/usr/lib/python2.6/site-packages/orca/scripts/toolkits/Gecko/script.pyt<module>#sD

Youez - 2016 - github.com/yon3zu
LinuXploit