diff options
author | Deron Johnson <deron.johnson@sun.com> | 2006-03-13 21:59:05 +0000 |
---|---|---|
committer | Deron Johnson <deron.johnson@sun.com> | 2006-03-13 21:59:05 +0000 |
commit | 32cba66971545abf95e272cce635a8b0df882272 (patch) | |
tree | 88b207db51f3f6ceb569f9ee8d99b59b7683e3cc /src | |
parent | 71a706971e7b4d82c128eb82ede2b7e573c0642b (diff) | |
download | xorg-lib-libXcomposite-32cba66971545abf95e272cce635a8b0df882272.tar.gz |
Part 2 of 3 (Other parts are in proto and xserver) Composite Version 0.3:
CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version
4.0: XFixesHideCursor, XFixesShowCursor
Diffstat (limited to 'src')
-rw-r--r-- | src/Xcomposite.c | 63 | ||||
-rw-r--r-- | src/xcompositeint.h | 26 |
2 files changed, 85 insertions, 4 deletions
diff --git a/src/Xcomposite.c b/src/Xcomposite.c index e056edd..0a359c0 100644 --- a/src/Xcomposite.c +++ b/src/Xcomposite.c @@ -1,6 +1,26 @@ /* * $Id$ * + * Copyright © 2006 Sun Microsystems + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its @@ -83,7 +103,6 @@ XCompositeExtAddDisplay (XCompositeExtInfo *extinfo, const char *ext_name) { XCompositeExtDisplayInfo *info; - int ev; info = (XCompositeExtDisplayInfo *) Xmalloc (sizeof (XCompositeExtDisplayInfo)); if (!info) return NULL; @@ -331,3 +350,45 @@ XCompositeNameWindowPixmap (Display *dpy, Window window) SyncHandle (); return pixmap; } + +Window +XCompositeGetOverlayWindow (Display *dpy, Window window) +{ + XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); + xCompositeGetOverlayWindowReq *req; + xCompositeGetOverlayWindowReply rep; + + XCompositeCheckExtension (dpy, info, 0); + LockDisplay (dpy); + GetReq (CompositeGetOverlayWindow, req); + req->reqType = info->codes->major_opcode; + req->compositeReqType = X_CompositeGetOverlayWindow; + req->window = window; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + UnlockDisplay (dpy); + SyncHandle (); + + return rep.overlayWin; +} + +void +XCompositeReleaseOverlayWindow (Display *dpy, Window window) +{ + XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); + xCompositeReleaseOverlayWindowReq *req; + + XCompositeSimpleCheckExtension (dpy, info); + LockDisplay (dpy); + GetReq (CompositeReleaseOverlayWindow, req); + req->reqType = info->codes->major_opcode; + req->compositeReqType = X_CompositeReleaseOverlayWindow; + req->window = window; + UnlockDisplay (dpy); + SyncHandle (); +} diff --git a/src/xcompositeint.h b/src/xcompositeint.h index 27f1b49..4ed633c 100644 --- a/src/xcompositeint.h +++ b/src/xcompositeint.h @@ -1,6 +1,26 @@ /* * $Id$ * + * Copyright © 2006 Sun Microsystems + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its @@ -22,8 +42,8 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _XDAMAGEINT_H_ -#define _XDAMAGEINT_H_ +#ifndef _XCOMPOSITEINT_H_ +#define _XCOMPOSITEINT_H_ #define NEED_EVENTS #define NEED_REPLIES @@ -63,4 +83,4 @@ XCompositeFindDisplay (Display *dpy); #define XCompositeSimpleCheckExtension(dpy,i) \ if (!XCompositeHasExtension(i)) { return; } -#endif /* _XDAMAGEINT_H_ */ +#endif /* _XCOMPOSITEINT_H_ */ |