* Added threads event propagation. Should compile on GTK (tested).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-03-27 18:50:54 +00:00
parent eedcfe5eb9
commit 7214297d16
14 changed files with 223 additions and 5 deletions

View File

@@ -19,6 +19,9 @@
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdicmn.h"
#if wxUSE_THREADS
#include "wx/thread.h"
#endif
/*
* Event types
@@ -347,7 +350,7 @@ public:
// Set/Get listbox/choice selection string
void SetString(const wxString& s) { m_commandString = s; }
const wxString& GetString() const { return m_commandString; }
wxString GetString() const { return m_commandString; }
// Get checkbox value
bool Checked() const { return (m_commandInt != 0); }
@@ -1170,6 +1173,10 @@ public:
virtual bool OnClose();
#endif
#if wxUSE_THREADS
bool ProcessThreadEvent(wxEvent& event);
void ProcessPendingEvents();
#endif
virtual bool ProcessEvent(wxEvent& event);
virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
@@ -1196,10 +1203,14 @@ protected:
virtual const wxEventTable *GetEventTable() const;
protected:
wxEvtHandler* m_nextHandler;
wxEvtHandler* m_previousHandler;
bool m_enabled; // Is event handler enabled?
wxList* m_dynamicEvents;
wxEvtHandler* m_nextHandler;
wxEvtHandler* m_previousHandler;
bool m_enabled; // Is event handler enabled?
wxList* m_dynamicEvents;
wxList* m_pendingEvents;
#if wxUSE_THREADS
wxCriticalSection* m_eventsLocker;
#endif
// optimization: instead of using costly IsKindOf() to decide whether we're
// a window (which is true in 99% of cases), use this flag

View File

@@ -115,6 +115,9 @@ class wxApp: public wxEvtHandler
static void CleanUp();
bool ProcessIdle();
#if wxUSE_THREADS
void ProcessPendingEvents();
#endif
void DeletePendingObjects();
bool m_initialized;

View File

@@ -115,6 +115,9 @@ class wxApp: public wxEvtHandler
static void CleanUp();
bool ProcessIdle();
#if wxUSE_THREADS
void ProcessPendingEvents();
#endif
void DeletePendingObjects();
bool m_initialized;

View File

@@ -141,6 +141,9 @@ public:
void DeletePendingObjects();
bool ProcessIdle();
#if wxUSE_THREADS
void ProcessPendingEvents();
#endif
// Motif-specific
inline WXAppContext GetAppContext() const { return m_appContext; }

View File

@@ -144,6 +144,9 @@ public:
virtual bool ProcessMessage(WXMSG* pMsg);
void DeletePendingObjects();
bool ProcessIdle();
#if wxUSE_THREADS
void ProcessPendingEvents();
#endif
int GetComCtl32Version() const;
public: