+
+#ifndef ENDSESSION_LOGOFF
+ #define ENDSESSION_LOGOFF 0x80000000
+#endif
+
+// ---------------------------------------------------------------------------
+// debug messages -- OS/2 has no native debug output system
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// macros to make casting between WXFOO and FOO a bit easier: the GetFoo()
+// returns Foo cast to the Windows type for oruselves, while GetFooOf() takes
+// an argument which should be a pointer or reference to the object of the
+// corresponding class (this depends on the macro)
+// ---------------------------------------------------------------------------
+
+#define GetHwnd() ((HWND)GetHWND())
+#define GetHwndOf(win) ((HWND)((win)->GetHWND()))
+// old name
+#define GetWinHwnd GetHwndOf
+
+#define GetHdc() ((HDC)GetHDC())
+#define GetHdcOf(dc) ((HDC)(dc).GetHDC())
+
+#define GetHbitmap() ((HBITMAP)GetHBITMAP())
+#define GetHbitmapOf(bmp) ((HBITMAP)(bmp).GetHBITMAP())
+
+#define GetHicon() ((HICON)GetHICON())
+#define GetHiconOf(icon) ((HICON)(icon).GetHICON())
+
+#define GetHaccel() ((HACCEL)GetHACCEL())
+#define GetHaccelOf(table) ((HACCEL)((table).GetHACCEL()))
+
+#define GetHmenu() ((HMENU)GetHMenu())
+#define GetHmenuOf(menu) ((HMENU)menu->GetHMenu())
+
+#define GetHcursor() ((HCURSOR)GetHCURSOR())
+#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR())
+
+#define GetHfont() ((HFONT)GetHFONT())
+#define GetHfontOf(font) ((HFONT)(font).GetHFONT())
+
+// OS/2 convention of the mask is opposed to the wxWidgets one, so we need
+// to invert the mask each time we pass one/get one to/from Windows
+extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0);
+
+// ---------------------------------------------------------------------------
+// global data
+// ---------------------------------------------------------------------------
+
+// The MakeProcInstance version of the function wxSubclassedGenericControlProc
+WXDLLEXPORT_DATA(extern int) wxGenericControlSubClassProc;
+WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
+WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;
+
+// ---------------------------------------------------------------------------
+// global functions
+// ---------------------------------------------------------------------------
+
+extern "C"
+{
+WXDLLEXPORT HINSTANCE wxGetInstance();
+}
+
+WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
+
+#include "wx/thread.h"
+static inline MRESULT MySendMsg(HWND hwnd, ULONG ulMsgid,
+ MPARAM mpParam1, MPARAM mpParam2)
+{
+ MRESULT vRes;
+ vRes = ::WinSendMsg(hwnd, ulMsgid, mpParam1, mpParam2);
+#if wxUSE_THREADS
+ if (!wxThread::IsMain())
+ ::WinPostMsg(hwnd, ulMsgid, mpParam1, mpParam2);
+#endif
+ return vRes;
+}
+#define WinSendMsg MySendMsg
+
+#ifdef __WXPM__
+
+WXDLLEXPORT void wxDrawBorder( HPS hPS
+ ,RECTL& rRect
+ ,WXDWORD dwStyle
+ );
+
+WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd);
+
+WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font);
+
+WXDLLEXPORT void wxConvertVectorFontSize( FIXED fxPointSize
+ ,PFATTRS pFattrs
+ );
+WXDLLEXPORT void wxFillLogFont( LOGFONT* pLogFont
+ ,PFACENAMEDESC pFaceName
+ ,HPS* phPS
+ ,bool* pbInternalPS
+ ,long* pflId
+ ,wxString& sFaceName
+ ,wxFont* pFont
+ );
+WXDLLEXPORT wxFontEncoding wxGetFontEncFromCharSet(int nCharSet);
+WXDLLEXPORT void wxOS2SelectMatchingFontByName( PFATTRS vFattrs
+ ,PFACENAMEDESC pFaceName
+ ,PFONTMETRICS pFM
+ ,int nNumFonts
+ ,const wxFont* pFont
+ );
+WXDLLEXPORT wxFont wxCreateFontFromLogFont( LOGFONT* pLogFont
+ ,PFONTMETRICS pFM
+ ,PFACENAMEDESC pFace
+ );
+WXDLLEXPORT int wxGpiStrcmp(char* s0, char* s1);
+
+WXDLLEXPORT void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos);
+WXDLLEXPORT void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos);
+
+// Find maximum size of window/rectangle
+WXDLLEXPORT extern void wxFindMaxSize(WXHWND hwnd, RECT *rect);
+
+WXDLLEXPORT wxWindow* wxFindControlFromHandle(WXHWND hWnd);
+WXDLLEXPORT void wxAddControlHandle(WXHWND hWnd, wxWindow *item);
+
+// Safely get the window text (i.e. without using fixed size buffer)
+WXDLLEXPORT extern wxString wxGetWindowText(WXHWND hWnd);
+
+// get the window class name
+WXDLLEXPORT extern wxString wxGetWindowClass(WXHWND hWnd);
+
+// get the window id (should be unsigned, hence this is not wxWindowID which
+// is, for mainly historical reasons, signed)
+WXDLLEXPORT extern WXWORD wxGetWindowId(WXHWND hWnd);
+
+// Convert a PM Error code to a string
+WXDLLEXPORT extern wxString wxPMErrorToStr(ERRORID vError);
+
+// Does this window style specify any border?
+inline bool wxStyleHasBorder(long style)
+{
+ return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER |
+ wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0;
+}
+
+inline RECTL wxGetWindowRect(HWND hWnd)
+{
+ RECTL vRect;
+
+ ::WinQueryWindowRect(hWnd, &vRect);
+ return vRect;
+} // end of wxGetWindowRect
+
+WXDLLEXPORT extern void wxOS2SetFont( HWND hWnd
+ ,const wxFont& rFont
+ );
+
+
+WXDLLEXPORT extern bool wxCheckWindowWndProc( WXHWND hWnd
+ ,WXFARPROC fnWndProc
+ );
+WXDLLEXPORT extern wxBitmap wxDisableBitmap( const wxBitmap& rBmp
+ ,long lColor
+ );
+
+#include "wx/colour.h"
+
+WXDLLEXPORT extern COLORREF wxColourToRGB(const wxColour& rColor);
+
+#endif // __WXPM__
+
+#endif // _WX_PRIVATE_H_