ó
/¾I]c           @   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 d	 e e e	 f d
 „  ƒ  Yƒ Z e d e e e	 f d „  ƒ  Yƒ Z e d e e	 f d „  ƒ  Yƒ Z d S(   s@   Controller class.

Represents a Gamepad or Joystick controller.
i   (   t   ValueWidget(   t   registert   widget_serialization(   t	   DOMWidget(   t
   CoreWidget(   t
   TypedTupleiÿÿÿÿ(   t   Boolt   Intt   Floatt   Unicodet   Instancet   Buttonc        	   B   sŒ   e  Z d  Z e d d d d d e d d ƒ j d e ƒ Z e d e d d	 ƒ j d e ƒ Z e	 d
 ƒ j d e ƒ Z
 e	 d ƒ j d e ƒ Z RS(   s(   Represents a gamepad or joystick button.t   ming        t   maxg      ð?t	   read_onlyt   helps   The value of the button.t   syncs   Whether the button is pressed.t   ControllerButtonViewt   ControllerButtonModel(   t   __name__t
   __module__t   __doc__R   t   Truet   tagt   valueR   t   pressedR	   t
   _view_namet   _model_name(    (    (    sC   lib/python2.7/site-packages/ipywidgets/widgets/widget_controller.pyR      s
   -!t   Axisc        	   B   sk   e  Z d  Z e d d d d d e d d ƒ j d e ƒ Z e d	 ƒ j d e ƒ Z e d
 ƒ j d e ƒ Z	 RS(   s&   Represents a gamepad or joystick axis.R   g      ð¿R   g      ð?R   R   s   The value of the axis.R   t   ControllerAxisViewt   ControllerAxisModel(
   R   R   R   R   R   R   R   R	   R   R   (    (    (    sC   lib/python2.7/site-packages/ipywidgets/widgets/widget_controller.pyR      s   -t
   Controllerc           B   s=  e  Z d  Z e d d ƒ j d e ƒ Z e d e d d ƒ j d e ƒ Z e d e d d ƒ j d e ƒ Z	 e
 d e d d ƒ j d e ƒ Z e d e d d ƒ j d e ƒ Z e d	 e e ƒ d e d d
 ƒ j d e e  Z e d	 e e ƒ d e d d ƒ j d e e  Z e d ƒ j d e ƒ Z e d ƒ j d e ƒ Z RS(   s   Represents a game controller.R   s    The id number of the controller.R   R   s   The name of the controller.s    The name of the control mapping.s!   Whether the gamepad is connected.s5   The last time the data from this gamepad was updated.t   traits   The buttons on the gamepad.s   The axes on the gamepad.t   ControllerViewt   ControllerModel(   R   R   R   R   R   R   t   indexR	   t   namet   mappingR   t	   connectedR   t	   timestampR   R
   R   R   t   buttonsR   t   axesR   R   (    (    (    sC   lib/python2.7/site-packages/ipywidgets/widgets/widget_controller.pyR   $   s   !!!!00N(   R   t   valuewidgetR    t   widgetR   R   t	   domwidgetR   t   widget_coreR   t   trait_typesR   t	   traitletsR   R   R   R	   R
   R   R   R   (    (    (    sC   lib/python2.7/site-packages/ipywidgets/widgets/widget_controller.pyt   <module>   s   (	