403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/orca/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/orca/__pycache__/brlmon.cpython-310.pyc
o

S�b��@s�dZdZdZdZdZdZddlZddlmZd	d
l	m
Z
d	dlmZdZ
d
ZdZGdd�dej�ZGdd�dej�ZGdd�dej�ZdS)zCProvides a graphical braille display, mainly for development tasks.z$Id$z
$Revision$z$Date$zNCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2011 The Orca Team.�LGPL�N)�Gtk�)�
orca_state)�BrailleEvent�@�€�Àcs>eZdZdZdZdZdZd�fdd�	Zdd	�Zd
d�Z	�Z
S)
�BrlDotzA single braille dot.z<tt><small>%s</small></tt>u○u●Fcs�t���|dvr|�dddd�|�dddd�n|�dddd�|�dddd�t��|_|�|j�|r=|��dS|�	�dS)z�Create a new BrlDot.

        Arguments:
        - dotNumber: an integer reflecting the location of the dot within
          an 8-dot braille cell, using traditional braille dot values.
        )r���g�?��?grrN)
�super�__init__�set�set_paddingr�Label�label�add�raiseDot�lowerDot)�self�	dotNumber�isRaised��	__class__��-/usr/lib/python3/dist-packages/orca/brlmon.pyr2s

zBrlDot.__init__cC�(|�dddd�|j�|j|j�dS�Nrr)rr�
set_markup�
MARKUP_NORMAL�
SYMBOL_RAISED�rrrrrI�zBrlDot.raiseDotcCrr )rrr!r"�SYMBOL_LOWEREDr$rrrrMr%zBrlDot.lowerDot)F)�__name__�
__module__�__qualname__�__doc__r"r&r#rrr�
__classcell__rrrrr
+sr
c@s:eZdZdZdZdZdd�Zdd�Zdd	�Zddd
�Z	d
S)�BrlCellz?A single graphical braille cell with cursor routing capability.z<tt><big>%s</big></tt>z<b><u>%s</u></b>cCs�tj�|�|�dd�||_t��|_td�|_td�|_	t�
�}|�|jdddd�|�|jdddd�|�|j	dddd�|�|�|�
d	|j�d
S)z|Create a new BrlCell.

        Arguments:
        - position: The location of the cell with respect to the monitor.
        ��-r
�rrrr�clickedN)r�Buttonr�set_size_request�	_positionr�_displayedCharr
�_dot7�_dot8�Grid�attachr�connect�_onCellClicked)r�position�gridrrrrWs



zBrlCell.__init__cCs:tjsdSi}tj|d<|j|d<t|�}tj�|�dS)z�Callback for the 'clicked' signal on the push button. Synthesizes
        a fake brlapi command to route the cursor to the current cell, similar
        to what occurs when a user presses the cursor routing key on his/her
        hardware braille display.N�command�argument)r�activeScript�brlapi�
KEY_CMD_ROUTEr3r�processRoutingKey)r�widget�fakeKeyPress�eventrrrr:ms

zBrlCell._onCellClickedcCs$|j�d�|j��|j��dS)zClears the braille cell.�N)r4r!r5rr6r$rrr�clear|s
z
BrlCell.clearNFcCs�|dkrd}n
|dkrd}n|dkrd}|j}|r||j}|j�||�|ttfvr1|j��|ttfvr>|j	��dSdS)z�Displays the specified character in the cell.

        Arguments:
        - char: The character to display in the cell.
        - isCursorCell: If True, the cursor/caret is at this cell and this
          should be indicated visually.
        �&z&amp;�<z&lt;�	z$tN)
r"�MARKUP_CURSOR_CELLr4r!�DOT_7�DOTS_78r5r�DOT_8r6)r�char�mask�isCursorCell�markuprrr�display�s	

�zBrlCell.display)NF)
r'r(r)r*r"rKrr:rGrSrrrrr,Qsr,cs4eZdZdZd
�fdd�	Zdd�Zddd	�Z�ZS)�BrlMona1Displays a GUI braille monitor that mirrors what would be displayed
    by Orca on a connected, configured, and enabled braille display. Cursor
    routing functionality is emulated by each cell being a push button.
    Panning and other functionality found on hardware braille displays will
    be added.� cs�t���|�d�t��}|�|�g|_t|�D]}t|�}|�	||ddd�|j�
|�q|�d�|�dd�|�
d�|�d�dS)zdCreate a new BrlMon.

        Arguments:
        - numCells: how many braille cells to make
        zBraille MonitorrrFzaccept-focusTN)rr�	set_titlerr7r�cells�ranger,r8�append�
set_resizable�set_property�set_skip_taskbar_hint�set_skip_pager_hint)r�numCellsr<�i�cellrrrr�s




zBrlMon.__init__cCs|jD]}|��qdS)z#Clears the braille monitor display.N)rWrG)rr`rrrrG�s

�zBrlMon.clearNc
Csz|��tt|�t|j��}t|�D](}||dk}z||}Wn
ttfy-d}Ynw|j|�||||�qdS)z�Display the given text and highlight the given
        cursor cell.  A cursorCell of 0 means no cell has
        the cursor.

        Arguments:
        - cursorCell: 1-based index of cell with cursor
        - string: len must be <= num cells.
        rN)rG�min�lenrWrX�
IndexError�	TypeErrorrS)r�
cursorCell�stringrP�lengthr_rQ�cellMaskrrr�	writeText�s
��zBrlMon.writeText)rU)N)r'r(r)r*rrGrir+rrrrrT�s
rT)r*�__id__�__version__�__date__�
__copyright__�__license__r@�
gi.repositoryrrFr�input_eventrrLrNrM�	Alignmentr
r1r,�WindowrTrrrr�<module>s &L

Youez - 2016 - github.com/yon3zu
LinuXploit