From: Tobias Leich Date: Thu, 5 Nov 2009 18:57:27 +0000 (+0100) Subject: added ResizeEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2907cdb7d9df62d4cac548acf75638585be1bb8f;p=sdlgit%2FSDL_perl.git added ResizeEvent --- diff --git a/Build.PL b/Build.PL index 9c155a1..a77fdc3 100644 --- a/Build.PL +++ b/Build.PL @@ -161,6 +161,13 @@ my %subsystems = }, libraries => [qw( SDL )], }, + ResizeEvent => { + file => { + from => 'src/Core/objects/ResizeEvent.xs', + to => 'lib/SDL/ResizeEvent.xs', + }, + libraries => [qw( SDL )], + }, VideoInfo => { file => { diff --git a/src/Core/objects/ResizeEvent.xs b/src/Core/objects/ResizeEvent.xs new file mode 100644 index 0000000..c6cedd0 --- /dev/null +++ b/src/Core/objects/ResizeEvent.xs @@ -0,0 +1,47 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifndef aTHX_ +#define aTHX_ +#endif + +#include + +MODULE = SDL::ResizeEvent PACKAGE = SDL::ResizeEvent PREFIX = wrevent_ + +=for documentation + +SDL_ResizeEvent -- Window resize event structure + + typedef struct{ + Uint8 type; + Uint w, h; + } SDL_ResizeEvent; + + +=cut + +Uint8 +wrevent_type ( event, ... ) + SDL_ResizeEvent *event + CODE: + RETVAL = event->type; + OUTPUT: + RETVAL + +int +wrevent_w ( event, ... ) + SDL_ResizeEvent *event + CODE: + RETVAL = event->w; + OUTPUT: + RETVAL + +int +wrevent_h ( event, ... ) + SDL_ResizeEvent *event + CODE: + RETVAL = event->h; + OUTPUT: + RETVAL