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
|
||||
// code if required.
|
||||
|
||||
#if defined(__AIX__) || defined(__HPUX__) || defined( __VMS__ )
|
||||
#if defined(__AIX__) || defined(__HPUX__) || defined( __VMS__ ) || defined(__WXPM__)
|
||||
#define IMPLEMENT_WXWIN_MAIN \
|
||||
extern int wxEntry( int argc, char *argv[] ); \
|
||||
int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
|
||||
|
@@ -506,7 +506,7 @@ public:
|
||||
void CopyObject(wxObject& object_dest) const;
|
||||
public:
|
||||
int m_commandInt; // Additional information
|
||||
long m_extraLong;
|
||||
long m_extraLong;
|
||||
};
|
||||
|
||||
// Mouse event class
|
||||
@@ -605,10 +605,10 @@ public:
|
||||
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
|
||||
|
||||
// Find the position of the event
|
||||
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||
{
|
||||
if (xpos)
|
||||
*xpos = m_x;
|
||||
*xpos = m_x;
|
||||
if (ypos)
|
||||
*ypos = m_y;
|
||||
}
|
||||
@@ -617,7 +617,7 @@ public:
|
||||
void GetPosition(long *xpos, long *ypos) const
|
||||
{
|
||||
if (xpos)
|
||||
*xpos = (long)m_x;
|
||||
*xpos = (long)m_x;
|
||||
if (ypos)
|
||||
*ypos = (long)m_y;
|
||||
}
|
||||
@@ -631,10 +631,10 @@ public:
|
||||
|
||||
// Compatibility
|
||||
#if WXWIN_COMPATIBILITY
|
||||
void Position(long *xpos, long *ypos) const
|
||||
void Position(long *xpos, long *ypos) const
|
||||
{
|
||||
if (xpos)
|
||||
*xpos = (long)m_x;
|
||||
*xpos = (long)m_x;
|
||||
if (ypos)
|
||||
*ypos = (long)m_y;
|
||||
}
|
||||
@@ -692,14 +692,14 @@ public:
|
||||
// Find the position of the event
|
||||
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||
{
|
||||
if (xpos) *xpos = m_x;
|
||||
if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y;
|
||||
}
|
||||
|
||||
#ifndef __WIN16__
|
||||
void GetPosition(long *xpos, long *ypos) const
|
||||
{
|
||||
if (xpos) *xpos = (long)m_x;
|
||||
if (xpos) *xpos = (long)m_x;
|
||||
if (ypos) *ypos = (long)m_y;
|
||||
}
|
||||
#endif
|
||||
@@ -1363,7 +1363,7 @@ public:
|
||||
// process all pending events
|
||||
void ProcessPendingEvents();
|
||||
|
||||
// add a
|
||||
// add a
|
||||
#if wxUSE_THREADS
|
||||
bool ProcessThreadEvent(wxEvent& event);
|
||||
#endif
|
||||
@@ -1395,7 +1395,13 @@ public:
|
||||
bool SearchDynamicEventTable( wxEvent& event );
|
||||
|
||||
#if wxUSE_THREADS
|
||||
void ClearEventLocker() { delete m_eventsLocker; m_eventsLocker = NULL; };
|
||||
void ClearEventLocker()
|
||||
{
|
||||
# if !defined(__VISAGECPP__)
|
||||
delete m_eventsLocker;
|
||||
m_eventsLocker = NULL;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
// old stuff
|
||||
@@ -1430,7 +1436,11 @@ protected:
|
||||
wxList* m_dynamicEvents;
|
||||
wxList* m_pendingEvents;
|
||||
#if wxUSE_THREADS
|
||||
#if defined (__VISAGECPP__)
|
||||
wxCriticalSection m_eventsLocker;
|
||||
# else
|
||||
wxCriticalSection* m_eventsLocker;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// optimization: instead of using costly IsKindOf() to decide whether we're
|
||||
|
@@ -13,14 +13,14 @@
|
||||
#ifndef __OS2DNDH__
|
||||
#define __OS2DNDH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#if !wxUSE_DRAG_AND_DROP
|
||||
#error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
|
||||
#endif //WX_DRAG_DROP
|
||||
|
||||
#define INCL_WINSTDDRAG
|
||||
#include <os2.h>
|
||||
#include <pmstddlg.h>
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropSource
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -14,10 +14,9 @@
|
||||
#ifndef _WX_PRIVATE_H_
|
||||
#define _WX_PRIVATE_H_
|
||||
|
||||
#define INCL_DOSPROCESS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_BASE
|
||||
#define INCL_PM
|
||||
#define INCL_GPI
|
||||
#include <os2.h>
|
||||
|
||||
class WXDLLEXPORT wxFont;
|
||||
|
@@ -134,12 +134,14 @@ private:
|
||||
|
||||
// in order to avoid any overhead under !MSW make all wxCriticalSection class
|
||||
// functions inline - but this can't be done under MSW
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
#if defined(__WXMSW__)
|
||||
class WXDLLEXPORT wxCriticalSectionInternal;
|
||||
#define WXCRITICAL_INLINE
|
||||
#elif defined(__WXMAC__)
|
||||
class WXDLLEXPORT wxCriticalSectionInternal;
|
||||
#define WXCRITICAL_INLINE
|
||||
#elif defined(__WXPM__)
|
||||
#define WXCRITICAL_INLINE
|
||||
#else // !MSW && !PM
|
||||
#define WXCRITICAL_INLINE inline
|
||||
#endif // MSW/!MSW
|
||||
@@ -163,7 +165,7 @@ private:
|
||||
wxCriticalSection(const wxCriticalSection&);
|
||||
wxCriticalSection& operator=(const wxCriticalSection&);
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__)
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
wxCriticalSectionInternal *m_critsect;
|
||||
#else // !MSW
|
||||
wxMutex m_mutex;
|
||||
@@ -422,9 +424,11 @@ public:
|
||||
|
||||
// returns TRUE if the main thread has GUI lock
|
||||
extern bool WXDLLEXPORT wxGuiOwnedByMainThread();
|
||||
|
||||
// return TRUE if the main thread is waiting for some other to terminate:
|
||||
// wxApp then should block all "dangerous" messages
|
||||
extern bool WXDLLEXPORT wxIsWaitingForThread();
|
||||
|
||||
#else // !MSW && !PM
|
||||
// implement wxCriticalSection using mutexes
|
||||
inline wxCriticalSection::wxCriticalSection() { }
|
||||
|
Reference in New Issue
Block a user