| 1 | package Term::Caca::Event::Mouse::Motion; | ||
| 2 | our $AUTHORITY = 'cpan:YANICK'; | ||
| 3 | # ABSTRACT: event triggered by mouse movements. | ||
| 4 | $Term::Caca::Event::Mouse::Motion::VERSION = '3.1.0'; | ||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | extends 'Term::Caca::Event'; | ||
| 7 | |||
| 8 | 0 | ▶ | use Term::Caca; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 9 | |||
| 10 | has x => | ||
| 11 | is => 'ro', | ||
| 12 | lazy => 1, | ||
| 13 | default => sub { Term::Caca::caca_get_event_mouse_x( $_[0]->event ) }; | ||
| 14 | |||
| 15 | has y => | ||
| 16 | is => 'ro', | ||
| 17 | lazy => 1, | ||
| 18 | default => sub { Term::Caca::caca_get_event_mouse_y( $_[0]->event ) }; | ||
| 19 | |||
| 20 | has pos => | ||
| 21 | is => 'ro', | ||
| 22 | lazy => 1, | ||
| 23 | default => sub { [ $_[0]->x, $_[0]->y ] }; | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | __END__ | ||