From: Tobias Leich Date: Thu, 5 Nov 2009 21:04:54 +0000 (+0100) Subject: added SysWMEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a83e7b74f1d80bd5d778b627f0abe0ce25e6f7e4;p=sdlgit%2FSDL_perl.git added SysWMEvent --- diff --git a/Build.PL b/Build.PL index 11925fb..0e14209 100644 --- a/Build.PL +++ b/Build.PL @@ -147,6 +147,13 @@ my %subsystems = }, libraries => [qw( SDL )], }, + SysWMEvent => { + file => { + from => 'src/Core/objects/SysWMEvent.xs', + to => 'lib/SDL/SysWMEvent.xs', + }, + libraries => [qw( SDL )], + }, Overlay => { file => { from => 'src/Core/objects/Overlay.xs', diff --git a/src/Core/objects/SysWMEvent.xs b/src/Core/objects/SysWMEvent.xs new file mode 100644 index 0000000..5f7354b --- /dev/null +++ b/src/Core/objects/SysWMEvent.xs @@ -0,0 +1,42 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifndef aTHX_ +#define aTHX_ +#endif + +#include + +MODULE = SDL::SysWMEvent PACKAGE = SDL::SysWMEvent PREFIX = wmevent_ + +=for documentation + +SDL_SysWMEvent -- Platform-dependent window manager event + + typedef struct{ + Uint8 type; /* Always SDL_SYSWMEVEBT */ + SDL_SysWMmsg *msg; + } SDL_SysWMEvent; + +see also: L + +=cut + +Uint8 +wmevent_type ( event, ... ) + SDL_SysWMEvent *event + CODE: + RETVAL = event->type; + OUTPUT: + RETVAL + +SDL_SysWMmsg * +wmevent_msg ( event, ... ) + SDL_SysWMEvent *event + PREINIT: + char* CLASS = "SDL::SysWMmsg"; + CODE: + RETVAL = &(event->msg); + OUTPUT: + RETVAL