5 SDL::Cursor - a SDL perl extension
9 $cursor = SDL::Cursor->new(
10 -data => new SDL::Surface "cursor.png",
11 -mask => new SDL::Surface "mask.png",
17 the SDL::Cursor module handles mouse cursors, and provide the developer to
18 use custom made cursors. Note that the cursors can only be in black and
23 =head2 new( -data => $surface_data, -mask => $surface_mask, x => $x, y => $y)
25 Creates 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'.
27 =head2 warp(cursor,x, y)
29 Set the position of the SDL::Cursor given as first parameter .
30 the new postion is set to <C>x</C>, <C>y</C> coordinates in the application window.
31 SDL::warp trigger a new mouse motion event.
32 It doesn't returns anything.
36 Set the SDL::Cursor given as first parameter to the active cursor.
40 When 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.
42 This method can be useful if you are dealing with several cursors.
46 Set the visibility of the cursor. A false value will make the cursor
47 invisible in the Application window. A true value will show it back.
55 L<perl> L<SDL::Surface>