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

ENUMS AND FLAGS

118   flags Gtk2::Gdk::ModifierType
119       ·   'shift-mask' / 'GDK_SHIFT_MASK'
120
121       ·   'lock-mask' / 'GDK_LOCK_MASK'
122
123       ·   'control-mask' / 'GDK_CONTROL_MASK'
124
125       ·   'mod1-mask' / 'GDK_MOD1_MASK'
126
127       ·   'mod2-mask' / 'GDK_MOD2_MASK'
128
129       ·   'mod3-mask' / 'GDK_MOD3_MASK'
130
131       ·   'mod4-mask' / 'GDK_MOD4_MASK'
132
133       ·   'mod5-mask' / 'GDK_MOD5_MASK'
134
135       ·   'button1-mask' / 'GDK_BUTTON1_MASK'
136
137       ·   'button2-mask' / 'GDK_BUTTON2_MASK'
138
139       ·   'button3-mask' / 'GDK_BUTTON3_MASK'
140
141       ·   'button4-mask' / 'GDK_BUTTON4_MASK'
142
143       ·   'button5-mask' / 'GDK_BUTTON5_MASK'
144
145       ·   'super-mask' / 'GDK_SUPER_MASK'
146
147       ·   'hyper-mask' / 'GDK_HYPER_MASK'
148
149       ·   'meta-mask' / 'GDK_META_MASK'
150
151       ·   'release-mask' / 'GDK_RELEASE_MASK'
152
153       ·   'modifier-mask' / 'GDK_MODIFIER_MASK'
154

SEE ALSO

156       Gtk2
157
159       Copyright (C) 2003-2008 by the gtk2-perl team.
160
161       This software is licensed under the LGPL.  See Gtk2 for a full notice.
162
163
164
165perl v5.12.0                      2010-05-02                     Gtk2::main(3)
Impressum