11f0ac6a5Smrg/* 21f0ac6a5Smrg * 31f0ac6a5Smrg * Copyright © 2000 SuSE, Inc. 41f0ac6a5Smrg * 51f0ac6a5Smrg * Permission to use, copy, modify, distribute, and sell this software and its 61f0ac6a5Smrg * documentation for any purpose is hereby granted without fee, provided that 71f0ac6a5Smrg * the above copyright notice appear in all copies and that both that 81f0ac6a5Smrg * copyright notice and this permission notice appear in supporting 91f0ac6a5Smrg * documentation, and that the name of SuSE not be used in advertising or 101f0ac6a5Smrg * publicity pertaining to distribution of the software without specific, 111f0ac6a5Smrg * written prior permission. SuSE makes no representations about the 121f0ac6a5Smrg * suitability of this software for any purpose. It is provided "as is" 131f0ac6a5Smrg * without express or implied warranty. 141f0ac6a5Smrg * 151f0ac6a5Smrg * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 161f0ac6a5Smrg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE 171f0ac6a5Smrg * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 181f0ac6a5Smrg * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 196fae4e5dSmrg * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 201f0ac6a5Smrg * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 211f0ac6a5Smrg * 221f0ac6a5Smrg * Author: Keith Packard, SuSE, Inc. 231f0ac6a5Smrg */ 241f0ac6a5Smrg 251f0ac6a5Smrg#ifndef _XRENDERINT_H_ 261f0ac6a5Smrg#define _XRENDERINT_H_ 271f0ac6a5Smrg 28d21ab8bcSmrg#ifdef HAVE_CONFIG_H 29d21ab8bcSmrg#include <config.h> 30d21ab8bcSmrg#endif 311f0ac6a5Smrg#include <X11/Xlibint.h> 321f0ac6a5Smrg#include <X11/Xutil.h> 331f0ac6a5Smrg#include <X11/extensions/renderproto.h> 341f0ac6a5Smrg#include "Xrender.h" 351f0ac6a5Smrg 36d21ab8bcSmrg#ifndef _X_UNUSED 37d21ab8bcSmrg#define _X_UNUSED /* nothing */ 38d21ab8bcSmrg#endif 39d21ab8bcSmrg 401f0ac6a5Smrgtypedef struct { 411f0ac6a5Smrg Visual *visual; 421f0ac6a5Smrg XRenderPictFormat *format; 431f0ac6a5Smrg} XRenderVisual; 441f0ac6a5Smrg 451f0ac6a5Smrgtypedef struct { 461f0ac6a5Smrg int depth; 471f0ac6a5Smrg int nvisuals; 481f0ac6a5Smrg XRenderVisual *visuals; 491f0ac6a5Smrg} XRenderDepth; 501f0ac6a5Smrg 511f0ac6a5Smrgtypedef struct { 521f0ac6a5Smrg XRenderDepth *depths; 531f0ac6a5Smrg int ndepths; 541f0ac6a5Smrg XRenderPictFormat *fallback; 551f0ac6a5Smrg int subpixel; 561f0ac6a5Smrg} XRenderScreen; 571f0ac6a5Smrg 581f0ac6a5Smrgtypedef struct _XRenderInfo { 591f0ac6a5Smrg int major_version; 601f0ac6a5Smrg int minor_version; 611f0ac6a5Smrg XRenderPictFormat *format; 621f0ac6a5Smrg int nformat; 631f0ac6a5Smrg XRenderScreen *screen; 641f0ac6a5Smrg int nscreen; 651f0ac6a5Smrg XRenderDepth *depth; 661f0ac6a5Smrg int ndepth; 671f0ac6a5Smrg XRenderVisual *visual; 681f0ac6a5Smrg int nvisual; 691f0ac6a5Smrg int *subpixel; 701f0ac6a5Smrg int nsubpixel; 711f0ac6a5Smrg char **filter; 721f0ac6a5Smrg int nfilter; 731f0ac6a5Smrg short *filter_alias; 741f0ac6a5Smrg int nfilter_alias; 751f0ac6a5Smrg} XRenderInfo; 761f0ac6a5Smrg 771f0ac6a5Smrg/* replaces XRenderExtDisplayInfo */ 781f0ac6a5Smrgtypedef struct _XRenderExtDisplayInfo { 791f0ac6a5Smrg struct _XRenderExtDisplayInfo *next; /* keep a linked list */ 801f0ac6a5Smrg Display *display; /* which display this is */ 811f0ac6a5Smrg XExtCodes *codes; /* the extension protocol codes */ 821f0ac6a5Smrg XRenderInfo *info; /* extra data for the extension to use */ 831f0ac6a5Smrg} XRenderExtDisplayInfo; 841f0ac6a5Smrg 851f0ac6a5Smrg/* replaces XExtensionInfo */ 861f0ac6a5Smrgtypedef struct _XRenderExtInfo { 871f0ac6a5Smrg XRenderExtDisplayInfo *head; /* start of the list */ 881f0ac6a5Smrg XRenderExtDisplayInfo *cur; /* most recently used */ 891f0ac6a5Smrg int ndisplays; /* number of displays */ 901f0ac6a5Smrg} XRenderExtInfo; 911f0ac6a5Smrg 921f0ac6a5Smrgextern XRenderExtInfo XRenderExtensionInfo; 931f0ac6a5Smrgextern char XRenderExtensionName[]; 941f0ac6a5Smrg 951f0ac6a5SmrgXRenderExtDisplayInfo * 961f0ac6a5SmrgXRenderFindDisplay (Display *dpy); 971f0ac6a5Smrg 981f0ac6a5Smrg#define RenderHasExtension(i) ((i) && ((i)->codes)) 991f0ac6a5Smrg 1001f0ac6a5Smrg#define RenderCheckExtension(dpy,i,val) \ 1011f0ac6a5Smrg if (!RenderHasExtension(i)) { return val; } 1021f0ac6a5Smrg 1031f0ac6a5Smrg#define RenderSimpleCheckExtension(dpy,i) \ 1041f0ac6a5Smrg if (!RenderHasExtension(i)) { return; } 1051f0ac6a5Smrg 1061f0ac6a5Smrg/* 1071f0ac6a5Smrg * Xlib uses long for 32-bit values. Xrender uses int. This 1081f0ac6a5Smrg * matters on alpha. Note that this macro assumes that int is 32 bits 1091f0ac6a5Smrg * except on WORD64 machines where it is 64 bits. 1101f0ac6a5Smrg */ 1111f0ac6a5Smrg 1121f0ac6a5Smrg#ifdef WORD64 113d21ab8bcSmrg#define DataInt32(dpy,d,len) Data32(dpy,(_Xconst long *) (d),len) 1141f0ac6a5Smrg#else 115d21ab8bcSmrg#define DataInt32(dpy,d,len) Data(dpy,(_Xconst char *) (d),len) 1161f0ac6a5Smrg#endif 1171f0ac6a5Smrg 1181f0ac6a5Smrg#endif /* _XRENDERINT_H_ */ 119