1848b8605Smrg/* This file was derived from drisw_glx.c which carries the following
2848b8605Smrg * copyright:
3848b8605Smrg *
4848b8605Smrg * Copyright 2008 George Sapountzis
5848b8605Smrg *
6848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a
7848b8605Smrg * copy of this software and associated documentation files (the "Software"),
8848b8605Smrg * to deal in the Software without restriction, including without limitation
9848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the
11848b8605Smrg * Software is furnished to do so, subject to the following conditions:
12848b8605Smrg *
13848b8605Smrg * The above copyright notice and this permission notice (including the next
14848b8605Smrg * paragraph) shall be included in all copies or substantial portions of the
15848b8605Smrg * Software.
16848b8605Smrg *
17848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18848b8605Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21848b8605Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22848b8605Smrg * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23848b8605Smrg * SOFTWARE.
24848b8605Smrg */
25848b8605Smrg
26b8e80941Smrg#ifndef DRISW_PRIV_H
27b8e80941Smrg#define DRISW_PRIV_H
28b8e80941Smrg
29b8e80941Smrg#include <X11/extensions/XShm.h>
30b8e80941Smrg
31848b8605Smrgstruct drisw_display
32848b8605Smrg{
33848b8605Smrg   __GLXDRIdisplay base;
34848b8605Smrg};
35848b8605Smrg
36848b8605Smrgstruct drisw_context
37848b8605Smrg{
38848b8605Smrg   struct glx_context base;
39848b8605Smrg   __DRIcontext *driContext;
40848b8605Smrg
41848b8605Smrg};
42848b8605Smrg
43848b8605Smrgstruct drisw_screen
44848b8605Smrg{
45848b8605Smrg   struct glx_screen base;
46848b8605Smrg
47848b8605Smrg   __DRIscreen *driScreen;
48848b8605Smrg   __GLXDRIscreen vtable;
49848b8605Smrg   const __DRIcoreExtension *core;
50848b8605Smrg   const __DRIswrastExtension *swrast;
51848b8605Smrg   const __DRItexBufferExtension *texBuffer;
52848b8605Smrg   const __DRIcopySubBufferExtension *copySubBuffer;
53848b8605Smrg   const __DRI2rendererQueryExtension *rendererQuery;
54848b8605Smrg
55848b8605Smrg   const __DRIconfig **driver_configs;
56848b8605Smrg
57848b8605Smrg   void *driver;
58848b8605Smrg};
59848b8605Smrg
60848b8605Smrgstruct drisw_drawable
61848b8605Smrg{
62848b8605Smrg   __GLXDRIdrawable base;
63848b8605Smrg
64848b8605Smrg   GC gc;
65848b8605Smrg   GC swapgc;
66848b8605Smrg
67848b8605Smrg   __DRIdrawable *driDrawable;
68848b8605Smrg   XVisualInfo *visinfo;
69848b8605Smrg   XImage *ximage;
70b8e80941Smrg   XShmSegmentInfo shminfo;
71848b8605Smrg};
72848b8605Smrg
73848b8605Smrg_X_HIDDEN int
74848b8605Smrgdrisw_query_renderer_integer(struct glx_screen *base, int attribute,
75848b8605Smrg                             unsigned int *value);
76848b8605Smrg_X_HIDDEN int
77848b8605Smrgdrisw_query_renderer_string(struct glx_screen *base, int attribute,
78848b8605Smrg                            const char **value);
79b8e80941Smrg
80b8e80941Smrg#endif
81