%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/libevdev/__pycache__/ |
| Current File : //lib/python3/dist-packages/libevdev/__pycache__/device.cpython-312.pyc |
�
�o�ZLm � �� � d dl Z d dlZd dlZddlmZmZ ddlmZmZmZm Z ddl
mZ ddlm
Z
G d� de� Z G d � d
e� Z G d� de� Z G d
� de� Z G d� de� Z G d� de� Zy)� N� )�Libevdev�UinputDevice)�READ_FLAG_SYNC�READ_FLAG_NORMAL�READ_FLAG_FORCE_SYNC�READ_FLAG_BLOCKING)�
InputEvent)�
InputPropertyc � � e Zd ZdZy)�InvalidFileErrorzx
A file provided is not a valid file descriptor for libevdev or this
device must not have a file descriptor
N��__name__�
__module__�__qualname__�__doc__� � �1/usr/lib/python3/dist-packages/libevdev/device.pyr
r
! s � �� r r
c � � e Zd ZdZdd�Zd� Zy)�InvalidArgumentExceptionz�
A function was called with an invalid argument. This indicates a bug in
the calling program.
.. attribute:: message
A human-readable error message
Nc � � || _ y �N��message)�self�msgs r �__init__z!InvalidArgumentException.__init__2 s � ���r c � � | j S r r �r s r �__repr__z!InvalidArgumentException.__repr__5 s � ��|�|�r r )r r r r r r! r r r r r ) s � ���r r c � � e Zd ZdZy)�DeviceGrabErrorz�
A device grab failed to be issued. A caller must not assume that it has
exclusive access to the events on the device.
Nr r r r r# r# 9 s � �r r# c � � e Zd ZdZy)�EventsDroppedExceptiona@
Notification that the device has dropped events, raised in response to a
EV_SYN SYN_DROPPED event.
This exception is raised AFTER the EV_SYN, SYN_DROPPED event has been
passed on. If SYN_DROPPED events are processed manually, then this
exception can be ignored.
Once received (or in response to a SYN_DROPPED event) a caller should
call device.sync() and process the events accordingly (if any).
Example::
fd = open("/dev/input/event0", "rb")
ctx = libevdev.Device(fd)
while True:
try:
for e in ctx.events():
print(e):
except EventsDroppedException:
print('State lost, re-synching:')
for e in ctx.sync():
print(e)
Nr r r r r% r% @ s � ��2 r r% c �( � e Zd ZdZ dd�Zd� Zd� Zy)�InputAbsInfoa7
A class representing the struct input_absinfo for a given EV_ABS code.
Any of the attributes may be set to None, those that are None are simply
ignored by libevdev.
.. attribute:: minimum
the minimum value of this axis
:property minimum: the minimum value for this axis
:property maximum: the maximum value for this axis
:property fuzz: the fuzz value for this axis
:property flat: the flat value for this axis
:property resolution: the resolution for this axis
:property value: the current value of this axis
Nc �X � || _ || _ || _ || _ || _ || _ y r )�minimum�maximum�fuzz�flat�
resolution�value)r r) r* r+ r, r- r. s r r zInputAbsInfo.__init__o s, � ��������� ��� �$�����
r c � � dj | j | j | j | j | j
| j � S )Nz4min:{} max:{} fuzz:{} flat:{} resolution:{} value:{})�formatr) r* r+ r, r- r. r s r r! zInputAbsInfo.__repr__x s; � �E�L�L��|�|�T�\�\�4�9�9�d�i�i�����
�
�,� ,r c �B � | j |j k( xr� | j |j k( xrj | j |j k( xrO | j |j k( xr4 | j |j k( xr | j
|j
k( S r )r) r* r. r- r+ r, )r �others r �__eq__zInputAbsInfo.__eq__} s� � �����
�
�-� (�����
�
�-�(��
�
�e�k�k�)�(� ���5�#3�#3�3�(� � � �U�Z�Z�'� (�
� � �U�Z�Z�'� )r )NNNNNN)r r r r r r! r3 r r r r'