<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<pre> my $cursor = SDL::Cursor->new(
- SDL::Video::load_BMP("cursor.png"),
- SDL::Video::load_BMP("mask.png"),
- 0, 0 );
+ \@data,
+ \@mask,
+ $width,
+ $height,
+ $hotspot_left,
+ $hotspot_top );
+
SDL::Mouse::set_cursor($cursor);
</pre>
</div>
<h2 id="new">new</h2>
<div id="new_CONTENT">
-<pre> object new( object $data, object $mask, int $x, int $y )
+<p>Create a cursor using the specified data and mask (in MSB format). The cursor width must be a multiple of 8 bits.</p>
+<p>The cursor is created in black and white according to the following:</p>
+<pre> Data / Mask Resulting pixel on screen
+ 0 / 1 White
+ 1 / 1 Black
+ 0 / 0 Transparent
+ 1 / 0 Inverted color if possible, black if not.
+
+</pre>
+<p>Cursors created with this function must be freed with SDL_FreeCursor.</p>
+<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>
+and in your main loop, when you draw graphics, also draw a <code>SDL::Surface</code> at the location of the mouse cursor. </p>
+<p>Example:</p>
+<pre> use SDL;
+ use SDL::Cursor;
+ use SDL::Mouse;
+ use SDL::Video;
+
+ SDL::init(SDL_INIT_VIDEO);
+ SDL::Video::set_video_mode( 640, 480, 16, SDL_SWSURFACE);
+
+ my @data = (
+ 0b00000000,
+ 0b00111100,
+ 0b01111110,
+ 0b01111110,
+ 0b01111110,
+ 0b01111110,
+ 0b00111100,
+ 0b00000000
+ );
+
+ my @mask = (
+ 0b00111100,
+ 0b01111110,
+ 0b11100111,
+ 0b11000011,
+ 0b11000011,
+ 0b11100111,
+ 0b01111110,
+ 0b00111100
+ );
+
+ my $cursor = SDL::Cursor->new( \@data, \@mask, 8, 8, 0, 0 );
+
+ sleep(1);
+ SDL::Mouse::set_cursor($cursor);
+
+ sleep(5);
</pre>
-<p>Creates a new cursor. The <code>data</code> and <code>mask</code> parameters should be both black and white pictures. The height and width of these surfaces
-should be a multiple of 8. The <code>x</code> and <code>y</code> are the coordinates of the cursor 'hot spot'.</p>
</div>
<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
--- /dev/null
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#EXPORTS">EXPORTS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#cd_num_drives">cd_num_drives()</a></li>
+<li><a href="#name_cd">name(cd)</a></li>
+<li><a href="#status_cd">status(cd)</a></li>
+<li><a href="#play_cd_start_length_fs_fl">play(cd,start,length,fs,fl) </a></li>
+<li><a href="#pause_cd">pause(cd)</a></li>
+<li><a href="#resume_cd">resume(cd)</a></li>
+<li><a href="#stop_cd">stop(cd)</a></li>
+<li><a href="#eject_cd">eject(cd)</a></li>
+<li><a href="#id_cd">id(cd)</a></li>
+<li><a href="#num_tracks_cd">num_tracks(cd)</a></li>
+<li><a href="#track_cd_number">track(cd,number)</a></li>
+<li><a href="#current_cd">current(cd)</a></li>
+<li><a href="#current_frame_cd">current_frame(cd)</a></li>
+</ul>
+</li>
+<li><a href="#AUTHORS">AUTHORS</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Cdrom - a SDL perl extension for managing CD-ROM drives</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre> use SDL::Cdrom;
+ $cdrom = SDL::Cdrom->new(0);
+ $cdrom->play();
+
+</pre>
+
+</div>
+<h1 id="EXPORTS">EXPORTS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="EXPORTS_CONTENT">
+<ul>
+ <li><code>cd_num_drives</code>.</li>
+</ul>
+
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>Create a new SDL::Cdrom object. The passed $id is the number of the drive,
+whereas 0 is the first drive etc.</p>
+<pre> use SDL::Cdrom;
+ my $drive => SDL::Cdrom->new($id);
+
+</pre>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="cd_num_drives">cd_num_drives()</h2>
+<div id="cd_num_drives_CONTENT">
+<p>Returns the number of CD-ROM drives present.</p>
+
+</div>
+<h2 id="name_cd">name(cd)</h2>
+<div id="name_cd_CONTENT">
+<p>Returns the system dependent name of the CD-ROM device.
+It takes a SDL::Cdrom as first parameter.</p>
+
+</div>
+<h2 id="status_cd">status(cd)</h2>
+<div id="status_cd_CONTENT">
+<p>Return the status of the drive.
+It takes a SDL::Cdrom as first parameter.</p>
+
+</div>
+<h2 id="play_cd_start_length_fs_fl">play(cd,start,length,fs,fl) </h2>
+<div id="play_cd_start_length_fs_fl_CONTENT">
+<p>Play a track from the SDL::Cdrom given as first parameter, second parameter is the frame to start, the third is the lenght to play.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="pause_cd">pause(cd)</h2>
+<div id="pause_cd_CONTENT">
+<p>Pause the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="resume_cd">resume(cd)</h2>
+<div id="resume_cd_CONTENT">
+<p>Resume the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="stop_cd">stop(cd)</h2>
+<div id="stop_cd_CONTENT">
+<p>Stop the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="eject_cd">eject(cd)</h2>
+<div id="eject_cd_CONTENT">
+<p>Eject the medium in the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="id_cd">id(cd)</h2>
+<div id="id_cd_CONTENT">
+<p>Return the ID of the drive given as first parameter.</p>
+
+</div>
+<h2 id="num_tracks_cd">num_tracks(cd)</h2>
+<div id="num_tracks_cd_CONTENT">
+<p>Return the number of tracks on the SDL::Cdrom given as first parameter.</p>
+
+</div>
+<h2 id="track_cd_number">track(cd,number)</h2>
+<div id="track_cd_number_CONTENT">
+<p>Returns the track description of the track given as second parameter.
+the first parameter is a SDL:Cdrom.</p>
+
+</div>
+<h2 id="current_cd">current(cd)</h2>
+<div id="current_cd_CONTENT">
+<p>Return the current played track number given as first parameter.</p>
+
+</div>
+<h2 id="current_frame_cd">current_frame(cd)</h2>
+<div id="current_frame_cd_CONTENT">
+<p>Return the current frame given as first parameter.</p>
+
+</div>
+<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHORS_CONTENT">
+<p>David J. Goehrig
+Documentation by Tels <http://bloodgate.com/>.</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Mixer</cite> <cite>SDL::App</cite>.</p>
+
+</div>
+</div>
\ No newline at end of file