I'm not completely sure, but you could look at the Perl-Gtk module from CPAN.
Jouke Visser, Perl 'Adept'
| [reply] |
this is correct. the Gtk-Perl package contains a Gnome
subpackage that allows access to GNOME-specific stuff like
Gnome::Canvas and the panel. in order to get panel support
in Gtk-Perl, you must build your Gnome module with panel
bindings by passing --with-panel to Makefile.PL
for the Gnome subpackage.
i'm not aware of any tutorials or sample code for writing
stuff for the panel in Perl, but i am recompiling my Gnome
module with --with-panel as i write this and
may have some sample code myself later in the day.
instructions:
- download Gtk-Perl
- perl Makefile.PL, make, and
make install for the main module
- perl Makefile.PL, make, and
make install for the GdkImlib sub-module
(i had to create a symlink GdkImlib/xs/GdkImlibImage.h
pointing to ../GdkImlibImage.h for this to work)
- perl Makefile.PL --with-panel, make,
and make install for the Gnome sub-module
- make test for main module
for me, all the Gnome stuff works fine, except for the panel
applet, which, not unexpectedly, segfaults and crashes my
panel (along with the less robust applets like the
tasklist). 8^(
perhaps i'll try to figure this out later, but i tend not
to do much with the Panel anyways.
update: trying the procedure above on
another machine, i was able to successfully build the Gnome
module and use the sample applet (Gnome/samples/applet.pl).
the code is included in the Gtk-Perl distribution, so i see
no need for me to post it here.
| [reply] [d/l] [select] |
Yeah, whenever I run applet.pl, it segfaults and crashes my panel also :-(
I'm definitely beginning to contemplate the idea of buying a book, though no doubt most/all of the books in existence on this topic will be hideously out of date :-{
| [reply] |
Jouke's got it with the module.
Glade seems to be a sort of "Visual Basic" type application for GTK+ with the ability to create code for/in a few different languages. (Perl is one of them.) I've tinkered with it, but haven't gotten the perl output to work yet. | [reply] |
That's right. Glade allows you to design the interface, and define the actions that correspond to certain events. This will result in an XML-file, which in turn can be used from within Perl-Gtk, so you can create Perl-methods with the names of the actions defined in Glade.
I saw an excellent presentation of this by Paolo Molaro (the author of this package) at YAPC::Europe in London
Jouke Visser, Perl 'Adept'
| [reply] |
Once you have installed Gtk-Perl, you may find CORBA::ORBit useful and interesting.
Also there's a gnome tictactoe game included. | [reply] |