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