From: Tobias Leich Date: Mon, 9 Nov 2009 20:03:51 +0000 (+0100) Subject: migrate JoyHatEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d898d3e5bfd983ba31576720efbbddeaec1aa9d;p=sdlgit%2FSDL_perl.git migrate JoyHatEvent --- diff --git a/src/Core/objects/Event.xs b/src/Core/objects/Event.xs index 0464d7e..fd2a5da 100644 --- a/src/Core/objects/Event.xs +++ b/src/Core/objects/Event.xs @@ -362,6 +362,66 @@ event_jhat ( event, ... ) OUTPUT: RETVAL +Uint8 +event_jhat_type ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyHatEvent * a = &(event->jhat); + + if( items > 1 ) + { + a->which = SvIV( ST(1) ); + } + + RETVAL = a->type; + OUTPUT: + RETVAL + +Uint8 +event_jhat_which ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyHatEvent * a = &(event->jhat); + + if( items > 1 ) + { + a->which = SvIV( ST(1) ); + } + + RETVAL = a->which; + OUTPUT: + RETVAL + +Uint8 +event_jhat_hat ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyHatEvent * a = &(event->jhat); + + if( items > 1 ) + { + a->hat = SvIV( ST(1) ); + } + + RETVAL = a->hat; + OUTPUT: + RETVAL + +Uint8 +event_jhat_value ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyHatEvent * a = &(event->jhat); + + if( items > 1 ) + { + a->value = SvIV( ST(1) ); + } + + RETVAL = a->value; + OUTPUT: + RETVAL + SDL_JoyButtonEvent * event_jbutton ( event, ... ) SDL_Event *event