+
     h  c                   sJ   ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RIH
t
 ^t^t^t^t ! R	 R
]P                  4      t ! R R]P                  4      t ! R R]4      t ! R R]4      t ! R R]P                  4      t ! R R]4      tR# )i    N)c_char_p)c_int)c_uint)c_void_p)c_long)c_int32)c_uint16c                   s>    ] tR t^*tR]3R]3R]3R]3R]3R]3.tRtR# )	_InputAbsinfovalueminimummaximumfuzzflat
resolution N)__name__
__module____qualname____firstlineno__r   _fields___static_attributes__r       3/usr/lib/python3.14/site-packages/libevdev/_clib.pyr   r   *   s9    '"G$G$!!w')Hr   r   c                   s8    ] tR t^3tR]3R]3R]3R]3R]3.tRtR# )_InputEventZsecZusectypecoder   r   N)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   3   s0     ""'"	$Hr   r   c                   s^   a a ] tR t^;t oRtRt/ tV 3R lt]R 4       t	]
R 4       tRtVtV ;t# )_LibraryWrapperz@
Base class for wrapping a shared library. Do not use directly.
Nc                sL   < \         \        V `  4        V P                  4        R # N)superr   __init___load)self	__class__s   &r   r   Z_LibraryWrapper.__init__J   s    ot-/

r   c                s   V P                   e   V P                   # V P                  4       V n         V P                  P                  4        Fg  w  r\	        V P                   V4      pVR,          Vn        VR,          Vn        \        R4      p\        P                  VRWR  4      p\        WV4       Ki  	  V P                   # )Nargtypesrestypelibevdevname)_lib_cdll_api_prototypesZitemsZgetattrr!   r"   ZlenZdictgetZsetattr)clsr$   ZattrsZfuncZprefixZpynames   &     r   r   Z_LibraryWrapper._loadN   s    8888O99; 00668MT388T*D!*-DM +DL
 _FXXeVT'];FC& 9 xxr   c                 s    \         h)zOverride in subclass)ZNotImplementedErrorr   r   r   r&   Z_LibraryWrapper._cdllb   s
     "!r   r   )r   r   r   r   __doc__r%   r'   r   classmethodr   staticmethodr&   r   __classdictcell____classcell__r    Z__classdict__   @@r   r   r   ;   sJ      DO  & " " "r   r   c            	       s2  a a ] tR t^ht oRt]R 4       t/ RR]3R]/bRR]3R]	/bRR]]3R]/bRR]]3R]	/bR	R]]]	3R]/bR
R]]]3R]	/bRR]3R]/bRR]3R]	/bRR]	3R]	/bRRRZR]
/bRR]
3RR/bRR]
3R]/bRR]
]3RR/bRR]
3R]/bRR]
]3RR/bRR]
3R]/bRR]
]3RR/b/ RR]
3R]	/bRR]
]	3R]	/bRR]
3R]	/bRR]
3R]	/bRR]
3R]	/bRR]
3R]	/bRR]
]	3RR/bRR]
]	3RR/bRR]
]	3RR/bR R]
]	3RR/bR!R]
]	3R]	/bR"R]
]	3R]	/bR#R]
3R]	/bR$R]
]	3R]	/bR%R]
]	3R]P                  ! ]4      /bR&R]
]	]P                  ! ]4      3R]	/bR'R]
]	]	3R]	/bC/ R(R]
]	3R]	/bR)R]
]	3R]	/bR*R]
]	]	3R]	/bR+R]
]	]	]	3R]	/bR,R]
]	]	3R]	/bR-R]
]	3R]	/bR.R]
]	]	]
3R]	/bR/R]
]	3R]	/bR0R]
]	]	3R]	/bR1R]
]	3R]	/bR2R]
]]P                  ! ]4      3R]	/bR3R]
3R]	/bR4R]
3R]	/bR5R]
]]3R]	/bR6R]
]]]	3R]	/bR7R]
3R]	/bCtR[V 3R8 lltR9 t]R: 4       t]P(                  R; 4       t]R< 4       t]P(                  R= 4       t]R> 4       t]P(                  R? 4       t]R@ 4       t]RA 4       t]P(                  RB 4       tRC t]RD 4       t]P(                  RE 4       tR\RF ltR]RG lt]RH 4       t]RI 4       t]RJ 4       t ]R^RK l4       t!]R^RL l4       t"RM t#R[RN lt$RO t%R[RP lt&]RQ 4       t']RR 4       t(R[RS lt)R^RT lt*R[RU lt+RV t,RW t-].3RX lt/RYt0Vt1V ;t2# )_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                 2    \         P                  ! R RR7      # zlibevdev.so.2T)Z	use_errnoctypesZCDLLr   r   r   r&   ZLibevdev._cdlly       {{?d;;r   Zlibevdev_event_type_get_namer!   r"   Zlibevdev_event_type_from_nameZlibevdev_event_code_get_nameZlibevdev_event_code_from_nameZlibevdev_event_value_get_nameZlibevdev_event_value_from_nameZlibevdev_property_get_nameZlibevdev_property_from_nameZlibevdev_event_type_get_maxZlibevdev_newZlibevdev_freeNZlibevdev_get_nameZlibevdev_set_nameZlibevdev_get_physZlibevdev_set_physZlibevdev_get_uniqZlibevdev_set_uniqZlibevdev_get_driver_versionZlibevdev_set_clock_idZlibevdev_get_id_bustypeZlibevdev_get_id_vendorZlibevdev_get_id_productZlibevdev_get_id_versionZlibevdev_set_id_bustypeZlibevdev_set_id_vendorZlibevdev_set_id_productZlibevdev_set_id_versionZlibevdev_set_fdZlibevdev_change_fdZlibevdev_get_fdZlibevdev_grabZlibevdev_get_abs_infoZlibevdev_kernel_set_abs_infoZlibevdev_kernel_set_led_valueZlibevdev_has_propertyZlibevdev_has_event_typeZlibevdev_has_event_codeZlibevdev_set_event_valueZlibevdev_get_event_valueZlibevdev_enable_event_typeZlibevdev_enable_event_codeZlibevdev_disable_event_typeZlibevdev_disable_event_codeZlibevdev_enable_propertyZlibevdev_next_eventZlibevdev_get_num_slotsZlibevdev_get_current_slotZlibevdev_get_slot_valueZlibevdev_set_slot_valueZlibevdev_has_event_pendingc                s|   < \         \        V `  4        V P                  4       V n        RV n        Ve	   Wn        R# R# )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   r1   r   Z_new_ctx_filefd)r   r9   r    s   &&r   r   ZLibevdev.__init__y  s5    $ 	h&(IIK	
>G r   c                sd    \        V R 4      '       d   V P                  V P                  4       R# R# )r7   N)ZhasattrZ_freer7   r      &r   __del__ZLibevdev.__del__  s$    4  JJtyy! !r   c                sV    V P                  V P                  4      P                  R4      # )z2
:return: A string with the device's kernel name.
	iso8859-1)Z	_get_namer7   decoder:   r;   r   r$   Libevdev.name  s"    
 ~~dii(//<<r   c                d    Vf   RpV P                  V P                  VP                  R4      4      # NZ r=   )Z	_set_namer7   encode)r   r$      &&r   r$   r?     s*    <D~~dii[)ABBr   c                n    V P                  V P                  4      pV'       g   R# VP                  R4      # )z:
:return: A string with the device's kernel phys or None.
Nr=   )Z	_get_physr7   r>   r   phys   & r   rF   Libevdev.phys  +    
 ~~dii({{;''r   c                r@   rA   )Z	_set_physr7   rB   rE   rC   r   rF   rH     ,     <D~~dii[)ABBr   c                rD   )z:
:return: A string with the device's kernel uniq or None.
Nr=   )Z	_get_uniqr7   r>   r   uniqrG   r   rL   Libevdev.uniq  rI   r   c                r@   rA   )Z	_set_uniqr7   rB   rK   rC   r   rL   rM     rJ   r   c                s8    V P                  V P                  4      # )z
:note: Read-only
)Z_get_driver_versionr7   r:   r;   r   driver_versionZLibevdev.driver_version  s    
 ''		22r   c                s    V P                  V P                  4      pV P                  V P                  4      pV P                  V P                  4      pV P	                  V P                  4      pRVRVRVRV/# )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)Z_get_id_bustyper7   Z_get_id_vendorZ_get_id_productZ_get_id_version)r   ZbusZvdrZproZvers   &    r   idLibevdev.id  sr    $ ""499-!!$)),""499-""499-3#33  	 r   c                sZ   R V9   d$   V P                  V P                  VR ,          4       RV9   d$   V P                  V P                  VR,          4       RV9   d$   V P                  V P                  VR,          4       RV9   d&   V P	                  V P                  VR,          4       R# R# )rO   rP   rQ   rR   N)Z_set_id_bustyper7   Z_set_id_vendorZ_set_id_productZ_set_id_version)r   ZvalsrC   r   rS   rT     s      DO<t		4>:  DO<  DO< r   c                s:    V P                  V P                  V4      # )zZ
:param clock: time.CLOCK_MONOTONIC
:return: a negative errno on failure or 0 on success.
)Z_set_clock_idr7   )r   ZclockrC   r   set_clock_idZLibevdev.set_clock_id  s    
 !!$))U33r   c                    V P                   # )a  
: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.
)r8   r:   r;   r   r9   Libevdev.fd  s    6 zzr   c                s    VP                  4       pT P                  f   T P                  T P                  T4      pMT P                  T P                  T4      pT^ 8w  d#   \        T) \        P                  ! T) 4      4      hT P                  T P                  4      T8w  d   \        R4       Yn        R #   \         d    \        P                  hi ; i)NzFIXME: fileno() != get_fd())filenoZAttributeErrorr#   ZInvalidFileErrorr8   Z_set_fdr7   Z
_change_fdOSErrorosstrerrorZ_get_fdZprint)r   fileobjr9   r   &&  r   r9   rW     s    	,!B ::TYY+A		2.A61"bkk1"o.. <<		"b(/0
  	,+++	,s   B5 5Cc                s    V'       d   ^pM^pV P                  V P                  V4      pV^ 8w  d#   \        V) \        P                  ! V) 4      4      hR# )zh
:param enable_grab: True to grab, False to ungrab
:return: 0 on success or a negative errno on failure
N)Z_grabr7   rY   rZ   r[   )r   Zenable_grabZmoder]   r^   r   grabZLibevdev.grab*  sJ     DDJJtyy$'61"bkk1"o.. r   c                s   \        V\        4      '       g4   VP                  R4      '       g   \        4       hV P	                  RV4      pV P                  V P                  V4      pV'       g   R# VEe   RV9   d   VR,          VP                  n        RV9   d   VR,          VP                  n	        RV9   d   VR,          VP                  n
        RV9   d   VR,          VP                  n        RV9   d   VR,          VP                  n        R	V9   d   VR	,          VP                  n        V'       dF   V P                  V P                  W4      pV^ 8w  d#   \        V) \         P"                  ! V) 4      4      hRVP                  P                  RVP                  P                  RVP                  P                  RVP                  P                  RVP                  P                  R	VP                  P                  /# )
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.
ZABS_EV_ABSNr	   r
   r   r   r   r   )
isinstanceintZ
startswithZ
ValueErrorevent_to_valueZ_get_abs_infor7   Zcontentsr	   r
   r   r   r   r   Z_kernel_set_abs_inforY   rZ   r[   )r   r   Z
new_valuesZkernelabsinforc   &&&&  r   rd   ZLibevdev.absinfo8  s    $$$??6** l"&&x6D$$TYY5!J&+5i+@  (J&+5i+@  (*$)3G)<  &#(26(:  %#(26(:  %z).8.F  +..tyy$H7!2#r{{B3'788))//7++337++33((--((--g..99; 	;r   c                sZ    V P                  V4      pV'       g   R# VP                  R4      # )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=   )Z_property_get_namer>   )r)   propr$      && r   property_to_nameZLibevdev.property_to_namej  s)     %%d+{{;''r   c                sX    V P                  VP                  R4      4      pVR8X  d   R# V# )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)Z_property_from_namerB   )r)   rg   vrh   r   property_to_valueZLibevdev.property_to_valuew  s,     ##DKK$<=7r   c                s    \        V\        4      '       g   V P                  V4      pV P                  V4      pVR8  d   V# R# )zx
:param type: the EV_<*> event type
:return: the maximum code for this type or ``None`` if the type is
         invalid
Nrj   )ra   rb   rc   Z_event_type_get_max)r)   r   Zmrh   r   type_maxZLibevdev.type_max  sB     $$$%%d+D##D)Fq$$r   c                s    Ve   Ve   V P                  WV4      pM'Ve   V P                  W4      pMV P                  V4      pV'       g   R# VP                  R4      # )a  
:param event_type: the numerical event type value
:param event_code: optional, the numerical event code value
:param event_value: optional, the numerical event value
:return: the event code name if a code is given otherwise the event
         type name.

This function is the equivalent to ``libevdev_event_value_get_name()``,
``libevdev_event_code_get_name()``, and ``libevdev_event_type_get_name()``
Nr=   )Z_event_value_get_nameZ_event_code_get_nameZ_event_type_get_namer>   )r)   
event_type
event_codeevent_valuer$      &&&& r   event_to_nameZLibevdev.event_to_name  s\     !k&=,,Z[QD#++JCD++J7D{{;''r   c                s   Veu   Veq   \        V\        4      '       g   V P                  V4      p\        V\        4      '       g   V P                  W4      pV P                  WVP	                  R4      4      pMlVeI   \        V\        4      '       g   V P                  V4      pV P                  WP	                  R4      4      pM V P                  VP	                  R4      4      pVR8X  d   R# V# )a  
:param event_type: the event type as string
:param event_code: optional, the event code as string
:param event_value: optional, the numerical event value
:return: the event code value if a code is given otherwise the event
         type value.

This function is the equivalent to ``libevdev_event_value_from_name()``,
``libevdev_event_code_from_name()`` and ``libevdev_event_type_from_name()``
Nr=   rj   )ra   rb   rc   Z_event_value_from_namerB   Z_event_code_from_nameZ_event_type_from_name)r)   rn   ro   rp   rk   rq   r   rc   ZLibevdev.event_to_value  s     !k&=j#.. //
;
j#.. //
G
**:+6+=+=k+JLA#j#.. //
;
))*6G6G6TUA))**;*;K*HIA7r   c                s    \        V\        4      '       g   V P                  V4      pV P                  V P                  V4      p\        V4      # )zt
:param prop: a property, either as integer or string
:return: True if the device has the property, False otherwise
)ra   rb   rl   Z_has_propertyr7   bool)r   rg   r]   rh   r   has_propertyZLibevdev.has_property  s@    
 $$$))$/Dtyy$/Awr   c                s.   \        V\        4      '       g   V P                  V4      pVf   V P                  V P                  V4      pMC\        V\        4      '       g   V P                  W4      pV P                  V P                  W4      p\        V4      # )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
:return: True if the device has the type and/or code, False otherwise
)ra   rb   rc   Z_has_event_typer7   Z_has_event_coders   )r   rn   ro   r]   s   &&& r   	has_eventZLibevdev.has_event  sy     *c**,,Z8J$$TYY
;Aj#..!00H
$$TYY
GAAwr   c                s    \        V\        4      '       g   V P                  V4      pVe(   \        V\        4      '       g   V P                  W4      pW3# )zl
Resolves a type+code tuple, either of which could be integer or
string. Returns a (t, c) tuple in integers
)ra   rb   rc   )r   tcs   &&&r   _codeZLibevdev._code  sI    
 !S!!##A&A=As!3!3##A)Avr   c                s    V P                  W4      w  rEV P                  WE4      '       g   R# Ve   V P                  V P                  WEV4       V P	                  V P                  WE4      pV# )a  
: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)rx   ru   Z_set_event_valuer7   Z_get_event_value)r   rn   ro   	new_valuerv   rw   rk      &&&&   r   rp   ZLibevdev.event_value  s]     zz*1~~a## !!$))Q9=!!$))Q2r   c                N    V P                  V P                  4      pV^ 8  d   V# R# )zz
:return: the number of slots on this device or ``None`` if this device
         does not support slots

:note: Read-only
N)Z_get_num_slotsr7   r   ZsrG   r   	num_slotsZLibevdev.num_slots  s)     		*Fq$$r   c                r{   )z{
:return: the current of slots on this device or ``None`` if this device
         does not support slots

:note: Read-only
N)Z_get_current_slotr7   r|   rG   r   current_slotZLibevdev.current_slot  s)     ""499-Fq$$r   c                s    V P                  RV4      w  rEVe   V P                  V P                  WV4       V P                  V P                  W4      pV# )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`   )rx   Z_set_slot_valuer7   Z_get_slot_value)r   Zslotro   ry   rv   rw   rk   rz   r   
slot_valueZLibevdev.slot_value  sM     zz(J/   DY?  D4r   c                s   V P                  W4      w  rEVf   V P                  V P                  V4       R# V^8X  d   \        VP	                  R^ 4      VP	                  R^ 4      VP	                  R^ 4      VP	                  R^ 4      VP	                  R^ 4      VP	                  R^ 4      4      p\
        P                  ! V4      pM&V^8X  d    \
        P                  ! \        V4      4      pV P                  V P                  WEV4       R# )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   r	   r
   r   r   r   )	rx   Z_enable_event_typer7   r   r(   r5   Zpointerr   Z_enable_event_code)r   rn   ro   Zdatarv   rw   rf   r   enableZLibevdev.enable#  s    & zz*19##DIIq1Dy$TXXgq%9%)XXi%;%)XXi%;%)XXfa%8%)XXfa%8%)XXlA%>@ ~~d+d~~eDk2##DIIqT:r   c                s    V P                  W4      w  r4Vf   V P                  V P                  V4       R# V P                  V P                  W44       R# )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)rx   Z_disable_event_typer7   Z_disable_event_code)r   rn   ro   rv   rw   s   &&&  r   disableZLibevdev.disableF  sA    
 zz*19$$TYY2$$TYY5r   c                s    \        V\        4      '       g   V P                  V4      pV P                  V P                  V4       R# )z0
:param prop: the property as integer or string
N)ra   rb   rl   Z_enable_propertyr7   )r   rg   rC   r   enable_propertyZLibevdev.enable_propertyQ  s5     $$$))$/Ddii.r   c                s~    V P                  RV4      w  r4V'       d   ^M^pV P                  V P                  WE4       R# )zQ
:param led: the LED_<*> name
:on: True to turn the LED on, False to turn it off
ZEV_LEDN)rx   Z_kernel_set_led_valuer7   )r   ZledZonrv   rw   Zwhichs   &&&   r   set_ledZLibevdev.set_ledZ  s3    
 zz(C(Q""499a7r   c                s    \        4       pV P                  V P                  V\        P                  ! V4      4      pV\
        P                  ) 8X  d   R# V^ 8  d#   \        V) \        P                  ! V) 4      4      hV# )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   Z_next_eventr7   r5   byreferrnoZEAGAINrY   rZ   r[   )r   ZflagsZevre   r^   r   
next_eventZLibevdev.next_eventc  sc    * ]diiR0@A%,,62#r{{B3/00	r   )r7   r8   r9   r   r   )T)NF)NN)3r   r   r   r   r*   r,   r&   r   r    r   r   r5   POINTERr   r   r'   r   r<   propertyr$   ZsetterrF   rL   rN   rS   rU   r9   r_   rd   r+   ri   rl   rm   rr   rc   rt   ru   rx   rp   r}   r~   r   r   r   r   r   READ_FLAG_NORMALr   r   r-   r.   r/   r0   r   r1   r1   h   sb      < <z&	x)
z 	(u*
z 	')x)
z" 	(+u*
#z, 	(0x*
-z6 	)3u+
7z@ 	%	x'
AzJ 	&u(
KzT 	&	u(
Uz^ 	x
_zh 	t
izx 	x
yzB 	8,t
CzL 	x
MzV 	8,t
Wz` 	x
azj 	8,t
kzt 	&u(
uz~ 	 5)u"
zN 	"u$
OzX 	!u#
Yzb 	"u$
czl 	"u$
mzv 	"5)t$
wz@ 	!5)t#
AzJ 	"5)t$
KzT 	"5)t$
Uz^ 	5)u
_zh 	5)u
izr 	u
sz| 	5)u
}zF 	 5)v~~m4"
GzV 	'5&..*GH)
Wz` 	(5%0*
azn 	 5)"
ozv 	"5)$
wz~ 	"5%0$
zL 	#5%7%
MzT 	#5%0%
Uz\ 	%5)'
]zd 	%5%:'
ezl 	&5)(
mzt 	&5%0(
uz| 	#5)%
}zD 	66>>++FGu 
EzL 	!u#
MzT 	$u&
Uz\ 	"662u$
]zd 	"6659u$
ezl 	%u'
mzOx0" = = 
[[C C
 ( ( 
[[C C ( ( 
[[C C 3 3    4 YY= =4  8 YY (/0;d 
( 
( 
 
 	% 	% ( (*  8$	& % % % % !;F	6/8  0  r   r1   c                   s    ] tR tRtRtR# )_UinputDevicei  r   N)r   r   r   r   r   r   r   r   r   r     s    r   r   c                   s  a a ] tR tRt oRt]R 4       tRR]]]	P                  ! ]	P                  ! ]4      4      3R]/RR]3RR/R	R]3R]/R
R]3R]/RR]]]]3R]//tRV 3R lltR t]R 4       tR t]R 4       t]R 4       tRtVtV ;t# )UinputDevicei  zo
This class provides a wrapper around the libevdev C library

.. warning::

    Do not use this class directly
c                 r2   r3   r4   r   r   r   r&   ZUinputDevice._cdll  r6   r   Z"libevdev_uinput_create_from_devicer!   r"   Zlibevdev_uinput_destroyNZlibevdev_uinput_get_devnodeZlibevdev_uinput_get_syspathZlibevdev_uinput_write_eventc                sv  < \         \        V `  4        W n        Vf   RpMVP	                  4       p\
        P                  ! \        4      ! 4       V n        V P                  VP                  V\
        P                  ! V P                  4      4      pV^ 8w  d#   \        V) \        P                  ! V) 4      4      hR# )ae  
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.
Ni)r   r   r   _fileobjrX   r5   r   r   _uinput_deviceZ_uinput_create_from_devicer7   r   rY   rZ   r[   )r   Zsourcer\   r9   re   r    s   &&&  r   r   ZUinputDevice.__init__  s     	lD*,?B!B$nn];=,,V[["fll4K^K^>_`72#r{{B3/00 r   c                s\    V P                   e   V P                  V P                   4       R # R # r   )r   Z_uinput_destroyr:   r;   r   r<   ZUinputDevice.__del__  s'    *  !4!45 +r   c                rV   )z8
:return: the file-like object used in the constructor.
)r\   r:   r;   r   r9   ZUinputDevice.fd  s    
 ||r   c                s@    V P                  V P                  WV4       R # r   )Z_uinput_write_eventr   )r   r   r   r   s   &&&&r   write_eventZUinputDevice.write_event  s      !4!4d%Hr   c                Z    V P                  V P                  4      pVP                  R4      # z8
Return a string with the /dev/input/eventX device node
r=   )Z_uinput_get_devnoder   r>   )r   devnoderG   r   r   ZUinputDevice.devnode  )    
 **4+>+>?~~k**r   c                r   r   )Z_uinput_get_syspathr   r>   )r   syspathrG   r   r   ZUinputDevice.syspath  r   r   )r   r   r   )r   r   r   r   r*   r,   r&   r   r   r5   r   r   r    r   r'   r   r<   r   r9   r   r   r   r   r-   r.   r/   r0   r   r   r     s     < <
 	-5&..9V*WXu/

 	"t$

 	&x(

 	&x(

 	&6659u(
-O81.6  I + + + + +r   r   )r#   rZ   r5   r   r    r   r   r   r   r   r   ZREAD_FLAG_SYNCr   ZREAD_FLAG_FORCE_SYNCZREAD_FLAG_BLOCKINGZ	Structurer   r   Zobjectr   r1   r   r   r   r   r   <module>r      s   .  	            )F$$ )$&"" $*"f *"ZW Wt	F$$ 	\+? \+r   