mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
Fixed windows warning and x11 error
This commit is contained in:
parent
477a7b473c
commit
63f914ae62
@ -60,4 +60,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RobotGo_64
|
||||
typedef int64_t intptr;
|
||||
typedef uint64_t uintptr;
|
||||
#else
|
||||
typedef int32_t intptr;
|
||||
typedef uint32_t uintptr; // Unsigned pointer integer
|
||||
#endif
|
||||
|
||||
#endif /* OS_H */
|
||||
|
@ -15,6 +15,7 @@ package robotgo
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/robotn/xgb"
|
||||
@ -185,11 +186,11 @@ func Alert(title, msg string, args ...string) bool {
|
||||
` -title ` + title + ` -buttons ` + defaultBtn + ":0," + cancelBtn + ":1" + ` -default Ok`
|
||||
out, err := Run(c)
|
||||
if err != nil {
|
||||
fmt.Println("Alert: ", err, ". ", strint(out))
|
||||
fmt.Println("Alert: ", err, ". ", string(out))
|
||||
return false
|
||||
}
|
||||
|
||||
if strint(out) == "1" {
|
||||
if string(out) == "1" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
@ -95,7 +95,7 @@ MMBitmapRef copyMMBitmapFromDisplayInRect(MMRectInt32 rect, int32_t display_id)
|
||||
if (display_id == -1) {
|
||||
screen = GetDC(NULL); /* Get entire screen */
|
||||
} else {
|
||||
screen = GetDC((HWND) display_id);
|
||||
screen = GetDC((HWND) (uintptr) display_id);
|
||||
}
|
||||
if (screen == NULL) { return NULL; }
|
||||
|
||||
|
@ -15,14 +15,6 @@
|
||||
#include <X11/Xatom.h>
|
||||
#endif
|
||||
|
||||
#ifdef RobotGo_64
|
||||
typedef int64_t intptr;
|
||||
typedef uint64_t uintptr;
|
||||
#else
|
||||
typedef int32_t intptr;
|
||||
typedef uint32_t uintptr; // Unsigned pointer integer
|
||||
#endif
|
||||
|
||||
struct _MData{
|
||||
#if defined(IS_MACOSX)
|
||||
CGWindowID CgID; // Handle to a CGWindowID
|
||||
|
Loading…
Reference in New Issue
Block a user