
    g                     \    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     L/var/www/openai/venv/lib/python3.12/site-packages/playwright/_impl/_input.py__init__zKeyboard.__init__   0    ((..
!(!4!4!F!F    keyc                 z   K   | j                   j                  dt        t                            d {    y 7 w)NkeyboardDownr   sendr   localsr   r   s     r   downzKeyboard.down   (     mm  1A&(1KLLL   1;9;c                 z   K   | j                   j                  dt        t                            d {    y 7 w)N
keyboardUpr   r   s     r   upzKeyboard.up   (     mm  /?/IJJJr    textc                 z   K   | j                   j                  dt        t                            d {    y 7 w)NkeyboardInsertTextr   )r   r%   s     r   insert_textzKeyboard.insert_text   s)     mm  !57G7QRRRr    delayc                 z   K   | j                   j                  dt        t                            d {    y 7 w)NkeyboardTyper   )r   r%   r)   s      r   typezKeyboard.type"   r   r    c                 z   K   | j                   j                  dt        t                            d {    y 7 w)NkeyboardPressr   )r   r   r)   s      r   presszKeyboard.press%   s(     mm  2B682LMMMr    r   )__name__
__module____qualname__r   r   strr   r#   r(   floatr,   r/    r   r   r   r      s    G GD G
Mc Md MKC KD KSc Sd SMs M5 MD MNs N5 ND N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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                 z   K   | j                   j                  dt        t                            d {    y 7 w)N	mouseMover   )r   r9   r:   r;   s       r   movez
Mouse.move/   s(     mm  .>vx.HIIIr    button
clickCountc                 z   K   | j                   j                  dt        t                            d {    y 7 w)N	mouseDownr   r   r?   r@   s      r   r   z
Mouse.down2   s*     
 mm  .>vx.HIIIr    c                 z   K   | j                   j                  dt        t                            d {    y 7 w)NmouseUpr   rC   s      r   r#   zMouse.up9   s*     
 mm  ,<VX,FGGGr    r)   c                 z   K   | j                   j                  dt        t                            d {    y 7 w)N
mouseClickr   )r   r9   r:   r)   r?   r@   s         r   clickzMouse.click@   s*      mm  /?/IJJJr    c                 L   K   | j                  ||||d       d {    y 7 w)N   )r)   r?   r@   )rH   )r   r9   r:   r)   r?   s        r   dblclickzMouse.dblclickJ   s$      jjAU6ajHHHs   $"$deltaXdeltaYc                 z   K   | j                   j                  dt        t                            d {    y 7 w)N
mouseWheelr   )r   rL   rM   s      r   wheelzMouse.wheelS   r$   r    r   )NN)NNN)r0   r1   r2   r   r   r4   intr>   r   r   r#   rH   rK   rP   r5   r   r   r7   r7   )   sJ   G GD G
JE Je JC J4 J
 #JJ J 
	J #HH H 
	H "KK K 	K
 K K 
K "II I 	I
 I 
IK% K K4 K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__X   r   r   r9   r:   c                 z   K   | j                   j                  dt        t                            d {    y 7 w)NtouchscreenTapr   )r   r9   r:   s      r   tapzTouchscreen.tap]   s)     mm  !13CFH3MNNNr    )r0   r1   r2   r   r   r4   rW   r5   r   r   rS   rS   W   s6    G GD G
O5 OU Ot Or   rS   N)playwright._impl._connectionr   playwright._impl._helperr   r   r   r7   rS   r5   r   r   <module>rZ      s2    1 BN N,+K +K\O Or   