This class is a catch-all for methods in GTK that are not
associated with a GTK object.
eventsPending
public static boolean eventsPending()
Checks if any events are pending. This can be used to update the
GUI and invoke timeouts etc. while doing some time intensive
computation.
- true if any events are pending.
getFalse
public static boolean getFalse()
Analogical to
getTrue()
. This function does nothing but always
return FALSE.
getTrue
public static boolean getTrue()
All this function does is to return TRUE. This can be useful
for example if you want to inhibit the deletion of a window. Of
course you should not do this as the user expects a reaction
from clicking the close icon of the window.
gtk_disable_setlocale
protected static final void gtk_disable_setlocale()
gtk_events_pending
protected static final boolean gtk_events_pending()
gtk_get_current_event
protected static final Handle gtk_get_current_event()
gtk_get_current_event_time
protected static final int gtk_get_current_event_time()
gtk_get_default_language
protected static final Handle gtk_get_default_language()
gtk_get_event_widget
protected static final Handle gtk_get_event_widget(Handle event)
gtk_grab_add
protected static final void gtk_grab_add(Handle widget)
gtk_grab_get_current
protected static final Handle gtk_grab_get_current()
gtk_grab_remove
protected static final void gtk_grab_remove(Handle widget)
gtk_init
protected static final void gtk_init(int[] argc,
String[] args)
gtk_init_check
protected static final void gtk_init_check(int[] argc,
String[] args)
gtk_main
protected static final void gtk_main()
gtk_main_do_event
protected static final void gtk_main_do_event(Handle event)
gtk_main_iteration
protected static final boolean gtk_main_iteration()
gtk_main_level
protected static final int gtk_main_level()
gtk_main_quit
protected static final void gtk_main_quit()
gtk_set_locale
protected static final String gtk_set_locale()
gtk_type_from_name
protected static final Handle gtk_type_from_name(String name)
gtk_type_name
protected static final String gtk_type_name(Handle type)
handleKeySnoopEvent
protected static boolean handleKeySnoopEvent(Handle widget,
Handle event)
init
public static void init(String[] args)
This method should be called before using any java-gnome
objects. It initialized everything needed to use the native
libraries. This method will terminate you program if it is
unable to initialize the native libraries.
args
- The command line arguments passed to the applicaion.
isGtkThread
public static boolean isGtkThread()
Returns true if the current thread is the Gtk thread
main
public static void main()
Runs the main event loop.
mainIteration
public static boolean mainIteration()
Runs a single iteration of the main loop. If no events are waiting
to be processed GTK will block until the next event is noticed.
mainIterationDo
public static boolean mainIterationDo(boolean blocking)
Runs a single iteration of the mainloop. If no events are
available either return or block dependent on the value of
blocking.
blocking
- TRUE if you want GTK+ to block if no events are pending.
- TRUE if
mainQuit()
has been called for the
innermost mainloop.
mainQuit
public static void mainQuit()
Quit the main event loop.
propagateEvent
public void propagateEvent(Widget widget,
Event event)
Sends an event to a widget, propagating the event to parent
widgets if the event remains unhandled.
NOTE: You most likely don't want to use this function.
Synthesizing events is rarely needed. Consider asking on the
mailing list for better ways to achieve your goals.
widget
- A Widget.event
- An Event.
removeKeySnoopMethod
public static void removeKeySnoopMethod()
Removes current the key snooper method.
setKeySnoopMethod
public static void setKeySnoopMethod(KeySnoopMethod method)
Installs a key snooper method, which will get called on all
key events before delivering them normally. This can be used to
implement custom key event handling.