.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::main 3" .TH Gtk2::main 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Gtk2::main .SH METHODS .IX Header "METHODS" .SS "boolean = Gtk2\->\fBalternative_dialog_button_order\fP ($screen=undef)" .IX Subsection "boolean = Gtk2->alternative_dialog_button_order ($screen=undef)" .IP \(bu 4 \&\f(CW$screen\fR (Gtk2::Gdk::Screen or undef) .PP Since: gtk+ 2.6 .SS "event or undef = Gtk2\->\fBget_current_event\fP" .IX Subsection "event or undef = Gtk2->get_current_event" .SS "modifiertype = Gtk2\->\fBget_current_event_state\fP" .IX Subsection "modifiertype = Gtk2->get_current_event_state" .SS "unsigned = Gtk2\->\fBget_current_event_time\fP" .IX Subsection "unsigned = Gtk2->get_current_event_time" .SS "language = Gtk2\->\fBget_default_language\fP" .IX Subsection "language = Gtk2->get_default_language" .SS Gtk2\->\fBdisable_setlocale\fP .IX Subsection "Gtk2->disable_setlocale" .SS "widget or undef = Gtk2\->\fBget_event_widget\fP ($event)" .IX Subsection "widget or undef = Gtk2->get_event_widget ($event)" .IP \(bu 4 \&\f(CW$event\fR (Gtk2::Gdk::Event or undef) .SS "integer = Gtk2\->\fBevents_pending\fP" .IX Subsection "integer = Gtk2->events_pending" .SS "Gtk2\->\fBgrab_add\fP ($widget)" .IX Subsection "Gtk2->grab_add ($widget)" .IP \(bu 4 \&\f(CW$widget\fR (Gtk2::Widget) .SS "widget or undef = Gtk2\->\fBgrab_get_current\fP" .IX Subsection "widget or undef = Gtk2->grab_get_current" .SS "Gtk2\->\fBgrab_remove\fP ($widget)" .IX Subsection "Gtk2->grab_remove ($widget)" .IP \(bu 4 \&\f(CW$widget\fR (Gtk2::Widget) .SS "boolean = Gtk2\->\fBinit\fP" .IX Subsection "boolean = Gtk2->init" Initialize Gtk+. This must be called before any other Gtk2 functions in a GUI application; the Gtk2 module's import method allows you to pass \f(CW\*(C`\-init\*(C'\fR in the \f(CW\*(C`use\*(C'\fR statement to do this automatically. This function also scans \&\fR\f(CI@ARGV\fR\fI\fR for any options it knows, and will remove them automagically. .PP Note: this function will terminate your program if it is unable to initialize the gui for any reason. If you want your program to fall back to some other interface, you want to use \f(CW\*(C`Gtk2\->init_check\*(C'\fR instead. .ie n .SS "Gtk2\->\fBinit_add\fP ($function, $data=undef)" .el .SS "Gtk2\->\fBinit_add\fP ($function, \f(CW$data\fP=undef)" .IX Subsection "Gtk2->init_add ($function, $data=undef)" .IP \(bu 4 \&\f(CW$function\fR (scalar) .IP \(bu 4 \&\f(CW$data\fR (scalar) .SS "boolean = Gtk2\->\fBinit_check\fP" .IX Subsection "boolean = Gtk2->init_check" This is the non-fatal version of \f(CW\*(C`Gtk2\->init\*(C'\fR; instead of calling \f(CW\*(C`exit\*(C'\fR if Gtk+ initialization fails, \f(CW\*(C`Gtk2\->init_check\*(C'\fR returns false. This allows your application to fall back on some other means of communication with the user \- for example a curses or command-line interface. .ie n .SS "integer = Gtk2\->\fBkey_snooper_install\fP ($snooper, $func_data=undef)" .el .SS "integer = Gtk2\->\fBkey_snooper_install\fP ($snooper, \f(CW$func_data\fP=undef)" .IX Subsection "integer = Gtk2->key_snooper_install ($snooper, $func_data=undef)" .IP \(bu 4 \&\f(CW$snooper\fR (subroutine) function to call on every event .IP \(bu 4 \&\f(CW$func_data\fR (scalar) .PP Install a key "snooper" function which will get called on all key events before those events are delivered normally. These snoopers can be used to implement custom key event handling. .PP \&\f(CW\*(C`key_snooper_install\*(C'\fR returns an id that may be used with \&\f(CW\*(C`key_snooper_remove\*(C'\fR (below). \fIsnooper\fR is called as .PP .Vb 1 \& stopbool = &snooper ($widget, $event, $func_data); .Ve .PP It should return true to stop event propagation, the same as \&\f(CW\*(C`Gtk2::Widget\*(C'\fR event signal handlers. The \f(CW\*(C`Gtk2::EVENT_STOP\*(C'\fR and \&\f(CW\*(C`Gtk2::EVENT_PROPAGATE\*(C'\fR constants can be used for the return (see Gtk2::Widget). .SS "Gtk2\->\fBkey_snooper_remove\fP ($snooper_handler_id)" .IX Subsection "Gtk2->key_snooper_remove ($snooper_handler_id)" .IP \(bu 4 \&\f(CW$snooper_handler_id\fR (integer) .SS "string = Gtk2\->\fBset_locale\fP" .IX Subsection "string = Gtk2->set_locale" .SS Gtk2\->\fBmain\fP .IX Subsection "Gtk2->main" .SS "Gtk2\->\fBmain_do_event\fP ($event)" .IX Subsection "Gtk2->main_do_event ($event)" .IP \(bu 4 \&\f(CW$event\fR (Gtk2::Gdk::Event) .PP This is the event handler that GTK+ registers with GDK. GTK+ exposes it to allow filtering of events between GDK and GTK+; it is rare that you would need this, except if you are using \f(CW\*(C`Gtk2::Gdk::Event::handler_set\*(C'\fR. .SS "boolean = Gtk2\->\fBmain_iteration\fP" .IX Subsection "boolean = Gtk2->main_iteration" .SS "boolean = Gtk2\->\fBmain_iteration_do\fP ($blocking)" .IX Subsection "boolean = Gtk2->main_iteration_do ($blocking)" .IP \(bu 4 \&\f(CW$blocking\fR (boolean) .SS "integer = Gtk2\->\fBmain_level\fP" .IX Subsection "integer = Gtk2->main_level" .SS Gtk2\->\fBmain_quit\fP .IX Subsection "Gtk2->main_quit" .SS "optiongroup = Gtk2\->\fBget_option_group\fP ($open_default_display)" .IX Subsection "optiongroup = Gtk2->get_option_group ($open_default_display)" .IP \(bu 4 \&\f(CW$open_default_display\fR (boolean) .PP Since: gtk+ 2.6 .SS "boolean = Gtk2\->\fBparse_args\fP" .IX Subsection "boolean = Gtk2->parse_args" Since: gtk+ 2.4 .ie n .SS "integer = Gtk2\->\fBquit_add\fP ($main_level, $function, $data=undef)" .el .SS "integer = Gtk2\->\fBquit_add\fP ($main_level, \f(CW$function\fP, \f(CW$data\fP=undef)" .IX Subsection "integer = Gtk2->quit_add ($main_level, $function, $data=undef)" .IP \(bu 4 \&\f(CW$main_level\fR (integer) .IP \(bu 4 \&\f(CW$function\fR (scalar) .IP \(bu 4 \&\f(CW$data\fR (scalar) .ie n .SS "Gtk2\->\fBquit_add_destroy\fP ($main_level, $object)" .el .SS "Gtk2\->\fBquit_add_destroy\fP ($main_level, \f(CW$object\fP)" .IX Subsection "Gtk2->quit_add_destroy ($main_level, $object)" .IP \(bu 4 \&\f(CW$main_level\fR (integer) .IP \(bu 4 \&\f(CW$object\fR (Gtk2::Object) .SS "Gtk2\->\fBquit_remove\fP ($quit_handler_id)" .IX Subsection "Gtk2->quit_remove ($quit_handler_id)" .IP \(bu 4 \&\f(CW$quit_handler_id\fR (integer) .ie n .SS "Gtk2::show_uri ($screen, $uri, $timestamp=GDK_CURRENT_TIME)" .el .SS "Gtk2::show_uri ($screen, \f(CW$uri\fP, \f(CW$timestamp\fP=GDK_CURRENT_TIME)" .IX Subsection "Gtk2::show_uri ($screen, $uri, $timestamp=GDK_CURRENT_TIME)" .IP \(bu 4 \&\f(CW$screen\fR (Gtk2::Gdk::Screen or undef) .IP \(bu 4 \&\f(CW$uri\fR (string) .IP \(bu 4 \&\f(CW$timestamp\fR (unsigned) .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "flags Gtk2::Gdk::ModifierType" .IX Subsection "flags Gtk2::Gdk::ModifierType" .IP \(bu 4 \&'shift\-mask' / 'GDK_SHIFT_MASK' .IP \(bu 4 \&'lock\-mask' / 'GDK_LOCK_MASK' .IP \(bu 4 \&'control\-mask' / 'GDK_CONTROL_MASK' .IP \(bu 4 \&'mod1\-mask' / 'GDK_MOD1_MASK' .IP \(bu 4 \&'mod2\-mask' / 'GDK_MOD2_MASK' .IP \(bu 4 \&'mod3\-mask' / 'GDK_MOD3_MASK' .IP \(bu 4 \&'mod4\-mask' / 'GDK_MOD4_MASK' .IP \(bu 4 \&'mod5\-mask' / 'GDK_MOD5_MASK' .IP \(bu 4 \&'button1\-mask' / 'GDK_BUTTON1_MASK' .IP \(bu 4 \&'button2\-mask' / 'GDK_BUTTON2_MASK' .IP \(bu 4 \&'button3\-mask' / 'GDK_BUTTON3_MASK' .IP \(bu 4 \&'button4\-mask' / 'GDK_BUTTON4_MASK' .IP \(bu 4 \&'button5\-mask' / 'GDK_BUTTON5_MASK' .IP \(bu 4 \&'super\-mask' / 'GDK_SUPER_MASK' .IP \(bu 4 \&'hyper\-mask' / 'GDK_HYPER_MASK' .IP \(bu 4 \&'meta\-mask' / 'GDK_META_MASK' .IP \(bu 4 \&'release\-mask' / 'GDK_RELEASE_MASK' .IP \(bu 4 \&'modifier\-mask' / 'GDK_MODIFIER_MASK' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2 .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the LGPL. See Gtk2 for a full notice.