1Gtk2(3)               User Contributed Perl Documentation              Gtk2(3)
2
3
4

NAME

6       Gtk2 - Perl interface to the 2.x series of the Gimp Toolkit library
7

SYNOPSIS

9         use Gtk2 -init;
10         # Gtk2->init; works if you didn't use -init on use
11         my $window = Gtk2::Window->new ('toplevel');
12         my $button = Gtk2::Button->new ('Quit');
13         $button->signal_connect (clicked => sub { Gtk2->main_quit });
14         $window->add ($button);
15         $window->show_all;
16         Gtk2->main;
17

ABSTRACT

19       Perl bindings to the 2.x series of the Gtk+ widget set.  This module
20       allows you to write graphical user interfaces in a Perlish and object-
21       oriented way, freeing you from the casting and memory management in C,
22       yet remaining very close in spirit to original API.
23

DESCRIPTION

25       The Gtk2 module allows a Perl developer to use the Gtk+ graphical user
26       interface library.  Find out more about Gtk+ at http://www.gtk.org.
27
28       The GTK+ Reference Manual is also a handy companion when writing Gtk
29       programs in any language.  http://developer.gnome.org/doc/API/2.0/gtk/
30       The Perl bindings follow the C API very closely, and the C reference
31       documentation should be considered the canonical source.
32
33       To discuss gtk2-perl, ask questions and flame/praise the authors, join
34       gtk-perl-list@gnome.org at lists.gnome.org.
35
36       Also have a look at the gtk2-perl website and sourceforge project page,
37       http://gtk2-perl.sourceforge.net
38

INITIALIZATION

40         use Gtk2 qw/-init/;
41         use Gtk2 qw/-init -threads-init/;
42
43       -init
44           Equivalent to Gtk2->init, called to initialize GLIB and GTK+. Just
45           about every Gtk2-Perl script should do "use Gtk2 -init"; This
46           initialization should take place before using any other Gtk2
47           functions in your GUI applications. It will initialize everything
48           needed to operate the toolkit and parses some standard command line
49           options. @ARGV is adjusted accordingly so your own code will never
50           see those standard arguments.
51
52       -threads-init
53           Equivalent to Gtk2::Gdk::Threads->init, called to initialze/enable
54           gdk's thread safety mechanisms so that gdk can be accessed from
55           multiple threads when used in conjunction with
56           Gtk2::Gdk::Threads->enter and Gtk2::Gdk::Threads->leave. If invoked
57           as Gtk2::Gdk::Threads->init it should be done before Gtk2->init is
58           called, if done by "use Gtk2 -init -threads-init" order does not
59           matter.
60

EXPORTS

62       Gtk2 exports nothing by default, but some constants are available upon
63       request.
64
65       Tag: constants
66             GTK_PRIORITY_RESIZE
67             GDK_PRIORITY_EVENTS
68             GDK_PRIORITY_REDRAW
69             GDK_CURRENT_TIME
70
71       See Glib for other standard priority levels.
72

SEE ALSO

74       perl(1), Glib(3pm).
75
76       Gtk2::Gdk::Keysyms(3pm) contains a hash of key codes, culled from
77       gdk/gdkkeysyms.h
78
79       Gtk2::api(3pm) describes how to map the C API into Perl, and some of
80       the important differences in the Perl bindings.
81
82       Gtk2::Helper(3pm) contains stuff that makes writing Gtk2 programs a
83       little easier.
84
85       Gtk2::SimpleList(3pm) makes the GtkListStore and GtkTreeModel a lot
86       easier to use.
87
88       Gtk2::Pango(3pm) exports various little-used but important constants
89       you may need to work with pango directly.
90
91       Gtk2::index(3pm) lists the autogenerated api documentation pod files
92       for Gtk2.
93
94       Gtk2 also provides code to make it relatively painless to create Perl
95       wrappers for other GLib/Gtk-based libraries.  See Gtk2::CodeGen,
96       ExtUtils::PkgConfig, and ExtUtils::Depends.  If you're writing
97       bindings, you'll probably also be interested in Gtk2::devel, which is a
98       supplement to Glib::devel and Glib::xsapi.  The Binding Howto, at
99       http://gtk2-perl.sourceforge.net/doc/binding_howto.pod.html, ties it
100       all together.
101

AUTHORS

103       The gtk2-perl team:
104
105        muppet <scott at asofyet dot org>
106        Ross McFarland <rwmcfa1 at neces dot com>
107        Torsten Schoenfeld <kaffeetisch at web dot de>
108        Marc Lehmann <pcg at goof dot com>
109        GA~Xran Thyni <gthyni at kirra dot net>
110        JA~Xrn Reder <joern at zyn dot de>
111        Chas Owens <alas at wilma dot widomaker dot com>
112        Guillaume Cottenceau <gc at mandrakesoft dot com>
113
115       Copyright 2003-2008 by the gtk2-perl team.
116
117       This library is free software; you can redistribute it and/or modify it
118       under the terms of the GNU Library General Public License as published
119       by the Free Software Foundation; either version 2 of the License, or
120       (at your option) any later version.
121
122       This library is distributed in the hope that it will be useful, but
123       WITHOUT ANY WARRANTY; without even the implied warranty of
124       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
125       Library General Public License for more details.
126
127       You should have received a copy of the GNU Library General Public
128       License along with this library; if not, write to the Free Software
129       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307
130       USA.
131
132
133
134perl v5.12.0                      2009-02-13                           Gtk2(3)
Impressum