// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include <wx/defs.h>
-#include <wx/uiaction.h>
+#include "wx/defs.h"
+
+#if wxUSE_UIACTIONSIMULATOR
+
+#include "wx/uiaction.h"
#include <ApplicationServices/ApplicationServices.h>
return kCGEventRightMouseDown;
else
return kCGEventRightMouseUp;
-
- // Apparently all other buttons use the constant OtherMouseDown
-
+
+ // Apparently all other buttons use the constant OtherMouseDown
+
default:
if (isDown)
return kCGEventOtherMouseDown;
{
CGPoint pos;
int x, y;
- wxGetMousePosition(&x, &y);
+ wxGetMousePosition(&x, &y);
pos.x = x;
pos.y = y;
CGEventType type = CGEventTypeForMouseButton(button, true);
CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, button);
CGEventSetType(event, type);
-
+
if (event)
{
CGEventPost(tap, event);
CGEventType type = kCGEventMouseMoved;
CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, kCGMouseButtonLeft);
CGEventSetType(event, type);
-
+
if (event)
{
CGEventPost(tap, event);
}
CFRelease(event);
-
+
return true;
}
{
CGPoint pos;
int x, y;
- wxGetMousePosition(&x, &y);
+ wxGetMousePosition(&x, &y);
pos.x = x;
pos.y = y;
CGEventType type = CGEventTypeForMouseButton(button, false);
CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, button);
CGEventSetType(event, type);
-
+
if (event)
{
CGEventPost(tap, event);
SendCharCode((CGCharCode)58, false);
if (cmdDown)
SendCharCode((CGCharCode)55, false);
-
+
return true;
}
+#endif // wxUSE_UIACTIONSIMULATOR