diff options
author | runge <runge> | 2006-11-13 15:33:00 +0000 |
---|---|---|
committer | runge <runge> | 2006-11-13 15:33:00 +0000 |
commit | 4a83f87609b9d53b2983806be58ccd02498a5cd3 (patch) | |
tree | a79c96930a97fb162edd1765adece43425f8db8a /x11vnc/xwrappers.c | |
parent | 5f9693d4a2c511f8f2ea069373807c5f36ac1459 (diff) | |
download | libtdevnc-4a83f87609b9d53b2983806be58ccd02498a5cd3.tar.gz libtdevnc-4a83f87609b9d53b2983806be58ccd02498a5cd3.zip |
x11vnc: Native Mac OS X support.
Diffstat (limited to 'x11vnc/xwrappers.c')
-rw-r--r-- | x11vnc/xwrappers.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/x11vnc/xwrappers.c b/x11vnc/xwrappers.c index 2849d3d..77f3016 100644 --- a/x11vnc/xwrappers.c +++ b/x11vnc/xwrappers.c @@ -75,6 +75,12 @@ int xauth_raw(int on); Display *XOpenDisplay_wr(char *display_name); int XCloseDisplay_wr(Display *display); +Bool XQueryPointer_wr(Display *display, Window w, Window *root_return, + Window *child_return, int *root_x_return, int *root_y_return, + int *win_x_return, int *win_y_return, unsigned int *mask_return); + +int XFree_wr(void *data); + void copy_raw_fb(XImage *dest, int x, int y, unsigned int w, unsigned int h); static void upup_downdown_warning(KeyCode key, Bool down); @@ -1057,6 +1063,59 @@ int XCloseDisplay_wr(Display *display) { #endif /* NO_X11 */ } +Bool XQueryPointer_wr(Display *display, Window w, Window *root_return, + Window *child_return, int *root_x_return, int *root_y_return, + int *win_x_return, int *win_y_return, unsigned int *mask_return) { + +#if NO_X11 + return False; +#else + if (! display) { + return False; + } + return XQueryPointer(display, w, root_return, child_return, + root_x_return, root_y_return, win_x_return, win_y_return, + mask_return); +#endif /* NO_X11 */ +} + + +Status XQueryTree_wr(Display *display, Window w, Window *root_return, + Window *parent_return, Window **children_return, + unsigned int *nchildren_return) { + +#ifdef MACOSX + if (! display) { + return macosx_xquerytree(w, root_return, parent_return, + children_return, nchildren_return); + } +#endif +#if NO_X11 + return (Status) 0; +#else + if (! display) { + return (Status) 0; + } + return XQueryTree(display, w, root_return, parent_return, + children_return, nchildren_return); +#endif /* NO_X11 */ + +} + +int XFree_wr(void *data) { + if (data == NULL) { + return 1; + } + if (! dpy) { + return 1; + } +#if NO_X11 + return 1; +#else + return XFree(data); +#endif +} + void nox11_exit(int rc) { #if NO_X11 rfbLog("This x11vnc was not built with X11 support.\n"); @@ -1066,6 +1125,7 @@ void nox11_exit(int rc) { #endif } + #if NO_X11 #include "nox11_funcs.h" #endif |