|
java-gnome version 4.0.7 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
java.lang.Objectorg.gnome.glib.Glib
org.gnome.gtk.Gtk
public final class Gtk
The GTK widget toolkit initialization and main loop entry point. A typical program written with java-gnome will boil down to this:
public class ComeOnBabyLightMyFire
public static void main(String[] args) {
Gtk.init(args);
// build user interface
Gtk.main();
}
}
There. Now you know everything you need to know. :) In due
course we will write some tutorials to help you along.
| Method Summary | |
|---|---|
static void |
init(java.lang.String[] args)
Initialize the GTK libraries. |
static void |
main()
This method blocks, ie, it does not return until the GTK main loop is terminated. |
static void |
mainQuit()
Exit the main loop. |
static void |
setDefaultIcon(Pixbuf icon)
Set the icon that will be used for all Windows in this application that do not have an one explicitly set. |
| Methods inherited from class org.gnome.glib.Glib |
|---|
setProgramName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void init(java.lang.String[] args)
args - The command line arguments array. This is passed to the
underlying library to allowing user (or window manager) to
alter GTK's behaviour.public static void main()
You can nest calls to Gtk.main()! If you do, then
calling mainQuit() will make the innermost
invocation of the main loop return. (This is how modal Dialog boxes run
and block the rest of the application while still accepting events
themselves)
public static void mainQuit()
Gtk.main() at the end
of your Java main() function, then calling
Gtk.mainQuit() in a signal handler somewhere will return
the program flow to main() on your way exiting.
public static void setDefaultIcon(Pixbuf icon)
setIcon() for further details about how
to specify icons.
|
![]() java-gnome |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||