1SDL::Cursor(3)        User Contributed Perl Documentation       SDL::Cursor(3)
2
3
4

NAME

6       SDL::Cursor - a SDL perl extension
7

SYNOPSIS

9         $cursor = SDL::Cursor->new(
10               -data => new SDL::Surface "cursor.png",
11               -mask => new SDL::Surface "mask.png",
12               -x    => 0, -y => 0 );
13         $cusor->use;
14

DESCRIPTION

16       the SDL::Cursor module handles mouse cursors, and provide the developer
17       to use custom made cursors. Note that the cursors can only be in black
18       and white.
19

METHODS

21   new( -data => $surface_data, -mask => $surface_mask, x => $x, y => $y)
22       Creates a new cursor. The <C>-data</C> and <C>-mask</C> parameters
23       should be both black and white pictures. The height and width of these
24       surfaces should be a multiple of 8. The <C>-x</C> and <C>-y</C> are the
25       coordinates of the cursor 'hot spot'.
26
27   warp($x, $y)
28       Set the position of the cursor at the <C>$x</C>, <C>$y</C> coordinates
29       in the application window.
30
31   use()
32       Set the cursor as the active cursor.
33
34   get()
35       When used statically <C>SDL::Cursor::get()</C>, it will return the
36       instance of the current cursor in use. Called as a method, it will
37       return itself.
38
39       This method can be useful if you are dealing with several cursors.
40
41   show($toggle)
42       Set the visibility of the cursor. A false value will make the cursor
43       invisible in the Application window. A true value will show it back.
44

AUTHOR

46       David J. Goehrig
47

SEE ALSO

49       perl SDL::Surface
50
51
52
53perl v5.12.0                      2010-05-06                    SDL::Cursor(3)
Impressum