Fixed the pod path in archive
[sdlgit/SDL_perl.git] / lib / pods / SDL / Cursor.pod
CommitLineData
896b04ee 1=pod
2
896b04ee 3=head1 NAME
4
5SDL::Cursor - a SDL perl extension
6
7=head1 SYNOPSIS
8
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
15=head1 DESCRIPTION
16
17the SDL::Cursor module handles mouse cursors, and provide the developer to
18use custom made cursors. Note that the cursors can only be in black and
19white.
20
21=head1 METHODS
22
23=head2 new( -data => $surface_data, -mask => $surface_mask, x => $x, y => $y)
24
25Creates a new cursor. The <C>-data</C> and <C>-mask</C> parameters should be both black and white pictures. The height and width of these surfaces should be a multiple of 8. The <C>-x</C> and <C>-y</C> are the coordinates of the cursor 'hot spot'.
26
472bc0a1 27=head2 warp(cursor,x, y)
896b04ee 28
472bc0a1 29Set the position of the SDL::Cursor given as first parameter .
30the new postion is set to <C>x</C>, <C>y</C> coordinates in the application window.
31SDL::warp trigger a new mouse motion event.
32It doesn't returns anything.
896b04ee 33
472bc0a1 34=head2 use(cursor)
896b04ee 35
472bc0a1 36Set the SDL::Cursor given as first parameter to the active cursor.
896b04ee 37
38=head2 get()
39
40When used statically <C>SDL::Cursor::get()</C>, it will return the instance of the current cursor in use. Called as a method, it will return itself.
41
42This method can be useful if you are dealing with several cursors.
43
44=head2 show($toggle)
45
46Set the visibility of the cursor. A false value will make the cursor
47invisible in the Application window. A true value will show it back.
48
49=head1 AUTHOR
50
51David J. Goehrig
52
53=head1 SEE ALSO
54
55L<perl> L<SDL::Surface>
56
57=cut