X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0010.html-inc;h=b1abc1d15ace99fb968ddcc0866bb1101ddb8cbf;hb=6855e5615bff699e656bdd67be71ac965fc77f54;hp=e65be37dd7211e92b433042690e9c72fb1ba4899;hpb=f060e594ff77e262c6f1e29a23acb092a1bb7ae2;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0010.html-inc b/pages/blog-0010.html-inc index e65be37..b1abc1d 100644 --- a/pages/blog-0010.html-inc +++ b/pages/blog-0010.html-inc @@ -1,36 +1,23 @@
#!/usr/bin/env perl - -use SDL; -use SDL::Events; -use SDL::Event; -use SDL::Video; - -SDL::init(SDL_INIT_VIDEO); - -my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE ); -my $event = SDL::Event->new(); - -while(1) -{ - SDL::Events::pump_events(); - - if(SDL::Events::poll_event($event) && $event->type == SDL_ACTIVEEVENT) - { - print "Hello Mouse!!!\n" if ($event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) ); - print "Bye Mouse!!!\n" if (!$event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) ); - } - - exit if($event->type == SDL_QUIT); -}-