GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gtk2::main(3) User Contributed Perl Documentation Gtk2::main(3)

Gtk2::main

$screen (Gtk2::Gdk::Screen or undef)

Since: gtk+ 2.6

$event (Gtk2::Gdk::Event or undef)

$widget (Gtk2::Widget)

$widget (Gtk2::Widget)

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 "-init" in the "use" statement to do this automatically. This function also scans @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 "Gtk2->init_check" instead.

  • $function (scalar)
  • $data (scalar)

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

  • $snooper (subroutine) function to call on every event
  • $func_data (scalar)

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.

"key_snooper_install" returns an id that may be used with "key_snooper_remove" (below). snooper is called as

    stopbool = &snooper ($widget, $event, $func_data);

It should return true to stop event propagation, the same as "Gtk2::Widget" event signal handlers. The "Gtk2::EVENT_STOP" and "Gtk2::EVENT_PROPAGATE" constants can be used for the return (see Gtk2::Widget).

$snooper_handler_id (integer)

$event (Gtk2::Gdk::Event)

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

$blocking (boolean)

$open_default_display (boolean)

Since: gtk+ 2.6

Since: gtk+ 2.4

  • $main_level (integer)
  • $function (scalar)
  • $data (scalar)

  • $main_level (integer)
  • $object (Gtk2::Object)

$quit_handler_id (integer)

  • $screen (Gtk2::Gdk::Screen or undef)
  • $uri (string)
  • $timestamp (unsigned)

  • 'shift-mask' / 'GDK_SHIFT_MASK'
  • 'lock-mask' / 'GDK_LOCK_MASK'
  • 'control-mask' / 'GDK_CONTROL_MASK'
  • 'mod1-mask' / 'GDK_MOD1_MASK'
  • 'mod2-mask' / 'GDK_MOD2_MASK'
  • 'mod3-mask' / 'GDK_MOD3_MASK'
  • 'mod4-mask' / 'GDK_MOD4_MASK'
  • 'mod5-mask' / 'GDK_MOD5_MASK'
  • 'button1-mask' / 'GDK_BUTTON1_MASK'
  • 'button2-mask' / 'GDK_BUTTON2_MASK'
  • 'button3-mask' / 'GDK_BUTTON3_MASK'
  • 'button4-mask' / 'GDK_BUTTON4_MASK'
  • 'button5-mask' / 'GDK_BUTTON5_MASK'
  • 'super-mask' / 'GDK_SUPER_MASK'
  • 'hyper-mask' / 'GDK_HYPER_MASK'
  • 'meta-mask' / 'GDK_META_MASK'
  • 'release-mask' / 'GDK_RELEASE_MASK'
  • 'modifier-mask' / 'GDK_MODIFIER_MASK'

Gtk2

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

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

2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.