Mercurial > pidgin
annotate plugins/perl/scripts/gtk_frame_test.pl @ 13253:87a7c3077c19
[gaim-migrate @ 15619]
More cleaning up of oscar. Renamed some functions to be more clear.
Got rid of some stuff that wasn't used. Inlined some small things
in conn.c that were only used once.
The goals of all this are
1. Non-blocking I/O for all connections
2. p2p stuff won't use the same struct as oscar connections, because
that's stupid
3. The oscar PRPL should be less scary
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sun, 12 Feb 2006 21:27:04 +0000 |
| parents | 4d9686e7c234 |
| children |
| rev | line source |
|---|---|
| 11170 | 1 $MODULE_NAME = "GTK Frame Test"; |
| 2 | |
| 3 use Gaim; | |
| 4 | |
| 5 %PLUGIN_INFO = ( | |
| 6 perl_api_version => 2, | |
| 7 name => " Perl: $MODULE_NAME", | |
| 8 version => "0.1", | |
| 9 summary => "Test plugin for the Perl interpreter.", | |
| 10 description => "Implements a set of test proccedures to ensure all functions that work in the C API still work in the Perl plugin interface. As XSUBs are added, this *should* be updated to test the changes. Furthermore, this will function as the tutorial perl plugin.", | |
|
11457
4d9686e7c234
[gaim-migrate @ 13696]
Richard Laager <rlaager@wiktel.com>
parents:
11170
diff
changeset
|
11 author => "John H. Kelm <johnhkelm\@gmail.com>", |
| 11170 | 12 url => "http://gaim.sourceforge.net/", |
| 13 | |
| 14 GTK_UI => TRUE, | |
| 15 gtk_prefs_info => "foo", | |
| 16 load => "plugin_load", | |
| 17 unload => "plugin_unload", | |
| 18 ); | |
| 19 | |
| 20 | |
| 21 sub plugin_init { | |
| 22 return %PLUGIN_INFO; | |
| 23 } | |
| 24 | |
| 25 sub button_cb { | |
| 26 my $widget = shift; | |
| 27 my $data = shift; | |
| 28 print "Clicked button with message: " . $data . "\n"; | |
| 29 } | |
| 30 | |
| 31 sub foo { | |
| 32 eval ' | |
| 33 use Glib; | |
| 34 use Gtk2 \'-init\'; | |
| 35 | |
| 36 $frame = Gtk2::Frame->new(\'Gtk Test Frame\'); | |
| 37 $button = Gtk2::Button->new(\'Print Message\'); | |
| 38 | |
| 39 $frame->set_border_width(10); | |
| 40 $button->set_border_width(150); | |
| 41 $button->signal_connect("clicked" => \&button_cb, "Message Text"); | |
| 42 $frame->add($button); | |
| 43 | |
| 44 $button->show(); | |
| 45 $frame->show(); | |
| 46 '; | |
| 47 return $frame; | |
| 48 } | |
| 49 | |
| 50 sub plugin_load { | |
| 51 my $plugin = shift; | |
| 52 print "#" x 80 . "\n"; | |
| 53 | |
| 54 | |
| 55 ######### TEST CODE HERE ########## | |
| 56 | |
| 57 print "$MODULE_NAME: Loading...\n"; | |
| 58 | |
| 59 | |
| 60 Gaim::debug_info("plugin_load()", "Testing $MODULE_NAME Completed."); | |
| 61 print "#" x 80 . "\n\n"; | |
| 62 } | |
| 63 | |
| 64 sub plugin_unload { | |
| 65 | |
| 66 } |
