X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9794cae1b3dfa05331cdfdb976b409f05ac4648e..8ccff7d2116057a0e79db28491a6c7fdf4051a58:/include/wx/os2/private.h diff --git a/include/wx/os2/private.h b/include/wx/os2/private.h index 7b57d7f594..74c0a023d6 100644 --- a/include/wx/os2/private.h +++ b/include/wx/os2/private.h @@ -35,7 +35,6 @@ #endif #include "wx/fontenc.h" -#include "wx/colour.h" class WXDLLEXPORT wxFont; class WXDLLEXPORT wxWindow; @@ -121,6 +120,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxCanvasClassNameNR; // standard icons from the resources // --------------------------------------------------------------------------- +#if wxUSE_GUI + WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON; WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON; WXDLLEXPORT_DATA(extern HICON) wxSTD_MDICHILDFRAME_ICON; @@ -129,6 +130,8 @@ WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON; WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; +#endif // wxUSE_GUI + // --------------------------------------------------------------------------- // this defines a CASTWNDPROC macro which casts a pointer to the type of a // window proc for PM. @@ -184,10 +187,14 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM); // Scale font to get edit control height #define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) +#if wxUSE_GUI + // Generic subclass proc, for panel item moving/sizing and intercept // EDIT control VK_RETURN messages extern LONG APIENTRY wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam); +#endif + // --------------------------------------------------------------------------- // constants which might miss from some compilers' headers // --------------------------------------------------------------------------- @@ -246,7 +253,7 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0); // --------------------------------------------------------------------------- // The MakeProcInstance version of the function wxSubclassedGenericControlProc -WXDLLEXPORT_DATA(extern) wxGenericControlSubClassProc; +WXDLLEXPORT_DATA(extern int) wxGenericControlSubClassProc; WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; @@ -259,13 +266,29 @@ 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 + +#if wxUSE_GUI + 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); @@ -343,6 +366,10 @@ WXDLLEXPORT extern wxBitmap wxDisableBitmap( const wxBitmap& rBmp ,long lColor ); +#include "wx/colour.h" + WXDLLEXPORT extern COLORREF wxColourToRGB(const wxColour& rColor); -#endif // _WX_PRIVATE_H_ +#endif // wxUSE_GUI + +#endif // _WX_PRIVATE_H_