]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/threadgui.inc
wxSize/wxPoint/wxRect versions of functions added to wxMSW, wxMotif;
[wxWidgets.git] / src / gtk / threadgui.inc
index 8195b0ddbdbb4c22ccc5828dc08f028314b3b146..46073d4e0ba1a752c20330ed5f3718cab5838b20 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <gdk/gdk.h>
 
-
 /////////////////////////////////////////////////////////////////////////////
 // Static variables
 /////////////////////////////////////////////////////////////////////////////
@@ -49,7 +48,7 @@ ThreadExitProc(gpointer WXUNUSED(client), gint fid,
 }
 
 // Global initialization
-static void wxThreadGuiInit(void)
+static void wxThreadGuiInit()
 {
   pipe(p_thrd_pipe);
   p_thrd_inid = gdk_input_add(p_thrd_pipe[0], GDK_INPUT_READ,
@@ -57,9 +56,35 @@ static void wxThreadGuiInit(void)
 }
 
 // Global cleanup
-static void wxThreadGuiExit(void)
+static void wxThreadGuiExit()
 {
   gdk_input_remove(p_thrd_inid);
   close(p_thrd_pipe[0]);
   close(p_thrd_pipe[1]);
 }
+
+#ifdef NO_DEFINE_GDK_1_1
+
+void wxMutexGuiEnter()
+{
+  gdk_mutex_enter();
+}
+
+void wxMutexGuiLeave()
+{
+  gdk_mutex_leave();
+}
+
+#else
+
+void wxMutexGuiEnter()
+{
+  wxMainMutex->Lock();
+}
+
+void wxMutexGuiLeave()
+{
+  wxMainMutex->Unlock();
+}
+
+#endif