},
libraries => [qw( SDL )],
},
+# JoyButtonEvent => {
+# file => {
+# from => 'src/Core/objects/JoyButtonEvent.xs',
+# to => 'lib/SDL/JoyButtonEvent.xs',
+# },
+# libraries => [qw( SDL )],
+# },
+ JoyHatEvent => {
+ file => {
+ from => 'src/Core/objects/JoyHatEvent.xs',
+ to => 'lib/SDL/JoyHatEvent.xs',
+ },
+ libraries => [qw( SDL )],
+ },
KeyboardEvent => {
file => {
from => 'src/Core/objects/KeyboardEvent.xs',
--- /dev/null
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#include <SDL.h>
+
+MODULE = SDL::JoyButtonEvent PACKAGE = SDL::JoyButtonEvent PREFIX = jbevent_
+
+=for documentation
+
+SDL_JoyButtonEvent -- Joystick button event structure
+
+ typedef struct{
+ Uint8 type;
+ Uint8 which;
+ Uint8 button;
+ Uint8 state;
+ } SDL_JoyButtonEvent;
+
+
+=cut
+
+Uint8
+jbevent_type ( event, ... )
+ SDL_JoyButtonEvent *event
+ CODE:
+ RETVAL = event->type;
+ OUTPUT:
+ RETVAL
+
+Uint8
+jbevent_which ( event, ... )
+ SDL_JoyButtonEvent *event
+ CODE:
+ RETVAL = event->which;
+ OUTPUT:
+ RETVAL
+
+Uint8
+jbevent_button ( event, ... )
+ SDL_JoyButtonEvent *event
+ CODE:
+ RETVAL = event->button;
+ OUTPUT:
+ RETVAL
+
+Uint8
+jbevent_state ( event, ... )
+ SDL_JoyButtonEvent *event
+ CODE:
+ RETVAL = event->state;
+ OUTPUT:
+ RETVAL
--- /dev/null
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#include <SDL.h>
+
+MODULE = SDL::JoyHatEvent PACKAGE = SDL::JoyHatEvent PREFIX = jhevent_
+
+=for documentation
+
+SDL_JoyHatEvent -- Joystick hat position change event structure
+
+ typedef struct{
+ Uint8 type;
+ Uint8 which;
+ Uint8 hat;
+ Uint8 value;
+ } SDL_JoyHatEvent;
+
+
+=cut
+
+Uint8
+jhevent_type ( event, ... )
+ SDL_JoyHatEvent *event
+ CODE:
+ RETVAL = event->type;
+ OUTPUT:
+ RETVAL
+
+Uint8
+jhevent_which ( event, ... )
+ SDL_JoyHatEvent *event
+ CODE:
+ RETVAL = event->which;
+ OUTPUT:
+ RETVAL
+
+Uint8
+jhevent_hat ( event, ... )
+ SDL_JoyHatEvent *event
+ CODE:
+ RETVAL = event->hat;
+ OUTPUT:
+ RETVAL
+
+Sint16
+jhevent_value ( event, ... )
+ SDL_JoyHatEvent *event
+ CODE:
+ RETVAL = event->value;
+ OUTPUT:
+ RETVAL