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 functions
32       in a GUI application; the Gtk2 module's import method allows you to
33       pass "-init" in the "use" statement to do this automatically.  This
34       function also scans @ARGV for any options it knows, and will remove
35       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 fall
39       back to some other interface, you want to use "Gtk2->init_check"
40       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 false.
50       This allows your application to fall back on some other means of
51       communication with the user - for example a curses or command-line
52       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 can
61       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+ exposes
82       it to allow filtering of events between GDK and GTK+; it is rare that
83       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   optiongroup = Gtk2->get_option_group ($open_default_display)
93       ·   $open_default_display (boolean)
94
95       Since: gtk+ 2.6
96
97   boolean = Gtk2->parse_args
98       Since: gtk+ 2.4
99
100   integer = Gtk2->quit_add ($main_level, $function, $data=undef)
101       ·   $main_level (integer)
102
103       ·   $function (scalar)
104
105       ·   $data (scalar)
106
107   Gtk2->quit_add_destroy ($main_level, $object)
108       ·   $main_level (integer)
109
110       ·   $object (Gtk2::Object)
111
112   Gtk2->quit_remove ($quit_handler_id)
113       ·   $quit_handler_id (integer)
114
115   Gtk2::show_uri ($screen, $uri, $timestamp=GDK_CURRENT_TIME)
116       ·   $screen (Gtk2::Gdk::Screen or undef)
117
118       ·   $uri (string)
119
120       ·   $timestamp (unsigned)
121

ENUMS AND FLAGS

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

SEE ALSO

161       Gtk2
162
164       Copyright (C) 2003-2011 by the gtk2-perl team.
165
166       This software is licensed under the LGPL.  See Gtk2 for a full notice.
167
168
169
170perl v5.28.0                      2018-07-18                     Gtk2::main(3)
Impressum