%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/libevdev/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/libevdev/__pycache__/_clib.cpython-312.pyc

�

�o�Z����H�ddlZddlZddlZddlZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
d	Zd
ZdZ
dZGd
�dej�ZGd�dej�ZGd�de�ZGd�de�ZGd�dej�ZGd�de�Zy)�N)�c_char_p)�c_int)�c_uint)�c_void_p)�c_long)�c_int32)�c_uint16����c�4�eZdZdefdefdefdefdefdefgZy)�
_InputAbsinfo�value�minimum�maximum�fuzz�flat�
resolutionN)�__name__�
__module__�__qualname__r�_fields_���0/usr/lib/python3/dist-packages/libevdev/_clib.pyrr*s9���'�"��G�$��G�$���!���!��w�'�)�Hrrc�.�eZdZdefdefdefdefdefgZy)�_InputEvent�sec�usec�type�coderN)rrrrr	rrrrrrr3s0������� ���"���"��'�"�	$�Hrrc�J��eZdZdZdZiZ�fd�Zed��Ze	d��Z
�xZS)�_LibraryWrapperzH
    Base class for wrapping a shared library. Do not use directly.
    Nc�J��tt|��|j�y�N)�superr$�__init__�_load)�self�	__class__s �rr(z_LibraryWrapper.__init__Js���
�o�t�-�/��
�
�rc�p�|j�|jS|j�|_|jj�D]a\}}t	|j|�}|d|_|d|_td�}tj|d||d�}t|||��c|jS)N�argtypes�restype�libevdev�name)�_lib�_cdll�_api_prototypes�items�getattrr-r.�len�dict�get�setattr)�clsr0�attrs�func�prefix�pynames      rr)z_LibraryWrapper._loadNs����8�8���8�8�O��9�9�;��� �0�0�6�6�8�
	'�M�T�5��3�8�8�T�*�D�!�*�-�D�M� ��+�D�L�
��_�F��X�X�e�V�T�&�'�]�;�F��C���&�
	'��x�x�rc��t�)zOverride in subclass)�NotImplementedErrorrrrr2z_LibraryWrapper._cdllbs
��"�!r)rrr�__doc__r1r3r(�classmethodr)�staticmethodr2�
__classcell__�r+s@rr$r$;sC�����D��O������&�"��"rr$c�<��eZdZdZed��Zidefed��defed��deefed��deefed��defed��d	efed��d
efed��dde	d��d
e	fdd��de	fed��de	efdd��de	fed��de	efdd��de	fed��de	efdd��de	fed��de	efed��ide	fed��de	fed��de	fed��de	fed��de	efdd��de	efdd��de	efdd��de	efdd��de	efed��d e	efed��d!e	fed��d"e	efed��d#e	efe
je�d��d$e	ee
je�fed��d%e	efed��d&e	efed��d'e	eefed���e	eeefed�e	eefed�e	efed�e	eee	fed�e	efed�e	eefed�e	efed�e	ee
je
�fed�e	fed�e	fed�e	eefed�e	eeefed�e	fed�d(�
�ZdJ�fd)�	Zd*�Zed+��Zej&d,��Zed-��Zej&d.��Zed/��Zej&d0��Zed1��Zed2��Zej&d3��Zd4�Zed5��Zej&d6��ZdKd7�ZdLd8�Zed9��Zed:��Zed;��ZedJd<��Z edJd=��Z!d>�Z"dJd?�Z#d@�Z$dJdA�Z%edB��Z&edC��Z'dJdD�Z(dMdE�Z)dJdF�Z*dG�Z+dH�Z,e-fdI�Z.�xZ/S)N�Libevdeva�
    This class provides a wrapper around the libevdev C library.

    The API is modelled closely after the C API. API documentation in this
    document only lists the specific behavior of the Phython API. For
    information on the behavior of libevdev itself, see

    https://www.freedesktop.org/software/libevdev/doc/latest/

    Properties in this class are read-write unless specified otherwise.

    .. warning::

        Do not use this class directly
    c�0�tjdd��S�Nz
libevdev.so.2T)�	use_errno��ctypes�CDLLrrrr2zLibevdev._cdlly����{�{�?�d�;�;r�libevdev_event_type_get_name�r-r.�libevdev_event_type_from_name�libevdev_event_code_get_name�libevdev_event_code_from_name�libevdev_property_get_name�libevdev_property_from_name�libevdev_event_type_get_max�libevdev_newr�
libevdev_freeN�libevdev_get_name�libevdev_set_name�libevdev_get_phys�libevdev_set_phys�libevdev_get_uniq�libevdev_set_uniq�libevdev_get_driver_version�libevdev_set_clock_id�libevdev_get_id_bustype�libevdev_get_id_vendor�libevdev_get_id_product�libevdev_get_id_version�libevdev_set_id_bustype�libevdev_set_id_vendor�libevdev_set_id_product�libevdev_set_id_version�libevdev_set_fd�libevdev_change_fd�libevdev_get_fd�
libevdev_grab�libevdev_get_abs_info�libevdev_kernel_set_abs_info�libevdev_has_property�libevdev_has_event_type�libevdev_has_event_code)
�libevdev_set_event_value�libevdev_get_event_value�libevdev_enable_event_type�libevdev_enable_event_code�libevdev_disable_event_type�libevdev_disable_event_code�libevdev_enable_property�libevdev_next_event�libevdev_get_num_slots�libevdev_get_current_slot�libevdev_get_slot_value�libevdev_set_slot_value�libevdev_has_event_pendingc�v��tt|��|j�|_d|_|�||_yy)a>
        :param fd: A file-like object

        Create a new libevdev instance. If a file is given this call is
        equivalent to ``libevdev_new_from_fd()``, otherwise it is equivalent
        to ``libevdev_new()``::

                fd = open("/dev/input/event0", "rb")
                l = libevdev.Libevdev(fd)
                # l now represents the device on event0

                l2 = libevdev.Libevdev()
                l2.name = "test device"
                l2.enable("EV_REL", "REL_X")
                # l2 is an unbound device with the REL_X bit set

        N)r'rGr(�_new�_ctx�_file�fd)r*r�r+s  �rr(zLibevdev.__init__js7���$	�h��&�(��I�I�K��	���
�
�>��D�G�rc�T�t|d�r|j|j�yy)Nr�)�hasattr�_freer��r*s r�__del__zLibevdev.__del__�s!���4�� ��J�J�t�y�y�!�!rc�V�|j|j�jd�S)zB
        :return: A string with the device's kernel name.
        �	iso8859-1)�	_get_namer��decoder�s rr0z
Libevdev.name�s"��
�~�~�d�i�i�(�/�/��<�<rc�`�|�d}|j|j|jd��S�N�r�)�	_set_namer��encode)r*r0s  rr0z
Libevdev.name�s*���<��D��~�~�d�i�i����[�)A�B�Brc�`�|j|j�}|sy|jd�S)zJ
        :return: A string with the device's kernel phys or None.
        Nr�)�	_get_physr�r��r*�physs  rr�z
Libevdev.phys��+��
�~�~�d�i�i�(�����{�{�;�'�'rc�`�|�d}|j|j|jd��Sr�)�	_set_physr�r�r�s  rr�z
Libevdev.phys��,���<��D��~�~�d�i�i����[�)A�B�Brc�`�|j|j�}|sy|jd�S)zJ
        :return: A string with the device's kernel uniq or None.
        Nr�)�	_get_uniqr�r��r*�uniqs  rr�z
Libevdev.uniq�r�rc�`�|�d}|j|j|jd��Sr�)�	_set_uniqr�r�r�s  rr�z
Libevdev.uniq�r�rc�8�|j|j�S)z"
        :note: Read-only
        )�_get_driver_versionr�r�s r�driver_versionzLibevdev.driver_version�s��
�'�'��	�	�2�2rc���|j|j�}|j|j�}|j|j�}|j	|j�}||||d�S)a+
        :return: A dict with the keys 'bustype', 'vendor', 'product', 'version'.

        When used as a setter, only existing keys are applied to the
        device. For example, to update the product ID only::

                ctx = Libevdev()
                id["property"] = 1234
                ctx.id = id

        This is a combined version of the libevdev calls
        ``libevdev_get_id_busytype()``, ``libevdev_get_id_vendor()``,
        ``libevdev_get_id_product()``, ``libevdev_get_id_version()`` and the
        respective setters.

        )�bustype�vendor�product�version)�_get_id_bustyper��_get_id_vendor�_get_id_product�_get_id_version)r*�bus�vdr�pro�vers     r�idzLibevdev.id�sj��$�"�"�4�9�9�-���!�!�$�)�)�,���"�"�4�9�9�-���"�"�4�9�9�-������ �	 rc��d|vr|j|j|d�d|vr|j|j|d�d|vr|j|j|d�d|vr |j	|j|d�yy)Nr�r�r�r�)�_set_id_bustyper��_set_id_vendor�_set_id_product�_set_id_version)r*�valss  rr�zLibevdev.id�s������� � ����D��O�<��t������	�	�4��>�:����� � ����D��O�<����� � ����D��O�<�rc�:�|j|j|�S)zr
        :param clock: time.CLOCK_MONOTONIC
        :return: a negative errno on failure or 0 on success.
        )�
_set_clock_idr�)r*�clocks  r�set_clock_idzLibevdev.set_clock_id�s��
�!�!�$�)�)�U�3�3rc��|jS)aO
        :return: The file-like object used during constructor or in the most
                 recent assignment to self.fd.

        When assigned the first time and no file has been passed to the
        constructor, the assignment is equivalent to ``libevdev_set_fd()``.
        Subsequently, any assignments are equivalent to
        ``libevdev_change_fd``::

                fd = open("/dev/input/event0", "rb")
                l = libevdev.Libevdev(fd)
                assert(l.fd == fd)

                fd2 = open("/dev/input/event0", "rb")
                l.fd = fd2
                assert(l.fd == fd2)

                l = libevdev.Libevdev()
                l.fd = fd
                assert(l.fd == fd)
                l.fd = fd2
                assert(l.fd == fd2)

        :note: libevdev uses the ``fileno()`` of the object.
        )r�r�s rr�zLibevdev.fd�s��6�z�z�rc��	|j�}|j�|j|j|�}n|j|j|�}|dk7r!t|tj|���|j|j�|k7rtd�||_y#t$rtj�wxYw)NrzFIXME: fileno() != get_fd())
�fileno�AttributeErrorr/�InvalidFileErrorr��_set_fdr��
_change_fd�OSError�os�strerror�_get_fd�print)r*�fileobjr��rs    rr�zLibevdev.fds���	,����!�B��:�:�����T�Y�Y��+�A�����	�	�2�.�A���6��1�"�b�k�k�1�"�o�.�.��<�<��	�	�"�b�(��/�0���
���	,��+�+�+�	,�s�B.�.Cc��|rd}nd}|j|j|�}|dk7r!t|tj|���y)z�
        :param enable_grab: True to grab, False to ungrab
        :return: 0 on success or a negative errno on failure
        �rrN)�_grabr�r�r�r�)r*�enable_grab�moder�s    r�grabz
Libevdev.grabsJ����D��D��J�J�t�y�y�$�'����6��1�"�b�k�k�1�"�o�.�.�rc�j�t|t�s-|jd�s
t��|j	d|�}|j|j|�}|sy|��d|vr|d|j_d|vr|d|j_	d|vr|d|j_
d|vr|d|j_d|vr|d|j_d	|vr|d	|j_
|rC|j|j||�}|d
k7r!t|t!j"|���|jj|jj|jj|jj|jj|jjd�S)a�
        :param code: the ABS_<*> code as integer or as string
        :param new_values: a dict with the same keys as the return values.
        :param kernel: If True, assigning new values corresponds to ``libevdev_kernel_set_abs_info``
        :return: a dictionary with the keys "value", "min", "max",
                 "resolution", "fuzz", "flat"; ``None`` if the code does not exist on
                 this device

        :note: The returned value is a copy of the value returned by
               libevdev. Changing a value in the dictionary does not change the
               matching property. To change the device, reassign the
               dictionary to the absinfo code.
               This is different to the libevdev behavior.
        �ABS_�EV_ABSNrrrrrrr)rrrrrr)�
isinstance�int�
startswith�
ValueError�event_to_value�
_get_abs_infor��contentsrrrrrr�_kernel_set_abs_infor�r�r�)r*r"�
new_values�kernel�absinfo�rcs      rr�zLibevdev.absinfo)s����$��$��?�?�6�*� �l�"��&�&�x��6�D��$�$�T�Y�Y��5�����!��J�&�+5�i�+@�� � �(��J�&�+5�i�+@�� � �(��*�$�)3�G�)<�� � �&���#�(2�6�(:�� � �%���#�(2�6�(:�� � �%��z�)�.8��.F�� � �+���.�.�t�y�y�$��H����7�!�2�#�r�{�{�B�3�'7�8�8� �)�)�/�/�"�+�+�3�3�"�+�+�3�3��(�(�-�-��(�(�-�-�%�.�.�9�9�;�	;rc�L�|j|�}|sy|jd�S)z�
        :param prop: the numerical property value
        :return: A string with the property name or ``None``

        This function is the equivalent to ``libevdev_property_get_name()``
        Nr�)�_property_get_namer�)r:�propr0s   r�property_to_namezLibevdev.property_to_name[s)���%�%�d�+�����{�{�;�'�'rc�R�|j|jd��}|dk(ry|S)z�
        :param prop: the property name as string
        :return: The numerical property value or ``None``

        This function is the equivalent to ``libevdev_property_from_name()``
        r����N)�_property_from_namer�)r:r��vs   r�property_to_valuezLibevdev.property_to_valuehs,��
�#�#�D�K�K��$<�=����7���rc�x�t|t�s|j|�}|j|�}|dkDr|SdS)z�
        :param type: the EV_<*> event type
        :return: the maximum code for this type or ``None`` if the type is
                 invalid
        r�N)r�r�r��_event_type_get_max)r:r!�ms   r�type_maxzLibevdev.type_maxus?���$��$��%�%�d�+�D��#�#�D�)����F�q�$��$rc�v�|�|j||�}n|j|�}|sy|jd�S)am
        :param event_type: the numerical event type value
        :param event_code: optional, the numerical event code value
        :return: the event code name if a code is given otherwise the event
                 type name.

        This function is the equivalent to ``libevdev_event_code_get_name()``
        and ``libevdev_event_type_get_name()``
        Nr�)�_event_code_get_name�_event_type_get_namer�)r:�
event_type�
event_coder0s    r�
event_to_namezLibevdev.event_to_name�sA���!��+�+�J�
�C�D��+�+�J�7�D����{�{�;�'�'rc���|�Ct|t�s|j|�}|j||j	d��}n |j|j	d��}|dk(ry|S)ae
        :param event_type: the event type as string
        :param event_code: optional, the event code as string
        :return: the event code value if a code is given otherwise the event
                 type value.

        This function is the equivalent to ``libevdev_event_code_from_name()``
        and ``libevdev_event_type_from_name()``
        Nr�r�)r�r�r��_event_code_from_namer��_event_type_from_name)r:r�r�r�s    rr�zLibevdev.event_to_value�sk���!��j�#�.� �/�/�
�;�
��)�)�*�j�6G�6G��6T�U�A��)�)�*�*;�*;�K�*H�I�A���7���rc��t|t�s|j|�}|j|j|�}t|�S)z�
        :param prop: a property, either as integer or string
        :return: True if the device has the property, False otherwise
        )r�r�r��
_has_propertyr��bool)r*r�r�s   r�has_propertyzLibevdev.has_property�s=��
�$��$��)�)�$�/�D����t�y�y�$�/���A�w�rc�*�t|t�s|j|�}|�'|j|j|�}t
|�St|t�s|j||�}|j|j||�}t
|�S)a
        :param event_type: the event type, either as integer or as string
        :param event_code: optional, the event code, either as integer or as
                           string
        :return: True if the device has the type and/or code, False otherwise
        )r�r�r��_has_event_typer��_has_event_coder�)r*r�r�r�s    r�	has_eventzLibevdev.has_event�s����*�c�*��,�,�Z�8�J����$�$�T�Y�Y�
�;�A�
�A�w���j�#�.�!�0�0��Z�H�
��$�$�T�Y�Y�
�J�G�A��A�w�rc��t|t�s|j|�}|�"t|t�s|j||�}||fS)z�
        Resolves a type+code tuple, either of which could be integer or
        string. Returns a (t, c) tuple in integers
        )r�r�r�)r*�t�cs   r�_codezLibevdev._code�sG��
�!�S�!��#�#�A�&�A��=��A�s�!3��#�#�A�q�)�A��1�v�
rc���|j||�\}}|j||�sy|�|j|j|||�|j	|j||�}|S)aH
        :param event_type: the event type, either as integer or as string
        :param event_code: the event code, either as integer or as string
        :param new_value: optional, the value to set to
        :return: the current value of type + code, or ``None`` if it doesn't
                 exist on this device
        N)r�r��_set_event_valuer��_get_event_value)r*r�r��	new_valuer�r�r�s       r�event_valuezLibevdev.event_value�sd���z�z�*�j�1���1��~�~�a��#��� ��!�!�$�)�)�Q��9�=��!�!�$�)�)�Q��2���rc�J�|j|j�}|dk\r|SdS)z�
        :return: the number of slots on this device or ``None`` if this device
                 does not support slots

        :note: Read-only
        rN)�_get_num_slotsr��r*�ss  r�	num_slotszLibevdev.num_slots�s)��
����	�	�*����F�q�$��$rc�J�|j|j�}|dk\r|SdS)z�
        :return: the current of slots on this device or ``None`` if this device
                 does not support slots

        :note: Read-only
        rN)�_get_current_slotr�rs  r�current_slotzLibevdev.current_slot�s)��
�"�"�4�9�9�-����F�q�$��$rc��|jd|�\}}|�|j|j|||�|j|j||�}|S)a>
        :param slot: the numeric slot number
        :param event_code: the ABS_<*> event code, either as integer or string
        :param new_value: optional, the value to set this slot to
        :return: the current value of the slot's code, or ``None`` if it doesn't
                 exist on this device
        r�)r��_set_slot_valuer��_get_slot_value)r*�slotr�rr�r�r�s       r�
slot_valuezLibevdev.slot_value�sS���z�z�(�J�/���1�� �� � ����D�!�Y�?�� � ����D�!�4���rc��|j||�\}}|�|j|j|�y|dk(r�t|j	dd�|j	dd�|j	dd�|j	dd�|j	dd�|j	d	d��}tj|�}n#|d
k(rtjt|��}|j|j|||�y)a�
        :param event_type: the event type, either as integer or as string
        :param event_code: optional, the event code, either as integer or as string
        :param data: if event_code is not ``None``, data points to the
                     code-specific information.

        If event_type is EV_ABS, then data must be a dictionary as returned
        from absinfo. Any keys missing are replaced with 0, i.e. the
        following example is valid and results in a fuzz/flat/resolution of
        zero::

                ctx = Libevdev()
                abs = { "minimum" : 0,
                        "maximum" : 100 }
                ctx.enable("EV_ABS", "ABS_X", data)

        If event_type is EV_REP, then data must be an integer.
        Nr�rrrrrrr�)	r��_enable_event_typer�rr8rL�pointerr�_enable_event_code)r*r�r��datar�r�s      r�enablezLibevdev.enable	s���&�z�z�*�j�1���1��9��#�#�D�I�I�q�1��D�y�$�T�X�X�g�q�%9�%)�X�X�i��%;�%)�X�X�i��%;�%)�X�X�f�a�%8�%)�X�X�f�a�%8�%)�X�X�l�A�%>�@���~�~�d�+���d���~�~�e�D�k�2���#�#�D�I�I�q�!�T�:rc��|j||�\}}|�|j|j|�y|j|j||�y)z�
        :param event_type: the event type, either as integer or as string
        :param event_code: optional, the event code, either as integer or as string
        N)r��_disable_event_typer��_disable_event_code)r*r�r�r�r�s     r�disablezLibevdev.disable,sG��
�z�z�*�j�1���1��9��$�$�T�Y�Y��2��$�$�T�Y�Y��1�5rc�~�t|t�s|j|�}|j|j|�y)z@
        :param prop: the property as integer or string
        N)r�r�r��_enable_propertyr�)r*r�s  r�enable_propertyzLibevdev.enable_property7s2���$��$��)�)�$�/�D����d�i�i��.rc�t�|jd|�\}}|rdnd}|j|j||�y)zi
        :param led: the LED_<*> name
        :on: True to turn the LED on, False to turn it off
        �EV_LEDr�rN)r��_set_led_valuer�)r*�led�onr�r��whichs      r�set_ledzLibevdev.set_led@s7��
�z�z�(�C�(���1���Q�����D�I�I�q�%�0rc��t�}|j|j|tj|��}|t
jk(ry|S)a
        :param flags: a set of libevdev read flags. May be omitted to use
                      the normal mode.
        :return: the next event or ``None`` if no event is available

        Event processing should look like this::

            fd = open("/dev/input/event0", "rb")
            ctx = libevdev.Libevdev(fd)
            ev = ctx.next_event()
            if ev is None:
                print("no event available right now")
            elif ev.matches("EV_SYN", "SYN_DROPPED"):
                sync_ev = ctx.next_event(libevdev.READ_FLAG_SYNC)
                while ev is not None:
                    print("First event in sync sequence")
                    sync_ev = ctx.next_event(libevdev.READ_FLAG_SYNC)
                print("sync complete")

        N)r�_next_eventr�rL�byref�errno�EAGAIN)r*�flags�evr�s    r�
next_eventzLibevdev.next_eventIsB��*�]��
�
�
�d�i�i�����R�0@�
A��
�%�,�,�����	rr&)T)NF)NN)0rrrrArCr2rrrrrL�POINTERrrr3r(r��propertyr0�setterr�r�r�r�r�r�r�r�rBr�r�r�r�r�r�r�r�rr	rrrrrr&�READ_FLAG_NORMALr.rDrEs@rrGrGhs����� �<��<�k�&��	��)
�k�	(�!���*
�k�	'���)��)
�k�"	(���+��*
�#k�,	%��	��'
�-k�6	&�!���(
�7k�@	&��	��(
�Ak�J	���
�Kk�T	�!���
�Uk�d	�!���
�ek�n	�!�8�,��
�ok�x	�!���
�yk�B	�!�8�,��
�Ck�L	�!���
�Mk�V	�!�8�,��
�Wk�`	&�!���(
�ak�j	 �!�5�)��"
�kk�z	"�!���$
�{k�D	!�!���#
�Ek�N	"�!���$
�Ok�X	"�!���$
�Yk�b	"�!�5�)��$
�ck�l	!�!�5�)��#
�mk�v	"�!�5�)��$
�wk�@	"�!�5�)��$
�Ak�J	�!�5�)��
�Kk�T	�!�5�)��
�Uk�^	�!���
�_k�h	�!�5�)��
�ik�r	 �!�5�)�%�v�~�~�m�4�"
�sk�B	'�!�5�.�&�.�.��*G�H��)
�Ck�P	 �!�5�)��"
�Qk�X	"�!�5�)��$
�Yk�`	"�!�5�%�0��$
�ak�p"�5�%��7��%
�
"�5�%�0��%
�
"�5�)��'
�
"�5�%��:��'
�
"�5�)��(
�
"�5�%�0��(
�
"�5�)��%
�
"�6�>�6�>�>�+�+F�G�� 
�
"���#
�
"���&
�
"�6�6�2��$
�
"�6�6�5�9��$
�
"���'
�Ok�O�Z�0"��=��=�
�[�[�C��C�
�(��(�
�[�[�C��C��(��(�
�[�[�C��C��3��3�� �� �4�Y�Y�=��=�4�����8�Y�Y����(/�0;�d�
(��
(��
��
��	%��	%��(��(�$����(��$	��&�%��%��%��%�� !;�F	6�/�1� 0�rrGc��eZdZy)�
_UinputDeviceN)rrrrrrr4r4fs��rr4c����eZdZdZed��Zeeejeje
��fed�efdd�efed�efed�eeeefed�d�Z
d�fd�	Zd�Zed��Zd	�Zed
��Zed��Z�xZS)
�UinputDevicez
    This class provides a wrapper around the libevdev C library

    .. warning::

        Do not use this class directly
    c�0�tjdd��SrIrKrrrr2zUinputDevice._cdllsrNrrPN)�"libevdev_uinput_create_from_device�libevdev_uinput_destroy�libevdev_uinput_get_devnode�libevdev_uinput_get_syspath�libevdev_uinput_write_eventc�h��tt|��||_|�d}n|j	�}tjt��|_|j|j|tj|j��}|dk7r!t|tj|���y)a�
        Create a new uinput device based on the source libevdev device. The
        uinput device will mirror all capabilities from the source device.

        :param source: A libevdev device with all capabilities set.
        :param fileobj: A file-like object to the /dev/uinput node. If None,
        libevdev will open the device in managed mode. See the libevdev
        documentation for details.
        N���r)r'r6r(�_fileobjr�rLr/r4�_uinput_device�_uinput_create_from_devicer�r)r�r�r�)r*�sourcer�r�r�r+s     �rr(zUinputDevice.__init__�s����	�l�D�*�,���
��?��B����!�B�;�f�n�n�]�;�=���
�
,�
,�V�[�[�"�f�l�l�4�K^�K^�>_�
`��
��7��2�#�r�{�{�B�3�/�0�0�rc�T�|j�|j|j�yyr&)r@�_uinput_destroyr�s rr�zUinputDevice.__del__�s'�����*�� � ��!4�!4�5�+rc��|jS)zH
        :return: the file-like object used in the constructor.
        )r�r�s rr�zUinputDevice.fd�s��
�|�|�rc�@�|j|j|||�yr&)�_uinput_write_eventr@)r*r!r"rs    r�write_eventzUinputDevice.write_event�s��� � ��!4�!4�d�D�%�Hrc�Z�|j|j�}|jd�S�zH
        Return a string with the /dev/input/eventX device node
        r�)�_uinput_get_devnoder@r�)r*�devnodes  rrLzUinputDevice.devnode��)��
�*�*�4�+>�+>�?���~�~�k�*�*rc�Z�|j|j�}|jd�SrJ)�_uinput_get_syspathr@r�)r*�syspaths  rrPzUinputDevice.syspath�rMrr&)rrrrArCr2rrrLr/r4rrr3r(r�r0r�rHrLrPrDrEs@rr6r6js������<��<�"�5�.�&�.�.�����
�9V�*W�X��/
�"���$
�"���(
�"���(
�"�6�6�5�9��(
�-�O�81�.6�����I��+��+��+��+rr6)r/r�rLr*rrrrrrr	�READ_FLAG_SYNCr2�READ_FLAG_FORCE_SYNC�READ_FLAG_BLOCKING�	Structurerr�objectr$rGr4r6rrr�<module>rVs���.�	�
�����������������)�F�$�$�)�$�&�"�"�$�*"�f�*"�Z{��{�|	�F�$�$�	�\+�?�\+r

Zerion Mini Shell 1.0