1 /* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */
2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5 Copyright (c) 2002 Apple Computer, Inc.
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the
10 "Software"), to deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sub license, and/or sell copies of the Software, and to
13 permit persons to whom the Software is furnished to do so, subject to
14 the following conditions:
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial portions
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
23 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
24 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 **************************************************************************/
32 * Jens Owen <jens@precisioninsight.com>
39 #include "dri-surface.h"
42 #define DRI_MAX_DRAWABLES 256
44 #define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \
45 ((DRIWindowPrivIndex < 0) ? \
47 ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr)))
49 #define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \
50 ((DRIPixmapPrivIndex < 0) ? \
52 ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIPixmapPrivIndex].ptr)))
54 typedef struct _DRIDrawablePrivRec
62 x_list *notifiers; /* list of (FUN . DATA) */
64 int x, y; /* relative to physical window */
67 unsigned int rowbytes;
68 PixmapPtr pixmap, oldPixmap;
70 unsigned int is_drawing :1;
71 } DRIDrawablePrivRec, *DRIDrawablePrivPtr;
73 #define DRI_SCREEN_PRIV(pScreen) \
74 ((DRIScreenPrivIndex < 0) ? \
76 ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr)))
78 #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
79 (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr))
82 typedef struct _DRIScreenPrivRec
84 Bool directRenderingSupport;
86 DRIWrappedFuncsRec wrap;
87 DrawablePtr DRIDrawables[DRI_MAX_DRAWABLES];
88 x_list *drawing; /* list of DRIDrawablePrivPtr */
89 } DRIScreenPrivRec, *DRIScreenPrivPtr;
91 #endif /* DRI_STRUCT_H */