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//braille_generator.pyc
z#Jc
@sdZdZdZdZdZdZddkZddkZddkZddk	Z	ddk
Z
ddkZddkl
Z
d	d
d
YZegZdeifdYZdS(s:Utilities for obtaining braille presentations for objects.s$Id$s
$Revision$s$Date$s-Copyright (c) 2005-2009 Sun Microsystems Inc.tLGPLiN(tngettexttSpacecBseZdZddZRS(sxA dummy class to indicate we want to insert a space into an
    utterance, but only if there is text prior to the space.t cCs
||_dS(N(t	delimiter(tselfR((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt__init__)s(t__name__t
__module__t__doc__R(((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyR&stBrailleGeneratorcBseZdZeieieieifZdZ	dZ
dZdZdZ
dZdZdZd	Zd
ZdZdd
ZddZRS(sTakes accessible objects and produces a list of braille Regions
    for those objects.  See the generateBraille method, which is the
    primary entry point.  Subclasses can feel free to override/extend
    the brailleGenerators instance field as they see fit.cCstii||ddS(Ntbraille(t	generatort	GeneratorR(Rtscript((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyR9scCsetii|||i|d<ti|d<ti|d<ti|d<ti|d<|i	|d<dS(sCOther things to make available from the formatting string.
        tspacet	ComponenttRegiontTexttLinktasStringN(
RR
t_addGlobalsRRRRRRR(RtglobalsDict((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyR<s




cKsB|tijo"|iddod|d<n|i||}y|d}Wn
d}nXx|D]}t|titifo|i	|jo|}Pqit|tio4|i
tijo|i	i
|jo|}Pqit|tio4|i
tijo|i	i
|jo|}PqiqiW||gS(Nt
formatTypetfocusedi(t
orca_statetlocusOfFocustgettNonetgeneratet
isinstanceRRRt
accessibletgetRoletpyatspitROLE_COMBO_BOXtparenttROLE_TABLE_CELL(Rtobjtargstresultt
focusedRegiontregion((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pytgenerateBrailleGs2
	cKsg}|id|i}|tijp7titijoA|idto-|tijo|i	t
i||n|S(sReturns the role name for the object in an array of strings, with
        the exception that the pyatspi.ROLE_UNKNOWN role will yield an
        empty array.  Note that a 'role' attribute in args will
        override the accessible role of the obj.
        trolet
readingRow(RR tsettingstbrailleForceRolestbrailleVerbosityLeveltVERBOSITY_LEVEL_VERBOSEtFalseR!tROLE_UNKNOWNtappendt	rolenamestgetBrailleForRoleName(RR%R&R'R+((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateRoleNamers
cKsEg}|ii|\}}}|o|id|dn|S(sReturns an array of strings (and possibly voice and audio
        specifications) that represent the accelerator for the object,
        or an empty array if no accelerator can be found.
        t(t)(t_scriptt
getKeyBindingR3(RR%R&R'tmnemonictshortcuttaccelerator((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateAccelerators
cKsJg}|ii|}|djo!|itdd||n|S(sReturns an array of strings that says how many alerts and dialogs
        are associated with the application for this object.  [[[WDW -
        I wonder if this string should be moved to settings.py.]]]
        is(%d dialog)s(%d dialogs)(R9tgetUnfocusedAlertAndDialogCountR3R(RR%R&R'talertAndDialogCount((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateAlertAndDialogCounts
c	Ksg}tip|St|d<|id|i}|tij}|i}|o#|i|ijo
|i}nxj|ob|i|joRg}|iti	jof|iti
joP|itijo:|ii
|o&|i|d<|i||}n|iti	tigjoo|ii|}|oRt|oE|io7|p&|i|d<|i||}qt}qn|o!|o|itidn|i||i}q|W|i|S(sEReturns an array of strings (and possibly voice and audio
        specifications) that represent the text of the ancestors for
        the object.  This is typically used to present the context for
        an object (e.g., the names of the window, the panels, etc.,
        that the object is contained in).  If the 'priorObj' attribute
        of the args dictionary is set, only the differences in
        ancestry between the 'priorObj' and the current obj will be
        computed.  The 'priorObj' is typically set by Orca to be the
        previous object with focus.
        tincludeContextR+R(R-tenableBrailleContextR1RR R!tROLE_RADIO_BUTTONR#tSKIP_CONTEXT_ROLEStROLE_FILLERtROLE_SECTIONtROLE_SPLIT_PANER9tisLayoutOnlyRt
ROLE_PANELtgetDisplayedLabeltlentisspaceR3RRtextendtreverse(	RR%R&R'R+texcludeRadioButtonGroupR#tparentResulttlabel((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateAncestorss@

		
	"

cKsg}|i}xQ|D]I}|itijo-|id}|i|i||PqqW|p?|id|}|i|i|||i||n|S(sIf this scroll pane is labelled by a page tab, then return the page
        tab information for the braille context instead. Thunderbird
        folder properties is such a case. See bug #507922 for more
        details.
        itREAL_ROLE_SCROLL_PANE(	tgetRelationSettgetRelationTypeR!tRELATION_LABELLED_BYt	getTargetRNRt
_overrideRolet_restoreRole(RR%R&R't	relationstrelationt
labelledBytoldRole((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateAsPageTabOrScrollPanes	cKsyg}d}x5|D]-}|o |itijo
|}qqW|o*|iitio|i|n|S(sFor a combo box, we check to see if the text is editable. If so,
        then we want to show the text attributes (such as selection --
        see bug 496846 for more details).  This will return an array
        containing a single object, which is the accessible for the
        text object. Note that this is different from the rest of the
        generators, which all return an array of strings.  Yes, this
        is a hack.
        N(RR R!t	ROLE_TEXTtgetStatetcontainstSTATE_EDITABLER3(RR%R&R'ttextObjtchild((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateComboBoxTextObjs	 c	Ksti}|p|Sy|i}Wntj
o
d}nX|o|ii|p|iti	gjo|i
|iti\}}}|dj}|oQxN|i
D]<}|itijo |ii|id}qqWqn|S(s]Returns True or False to indicate whether context should be
        included or not.
        iN(R-RCt	queryTexttNotImplementedErrorRR9t
isTextAreaR R!t
ROLE_LABELtgetTextAtOffsettcaretOffsettTEXT_BOUNDARY_LINE_STARTRURVtRELATION_FLOWS_FROMRX(	RR%R&tincludettextt
lineStringtstartOffsett	endOffsetR\((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateIncludeContexts(	
	
,cKsbg}tipN|iddp|i|d<nd|d<|i|iii|n|S(Ntmodeteolt
stringType(	R-tdisableBrailleEOLRRt_modeR3R9t
formattingt	getString(RR%R&R'((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt_generateEol@s

 RcCs#|djotSt|gSdS(NR(tSPACER(RR((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyRIs
cCsd}d}t|to
|}n|ot|tox*|o"t|dto|d}q@Wx-|o%t|dto|dd!}qmWxg|D][}t|to|o||i7}d}q|i|}|ii|||}qWn|S(Ntiii(	RRt
basestringtlistRRRR9tappendString(RtcontentRtcombinedtpriortelement((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyROs*


(RRR	R!t	ROLE_MENUt
ROLE_MENU_BARtROLE_PAGE_TAB_LISTR"RERRR*R6R>RARSR_RfRtR|RR(((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyR
.s$			+				H			#		((R	t__id__t__version__t__date__t
__copyright__t__license__R!RRRR4R-t	orca_i18nRRR}R
R
(((s:/usr/lib/python2.6/site-packages/orca/braille_generator.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit