ó
ì[Jc        #   @   s¯   d  Z  d_ d` da db f Z dc dd de df f Z dg dh di dj f Z dk dl dm dn f Z do dp dq dr f Z ds dt du dv f Z dw Z dx Z dy Z	 dz Z
 d{ Z dY dZ d[ d\ „ Z d] „  Z d^ S(|   s  Set of cursor resources available for use. These cursors come
in a sequence of values that are needed as the arguments for
pygame.mouse.set_cursor(). to dereference the sequence in place
and create the cursor in one step, call like this;
pygame.mouse.set_cursor(*pygame.cursors.arrow).

Here is a list of available cursors; arrow, diamond, ball,
        broken_x, tri_left, tri_right

There is also a sample string cursor named 'thickarrow_strings'.
The compile() function can convert these string cursors into cursor byte data.
i   i    i@   i`   ip   ix   i|   i~   i   i€   il   iF   i   i   ià   ið   iø   iü   iþ   iÿ   iÀ   iï   iO   i   i   i   i   i8   i   i   i>   i   i3   i7   i?   i   i0   i   s   XX                      s   XXX                     s   XXXX                    s   XX.XX                   s   XX..XX                  s   XX...XX                 s   XX....XX                s   XX.....XX               s   XX......XX              s   XX.......XX             s   XX........XX            s   XX........XXX           s   XX......XXXXX           s   XX.XXX..XX              s   XXXX XX..XX             s   XX   XX..XX             s        XX..XX             s         XX..XX            s          XXXX             s          XX               s                           s        X      X           s       XX      XX          s      X.X      X.X         s     X..X      X..X        s    X...XXXXXXXX...X       s   X................X      s        X          s       X.X         s      X...X        s     X.....X       s    X.......X      s   XXXXX.XXXXX     s                   s   XXXXXXXX                s   X.....X                 s   X....X                  s   X...X                   s   X..X.X                  s   X.X X.X                 s   XX   X.X    X           s   X     X.X  XX           s          X.XX.X           s           X...X           s          X....X           s         X.....X           s        XXXXXXXX           s   ooo ooo s      o    s           t   Xt   .t   oc         C   s  t  |  d ƒ t  |  ƒ f } | d d s8 | d d rK t d | ƒ ‚ n  x7 |  d D]+ } t  | ƒ | d k rV t d ƒ ‚ qV qV Wg  } g  } d } }	 d }
 xÅ |  D]½ } x´ | D]¬ } | d >} |	 d >}	 |
 d }
 | | k rò | d B} n< | | k r| d B} |	 d B}	 n | | k r.|	 d B}	 n  |
 sµ | j | ƒ | j |	 ƒ d } }	 d }
 qµ qµ Wq¨ Wt | ƒ t | ƒ f S(   sT  pygame.cursors.compile(strings, black, white,xor) -> data, mask
compile cursor strings into cursor data

This takes a set of strings with equal length and computes
the binary data for that cursor. The string widths must be
divisible by 8.

The black and white arguments are single letter strings that
tells which characters will represent black pixels, and which
characters represent white pixels. All other characters are
considered clear.

This returns a tuple containing the cursor data and cursor mask
data. Both these arguments are used when setting a cursor with
pygame.mouse.set_cursor().
i    i   i   s-   cursor string sizes must be divisible by 8 %ss'   Cursor strings are inconsistent lengths(   t   lent
   ValueErrort   appendt   tuple(   t   stringst   blackt   whitet   xort   sizet   st   maskdatat   filldatat   maskitemt   fillitemt   stept   c(    (    s;   c:\mingw\msys\1.0\newbuild\install\python\pygame\cursors.pyt   compile½   s:    





c         C   s  d „  } t  |  ƒ t  d ƒ k r0 t |  ƒ }  n  t  | ƒ t  d ƒ k rW t | ƒ } n  |  j ƒ  }  | j ƒ  } x; t t |  ƒ ƒ D]' } |  | j d ƒ r‚ |  | }  Pq‚ q‚ Wx; t t | ƒ ƒ D]' } | | j d ƒ rÀ | | } PqÀ qÀ Wt |  d j ƒ  d ƒ } t |  d j ƒ  d ƒ } |  d j d ƒ rit |  d j ƒ  d ƒ } t |  d j ƒ  d ƒ } n
 d } } | | | | f } xD t t |  ƒ ƒ D]0 } |  | j d	 ƒ sÄ|  | j d
 ƒ r˜Pq˜q˜Wd j |  | d ƒ j	 d d ƒ j	 d d ƒ }	 g  }
 x0 |	 j ƒ  D]" } |
 j
 | t | d ƒ ƒ ƒ qWt |
 ƒ }
 xD t t | ƒ ƒ D]0 } | | j d	 ƒ s| | j d
 ƒ rSPqSqSWd j | | d ƒ j	 d d ƒ j	 d d ƒ }	 g  } x0 |	 j ƒ  D]" } | j
 | t | d ƒ ƒ ƒ qÉWt | ƒ } | d  | d |
 | f S(   sÿ   pygame.cursors.load_xbm(cursorfile, maskfile) -> cursor_args
reads a pair of XBM files into set_cursor arguments

Arguments can either be filenames or filelike objects
with the readlines method. Not largely tested, but
should work with typical XBM files.
c         S   sC   d } x6 t  d ƒ D]( } |  d | >@d k } | d >| B} q W| S(   Ni    i   i   (   t   range(   t   numt   valt   xt   b(    (    s;   c:\mingw\msys\1.0\newbuild\install\python\pygame\cursors.pyt   bitswapü   s
    t    s   #definei    iÿÿÿÿi   i   i   s   static chars   static unsigned chart    s   };t   ,i   (   t   typet   opent	   readlinesR   R   t
   startswitht   intt   splitt   joint   replaceR   R   (   t   curst   maskR   t   linet   widtht   heightt   hotxt   hotyt   infot   datat   cursdataR   R   (    (    s;   c:\mingw\msys\1.0\newbuild\install\python\pygame\cursors.pyt   load_xbmô   sN    	  


&/ &/ N(   i   i   (   i    i    (    i    i    i@   i    i`   i    ip   i    ix   i    i|   i    i~   i    i   i    i   i€   i|   i    il   i    iF   i    i   i    i   i    i   i    i    i    (    i@   i    ià   i    ið   i    iø   i    iü   i    iþ   i    iÿ   i    iÿ   i€   iÿ   iÀ   iÿ   i€   iþ   i    iï   i    iO   i    i   i€   i   i€   i   i    (   i   i   (   i   i   (    i    i    i   i    i   i€   i   iÀ   i   ià   i   ip   i8   i8   ip   i   i8   i8   i   ip   i   ià   i   iÀ   i   i€   i   i    i    i    i    i    (    i   i    i   i€   i   iÀ   i   ià   i   ið   i>   iø   i|   i|   iø   i>   i|   i|   i>   iø   i   ið   i   ià   i   iÀ   i   i€   i   i    i    i    (   i   i   (   i   i   (    i    i    i   iÀ   i   ið   i   iø   i3   iü   i7   iü   i   iþ   i   iþ   i   iþ   i   iþ   i?   iü   i?   iü   i   iø   i   ið   i   iÀ   i    i    (    i   iÀ   i   ið   i   iø   i?   iü   i   iþ   i   iþ   iÿ   iÿ   iÿ   iÿ   iÿ   iÿ   iÿ   iÿ   i   iþ   i   iþ   i?   iü   i   iø   i   ið   i   iÀ   (   i   i   (   i   i   (    i    i    i`   i   ip   i   i8   i   i   i8   i   i0   i    i    i    i    i    i    i    i    i   i0   i   i8   i8   i   ip   i   i`   i   i    i    (    ià   i   ið   i   iø   i   i|   i>   i>   i|   i   ix   i   ip   i    i    i    i    i   ip   i   ix   i>   i|   i|   i>   iø   i   ið   i   ià   i   (   i   i   (   i   i   (    i    i    i`   i    ix   i    i>   i    i?   i€   i   ià   i   iø   i   iþ   i   iþ   i   i€   i   i€   i   i€   i   i€   i   i€   i   i€   i    i    (    ià   i    iø   i    iþ   i    i   i€   i   ià   i?   iø   i?   iþ   i   iÿ   i   iÿ   i   iþ   i   iÀ   i   iÀ   i   iÀ   i   iÀ   i   iÀ   i   i€   (   i   i   (   i   i   (    i    i    i    i   i    i   i    i|   i   iü   i   iø   i   iø   i   ið   i   ið   i   ià   i   ià   i   iÀ   i   iÀ   i   i€   i   i€   i    i    (    i    i   i    i   i    i   i   iþ   i   iþ   i   iü   i   iü   iÿ   iø   iÿ   iø   i   ið   i   ið   i   ià   i   ià   i   iÀ   i   iÀ   i   i€   (   s   XX                      s   XXX                     s   XXXX                    s   XX.XX                   s   XX..XX                  s   XX...XX                 s   XX....XX                s   XX.....XX               s   XX......XX              s   XX.......XX             s   XX........XX            s   XX........XXX           s   XX......XXXXX           s   XX.XXX..XX              s   XXXX XX..XX             s   XX   XX..XX             s        XX..XX             s         XX..XX            s         XX..XX            s          XXXX             s          XX               s                           s                           s                           (   s        X      X           s       XX      XX          s      X.X      X.X         s     X..X      X..X        s    X...XXXXXXXX...X       s   X................X      s    X...XXXXXXXX...X       s     X..X      X..X        s      X.X      X.X         s       XX      XX          s        X      X           s                           s                           s                           s                           s                           (   s        X          s       X.X         s      X...X        s     X.....X       s    X.......X      s   XXXXX.XXXXX     s       X.X         s       X.X         s       X.X         s       X.X         s       X.X         s       X.X         s       X.X         s   XXXXX.XXXXX     s    X.......X      s     X.....X       s      X...X        s       X.X         s        X          s                   s                   s                   s                   s                   (   s   XXXXXXXX                s   X.....X                 s   X....X                  s   X...X                   s   X..X.X                  s   X.X X.X                 s   XX   X.X    X           s   X     X.X  XX           s          X.XX.X           s           X...X           s           X...X           s          X....X           s         X.....X           s        XXXXXXXX           s                           s                           (   s   ooo ooo s      o    s      o    s      o    s      o    s      o    s      o    s      o    s      o    s      o    s      o    s   ooo ooo s           s           s           s           (   t   __doc__t   arrowt   diamondt   ballt   broken_xt   tri_leftt	   tri_rightt   thickarrow_stringst   sizer_x_stringst   sizer_y_stringst   sizer_xy_stringst   textmarker_stringsR   R/   (    (    (    s;   c:\mingw\msys\1.0\newbuild\install\python\pygame\cursors.pyt   <module>    s    	  	   	  	  	  		                                                                                           7