
    龙h                     \    d dl mZ d dlmZmZ  G d d      Z G d d      Z G d d      Zy	)
    )Channel)MouseButtonlocals_to_paramsc                   x    e Zd ZdeddfdZdeddfdZdeddfdZdeddfd	Zdded
e	ddfdZ
dded
e	ddfdZy)KeyboardchannelreturnNc                 ~    || _         |j                  j                  | _        |j                  j                  | _        y N_channel_connection_loop_dispatcher_fiberselfr   s     S/var/www/Befach/backend/env/lib/python3.12/site-packages/playwright/_impl/_input.py__init__zKeyboard.__init__   0    ((..
!(!4!4!F!F    keyc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NkeyboardDownr   sendr   localsr   r   s     r   downzKeyboard.down   *     mm  7G7QRRR   2<:<c                 |   K   | j                   j                  dd t        t                            d {    y 7 w)N
keyboardUpr   r   s     r   upzKeyboard.up   *     mm  t5Efh5OPPPr    textc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NkeyboardInsertTextr   )r   r%   s     r   insert_textzKeyboard.insert_text   s+     mm  !5t=Mfh=WXXXr    delayc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NkeyboardTyper   )r   r%   r)   s      r   typezKeyboard.type"   r   r    c                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NkeyboardPressr   )r   r   r)   s      r   presszKeyboard.press%   s*     mm  $8H8RSSSr    r   )__name__
__module____qualname__r   r   strr   r#   r(   floatr,   r/    r   r   r   r      s    G GD G
Sc Sd SQC QD QYc Yd YSs S5 SD STs T5 TD Tr   r   c                       e Zd ZdeddfdZddedededdfdZ	 	 dd	ed
eddfdZ		 	 dd	ed
eddfdZ
	 	 	 	 ddededed	ed
ededdfdZ	 	 	 ddededed	ed
eddfdZ	 	 ddededed	eddf
dZdededdfdZy)Mouser   r	   Nc                 ~    || _         |j                  j                  | _        |j                  j                  | _        y r   r   r   s     r   r   zMouse.__init__*   r   r   xystepsc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)N	mouseMover   )r   r9   r:   r;   s       r   movez
Mouse.move/   s*     mm  d4DVX4NOOOr    button
clickCountc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)N	mouseDownr   r   r?   r@   s      r   r   z
Mouse.down2   s,     
 mm  d4DVX4NOOOr    c                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NmouseUpr   rC   s      r   r#   zMouse.up9   s,     
 mm  D2B682LMMMr    r)   titlec                    K   | j                   j                  dd t        t                     |       d {    y 7 w)N
mouseClick)rF   r   )r   r9   r:   r)   r?   r@   rF   s          r   _clickzMouse._click@   s:      mm  $ 0 :% ! 
 	
 	
s   4><>c                 ^   K   t               }|d=  | j                  di | d {    y 7 w)Nr   r5   )r   rI   )r   r9   r:   r)   r?   r@   paramss          r   clickzMouse.clickM   s-      6Ndkk#F###s   #-+-c                 N   K   | j                  ||||dd       d {    y 7 w)N   zDouble click)r)   r?   r@   rF   )rI   )r   r9   r:   r)   r?   s        r   dblclickzMouse.dblclickY   s0      kkqf.  
 	
 	
s   %#%deltaXdeltaYc                 |   K   | j                   j                  dd t        t                            d {    y 7 w)N
mouseWheelr   )r   rP   rQ   s      r   wheelzMouse.wheeld   r$   r    r   )NN)NNNN)NNN)r0   r1   r2   r   r   r4   intr>   r   r   r#   r3   rI   rL   rO   rT   r5   r   r   r7   r7   )   s   G GD G
PE Pe PC P4 P
 #PP P 
	P #NN N 
	N "

 
 	

 
 
 
 

" "
$
$ 
$ 	
$
 
$ 
$ 

$  "	
	
 	
 		

 	
 
	
Q% Q Q4 Qr   r7   c                   0    e Zd ZdeddfdZdededdfdZy)Touchscreenr   r	   Nc                 ~    || _         |j                  j                  | _        |j                  j                  | _        y r   r   r   s     r   r   zTouchscreen.__init__i   r   r   r9   r:   c                 |   K   | j                   j                  dd t        t                            d {    y 7 w)NtouchscreenTapr   )r   r9   r:   s      r   tapzTouchscreen.tapn   s+     mm  !149I&(9STTTr    )r0   r1   r2   r   r   r4   r[   r5   r   r   rW   rW   h   s6    G GD G
U5 UU Ut Ur   rW   N)playwright._impl._connectionr   playwright._impl._helperr   r   r   r7   rW   r5   r   r   <module>r^      s2    1 BT T,<Q <Q~U Ur   