a
    ҏi                     @   sJ   d dl mZ d dlmZmZ G dd dZG dd dZG dd dZd	S )
    )Channel)MouseButtonlocals_to_paramsc                   @   st   e Zd ZeddddZeddddZedddd	Zedd
ddZdee	ddddZ
dee	ddddZdS )KeyboardNchannelreturnc                 C   s   || _ |jj| _|jj| _d S N_channel_connectionZ_loopZ_dispatcher_fiberselfr    r   G/home/Claro/venv/lib/python3.9/site-packages/playwright/_impl/_input.py__init__   s    
zKeyboard.__init__)keyr   c                    s   | j dtt I d H  d S )NZkeyboardDownr   sendr   localsr   r   r   r   r   down   s    zKeyboard.downc                    s   | j dtt I d H  d S )NZ
keyboardUpr   r   r   r   r   up   s    zKeyboard.up)textr   c                    s   | j dtt I d H  d S )NZkeyboardInsertTextr   )r   r   r   r   r   insert_text   s    zKeyboard.insert_text)r   delayr   c                    s   | j dtt I d H  d S )NZkeyboardTyper   )r   r   r   r   r   r   type"   s    zKeyboard.type)r   r   r   c                    s   | j dtt I d H  d S )NZkeyboardPressr   )r   r   r   r   r   r   press%   s    zKeyboard.press)N)N)__name__
__module____qualname__r   r   strr   r   r   floatr   r   r   r   r   r   r      s   r   c                   @   s   e Zd ZeddddZdeeeddddZdeeddd	d
Z	deeddddZ
deeeeeddddZdeeeeddddZeeddddZdS )MouseNr   c                 C   s   || _ |jj| _|jj| _d S r	   r
   r   r   r   r   r   *   s    
zMouse.__init__)xystepsr   c                    s   | j dtt I d H  d S )NZ	mouseMover   )r   r$   r%   r&   r   r   r   move/   s    z
Mouse.move)button
clickCountr   c                    s   | j dtt I d H  d S )NZ	mouseDownr   r   r(   r)   r   r   r   r   2   s    z
Mouse.downc                    s   | j dtt I d H  d S )NZmouseUpr   r*   r   r   r   r   9   s    zMouse.up)r$   r%   r   r(   r)   r   c                    s   | j dtt I d H  d S )NZ
mouseClickr   )r   r$   r%   r   r(   r)   r   r   r   click@   s    zMouse.click)r$   r%   r   r(   r   c                    s   | j ||||ddI d H  d S )N   )r   r(   r)   )r+   )r   r$   r%   r   r(   r   r   r   dblclickJ   s    zMouse.dblclick)deltaXdeltaYr   c                    s   | j dtt I d H  d S )NZ
mouseWheelr   )r   r.   r/   r   r   r   wheelS   s    zMouse.wheel)N)NN)NN)NNN)NN)r   r   r    r   r   r"   intr'   r   r   r   r+   r-   r0   r   r   r   r   r#   )   sJ     	       	r#   c                   @   s.   e Zd ZeddddZeeddddZdS )TouchscreenNr   c                 C   s   || _ |jj| _|jj| _d S r	   r
   r   r   r   r   r   X   s    
zTouchscreen.__init__)r$   r%   r   c                    s   | j dtt I d H  d S )NZtouchscreenTapr   )r   r$   r%   r   r   r   tap]   s    zTouchscreen.tap)r   r   r    r   r   r"   r3   r   r   r   r   r2   W   s   r2   N)Zplaywright._impl._connectionr   Zplaywright._impl._helperr   r   r   r#   r2   r   r   r   r   <module>   s   .