NAME
   Curses::UI::Mousehandler::GPM - Curses::UI GPM Bindings

SYNOPSIS
     use Curses::UI::Mousehandler::GPM;

     if (gpm_enable) {
       print "Succesfully enabled GPM mouse events\n";
     } else {
       print "Couldn't enable GPM mouse events\n";
     }

     while (1) {
       my $MEVENT = gpm_get_mouse_event();
       if ($MEVENT) {
           my ($id, $x, $y, $z, $bstate) = unpack("sx2i3l", $MEVENT);
           my %MEVENT = (
                         -id     => $id,
                         -x      => $x,
                         -y      => $y,
                         -bstate => $bstate
                         );
           print "Got mouse event at $x,$y\n";
       }
     }

REQUIREMENTS
   You will need curses.h (from a curses-devel package) and gpm.h (from a
   gpm-devel or libgpm-devel package) in order to compile. Libgpm is needed
   to bind against it. A running GPM is not really needed but might be
   usefull :-).

DESCRIPTION
   Curses::UI::Mousehandler::GPM is a module to allow GPM style mouse
   events in Curses::UI.

EXPORT
   gpm_enable
       Tries to connect to GPM. Returns a true value on success, false
       otherwise.

   gpm_get_mouse_event
       Selects for a mouse event in the GPM queue and returns it in an
       ncurses compatible MEVENT struct. If no mouse event is found undef
       will be returned. The call is non blocking.

SEE ALSO
   ncurses(3NCURSES) gpm(8)

AUTHOR
   Marcus Thiesen, <[email protected]<gt>

COPYRIGHT AND LICENSE
   Copyright (C) 2004 by Marcus Thiesen

   This library is free software; you can redistribute it and/or modify it
   under the same terms as Perl itself, either Perl version 5.8.3 or, at
   your option, any later version of Perl 5 you may have available.