|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.glib.CustomEvents
public final class CustomEvents
Provides methods for adding custom event sources. The main glib thread will poll this ojbect as part of its main loop. If any events are pending, they will be executed from within the main glib loop.
For multithreaded Gtk/Gnome applications, all gui modifications must be done from within the main loop. The methods of this class allow you to do this.
As events run on the main glib loop, only short methods should be executed in it.
Method Summary | |
---|---|
static void |
addEvent(java.lang.Runnable target)
Adds a new event to the queue. |
static void |
addEventAndWait(java.lang.Runnable target)
Adds a new event to the queue. |
static void |
runEvents()
Executes the pending events. |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void addEvent(java.lang.Runnable target)
target.run()
will be called
in the next iteration of the glib (gtk) main loop. This method will
return immediately after adding the item to the queue.
public static void addEventAndWait(java.lang.Runnable target)
target.run()
will be called
in the next iteration of the glib (gtk) main loop. This method waits
until the method call has completed before returning.
public static final void runEvents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |