updating implementations of wxGetMouseState for osx_cocoa and dummy impls for iphone

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-11-13 18:30:00 +00:00
parent 8ddda15ba5
commit f3769d53f7
3 changed files with 58 additions and 6 deletions

View File

@@ -1323,6 +1323,12 @@ int wxMacKeyCodeToModifier(wxKeyCode key)
}
#endif
#if wxOSX_USE_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
// defined in utils.mm
#elif wxOSX_USE_CARBON_OR_COCOA
wxMouseState wxGetMouseState()
{
wxMouseState ms;
@@ -1331,7 +1337,6 @@ wxMouseState wxGetMouseState()
ms.SetX(pt.x);
ms.SetY(pt.y);
#if wxOSX_USE_CARBON
UInt32 buttons = GetCurrentButtonState();
ms.SetLeftDown( (buttons & 0x01) != 0 );
ms.SetMiddleDown( (buttons & 0x04) != 0 );
@@ -1342,12 +1347,12 @@ wxMouseState wxGetMouseState()
ms.SetShiftDown(modifiers & shiftKey);
ms.SetAltDown(modifiers & optionKey);
ms.SetMetaDown(modifiers & cmdKey);
#else
// TODO
#endif
return ms;
}
#endif
// TODO : once the new key/char handling is tested, move all the code to wxWindow
bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar )