ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Mozilla-Plugin/Plugin/Gtk.pm
Revision: 1.2
Committed: Sun Feb 25 12:04:43 2001 UTC (25 years, 9 months ago) by root
Branch: MAIN
Changes since 1.1: +3 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 =head1 NAME
2    
3     Mozilla::Plugin - embed perl into mozilla/netscape.
4    
5     =head1 SYNOPSIS
6    
7     <embed type="application/x-mperl-tk" />
8    
9     =head1 DESCRIPTION
10    
11     sorry...
12    
13     =over 4
14    
15     =cut
16    
17     package Mozilla::Plugin::Gtk;
18    
19     use base Mozilla::Plugin;
20    
21     use Gtk;
22    
23     $VERSION = 0.01;
24    
25 root 1.2 sub mainloop {
26     # die # is it REALLY possible that someone forgot to port Glib???
27     }
28 root 1.1
29     sub new {
30     my $class = shift;
31     my $self = $class->SUPER::new(@_);
32    
33     $self;
34     }
35    
36     sub window_new {
37     my $self = shift;
38     $self->SUPER::window_new(@_);
39    
40     init Gtk;
41     use Gtk;
42    
43     my $w = $self->{win} = new Gtk::Plug $_[0];
44     $w->add(my $v = new Gtk::VBox 5,5);
45     $v->add(Gtk::Button->new("Hulla"));
46     $w->show_all;
47     }
48    
49     sub window_delete {
50     my $self = shift;
51     $self->SUPER::window_delete(@_);
52    
53     delete $self->{win};
54     }
55    
56     sub DESTROY {
57     warn "DESTROY";
58     }
59    
60     1;
61    
62     =back
63    
64     =head1 BUGS
65    
66     =head1 SEE ALSO
67    
68     L<PApp>.
69    
70     =head1 AUTHOR
71    
72     Marc Lehmann <pcg@goof.com>
73     http://www.goof.com/pcg/marc/
74    
75     =cut
76