mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-09 18:13:55 +00:00
Fixed CI build
This commit is contained in:
parent
d82ca8cee4
commit
5d460e5100
@ -5,8 +5,7 @@
|
|||||||
/* Python versions under 2.5 don't support this macro, but it's not
|
/* Python versions under 2.5 don't support this macro, but it's not
|
||||||
* terribly difficult to replicate: */
|
* terribly difficult to replicate: */
|
||||||
#ifndef PyModule_AddIntMacro
|
#ifndef PyModule_AddIntMacro
|
||||||
#define PyModule_AddIntMacro(module, macro) \
|
#define PyModule_AddIntMacro(module, macro) PyModule_AddIntConstant(module, #macro, macro)
|
||||||
PyModule_AddIntConstant(module, #macro, macro)
|
|
||||||
#endif /* PyModule_AddIntMacro */
|
#endif /* PyModule_AddIntMacro */
|
||||||
|
|
||||||
#if !defined(IS_MACOSX) && defined(__APPLE__) && defined(__MACH__)
|
#if !defined(IS_MACOSX) && defined(__APPLE__) && defined(__MACH__)
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "inline_keywords.h" /* For H_INLINE */
|
#include "inline_keywords.h" /* For H_INLINE */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
/* Some generic, cross-platform types. */
|
/* Some generic, cross-platform types. */
|
||||||
#ifdef RobotGo_64
|
#ifdef RobotGo_64
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
void X_KEY_EVENT_WAIT(Display *display, MMKeyCode key, bool is_press) {
|
void X_KEY_EVENT_WAIT(Display *display, MMKeyCode key, bool is_press) {
|
||||||
X_KEY_EVENT(display, key, is_press);
|
X_KEY_EVENT(display, key, is_press);
|
||||||
microsleep(DEADBEEF_UNIFORM(0.0, 0.5);
|
microsleep(DEADBEEF_UNIFORM(0.0, 0.5));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ void dragMouse(MMPointInt32 point, const MMMouseButton button){
|
|||||||
#if defined(IS_MACOSX)
|
#if defined(IS_MACOSX)
|
||||||
const CGEventType dragType = MMMouseDragToCGEventType(button);
|
const CGEventType dragType = MMMouseDragToCGEventType(button);
|
||||||
CGEventRef drag = CGEventCreateMouseEvent(NULL, dragType,
|
CGEventRef drag = CGEventCreateMouseEvent(NULL, dragType,
|
||||||
CGPointFromMMPoint(point), (CGMouseButton)button);
|
CGPointFromMMPointInt32(point), (CGMouseButton)button);
|
||||||
|
|
||||||
calculateDeltas(&drag, point);
|
calculateDeltas(&drag, point);
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ MMPointInt32 getMousePos() {
|
|||||||
/* Press down a button, or release it. */
|
/* Press down a button, or release it. */
|
||||||
void toggleMouse(bool down, MMMouseButton button) {
|
void toggleMouse(bool down, MMMouseButton button) {
|
||||||
#if defined(IS_MACOSX)
|
#if defined(IS_MACOSX)
|
||||||
const CGPoint currentPos = CGPointFromMMPoint(getMousePos());
|
const CGPoint currentPos = CGPointFromMMPointInt32(getMousePos());
|
||||||
const CGEventType mouseType = MMMouseToCGEventType(down, button);
|
const CGEventType mouseType = MMMouseToCGEventType(down, button);
|
||||||
CGEventRef event = CGEventCreateMouseEvent(NULL, mouseType, currentPos, (CGMouseButton)button);
|
CGEventRef event = CGEventCreateMouseEvent(NULL, mouseType, currentPos, (CGMouseButton)button);
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ void clickMouse(MMMouseButton button){
|
|||||||
void doubleClick(MMMouseButton button){
|
void doubleClick(MMMouseButton button){
|
||||||
#if defined(IS_MACOSX)
|
#if defined(IS_MACOSX)
|
||||||
/* Double click for Mac. */
|
/* Double click for Mac. */
|
||||||
const CGPoint currentPos = CGPointFromMMPoint(getMousePos());
|
const CGPoint currentPos = CGPointFromMMPointInt32(getMousePos());
|
||||||
const CGEventType mouseTypeDown = MMMouseToCGEventType(true, button);
|
const CGEventType mouseTypeDown = MMMouseToCGEventType(true, button);
|
||||||
const CGEventType mouseTypeUP = MMMouseToCGEventType(false, button);
|
const CGEventType mouseTypeUP = MMMouseToCGEventType(false, button);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user