SDLK_y
SDLK_z
SDL_ACTIVEEVENT
+ SDL_ACTIVEEVENTMASK
SDL_ALLEVENTS
SDL_ANYFORMAT
SDL_ADDEVENT
SDL_MOUSEBUTTONDOWN
SDL_MOUSEBUTTONUP
SDL_MOUSEMOTION
+ SDL_NOEVENT
+ SDL_NUMEVENTS
SDL_OPENGL
SDL_OPENGLBLIT
SDL_PEEKEVENT
SDL_QUERY
SDL_QUIT
SDL_RELEASED
+ SDL_EVENT_RESERVEDA
+ SDL_EVENT_RESERVEDB
+ SDL_EVENT_RESERVED2
+ SDL_EVENT_RESERVED3
+ SDL_EVENT_RESERVED4
+ SDL_EVENT_RESERVED5
+ SDL_EVENT_RESERVED6
+ SDL_EVENT_RESERVED7
SDL_RESIZABLE
SDL_RLEACCEL
SDL_RLEACCELOK
SDL_SRCCOLORKEY
SDL_SWSURFACE
SDL_SYSWMEVENT
+ SDL_USEREVENT
SDL_UYVY_OVERLAY
SDL_VIDEOEXPOSE
SDL_VIDEORESIZE
SDLK_z => 122,
SDL_ACTIVEEVENT => 1,
+ SDL_ACTIVEEVENTMASK => 1 << 1,
SDL_ADDEVENT => 0,
SDL_ALLEVENTS => 0xFFFFFFFF,
SDL_ANYFORMAT => 268435456,
SDL_BUTTON_WHEELDOWN => 16,
SDL_DOUBLEBUF => 1073741824,
+
SDL_ENABLE => 1,
+ SDL_EVENT_RESERVEDA => 14,
+ SDL_EVENT_RESERVEDB => 15,
+ SDL_EVENT_RESERVED2 => 18,
+ SDL_EVENT_RESERVED3 => 19,
+ SDL_EVENT_RESERVED4 => 20,
+ SDL_EVENT_RESERVED5 => 21,
+ SDL_EVENT_RESERVED6 => 22,
+ SDL_EVENT_RESERVED7 => 23,
+
SDL_FULLSCREEN => -2147483648,
SDL_GETEVENT => 2,
SDL_IYUV_OVERLAY => 1448433993,
- SDL_JOYAXISMOTION => 7,
- SDL_JOYBALLMOTION => 8,
- SDL_JOYBUTTONDOWN => 10,
- SDL_JOYBUTTONUP => 11,
- SDL_JOYHATMOTION => 9,
+ SDL_JOYAXISMOTION => 7,
+ SDL_JOYBALLMOTION => 8,
+ SDL_JOYBUTTONDOWN => 10,
+ SDL_JOYBUTTONUP => 11,
+ SDL_JOYHATMOTION => 9,
- SDL_KEYDOWN => 2,
- SDL_KEYUP => 3,
+ SDL_KEYDOWN => 2,
+ SDL_KEYUP => 3,
SDL_MIX_MAXVOLUME => 128,
- SDL_MOUSEBUTTONDOWN => 5,
- SDL_MOUSEBUTTONUP => 6,
- SDL_MOUSEMOTION => 4,
+ SDL_MOUSEBUTTONDOWN => 5,
+ SDL_MOUSEBUTTONUP => 6,
+ SDL_MOUSEMOTION => 4,
+
+ SDL_NOEVENT => 0,
+ SDL_NUMEVENTS => 32,
SDL_OPENGL => 2,
SDL_OPENGLBLIT => 10,
SDL_PRESSED => 1,
SDL_QUERY => -1,
- SDL_QUIT => 12,
+ SDL_QUIT => 12,
SDL_RELEASED => 0,
SDL_RESIZABLE => 16,
SDL_SRCALPHA => 65536,
SDL_SRCCOLORKEY => 4096,
SDL_SWSURFACE => 0,
- SDL_SYSWMEVENT => 13,
+ SDL_SYSWMEVENT => 13,
- SDL_UYVY_OVERLAY => 1498831189,
+ SDL_USEREVENT => 24,
+ SDL_UYVY_OVERLAY => 1498831189,
- SDL_VIDEOEXPOSE => 17,
- SDL_VIDEORESIZE => 16,
+ SDL_VIDEOEXPOSE => 17,
+ SDL_VIDEORESIZE => 16,
SDL_YUY2_OVERLAY => 844715353,
SDL_YV12_OVERLAY => 842094169,
use SDL::Video;
use Test::More;
-plan ( tests => 51 );
+plan ( tests => 90 );
my @done =qw/
pump_events
isa_ok( $wmevent, 'SDL::SysWMEvent', '[SDL::SysWMEvent::new] is creating an SysWMEvent');
isa_ok( $uevent, 'SDL::UserEvent', '[SDL::UserEvent::new] is creating an UserEvent');
-is( $uevent->type, 0x0018, '[SDL::UserEvent->type] returns correctly');
+# checking constants
+is(SDL_NOEVENT, 0, 'Constant SDL_NOEVENT'); # Unused
+is(SDL_ACTIVEEVENT, 1, 'Constant SDL_ACTIVEVENT'); # Application loses/gains visibility
+is(SDL_KEYDOWN, 2, 'Constant SDL_KEYDOWN'); # Keys pressed
+is(SDL_KEYUP, 3, 'Constant SDL_KEYUP'); # Keys released
+is(SDL_MOUSEMOTION, 4, 'Constant SDL_MOUSEMOTION'); # Mouse moved
+is(SDL_MOUSEBUTTONDOWN, 5, 'Constant SDL_MOUSEBUTTONDOWN'); # Mouse button pressed
+is(SDL_MOUSEBUTTONUP, 6, 'Constant SDL_MOUSEBUTTONUP'); # Mouse button released
+is(SDL_JOYAXISMOTION, 7, 'Constant SDL_JOYAXISMOTION'); # Joystick axis motion
+is(SDL_JOYBALLMOTION, 8, 'Constant SDL_JOYBALLMOTION'); # Joystick trackball motion
+is(SDL_JOYHATMOTION, 9, 'Constant SDL_JOYHATMOTION'); # Joystick hat position change
+is(SDL_JOYBUTTONDOWN, 10, 'Constant SDL_JOYBUTTONDOWN'); # Joystick button pressed
+is(SDL_JOYBUTTONUP, 11, 'Constant SDL_JOYBUTTONUP'); # Joystick button released
+is(SDL_QUIT, 12, 'Constant SDL_QUIT'); # User-requested quit
+is(SDL_SYSWMEVENT, 13, 'Constant SDL_SYSWMEVENT'); # System specific event
+is(SDL_EVENT_RESERVEDA, 14, 'Constant SDL_EVENT_RESERVEDA'); # Reserved for future use..
+is(SDL_EVENT_RESERVEDB, 15, 'Constant SDL_EVENT_RESERVEDB'); # Reserved for future use..
+is(SDL_VIDEORESIZE, 16, 'Constant SDL_VIDEORESIZE'); # User resized video mode
+is(SDL_VIDEOEXPOSE, 17, 'Constant SDL_VIDEOEXPOSE'); # Screen needs to be redrawn
+is(SDL_EVENT_RESERVED2, 18, 'Constant SDL_EVENT_RESERVED2'); # Reserved for future use..
+is(SDL_EVENT_RESERVED3, 19, 'Constant SDL_EVENT_RESERVED3'); # Reserved for future use..
+is(SDL_EVENT_RESERVED4, 20, 'Constant SDL_EVENT_RESERVED4'); # Reserved for future use..
+is(SDL_EVENT_RESERVED5, 21, 'Constant SDL_EVENT_RESERVED5'); # Reserved for future use..
+is(SDL_EVENT_RESERVED6, 22, 'Constant SDL_EVENT_RESERVED6'); # Reserved for future use..
+is(SDL_EVENT_RESERVED7, 23, 'Constant SDL_EVENT_RESERVED7'); # Reserved for future use..
+is(SDL_USEREVENT, 24, 'Constant SDL_USEREVENT');
+is(SDL_NUMEVENTS, 32, 'Constant SDL_NUMEVENTS');
+
+# checking eventmasks
+is(SDL_ACTIVEEVENTMASK, SDL_EVENTMASK(SDL_ACTIVEEVENT), 'Constant SDL_ACTIVEVENTMASK');
+
+#is($event->type, SDL_EVENT, '[SDL::Event->type] returns correctly');
+is($aevent->type, SDL_ACTIVEEVENT, '[SDL::ActiveEvent->type] returns correctly');
+is($weevent->type, SDL_VIDEOEXPOSE, '[SDL::ExposeEvent->type] returns correctly');
+is($jaevent->type, SDL_JOYAXISMOTION, '[SDL::JoyAxisEvent->type] returns correctly');
+is($jtevent->type, SDL_JOYBALLMOTION, '[SDL::JoyBallEvent->type] returns correctly');
+is((($jbevent->type == SDL_JOYBUTTONDOWN) || ($jbevent->type == SDL_JOYBUTTONUP)), 1, '[SDL::JoyButtonEvent->type] returns correctly');
+is($jhevent->type, SDL_JOYHATMOTION, '[SDL::JoyHatEvent->type] returns correctly');
+is((($kbevent->type == SDL_KEYUP) || ($kbevent->type == SDL_KEYDOWN)), 1, '[SDL::KeyboardEvent->type] returns correctly');
+is((($mbevent->type == SDL_MOUSEBUTTONDOWN) || ($mbevent->type == SDL_MOUSEBUTTONUP)), 1, '[SDL::MouseButtonEvent->type] returns correctly');
+is($mmevent->type, SDL_MOUSEMOTION, '[SDL::MouseMotionEvent->type] returns correctly');
+is($qevent->type, SDL_QUIT, '[SDL::QuitEvent->type] returns correctly');
+is($wrevent->type, SDL_VIDEORESIZE, '[SDL::ResizeEvent->type] returns correctly');
+is($wmevent->type, SDL_SYSWMEVENT, '[SDL::SysWMEvent->type] returns correctly');
+is($uevent->type, SDL_USEREVENT, '[SDL::UserEvent->type] returns correctly');
$uevent->code(200);
is( $uevent->code, 200, '[SDL::UserEvent->code] is set correctly');