The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SDL::Cursor - a SDL perl extension

SYNOPSIS

 $cursor = new SDL::Cursor      -data => new SDL::Surface "cursor.png", 
                                -mask => new SDL::Surface "mask.png",
                                -x => 0, -y => 0;

DESCRIPTION

        To create a new cursor, create a new instance of the Cursor
class passing it two surfaces as shown in the example.  The x and
y values indicate the position of the hot-spot for clicking.

To move the cursor to a position on the screen use the warp method passing the values of x and y. The warp function does not require an instance to have been created, and can be safely used directly.

        SDL::Cursor::warp(x,y);
        $cursor->warp(200,200);

Similary, to toggle the visible status of the cursor use the show method:

        SDL::Cursor::show(0);   # this hides the cursor
        $cursor->show(1);       # make the cursor visible

If you have created a new Cursor, to set it as the active cursor use the method 'use':

        $cursor->use();

Finally, if you are using more than one instance of a SDL_Cursor *, you may find the get method useful for finding out the current cursor.

        SDL::Cursor::get();
        $cursor->get();

NB: This will not return the value of that instance, but rather the instance currently in use;

AUTHOR

David J. Goehrig

SEE ALSO

perl(1) SDL::Surface(3).