Added WMManagement Stubs. Fixed count
Kartik Thakore [Fri, 6 Nov 2009 16:25:07 +0000 (11:25 -0500)]
Build.PL
lib/SDL/WManagement.pm [new file with mode: 0644]
src/Core/WManagement.xs [new file with mode: 0644]
src/Core/WindowMangement.xs [deleted file]
t/core_wm.t

index 7ee492a..79d5ba7 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -133,6 +133,13 @@ my %subsystems =
                },
                libraries => [qw( SDL )],
        },
+       WManagement => {
+               file      => {
+                       from  => 'src/Core/WManagement.xs',
+                       to    => 'lib/SDL/WManagement.xs',
+               },
+               libraries => [qw( SDL )],
+       },
        Video => {
                file      => {
                        from  => 'src/Core/Video.xs',
diff --git a/lib/SDL/WManagement.pm b/lib/SDL/WManagement.pm
new file mode 100644 (file)
index 0000000..4814da1
--- /dev/null
@@ -0,0 +1,8 @@
+package SDL::WMangement;
+use strict;
+use warnings;
+require Exporter;
+require DynaLoader;
+our @ISA = qw(Exporter DynaLoader);
+bootstrap SDL::WMangement;
+1;
diff --git a/src/Core/WManagement.xs b/src/Core/WManagement.xs
new file mode 100644 (file)
index 0000000..cf882ff
--- /dev/null
@@ -0,0 +1,23 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#include <SDL.h>
+#include <SDL/SDL_syswm.h>
+
+MODULE = SDL::WManagement      PACKAGE = SDL::WManagement    PREFIX = wmanage_
+
+=for documentation
+
+The Following are XS bindings to the Window Management category in the SDL API v2.1.13
+
+Described on the SDL API site.
+
+
+=cut
+
+
diff --git a/src/Core/WindowMangement.xs b/src/Core/WindowMangement.xs
deleted file mode 100644 (file)
index e69de29..0000000
index 54bc6bf..4ac49bf 100644 (file)
@@ -7,12 +7,12 @@ plan ( tests => 4 );
 
 my @done =qw/ none /;
 
+use_ok( 'SDL::WManagement' ); 
 
 SKIP:
 {
-skip 'Not implemented', 2; 
-use_ok( 'SDL::WM' ); 
-can_ok ('SDL:WM', @done); 
+skip 'Not implemented', 1; 
+can_ok ('SDL:WMangement', @done); 
 }
 
 my @left = qw/
@@ -25,7 +25,7 @@ toggle_fullscreen
 grab_input     
 /;
 
-my $why = '[Percentage Completion] '.int( 100 * $#done / ($#done + $#left) ) ."\% implementation. $#done / ".($#done+$#left); 
+my $why = '[Percentage Completion] '.int( 100 * ($#done+1) / ($#done + $#left +2 ) ) ."\% implementation.". ($#done +1) .' / '.($#done+$#left +2); 
 
 TODO:
 {