From: Kartik Thakore
Date: Tue, 24 Nov 2009 18:58:00 +0000 (-0500)
Subject: Added more doc pages
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37af21e0ad960cda784a3d3e51fd40b0f565af03;p=sdlgit%2FSDL-Site.git
Added more doc pages
---
diff --git a/pages/SDL-Audio.html-inc b/pages/SDL-Audio.html-inc
index 64fc07e..ff25844 100644
--- a/pages/SDL-Audio.html-inc
+++ b/pages/SDL-Audio.html-inc
@@ -9,7 +9,7 @@
- open_audio
- PauseAudio
- GetAudioStatus
-- load_wav
+- LoadWAV
- FreeWAV
- AudioCVT
- BuildAudioCVT
@@ -61,8 +61,8 @@
Gets the current audio state
-load_wav
-
+
LoadWAV
+
diff --git a/pages/SDL-CD.html-inc b/pages/SDL-CD.html-inc
index 948fd94..89a1b89 100644
--- a/pages/SDL-CD.html-inc
+++ b/pages/SDL-CD.html-inc
@@ -3,7 +3,45 @@
Index
@@ -15,7 +53,189 @@
CATEGORY
Top
-
TODO, Core, CDROM, Structure
+
Core, CDROM, Structure
+
+
+SYNOPSIS
Top
+
+
use SDL;
+ use SDL::CDROM;
+ use SDL::CD;
+
+ SDL::init(SDL_INIT_CDROM);
+
+ my $drives = SDL::CDROM::num_drives;
+
+ if( $drives > 0 )
+ {
+ my $CD = SDL::CD->new( 0 );
+
+ if($CD != NULL)
+ {
+ ...
+ }
+
+ }
+
+ SDL::quit();
+
+
+
+
+METHOD
Top
+
+
+
+new( $drive )
+
+
my $CD = SDL::CD->new( $drive )
+
+
+
Makes a new SDL::CD object. Returns NULL if the drive is busy or inaccessible.
+
+
+status
+
+
my $status = $CD->status();
+
+
+
Returns the current status of the CD tray
+
+
+returns
+
+
+ - CD_TRAYEMPTY
+ - CD_STOPPED
+ - CD_PLAYING
+ - CD_PAUSED
+ - CD_ERROR = -1
+
+
+
+
+
+
+
+play_tracks
+
+
$CD->play_tracks($start_track, $start_frame, $ntracks, $nframes)
+
+
+
Plays the given SDL::CD starting at track $start_track, for $ntracks tracks.
+
$start_frame is the frame offset, from the beginning of the $start_track, at which to start. $nframes is the frame offset, from the beginning of the last track ($start_track+$ntracks), at which to end playing.
+
play_tracks() should only be called after calling SDL_CDStatus to get track information about the CD use $CD->status().
+
Note: Data tracks are ignored.
+
+
+Returns
+
+
0, or -1 if there was an error.
+
+
+play
+
+
$CD->play($start, $length );
+
+
+
Plays the given SDL::CD , starting a frame $start for $length frames.
+
+
+Returns
+
+
0 on success, -1 on error
+
+
+pause
+
+
$CD->pause();
+
+
+
Pauses play on CD
+
+
+Returns
+
+
Returns 0 on success, or -1 on an error.
+
+
+resume
+
+Returns
+
+
Returns 0 on success, or -1 on an error.
+
+
+stop
+
+
$CD->stop();
+
+
+
Stops play on the CD.
+
+
+Returns
+
+
Returns 0 on success, or -1 on an error.
+
+
+eject
+
+
$CD->eject();
+
+
+
Ejects the CD.
+
+
+Returns
+
+
Returns 0 on success, or -1 on an error.
+
+
+id
+
+
$CD->id();
+
+
+
Private drive identifier
+
+
+num_tracks
+
+
$CD->num_tracks();
+
+
+
Number of tracks on the CD
+
+
+cur_track
+
+
$CD->cur_track();
+
+
+
Current track on the CD;
+
+
+track
+
+
my $track = $CD->track($number);
+
+
+
Retrives track description of track $number in CD. See SDL::CDTrack.
+
+
+
+
+
+
+SEE ALSO
Top
+
+
SDL::CDROM, SDL::CDTrack
\ No newline at end of file
diff --git a/pages/SDL-CDROM.html-inc b/pages/SDL-CDROM.html-inc
new file mode 100644
index 0000000..7175daa
--- /dev/null
+++ b/pages/SDL-CDROM.html-inc
@@ -0,0 +1,81 @@
+
+
+
Index
+
+
+
+
+
NAME
Top
+
+
SDL::CDROM -- SDL Bindings for the CDROM device
+
+
+
CATEGORY
Top
+
+
SYNOPSIS
Top
+
+
use SDL;
+ use SDL::CDROM;
+
+ SDL::init(SDL_INIT_CDROM);
+
+ print SDL::CDROM::num_drives();
+
+ print SDL::CDROM::name(0);
+
+ SDL::quit();
+
+
+
+
+
METHODS
Top
+
+
+
+
num_drives
+
+
my $drives = SDL::CDROM::num_drives();
+
+
+
Returns number of drives available on the system
+
+
+
name
+
+
my $drive_name = SDL::CDROM::name($drive_num);
+
+
+
Returns human readable name for CDROM device
+
+
+
Examples
+
+
+ - '/dev/cdrom'
+ - 'E:'
+ - '/dev/disk/ide/1/master'
+
+
+
+
See Also
Top
+
+
SDL::CD, SDL::CDTrack
+
+
+
\ No newline at end of file
diff --git a/pages/SDL-CDTrack.html-inc b/pages/SDL-CDTrack.html-inc
index 28a7b13..3858133 100644
--- a/pages/SDL-CDTrack.html-inc
+++ b/pages/SDL-CDTrack.html-inc
@@ -3,7 +3,16 @@
Index
@@ -15,7 +24,81 @@
CATEGORY
Top
-
TODO, Core, CDROM, Structure
+
Core, CDROM, Structure
+
+
+SYNOPSIS
Top
+
+
use SDL;
+ use SDL::CDROM;
+ use SDL::CD;
+ use SDL::CDTrack;
+
+ SDL::init( SDL_INIT_CDROM );
+
+ my $drives = SDL::CDROM::num_drives();
+
+ if( $drives > 0 )
+ {
+ my $CD = SDL::CD->new(0); #first drive's CD
+
+ if( $CD != NULL)
+ {
+ if( $CD->status != CD_TRAYEMPTY )
+ {
+ my $track = SDL::CD->track(0);
+ }
+ }
+
+ }
+
+ SDL::quit();
+
+
+
+
+
+
+
+METHOD
Top
+
+
+
+id
+
+
$track->id() # 0-99
+
+
+
Track number
+
+
+type
+
+
$track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK
+
+
+
Type of track
+
+
+length
+
+
$track->length()
+
+
+
Length, in frames, of this track
+
+
+offset
+
+
$track->offset()
+
+
+
Frame offset to the beginning of this track
+
+
+SEE ALSO
Top
+
\ No newline at end of file
diff --git a/pages/SDL-Cursor.html-inc b/pages/SDL-Cursor.html-inc
index 0a4504d..bb02e7c 100644
--- a/pages/SDL-Cursor.html-inc
+++ b/pages/SDL-Cursor.html-inc
@@ -7,6 +7,10 @@
- DESCRIPTION
- METHODS
- AUTHOR
@@ -47,14 +51,39 @@ white.
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'.
+warp(cursor,x, y)
+
+
Set the position of the SDL::Cursor given as first parameter .
+the new postion is set to <C>x</C>, <C>y</C> coordinates in the application window.
+SDL::warp trigger a new mouse motion event.
+It doesn't returns anything.
+
+
+use(cursor)
+
+
Set the SDL::Cursor given as first parameter to the active cursor.
+
+
+get()
+
+
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.
+
This method can be useful if you are dealing with several cursors.
+
+
+show($toggle)
+
+
Set the visibility of the cursor. A false value will make the cursor
+invisible in the Application window. A true value will show it back.
+
+
AUTHOR
Top
-
David J. Goehrig, Tobias Leich
+
David J. Goehrig
SEE ALSO
Top
-
perl SDL::Mouse
+
perl SDL::Surface
\ No newline at end of file
diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc
index 6d498f6..a7ef5fd 100644
--- a/pages/documentation.html-inc
+++ b/pages/documentation.html-inc
@@ -1,2 +1,2 @@