VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / gtk / app.cpp
index fd60e2a12696fa06af6977c75a80ea8e38e14745..5d08196d7b2e1ebd346c18f3211b963cd805ee51 100644 (file)
@@ -8,7 +8,6 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-    #pragma implementation "appbase.h"
     #pragma implementation "app.h"
 #endif
 
@@ -125,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()
@@ -134,8 +141,9 @@ void wxExit()
     gtk_main_quit();
 }
 
-/* forward declaration */
-gint wxapp_idle_callback( gpointer WXUNUSED(data) );
+//-----------------------------------------------------------------------------
+// wxYield
+//-----------------------------------------------------------------------------
 
 bool wxYield()
 {
@@ -166,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;
@@ -214,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;
@@ -232,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();
 
@@ -515,28 +534,6 @@ void wxApp::Dispatch()
     gtk_main_iteration();
 }
 
-void wxApp::ProcessPendingEvents()
-{
-#if wxUSE_THREADS
-    wxCriticalSectionLocker locker(*wxPendingEventsLocker);
-#endif // wxUSE_THREADS
-
-    if ( !wxPendingEvents )
-        return;
-
-    wxNode *node = wxPendingEvents->First();
-    while (node)
-    {
-        wxEvtHandler *handler = (wxEvtHandler *)node->Data();
-
-        handler->ProcessPendingEvents();
-
-        delete node;
-
-        node = wxPendingEvents->First();
-    }
-}
-
 void wxApp::DeletePendingObjects()
 {
     wxNode *node = wxPendingDelete.First();