forked from asmagill/hs._asm.axuielement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
25 lines (16 loc) · 851 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
@import Cocoa ;
@import LuaSkin ;
// #import "AXTextMarker.h"
#define USERDATA_TAG "hs._asm.axuielement"
#define OBSERVER_TAG "hs._asm.axuielement.observer"
#define get_axuielementref(L, idx, tag) *((AXUIElementRef*)luaL_checkudata(L, idx, tag))
#define get_axobserverref(L, idx, tag) *((AXObserverRef*)luaL_checkudata(L, idx, tag))
extern BOOL new_application(lua_State* L, pid_t pid) ;
extern void new_window(lua_State* L, AXUIElementRef win) ;
extern int pushAXUIElement(lua_State *L, AXUIElementRef theElement) ;
extern int pushAXObserver(lua_State *L, AXObserverRef theObserver) ;
extern const char *AXErrorAsString(AXError theError) ;
extern int pushCFTypeToLua(lua_State *L, CFTypeRef theItem, int refTable) ;
extern CFTypeRef lua_toCFType(lua_State *L, int idx) ;
int luaopen_hs__asm_axuielement_observer(lua_State* L) ;