Created
November 16, 2011 20:05
-
-
Save run4flat/1371188 to your computer and use it in GitHub Desktop.
Basic Callbacks with Prima
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Prima qw(Application); | |
my $wDisplay = Prima::MainWindow-> create( | |
text => 'Mouse Test', | |
onMouseDown => sub { | |
print "onMouseDown got args [", join('], [', @_), "]\n"; | |
}, | |
onMouseMove => sub { | |
print "onMouseMove got args [", join('], [', @_), "]\n"; | |
}, | |
onMouseUp => sub { | |
print "onMouseUp got args [", join('], [', @_), "]\n"; | |
}, | |
onMouseWheel => sub { | |
print "onMouseWheel got args [", join('], [', @_), "]\n"; | |
}, | |
); | |
run Prima; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment