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/mouse_review.pyo
Ñò
z#ÝJc@sEdZdZdZdZdZdZddkZyddkZeZ	Wn ei
eidƒeZ	nXddk
Z
ddkZddkZddkZddkZddkZddkZd	dd
„ƒYZddd„ƒYZd
dd„ƒYZddd„ƒYZe
iiƒo
eƒZn
edƒ‚ddd„ZdS(sMouse review mode.s$Id$s
$Revision$s$Date$s!Copyright (c) 2008 Eitan IsaacsontLGPLiÿÿÿÿNs9Python module wnck not found, mouse review not available.tBoundingBoxcBs eZdZd„Zd„ZRS(sgA bounding box, currently it is used to test if a given point is
    inside the bounds of the box.
    cCs.||||f\|_|_|_|_dS(s¸Initialize a bounding box.

        Arguments:
        - x: Left border of box.
        - y: Top border of box.
        - width: Width of box.
        - height: Height of box.
        N(txtytwidththeight(tselfRRRR((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyt__init__5s	cCsQ|i|jo|i|ijno&|i|jo|i|ijSS(s§Test if a given point is inside a box.

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

        Returns True if point is inside box.
        (RRRR(RRR((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pytisInBox@s	+(t__name__t
__module__t__doc__RR(((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR/s	t_WordContextcBs eZdZd„Zd„ZRS(s’A word on which the mouse id hovering above. This class should have
    enough info to make it unique, so we know when we have left the word.
    cCs(||_||_||_||_dS(sInitialize a word context.

        Arguments:
        - word: The string of the word we are on.
        - acc: The accessible object that contains the word.
        - start: The start offset of the word in the text.
        - end: The end offset of the word in the text.
        N(twordtacctstarttend(RR
RRR((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRPs				cCsb|djodSt|i|ijo6|i|ijo#|i|ijo|i|ijƒS(shCompare two word contexts, if they refer to the same word, return 0.
        Otherwise return 1
        iN(tNonetintR
RRR(Rtother((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyt__cmp__^s
)(R	R
RRR(((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRLs	t_ItemContextcBs2eZdZddddddd„Zd„ZRS(s°An _ItemContext holds all the information of the item we are currently
    hovering above. If the accessible supports word speaking, we also store
    a word context here.
    icCs=||_||_||_||_|i||ƒ|_dS(s¢Initialize an _ItemContext with all the information we have.

        Arguments:
        - x: The X coordinate of the pointer.
        - y: The Y coordinate of the pointer.
        - acc: The end-node accessible at that coordinate.
        - frame: The top-level frame below the pointer.
        - app: The application the pointer is hovering above.
        - script: The script for the context's application.
        N(Rtframetapptscriptt_getWordContexttword_ctx(RRRRRRR((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRls
				cCsa|ip|ii|iƒodS|ii|i||ƒ\}}}t||i||ƒS(sIf the context's accessible supports it, retrieve the word we are
        currently hovering above.

        Arguments:
        - x: The X coordinate of the pointer.
        - y: The Y coordinate of the pointer.

        Returns a _WordContext of the current word, or None.
        N(RtspeakWordUnderMouseRRtgetWordAtCoordsR(RRRR
RR((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR}s
"$N(R	R
RRRR(((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRgst
MouseReviewercBsYeZdZd„Zd	d„Zd„Zd„Zd„Zd„Z	d„Z
d„ZRS(
s-Main class for the mouse-review feature.
    cCsFtpdStiƒ}t|_tƒ|_tƒ|_d|_	dS(s*Initalize a mouse reviewer class.
        N(
t_mouseReviewCapabletwncktscreen_get_defaulttFalsetactiveRt_currentMouseOvert
_oldMouseOverRt_lastReportedCoord(Rtwnck_screen((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRs	cCsŒtpdS|djo|i}n|o%|iotii|idƒn-|o$|iotii|idƒn||_dS(sToggle mouse reviewing on or off.

        Arguments:
        - on: If set to True or False, explicitly toggles reviewing on or off.
        Ns	mouse:abs(RRR"tpyatspitRegistrytregisterEventListenert
_onMouseMovedtderegisterEventListener(Rton((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyttoggleœs
cCsJtio&titi|i|i|iƒn|i|i|iƒdS(sìCallback for "mouse:abs" AT-SPI event. We will check after the dwell
        delay if the mouse moved away, if it didn't we will review the
        component under it.

        Arguments:
        - event: The event we recieved.
        N(tsettingstmouseDwellDelaytgobjectttimeout_addt_mouseDwellTimeouttdetail1tdetail2(Rtevent((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR*¯s
cCs¥tiitiiƒƒ}|iƒ\}}}}t||ƒtijoTt||ƒtijo:||f|ijo#||f|_|i	||ƒnt
S(sßDwell timout callback. If we are still dwelling, review the
        component.

        Arguments:
        - prev_x: Previuos X coordinate of mouse pointer.
        - prev_y: Previuos Y coordinate of mouse pointer.
        (tgtktgdktDisplaytget_displaytget_pointertabsR.tmouseDwellMaxDriftR%t_reportUnderMouseR!(Rtprev_xtprev_ytdisplaytscreenRRtflags((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR2¿scCs`|i||ƒ}|pdS||i|_|_g}|iiƒtitifjo!|iiƒi	ti
ƒodS|ii|iijo'ti
djo|i|iiƒn|ii|iijpti
djo%|iio|i|iiƒn|iio7|ii|iijo|i|iiiƒqOn|i|ƒtS(s‚Report the element under the given coordinates:

        Arguments:
        - x: X coordinate.
        - y: Y coordinate.
        Ni(t_getContextUnderMouseR#R$RtgetRoleR'tROLE_MENU_ITEMtROLE_COMBO_BOXtgetStatetcontainstSTATE_SELECTEDRR.R/tappendRR
t_outputElementsR!(RRRtcurrent_elementt
output_obj((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR=Ðs,


cCsž|otiƒnx‚|D]z}|djoqnt|tƒoti|ƒti|ƒqti|ii	i
i|ƒƒ|ii	i|ƒqWdS(s	Output the given elements.
        TODO: Now we are mainly using WhereAmI, we might need to find out a
        better, less verbose output method.

        Arguments:
        - output_obj: A list of objects to output, could be accessibles and
        text.
        N(
tspeechtstopRt
isinstancetstrtspeaktbrailletdisplayMessageR#RtspeechGeneratortgenerateSpeecht
updateBraille(RRMtobj((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRKøs	


cCsFtiƒ}g}|iƒD]}||iƒq~}|i|ƒS(s¾Determine the stack position of a given window.

        Arguments:
        - frame_name: The name of the window.

        Returns position of given window in window-managers stack.
        (RR tget_windows_stackedtget_nametindex(Rt
frame_nameR&t_[1]twtwindow_order((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyt
_getZOrders	-c
CsGtiidƒ}ddg}x|D]}|pq%nti|ƒ}|pq%nxâ|D]Ú}|pq]n|i|||ƒ}|oªy|i|iƒ}	WnWt	j
oKy:|i
ƒiƒtijot
||||||ƒSWq3q3Xq7X|	|djo%t
||||||ƒ|	g}q7q]q]Wq%W|dS(s³Get the context under the mouse.

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

        Returns _ItemContext of the component under the mouse.
        iiÿÿÿÿN(R'R(t
getDesktopRtorcatgetScriptForApptgetComponentAtDesktopCoordsR`tnamet
ValueErrortqueryComponenttgetLayertLAYER_POPUPR(
RRRtdesktopt
top_windowRRRRtz_order((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRCs:

	N(R	R
RRRR-R*R2R=RKR`RC(((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyRŒs	
			(		s*Cannot initialize mouse review, no displaycCstiƒdS(sÆ
    Toggle the reviewer on or off.

    Arguments:
    - script: Given script if this was called as a keybinding callback.
    - event: Given event if this was called as a keybinding callback.
    N(tmouse_reviewerR-(RR5((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyR-Qs(((((Rt__id__t__version__t__date__t
__copyright__t__license__tdebugRtTrueRtprintlnt
LEVEL_WARNINGR!R6R0RbR'RNRSR.RRRRR7tdisplay_get_defaultRmtRuntimeErrorRR-(((s5/usr/lib/python2.6/site-packages/orca/mouse_review.pyt<module>s8

%À


Youez - 2016 - github.com/yon3zu
LinuXploit