
    &hF                     D   S r SSKr\R                  S\R                  S\R                  S\R
                  S\R                  S\R                  S\R                  S	\R                  S
\R                  S\R                  S\R                  S\R                  S0r " S S5      rS r\\R"                  l        CS r\\R"                  l        C\" SSSS5      r\" SSSS5      r\" SSSS5      r\" SSSS5      r\" SSSS 5      r\" SS!S"S#5      rS$rS%rS&rS'rS(rS+S) jrS* rg),a  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 that can be used to
create Cursor objects.

Alternately, you can also create Cursor objects using surfaces or cursors constants,
such as pygame.SYSTEM_CURSOR_ARROW.
    NSYSTEM_CURSOR_ARROWSYSTEM_CURSOR_IBEAMSYSTEM_CURSOR_WAITSYSTEM_CURSOR_CROSSHAIRSYSTEM_CURSOR_WAITARROWSYSTEM_CURSOR_SIZENWSESYSTEM_CURSOR_SIZENESWSYSTEM_CURSOR_SIZEWESYSTEM_CURSOR_SIZENSSYSTEM_CURSOR_SIZEALLSYSTEM_CURSOR_NOSYSTEM_CURSOR_HANDc                   N    \ rS rSrS rS rS rS rS rS r	S r
\
rS	 rS
 rSrg)Cursor8   c                    [        U5      S:X  a  SU l        [        R                  4U l        g
[        U5      S:X  a   US   [
        ;   a  SU l        US   4U l        g
[        U5      S:X  aA  [        US   [        5      (       a)  US   R                  U l        US   R                  U l        g
[        U5      S:X  aL  [        US   5      S:X  a:  [        US   [        R                  5      (       a  SU l        [        U5      U l        g
[        U5      S:X  aC  [        US   5      S:X  a1  [        US   5      S:X  a  SU l        [        S U 5       5      U l        g
[        S	5      e)a  Cursor(size, hotspot, xormasks, andmasks) -> Cursor
Cursor(hotspot, Surface) -> Cursor
Cursor(constant) -> Cursor
Cursor(Cursor) -> copies the Cursor object passed as an argument
Cursor() -> Cursor

pygame object for representing cursors

You can initialize a cursor from a system cursor or use the
constructor on an existing Cursor object, which will copy it.
Providing a Surface instance will render the cursor displayed
as that Surface when used.

These Surfaces may use other colors than black and white.r   system      color   bitmapc              3   8   #    U  H  n[        U5      v   M     g 7fN)tuple).0args     F/var/www/auris/envauris/lib/python3.13/site-packages/pygame/cursors.py	<genexpr>"Cursor.__init__.<locals>.<genexpr>Z   s     9DSeCjjDs   z+Arguments must match a cursor specificationN)lentypepygamer   data_cursor_id_table
isinstancer   Surfacer   	TypeError)selfargss     r   __init__Cursor.__init__9   s    t9> DI335DIY!^Q+; ; DIa
DIY!^
47F ; ;QDIQDIINs47|q0ZQ5X5XDIdDIY!^DG 1c$q'la6G DI 9D99DIIJJ    c                 ,    [        U R                  5      $ r   )r!   r$   r)   s    r   __len__Cursor.__len__^   s    499~r-   c                 ,    [        U R                  5      $ r   )iterr$   r/   s    r   __iter__Cursor.__iter__a   s    DIIr-   c                      U R                   U   $ r   )r$   )r)   indexs     r   __getitem__Cursor.__getitem__d   s    yyr-   c                 b    [        U[        5      =(       a    U R                  UR                  :H  $ r   )r&   r   r$   r)   others     r   __eq__Cursor.__eq__g   s!    %(DTYY%**-DDr-   c                 .    U R                  U5      (       + $ r   )r=   r;   s     r   __ne__Cursor.__ne__j   s    ;;u%%%r-   c                 $    U R                  U 5      $ )zSClone the current Cursor object.
You can do the same thing by doing Cursor(Cursor).)	__class__r/   s    r   __copy__Cursor.__copy__m   s     ~~d##r-   c                 l    [        [        U R                  /[        U R                  5      -   5      5      $ r   )hashr   r"   listr$   r/   s    r   __hash__Cursor.__hash__t   s%    E499+TYY7899r-   c                    U R                   S:X  a)  [        R                  U R                  S   S5      nSU S3$ U R                   S:X  a-  SU R                  S    3nSU R                  S	    3nS
U SU S3$ U R                   S:X  a3  SU R                  S    3n[	        U R                  S	   5      nSU SU S3$ [        S5      e)Nr   r   zconstant lookup errorz <Cursor(type: system, constant: z)>r   zsize: z	hotspot: r   z<Cursor(type: bitmap, z, r   z<Cursor(type: color, z, surf: zInvalid Cursor)r"   r%   getr$   reprr(   )r)   	id_stringsizehotspotsurfs        r   __repr__Cursor.__repr__w   s    99 (,,TYYq\;RSI5i[CC99 DIIaL>*D!$))A,0G+D6G9B??99!$))A,0G		!%D*7)8D6DD())r-   )r$   r"   N)__name__
__module____qualname____firstlineno__r+   r0   r4   r8   r=   r@   rD   copyrI   rR   __static_attributes__ r-   r   r   r   8   s9    #KJ E&$
 D:*r-   r   c                      [        U 6 n[        R                  R                  " S0 UR                  UR
                  0D6  g)zrset_cursor(pygame.cursors.Cursor OR args for a pygame.cursors.Cursor) -> None
set the mouse cursor to a new cursorNrZ   )r   r#   mouse_set_cursorr"   r$   )r*   cursors     r   
set_cursorr_      s/     T]F
LL:V[[9:r-   c                  J    [        [        R                  R                  5       6 $ )zBget_cursor() -> pygame.cursors.Cursor
get the current mouse cursor)r   r#   r\   _get_cursorrZ   r-   r   
get_cursorrb      s     6<<++-..r-   )   rc   )r   r   ) r   r   @   r   `   r   p   r   x   r   |   r   ~   r      r   rj      rh   r   l   r   F   r      r      r   ro   r   r   r   ) rd   r      r      r      r      r      r      r   ru   rk   ru      ru   rk   rt   r      r   O   r      rk   ry   rk   ro   r   )ry   ry   ) r   r   r   r   ro   rk   ry   rv      rp      rf   r   r   rf   r{   r   r   r{   rf   rz   rp   ry   rv   ro   rk   r   r   r   r   r   r   ) r   r   ro   rk   ry   rv      rp      rq   >   rr   rh   rh   rr   r~   rh   rh   r~   rr   r}   rq   r|   rp   ry   rv   ro   rk   r   r   r   r   ) r   r   ro   rv   r|   rq      rr   3   rs   7   rs   rj   rt   rj   rt   rj   rt   rj   rt   ?   rs   r   rs   r}   rr   r|   rq   ro   rv   r   r   ) ro   rv   r|   rq   r}   rr   r   rs   rj   rt   rj   rt   ru   ru   ru   ru   ru   ru   ru   ru   rj   rt   rj   rt   r   rs   r}   rr   r|   rq   ro   rv   ) r   r   re   rn   rf   rz   r   r{   r{   r      0   r   r   r   r   r   r   r   r   r   r   r{   r   r   r{   rf   rz   re   rn   r   r   ) rp   ry   rq   r|   rr   r}   rh   r~   r~   rh      rg   rz   rf   r   r   r   r   rz   rf   r   rg   r~   rh   rh   r~   rr   r}   rq   r|   rp   ry   )r   r   ) r   r   re   r   rg   r   r~   r   r   rk   r}   rp   r}   rr   r|   rt   r|   rt   ry   rk   ry   rk   ro   rk   ro   rk   r   rk   r   rk   r   r   ) rp   r   rr   r   rt   r   rj   rk   rj   rp   r   rr   r   rt   r}   ru   r}   ru   r|   rt   r|   rv   ry   rv   ry   rv   ro   rv   ro   rv   r   rk   )rz   r   ) r   r   r   rn   r   r   r   rh   r   rs   ry   rr   r}   rr   rj   rq   rj   rq   r   rp   r   rp   r   rv   r   rv   r   rk   r   rk   r   r   ) r   ry   r   r}   r   rj   r   rt   ry   rt   r}   rs   rj   rs   ru   rr   ru   rr   rj   rq   ro   rq   ro   rp   ro   rp   ro   rv   ro   rv   r   rk   )zXX                      zXXX                     zXXXX                    zXX.XX                   zXX..XX                  zXX...XX                 zXX....XX                zXX.....XX               zXX......XX              zXX.......XX             zXX........XX            zXX........XXX           zXX......XXXXX           zXX.XXX..XX              zXXXX XX..XX             zXX   XX..XX             z     XX..XX                   XX..XX            r   z       XXXX             z       XX                                       r   r   )     X      X               XX      XX             X.X      X.X           X..X      X..X         X...XXXXXXXX...X       zX................X      r   r   r   r   r   r   r   r   r   r   )     X              X.X            X...X          X.....X        X.......X      XXXXX.XXXXX     r   r   r   r   r   r   r   r   r   r   r   r   r                   r   r   r   r   )zXXXXXXXX                zX.....X                 zX....X                  zX...X                   zX..X.X                  zX.X X.X                 zXX   X.X    X           zX     X.X  XX           z       X.XX.X                   X...X           r   z       X....X           z      X.....X           z     XXXXXXXX           r   r   )ooo ooo    o    r   r   r   r   r   r   r   r   r   r           r   r   r   c                     [        U S   5      [        U 5      4nUS   S-  (       d  US   S-  (       a  [        SU 35      eU SS  H   n[        U5      US   :w  d  M  [        S5      e   / n/ nS=pSn
U  Hp  nU Hg  nUS-  nU	S-  n	U
S-
  n
X:X  a  US-  nU	S-  n	OX:X  a  US-  nO
X:X  a  U	S-  n	U
(       a  M@  UR                  U5        UR                  U	5        S=pSn
Mi     Mr     [        U5      [        U5      4$ )a  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.

Some systems allow you to set a special toggle color for the
system color, this is also called the xor color. If the system
does not support xor cursors, that color will simply be black.

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().
r      r   z+cursor string sizes must be divisible by 8 Nz'Cursor strings are inconsistent lengths)r!   
ValueErrorappendr   )stringsblackwhitexorrO   smaskdatafilldatamaskitemfillitemstepcs               r   compiler     s(   , wqz?CL(DAw{d1gkFtfMNNQR[q6T!WFGG  HHHDA1}H1}H!8Dz#a<#a<#a<#a<4))&''!  & ?E(O++r-   c                   ^ S m[        U S5      (       a  U R                  5       n O#[        U SS9 nUR                  5       n SSS5        [        US5      (       a  UR                  5       nO#[        USS9 nUR                  5       nSSS5        [        U 5       H!  u  pEUR	                  S5      (       d  M  XS n   O   [        U5       H!  u  pEUR	                  S5      (       d  M  XS n  O   [        U S   R                  5       S   5      n[        U S	   R                  5       S   5      nU S
   R	                  S5      (       a?  [        U S
   R                  5       S   5      n[        U S   R                  5       S   5      n	OS=pXgX4n
Sn[        U 5       H  u  pEUR	                  U5      (       d  M    O   SR                  U WS	-   S 5      R                  SS5      R                  SS5      n[        U4S jUR                  5        5       5      n[        U5       H  u  pEUR	                  U5      (       d  M    O   SR                  XS	-   S 5      R                  SS5      R                  SS5      n[        U4S jUR                  5        5       5      nU
SS
 U
S
S X4$ ! , (       d  f       GNi= f! , (       d  f       GN6= f)zpygame.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                 T    Sn[        S5       H  nU SU-  -  S:g  nUS-  U-  nM     U$ )Nr   r   r   )range)numvalxbs       r   bitswapload_xbm.<locals>.bitswap  s;    qAqAv!#A(Q,C  
r-   	readlinesascii)encodingNz#definer   r   r   ro   )zstatic charzstatic unsigned char z}; ,c              3   H   >#    U  H  nT" [        US 5      5      v   M     g7frc   Nintr   r   r   s     r   r   load_xbm.<locals>.<genexpr>?       ?,QWSBZ((,   "c              3   H   >#    U  H  nT" [        US 5      5      v   M     g7fr   r   r   s     r   r   r   D  r   r   )
hasattrr   open	enumerate
startswithr   splitjoinreplacer   )cursmaskcursor_fmask_filinewidthheighthotxhotyinfopossible_startsr$   cursdatar   r   s                  @r   load_xbmr     si    t[!!~~$)X%%'D * t[!!~~$)V##%D * T???9%%8D #
 T???9%%8D # Q#$Ea$%FAw)$$47==?2&'47==?2&'$$D=OT????++ # 88DQM"**44<<S#FD?$**,??HT????++ # 88DQM"**44<<S#FD?$**,??H8T!"Xx11W *) *)s   J$6J6$
J36
K)X.o) __doc__r#   r   r   r   r   r   r   r	   r
   r   r   r   r   r%   r   r_   r\   rb   arrowdiamondballbroken_xtri_left	tri_rightthickarrow_stringssizer_x_stringssizer_y_stringssizer_xy_stringstextmarker_stringsr   r   rZ   r-   r   <module>r      s  *"   5
 5
3
""$=
""$=
!!#;
!!#;
!7
!7
  "9
/
3  K* K*^; % / % 
!D!KG	R 
!D!KGR 
!D!KGR 
!D!KGR 
!D!KGR !D!KG	` 8(8 ( (7,t>2r-   