Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Importing SDLPerl 2.2

  • Loading branch information...
commit bfd90409c307d445ed6fec5cce6344b1e3d1be05 0 parents
@cthulhuology cthulhuology authored
Showing with 64,132 additions and 0 deletions.
  1. +12 −0 BUGS
  2. +39 −0 Build
  3. +195 −0 Build.PL
  4. +489 −0 CHANGELOG
  5. +437 −0 COPYING
  6. +114 −0 MANIFEST
  7. +73 −0 META.yml
  8. +51 −0 MacOSX/Info.plist
  9. BIN  MacOSX/SDL Perl.icns
  10. +12 −0 MacOSX/launcher.h
  11. +198 −0 MacOSX/launcher.m
  12. +72 −0 README
  13. +10 −0 TODO
  14. +1,035 −0 lib/SDL.pm
  15. +368 −0 lib/SDL/App.pm
  16. +231 −0 lib/SDL/Cdrom.pm
  17. +153 −0 lib/SDL/Color.pm
  18. +41 −0 lib/SDL/Config.pm
  19. +586 −0 lib/SDL/Constants.pm
  20. +131 −0 lib/SDL/Cursor.pm
  21. +319 −0 lib/SDL/Event.pm
  22. +94 −0 lib/SDL/Font.pm
  23. +175 −0 lib/SDL/MPEG.pm
  24. +417 −0 lib/SDL/Mixer.pm
  25. +78 −0 lib/SDL/Music.pm
  26. +123 −0 lib/SDL/OpenGL.pm
  27. +3,172 −0 lib/SDL/OpenGL/Constants.pm
  28. +162 −0 lib/SDL/Palette.pm
  29. +135 −0 lib/SDL/Rect.pm
  30. +78 −0 lib/SDL/SFont.pm
  31. +89 −0 lib/SDL/Sound.pm
  32. +556 −0 lib/SDL/Surface.pm
  33. +205 −0 lib/SDL/TTFont.pm
  34. +112 −0 lib/SDL/Timer.pm
  35. +113 −0 lib/SDL/Tool/Font.pm
  36. +167 −0 lib/SDL/Tool/Graphic.pm
  37. +158 −0 lib/SDL/Tutorial.pm
  38. +2 −0  lib/SDL/Tutorial/.svn/README.txt
  39. +5 −0 lib/SDL/Tutorial/.svn/dir-wcprops
  40. 0  lib/SDL/Tutorial/.svn/empty-file
  41. +36 −0 lib/SDL/Tutorial/.svn/entries
  42. +1 −0  lib/SDL/Tutorial/.svn/format
  43. +1 −0  lib/SDL/Tutorial/.svn/prop-base/Animation.pm.svn-base
  44. +1 −0  lib/SDL/Tutorial/.svn/prop-base/Drawing.pm.svn-base
  45. +1 −0  lib/SDL/Tutorial/.svn/prop-base/Images.pm.svn-base
  46. +1 −0  lib/SDL/Tutorial/.svn/props/Animation.pm.svn-work
  47. +1 −0  lib/SDL/Tutorial/.svn/props/Drawing.pm.svn-work
  48. +1 −0  lib/SDL/Tutorial/.svn/props/Images.pm.svn-work
  49. +282 −0 lib/SDL/Tutorial/.svn/text-base/Animation.pm.svn-base
  50. +221 −0 lib/SDL/Tutorial/.svn/text-base/Drawing.pm.svn-base
  51. +492 −0 lib/SDL/Tutorial/.svn/text-base/Images.pm.svn-base
  52. +5 −0 lib/SDL/Tutorial/.svn/wcprops/Animation.pm.svn-work
  53. +5 −0 lib/SDL/Tutorial/.svn/wcprops/Drawing.pm.svn-work
  54. +5 −0 lib/SDL/Tutorial/.svn/wcprops/Images.pm.svn-work
  55. +282 −0 lib/SDL/Tutorial/Animation.pm
  56. +221 −0 lib/SDL/Tutorial/Drawing.pm
  57. +492 −0 lib/SDL/Tutorial/Images.pm
  58. +240 −0 lib/SDL/Video.pm
  59. +39 −0 lib/SDL_perl.pm
  60. BIN  logo/sdl_perl_logo_large.png
  61. BIN  logo/sdl_perl_logo_small.png
  62. +267 −0 make/lib/SDL/Build.pm
  63. +74 −0 make/lib/SDL/Build/Cygwin.pm
  64. +95 −0 make/lib/SDL/Build/Darwin.pm
  65. +59 −0 make/lib/SDL/Build/Freebsd.pm
  66. +56 −0 make/lib/SDL/Build/Linux.pm
  67. +149 −0 make/lib/SDL/Build/MSWin32.pm
  68. +60 −0 make/lib/SDL/Build/Netbsd.pm
  69. +2,732 −0 src/OpenGL.xs
  70. +4,536 −0 src/SDL.xs
  71. 0  src/SDL/OpenGL.bs
  72. +4,851 −0 src/SDL/OpenGL.c
  73. BIN  src/SDL/OpenGL.o
  74. +2,732 −0 src/SDL/OpenGL.xs
  75. 0  src/SDL/SFont.bs
  76. +382 −0 src/SDL/SFont.c
  77. BIN  src/SDL/SFont.o
  78. +308 −0 src/SDL/SFont.xs
  79. 0  src/SDL_perl.bs
  80. +9,408 −0 src/SDL_perl.c
  81. BIN  src/SDL_perl.o
  82. +4,536 −0 src/SDL_perl.xs
  83. +79 −0 src/SFont.h
  84. +308 −0 src/SFont.xs
  85. +49 −0 src/defines.h
  86. +3 −0  src/support/darwin_support.h
  87. +60 −0 src/support/darwin_support.m
  88. +8 −0 src/support/win32.c
  89. +58 −0 t/apppm.t
  90. +59 −0 t/cdrompm.t
  91. +66 −0 t/colorpm.t
  92. +52 −0 t/cursorpm.t
  93. +74 −0 t/eventpm.t
  94. +53 −0 t/fontpm.t
  95. +93 −0 t/mixerpm.t
  96. +66 −0 t/mpegpm.t
  97. +51 −0 t/musicpm.t
  98. +93 −0 t/opengl.t
  99. +53 −0 t/palettepm.t
  100. +73 −0 t/rectpm.t
  101. +56 −0 t/sdlpm.t
  102. +51 −0 t/soundpm.t
  103. +113 −0 t/surfacepm.t
  104. +62 −0 t/timerpm.t
  105. +62 −0 t/toolfontpm.t
  106. +57 −0 t/toolgraphicpm.t
  107. +70 −0 t/ttfontpm.t
  108. +73 −0 t/videopm.t
  109. +9 −0 test/64encode.pl
  110. BIN  test/OpenGL/.DS_Store
  111. +37 −0 test/OpenGL/README
  112. +122 −0 test/OpenGL/test1.sdlpl
  113. +181 −0 test/OpenGL/test2.sdlpl
  114. +89 −0 test/OpenGL/test3.sdlpl
  115. +144 −0 test/OpenGL/test4.sdlpl
  116. +159 −0 test/OpenGL/test5.sdlpl
  117. BIN  test/OpenGL/tutorial/.DS_Store
  118. +156 −0 test/OpenGL/tutorial/lesson02.sdlpl
  119. +161 −0 test/OpenGL/tutorial/lesson03.sdlpl
  120. +179 −0 test/OpenGL/tutorial/lesson04.sdlpl
  121. +242 −0 test/OpenGL/tutorial/lesson05.sdlpl
  122. +2,563 −0 test/OpenGL/tutorial/lesson06.sdlpl
  123. +2,556 −0 test/OpenGL/tutorial/lesson07.sdlpl
  124. +1,281 −0 test/OpenGL/tutorial/lesson08.sdlpl
  125. +28 −0 test/README
  126. +104 −0 test/checkkeys.sdlpl
  127. +76 −0 test/graywin.sdlpl
  128. +6,494 −0 test/loopwave.sdlpl
  129. +92 −0 test/testcolor.sdlpl
  130. +2,168 −0 test/testfonttool.sdlpl
  131. +275 −0 test/testgfxprim.sdlpl
  132. +396 −0 test/testgfxroto.sdlpl
  133. +216 −0 test/testgraphictool.sdlpl
  134. +240 −0 test/testjoystick.sdlpl
  135. +994 −0 test/testmenu.sdlpl
  136. +222 −0 test/testsprite.sdlpl
  137. +58 −0 test/testtimer.sdlpl
  138. +69 −0 typemap
12 BUGS
@@ -0,0 +1,12 @@
+BUGS and Outstanding Issues
+
+
+Using SDL::TTFont::width function with UTF-8 encoded strings returns
+the width of the characters that make up the UTF-8 format and not what
+they represent. The function for this appears to exist in SDL.xs:
+
+AV* TTFSizeUTF8 ( font, text )
+
+However, this function crashes immediately when called with a valid
+font and [utf-8 encoded] string.
+
39 Build
@@ -0,0 +1,39 @@
+#! /usr/env/bin perl
+
+use strict;
+use Cwd;
+use File::Spec;
+
+BEGIN {
+ $^W = 1; # Use warnings
+ my $curdir = File::Spec->canonpath( Cwd::cwd() );
+ my $is_same_dir = $^O eq 'MSWin32' ? (Win32::GetShortPathName($curdir) eq '/Users/dave/sdlperl')
+ : ($curdir eq '/Users/dave/sdlperl');
+ unless ($is_same_dir) {
+ die ('This script must be run from /Users/dave/sdlperl, not '.$curdir."\n".
+ "Please re-run the Build.PL script here.\n");
+ }
+ unshift @INC,
+ (
+ '/Users/dave/sdlperl/make/lib'
+ );
+}
+
+use SDL::Build;
+
+# Some platforms have problems setting $^X in shebang contexts, fix it up here
+$^X = Module::Build->find_perl_interpreter
+ unless File::Spec->file_name_is_absolute($^X);
+
+if (-e 'Build.PL' and not SDL::Build->up_to_date("Build.PL", $0)) {
+ warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n";
+}
+
+# This should have just enough arguments to be able to bootstrap the rest.
+my $build = SDL::Build->resume (
+ properties => {
+ config_dir => '/Users/dave/sdlperl/_build',
+ },
+);
+
+$build->dispatch;
195 Build.PL
@@ -0,0 +1,195 @@
+#!/usr/bin/env perl
+#
+# Build.PL
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# ------------------------------------------------------------------------------
+#
+# Please feel free to send questions, suggestions or improvements to:
+#
+# David J. Goehrig
+# dgoehrig@cpan.org
+#
+
+
+use strict;
+
+use lib 'make/lib';
+
+use SDL::Build;
+use YAML;
+
+my $sdl_compile_flags = `sdl-config --cflags`;
+my $sdl_link_flags = `sdl-config --libs`;
+
+if ($? >> 8)
+{
+ die "SDL doesn't appear to be installed.\n" .
+ "Please check that sdl-config is in your path and try again.\n";
+}
+
+chomp( $sdl_compile_flags );
+chomp( $sdl_link_flags );
+
+# subsystem to build
+# file
+# location of source file => location of build file to get name right
+# libraries
+# name of shared library (soname)
+# preprocessor definition
+# name of header file
+my %subsystems =
+(
+ SDL => {
+ file => {
+ from => 'src/SDL.xs',
+ to => 'src/SDL_perl.xs',
+ },
+ libraries => [qw( SDL SDL_image SDL_mixer SDL_sound SDL_net SDL_ttf
+ SDL_gfx SDL_svg png jpeg smpeg )],
+ },
+ OpenGL => {
+ file => {
+ from => 'src/OpenGL.xs',
+ to => 'src/SDL/OpenGL.xs',
+ },
+ libraries => [qw( SDL GL GLU )],
+ },
+ SFont => {
+ file => {
+ from => 'src/SFont.xs',
+ to => 'src/SDL/SFont.xs',
+ },
+ libraries => [qw( SDL SDL_image )],
+ },
+);
+
+my %libraries = (
+ SDL => {
+ define => 'HAVE_SDL',
+ header => 'SDL.h',
+ },
+ SDL_image => {
+ define => 'HAVE_SDL_IMAGE',
+ header => 'SDL_image.h'
+ },
+ SDL_mixer => {
+ define => 'HAVE_SDL_MIXER',
+ header => 'SDL_mixer.h'
+ },
+ SDL_sound => {
+ define => 'HAVE_SDL_SOUND',
+ header => 'SDL_sound.h'
+ },
+ SDL_net => {
+ define => 'HAVE_SDL_NET',
+ header => 'SDL_net.h'
+ },
+ SDL_ttf => {
+ define => 'HAVE_SDL_TTF',
+ header => 'SDL_ttf.h'
+ },
+ SDL_gfx => {
+ define => 'HAVE_SDL_GFX',
+ header => 'SDL_gfxPrimitives.h'
+ },
+ SDL_svg => {
+ define => 'HAVE_SDL_SVG',
+ header => 'SDL_svg.h'
+ },
+ png => {
+ define => 'HAVE_PNG',
+ header => 'png.h',
+ },
+ jpeg => {
+ define => 'HAVE_JPEG',
+ header => 'jpeglib.h',
+ },
+ smpeg => {
+ define => 'HAVE_SMPEG',
+ header => 'smpeg.h',
+ },
+ GL => {
+ define => 'HAVE_GL',
+ header => 'gl.h'
+ },
+ GLU => {
+ define => 'HAVE_GLU',
+ header => 'glu.h'
+ },
+);
+
+# need the platform-specific module to find include paths correctly
+# see build/lib/SDL/Build/*pm
+my $arch = SDL::Build->get_arch( $^O );
+
+print "[Build.PL] arch $arch\n";
+
+# see which subsystems can be built -- do we have headers for them?
+my $build_systems = $arch->find_subsystems( \%subsystems, \%libraries );
+
+# now write SDL::Config
+$arch->write_sdl_config( $build_systems );
+
+# and fetch all of the information needed to compile
+my $defines = $arch->build_defines( \%libraries, $build_systems );
+my $includes = $arch->build_includes( \%libraries, $build_systems );
+my $links = $arch->build_links( \%libraries, $build_systems );
+my $c_sources = $arch->build_c_sources( \%libraries, $build_systems );
+my $c_source = $arch->build_c_source( \%libraries, $build_systems );
+my $install_base = $arch->build_install_base( \%libraries, $build_systems );
+
+# mangle the compilable files into a format Module::Build can understand
+my %xs = map { $subsystems{$_}{file}{from} => $subsystems{$_}{file}{to} }
+ keys %subsystems;
+
+my $build = SDL::Build->new(
+ dist_name => 'SDL_Perl',
+ license => 'lgpl',
+ dist_version_from => 'lib/SDL.pm',
+ build_requires =>
+ {
+ 'Test::Simple' => '0.47',
+ 'Module::Build' => '0.22',
+ },
+ build_recommends =>
+ {
+ 'Pod::ToDemo' => '0.20',
+ },
+ c_source => $c_source,
+ c_sources => $c_sources,
+ xs_files => \%xs,
+ dist_author => 'David J. Goehrig <DGOEHRIG@cpan.org>',
+ install_base => $install_base
+);
+
+# and here's where the real (and ugly) magic works... see SDL::Build
+$build->set_flags(
+ \%subsystems,
+ $build_systems,
+ $defines,
+ $includes,
+ $links,
+ $sdl_compile_flags,
+ $sdl_link_flags,
+);
+
+# now we're ready to go!
+$build->create_build_script();
489 CHANGELOG
@@ -0,0 +1,489 @@
+Revision history for Perl extension SDL_perl.
+
+* Jul 8 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - finished embedding data in example scripts
+ - fixed Mac OS X file associations
+
+* Mar 15 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - fixed OpenGL examples to work under MacOS X using the SDL Perl.app bundle
+
+* Oct 12 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Fixed bug where SDL::App frees underlying Surface via DESTROY
+ - Added SDL_svg support
+ - cleaned up SDL_gfx support in SDL.xs
+ - cleaned up smpeg support in SDL.xs
+ - Added more SDL_sound support
+ - Added basic SDL_RWops support (TODO - perl callback for user defined)
+
+* Oct 6 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Changed constructors to die upon invalid initialization
+
+* Oct 5 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Updated the copyright notices as per the LGPL guidelines
+
+* Oct 4 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Patched Cygwin.pm
+ - Fixed SDL::Rect documentation
+ - Fixed Freebsd build module package designation
+ - Fixed compile and link argument splitting in make/lib/Build.pm
+ - Added Module::Build to MEAT.yml
+
+* Sep 23 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - added SDL::Config tests for SDL_gfx support to test/testgfxroto.pl
+ test/testgfxprim.pl and SDL::Tool::Graphic.pm
+ - removed exists test form SDL::Config::has()
+ - added SDL::PushEvent
+ - added SDL::SetEventType
+ - renamed SDL::OpenGL::glReadPixel(s)
+ - added error message for SDL::OpenGL::glLightModel
+ - cleaned up some formatting issues in OpenGL.xs
+ - fixed bug in SDL::Cdrom (referencing a scalar as a hashref)
+ - added some more documentation to SDL::Color
+ - added SDL::Event::push (Andy Bakun)
+ - fixed documentation and usage of SDL::Event::set
+ - added SDL::Event::type([type]) setting parameter
+ - updated Pod::ToDemo recommends in Build.PL
+ - added chromatic's OpenGL version checks
+ - added GL_ALL_CLIENT_ATTRIB_BITS (in addition to GL_CLIENT_ATTRIB_BITS)
+ - added chromatic's SDL::Build::Cygwin.pm and SDL::Build::Win32.pm
+ - applied chromatic's patches to SDL::Tutorial, etc. for updated Pod::ToDemo
+
+
+* Sep 21 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - added thread check to SDL::Constants.pm (prevent unsafe SelfLoader)
+ - applied Andy Bakun <sdlperl@thwartedefforts.org>'s patches
+ to SDL::CreateRGBSurfaceFrom, SDL::SurfaceCopy, and
+ SDL::FreeSurface
+ - applied GLint* to typemap patch
+ - applied glRenderMode patch
+ - applied gluPickMatrix patch
+ - fixed SDL::Surface::blit typo bug
+ - applied glGet patch by Luke (enumerating them all!)
+ - fixed typo bug in make/lib/SDL/Build/Darwin.pm
+
+
+* Feb 23 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - fixed OpenGL exporting & bootstrapping
+ - added ifdefs in OpenGL for NURBS and GLUTesslator
+ - updated the test scripts to use SDL::Config
+ - added OpenGL test
+ - modified SDL::Config->has to use grep instead
+ - fixed SDL::Cdrom::status
+ - added tests for SDL::Video and SDL::MPEG
+ - fixed gluPerspective in test1.pl & test2.pl
+ - moved SDL::OpenGL::Cube code into test2.pl
+ - released SDL_Perl-2.1.0
+
+* Feb 7 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - added more SMPEG support
+ - added SDL::Video.pm and SDL::MPEG
+
+* Feb 6 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - removed old build stuff
+ - added SDL::GetAppState
+ - added SDL::GetMouseState and SDL::GetRelativeMouseState
+ - added SDL Perl logo files
+ - Finalized 2.0.5 release
+
+* Feb 6 2004 chromatic
+ - added SDL::Tutorial
+ - added SDL::Tutorial::Animation
+ - added SDL::Tutorial::Drawing
+ - added SDL::Tutorial::Images
+
+* Feb 5 2004 David J. Goehrig <dgoehrig@cpan.org>
+ - port chromatic's Module::Build changes to 2.0.4
+ - moved SDL_TEXTWIDTH to SDL.pm (where EXPORTS BELONG in SDL.pm)
+ - applied chromatic's test directory change to testfonttool.pl
+ - fixed near/far in OpenGL.xs
+ - fixed checkkeys.pl to work with new event structure
+ - fixed testjoystick.pl to use new constants
+ - fixed USE_THREADS issue in build system
+ - fixed typo-bugs in SDL::Tool::Graphic.pm
+ - Updated MANIFEST
+ - fixed SFont support added SDL::SFont.pm
+ - removed SDL::Mixer and SDL::Event constants checks, no export
+
+* Dec 21 2003 chromatic
+ - added glDeleteLists
+ - added glReadPixels
+ - added glReadPixel
+
+* Sept 2 2003 David J. Goehrig <dave@sdlperl.org>
+ - fixed SDL::Music and SDL::Sound usage in SDL::Mixer
+
+* Aug 28 2003 Stephane Desneux <sdx@desneux.com>
+ - added SDL_VIDEOEXPOSE constant in SDL::Constants
+
+* Aug 26 2003 Stephane Desneux <sdx@desneux.com>
+ - modified Makefile.linux to remove debug unless $ENV{DEBUG} is defined
+ - added scripts/GL/gl.h header (OpenGL 1.4 header from Linux NVidia driver)
+ - modified gl_const.pl to generate SDL::OpenGL::Constants.pm using scripts/GL/gl.h
+ OpenGL constants now uses Exporter and SelfLoader
+ - modified sdl_const.pl to generate SDL::Constants
+ SDL constants now uses Exporter and SelfLoader
+ - modified SDL.pm to export constants from SDL::Constants
+ - modified SDL/OpenGL.pm to export constants from SDL::OpenGL::Constants
+ - changed all function names in OpenGL.xs (xxx replaced by glxxx or gluxxx)
+ changed export in SDL/OpenGL.pm accordingly
+ - removed warning in SDL::Surface::new()
+
+* Aug 21 2003 David J. Goehrig <dave@sdlperl.org>
+ - applied Thomas Tongue's MacOS X support patches
+
+* Aug 20 2003 David J. Goehrig <dave@sdlperl.org>
+ - fixed SDL::Event bug
+
+* Aug 17 2003 David J. Goehrig <dave@sdlperl.org>
+ - applied Tels' call list patches
+ - fixed some general boneheadedness with use strict
+ - got tests really working
+ - applied Russell's SDL::Tool::Graphic::grayScale patch
+ - added glLightModel
+
+* Aug 16 2003 David J. Goehrig <dave@sdlperl.org>
+ - applied morgoth.666's patch for glGetdv & others
+ - released 2.0 last week :)
+
+* May 23 2003 David J. Goehrig <dave@sdlperl.org>
+ - applied Ryan Hanlon's patch for SDL::TTFont::width
+
+* May 22 2003 David J. Goehrig <dave@sdlperl.org>
+ - fixed typemap
+ - changed SDL::Cdrom to use scalar refs
+ - changed SDL::Console to use scalar refs
+ - changed SDL::Event to use scalar refs
+ - changed SDL::Cursor to use scalar refs
+ - changed SDL::Font to use scalar refs
+ - changed SDL::Music to use scalar refs
+ - changed SDL::Palette to use scalar refs
+ - changed SDL::Sound to use scalar refs
+
+* May 20 2003 David J. Goehrig <dave@sdlperl.org>
+ - added more OpenGL constants
+ - added OpenGL name & Feedback functions
+ - ported documentation from the website to distro
+
+* Mar 13 2003 David J. Goehrig <dave@sdlperl.org>
+ - cleaned up OpenGL constants exportation
+ - fixed glColor alpha
+ - fixed all tests & the causes of failure
+ - fixed TTFont.pm color bug
+ - fixed SDL::Tool::Graphic
+
+* Mar 11 2003 David J. Goehrig <dave@sdlperl.org>
+ - changed USE_THREAD support because perl5.8 usually builds with it
+ - added SDL::Constants & SDL::OpenGL::Constants
+ - removed constant functions from XS code (going easier on the linker)
+ - changed version to SDL_perl-2.0-beta1 Way Too much is Broken release
+ - Moved Opt/* to regular & fixing as found broken
+ - 27% of tests now fail!
+
+* Feb 25 2003 David J. Goehrig <dave@sdlperl.org>
+ - resized the testmenu.pl script
+
+* Jan 6 2003 Wayne Keenan <tripixuk@yahoo.co.uk>
+ - fixed testjoystick.pl
+
+* Jan 4 2003 David J. Goehrig <dave@sdlperl.org>
+ - Added test suite, Thanks Tels
+ - Added SDL::SurfaceCopy finally
+ - Added SDL::Surface::new -surface && -copy constructors
+ - Changed SDL::Tool::Graphic::* to return a new SDL::Surface object
+ - Added SDL::Event::resize_w && SDL::Event::resize_h
+
+* Jan 3 2003 David J. Goehrig <dave@sdlperl.org>
+ - SDL_perl-1.20.0 release
+ - fixed default pitch value in SDL::Surface
+ - fixed test/OpenGL/tutorials/*, removed nasty -flags options
+
+* Jan 2 2003 David J. Goehrig <dave@sdlperl.org>
+ - Changed SDL::SurfacePixel to work as documented returns SDL_Color*
+ - Changed SDL::Surface::pixel to return SDL::Color object
+ - Changed SDL::SetColorKey to take SDL_Color*
+ - Changed SDL::Surface::set_color_key to take SDL_Color*,SDL::Color, && (x,y)
+ - Added test/testcolor.pl
+ - Fixed SDL::Opt::Surface::pixel to return SDL::Opt::Color objects
+ - Fixed test/testsprite.pl (must call display_format before set_color_key)
+ - removed use strict from test/testmenu.pl
+ - Added SDL::INIT_TIMER
+
+* Jan 1 2003 David J. Goehrig <dave@sdlperl.org>
+ - Added a lot of documentation stubs
+ - Added SDL_PREALLOC support
+ - Added SDL_VIDEORESIZE event type
+ - Moved SDL_* SDL_Surface flags EXPORT to SDL::Surface
+ - Added SDL::App::resize & -resizeable tag
+ - Updated README
+ - Added SDL::Opt::Surface, SDL::Opt::Rect, SDL::Opt::Color
+
+* Dec 30 2002 David J. Goehrig <dave@sdlperl.org>
+ - Cleaned SDL::App a little more
+ - Patch release SDL_perl-1.19.2
+
+* Dec 29 2002 Tels <http://www.bloodgate.com>
+ - Patched SDL::Font includes
+ - Optimized SDL::Rect
+
+* Dec 28 2002 Tels <http://www.bloodgate.com>
+ - Removed miscelaneous typos
+ - Rewrote utility function SDL::in
+
+* Dec 25 2002 Tels <http://www.bloodgate.com>
+ - Patched SDL::Timer documentation
+ - Patched SDL::Event documentation
+ - Patched SDL::Cdrom documentation
+ - Patched mail address in Readme
+
+* Dec 20 2002 Michael Lamertz <mike@perl-ronin.de>
+ - Fixed wrong spelling of XS call to SDL::App::grab_input function
+
+* Oct 14 2002 David J. Goehrig <dave@sdlperl.org>
+ - Altered usage message printing behavior for Guillaume
+ - Added Guillaume Cottenceau's <gc@mandrakesoft.com>
+ 64 bit support patch.
+ - Patch release SDL_perl-1.19.1
+
+* Oct 13 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added ConvertRGB and ConvertRGBA functions, useful
+ for creating OpenGL textures from arbitrary images.
+ - Updated documentation for SDL::Cursor
+
+* Oct 11 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added library disable configure options for linux
+ - Released SDL_perl-1.19.0
+
+* Sept 28 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed some prototypes (OpenGL happier on Debian)
+
+* Sept 5 2002 David J. Goehrig <dave@sdlperl.org>
+ - Optimizaiton in SDL::App::loop,
+ now syncs app only if action called
+ - Added test/testmenu.pl (precursor to a menu class)
+
+* Sept 4 2002 Russell Valentine <russ_allegro@yahoo.com>
+ - Added SDL::GraphicTool and testgraphictool.pl
+
+* Aug 31 2002 David J. Goehrig <dave@sdlperl.org>
+ - Removed redundant variable in SDL::Mixer::fade_in_music
+ Thanks to Peter BARABAS <z0d@artifact.hu> for finding it
+
+* Aug 30 2002 David J. Goehrig <dave@sdlperl.org>
+ - Altered examples to use 16 bit color
+ - Fixed OpenGL/tutorial gluPerspective bugs
+
+* Jun 14 2002 David J. Goehrig <dave@sdlperl.org>
+ - Finished color table and convolution support
+ - Added more GLUtesselator support
+
+* Jun 10 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added configure script, gnuish build environemnt
+
+* Jun 8 2002 David J. Goehrig <dave@sdlperl.org>
+ - Applied Wayne Keenan's win32 build patches
+
+* Jun 5 2002 David J. Goehrig <dave@sdlperl.org>
+ - Simply defines GL_ALL_CLIENT_ATTRIB_BITS 0xffffffff
+ - SDL::TTFont added font metric query methods
+
+* Jun 4 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed GL_ALL_CLIENT_BITS Mesa bug again...
+ It appears to have disappeared after 1.17.2,
+ Thanks Seemant Kulleen & Chris Moeller for
+ pointing it out.
+
+* May 28 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added tutorials 7 & 8 to test/OpenGL/tutorial
+
+* May 27 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed SDL::OpenGL::TexCoordPointer
+
+* May 26 2002 David J. Goehrig <dave@sdlperl.org>
+ - SDL_perl-1.18
+
+* May 25 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed include paths under linux
+ - Added SDL::Shell.pm and test/testshell.pl
+
+* May 24 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed more OpenGL GLU tesselator code
+ - Added HAVE_SDL_MIXER around callbacks
+
+* May 23 2002 Benedikt Meurer <bmeurer@fwdn.de>
+ - Added FreeBSD support
+
+* May 21 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed typo in SDL::App:iconify
+
+* May 3 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added still more OpenGL support (errors and textures)
+ - Ported old OpenGL tutorials 2-6
+ - Fixed more bugs, improved SDL::SurfacePixels
+ - Added support for glu* and GLU_* exportation
+ - Added OpenGLU Nurbs support
+ - Added Nurbs example test/OpenGL/test5.pl
+ - Added more OpenGL projection and color code
+
+* May 1 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed -Wall (added prototypes, fixed typos, etc)
+ - Improved Makefile, added GLU version detection
+ - Added OpenGL 1.2 dependent feature detection
+ - Added one and two dimension evaluators for OpenGL
+ - Added OpenGL test3.pl and test4.pl
+
+* Apr 30 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - updated Makefile.win32
+
+* Apr 29 2002 Guillaume Cottenceau <gc@mandrakesoft.com>
+ - updated Makefile.linux
+
+* Apr 27 2002 David J. Goehrig <dave@sdlperl.org>
+ - SDL_perl-1.17 release made
+ - updated MANIFEST, etc.
+
+* Apr 26 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added more OpenGL support
+
+* Apr 23 2002 David J. Goehrig <dave@sdlperl.org>
+ - fixed SFont and SDL_Console support
+ - Added SDL::FontTool
+ - Added test/testfonttool.pl
+
+* Apr 19 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added proper SDL_mixer callback support
+ - Broke out linux makefile
+ - Begun OpenGL support
+ - fixed test/testgfxprim.pl screen update bug
+ - fixed test/testgfxroto.pl alpha blits
+ - Added test/logo.png
+
+* Apr 16 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - Added SDL_Console support
+ - Added test/testconsole.pl
+ - Added SDL_gfx support
+ - Added test/testgfxroto.pl and test/testgfxprim.pl
+ - Updated Makefile
+
+* Apr 11 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed SDL::ColorB typo
+ - Altered SDL::FillRect and SDL::Pixel to use SDL_Color* sources
+ - Documented SDL::Surface, SDL::Color
+ - Added automagic Surface, Color, and Rect support throughout OO layer
+ - Fixed testsprite.pl, graywin.pl to use above classes
+ - Brokeout Win32 Makefile.PL
+ - Fixed SMPEG a little bit
+
+* Apr 11 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - Added SMPEG support
+ - Added test/testsprite.pl
+
+* Apr 10 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - Added Win32 threading support in callbacks
+ - Added SDL_GetKeyState
+
+* Apr 8 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - Added joystick hat constants
+ - Added joystick hat constants to test/testjoystick.pl
+
+* Apr 5 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed SDL_perl.spec according to most of Guillaume's suggestions
+ - Expanded the build_rpms script to upload to sdlperl.org
+ - Added SDL::Timer.pm for timer objects
+ - Added test/testtimer.pl
+
+* Apr 4 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added SDL_perl.spec for RPM/SRPM builds
+ - Fixed typo in SDL_perl.xs
+
+* Apr 4 2002 Wayne Keenan <wayne@metaverse.fsnet.co.uk>
+ - Fixed Makefile.PL for Win32 builds
+
+* Apr 4 2002 Russell Valentine <russ_allegro@yahoo.com>
+ - Added test/testjoystick.pl
+
+* Apr 3 2002 David J. Goehrig <dave@sdlperl.org>
+ - Fixed SDL::TTFont support
+ - Fixed SDL::Color support
+ - Applied Wayne's changes for Win32 support
+ - Moved XS code to SDL_perl.xs
+ - Created SDL_perl.pm
+ - Altered SDL.pm to use SDL_perl.pm
+
+* Apr 1 2002 David J. Goehrig <dave@sdlperl.org>
+ - Added SDL::Color
+ - Added SDL::TTFont
+ - Added SDL::App::loop
+ - More Documentation
+
+* Mar 31 2002 David J. Goehrig <dave@sdlperl.org>
+ - Upgraded SFont to version 1.5 <http://www.linux-games.com/sfont>
+ - Removed old examples and began porting SDL test programs to perl
+ - Updated key state modifier code
+ - Added audio processing callbacks and driver interrogation
+
+* Mar 14 2002 David J. Goehrig <dave@sdlperl.org>
+
+ - Added YUV Overlay support
+ - Added more WM support (toggle fullscreen,grab input,iconify window)
+ - Added Resize Event support
+ - Added Joystick Events support
+ - Added audio status query support
+ - Removed TrackListing
+
+* Mar 9 2002 David J. Goehrig <dave@sdlperl.org>
+
+ - Generated sdlpl compatability layer ( known to be buggy )
+ - Bug fixes in OO modules, frozen-bubble now runs under 1.14
+ - Added patches directory to contain fixes for other people's programs
+ - Added some Set/GetClipRect support
+ - More Documentation
+ - Began SDL_ttf support
+ - Began SDL_net support
+
+* Feb 28 2002 David J. Goehrig <dave@sdlperl.org>
+
+ - Fixed-up OO modules to use new API
+ - Added AddTimer and RemoveTimer Support
+ - Added Joystick Support
+ - Added full Init/Quit support for subsystems
+ - Began Documentation Rewrite
+ - Began 1.12 compatability layer
+
+* Feb 26 2002 David J. Goehrig <dave@sdlperl.org>
+
+ - Altered API / Simplified namespace
+ - Removed SDL_Image, SDL_Mixer, and OpenGL dependencies
+ - Added extension autodetection to config process
+
+* Jan 28 2002 Guillaume Cottenceau <gc@mandrakesoft.com>
+
+ - Fixed a deallocation bug in Sound.pm
+
+* Jan 22 2002 Guillaume Cottenceau <gc@mandrakesoft.com>
+
+ - Fixed a deallocation bug in Music.pm
+
+* Dec 18 2000 David J. Goehrig
+
+ - Removed clipping fuctions
+ - Updated Readme
+ - Moved more to sourceforge
+
+* Aug 5 2000 Wayne Keenan
+
+ - Open GL support
+ - OpenGL Glut like Application framework
+ - more video flags
+ - creating Surface from pre-allocated memory
+ - BMP screen dump
+ - added state dumpers as an debugging aid
+ - bug fixes
+
+* May 26 2000 David J. Goehrig
+
+ - Added SFont support.
+
+* May 22 2000 David J. Goehrig
+
+ - Finished the first release
+
437 COPYING
@@ -0,0 +1,437 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
114 MANIFEST
@@ -0,0 +1,114 @@
+BUGS
+Build.PL
+CHANGELOG
+COPYING
+lib/SDL/App.pm
+lib/SDL/Cdrom.pm
+lib/SDL/Color.pm
+lib/SDL/Constants.pm
+lib/SDL/Cursor.pm
+lib/SDL/Event.pm
+lib/SDL/Font.pm
+lib/SDL/Mixer.pm
+lib/SDL/MPEG.pm
+lib/SDL/Music.pm
+lib/SDL/OpenGL/Constants.pm
+lib/SDL/OpenGL.pm
+lib/SDL/Palette.pm
+lib/SDL_perl.pm
+lib/SDL.pm
+lib/SDL/Rect.pm
+lib/SDL/SFont.pm
+lib/SDL/Sound.pm
+lib/SDL/Surface.pm
+lib/SDL/Timer.pm
+lib/SDL/Tool/Font.pm
+lib/SDL/Tool/Graphic.pm
+lib/SDL/TTFont.pm
+lib/SDL/Tutorial/Animation.pm
+lib/SDL/Tutorial/Drawing.pm
+lib/SDL/Tutorial/Images.pm
+lib/SDL/Tutorial.pm
+lib/SDL/Video.pm
+logo/sdl_perl_logo_large.png
+logo/sdl_perl_logo_small.png
+make/lib/SDL/Build/Cygwin.pm
+make/lib/SDL/Build/Darwin.pm
+make/lib/SDL/Build/Freebsd.pm
+make/lib/SDL/Build/Linux.pm
+make/lib/SDL/Build/MSWin32.pm
+make/lib/SDL/Build/Netbsd.pm
+make/lib/SDL/Build.pm
+MANIFEST
+META.yml
+README
+src/defines.h
+src/OpenGL.xs
+src/SDL.xs
+src/SFont.h
+src/SFont.xs
+t/apppm.t
+t/cdrompm.t
+t/colorpm.t
+t/cursorpm.t
+t/eventpm.t
+t/fontpm.t
+t/mixerpm.t
+t/mpegpm.t
+t/musicpm.t
+t/opengl.t
+t/palettepm.t
+t/rectpm.t
+t/sdlpm.t
+t/soundpm.t
+t/surfacepm.t
+t/timerpm.t
+t/toolfontpm.t
+t/toolgraphicpm.t
+t/ttfontpm.t
+t/videopm.t
+test/checkkeys.pl
+test/data/24P_Arial_NeonYellow.png
+test/data/24P_Copperplate_Blue.png
+test/data/aircut3.ttf
+test/data/electrohar.ttf
+test/data/highlight.png
+test/data/icon.bmp
+test/data/LargeFont.bmp
+test/data/logo.png
+test/data/menu.png
+test/data/sample.wav
+test/graywin.pl
+test/loopwave.pl
+test/OpenGL/README
+test/OpenGL/test1.pl
+test/OpenGL/test2.pl
+test/OpenGL/test3.pl
+test/OpenGL/test4.pl
+test/OpenGL/test5.pl
+test/OpenGL/tutorial/Data/crate.png
+test/OpenGL/tutorial/Data/cube.bmp
+test/OpenGL/tutorial/Data/glass.bmp
+test/OpenGL/tutorial/Data/NeHe.png
+test/OpenGL/tutorial/Data/Star.bmp
+test/OpenGL/tutorial/Data/tim.jpg
+test/OpenGL/tutorial/Data/world.txt
+test/OpenGL/tutorial/lesson02.pl
+test/OpenGL/tutorial/lesson03.pl
+test/OpenGL/tutorial/lesson04.pl
+test/OpenGL/tutorial/lesson05.pl
+test/OpenGL/tutorial/lesson06.pl
+test/OpenGL/tutorial/lesson07.pl
+test/OpenGL/tutorial/lesson08.pl
+test/README
+test/testcolor.pl
+test/testfonttool.pl
+test/testgfxprim.pl
+test/testgfxroto.pl
+test/testgraphictool.pl
+test/testjoystick.pl
+test/testmenu.pl
+test/testsprite.pl
+test/testtimer.pl
+TODO
+typemap
73 META.yml
@@ -0,0 +1,73 @@
+---
+name: SDL_Perl
+version: 2.2.0
+author:
+ - David J. Goehrig <DGOEHRIG@cpan.org>
+abstract: Simple DirectMedia Layer for Perl
+license: lgpl
+build_requires:
+ Module::Build: 0.22
+ Test::Simple: 0.47
+provides:
+ SDL:
+ file: lib/SDL.pm
+ version: 2.2.0
+ SDL::App:
+ file: lib/SDL/App.pm
+ SDL::Cdrom:
+ file: lib/SDL/Cdrom.pm
+ SDL::Color:
+ file: lib/SDL/Color.pm
+ SDL::Constants:
+ file: lib/SDL/Constants.pm
+ SDL::Cursor:
+ file: lib/SDL/Cursor.pm
+ SDL::Event:
+ file: lib/SDL/Event.pm
+ SDL::Font:
+ file: lib/SDL/Font.pm
+ SDL::MPEG:
+ file: lib/SDL/MPEG.pm
+ SDL::Mixer:
+ file: lib/SDL/Mixer.pm
+ SDL::Music:
+ file: lib/SDL/Music.pm
+ SDL::OpenGL:
+ file: lib/SDL/OpenGL.pm
+ SDL::OpenGL::Constants:
+ file: lib/SDL/OpenGL/Constants.pm
+ SDL::Palette:
+ file: lib/SDL/Palette.pm
+ SDL::Rect:
+ file: lib/SDL/Rect.pm
+ SDL::SFont:
+ file: lib/SDL/SFont.pm
+ SDL::Sound:
+ file: lib/SDL/Sound.pm
+ SDL::Surface:
+ file: lib/SDL/Surface.pm
+ SDL::Timer:
+ file: lib/SDL/Timer.pm
+ SDL::Tool::Font:
+ file: lib/SDL/Tool/Font.pm
+ SDL::Tool::Graphic:
+ file: lib/SDL/Tool/Graphic.pm
+ SDL::Tutorial:
+ file: lib/SDL/Tutorial.pm
+ SDL::Tutorial::Animation:
+ file: lib/SDL/Tutorial/Animation.pm
+ SDL::Tutorial::Images:
+ file: lib/SDL/Tutorial/Images.pm
+ SDL::Tutorial:Drawing:
+ file: lib/SDL/Tutorial/Drawing.pm
+ SDL::Video:
+ file: lib/SDL/Video.pm
+ SDL:TTFont:
+ file: lib/SDL/TTFont.pm
+ SDL_perl:
+ file: lib/SDL_perl.pm
+ Walker:
+ file: lib/SDL/Tutorial/Images.pm
+ main:
+ file: lib/SDL/Tutorial/Images.pm
+generated_by: Module::Build version 0.2611
51 MacOSX/Info.plist
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDisplayName</key>
+ <string>SDL Perl</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>sdlpl</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>SDL Perl.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>SDL Perl Script</string>
+ <key>CFBundleTypeRole</key>
+ <string>Shell</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>SDL Perl</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Multimedia for Perl</string>
+ <key>CFBundleIconFile</key>
+ <string>SDL Perl.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.perl.sdl</string>
+ <key>CFBundleName</key>
+ <string>SDL Perl</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.2.0</string>
+ <key>CFBundleVersion</key>
+ <string>2.2.0</string>
+ <key>CSBundleSignature</key>
+ <string>sdpl</string>
+ <key>LSEnvironment</key>
+ <dict/>
+ <key>LSHasLocalizedDisplayName</key>
+ <false/>
+ <key>NSAppleScriptEnabled</key>
+ <false/>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2000-2006, David J. Goehrig, All Rights Reserved.</string>
+ <key>NSMainNibFile</key>
+ <string></string>
+</dict>
+</plist>
BIN  MacOSX/SDL Perl.icns
Binary file not shown
12 MacOSX/launcher.h
@@ -0,0 +1,12 @@
+// launcher.h
+
+@interface SDLPerlMain : NSObject
+- (void) launchPerl: (NSString*) script;
+- (void) applicationWillFinishLaunching: (NSNotification*) note;
+- (void) applicationDidFinishLaunching: (NSNotification*) note;
+- (void) setupWorkingDirectory: (BOOL) changep;
+@end
+
+@interface SDLPerlApplication : NSApplication
+- (void) terminate: (id) sender;
+@end
198 MacOSX/launcher.m
@@ -0,0 +1,198 @@
+// lancher.m
+//
+// Copyright (C) 2006 David J. Goehrig <dgoehrig@cpan.org>
+//
+//
+
+
+// Define _SDL_main_h to avoid using SDLMain.m
+
+#define _SDL_main_h
+#include <Foundation/Foundation.h>
+#include <AppKit/AppKit.h>
+#include <EXTERN.h>
+#include <perl.h>
+#include <SDL/SDL.h>
+#include "launcher.h"
+
+static SDLPerlMain* sdlplmain;
+static PerlInterpreter *my_perl = NULL;
+char path[MAXPATHLEN];
+char libpath[MAXPATHLEN];
+char scriptfile[MAXPATHLEN];
+BOOL init_path;
+
+void xs_init (pTHX);
+EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
+EXTERN_C void
+xs_init(pTHX)
+{
+ char *file = __FILE__;
+
+ sprintf(libpath,"%s/Contents/Resources/lib/%s",path,ARCHNAME);
+ fprintf(stderr,"LIBPATH: %s\n",libpath);
+
+ dXSUB_SYS;
+
+ /* DynaLoader is a special case */
+ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
+ SV* svpth = newSVpv(libpath,strlen(libpath));
+ AV* inc = get_av("INC",0);
+ if (inc && svpth) {
+ av_unshift(inc,1);
+ av_store(inc,0,svpth);
+ }
+}
+
+
+@implementation SDLPerlApplication
+- (void) terminate:(id)sender
+{
+ fprintf(stderr,"Quitting Event\n");
+ SDL_Event event;
+ event.type = SDL_QUIT;
+ SDL_PushEvent(&event);
+ [NSApp stop: nil];
+}
+@end
+
+@implementation SDLPerlMain
+- (void) setupWorkingDirectory:(BOOL)changep
+{
+ CFURLRef bpath;
+ fprintf(stderr,"Setup working directory ? %s", (changep ? "True" : "False"));
+ if (! changep) return;
+ bpath = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ if (CFURLGetFileSystemRepresentation(bpath,true,(UInt8*)path,MAXPATHLEN)) {
+ fprintf(stderr,"PATH: %s\n",path);
+ chdir((char*)path);
+ }
+}
+
+- (void) applicationWillFinishLaunching: (NSNotification *) note
+{
+ NSMenu* appleMenu;
+ NSMenuItem* item;
+ NSDictionary* dict;
+ NSString* appName;
+ NSString* title;
+
+ fprintf(stderr, "Application will finish launching\n");
+
+ dict = (NSDictionary*)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
+ appName = (dict ? [dict objectForKey: @"CFBundleName"] : [[NSProcessInfo processInfo] processName]);
+
+ appleMenu = [[NSMenu alloc] initWithTitle: @""];
+
+ title = [@"About " stringByAppendingString: appName ];
+ [appleMenu addItemWithTitle: title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+ [appleMenu addItem: [NSMenuItem separatorItem]];
+
+ title = [@"Hide " stringByAppendingString: appName ];
+ [appleMenu addItemWithTitle: title action:@selector(hide:) keyEquivalent:@"h"];
+
+ title = @"Hide Others";
+ [appleMenu addItemWithTitle: title action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+
+ title = @"Show All";
+ [appleMenu addItemWithTitle: title action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+ [appleMenu addItem: [NSMenuItem separatorItem]];
+
+ title = @"Quit";
+ [appleMenu addItemWithTitle: title action:@selector(terminate:) keyEquivalent:@"q"];
+
+ item = [[NSMenuItem alloc] initWithTitle:@"" action: nil keyEquivalent:@""];
+ [item setSubmenu: appleMenu];
+
+ [[NSApp mainMenu] addItem: item];
+
+ [NSApp setMainMenu: appleMenu];
+
+ fprintf(stderr,"Done with menu\n");
+}
+
+- (void) applicationDidFinishLaunching: (NSNotification *) note
+{
+ fprintf(stderr, "Application did finish launching\n");
+
+// fprintf(stderr, "SCRIPT: %s\n",scriptfile);
+// NSString* scr = [[NSString alloc] initWithUTF8String: scriptfile];
+// fprintf(stderr, "Setting directory: %s\n",init_path ? "true" : "false");
+// [self setupWorkingDirectory: init_path];
+// fprintf(stderr,"Launching perl script %s\n", scriptfile);
+// [self launchPerl: scr ];
+ [NSApp terminate: self];
+}
+
+- (void) launchPerl: (NSString*) script
+{
+ int count = 3;
+ char* embedding[] = { path, scriptfile , "0" } ;
+ unsigned buflen = [ script lengthOfBytesUsingEncoding: NSUTF8StringEncoding] + 1;
+ [script getCString:scriptfile maxLength: buflen encoding:NSUTF8StringEncoding];
+ fprintf(stderr,"Launching script: %s\n",scriptfile);
+ PERL_SYS_INIT3(&count,&embedding,NULL);
+ my_perl = perl_alloc();
+ perl_construct(my_perl);
+ perl_parse(my_perl,xs_init,count,embedding,NULL);
+ fprintf(stderr,"Running perl\n");
+ perl_run(my_perl);
+ fprintf(stderr,"Destructing perl\n");
+ perl_destruct(my_perl);
+ fprintf(stderr,"Freeing perl\n");
+ perl_free(my_perl);
+ fprintf(stderr,"Quiting perl script: %s\n",scriptfile);
+ PERL_SYS_TERM();
+}
+
+- (BOOL) application: (NSApplication*) theApplication openFile: (NSString*) filename
+{
+ fprintf(stderr,"openFile %s\n", [filename UTF8String]);
+ fprintf(stderr, "Setting directory: %s\n",init_path ? "true" : "false");
+ [self setupWorkingDirectory: init_path];
+ fprintf(stderr,"launchgin perl\n");
+ [self launchPerl: filename];
+}
+
+@end
+
+int
+main( int argc, char** argv)
+{
+ int i;
+ NSAutoreleasePool* pool;
+
+ fprintf(stderr, "ARGC %d \n", argc);
+ for (i = 0; i < argc; ++i) {
+ fprintf(stderr,"ARGV[%d] %s\n",i,argv[i]);
+ }
+
+ init_path = YES;
+ memset(scriptfile,0,MAXPATHLEN);
+ if (argc >= 2) {
+ if ( argc == 2 ) {
+ strncpy(scriptfile,argv[1],strlen(argv[1]));
+ } else {
+ strncpy(scriptfile,argv[1],strlen(argv[2]));
+ }
+ }
+ fprintf(stderr, "[main] SCRIPT: %s\n",scriptfile);
+
+ pool = [[NSAutoreleasePool alloc] init];
+
+ [SDLPerlApplication sharedApplication];
+ [NSApp setMainMenu: [[NSMenu alloc] init]];
+
+ sdlplmain = [[SDLPerlMain alloc] init];
+ [NSApp setDelegate: sdlplmain];
+
+ [NSApp run];
+
+ fprintf(stderr,"Terminating NSApp\n");
+ [sdlplmain release];
+ [pool release];
+
+ return 0;
+}
72 README
@@ -0,0 +1,72 @@
+README for SDL_Perl-2.2.0
+
+What's New in 2.2.0:
+
+SDL_Perl-2.2.0 adds support for a few new modules, fixes a few more
+bugs, and improves the error handling of the object layer. Additional
+support for SDL_sound, SDL_svg, and SDL_vnc has been added. In the
+OO layer, all constructors now die when they fail to construct an object
+with a valid underlying datastructure pointer.
+
+Prerequisites:
+
+SDL Perl recommends installing the following libraries available
+from http://www.libsdl.org/ prior to installing:
+
+ SDL-1.2.8
+ smpeg-0.4.5
+ SDL_image-1.2.4
+ SDL_mixer-1.2.6
+ SDL_sound-1.0.1
+ SDL_net-1.2.5
+ SDL_gfx-2.0.13
+ SDL_ttf-2.0.7
+ SDL_svg-1.1.9
+ SDL_vnc-1.0.0
+
+Additionally the following Perl modules should be installed:
+
+ Module-Build-0.22
+ Test-Simple-0.62
+
+Installation:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+The build process will use the new Module::Build facility
+to autodetect and build SDL Perl for your platform. If
+the build fails please forward bugs to sdl-devel@perl.org.
+
+Documentation:
+
+Each module now includes its own documentation, and
+is accessible through perldoc. Additional tutorials,
+code, and tips can be found at the website:
+
+ http://sdl.perl.org
+
+Online documentation and tutorials are available through
+perldoc module.
+
+Contributing:
+
+Anyone wishing to contribute modules, sprite engines, documentation,
+and anything else that others might find useful, please join
+the mailing list:
+
+ sdl-devel@perl.org
+
+This is a mailing list for those interested in SDLperl development,
+both as an applications developer, and as a core contributor.
+
+I am always more than happy to take patches, bug reports, and
+helpful suggestions. It is feedback, both good and poor, that
+keeps projects like this going.
+
+Enjoy,
+
+David J. Goehrig <dgoehrig@cpan.org>
+
10 TODO
@@ -0,0 +1,10 @@
+TODO for SDL_perl
+
+ o Add SDL_EventFilter support
+ o fix OpenGL build without glu.h
+ o fix openFile: support on Mac (SDL patch)
+ o add Windows application bundle support
+ o add Linux application bundle support
+ o add embedded media module
+
+
1,035 lib/SDL.pm
@@ -0,0 +1,1035 @@
+#!/usr/bin/env perl
+#
+# SDL.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# ------------------------------------------------------------------------------
+#
+# Please feel free to send questions, suggestions or improvements to:
+#
+# David J. Goehrig
+# dgoehrig@cpan.org
+#
+
+package SDL;
+
+use strict;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+
+require Exporter;
+require DynaLoader;
+
+use SDL_perl;
+use SDL::Constants;
+
+BEGIN {
+ @ISA = qw(Exporter DynaLoader);
+ @EXPORT = qw( in verify &NULL );
+};
+
+
+$VERSION = '2.2.1';
+
+print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl'));
+
+$SDL::DEBUG=1;
+
+sub NULL {
+ return 0;
+}
+
+sub in {
+ my ($k,@t) = @_;
+ (scalar grep { defined $_ && $_ eq $k } @t) <=> 0;
+}
+
+sub verify (\%@) {
+ my ($options,@valid_options) = @_;
+ for (keys %$options) {
+ die "Invalid option $_\n" unless in ($_, @valid_options);
+ }
+}
+
+
+1;
+__END__
+
+=head1 NAME
+
+SDL_perl - Simple DirectMedia Layer for Perl
+
+=head1 SYNOPSIS
+
+ use SDL;
+
+=head1 DESCRIPTION
+
+SDL_perl is a package of perl modules that provides both functional and object orient
+interfaces to the Simple DirectMedia Layer for Perl 5. This package does take some
+liberties with the SDL API, and attempts to adhere to the spirit of both the SDL
+and Perl. This document describes the low-level functional SDL_perl API. For the
+object oriented programming interface please see the documentation provided on a
+per class basis.
+
+=head2 Init(flags)
+
+As with the C language API, SDL_perl initializes the SDL environment through
+the C<SDL::Init> subroutine. This routine takes a mode flag constructed through
+the bitwise OR product of the following functions:
+
+=over 4
+=item *
+INIT_AUDIO()
+
+=item *
+INIT_VIDEO()
+
+=item *
+INIT_CDROM()
+
+=item *
+INIT_EVERYTHING()
+
+=item *
+INIT_NOPARACHUTE()
+
+=item *
+INIT_JOYSTICK()
+
+=item *
+INIT_TIMER()
+
+=back
+
+C<SDL::Init> returns 0 on success, or -1 on error.
+
+=head2 GetError()
+
+The last error message set by the SDL library can be retrieved using the subroutine
+C<SDL::GetError>, which returns a scalar containing the text of the message if any.
+
+=head2 Delay(ms)
+
+This subroutine allows an application to delay further operations for atleast a
+number of milliseconds provided as the argument. The actual delay may be longer
+than the specified depending on the underlying OS.
+
+=head2 GetTicks()
+
+An application may retrieve the number of milliseconds expired since the initilization
+of the application through this subroutine. This value resets rougly ever 49 days.
+
+=head2 AddTimer(interval,callback,param)
+
+C<AddTimer> will register a SDL_NewTimerCallback function to be executed after
+C<interval> milliseconds, with parameter C<param>. SDL_NewTimerCallback objects
+can be constructed with the C<NewTimer> subroutine. C<SDL::PerlTimerCallback>
+will return a valid callback for executing a perl subroutine or closure.
+This subroutine returns a SDL_TimerID for the newly registered callback, or NULL
+on error.
+
+=head2 NewTimer(interval,subroutine)
+
+The C<NewTimer> takes an interval in milliseconds and a reference to a subroutine
+to call at that interval. The subroutine will be invoked in a void context
+and accepts no parameters. The callback used is that returned by C<SDL::PerlTimerCallback>.
+C<NewTimer> returns the SDL_TimerID for the new timer or NULL on error.
+
+=head2 RemoveTimer(id)
+
+This subroutine taks a SDL_TimerID and removes it from the list of active callbacks.
+RemoveTimer returns false on failure.
+
+=head2 SetTimer
+
+This subroutine is depreciated, please use C<NewTimer> or C<AddTimer> instead.
+
+=head2 CDNumDrives()
+
+C<SDL::CDNumDrives> returns the number of available CD-ROM drives in the system.
+
+=head2 CDName(drive)
+
+The subroutine C<SDL::CDName> returns the system specific human readable device name
+for the given CD-ROM drive.
+
+=head2 CDOpen(drive)
+
+This subroutine opens a CD-ROM drive for access, returning NULL if the drive is busy
+or otherwise unavailable. On success this subroutine returns a handle to the CD-ROM
+drive.
+
+=head2 CDTrackListing(cd)
+
+C<SDL::CDTrackListing> returns a human readable description of a CD-ROM. For each
+track one line will be produced with the following format:
+
+ Track index: %d, id %d, %2d.%2d
+
+This is provided to ease the creation of human readable descriptions and debugging.
+
+=head2 CDTrackId(track)
+
+C<CDTrackId> returns the id field of the given SDL_CDtrack structure.
+
+=head2 CDTrackType(track)
+
+C<CDTrackType> returns the type field of the given SDL_CDtrack structure.
+
+=head2 CDTrackLength(track)
+
+C<CDTrackLength> returns the length field of the given SDL_CDtrack structure.
+
+=head2 CDTrackOffset(track)
+
+C<CDTrackOffset> returns the offset field of the given SDL_CDtrack structure.
+
+=head2 CDStatus(cd)
+
+The function C<CDStatus> returns the current status of the given SDL_CDrom.
+C<CDStatus>'s return values are:
+
+=over 4
+
+=item *
+CD_TRAYEMPTY
+
+=item *
+CD_PLAYING
+
+=item *
+CD_STOPPED
+
+=item *
+CD_PAUSED
+
+=item *
+CD_ERROR
+
+=back
+
+=head2 CDPlayTracks(cd,track,tracks,frame,frames)
+
+To start playing from an arbitrary portion of a CD, one can provide
+C<SDL::CDPlayTracks> with a CD, a starting track, the number of tracks,
+a starting frame, and the number of frames to be played.
+
+=head2 CDPlay(cd,track,length)
+
+C<SDL::CDPlay> plays the next C<length> tracks starting from C<track>
+
+=head2 CDPause(cd)
+
+This function will pause CD playback until resume is called.
+
+=head2 CDResume(cd)
+
+This function will resume CD playback if paused.
+
+=head2 CDStop(cd)
+
+C<SDL::CDStop> will stop CD playback if playing.
+
+=head2 CDEject(cd)
+
+This function will eject the CD
+
+=head2 CDClose(cd)
+
+This function will release an opened CD.
+
+=head2 CDNumTracks
+
+=head2 CDCurTrack
+
+=head2 CDCurFrame
+
+=head2 CDTrack
+
+=head2 PumpEvents
+
+=head2 NewEvent
+
+=head2 FreeEvent
+
+=head2 PollEvent
+
+=head2 WaitEvent
+
+=head2 EventState
+
+=head2 IGNORE
+
+=head2 ENABLE
+
+=head2 QUERY
+
+=head2 ACTIVEEVENT
+
+=head2 KEYDOWN
+
+=head2 KEYUP
+
+=head2 MOUSEMOTION
+
+=head2 MOUSEBUTTONDOWN
+
+=head2 MOUSEBUTTONUP
+
+=head2 QUIT
+
+=head2 SYSWMEVENT
+
+=head2 EventType
+
+=head2 ActiveEventGain
+
+=head2 ActiveEventState
+
+=head2 APPMOUSEFOCUS
+
+=head2 APPINPUTFOCUS
+
+=head2 APPACTIVE
+
+=head2 KeyEventState
+
+=head2 SDLK_BACKSPACE
+
+=head2 SDLK_TAB
+
+=head2 SDLK_CLEAR
+
+=head2 SDLK_RETURN
+
+=head2 SDLK_PAUSE
+
+=head2 SDLK_ESCAPE
+
+=head2 SDLK_SPACE
+
+=head2 SDLK_EXCLAIM
+
+=head2 SDLK_QUOTEDBL
+
+=head2 SDLK_HASH
+
+=head2 SDLK_DOLLAR
+
+=head2 SDLK_AMPERSAND
+
+=head2 SDLK_QUOTE
+
+=head2 SDLK_LEFTPAREN
+
+=head2 SDLK_RIGHTPAREN
+
+=head2 SDLK_ASTERISK
+
+=head2 SDLK_PLUS
+
+=head2 SDLK_COMMA
+
+=head2 SDLK_MINUS
+
+=head2 SDLK_PERIOD
+
+=head2 SDLK_SLASH
+
+=head2 SDLK_0
+
+=head2 SDLK_1
+
+=head2 SDLK_2
+
+=head2 SDLK_3
+
+=head2 SDLK_4
+
+=head2 SDLK_5
+
+=head2 SDLK_6
+
+=head2 SDLK_7
+
+=head2 SDLK_8
+
+=head2 SDLK_9
+
+=head2 SDLK_COLON
+
+=head2 SDLK_SEMICOLON
+
+=head2 SDLK_LESS
+
+=head2 SDLK_EQUALS
+
+=head2 SDLK_GREATER
+
+=head2 SDLK_QUESTION
+
+=head2 SDLK_AT
+
+=head2 SDLK_LEFTBRACKET
+
+=head2 SDLK_BACKSLASH
+
+=head2 SDLK_RIGHTBRACKET
+
+=head2 SDLK_CARET
+
+=head2 SDLK_UNDERSCORE
+
+=head2 SDLK_BACKQUOTE
+
+=head2 SDLK_a
+
+=head2 SDLK_b
+
+=head2 SDLK_c
+
+=head2 SDLK_d
+
+=head2 SDLK_e
+
+=head2 SDLK_f
+
+=head2 SDLK_g
+
+=head2 SDLK_h
+
+=head2 SDLK_i
+
+=head2 SDLK_j
+
+=head2 SDLK_k
+
+=head2 SDLK_l
+
+=head2 SDLK_m
+
+=head2 SDLK_n
+
+=head2 SDLK_o
+
+=head2 SDLK_p
+
+=head2 SDLK_q
+
+=head2 SDLK_r
+
+=head2 SDLK_s
+
+=head2 SDLK_t
+
+=head2 SDLK_u
+
+=head2 SDLK_v
+
+=head2 SDLK_w
+
+=head2 SDLK_x
+
+=head2 SDLK_y
+
+=head2 SDLK_z
+
+=head2 SDLK_DELETE
+
+=head2 SDLK_KP0
+
+=head2 SDLK_KP1
+
+=head2 SDLK_KP2
+
+=head2 SDLK_KP3
+
+=head2 SDLK_KP4
+
+=head2 SDLK_KP5
+
+=head2 SDLK_KP6
+
+=head2 SDLK_KP7
+
+=head2 SDLK_KP8
+
+=head2 SDLK_KP9
+
+=head2 SDLK_KP_PERIOD
+
+=head2 SDLK_KP_DIVIDE
+
+=head2 SDLK_KP_MULTIPLY
+
+=head2 SDLK_KP_MINUS
+
+=head2 SDLK_KP_PLUS
+
+=head2 SDLK_KP_ENTER
+
+=head2 SDLK_KP_EQUALS
+
+=head2 SDLK_UP
+
+=head2 SDLK_DOWN
+
+=head2 SDLK_RIGHT
+
+=head2 SDLK_LEFT
+
+=head2 SDLK_INSERT
+
+=head2 SDLK_HOME
+
+=head2 SDLK_END
+
+=head2 SDLK_PAGEUP
+
+=head2 SDLK_PAGEDOWN
+
+=head2 SDLK_F1
+
+=head2 SDLK_F2
+
+=head2 SDLK_F3
+
+=head2 SDLK_F4
+
+=head2 SDLK_F5
+
+=head2 SDLK_F6
+
+=head2 SDLK_F7
+
+=head2 SDLK_F8
+
+=head2 SDLK_F9
+
+=head2 SDLK_F10
+
+=head2 SDLK_F11
+
+=head2 SDLK_F12
+
+=head2 SDLK_F13
+
+=head2 SDLK_F14
+
+=head2 SDLK_F15
+
+=head2 SDLK_NUMLOCK
+
+=head2 SDLK_CAPSLOCK
+
+=head2 SDLK_SCROLLOCK
+
+=head2 SDLK_RSHIFT
+
+=head2 SDLK_LSHIFT
+
+=head2 SDLK_RCTRL
+
+=head2 SDLK_LCTRL
+
+=head2 SDLK_RALT
+
+=head2 SDLK_LALT
+
+=head2 SDLK_RMETA
+
+=head2 SDLK_LMETA
+
+=head2 SDLK_LSUPER
+
+=head2 SDLK_RSUPER
+
+=head2 SDLK_MODE
+
+=head2 SDLK_HELP
+
+=head2 SDLK_PRINT
+
+=head2 SDLK_SYSREQ
+
+=head2 SDLK_BREAK
+
+=head2 SDLK_MENU
+
+=head2 SDLK_POWER
+
+=head2 SDLK_EURO
+
+=head2 KMOD_NONE
+
+=head2 KMOD_NUM
+
+=head2 KMOD_CAPS
+
+=head2 KMOD_LCTRL
+
+=head2 KMOD_RCTRL
+
+=head2 KMOD_RSHIFT
+
+=head2 KMOD_LSHIFT
+
+=head2 KMOD_RALT
+
+=head2 KMOD_LALT
+
+=head2 KMOD_CTRL
+
+=head2 KMOD_SHIFT
+
+=head2 KMOD_ALT
+
+=head2 KeyEventSym
+
+=head2 KeyEventMod
+
+=head2 KeyEventUnicode
+
+=head2 KeyEventScanCode
+
+=head2 MouseMotionState
+
+=head2 MouseMotionX
+
+=head2 MouseMotionY
+
+=head2 MouseMotionXrel
+
+=head2 MouseMotionYrel
+
+=head2 MouseButtonState
+
+=head2 MouseButton
+
+=head2 MouseButtonX
+
+=head2 MouseButtonY
+
+=head2 SysWMEventMsg
+
+=head2 EnableUnicode
+
+=head2 EnableKeyRepeat
+
+=head2 GetKeyName
+
+=head2 PRESSED
+
+=head2 RELEASED
+
+=head2 CreateRGBSurface
+
+=head2 CreateRGBSurfaceFrom
+
+=head2 IMG_Load
+
+=head2 FreeSurface
+
+=head2 SurfacePalette
+
+=head2 SurfaceBitsPerPixel
+
+=head2 SurfaceBytesPerPixel
+
+=head2 SurfaceRshift
+
+=head2 SurfaceGshift
+
+=head2 SurfaceBshift
+
+=head2 SurfaceAshift
+
+=head2 SurfaceRmask
+
+=head2 SurfaceGmask
+
+=head2 SurfaceBmask
+
+=head2 SurfaceAmask
+
+=head2 SurfaceColorKey
+
+=head2 SurfaceAlpha
+
+=head2 SurfaceW
+
+=head2 SurfaceH