Xfixesint.h revision 4456fccd
1/* 2 * $XFree86: xc/lib/Xfixes/Xfixesint.h,v 1.1 2002/11/30 06:21:45 keithp Exp $ 3 * 4 * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. 5 * 6 * Permission to use, copy, modify, distribute, and sell this software and its 7 * documentation for any purpose is hereby granted without fee, provided that 8 * the above copyright notice appear in all copies and that both that 9 * copyright notice and this permission notice appear in supporting 10 * documentation, and that the name of Keith Packard not be used in 11 * advertising or publicity pertaining to distribution of the software without 12 * specific, written prior permission. Keith Packard makes no 13 * representations about the suitability of this software for any purpose. It 14 * is provided "as is" without express or implied warranty. 15 * 16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 22 * PERFORMANCE OF THIS SOFTWARE. 23 */ 24 25#ifndef _XFIXESINT_H_ 26#define _XFIXESINT_H_ 27 28#define NEED_EVENTS 29#define NEED_REPLIES 30#include <stdio.h> 31#include <X11/Xlib.h> 32#include <X11/Xlibint.h> 33#include <X11/Xutil.h> 34#include "Xfixes.h" 35#include <X11/extensions/xfixesproto.h> 36 37extern char XFixesExtensionName[]; 38 39typedef struct _XFixesExtDisplayInfo { 40 struct _XFixesExtDisplayInfo *next; /* keep a linked list */ 41 Display *display; /* which display this is */ 42 XExtCodes *codes; /* the extension protocol codes */ 43 int major_version; /* -1 means we don't know */ 44 int minor_version; /* -1 means we don't know */ 45} XFixesExtDisplayInfo; 46 47/* replaces XExtensionInfo */ 48typedef struct _XFixesExtInfo { 49 XFixesExtDisplayInfo *head; /* start of the list */ 50 XFixesExtDisplayInfo *cur; /* most recently used */ 51 int ndisplays; /* number of displays */ 52} XFixesExtInfo; 53 54extern XFixesExtInfo XFixesExtensionInfo; 55extern char XFixesExtensionName[]; 56 57XFixesExtDisplayInfo * 58XFixesFindDisplay (Display *dpy); 59 60#define XFixesHasExtension(i) ((i) && ((i)->codes)) 61 62#define XFixesCheckExtension(dpy,i,val) \ 63 if (!XFixesHasExtension(i)) { return val; } 64 65#define XFixesSimpleCheckExtension(dpy,i) \ 66 if (!XFixesHasExtension(i)) { return; } 67 68#endif /* _XFIXESINT_H_ */ 69