o
    ^i	                     @   s   d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZmZmZmZmZ eG d	d
 d
eee	ZeG dd deee	ZeG dd dee	ZdS )z@Controller class.

Represents a Gamepad or Joystick controller.
   )ValueWidget)registerwidget_serialization)	DOMWidget)
CoreWidget)
TypedTuple    )BoolIntFloatUnicodeInstancec                   @   s\   e Zd ZdZedddddjddZeddd	jddZe	d
jddZ
e	djddZdS )Buttonz(Represents a gamepad or joystick button.g              ?TzThe value of the button.minmax	read_onlyhelpsynczWhether the button is pressed.r   r   ControllerButtonViewControllerButtonModelN)__name__
__module____qualname____doc__r   tagvaluer	   pressedr   
_view_name_model_name r#   r#   _/home/ubuntu/hpml_nyu/venv/lib/python3.10/site-packages/ipywidgets/widgets/widget_controller.pyr      s    r   c                   @   sH   e Zd ZdZedddddjddZedjddZed	jddZ	d
S )Axisz&Represents a gamepad or joystick axis.g      r   TzThe value of the axis.r   r   ControllerAxisViewControllerAxisModelN)
r   r   r   r   r   r   r   r   r!   r"   r#   r#   r#   r$   r%      s
    r%   c                   @   s   e Zd ZdZeddjddZedddjddZedddjddZ	e
dd	djddZedd
djddZeeedddjdddieZeeedddjdddieZedjddZedjddZdS )
ControllerzRepresents a game controller.z The id number of the controller.)r   Tr   zThe name of the controller.r   z The name of the control mapping.z!Whether the gamepad is connected.z5The last time the data from this gamepad was updated.zThe buttons on the gamepad.)traitr   r   r   zThe axes on the gamepad.ControllerViewControllerModelNr#   )r   r   r   r   r
   r   indexr   namemappingr	   	connectedr   	timestampr   r   r   r   buttonsr%   axesr!   r"   r#   r#   r#   r$   r(   $   s    ""r(   N)r   valuewidgetr   widgetr   r   	domwidgetr   widget_corer   trait_typesr   	traitletsr	   r
   r   r   r   r   r%   r(   r#   r#   r#   r$   <module>   s   	