diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-01 20:55:27 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-01 11:07:46 +0200 |
commit | 9bc6ff269aa8bf4c41696ebf4a686c93729ba151 (patch) | |
tree | 31359d2d0b38f0cdae2313217c02f059ec55dc4f /nx-X11/lib/Xext/Xcup.c | |
parent | c646808bcb0fe95e9794409231a9fa8b51990971 (diff) | |
download | nx-libs-9bc6ff269aa8bf4c41696ebf4a686c93729ba151.tar.gz nx-libs-9bc6ff269aa8bf4c41696ebf4a686c93729ba151.tar.bz2 nx-libs-9bc6ff269aa8bf4c41696ebf4a686c93729ba151.zip |
Drop X11 extensions not shipped with recent X.Org server versions anymore:
include/extensions: Xag.h, Xagsrv.h, Xagstr.h
Xserver/Xext: appgroup.c, appgroup.h
lib/Xext: XAppgroup.c
include/extensions: Xcup.h, Xcupstr.h,
Xserver/Xext: cup.c
lib/Xext: cup.c
include/extensions: Xdbe.h
Xserver/Xext: Xdbe.c
Xserver/Xext: dgaproc.h, xf86dga.c, xf86dga2.c, xf86dgaext.h
include/extensions: Xevie.h, Xeviestr.h
include/extensions: XEVI.h, XEVIstr.h
Xserver/Xext: EVI.c, EVIstruct.h, sampleEVI.c
lib/Xext: XEVI.c
include/extensions: fontcache.h, fontcacheP.h, fontcachstr.h
Xserver/Xext: fontcache.c
include/extensions: lbxbuf.h, lbxbufstr.h, lbxdeltastr.h, lbximage.h, lbxopts.h, lbxstr.h, lbxzlib.h
lib/Xext: XLbx.c
include/extensions: multibuf.h, multibufst.h
lib/Xext: XMultibuf.c
Xserver/Xext: mbuf.c, mbufbf.c, mbufpx.c
include/extensions: xf86vmode.h, xf86vmstr.h
Xserver/Xext: vidmodeproc.h, xf86vmode.c
lib/Xext: MITMisc.c
Xserver/Xext: mitmisc.c
Xserver/Xext: xf86misc.c, xf86miscproc.h
Xserver/XTrap: xf86XTrapModule.c, xtrapddmi.c, xtrapdi.c, xtrapdiswp.c, xtrapditbl.c
include/extensions: xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h xtraplibp.h xtrapproto.h
Fixes: ArcticaProject/nx-libs#116
X.org: https://cgit.freedesktop.org/xorg/xserver/commit/?id=cbc20d92de92aad5ca240310a9156ccf97c24a01
Plus: Drop various Imake'ish defines where not needed anymore.
Diffstat (limited to 'nx-X11/lib/Xext/Xcup.c')
-rw-r--r-- | nx-X11/lib/Xext/Xcup.c | 265 |
1 files changed, 0 insertions, 265 deletions
diff --git a/nx-X11/lib/Xext/Xcup.c b/nx-X11/lib/Xext/Xcup.c deleted file mode 100644 index 8bf2bb29e..000000000 --- a/nx-X11/lib/Xext/Xcup.c +++ /dev/null @@ -1,265 +0,0 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */ -/* - -Copyright 1987, 1988, 1998 The Open Group - -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. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ - -#ifdef WIN32 -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <nx-X11/Xwindows.h> -#endif - -#define NEED_EVENTS -#define NEED_REPLIES -#include <nx-X11/Xlibint.h> -#include <nx-X11/extensions/Xcupstr.h> -#include <nx-X11/extensions/Xext.h> -#include <nx-X11/extensions/extutil.h> - -static XExtensionInfo _xcup_info_data; -static XExtensionInfo *xcup_info = &_xcup_info_data; -static char *xcup_extension_name = XCUPNAME; - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks xcup_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xcup_info, - xcup_extension_name, - &xcup_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xcup_info) - - -/***************************************************************************** - * * - * public Xcup Extension routines * - * * - *****************************************************************************/ - -Status -XcupQueryVersion( - Display* dpy, - int* major_version_return, - int* minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupQueryVersionReply rep; - xXcupQueryVersionReq *req; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupQueryVersion; - req->client_major_version = XCUP_MAJOR_VERSION; - req->client_minor_version = XCUP_MINOR_VERSION; - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major_version_return = rep.server_major_version; - *minor_version_return = rep.server_minor_version; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* Win32 reserves 20 colormap entries for its desktop */ -#ifndef TYP_RESERVED_ENTRIES -#define TYP_RESERVED_ENTRIES 20 -#endif - -Status -XcupGetReservedColormapEntries( - Display* dpy, - int screen, - XColor** colors_out, - int* ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupGetReservedColormapEntriesReply rep; - xXcupGetReservedColormapEntriesReq *req; - xColorItem rbuf[TYP_RESERVED_ENTRIES]; - - *ncolors = 0; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupGetReservedColormapEntries, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupGetReservedColormapEntries; - req->screen = screen; - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - if (nentries > TYP_RESERVED_ENTRIES) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - _XRead (dpy, (char*) rbufp, nbytes); - - *colors_out = (XColor*) Xmalloc (nentries * sizeof (XColor)); - if (*colors_out) { - xColorItem* cs = (xColorItem *) rbufp; - XColor* cd = *colors_out; - int i; - - *ncolors = nentries; - for (i = 0; i < *ncolors; i++, cd++) { - cd->pixel = cs->pixel; - cd->red = cs->red; - cd->green = cs->green; - cd->blue = cs->blue; - cs = (xColorItem*) (((char*) cs) + SIZEOF(xColorItem)); - } - if (rbufp != rbuf) XFree ((char*) rbufp); - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - if (rbufp != rbuf) XFree ((char*) rbufp); - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - -Status -XcupStoreColors( - Display* dpy, - Colormap colormap, - XColor* colors_in_out, - int ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupStoreColorsReply rep; - xXcupStoreColorsReq *req; - xColorItem rbuf[256]; - xColorItem citem; - int i; - XColor* xcp; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupStoreColors, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupStoreColors; - req->cmap = colormap; - req->length += (ncolors * SIZEOF(xColorItem)) >> 2; - - for (i = 0, xcp = colors_in_out; i < ncolors; i++, xcp++) { - citem.pixel = xcp->pixel; - citem.red = xcp->red; - citem.green = xcp->green; - citem.blue = xcp->blue; - - /* note that xColorItem doesn't contain all 16-bit quantities, so - we can't use Data16 */ - Data(dpy, (char *)&citem, (long) SIZEOF(xColorItem)); - } - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - xColorItem* cs; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - - if (nentries != ncolors) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - - if (ncolors > 256) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - - } - - _XRead (dpy, (char*) rbufp, nbytes); - - for (i = 0, xcp = colors_in_out, cs = rbufp; i < ncolors; i++, xcp++, cs++) { - xcp->pixel = cs->pixel; - xcp->red = cs->red; - xcp->green = cs->green; - xcp->blue = cs->blue; - xcp->flags = cs->flags; - } - if (rbufp != rbuf) XFree ((char*)rbufp); - - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - |