ó
X–Tc           @   s€   d  Z  d d l Z d d l Z d d l Z e j e Z d e j f d „  ƒ  YZ e e ƒ Z	 e	 e j e <e	 j
 j e j
 ƒ d S(   s±  The keyboard modules provides an interface to adjust the keyboard's repeat
rate.

.. attribute:: repeat

    When the keyboard repeat is enabled, keys that are held down will keep
    generating new events over time. Defaults to `False`.

.. attribute:: delay

    `int` to control how many milliseconds before the repeats start.

.. attribute:: interval

    `int` to control how many milliseconds to wait between repeated events.

iÿÿÿÿNt   _KeyboardModulec           B   s}   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 e
 e e ƒ Z e
 e	 e ƒ Z e
 e e ƒ Z RS(   c         G   s2   t  j j |  | Œ t |  _ d |  _ d |  _ d  S(   NiX  id   (   t   typest
   ModuleTypet   __init__t   Falset   _repeatt   _delayt	   _interval(   t   selft   args(    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyR      s    		c         C   s6   |  j  r% t j j |  j |  j ƒ n t j j ƒ  d  S(   N(   R   t   pygamet   keyt
   set_repeatR   R   (   R   (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   _update_repeat_status    s    	c         C   s   | |  _  |  j ƒ  d  S(   N(   R   R   (   R   t   repeat(    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   _set_repeat&   s    	c         C   s   |  j  S(   N(   R   (   R   (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   _get_repeat*   s    c         C   s   | |  _  |  j ƒ  d  S(   N(   R   R   (   R   t   interval(    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   _set_interval-   s    	c         C   s   |  j  S(   N(   R   (   R   (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   _get_interval1   s    c         C   s/   | |  _  | d k r! t |  _ n  |  j ƒ  d  S(   Ni    (   R   R   R   R   (   R   t   delay(    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt
   _set_delay4   s    	c         C   s   |  j  S(   N(   R   (   R   (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt
   _get_delay:   s    (   t   __name__t
   __module__R   R   R   R   R   R   R   R   t   propertyR   R   R   (    (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyR       s   								(   t   __doc__t   sysR   R
   t   modulesR   t   oldR   R    t   keyboardt   __dict__t   update(    (    (    s3   /usr/lib/python2.7/site-packages/spyral/keyboard.pyt   <module>   s   )