#ifndef _WX_PRIVATE_H_
#define _WX_PRIVATE_H_
-#define INCL_DOS
+#define INCL_BASE
#define INCL_PM
+#define INCL_GPI
+#define INCL_WINSYS
+#define INCL_SHLERRORS
#include <os2.h>
class WXDLLEXPORT wxFont;
#define IBS_HORZCAPTION 0x4000L
#define IBS_VERTCAPTION 0x8000L
- UINT WINAPI ibGetCaptionSize( HWND hWnd ) ;
- UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
- LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
- VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
+ UINT APIENTRY ibGetCaptionSize( HWND hWnd ) ;
+ UINT APIENTRY ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
+ MRESULT APIENTRY ibDefWindowProc( HWND hWnd, ULONG ulMsg, MPARAM wParam, MPARAM lParam ) ;
+ VOID APIENTRY ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
#endif // wxUSE_ITSY_BITSY
/*
#define STATIC_CLASS _T("STATIC")
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
-#define CHECK_CLASS "BUTTON"
+#define CHECK_CLASS _T("BUTTON")
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
#define CHECK_IS_FAFA FALSE
-#define RADIO_CLASS "BUTTON"
+#define RADIO_CLASS _T("BUTTON" )
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
#define RADIO_SIZE 20
#define RADIO_IS_FAFA FALSE
// Generic subclass proc, for panel item moving/sizing and intercept
// EDIT control VK_RETURN messages
-extern LONG APIENTRY _EXPORT
- wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam);
+extern LONG APIENTRY wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam);
// ---------------------------------------------------------------------------
// constants which might miss from some compilers' headers
// ---------------------------------------------------------------------------
#if !defined(WS_EX_CLIENTEDGE)
- #define WS_EX_CLIENTEDGE 0
+ #define WS_EX_CLIENTEDGE 0x00000200L
#endif
#ifndef ENDSESSION_LOGOFF
#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 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 wxWindows 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 FARPROC) wxGenericControlSubClassProc;
+WXDLLEXPORT_DATA(extern) wxGenericControlSubClassProc;
WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;
WXDLLEXPORT HINSTANCE wxGetInstance();
}
+WXDLLEXPORT void wxDrawBorder( HPS hPS
+ ,RECTL& rRect
+ ,WXDWORD dwStyle
+ );
+
WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd);
-WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font);
-WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, wxFont *font);
-WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont);
+WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font);
+WXDLLEXPORT void wxFillLogFont( LOGFONT* pLogFont
+ ,PFACENAMEDESC pFaceName
+ ,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);
// 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)
{
wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0;
}
+
#endif
// _WX_PRIVATE_H_