added QuitEvent
Tobias Leich [Thu, 5 Nov 2009 21:11:48 +0000 (22:11 +0100)]
Build.PL
src/Core/objects/QuitEvent.xs [new file with mode: 0644]

index 0e14209..47b1046 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -175,6 +175,13 @@ my %subsystems =
                },
                libraries => [qw( SDL )],
        },
+       QuitEvent => {
+               file      => {
+                       from  => 'src/Core/objects/QuitEvent.xs',
+                       to    => 'lib/SDL/QuitEvent.xs',
+               },
+               libraries => [qw( SDL )],
+       },
        ResizeEvent => {
                file      => {
                        from  => 'src/Core/objects/ResizeEvent.xs',
diff --git a/src/Core/objects/QuitEvent.xs b/src/Core/objects/QuitEvent.xs
new file mode 100644 (file)
index 0000000..b33ccbb
--- /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::QuitEvent        PACKAGE = SDL::QuitEvent    PREFIX = qevent_
+
+=for documentation
+
+SDL_QuitEvent -- Quit requested event
+
+ typedef struct{
+  Uint8 type;
+ } SDL_QuitEvent;
+
+
+=cut
+
+Uint8
+qevent_type ( event, ... )
+       SDL_QuitEvent *event
+       CODE: 
+               RETVAL = event->type;
+       OUTPUT:
+               RETVAL