From 32cba66971545abf95e272cce635a8b0df882272 Mon Sep 17 00:00:00 2001 From: Deron Johnson Date: Mon, 13 Mar 2006 21:59:05 +0000 Subject: Part 2 of 3 (Other parts are in proto and xserver) Composite Version 0.3: CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version 4.0: XFixesHideCursor, XFixesShowCursor --- ChangeLog | 8 +++++ configure.ac | 2 +- include/X11/extensions/Xcomposite.h | 26 +++++++++++++++ src/Xcomposite.c | 63 ++++++++++++++++++++++++++++++++++++- src/xcompositeint.h | 26 +++++++++++++-- 5 files changed, 120 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b391024..2caa03a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-3-13 Deron Johnson + + * configure.ac + * include/X11/extensions/Xcomposite.h + * src/Xcomposite.c + * src/xcompositeint.h + Composite Version 0.3: CompositeGetOverlayWindow, CompositeReleaseOverlayWindow + 2005-12-14 Kevin E. Martin * configure.ac: diff --git a/configure.ac b/configure.ac index f0c6a0e..665b398 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ dnl protocol, so Xcomposite version l.n.m corresponds to protocol version l.n dnl that 'revision' number appears in Xcomposite.h and has to be manually dnl synchronized. dnl -AC_INIT(libXcomposite, 0.2.2.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXcomposite) +AC_INIT(libXcomposite, 0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXcomposite) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE diff --git a/include/X11/extensions/Xcomposite.h b/include/X11/extensions/Xcomposite.h index 62ae31a..d37a691 100644 --- a/include/X11/extensions/Xcomposite.h +++ b/include/X11/extensions/Xcomposite.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 @@ -66,6 +86,12 @@ XCompositeCreateRegionFromBorderClip (Display *dpy, Window window); Pixmap XCompositeNameWindowPixmap (Display *dpy, Window window); +Window +XCompositeGetOverlayWindow (Display *dpy, Window window); + +void +XCompositeReleaseOverlayWindow (Display *dpy, Window window); + _XFUNCPROTOEND #endif /* _XCOMPOSITE_H_ */ 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_ */ -- cgit v1.2.3