| 1 |
root |
1.1 |
package Gtk2::CV; |
| 2 |
|
|
|
| 3 |
|
|
use XSLoader; |
| 4 |
|
|
|
| 5 |
root |
1.15 |
$VERSION = '0.5'; |
| 6 |
root |
1.3 |
|
| 7 |
|
|
XSLoader::load "Gtk2::CV", $VERSION; |
| 8 |
root |
1.1 |
|
| 9 |
root |
1.2 |
use Gtk2; |
| 10 |
root |
1.13 |
use Glib; |
| 11 |
|
|
|
| 12 |
root |
1.14 |
use IO::AIO; |
| 13 |
|
|
|
| 14 |
|
|
add_watch Glib::IO IO::AIO::poll_fileno, |
| 15 |
root |
1.16 |
in => sub { IO::AIO::poll_cb; 1 }; |
| 16 |
root |
1.14 |
IO::AIO::max_outstanding 128; |
| 17 |
root |
1.2 |
|
| 18 |
root |
1.9 |
sub find_rcfile($) { |
| 19 |
root |
1.2 |
my $path; |
| 20 |
|
|
|
| 21 |
|
|
for (@INC) { |
| 22 |
root |
1.4 |
$path = "$_/Gtk2/CV/$_[0]"; |
| 23 |
|
|
return $path if -r $path; |
| 24 |
root |
1.2 |
} |
| 25 |
|
|
|
| 26 |
root |
1.4 |
die "FATAL: can't find required file $_[0]\n"; |
| 27 |
|
|
} |
| 28 |
|
|
|
| 29 |
root |
1.9 |
sub require_image($) { |
| 30 |
root |
1.4 |
new_from_file Gtk2::Gdk::Pixbuf find_rcfile "images/$_[0]"; |
| 31 |
root |
1.2 |
} |
| 32 |
|
|
|
| 33 |
root |
1.1 |
1; |
| 34 |
|
|
|