From: Tobias Leich Date: Thu, 5 Nov 2009 21:11:48 +0000 (+0100) Subject: added QuitEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff56eea783c162a7023ebde1bd6b2f7fc24f4839;p=sdlgit%2FSDL_perl.git added QuitEvent --- diff --git a/Build.PL b/Build.PL index 0e14209..47b1046 100644 --- 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 index 0000000..b33ccbb --- /dev/null +++ b/src/Core/objects/QuitEvent.xs @@ -0,0 +1,30 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifndef aTHX_ +#define aTHX_ +#endif + +#include + +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