mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 23:53:54 +00:00
move public mdata to pub
This commit is contained in:
parent
8a91b0e572
commit
4ac4864a61
20
window/pub.h
20
window/pub.h
@ -10,6 +10,22 @@
|
|||||||
|
|
||||||
// #include "../base/os.h"
|
// #include "../base/os.h"
|
||||||
|
|
||||||
|
struct _MData{
|
||||||
|
#if defined(IS_MACOSX)
|
||||||
|
CGWindowID CgID; // Handle to a CGWindowID
|
||||||
|
AXUIElementRef AxID; // Handle to a AXUIElementRef
|
||||||
|
#elif defined(USE_X11)
|
||||||
|
Window XWin; // Handle to an X11 window
|
||||||
|
#elif defined(IS_WINDOWS)
|
||||||
|
HWND HWnd; // Handle to a window HWND
|
||||||
|
TCHAR Title[512];
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct _MData MData;
|
||||||
|
|
||||||
|
MData mData;
|
||||||
|
|
||||||
#if defined(IS_MACOSX)
|
#if defined(IS_MACOSX)
|
||||||
|
|
||||||
static Boolean(*gAXIsProcessTrustedWithOptions) (CFDictionaryRef);
|
static Boolean(*gAXIsProcessTrustedWithOptions) (CFDictionaryRef);
|
||||||
@ -24,8 +40,8 @@
|
|||||||
|
|
||||||
// Create array storing window
|
// Create array storing window
|
||||||
CGWindowID window[1] = { win };
|
CGWindowID window[1] = { win };
|
||||||
CFArrayRef wlist = CFArrayCreate(NULL,
|
CFArrayRef wlist = CFArrayCreate(NULL,
|
||||||
(const void**)window, 1, NULL);
|
(const void**)window, 1, NULL);
|
||||||
|
|
||||||
// Get window info
|
// Get window info
|
||||||
CFArrayRef info = CGWindowListCreateDescriptionFromArray(wlist);
|
CFArrayRef info = CGWindowListCreateDescriptionFromArray(wlist);
|
||||||
|
@ -13,22 +13,6 @@
|
|||||||
#include "process.h"
|
#include "process.h"
|
||||||
#include "pub.h"
|
#include "pub.h"
|
||||||
|
|
||||||
struct _MData{
|
|
||||||
#if defined(IS_MACOSX)
|
|
||||||
CGWindowID CgID; // Handle to a CGWindowID
|
|
||||||
AXUIElementRef AxID; // Handle to a AXUIElementRef
|
|
||||||
#elif defined(USE_X11)
|
|
||||||
Window XWin; // Handle to an X11 window
|
|
||||||
#elif defined(IS_WINDOWS)
|
|
||||||
HWND HWnd; // Handle to a window HWND
|
|
||||||
TCHAR Title[512];
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct _MData MData;
|
|
||||||
|
|
||||||
MData mData;
|
|
||||||
|
|
||||||
bool setHandle(uintptr handle);
|
bool setHandle(uintptr handle);
|
||||||
bool IsValid();
|
bool IsValid();
|
||||||
bool IsAxEnabled(bool options);
|
bool IsAxEnabled(bool options);
|
||||||
|
Loading…
Reference in New Issue
Block a user