Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / glx / x11 / dri2.h
index c1bfa664bb8fa671b68eab36b81920f8c44ffd71..a6fe66e136dd8ca268fad5c57408b1dc127bdccf 100644 (file)
@@ -1,4 +1,3 @@
-/* -*- mode: c; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3; coding: utf-8-unix -*- */
 /*
  * Copyright © 2007,2008 Red Hat, Inc.
  *
 #include <X11/extensions/Xfixes.h>
 #include <X11/extensions/dri2tokens.h>
 
-typedef struct {
-    unsigned int attachment;
-    unsigned int name;
-    unsigned int pitch;
-    unsigned int cpp;
-    unsigned int flags;
+typedef struct
+{
+   unsigned int attachment;
+   unsigned int name;
+   unsigned int pitch;
+   unsigned int cpp;
+   unsigned int flags;
 } DRI2Buffer;
 
 extern Bool
-DRI2QueryExtension(Display *display, int *eventBase, int *errorBase);
+DRI2QueryExtension(Display * display, int *eventBase, int *errorBase);
+
 extern Bool
-DRI2QueryVersion(Display *display, int *major, int *minor);
+DRI2QueryVersion(Display * display, int *major, int *minor);
+
 extern Bool
-DRI2Connect(Display *display, XID window,
-           char **driverName, char **deviceName);
+DRI2Connect(Display * display, XID window,
+            char **driverName, char **deviceName);
+
 extern Bool
-DRI2Authenticate(Display *display, XID window, drm_magic_t magic);
+DRI2Authenticate(Display * display, XID window, drm_magic_t magic);
+
 extern void
-DRI2CreateDrawable(Display *display, XID drawable);
+DRI2CreateDrawable(Display * display, XID drawable);
+
 extern void
-DRI2DestroyDrawable(Display *display, XID handle);
-extern DRI2Buffer *
-DRI2GetBuffers(Display *dpy, XID drawable,
-              int *width, int *height,
-              unsigned int *attachments, int count,
-              int *outCount);
+DRI2DestroyDrawable(Display * display, XID handle);
+
+extern DRI2Buffer*
+DRI2GetBuffers(Display * dpy, XID drawable,
+               int *width, int *height,
+               unsigned int *attachments, int count,
+               int *outCount);
+
+/**
+ * \note
+ * This function is only supported with DRI2 version 1.1 or later.
+ */
+extern DRI2Buffer*
+DRI2GetBuffersWithFormat(Display * dpy, XID drawable,
+                         int *width, int *height,
+                         unsigned int *attachments,
+                         int count, int *outCount);
 
 extern void
-DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region,
-              CARD32 dest, CARD32 src);
+DRI2CopyRegion(Display * dpy, XID drawable,
+               XserverRegion region,
+               CARD32 dest, CARD32 src);
 
 #endif