=head1 NAME

Gtk2::main

=for object Gtk2::main
=cut

=for object Gtk2::main
=cut




=head1 METHODS

=head2 boolean = Gtk2-E<gt>B<alternative_dialog_button_order> ($screen=undef)

=over

=over

=item * $screen (Gtk2::Gdk::Screen or undef) 

=back

=back

=head2 event or undef = Gtk2-E<gt>B<get_current_event> 

=over

=back

=head2 modifiertype = Gtk2-E<gt>B<get_current_event_state> 

=over

=back

=head2 unsigned = Gtk2-E<gt>B<get_current_event_time> 

=over

=back

=head2 language = Gtk2-E<gt>B<get_default_language> 

=over

=back

=head2 Gtk2-E<gt>B<disable_setlocale> 

=over

=back

=head2 widget or undef = Gtk2-E<gt>B<get_event_widget> ($event)

=over

=over

=item * $event (Gtk2::Gdk::Event or undef) 

=back

=back

=head2 integer = Gtk2-E<gt>B<events_pending> 

=over

=back

=head2 Gtk2-E<gt>B<grab_add> ($widget)

=over

=over

=item * $widget (Gtk2::Widget) 

=back

=back

=head2 widget or undef = Gtk2-E<gt>B<grab_get_current> 

=over

=back

=head2 Gtk2-E<gt>B<grab_remove> ($widget)

=over

=over

=item * $widget (Gtk2::Widget) 

=back

=back

=head2 boolean = Gtk2-E<gt>B<init> 

=over

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 C<-init>
in the C<use> statement to do this automatically.  This function also scans
I<@ARGV> for any options it knows, and will remove them automagically.

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 C<< Gtk2->init_check >> instead.

=back

=head2 Gtk2-E<gt>B<init_add> ($function, $data=undef)

=over

=over

=item * $function (scalar) 

=item * $data (scalar) 

=back

=back

=head2 boolean = Gtk2-E<gt>B<init_check> 

=over

This is the non-fatal version of C<< Gtk2->init >>; instead of calling C<exit>
if Gtk+ initialization fails, C<< Gtk2->init_check >> 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.

=back

=head2 integer = Gtk2-E<gt>B<key_snooper_install> ($snooper, $func_data=undef)

=over

=over

=item * $snooper (subroutine) function to call on every event, must return a boolean

=item * $func_data (scalar) 

=back

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.  I<snooper> will receive the widget to
which the event will be delivered and the event, and also I<func_data> (if
provided).  If I<snooper> returns true, the event propagation will stop
(just like normal event handlers).

C<key_snooper_install> returns an id that may be used with
C<key_snooper_remove>.

=back

=head2 Gtk2-E<gt>B<key_snooper_remove> ($snooper_handler_id)

=over

=over

=item * $snooper_handler_id (integer) 

=back

=back

=head2 string = Gtk2-E<gt>B<set_locale> 

=over

=back

=head2 Gtk2-E<gt>B<main> 

=over

=back

=head2 Gtk2-E<gt>B<main_do_event> ($event)

=over

=over

=item * $event (Gtk2::Gdk::Event) 

=back

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 C<Gtk2::Gdk::Event::handler_set>.

=back

=head2 boolean = Gtk2-E<gt>B<main_iteration> 

=over

=back

=head2 boolean = Gtk2-E<gt>B<main_iteration_do> ($blocking)

=over

=over

=item * $blocking (boolean) 

=back

=back

=head2 integer = Gtk2-E<gt>B<main_level> 

=over

=back

=head2 Gtk2-E<gt>B<main_quit> 

=over

=back

=head2 boolean = Gtk2-E<gt>B<parse_args> 

=over

=back

=head2 integer = Gtk2-E<gt>B<quit_add> ($main_level, $function, $data=undef)

=over

=over

=item * $main_level (integer) 

=item * $function (scalar) 

=item * $data (scalar) 

=back

=back

=head2 Gtk2-E<gt>B<quit_add_destroy> ($main_level, $object)

=over

=over

=item * $main_level (integer) 

=item * $object (Gtk2::Object) 

=back

=back

=head2 Gtk2-E<gt>B<quit_remove> ($quit_handler_id)

=over

=over

=item * $quit_handler_id (integer) 

=back

=back


=head1 ENUMS AND FLAGS

=head2 flags Gtk2::Gdk::ModifierType

=over

=item * 'shift-mask' / 'GDK_SHIFT_MASK'

=item * 'lock-mask' / 'GDK_LOCK_MASK'

=item * 'control-mask' / 'GDK_CONTROL_MASK'

=item * 'mod1-mask' / 'GDK_MOD1_MASK'

=item * 'mod2-mask' / 'GDK_MOD2_MASK'

=item * 'mod3-mask' / 'GDK_MOD3_MASK'

=item * 'mod4-mask' / 'GDK_MOD4_MASK'

=item * 'mod5-mask' / 'GDK_MOD5_MASK'

=item * 'button1-mask' / 'GDK_BUTTON1_MASK'

=item * 'button2-mask' / 'GDK_BUTTON2_MASK'

=item * 'button3-mask' / 'GDK_BUTTON3_MASK'

=item * 'button4-mask' / 'GDK_BUTTON4_MASK'

=item * 'button5-mask' / 'GDK_BUTTON5_MASK'

=item * 'release-mask' / 'GDK_RELEASE_MASK'

=item * 'modifier-mask' / 'GDK_MODIFIER_MASK'

=back



=head1 SEE ALSO

L<Gtk2>

=head1 COPYRIGHT

Copyright (C) 2003-2005 by the gtk2-perl team.

This software is licensed under the LGPL.  See L<Gtk2> for a full notice.


=cut

