UAV::Pilot::SDL::Events
my $condvar = AnyEvent->condvar; my $sdl_events = UAV::Pilot::SDL::Events->new({ condvar => $condvar, }); $sdl_events->register( ... ); $sdl_events->init_event_loop; $condvar->recv;
Handles the SDL event loop in terms of AnyEvent. In particular, it automatically handles SDL_QUIT events, which you'll need if you open any SDL windows (which UAV::Pilot::Control::ARDrone::SDLNavOutput does, for instance). Without that processing, you would need to manually stop the process with kill -9 or some such.
AnyEvent
SDL_QUIT
UAV::Pilot::Control::ARDrone::SDLNavOutput
kill -9
new({ condvar => $cv, })
Constructor. The condvar argument is an AnyEvent::Condvar.
condvar
AnyEvent::Condvar
register( $event_handler )
Adds a object that does the UAV::Pilot::SDL::EventHandler role to the list. The process_events method on that object will be called each time the event loop runs.
UAV::Pilot::SDL::EventHandler
process_events
Sets up the event loop. Note that you must still call recv on the AnyEvent::Condvar to start the loop running.
recv
To install UAV::Pilot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UAV::Pilot
CPAN shell
perl -MCPAN -e shell install UAV::Pilot
For more information on module installation, please visit the detailed CPAN module installation guide.