Sindbad~EG File Manager

Current Path : /proc/2233733/root/usr/local/lib/python3.12/site-packages/Xlib/__pycache__/
Upload File :
Current File : //proc/2233733/root/usr/local/lib/python3.12/site-packages/Xlib/__pycache__/display.cpython-312.pyc

�

%ٜg���
���ddlZddlmZmZmZddlmZmZmZm	Z	ddl
ZddlZddl
ZddlZddlZej j"j$ej j&j(ej j&j*ej j&j,ej j.j0ej j.j2ej j.j4ej j6j8ej j:j<d�	Zdddd	�Z Gd
�dejB�Z"Gd�d
�Z!y)�N�)�error�ext�X)�display�request�event�rq)	�resource�drawable�window�pixmap�fontable�font�gc�colormap�cursor)rr
rrrrrr)r
r)rr)rrrc�:�eZdZej	�Zd�Zdd�Zy)�_BaseDisplayc�X�tjj|f|zi|��i|_y�N)r�Display�__init__�_atom_cache)�self�args�keyss   �7/usr/local/lib/python3.12/site-packages/Xlib/display.pyrz_BaseDisplay.__init__=s'����� � �4�(�T�/�:�T�:����c���||jvr|j|Stj|||��}|jtj
k7r|j|j|<|jS)N�r�name�only_if_exists)rr�
InternAtom�atomr�NONE)r�atomnamer#�rs    r�get_atomz_BaseDisplay.get_atomAse���t�'�'�'��#�#�H�-�-�����h�Q_�`��
�6�6�Q�V�V��)*���D���X�&��v�v�
rN�r)�__name__�
__module__�__qualname__�_resource_baseclasses�copy�resource_classesrr)�rrrr7s��,�1�1�3��
�
rrc���eZdZdEd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�ZdEd�Zd�Zd�Zd�ZdEd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdFd�ZdFd�Zd�Zd�Z		dGd �Z dEd!�Z!dEd"�Z"dEd#�Z#dEd$�Z$dEd%�Z%dEd&�Z&e'jPdddddfd'�Z)dEd(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/dEd.�Z0d/�Z1d0�Z2d1�Z3dEd2�Z4d3�Z5dEd4�Z6d5�Z7dHd6�Z8dId7�Z9d8�Z:dEd9�Z;d:�Z<dEd;�Z=d<�Z>dEd=�Z?dEd>�Z@dEd?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdEdD�ZFy)JrNc�@�t|�|_dgdz|_i|_|j	|jj
j|jj
j|jj
jz
dz�i|_g|_	i|_
i|_tji�|_|j�}t j"D]�\}}||vs�t%d|zt'�d��t)t |�}|j+|�}|jj-||j.�|j1||�|jj3|���|jj5�D]R\}}|jj6|}	t9|	j:|	t<f|�|jj6|<�T|jj
j>D]�}
|jj6d|j|
j@jB�|
_ |jj6d|j|
jDjB�|
_"��y)Nr1�rzext.)�levelr
r)#rr�
_keymap_codes�_keymap_syms�_update_keymap�info�min_keycode�max_keycode�keysym_translations�
extensions�class_extension_dicts�display_extension_methodsr
�DictWrapper�extension_event�list_extensionsr�__extensions__�
__import__�globals�getattr�query_extension�set_extension_major�major_opcode�init�append�itemsr0�typer+�object�roots�root�id�default_colormap)rr�exts�extname�modname�modr9�type_�dict�origcls�screens           rrzDisplay.__init__Os'��#�G�,���!�T�C�Z���������D�L�L�-�-�9�9�!�\�\�.�.�:�:�#�|�|�0�0�<�<�=�?@�A�	C�
$&�� ����%'��"�)+��&�!�~�~�b�1����#�#�%��!$� 2� 2��G�W��$���6�G�+�G�I�A�>��c�7�+���+�+�G�4�����0�0��$�:K�:K�L�����t�$����&�&�w�/�!3�" �5�5�;�;�=�K�E�4��l�l�3�3�E�:�G�37��8H�8H�9@�&�8I�8<�4>�D�L�L�)�)�%�0�>��l�l�'�'�-�-�F�A�$�,�,�7�7��A�$�,�,�PV�P[�P[�P^�P^�_�F�K�&O�d�l�l�&C�&C�J�&O�PT�P\�P\�^d�^u�^u�^x�^x�&y�F�#�.rc�6�|jj�S)z�Returns the name used to connect to the server, either
        provided when creating the Display object, or fetched from the
        environmental variable $DISPLAY.)r�get_display_name�rs rr\zDisplay.get_display_name�s���|�|�,�,�.�.rc�6�|jj�S)z�Returns the file descriptor number of the underlying socket.
        This method is provided to allow Display objects to be passed
        select.select().)r�filenor]s rr_zDisplay.fileno�s���|�|�"�"�$�$rc�8�|jj�y)z7Close the display, freeing the resources that it holds.N)r�closer]s rraz
Display.close�s�������rc�:�|jj|�y)z�Set the default error handler which will be called for all
        unhandled errors. handler should take two arguments as a normal
        request error handler, but the second argument (the request) will
        be None.  See section Error Handling.N)r�set_error_handler)r�handlers  rrczDisplay.set_error_handler�s��
	
���&�&�w�/rc�8�|jj�y)z�Flush the request queue, building and sending the queued
        requests. This can be necessary in applications that never wait
        for events, and in threaded applications.N)r�flushr]s rrfz
Display.flush�s��	
�����rc�$�|j�y)z�Flush the queue and wait until the server has processed all
        the queued requests. Use this e.g. when it is important that
        errors caused by a certain request is trapped.N)�get_pointer_controlr]s r�synczDisplay.sync�s��	
� � �"rc�6�|jj�S)z|Return the next event. If there are no events queued, it will
        block until the next event is fetched from the server.)r�
next_eventr]s rrkzDisplay.next_event�s���|�|�&�&�(�(rc�6�|jj�S)z~Return the number of events queued, i.e. the number of times
        that Display.next_event() can be called without blocking.)r�pending_eventsr]s rrmzDisplay.pending_events�s���|�|�*�*�,�,rc��||jvS)z`Check if both the server and the client library support the X
        extension named extension.)r=)r�	extensions  r�
has_extensionzDisplay.has_extension�s���D�O�O�+�+rc�V�|jj||j|�S)a>Create a resource object of type for the integer id. type
        should be one of the following strings:

        resource
        drawable
        window
        pixmap
        fontable
        font
        gc
        colormap
        cursor

        This function can be used when a resource ID has been fetched
        e.g. from an resource or a command line argument. Resource
        objects should never be created by instantiating the appropriate
        class directly, since any X extensions dynamically added by the
        library will not be available.
        )rr0)rrMrQs   r�create_resource_objectzDisplay.create_resource_object�s&��(3�t�|�|�,�,�T�2�4�<�<��D�Drc�~�	|j|}tj||�S#t$rt	|��wxYwr)r?�types�
MethodType�KeyError�AttributeError)r�attr�functions   r�__getattr__zDisplay.__getattr__�sD��	'��5�5�d�;�H��#�#�H�d�3�3���	'� ��&�&�	'�s�$'�<c��|�7|jjj|jjS|jjj|Sr)rr9rO�default_screen)r�snos  rrZzDisplay.screen�sG���;��<�<�$�$�*�*�4�<�<�+F�+F�G�G��<�<�$�$�*�*�3�/�/rc�T�t|jjj�S)z2Return the total number of screens on the display.)�lenrr9rOr]s r�screen_countzDisplay.screen_count�s���4�<�<�$�$�*�*�+�+rc�6�|jj�S)zQReturn the number of the default screen, extracted from the
        display name.)r�get_default_screenr]s rr�zDisplay.get_default_screen�s���|�|�.�.�0�0rc�V�|dk(r*t||�rtd|z��||j|<y|ftj	|d�z}|D];}t
|}t||�rtd|�d|����	||j||<�=y#t$r||i|j|<Y�[wxYw)a�extension_add_method(object, name, function)

        Add an X extension module method.  OBJECT is the type of
        object to add the function to, a string from this list:

            display
            resource
            drawable
            window
            pixmap
            fontable
            font
            gc
            colormap
            cursor

        NAME is the name of the method, a string.  FUNCTION is a
        normal function whose first argument is a 'self'.
        rz(attempting to replace display method: %sr1zattempting to replace z	 method: N)�hasattr�AssertionErrorr?�_resource_hierarchy�getr.r>rv)rrNr"ryrtrM�clss       r�extension_add_methodzDisplay.extension_add_method�s���*�Y���t�T�"�$�%O�RV�%V�W�W�3;�D�*�*�4�0��J�!4�!8�!8���!D�D�E���+�D�1���3��%�(�RV�X\�)]�^�^�J�=E�D�.�.�t�4�T�:��� �J�9=�x�7I�D�.�.�t�4�J�s�6B�B(�'B(c��t|j|j|jj	��}||_|jj||�|�|j}t|j||�y)a�extension_add_event(code, evt, [name])

        Add an extension event.  CODE is the numeric code, and EVT is
        the event class.  EVT will be cloned, and the attribute _code
        of the new event class will be set to CODE.

        If NAME is omitted, it will be set to the name of EVT.  This
        name is used to insert an entry in the DictWrapper
        extension_event.
        N)
rMr+�	__bases__�__dict__r/�_coder�add_extension_event�setattrrA)r�code�evtr"�newevts     r�extension_add_eventzDisplay.extension_add_eventse���c�l�l�C�M�M��l�l�'�'�)�+��������(�(��v�6��<��<�<�D���$�$�d�D�1rc�<�|jj||�y)z�add_extension_error(code, err)

        Add an extension error.  CODE is the numeric code, and ERR is
        the error class.
        N)r�add_extension_error)rr��errs   rr�zDisplay.add_extension_error.s��	
���(�(��s�3rc�f�	|j||S#t$rtjcYSwxYw)z�Convert a keycode to a keysym, looking in entry index.
        Normally index 0 is unshifted, 1 is shifted, 2 is alt grid, and 3
        is shift+alt grid. If that key entry is not bound, X.NoSymbol is
        returned.)r6�
IndexErrorr�NoSymbol)r�keycode�indexs   r�keycode_to_keysymzDisplay.keycode_to_keysymEs6��
	��%�%�g�.�u�5�5���	��:�:��	�s��0�0c�X�	|j|ddS#ttf$rYywxYw)z�Look up the primary keycode that is bound to keysym. If
        several keycodes are found, the one with the lowest index and
        lowest code is returned. If keysym is not bound to any key, 0 is
        returned.rr)r7rvr�)r�keysyms  r�keysym_to_keycodezDisplay.keysym_to_keycodeOs9��
	��$�$�V�,�Q�/��2�2���*�%�	��	�s��)�)c�z�	|j|D�cgc]}|d|df��c}Scc}w#t$rgcYSwxYw)z�Look up all the keycodes that is bound to keysym. A list of
        tuples (keycode, index) is returned, sorted primarily on the
        lowest index and secondarily on the lowest keycode.rr)r7rv)rr��xs   r�keysym_to_keycodeszDisplay.keysym_to_keycodesYsL��	�*.�*;�*;�F�*C�D�*C�Q�Q�q�T�1�Q�4�L�*C�D�D��D���	��I�	�s�,�'�,�,�:�:c���t|tj�rE|jtj
k(r'|j
|j|j�yytd��)z�This method should be called once when a MappingNotify event
        is received, to update the keymap cache. evt should be the event
        object.zexpected a MappingNotify eventN)
�
isinstancer	�
MappingNotifyrr�MappingKeyboardr8�
first_keycode�count�	TypeError)rr�s  r�refresh_keyboard_mappingz Display.refresh_keyboard_mappingcsS���c�5�.�.�/��{�{�a�/�/�/��#�#�C�$5�$5�s�y�y�A�0��<�=�=rc��||z}|jj�D]@\}}d}|t|�ks�||d}||k\r	||kr||=n|dz}|t|�kr�*�B|j||�}||j|||}|D]{}	d}
|	D]m}|t
jk7rS||jvr3|j|}|j|
|f�|j�n|
|fg|j|<|
dz}
�o|dz}�}y)z?Internal function, called to refresh the keymap cache.
        rrN)	r7rLr�get_keyboard_mappingr6rr�rK�sort)
rr�r��lastcoder��codes�ir��keysyms�symsr��sym�symcodess
             rr8zDisplay._update_keymapms(��!�5�(��!�.�.�4�4�6�M�F�E��A��c�%�j�.��Q�x��{���=�(�T�H�_��a���A��A��c�%�j�.�7��+�+�M�5�A��6=����=��2����D��E����!�*�*�$��d�/�/�/�#'�#4�#4�S�#9�� �����
�6� �
�
��38�$�-���)�)�#�.���	����!�8�D�rc�~�|jj|�}|�|Sddl}|jj	|�S)zhReturn a string corresponding to KEYSYM, or None if no
        reasonable translation is found.
        Nr)r<r��Xlib.XK�XK�keysym_to_string)rr��s�Xlibs    r�
lookup_stringzDisplay.lookup_string�s<��
�$�$�(�(��0���=��H���w�w�'�'��/�/rc�b�|�	|j|=y||j|<y#t$rYywxYw)ztChange the translation of KEYSYM to NEWSTRING.
        If NEWSTRING is None, remove old translation if any.
        N)r<rv)rr��	newstrings   r�
rebind_stringzDisplay.rebind_string�sC����
��,�,�V�4�09�D�$�$�V�,���
��
�s�
"�	.�.rc�^�tj|j||��}|jS)z�Intern the string name, returning its atom number. If
        only_if_exists is true and the atom does not already exist, it
        will not be created and X.NONE is returned.r!)rr$rr%)rr"r#r(s    r�intern_atomzDisplay.intern_atom�s,��
������&*�0>�
@���v�v�
rc�:�|jj||�S)z+Alias for intern_atom, using internal cache)rr))rr%r#s   rr)zDisplay.get_atom�s���|�|�$�$�T�>�:�:rc�\�tj|j|��}|jS)zfLook up the name of atom, returning it as a string. Will raise
        BadAtom if atom does not exist.)rr%)r�GetAtomNamerr")rr%r(s   r�
get_atom_namezDisplay.get_atom_name�s&��
���$�,�,�'+�
-���v�v�
rc�\�tj|j|��}|jS)z}Return the window that owns selection (an atom), or X.NONE if
        there is no owner for the selection. Can raise BadAtom.)r�	selection)r�GetSelectionOwnerr�owner)rr�r(s   r�get_selection_ownerzDisplay.get_selection_owner�s&��
�%�%����2;�
=���w�w�rc�N�tj|j|||||��y)a=Send a synthetic event to the window destination which can be
        a window object, or X.PointerWindow or X.InputFocus. event is the
        event object to send, instantiated from one of the classes in
        protocol.events. See XSendEvent(3X11) for details.

        There is also a Window.send_event() method.)r�onerror�	propagate�destination�
event_maskr	N)r�	SendEventr)rr�r	r�r�r�s      r�
send_eventzDisplay.send_event�s'��	���D�L�L�$+�&/�(3�'1�"'�	)rc�H�tj|j||��y)zQelease a grabbed pointer and any queued events. See
        XUngrabPointer(3X11).�rr��timeN)r�
UngrabPointerr�rr�r�s   r�ungrab_pointerzDisplay.ungrab_pointer�s��	������(/�%)�	+rc�L�tj|j||||��y)z\Change the dynamic parameters of a pointer grab. See
        XChangeActivePointerGrab(3X11).)rr�rr�r�N)r�ChangeActivePointerGrabr)rr�rr�r�s     r�change_active_pointer_grabz"Display.change_active_pointer_grab�s%��	�'�'�$�,�,�29�17�/3�5?�		Arc�H�tj|j||��y)zSUngrab a grabbed keyboard and any queued events. See
        XUngrabKeyboard(3X11).r�N)r�UngrabKeyboardrr�s   r�ungrab_keyboardzDisplay.ungrab_keyboard�s��	������)0�&*�	,rc�J�tj|j|||��y)z�Release some queued events. mode should be one of
        X.AsyncPointer, X.SyncPointer, X.AsyncKeyboard, X.SyncKeyboard,
        X.ReplayPointer, X.ReplayKeyboard, X.AsyncBoth, or X.SyncBoth.
        time should be a timestamp or X.CurrentTime.)rr��moder�N)r�AllowEventsr)rr�r�r�s    r�allow_eventszDisplay.allow_events�s!��
	���d�l�l�&-�#'�#'�	)rc�F�tj|j|��y)z�Disable processing of requests on all other client connections
        until the server is ungrabbed. Server grabbing should be avoided
        as much as possible.�rr�N)r�
GrabServerr�rr�s  r�grab_serverzDisplay.grab_server�s��	���T�\�\�%,�	.rc�F�tj|j|��y)z?Release the server if it was previously grabbed by this client.r�N)r�UngrabServerrr�s  r�
ungrab_serverzDisplay.ungrab_servers�����t�|�|�'.�	0rc	�r�tj|j||tj||||||��
y)a�Move the pointer relative its current position by the offsets
        (x, y). However, if src_window is a window the pointer is only
        moved if the specified rectangle in src_window contains it. If
        src_width is 0 it will be replaced with the width of src_window -
        src_x. src_height is treated in a similar way.

        To move the pointer to absolute coordinates, use Window.warp_pointer().)
rr��
src_window�
dst_window�src_x�src_y�	src_width�
src_height�dst_x�dst_yN)r�WarpPointerrrr&)	rr��yr�r�r�r�r�r�s	         r�warp_pointerzDisplay.warp_pointers7��	���d�l�l�&-�)3�)*���$)�$)�(1�)3�$%�$%�		'rc�L�tj|j||||��y)aeSet input focus to focus, which should be a window,
        X.PointerRoot or X.NONE. revert_to specifies where the focus
        reverts to if the focused window becomes not visible, and should
        be X.RevertToParent, RevertToPointerRoot, or RevertToNone. See
        XSetInputFocus(3X11) for details.

        There is also a Window.set_input_focus().)rr��	revert_to�focusr�N)r�
SetInputFocusr)rr�r�r�r�s     r�set_input_focuszDisplay.set_input_focuss$��	������(/�*3�&+�%)�		+rc�B�tj|j��S)a(Return an object with the following attributes:

        focus
            The window which currently holds the input
            focus, X.NONE or X.PointerRoot.
        revert_to
            Where the focus will revert, one of X.RevertToParent,
            RevertToPointerRoot, or RevertToNone. �r)r�
GetInputFocusrr]s r�get_input_focuszDisplay.get_input_focus-s���$�$�t�|�|�<�<rc�Z�tj|j��}|jS)aZReturn a bit vector for the logical state of the keyboard,
        where each bit set to 1 indicates that the corresponding key is
        currently pressed down. The vector is represented as a list of 32
        integers. List item N contains the bits for keys 8N to 8N + 7
        with the least significant bit in the byte representing key 8N.r�)r�QueryKeymapr�map�rr(s  r�query_keymapzDisplay.query_keymap8s!��
���$�,�,�7���u�u�rc���|jj�}tjtj�}tj|j|||��|j�|j�r|jj|�y|jjdtjjj�}||j|d��S)z�Open the font identifed by the pattern name and return its
        font object. If name does not match any font, None is returned.)rr��fidr"Nrr)r�)r�allocate_resource_idr�
CatchError�BadNamer�OpenFontri�	get_error�free_resource_id�get_resource_classr��xobjectr�Font)rr"r�ecr�s     r�	open_fontzDisplay.open_fontAs����l�l�/�/�1��
�
�
�e�m�m�
,�����4�<�<�#%�"� $�	&�	
�	�	��
�<�<�>��L�L�)�)�#�.���,�,�1�1�&�$�,�,�:O�:O�:T�:T�U�C��t�|�|�S�!�4�4rc�^�tj|j||��}|jS)z^Return a list of font names matching pattern. No more than
        max_names will be returned.�r�	max_names�pattern)r�	ListFontsr�fonts)rrrr(s    r�
list_fontszDisplay.list_fontsTs+��
������*3�(/�
1���w�w�rc�F�tj|j||��S)a%Return a list of fonts matching pattern. No more than
        max_names will be returned. Each list item represents one font
        and has the following properties:

        name
            The name of the font.
        min_bounds
        max_bounds
        min_char_or_byte2
        max_char_or_byte2
        default_char
        draw_direction
        min_byte1
        max_byte1
        all_chars_exist
        font_ascent
        font_descent
        replies_hint
            See the descripton of XFontStruct in XGetFontProperty(3X11)
            for details on these values.
        properties
            A list of properties. Each entry has two attributes:

            name
                The atom identifying this property.
            value
                A 32-bit unsigned value.
        r)r�ListFontsWithInfor)rrrs   r�list_fonts_with_infozDisplay.list_fonts_with_info\s#��:�(�(�4�<�<�5>�3:�<�	<rc�H�tj|j||��y)z�Set the font path to path, which should be a list of strings.
        If path is empty, the default font path of the server will be
        restored.)rr��pathN)r�SetFontPathr)rrr�s   r�
set_font_pathzDisplay.set_font_path}s��	���d�l�l�&-�#'�	)rc�Z�tj|j��}|jS)z2Return the current font path as a list of strings.r�)r�GetFontPathr�pathsrs  r�
get_font_pathzDisplay.get_font_path�s�����$�,�,�7���w�w�rc�b�tj|j|��}|jr|Sy)a�Ask the server if it supports the extension name. If it is
        supported an object with the following attributes is returned:

        major_opcode
            The major opcode that the requests of this extension uses.
        first_event
            The base event code if the extension have additional events, or 0.
        first_error
            The base error code if the extension have additional errors, or 0.

        If the extension is not supported, None is returned.)rr"N)r�QueryExtensionr�present)rr"r(s   rrGzDisplay.query_extension�s,��
�"�"�T�\�\�*.�
0���9�9��H�rc�Z�tj|j��}|jS)z;Return a list of all the extensions provided by the server.r�)r�ListExtensionsr�namesrs  rrBzDisplay.list_extensions�s���"�"�T�\�\�:���w�w�rc�J�tj|j|||��y)z�Modify the keyboard mapping, starting with first_keycode.
        keysyms is a list of tuples of keysyms. keysyms[n][i] will be
        assigned to keycode first_keycode+n at index i.)rr�r�r�N)r�ChangeKeyboardMappingr)rr�r�r�s    r�change_keyboard_mappingzDisplay.change_keyboard_mapping�s!��	�%�%����07�6C�07�	9rc�^�tj|j||��}|jS)zsReturn the current keyboard mapping as a list of tuples,
        starting at first_keycount and no more than count.)rr�r�)r�GetKeyboardMappingrr�)rr�r�r(s    rr�zDisplay.get_keyboard_mapping�s,��
�&�&����7D�/4�
6���y�y�rc�H�tj|j||��y)a�Change the parameters provided as keyword arguments:

        key_click_percent
            The volume of key clicks between 0 (off) and 100 (load).
            -1 will restore default setting.
        bell_percent
            The base volume of the bell, coded as above.
        bell_pitch
            The pitch of the bell in Hz, -1 restores the default.
        bell_duration
            The duration of the bell in milliseconds, -1 restores
            the default.
        led

        led_mode
            led_mode should be X.LedModeOff or X.LedModeOn. If led is
            provided, it should be a 32-bit mask listing the LEDs that
            should change. If led is not provided, all LEDs are changed.
        key

        auto_repeat_mode
            auto_repeat_mode should be one of X.AutoRepeatModeOff,
            X.AutoRepeatModeOn, or X.AutoRepeatModeDefault. If key is
            provided, that key will be modified, otherwise the global
            state for the entire keyboard will be modified.)rr��attrsN)r�ChangeKeyboardControlr)rr�rs   r�change_keyboard_controlzDisplay.change_keyboard_control�s��4	�%�%����07�.2�	4rc�B�tj|j��S)a�Return an object with the following attributes:

        global_auto_repeat
            X.AutoRepeatModeOn or X.AutoRepeatModeOff.

        auto_repeats
            A list of 32 integers. List item N contains the bits for keys
            8N to 8N + 7 with the least significant bit in the byte
            representing key 8N. If a bit is on, autorepeat is enabled
            for the corresponding key.

        led_mask
            A 32-bit mask indicating which LEDs are on.

        key_click_percent
            The volume of key click, from 0 to 100.

        bell_percent

        bell_pitch

        bell_duration
            The volume, pitch and duration of the bell. r�)r�GetKeyboardControlrr]s r�get_keyboard_controlzDisplay.get_keyboard_control�s��0�)�)�D�L�L�A�Arc�H�tj|j||��y)z_Ring the bell at the volume percent which is relative the base
        volume. See XBell(3X11).)rr��percentN)r�Bellr)rr5r�s   r�bellzDisplay.bell�s��	���t�|�|�&�&�	(rc	�~�|�d}d}d}nd}|\}}|�d}nd}tj|j||||||��y)a/To change the pointer acceleration, set accel to a tuple (num,
        denum). The pointer will then move num/denum times the normal
        speed if it moves beyond the threshold number of pixels at once.
        To change the threshold, set it to the number of pixels. -1
        restores the default.Nrr)rr��do_accel�do_thres�	accel_num�accel_denum�	threshold)r�ChangePointerControlr)r�accelr=r�r9r;r<�do_thresholds        r�change_pointer_controlzDisplay.change_pointer_control�s]���=��H��I��K��H�%*�"�I�{����L��L��$�$�t�|�|�/6�08�0<�1:�3>�1:�
	<rc�B�tj|j��S)aReturn an object with the following attributes:

        accel_num

        accel_denom
            The acceleration as numerator/denumerator.

        threshold
            The number of pixels the pointer must move before the
            acceleration kicks in.r�)r�GetPointerControlrr]s rrhzDisplay.get_pointer_control
s���(�(�4�<�<�@�@rc�N�tj|j|||||��y)zSee XSetScreenSaver(3X11).)rr��timeout�interval�prefer_blank�allow_exposuresN)r�SetScreenSaverr)rrErFrGrHr�s      r�set_screen_saverzDisplay.set_screen_savers&��������)0�)0�*2�.:�1@�	Brc�B�tj|j��S)z�Return an object with the attributes timeout, interval,
        prefer_blanking, allow_exposures. See XGetScreenSaver(3X11) for
        details.r�)r�GetScreenSaverrr]s r�get_screen_saverzDisplay.get_screen_saver#s���%�%����=�=rc�L�tj|j||||��y)z�mode is either X.HostInsert or X.HostDelete. host_family is
        one of X.FamilyInternet, X.FamilyDECnet or X.FamilyChaos.

        host is a list of bytes. For the Internet family, it should be the
        four bytes of an IPv4 address.)rr�r��host_family�hostN)r�ChangeHostsr)rr�rOrPr�s     r�change_hostszDisplay.change_hosts)s$��	���d�l�l�&-�#'�*5�#'�		)rc�B�tj|j��S)a�Return an object with the following attributes:

mode
    X.EnableAccess if the access control list is used, X.DisableAccess otherwise.
hosts
    The hosts on the access list. Each entry has the following attributes:

    family
        X.FamilyInternet, X.FamilyDECnet, or X.FamilyChaos.
    name
        A list of byte values, the coding depends on family. For the Internet family, it is the 4 bytes of an IPv4 address.

r�)r�	ListHostsrr]s r�
list_hostszDisplay.list_hosts5s��� � �4�<�<�8�8rc�H�tj|j||��y)z{Enable use of access control lists at connection setup if mode
        is X.EnableAccess, disable if it is X.DisableAccess.�rr�r�N)r�SetAccessControlr�rr�r�s   r�set_access_controlzDisplay.set_access_controlEs��	� � �4�<�<�+2�(,�	.rc�H�tj|j||��y)z�Control what will happen with the client's resources at
        connection close. The default is X.DestroyAll, the other values
        are X.RetainPermanent and X.RetainTemporary.rWN)r�SetCloseDownModerrYs   r�set_close_down_modezDisplay.set_close_down_modeL���	� � �4�<�<�+2�(,�	.rc�H�tj|j||��y)z�If mode is X.ScreenSaverActive the screen saver is activated.
        If it is X.ScreenSaverReset, the screen saver is deactivated as
        if device input had been received.rWN)r�ForceScreenSaverrrYs   r�force_screen_saverzDisplay.force_screen_saverTr^rc�\�tj|j|��}|jS)a^Set the mapping of the pointer buttons. map is a list of
        logical button numbers. map must be of the same length as the
        list returned by Display.get_pointer_mapping().

        map[n] sets the
        logical number for the physical button n+1. Logical number 0
        disables the button. Two physical buttons cannot be mapped to the
        same logical number.

        If one of the buttons to be altered are
        logically in the down state, X.MappingBusy is returned and the
        mapping is not changed. Otherwise the mapping is changed and
        X.MappingSuccess is returned.)rr)r�SetPointerMappingr�status)rrr(s   r�set_pointer_mappingzDisplay.set_pointer_mapping\s&��
�%�%����,/�
1���x�x�rc�Z�tj|j��}|jS)z�Return a list of the pointer button mappings. Entry N in the
        list sets the logical button number for the physical button N+1.r�)r�GetPointerMappingrrrs  r�get_pointer_mappingzDisplay.get_pointer_mappingns!��
�%�%����=���u�u�rc�\�tj|j|��}|jS)a(Set the keycodes for the eight modifiers X.Shift, X.Lock,
        X.Control, X.Mod1, X.Mod2, X.Mod3, X.Mod4 and X.Mod5. keycodes
        should be a eight-element list where each entry is a list of the
        keycodes that should be bound to that modifier.

        If any changed
        key is logically in the down state, X.MappingBusy is returned and
        the mapping is not changed. If the mapping violates some server
        restriction, X.MappingFailed is returned. Otherwise the mapping
        is changed and X.MappingSuccess is returned.)r�keycodes)r�SetModifierMappingrrd)rrjr(s   r�set_modifier_mappingzDisplay.set_modifier_mappingts&��
�&�&����2:�
<���x�x�rc�Z�tj|j��}|jS)z�Return a list of eight lists, one for each modifier. The list
        can be indexed using X.ShiftMapIndex, X.Mod1MapIndex, and so on.
        The sublists list the keycodes bound to that modifier.r�)r�GetModifierMappingrrjrs  r�get_modifier_mappingzDisplay.get_modifier_mapping�s"��
�&�&����>���z�z�rc�F�tj|j|��y)z,Do nothing but send a request to the server.r�N)r�NoOperationrr�s  r�no_operationzDisplay.no_operation�s�����d�l�l�&-�	/rrr*)rrN)rN)NNN)Gr+r,r-rr\r_rarcrfrirkrmrprrrzrZr�r�r�r�r�r�r�r�r�r8r�r�r�r)r�r�r�r�r�r�r�r�r�rr&r�r�r�rrrrrr!rGrBr*r�r0r3r7rArhrJrMrRrUrZr]rarerhrlrorrr1rrrrNsu��3z�l/�%��0��#�)�
-�
,�
E�.'�0�,�1�&J�P2�04�.���>�$�T	0�
9�"�;�
��JK�!�
)�+�A�,�)�.�0�
/0�f�f�a��!"��d�'�(+�	=��5�&�<�B)��
�&�
9��4�<B�4(�<�6A�B�>�
)�9� .�.�.��$�
��/rr)#rt�rrr�
Xlib.protocolrrr	r
�Xlib.xobject.resourcer��Xlib.xobject.drawable�Xlib.xobject.fontable�Xlib.xobject.colormap�Xlib.xobject.cursorrr�Resourcer�Drawable�Window�Pixmapr�Fontabler
�GCr�Colormapr�Cursorr.r�rrr1rr�<module>r�s��(
���6�5���������%�%�.�.����%�%�.�.��l�l�#�#�*�*��l�l�#�#�*�*����%�%�.�.��L�L�!�!�&�&�
�,�,�
�
�
"�
"����%�%�.�.��l�l�!�!�(�(�
��'�%�����7�?�?��./�/r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists