3 <h3 id="TOP">Index</h3>
5 <ul><li><a href="#NAME">NAME</a></li>
6 <li><a href="#CATEGORY">CATEGORY</a></li>
7 <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
8 <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
9 <li><a href="#METHODS">METHODS</a>
10 <ul><li><a href="#new">new</a></li>
13 <li><a href="#AUTHOR">AUTHOR</a></li>
14 <li><a href="#SEE_ALSO">SEE ALSO</a>
19 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
20 <div id="NAME_CONTENT">
21 <p>SDL::Cursor -- Mouse cursor structure</p>
24 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
25 <div id="CATEGORY_CONTENT">
26 <p>Core, Mouse, Structure</p>
29 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
30 <div id="SYNOPSIS_CONTENT">
31 <pre> my $cursor = SDL::Cursor->new(
39 SDL::Mouse::set_cursor($cursor);
44 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
45 <div id="DESCRIPTION_CONTENT">
46 <p>the <code>SDL::Cursor</code> module handles mouse cursors, and provide the developer to
47 use custom made cursors. Note that the cursors can only be in black and
51 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
52 <div id="METHODS_CONTENT">
56 <div id="new_CONTENT">
57 <p>Create a cursor using the specified data and mask (in MSB format). The cursor width must be a multiple of 8 bits.</p>
58 <p>The cursor is created in black and white according to the following:</p>
59 <pre> Data / Mask Resulting pixel on screen
63 1 / 0 Inverted color if possible, black if not.
66 <p>Cursors created with this function must be freed with SDL_FreeCursor.</p>
67 <p>If you want to have color cursor, then this function is not for you; instead, you must hide normal system cursor with <code>SDL::Cursor-</code>new>
68 and in your main loop, when you draw graphics, also draw a <code>SDL::Surface</code> at the location of the mouse cursor. </p>
75 SDL::init(SDL_INIT_VIDEO);
76 SDL::Video::set_video_mode( 640, 480, 16, SDL_SWSURFACE);
100 my $cursor = SDL::Cursor->new( \@data, \@mask, 8, 8, 0, 0 );
103 SDL::Mouse::set_cursor($cursor);
110 <h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
111 <div id="AUTHOR_CONTENT">
112 <p>David J. Goehrig, Tobias Leich</p>
115 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
116 <div id="SEE_ALSO_CONTENT">
117 <p><a href="http://search.cpan.org/perldoc?perl">perl</a> <a href="/SDL-Mouse.html">SDL::Mouse</a></p>