
    hMh	                         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
eee	                      Ze G d deee	                      Ze G 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                      e Zd ZdZ edddd                              d          Z edd	                              d          Z e	d
                              d          Z
 e	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     d/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/ipywidgets/widgets/widget_controller.pyr   r      s        22Ecsd9STTTXX^bXccEdT(HIIIMMSWMXXG/0044$4??J'12266D6AAKKKr&   r   c                       e Zd ZdZ edddd                              d          Z ed                              d          Z e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        00Edt:RSSSWW]aWbbE-..222==J'/0044$4??KKKr&   r)   c                   f   e Zd ZdZ ed                              d          Z edd                              d          Z edd                              d          Z	 e
dd	                              d          Z edd
                              d          Z  e ee          dd          j        dddieZ  e ee          dd          j        dddieZ ed                              d          Z e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       ''C7888<<$<GGE 7T(EFFFJJPTJUUDg+MNNNRRX\R]]Gt*MNNNRRX\R]]I+bcccggmqgrrI ijjxx//4Fcdddh  L  Lnr  L  wK  L  LG`::HHTNNdA[\\\`  D  Dfj  D  oC  D  DD)**..D.99J'+,,00d0;;KKKr&   r-   N)r   valuewidgetr   widgetr   r   	domwidgetr   widget_corer   trait_typesr   	traitletsr
   r   r   r   r   r   r)   r-   r%   r&   r'   <module>r>      sa   
 % $ $ $ $ $ 2 2 2 2 2 2 2 2             # # # # # # # # # # # # 9 9 9 9 9 9 9 9 9 9 9 9 9 9 
B B B B BYZ B B 
B 
@ @ @ @ @9k: @ @ 
@ 
< < < < <J < < 
< < <r&   