X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72cdf4c9b3ce92addf09cfb322f0c19bfb0f8744..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/gtk/app.cpp diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index b307cdd8e3..5d08196d7b 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -124,8 +124,16 @@ unsigned char g_palette[64*3] = extern void wxFlushResources(); +/* forward declaration */ +gint wxapp_idle_callback( gpointer WXUNUSED(data) ); +void wxapp_install_idle_handler(); + +#if wxUSE_THREADS +gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ); +#endif + //----------------------------------------------------------------------------- -// global functions +// wxExit //----------------------------------------------------------------------------- void wxExit() @@ -133,8 +141,9 @@ void wxExit() gtk_main_quit(); } -/* forward declaration */ -gint wxapp_idle_callback( gpointer WXUNUSED(data) ); +//----------------------------------------------------------------------------- +// wxYield +//----------------------------------------------------------------------------- bool wxYield() { @@ -165,6 +174,20 @@ bool wxYield() return TRUE; } +//----------------------------------------------------------------------------- +// wxWakeUpIdle +//----------------------------------------------------------------------------- + +void wxWakeUpIdle() +{ + if (g_isIdle) + wxapp_install_idle_handler(); +} + +//----------------------------------------------------------------------------- +// local functions +//----------------------------------------------------------------------------- + gint wxapp_idle_callback( gpointer WXUNUSED(data) ) { if (!wxTheApp) return TRUE; @@ -213,9 +236,6 @@ void wxapp_install_idle_handler() #if wxUSE_THREADS -/* forward declaration */ -static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ); - void wxapp_install_thread_wakeup() { if (wxTheApp->m_wakeUpTimerTag) return; @@ -231,7 +251,7 @@ void wxapp_uninstall_thread_wakeup() wxTheApp->m_wakeUpTimerTag = 0; } -static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ) +gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ) { wxapp_uninstall_thread_wakeup();