X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88a7a4e10ed18f81a576dcd866cfbf02bf404c00..6c73e20df7f3a7ea8c2059a816ffd3655ea2b848:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index d49aaf21a1..068003159d 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -14,11 +14,12 @@ // #include "wx/wxprec.h" +#include "wx/window.h" + #ifndef WX_PRECOMP #define INCL_DOS #define INCL_PM #include - #include "wx/window.h" #include "wx/accel.h" #include "wx/menu.h" #include "wx/dc.h" @@ -44,6 +45,8 @@ #include "wx/toolbar.h" #include "wx/settings.h" #include "wx/intl.h" + #include "wx/log.h" + #include "wx/textctrl.h" #include #endif @@ -56,7 +59,6 @@ #endif #include "wx/menuitem.h" -#include "wx/log.h" #include "wx/os2/private.h" @@ -72,11 +74,6 @@ #include "wx/caret.h" #endif // wxUSE_CARET -#include "wx/log.h" - - -#include "wx/textctrl.h" - #include // @@ -2395,9 +2392,6 @@ MRESULT wxWindowOS2::OS2WindowProc( WXUINT uMsg, case WM_BUTTON3MOTIONEND: case WM_BUTTON3MOTIONSTART: { - if (uMsg == WM_BUTTON1DOWN && AcceptsFocus()) - SetFocus(); - short nX = LOWORD(wParam); short nY = HIWORD(wParam); @@ -3295,7 +3289,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId, { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str()); + wxLogError(_T("Unable to set current color table (1). Error: %s\n"), sError.c_str()); } // // Set the color table to RGB mode @@ -3310,7 +3304,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId, { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str()); + wxLogError(_T("Unable to set current color table (2). Error: %s\n"), sError.c_str()); } wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE ); @@ -4496,6 +4490,18 @@ int wxCharCodeWXToOS2( int nId, return nKeySym; } // end of wxCharCodeWXToOS2 + +bool wxGetKeyState(wxKeyCode key) +{ + wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != + WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons")); + + // TODO + + return false; +} + + wxWindow* wxGetActiveWindow() { HWND hWnd = ::WinQueryActiveWindow(HWND_DESKTOP); @@ -5035,12 +5041,20 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& rPt) // Get the current mouse position. wxPoint wxGetMousePosition() { - POINTL vPt; + POINTL vPt; ::WinQueryPointerPos(HWND_DESKTOP, &vPt); return wxPoint(vPt.x, vPt.y); } +wxMouseState wxGetMouseState() +{ + wxMouseState ms; + // TODO + return ms; +} + + wxWindowOS2* FindWindowForMouseEvent( wxWindow* pWin, short* WXUNUSED(pnX), short* WXUNUSED(pnY) )