]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stubs/thread.cpp
Sorry folks, a lot of changes to remedy GetFont, GetBrush etc.
[wxWidgets.git] / src / stubs / thread.cpp
index 36e710b5b2b146c54881b2b49f04223784e917d7..ca3833153ab740fc161123c04b307ae9bdc11906 100644 (file)
@@ -28,7 +28,7 @@ enum thread_state {
 // Static variables
 /////////////////////////////////////////////////////////////////////////////
 
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
 
 /////////////////////////////////////////////////////////////////////////////
 // Windows implementation
@@ -143,6 +143,18 @@ wxThreadError wxThread::Destroy()
     return THREAD_NO_ERROR;
 }
 
+wxThreadError wxThread::Pause()
+{
+    // TODO
+    return THREAD_NO_ERROR;
+}
+
+wxThreadError wxThread::Resume()
+{
+    // TODO
+    return THREAD_NO_ERROR;
+}
+
 void wxThread::Exit(void *status)
 {
     // TODO
@@ -181,6 +193,24 @@ unsigned long wxThread::GetID() const
     return 0;
 }
 
+wxThread *wxThread::GetThreadFromID(unsigned long id)
+{
+    // TODO
+    return NULL;
+}
+
+bool wxThread::IsAlive() const
+{
+    // TODO
+    return FALSE;
+}
+
+bool wxThread::IsRunning() const
+{
+    // TODO
+    return FALSE;
+}
+
 bool wxThread::IsMain()
 {
     // TODO
@@ -213,13 +243,15 @@ class wxThreadModule : public wxModule {
 public:
   virtual bool OnInit() {
     /* TODO p_mainid = GetCurrentThread(); */
-    wxMainMutex.Lock();
+    wxMainMutex = new wxMutex();
+    wxMainMutex->Lock();
     return TRUE;
   }
 
   // Global cleanup
   virtual void OnExit() {
-    wxMainMutex.Unlock();
+    wxMainMutex->Unlock();
+    delete wxMainMutex;
   }
 };