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

NAME

6       Gtk2::main
7

METHODS

9       boolean = Gtk2->alternative_dialog_button_order ($screen=undef)
10
11           * $screen (Gtk2::Gdk::Screen or undef)
12
13       event or undef = Gtk2->get_current_event
14
15       modifiertype = Gtk2->get_current_event_state
16
17       unsigned = Gtk2->get_current_event_time
18
19       language = Gtk2->get_default_language
20
21       Gtk2->disable_setlocale
22
23       widget or undef = Gtk2->get_event_widget ($event)
24
25           * $event (Gtk2::Gdk::Event or undef)
26
27       integer = Gtk2->events_pending
28
29       Gtk2->grab_add ($widget)
30
31           * $widget (Gtk2::Widget)
32
33       widget or undef = Gtk2->grab_get_current
34
35       Gtk2->grab_remove ($widget)
36
37           * $widget (Gtk2::Widget)
38
39       boolean = Gtk2->init
40
41           Initialize Gtk+.  This must be called before any other Gtk2 func‐
42           tions in a GUI application; the Gtk2 module's import method allows
43           you to pass "-init" in the "use" statement to do this automati‐
44           cally.  This function also scans @ARGV for any options it knows,
45           and will remove them automagically.
46
47           Note: this function will terminate your program if it is unable to
48           initialize the gui for any reason.  If you want your program to
49           fall back to some other interface, you want to use
50           "Gtk2->init_check" instead.
51
52       Gtk2->init_add ($function, $data=undef)
53
54           * $function (scalar)
55           * $data (scalar)
56
57       boolean = Gtk2->init_check
58
59           This is the non-fatal version of "Gtk2->init"; instead of calling
60           "exit" if Gtk+ initialization fails, "Gtk2->init_check" returns
61           false.  This allows your application to fall back on some other
62           means of communication with the user - for example a curses or com‐
63           mand-line interface.
64
65       integer = Gtk2->key_snooper_install ($snooper, $func_data=undef)
66
67           * $snooper (subroutine) function to call on every event, must
68           return a boolean
69           * $func_data (scalar)
70
71           Install a key "snooper" function, which will get called on all key
72           events before those events are delivered normally.  These snoopers
73           can be used to implement custom key event handling.  snooper will
74           receive the widget to which the event will be delivered and the
75           event, and also func_data (if provided).  If snooper returns true,
76           the event propagation will stop (just like normal event handlers).
77
78           "key_snooper_install" returns an id that may be used with
79           "key_snooper_remove".
80
81       Gtk2->key_snooper_remove ($snooper_handler_id)
82
83           * $snooper_handler_id (integer)
84
85       string = Gtk2->set_locale
86
87       Gtk2->main
88
89       Gtk2->main_do_event ($event)
90
91           * $event (Gtk2::Gdk::Event)
92
93           This is the event handler that GTK+ registers with GDK.  GTK+
94           exposes it to allow filtering of events between GDK and GTK+; it is
95           rare that you would need this, except if you are using
96           "Gtk2::Gdk::Event::handler_set".
97
98       boolean = Gtk2->main_iteration
99
100       boolean = Gtk2->main_iteration_do ($blocking)
101
102           * $blocking (boolean)
103
104       integer = Gtk2->main_level
105
106       Gtk2->main_quit
107
108       boolean = Gtk2->parse_args
109
110       integer = Gtk2->quit_add ($main_level, $function, $data=undef)
111
112           * $main_level (integer)
113           * $function (scalar)
114           * $data (scalar)
115
116       Gtk2->quit_add_destroy ($main_level, $object)
117
118           * $main_level (integer)
119           * $object (Gtk2::Object)
120
121       Gtk2->quit_remove ($quit_handler_id)
122
123           * $quit_handler_id (integer)
124

ENUMS AND FLAGS

126       flags Gtk2::Gdk::ModifierType
127
128       * 'shift-mask' / 'GDK_SHIFT_MASK'
129       * 'lock-mask' / 'GDK_LOCK_MASK'
130       * 'control-mask' / 'GDK_CONTROL_MASK'
131       * 'mod1-mask' / 'GDK_MOD1_MASK'
132       * 'mod2-mask' / 'GDK_MOD2_MASK'
133       * 'mod3-mask' / 'GDK_MOD3_MASK'
134       * 'mod4-mask' / 'GDK_MOD4_MASK'
135       * 'mod5-mask' / 'GDK_MOD5_MASK'
136       * 'button1-mask' / 'GDK_BUTTON1_MASK'
137       * 'button2-mask' / 'GDK_BUTTON2_MASK'
138       * 'button3-mask' / 'GDK_BUTTON3_MASK'
139       * 'button4-mask' / 'GDK_BUTTON4_MASK'
140       * 'button5-mask' / 'GDK_BUTTON5_MASK'
141       * 'super-mask' / 'GDK_SUPER_MASK'
142       * 'hyper-mask' / 'GDK_HYPER_MASK'
143       * 'meta-mask' / 'GDK_META_MASK'
144       * 'release-mask' / 'GDK_RELEASE_MASK'
145       * 'modifier-mask' / 'GDK_MODIFIER_MASK'
146

SEE ALSO

148       Gtk2
149
151       Copyright (C) 2003-2007 by the gtk2-perl team.
152
153       This software is licensed under the LGPL.  See Gtk2 for a full notice.
154
155
156
157perl v5.8.8                       2007-03-18                     Gtk2::main(3)
Impressum