OS/2 thread updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -359,7 +359,7 @@ public:
|
|||||||
// be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this
|
// be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this
|
||||||
// code if required.
|
// code if required.
|
||||||
|
|
||||||
#if defined(__AIX__) || defined(__HPUX__) || defined( __VMS__ )
|
#if defined(__AIX__) || defined(__HPUX__) || defined( __VMS__ ) || defined(__WXPM__)
|
||||||
#define IMPLEMENT_WXWIN_MAIN \
|
#define IMPLEMENT_WXWIN_MAIN \
|
||||||
extern int wxEntry( int argc, char *argv[] ); \
|
extern int wxEntry( int argc, char *argv[] ); \
|
||||||
int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
|
int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
|
||||||
|
@@ -1395,7 +1395,13 @@ public:
|
|||||||
bool SearchDynamicEventTable( wxEvent& event );
|
bool SearchDynamicEventTable( wxEvent& event );
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
void ClearEventLocker() { delete m_eventsLocker; m_eventsLocker = NULL; };
|
void ClearEventLocker()
|
||||||
|
{
|
||||||
|
# if !defined(__VISAGECPP__)
|
||||||
|
delete m_eventsLocker;
|
||||||
|
m_eventsLocker = NULL;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// old stuff
|
// old stuff
|
||||||
@@ -1430,7 +1436,11 @@ protected:
|
|||||||
wxList* m_dynamicEvents;
|
wxList* m_dynamicEvents;
|
||||||
wxList* m_pendingEvents;
|
wxList* m_pendingEvents;
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
|
#if defined (__VISAGECPP__)
|
||||||
|
wxCriticalSection m_eventsLocker;
|
||||||
|
# else
|
||||||
wxCriticalSection* m_eventsLocker;
|
wxCriticalSection* m_eventsLocker;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// optimization: instead of using costly IsKindOf() to decide whether we're
|
// optimization: instead of using costly IsKindOf() to decide whether we're
|
||||||
|
@@ -13,14 +13,14 @@
|
|||||||
#ifndef __OS2DNDH__
|
#ifndef __OS2DNDH__
|
||||||
#define __OS2DNDH__
|
#define __OS2DNDH__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !wxUSE_DRAG_AND_DROP
|
#if !wxUSE_DRAG_AND_DROP
|
||||||
#error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
|
#error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
|
||||||
#endif //WX_DRAG_DROP
|
#endif //WX_DRAG_DROP
|
||||||
|
|
||||||
|
#define INCL_WINSTDDRAG
|
||||||
|
#include <os2.h>
|
||||||
|
#include <pmstddlg.h>
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// wxDropSource
|
// wxDropSource
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
@@ -14,10 +14,9 @@
|
|||||||
#ifndef _WX_PRIVATE_H_
|
#ifndef _WX_PRIVATE_H_
|
||||||
#define _WX_PRIVATE_H_
|
#define _WX_PRIVATE_H_
|
||||||
|
|
||||||
#define INCL_DOSPROCESS
|
|
||||||
#define INCL_DOSERRORS
|
|
||||||
#define INCL_BASE
|
#define INCL_BASE
|
||||||
#define INCL_PM
|
#define INCL_PM
|
||||||
|
#define INCL_GPI
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
|
|
||||||
class WXDLLEXPORT wxFont;
|
class WXDLLEXPORT wxFont;
|
||||||
|
@@ -134,12 +134,14 @@ private:
|
|||||||
|
|
||||||
// in order to avoid any overhead under !MSW make all wxCriticalSection class
|
// in order to avoid any overhead under !MSW make all wxCriticalSection class
|
||||||
// functions inline - but this can't be done under MSW
|
// functions inline - but this can't be done under MSW
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__)
|
||||||
class WXDLLEXPORT wxCriticalSectionInternal;
|
class WXDLLEXPORT wxCriticalSectionInternal;
|
||||||
#define WXCRITICAL_INLINE
|
#define WXCRITICAL_INLINE
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
class WXDLLEXPORT wxCriticalSectionInternal;
|
class WXDLLEXPORT wxCriticalSectionInternal;
|
||||||
#define WXCRITICAL_INLINE
|
#define WXCRITICAL_INLINE
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
#define WXCRITICAL_INLINE
|
||||||
#else // !MSW && !PM
|
#else // !MSW && !PM
|
||||||
#define WXCRITICAL_INLINE inline
|
#define WXCRITICAL_INLINE inline
|
||||||
#endif // MSW/!MSW
|
#endif // MSW/!MSW
|
||||||
@@ -163,7 +165,7 @@ private:
|
|||||||
wxCriticalSection(const wxCriticalSection&);
|
wxCriticalSection(const wxCriticalSection&);
|
||||||
wxCriticalSection& operator=(const wxCriticalSection&);
|
wxCriticalSection& operator=(const wxCriticalSection&);
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__)
|
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||||
wxCriticalSectionInternal *m_critsect;
|
wxCriticalSectionInternal *m_critsect;
|
||||||
#else // !MSW
|
#else // !MSW
|
||||||
wxMutex m_mutex;
|
wxMutex m_mutex;
|
||||||
@@ -422,9 +424,11 @@ public:
|
|||||||
|
|
||||||
// returns TRUE if the main thread has GUI lock
|
// returns TRUE if the main thread has GUI lock
|
||||||
extern bool WXDLLEXPORT wxGuiOwnedByMainThread();
|
extern bool WXDLLEXPORT wxGuiOwnedByMainThread();
|
||||||
|
|
||||||
// return TRUE if the main thread is waiting for some other to terminate:
|
// return TRUE if the main thread is waiting for some other to terminate:
|
||||||
// wxApp then should block all "dangerous" messages
|
// wxApp then should block all "dangerous" messages
|
||||||
extern bool WXDLLEXPORT wxIsWaitingForThread();
|
extern bool WXDLLEXPORT wxIsWaitingForThread();
|
||||||
|
|
||||||
#else // !MSW && !PM
|
#else // !MSW && !PM
|
||||||
// implement wxCriticalSection using mutexes
|
// implement wxCriticalSection using mutexes
|
||||||
inline wxCriticalSection::wxCriticalSection() { }
|
inline wxCriticalSection::wxCriticalSection() { }
|
||||||
|
Reference in New Issue
Block a user