dri3.h revision 35c4bbdf
135c4bbdfSmrg/* 235c4bbdfSmrg * Copyright © 2013 Keith Packard 335c4bbdfSmrg * 435c4bbdfSmrg * Permission to use, copy, modify, distribute, and sell this software and its 535c4bbdfSmrg * documentation for any purpose is hereby granted without fee, provided that 635c4bbdfSmrg * the above copyright notice appear in all copies and that both that copyright 735c4bbdfSmrg * notice and this permission notice appear in supporting documentation, and 835c4bbdfSmrg * that the name of the copyright holders not be used in advertising or 935c4bbdfSmrg * publicity pertaining to distribution of the software without specific, 1035c4bbdfSmrg * written prior permission. The copyright holders make no representations 1135c4bbdfSmrg * about the suitability of this software for any purpose. It is provided "as 1235c4bbdfSmrg * is" without express or implied warranty. 1335c4bbdfSmrg * 1435c4bbdfSmrg * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 1535c4bbdfSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 1635c4bbdfSmrg * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 1735c4bbdfSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 1835c4bbdfSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 1935c4bbdfSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 2035c4bbdfSmrg * OF THIS SOFTWARE. 2135c4bbdfSmrg */ 2235c4bbdfSmrg 2335c4bbdfSmrg#ifndef _DRI3_H_ 2435c4bbdfSmrg#define _DRI3_H_ 2535c4bbdfSmrg 2635c4bbdfSmrg#ifdef DRI3 2735c4bbdfSmrg 2835c4bbdfSmrg#include <X11/extensions/dri3proto.h> 2935c4bbdfSmrg#include <randrstr.h> 3035c4bbdfSmrg 3135c4bbdfSmrg#define DRI3_SCREEN_INFO_VERSION 1 3235c4bbdfSmrg 3335c4bbdfSmrgtypedef int (*dri3_open_proc)(ScreenPtr screen, 3435c4bbdfSmrg RRProviderPtr provider, 3535c4bbdfSmrg int *fd); 3635c4bbdfSmrg 3735c4bbdfSmrgtypedef int (*dri3_open_client_proc)(ClientPtr client, 3835c4bbdfSmrg ScreenPtr screen, 3935c4bbdfSmrg RRProviderPtr provider, 4035c4bbdfSmrg int *fd); 4135c4bbdfSmrg 4235c4bbdfSmrgtypedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen, 4335c4bbdfSmrg int fd, 4435c4bbdfSmrg CARD16 width, 4535c4bbdfSmrg CARD16 height, 4635c4bbdfSmrg CARD16 stride, 4735c4bbdfSmrg CARD8 depth, 4835c4bbdfSmrg CARD8 bpp); 4935c4bbdfSmrg 5035c4bbdfSmrgtypedef int (*dri3_fd_from_pixmap_proc) (ScreenPtr screen, 5135c4bbdfSmrg PixmapPtr pixmap, 5235c4bbdfSmrg CARD16 *stride, 5335c4bbdfSmrg CARD32 *size); 5435c4bbdfSmrg 5535c4bbdfSmrgtypedef struct dri3_screen_info { 5635c4bbdfSmrg uint32_t version; 5735c4bbdfSmrg 5835c4bbdfSmrg dri3_open_proc open; 5935c4bbdfSmrg dri3_pixmap_from_fd_proc pixmap_from_fd; 6035c4bbdfSmrg dri3_fd_from_pixmap_proc fd_from_pixmap; 6135c4bbdfSmrg 6235c4bbdfSmrg /* Version 1 */ 6335c4bbdfSmrg dri3_open_client_proc open_client; 6435c4bbdfSmrg 6535c4bbdfSmrg} dri3_screen_info_rec, *dri3_screen_info_ptr; 6635c4bbdfSmrg 6735c4bbdfSmrgextern _X_EXPORT Bool 6835c4bbdfSmrgdri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info); 6935c4bbdfSmrg 7035c4bbdfSmrgextern _X_EXPORT int 7135c4bbdfSmrgdri3_send_open_reply(ClientPtr client, int fd); 7235c4bbdfSmrg 7335c4bbdfSmrg#endif 7435c4bbdfSmrg 7535c4bbdfSmrg#endif /* _DRI3_H_ */ 76