use SDL;
use SDL::Event;
#use SDL::Surface;
-#use SDL::Video;
+use SDL::Video;
use Test::More;
-plan ( tests => 14 );
+plan ( tests => 5);
my @done =qw/
pump_events
-peep_events
-poll_event
-push_event
-wait_event
/;
can_ok ('SDL::Events', @done);
SDL::init(SDL_INIT_VIDEO);
-
+
+SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE);
+
is(SDL::Events::pump_events(), undef, '[pump_events] Returns undef');
+=pod
+
my $events = SDL::Event->new();
my $num_peep_events = SDL::Events::peep_events( $events, 127, SDL_PEEKEVENT, SDL_ALLEVENTS);
is($num_peep_events >= 0, 1, '[peep_events] Size of event queue is ' . $num_peep_events);
my $value = SDL::Events::poll_event($event);
is(($value == 1) || ($value == 0), 1, '[poll_event] Returns 1 or 0');
+
my $event2 = SDL::Event->new();
is(SDL::Events::push_event($event2), 0, '[push_event] Returns 0 on success');
my $event3 = SDL::Event->new();
is(SDL::Events::push_event($event3), 0, '[push_event] Returns 0 on success');
+
my $events2 = SDL::Event->new();
my $num_peep_events2 = SDL::Events::peep_events( $events2, 127, SDL_PEEKEVENT, SDL_ALLEVENTS);
-is($num_peep_events2 > $num_peep_events, 1, '[peep_events] Size of event queue is ' . $num_peep_events2);
+is($num_peep_events2 > $num_peep_events, 1, '[peep_events] Size of event queue is ' . $num_peep_events2."\t". SDL::get_error());
+
+
my $events3 = SDL::Event->new();
$num_peep_events = SDL::Events::peep_events( $events3, 1, SDL_ADDEVENT, SDL_ALLEVENTS);
$num_peep_events = SDL::Events::peep_events( $events4, 1, SDL_GETEVENT, SDL_ALLEVENTS);
is($num_peep_events, 1, '[peep_events] Got 1 event from the front of the queue');
+
+
my $event4 = SDL::Event->new();
is(SDL::Events::wait_event($event4), 1, '[wait_event] Returns 1 on success');
is(SDL::Events::wait_event(), 1, '[wait_event] Returns 1 on success');
+=cut
+
+
my @left = qw/
+peep_events
+poll_event
+push_event
+wait_event
seteventfilter
eventstate
getkeystate
Sint32 T_IV
Sint32 * T_PTR
SDL_Event * T_PTR
+SDL_ActiveEvent O_OBJECT
+SDL_KeyboardEvent O_OBJECT
+SDL_TextInputEvent O_OBJECT
+SDL_MouseMotionEvent O_OBJECT
+SDL_MouseButtonEvent O_OBJECT
+SDL_JoyAxisEvent O_OBJECT
+SDL_JoyHatEvent O_OBJECT
+SDL_JoyBallEvent O_OBJECT
+SDL_ResizeEvent O_OBJECT
+SDL_ExposeEvent O_OBJECT
+SDL_SysWMEvent O_OBJECT
+SDL_UserEvent O_OBJECT
+SDL_QuitEvent O_OBJECT
+SDLKey O_OBJECT
+SDLMod O_OBJECT
SDL_Surface * O_OBJECT
SDL_SysWMmsg * T_PTR
SDL_CD * T_PTR