2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 * Copyright © 2007,2008 Red Hat, Inc.
5 * Contact: Sangjin Lee <lsj119@samsung.com>, SooChan Lim <sc1.lim@samsung.com>
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Soft-
9 * ware"), to deal in the Software without restriction, including without
10 * limitation the rights to use, copy, modify, merge, publish, distribute,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, provided that the above copyright
13 * notice(s) and this permission notice appear in all copies of the Soft-
14 * ware and that both the above copyright notice(s) and this permission
15 * notice appear in supporting documentation.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
19 * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
20 * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
21 * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
22 * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
23 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
24 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
25 * MANCE OF THIS SOFTWARE.
27 * Except as contained in this notice, the name of a copyright holder shall
28 * not be used in advertising or otherwise to promote the sale, use or
29 * other dealings in this Software without prior written authorization of
30 * the copyright holder.
33 * Kristian Høgsberg (krh@redhat.com)
39 #include <X11/extensions/Xfixes.h>
40 #include <X11/extensions/dri2tokens.h>
43 #define DRI2BufferSwapCompleteNotify 0
44 #define DRI2InvalidateBuffersNotify 1
48 unsigned int attachment;
58 DRI2QueryExtension(Display * display, int *eventBase, int *errorBase);
61 DRI2QueryVersion(Display * display, int *major, int *minor);
64 DRI2QeuryExtensionAndCheckVersion(Display * dpy, int *eventBase, int *errorBase, int *major, int *minor, int check_major, int check_minor);
67 DRI2Connect(Display * display, XID window,
68 char **driverName, char **deviceName);
71 DRI2Authenticate(Display * display, XID window, unsigned int magic);
74 DRI2CreateDrawable(Display * display, XID drawable);
77 DRI2DestroyDrawable(Display * display, XID handle);
80 DRI2GetBuffers(Display * dpy, XID drawable,
81 int *width, int *height,
82 unsigned int *attachments, int count,
87 * This function is only supported with DRI2 version 1.1 or later.
90 DRI2GetBuffersWithFormat(Display * dpy, XID drawable,
91 int *width, int *height,
92 unsigned int *attachments,
93 int count, int *outCount);
96 DRI2CopyRegion(Display * dpy, XID drawable,
98 CARD32 dest, CARD32 src);
101 DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor,
102 CARD64 remainder, CARD64 *count);
105 DRI2GetMSC(Display *dpy, XID drawable, CARD64 *ust, CARD64 *msc, CARD64 *sbc);
108 DRI2WaitMSC(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor,
109 CARD64 remainder, CARD64 *ust, CARD64 *msc, CARD64 *sbc);
112 DRI2WaitSBC(Display *dpy, XID drawable, CARD64 target_sbc, CARD64 *ust,
113 CARD64 *msc, CARD64 *sbc);
116 DRI2SwapInterval(Display *dpy, XID drawable, int interval);
120 unsigned long serial; /* # of last request processed by server */
121 Bool send_event; /* true if this came from a SendEvent request */
122 Display *display; /* Display the event was read from */
123 Drawable drawable; /* drawable on which event was requested in event mask */
128 } DRI2BufferSwapComplete;
132 unsigned long serial; /* # of last request processed by server */
133 Bool send_event; /* true if this came from a SendEvent request */
134 Display *display; /* Display the event was read from */
135 Drawable drawable; /* drawable on which event was requested in event mask */
137 } DRI2BufferInvalidate;
140 DRI2SwapBuffersWithRegion(Display *dpy, XID drawable, XserverRegion region,