ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MPV/MPV.pm
(Generate patch)

Comparing AnyEvent-MPV/MPV.pm (file contents):
Revision 1.17 by root, Wed Mar 22 19:36:59 2023 UTC vs.
Revision 1.18 by root, Thu Mar 23 19:22:48 2023 UTC

221use Scalar::Util (); 221use Scalar::Util ();
222 222
223use AnyEvent (); 223use AnyEvent ();
224use AnyEvent::Util (); 224use AnyEvent::Util ();
225 225
226our $VERSION = '1.0'; 226our $VERSION = '1.01';
227 227
228sub OBSID() { 0x10000000000000 } # 2**52 228sub OBSID() { 0x10000000000000 } # 2**52
229 229
230our $JSON = eval { require JSON::XS; JSON::XS:: } 230our $JSON = eval { require JSON::XS; JSON::XS:: }
231 || do { require JSON::PP; JSON::PP:: }; 231 || do { require JSON::PP; JSON::PP:: };
567For subclassing, see I<SUBCLASSING>, below. 567For subclassing, see I<SUBCLASSING>, below.
568 568
569=cut 569=cut
570 570
571sub on_event { 571sub on_event {
572 my ($self, $key) = @_; 572 my ($self, $event, $data) = @_;
573 573
574 $self->{on_event}($self, $key) if $self->{on_event}; 574 $self->{on_event}($self, $event, $data) if $self->{on_event};
575} 575}
576 576
577=item $mpv->on_key ($string) 577=item $mpv->on_key ($string)
578 578
579Invoked when a key declared by C<< ->bind_key >> is pressed. The default 579Invoked when a key declared by C<< ->bind_key >> is pressed. The default

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines