3 * Copyright © 2000 SuSE, Inc.
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 SuSE not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission. SuSE makes no representations about the
12 * suitability of this software for any purpose. It is provided "as is"
13 * without express or implied warranty.
15 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 * Author: Keith Packard, SuSE, Inc.
25 #ifndef _XRENDERINT_H_
26 #define _XRENDERINT_H_
29 #include <X11/Xlibint.h>
30 #include <X11/Xutil.h>
31 #include <X11/extensions/renderproto.h>
36 XRenderPictFormat *format;
42 XRenderVisual *visuals;
48 XRenderPictFormat *fallback;
52 typedef struct _XRenderInfo {
55 XRenderPictFormat *format;
57 XRenderScreen *screen;
61 XRenderVisual *visual;
71 /* replaces XRenderExtDisplayInfo */
72 typedef struct _XRenderExtDisplayInfo {
73 struct _XRenderExtDisplayInfo *next; /* keep a linked list */
74 Display *display; /* which display this is */
75 XExtCodes *codes; /* the extension protocol codes */
76 XRenderInfo *info; /* extra data for the extension to use */
77 } XRenderExtDisplayInfo;
79 /* replaces XExtensionInfo */
80 typedef struct _XRenderExtInfo {
81 XRenderExtDisplayInfo *head; /* start of the list */
82 XRenderExtDisplayInfo *cur; /* most recently used */
83 int ndisplays; /* number of displays */
86 extern XRenderExtInfo XRenderExtensionInfo;
87 extern char XRenderExtensionName[];
89 XRenderExtDisplayInfo *
90 XRenderFindDisplay (Display *dpy);
92 #define RenderHasExtension(i) ((i) && ((i)->codes))
94 #define RenderCheckExtension(dpy,i,val) \
95 if (!RenderHasExtension(i)) { return val; }
97 #define RenderSimpleCheckExtension(dpy,i) \
98 if (!RenderHasExtension(i)) { return; }
101 * Xlib uses long for 32-bit values. Xrender uses int. This
102 * matters on alpha. Note that this macro assumes that int is 32 bits
103 * except on WORD64 machines where it is 64 bits.
107 #define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len)
109 #define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
112 #endif /* _XRENDERINT_H_ */