From: Kartik Thakore Date: Sun, 8 Nov 2009 02:16:25 +0000 (-0500) Subject: Fininshed up KeyBoardEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93171649b2f6b4769fed948cc44a42a4cdbd58ea;p=sdlgit%2FSDL_perl.git Fininshed up KeyBoardEvent --- diff --git a/src/Core/objects/KeyboardEvent.xs b/src/Core/objects/KeyboardEvent.xs index d069662..a1be0b1 100644 --- a/src/Core/objects/KeyboardEvent.xs +++ b/src/Core/objects/KeyboardEvent.xs @@ -40,10 +40,17 @@ kbevent_type ( event, ... ) OUTPUT: RETVAL + Uint8 kbevent_state ( event, ... ) SDL_KeyboardEvent *event CODE: + if( items > 1 ) + { + event->state = SvIV( ST(1) ); + + } + RETVAL = event->state; OUTPUT: RETVAL @@ -54,6 +61,20 @@ kbevent_keysym ( event, ... ) PREINIT: char* CLASS = "SDL::keysym"; CODE: + if( items > 1 ) + { + SDL_keysym * ksp = (SDL_keysym * )SvPV( ST(1), PL_na) ; + event->keysym = *ksp; + + } + RETVAL = &(event->keysym); OUTPUT: RETVAL + +void +kbevent_DESTROY(self) + SDL_KeyboardEvent *self + CODE: + safefree( (char *)self ); +