org.gnu.glib
Class 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.
static void | addEvent(Runnable target) - Adds a new event to the queue.
|
static void | addEventAndWait(Runnable target) - Adds a new event to the queue.
|
protected void | finalize() - Do not call this method; it's only purpose is to remove the event source
once it is finished with.
|
static void | runEvents() - Executes the pending events.
|
addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addListener , equals , freezeNotify , getBooleanProperty , getData , getData , getDoubleProperty , getEventListenerClass , getEventType , getFloatProperty , getGObjectFromHandle , getHandle , getIntFromHandle , getIntProperty , getJavaObjectProperty , getLongProperty , getNullHandle , getPixbufProperty , getProperty , getStringFromHandle , getStringProperty , hasProperty , hashCode , instantiateJGObjectFromGType , notify , removeEventHandler , removeListener , retrieveGObject , setBooleanProperty , setData , setData , setDoubleProperty , setFloatProperty , setHandle , setIntProperty , setJavaObjectProperty , setLongProperty , setPixbufProperty , setProperty , setStringProperty , thawNotify |
addEvent
public static void addEvent(Runnable target)
Adds a new event to the queue. 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.
addEventAndWait
public static void addEventAndWait(Runnable target)
Adds a new event to the queue. 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.
finalize
protected final void finalize()
throws Throwable
Do not call this method; it's only purpose is to remove the event source
once it is finished with.
runEvents
public static final void runEvents()
Executes the pending events. This is called from within the gtk main
thread.