1*4882a593Smuzhiyun #ifdef HAVE_DIX_CONFIG_H 2*4882a593Smuzhiyun #include <dix-config.h> 3*4882a593Smuzhiyun #endif 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #ifndef _GLX_drawable_h_ 6*4882a593Smuzhiyun #define _GLX_drawable_h_ 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun /* 9*4882a593Smuzhiyun * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 10*4882a593Smuzhiyun * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person obtaining a 13*4882a593Smuzhiyun * copy of this software and associated documentation files (the "Software"), 14*4882a593Smuzhiyun * to deal in the Software without restriction, including without limitation 15*4882a593Smuzhiyun * the rights to use, copy, modify, merge, publish, distribute, sublicense, 16*4882a593Smuzhiyun * and/or sell copies of the Software, and to permit persons to whom the 17*4882a593Smuzhiyun * Software is furnished to do so, subject to the following conditions: 18*4882a593Smuzhiyun * 19*4882a593Smuzhiyun * The above copyright notice including the dates of first publication and 20*4882a593Smuzhiyun * either this permission notice or a reference to 21*4882a593Smuzhiyun * http://oss.sgi.com/projects/FreeB/ 22*4882a593Smuzhiyun * shall be included in all copies or substantial portions of the Software. 23*4882a593Smuzhiyun * 24*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 25*4882a593Smuzhiyun * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27*4882a593Smuzhiyun * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 28*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 29*4882a593Smuzhiyun * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30*4882a593Smuzhiyun * SOFTWARE. 31*4882a593Smuzhiyun * 32*4882a593Smuzhiyun * Except as contained in this notice, the name of Silicon Graphics, Inc. 33*4882a593Smuzhiyun * shall not be used in advertising or otherwise to promote the sale, use or 34*4882a593Smuzhiyun * other dealings in this Software without prior written authorization from 35*4882a593Smuzhiyun * Silicon Graphics, Inc. 36*4882a593Smuzhiyun */ 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun /* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */ 39*4882a593Smuzhiyun enum { 40*4882a593Smuzhiyun GLX_DRAWABLE_WINDOW, 41*4882a593Smuzhiyun GLX_DRAWABLE_PIXMAP, 42*4882a593Smuzhiyun GLX_DRAWABLE_PBUFFER, 43*4882a593Smuzhiyun GLX_DRAWABLE_ANY 44*4882a593Smuzhiyun }; 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun struct __GLXdrawable { 47*4882a593Smuzhiyun void (*destroy) (__GLXdrawable * private); 48*4882a593Smuzhiyun GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *); 49*4882a593Smuzhiyun void (*copySubBuffer) (__GLXdrawable * drawable, 50*4882a593Smuzhiyun int x, int y, int w, int h); 51*4882a593Smuzhiyun void (*waitX) (__GLXdrawable *); 52*4882a593Smuzhiyun void (*waitGL) (__GLXdrawable *); 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun DrawablePtr pDraw; 55*4882a593Smuzhiyun XID drawId; 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun /* 58*4882a593Smuzhiyun ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or 59*4882a593Smuzhiyun ** GLX_DRAWABLE_PBUFFER. 60*4882a593Smuzhiyun */ 61*4882a593Smuzhiyun int type; 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun /* 64*4882a593Smuzhiyun ** Configuration of the visual to which this drawable was created. 65*4882a593Smuzhiyun */ 66*4882a593Smuzhiyun __GLXconfig *config; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun GLenum target; 69*4882a593Smuzhiyun GLenum format; 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun /* 72*4882a593Smuzhiyun ** Event mask 73*4882a593Smuzhiyun */ 74*4882a593Smuzhiyun unsigned long eventMask; 75*4882a593Smuzhiyun }; 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun extern int validGlxDrawable(ClientPtr client, XID id, int type, int access_mode, 78*4882a593Smuzhiyun __GLXdrawable **drawable, int *err); 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun #endif /* !__GLX_drawable_h__ */ 81