
    bi	                         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y)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      j                  d      Z edd	      j                  d      Z e	d
      j                  d      Z
 e	d      j                  d      Zy)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     _/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/ipywidgets/widgets/widget_controller.pyr   r      ss    2csd9STXX^bXcET(HIMMSWMXG/044$4?J1266D6AKr&   r   c                       e Zd ZdZ edddd      j                  d      Z ed      j                  d      Z ed	      j                  d      Z	y
)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)      sW    0dt:RSWW]aWbE-.222=J/044$4?Kr&   r)   c                      e Zd ZdZ ed      j                  d      Z edd      j                  d      Z edd      j                  d      Z	 e
dd	      j                  d      Z edd
      j                  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      j                  d      Z ed      j                  d      Zy)
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-   $   s4   '78<<$<GE T(EFJJPTJUD+MNRRX\R]Gt*MNRRX\R]I+bcggmqgrI ijx/4Fcdhh  Lnr  L  wK  LG`:HTNdA[\``  Dfj  D  oC  DD)*..D.9J+,00d0;Kr&   r-   N)r   valuewidgetr   widgetr   r   	domwidgetr   widget_corer   trait_typesr   	traitletsr
   r   r   r   r   r   r)   r-   r%   r&   r'   <module>r>      s   
 % 2   # # 9 9 
BYZ B 
B 
@9k: @ 
@ 
<J < 
<r&   