added ExposeEvent
Tobias Leich [Thu, 5 Nov 2009 20:50:36 +0000 (21:50 +0100)]
Build.PL
src/Core/objects/ExposeEvent.xs [new file with mode: 0644]

index d02616b..11925fb 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -56,6 +56,13 @@ my %subsystems =
                },
                libraries => [qw( SDL )],
        },
+       ExposeEvent => {
+               file      => {
+                       from  => 'src/Core/objects/ExposeEvent.xs',
+                       to    => 'lib/SDL/ExposeEvent.xs',
+               },
+               libraries => [qw( SDL )],
+       },
        JoyAxisEvent => {
                file      => {
                        from  => 'src/Core/objects/JoyAxisEvent.xs',
diff --git a/src/Core/objects/ExposeEvent.xs b/src/Core/objects/ExposeEvent.xs
new file mode 100644 (file)
index 0000000..8692875
--- /dev/null
@@ -0,0 +1,30 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#include <SDL.h>
+
+MODULE = SDL::ExposeEvent      PACKAGE = SDL::ExposeEvent    PREFIX = weevent_
+
+=for documentation
+
+SDL_ExposeEvent -- Window expose event
+
+ typedef struct{
+  Uint8 type;
+ } SDL_ExposeEvent;
+
+
+=cut
+
+Uint8
+weevent_type ( event, ... )
+       SDL_ExposeEvent *event
+       CODE: 
+               RETVAL = event->type;
+       OUTPUT:
+               RETVAL