2 * Copyright © 2007,2008 Red Hat, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Soft-
6 * ware"), to deal in the Software without restriction, including without
7 * limitation the rights to use, copy, modify, merge, publish, distribute,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, provided that the above copyright
10 * notice(s) and this permission notice appear in all copies of the Soft-
11 * ware and that both the above copyright notice(s) and this permission
12 * notice appear in supporting documentation.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
16 * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
17 * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
18 * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
19 * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
22 * MANCE OF THIS SOFTWARE.
24 * Except as contained in this notice, the name of a copyright holder shall
25 * not be used in advertising or otherwise to promote the sale, use or
26 * other dealings in this Software without prior written authorization of
27 * the copyright holder.
30 * Kristian Høgsberg (krh@redhat.com)
37 #include <X11/extensions/Xfixes.h>
38 #include <X11/extensions/dri2tokens.h>
42 unsigned int attachment
;
52 DRI2QueryExtension(Display
* display
, int *eventBase
, int *errorBase
);
55 DRI2QueryVersion(Display
* display
, int *major
, int *minor
);
58 DRI2Connect(Display
* display
, XID window
,
59 char **driverName
, char **deviceName
);
62 DRI2Authenticate(Display
* display
, XID window
, drm_magic_t magic
);
65 DRI2CreateDrawable(Display
* display
, XID drawable
);
68 DRI2DestroyDrawable(Display
* display
, XID handle
);
71 DRI2GetBuffers(Display
* dpy
, XID drawable
,
72 int *width
, int *height
,
73 unsigned int *attachments
, int count
,
78 * This function is only supported with DRI2 version 1.1 or later.
81 DRI2GetBuffersWithFormat(Display
* dpy
, XID drawable
,
82 int *width
, int *height
,
83 unsigned int *attachments
,
84 int count
, int *outCount
);
87 DRI2CopyRegion(Display
* dpy
, XID drawable
,
89 CARD32 dest
, CARD32 src
);