14642e01fSmrg#ifdef HAVE_DIX_CONFIG_H
24642e01fSmrg#include <dix-config.h>
34642e01fSmrg#endif
44642e01fSmrg
54642e01fSmrg#ifndef _GLX_drawable_h_
64642e01fSmrg#define _GLX_drawable_h_
74642e01fSmrg
84642e01fSmrg/*
94642e01fSmrg * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
104642e01fSmrg * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
114642e01fSmrg *
124642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a
134642e01fSmrg * copy of this software and associated documentation files (the "Software"),
144642e01fSmrg * to deal in the Software without restriction, including without limitation
154642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
164642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the
174642e01fSmrg * Software is furnished to do so, subject to the following conditions:
184642e01fSmrg *
194642e01fSmrg * The above copyright notice including the dates of first publication and
204642e01fSmrg * either this permission notice or a reference to
214642e01fSmrg * http://oss.sgi.com/projects/FreeB/
224642e01fSmrg * shall be included in all copies or substantial portions of the Software.
234642e01fSmrg *
244642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
254642e01fSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
264642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
274642e01fSmrg * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
284642e01fSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
294642e01fSmrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
304642e01fSmrg * SOFTWARE.
314642e01fSmrg *
324642e01fSmrg * Except as contained in this notice, the name of Silicon Graphics, Inc.
334642e01fSmrg * shall not be used in advertising or otherwise to promote the sale, use or
344642e01fSmrg * other dealings in this Software without prior written authorization from
354642e01fSmrg * Silicon Graphics, Inc.
364642e01fSmrg */
374642e01fSmrg
384642e01fSmrg/* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */
394642e01fSmrgenum {
404642e01fSmrg    GLX_DRAWABLE_WINDOW,
414642e01fSmrg    GLX_DRAWABLE_PIXMAP,
426747b715Smrg    GLX_DRAWABLE_PBUFFER,
436747b715Smrg    GLX_DRAWABLE_ANY
444642e01fSmrg};
454642e01fSmrg
464642e01fSmrgstruct __GLXdrawable {
47f7df2e56Smrg    void (*destroy) (__GLXdrawable * private);
48f7df2e56Smrg     GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *);
49f7df2e56Smrg    void (*copySubBuffer) (__GLXdrawable * drawable,
50f7df2e56Smrg                           int x, int y, int w, int h);
51f7df2e56Smrg    void (*waitX) (__GLXdrawable *);
52f7df2e56Smrg    void (*waitGL) (__GLXdrawable *);
534642e01fSmrg
544642e01fSmrg    DrawablePtr pDraw;
554642e01fSmrg    XID drawId;
564642e01fSmrg
574642e01fSmrg    /*
58f7df2e56Smrg     ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
59f7df2e56Smrg     ** GLX_DRAWABLE_PBUFFER.
60f7df2e56Smrg     */
614642e01fSmrg    int type;
624642e01fSmrg
634642e01fSmrg    /*
64f7df2e56Smrg     ** Configuration of the visual to which this drawable was created.
65f7df2e56Smrg     */
664642e01fSmrg    __GLXconfig *config;
674642e01fSmrg
684642e01fSmrg    GLenum target;
6952397711Smrg    GLenum format;
704642e01fSmrg
714642e01fSmrg    /*
72f7df2e56Smrg     ** Event mask
73f7df2e56Smrg     */
744642e01fSmrg    unsigned long eventMask;
754642e01fSmrg};
764642e01fSmrg
777e31ba66Smrgextern int validGlxDrawable(ClientPtr client, XID id, int type, int access_mode,
787e31ba66Smrg                            __GLXdrawable **drawable, int *err);
797e31ba66Smrg
80f7df2e56Smrg#endif                          /* !__GLX_drawable_h__ */
81