X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0019.html-inc;h=3bbdb8b340f811f3a177571aec77db7421544f26;hb=e785862422f3e827a242fc244bd57b23443887ce;hp=e65be37dd7211e92b433042690e9c72fb1ba4899;hpb=ca0a3441dd72000cbbbb4be484b18d0d305fdb29;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0019.html-inc b/pages/blog-0019.html-inc index e65be37..3bbdb8b 100644 --- a/pages/blog-0019.html-inc +++ b/pages/blog-0019.html-inc @@ -1,36 +1,15 @@
#!/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); -}-
If you cannot wait then grab SDL 2.4 and Alien::SDL 1.2 (pick PANGO support) from CPAN and grab the toolchain branch from the repo. Disclaimer the branch will be volatile for a bit.