From: David Webster Date: Mon, 22 Nov 1999 05:27:04 +0000 (+0000) Subject: thread updates X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/892b89f3b79a756ba3c278c605b79a6fa377d60f thread updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/checkbox.cpp b/src/os2/checkbox.cpp index 84a6ab65ae..56dde6f8f8 100644 --- a/src/os2/checkbox.cpp +++ b/src/os2/checkbox.cpp @@ -207,7 +207,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l checkWidth = -1 ; checkHeight = -1 ; - long msStyle = CHECK_FLAGS; +// long msStyle = CHECK_FLAGS; HWND wx_button = 0; // TODO: Create the bitmap checkbox diff --git a/src/os2/clipbrd.cpp b/src/os2/clipbrd.cpp index 8ffa926849..fc902957b4 100644 --- a/src/os2/clipbrd.cpp +++ b/src/os2/clipbrd.cpp @@ -37,10 +37,6 @@ #include -#define INCL_DOS -#define INCL_PM -#include - #include "wx/os2/private.h" // wxDataObject is tied to OLE/drag and drop implementation, diff --git a/src/os2/dnd.cpp b/src/os2/dnd.cpp index 452c5a2abc..f8ed534d5d 100644 --- a/src/os2/dnd.cpp +++ b/src/os2/dnd.cpp @@ -14,6 +14,7 @@ #endif #define INCL_PM +#define INCL_DOS #include #include "wx/window.h" #include "wx/app.h" diff --git a/src/os2/joystick.cpp b/src/os2/joystick.cpp index 5f20af8209..73e82b549b 100644 --- a/src/os2/joystick.cpp +++ b/src/os2/joystick.cpp @@ -11,7 +11,7 @@ #include "wx/string.h" #define INCL_PM -#include "os2.h" +#define INCL_DOS #include "wx/os2/private.h" #define NO_JOYGETPOSEX diff --git a/src/os2/pnghand.cpp b/src/os2/pnghand.cpp index c5c3bad288..2022d171f5 100644 --- a/src/os2/pnghand.cpp +++ b/src/os2/pnghand.cpp @@ -22,13 +22,13 @@ # include #endif -#define INCL_DOS -#define INCL_PM -#define INCL_GPI -#include #include "wx/palette.h" #include "wx/bitmap.h" #include "wx/utils.h" + +#define INCL_PM +#include + #include "wx/os2/pngread.h" extern "C" { diff --git a/src/os2/thread.cpp b/src/os2/thread.cpp index a26fbf6e4b..79040df69e 100644 --- a/src/os2/thread.cpp +++ b/src/os2/thread.cpp @@ -239,6 +239,28 @@ void wxCondition::Broadcast() } } +// ---------------------------------------------------------------------------- +// wxCriticalSection implementation +// ---------------------------------------------------------------------------- + +wxCriticalSection::wxCriticalSection() +{ +} + +wxCriticalSection::~wxCriticalSection() +{ +} + +void wxCriticalSection::Enter() +{ + ::DosEnterCritSec(); +} + +void wxCriticalSection::Leave() +{ + ::DosExitCritSec(); +} + // ---------------------------------------------------------------------------- // wxThread implementation // ---------------------------------------------------------------------------- diff --git a/src/os2/timer.cpp b/src/os2/timer.cpp index 6ae0e005b0..54c26cbbeb 100644 --- a/src/os2/timer.cpp +++ b/src/os2/timer.cpp @@ -31,7 +31,6 @@ #include #include - // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index 9c2ea76d18..7183147cf2 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -738,12 +738,16 @@ void wxDisplaySize( { HPS hpsScreen; HDC hdcScreen; + LONG lWidth; + LONG lHeight; hpsScreen = ::WinGetScreenPS(HWND_DESKTOP); hdcScreen = ::GpiQueryDevice(hpsScreen); - ::DevQueryCaps(hdcScreen, CAPS_WIDTH, 1L, (PLONG)pWidth); - ::DevQueryCaps(hdcScreen, CAPS_HEIGHT, 1L, (PLONG)pHeight); + ::DevQueryCaps(hdcScreen, CAPS_WIDTH, 1L, &lWidth); + ::DevQueryCaps(hdcScreen, CAPS_HEIGHT, 1L, &lHeight); DevCloseDC(hdcScreen); + *pWidth = (int)lWidth; + *pHeight = (int)lHeight; } bool wxDirExists( diff --git a/src/os2/utilsexc.cpp b/src/os2/utilsexc.cpp index 88048a5d18..19afebe4d9 100644 --- a/src/os2/utilsexc.cpp +++ b/src/os2/utilsexc.cpp @@ -25,10 +25,6 @@ #include "wx/os2/private.h" -#define INCL_DOSPROCESS -#define INCL_DOSERRORS -#define INCL_DOS -#include #define PURE_32 #include #include diff --git a/src/os2/wave.cpp b/src/os2/wave.cpp index bf21d37303..ed70fafdb8 100644 --- a/src/os2/wave.cpp +++ b/src/os2/wave.cpp @@ -20,9 +20,6 @@ #include "wx/os2/wave.h" #include "wx/os2/private.h" -#define INCL_DOS -#define INCL_PM -#include #ifdef RECT #undef RECT #endif