³ò
JºØHc           @   sJ   d  Z  d d k Z d d k Z e d ƒ \ Z Z Z d d d „  ƒ  YZ d S(   s   cursor.py - Cursor handler.iÿÿÿÿNi   t   CursorHandlerc           B   sP   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   c         C   s(   | |  _  d  |  _ t |  _ t |  _ d  S(   N(   t   _windowt   Nonet	   _timer_idt   Falset
   _auto_hidet   NORMALt   _current_cursor(   t   selft   window(    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyt   __init__   s    			c         C   s¿   | t  j o
 d } nY | t j o t i i t i i ƒ } n0 | t j o t i i t i i ƒ } n | } |  i	 i
 | ƒ | |  _ |  i o) | t  j o |  i ƒ  q» |  i ƒ  n d S(   sÎ   Set the cursor to type <cursor>. Supported cursor types are
        available as constants in this module. If <cursor> is not one of the
        cursor constants above, it must be a gtk.gdk.Cursor.
        N(   R   R   t   GRABt   gtkt   gdkt   Cursort   FLEURt   WAITt   WATCHR   t
   set_cursorR   R   t   _set_hide_timert   _kill_timer(   R   t   cursort   mode(    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyt   set_cursor_type   s    
	
c         C   s+   t  |  _ |  i t j o |  i ƒ  n d S(   sl   Signal that the cursor should auto-hide from now on (e.g. that
        we are entering fullscreen).
        N(   t   TrueR   R   R   R   (   R   (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyt   auto_hide_on&   s    	c         C   s8   t  |  _ |  i ƒ  |  i t j o |  i t ƒ n d S(   s:   Signal that the cursor should *not* auto-hide from now on.N(   R   R   R   R   R   R   (   R   (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyt   auto_hide_off.   s    	
c         C   s"   |  i  o |  i |  i ƒ n d S(   s~   Refresh the current cursor (i.e. display it and set a new timer in
        fullscreen). Used when we move the cursor.
        N(   R   R   R   (   R   (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyt   refresh5   s    
c         C   s2   |  i  ƒ  t i d |  i i |  i ƒ  ƒ |  _ d  S(   NiÐ  (   R   t   gobjectt   timeout_addR   R   t   _get_hidden_cursorR   (   R   (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyR   <   s    
c         C   s(   |  i  d  j	 o t i |  i  ƒ n d  S(   N(   R   R   R   t   source_remove(   R   (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyR   A   s    c         C   sI   t  i i d  d d d ƒ } t  i i ƒ  } t  i i | | | | d d ƒ S(   Ni   i    (   R   R   t   PixmapR   t   ColorR   (   R   t   pixmapt   color(    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyR   E   s    (
   t   __name__t
   __module__R
   R   R   R   R   R   R   R   (    (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pyR    	   s   							(    (   t   __doc__R   R   t   rangeR   R   R   R    (    (    (    sF   /home/sork/Pontus/Programmering/Python/Comix/comix-4.0.4/src/cursor.pys   <module>   s   