move public mdata to pub

This commit is contained in:
vcaesar 2018-08-12 08:58:12 -04:00
parent 8a91b0e572
commit 4ac4864a61
2 changed files with 18 additions and 18 deletions

View File

@ -10,6 +10,22 @@
// #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)
static Boolean(*gAXIsProcessTrustedWithOptions) (CFDictionaryRef);
@ -24,8 +40,8 @@
// Create array storing window
CGWindowID window[1] = { win };
CFArrayRef wlist = CFArrayCreate(NULL,
(const void**)window, 1, NULL);
CFArrayRef wlist = CFArrayCreate(NULL,
(const void**)window, 1, NULL);
// Get window info
CFArrayRef info = CGWindowListCreateDescriptionFromArray(wlist);

View File

@ -13,22 +13,6 @@
#include "process.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 IsValid();
bool IsAxEnabled(bool options);