From: Kartik Thakore Date: Sun, 8 Nov 2009 03:07:18 +0000 (-0500) Subject: Finshed Quit, Resize and SysWMEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=964668b7546a712ed566148c89b969c2c37a8dd1;p=sdlgit%2FSDL_perl.git Finshed Quit, Resize and SysWMEvent --- diff --git a/src/Core/objects/QuitEvent.xs b/src/Core/objects/QuitEvent.xs index 2e11418..719304b 100644 --- a/src/Core/objects/QuitEvent.xs +++ b/src/Core/objects/QuitEvent.xs @@ -37,3 +37,9 @@ qevent_type ( event, ... ) RETVAL = event->type; OUTPUT: RETVAL + +void +qevent_DESTROY ( event) + SDL_QuitEvent *event + CODE: + safefree( (char *) event); diff --git a/src/Core/objects/ResizeEvent.xs b/src/Core/objects/ResizeEvent.xs index 4ce2b18..f62ea46 100644 --- a/src/Core/objects/ResizeEvent.xs +++ b/src/Core/objects/ResizeEvent.xs @@ -43,6 +43,12 @@ int wrevent_w ( event, ... ) SDL_ResizeEvent *event CODE: + if( items > 1 ) + { + event->w = SvIV( ST(1) ); + + } + RETVAL = event->w; OUTPUT: RETVAL @@ -51,6 +57,18 @@ int wrevent_h ( event, ... ) SDL_ResizeEvent *event CODE: + if( items > 1 ) + { + event->h = SvIV( ST(1) ); + + } + RETVAL = event->h; OUTPUT: RETVAL + +void +wrevent_DESTROY ( event) + SDL_ResizeEvent *event + CODE: + safefree( (char *) event); diff --git a/src/Core/objects/SysWMEvent.xs b/src/Core/objects/SysWMEvent.xs index 7e91b56..29991ff 100644 --- a/src/Core/objects/SysWMEvent.xs +++ b/src/Core/objects/SysWMEvent.xs @@ -46,6 +46,20 @@ wmevent_msg ( event, ... ) PREINIT: char* CLASS = "SDL::SysWMmsg"; CODE: - RETVAL = &(event->msg); + if( items > 1 ) + { + SDL_SysWMmsg * sysm = (SDL_SysWMmsg * )SvPV( ST(1), PL_na) ; + event->msg = sysm; + + } + + RETVAL = event->msg; OUTPUT: RETVAL + +void +wmevent_DESTROY ( event) + SDL_SysWMEvent *event + CODE: + safefree( (char *) event); +