1 | /*
|
---|
2 | * Copyright © 2013 Keith Packard
|
---|
3 | *
|
---|
4 | * Permission to use, copy, modify, distribute, and sell this software and its
|
---|
5 | * documentation for any purpose is hereby granted without fee, provided that
|
---|
6 | * the above copyright notice appear in all copies and that both that copyright
|
---|
7 | * notice and this permission notice appear in supporting documentation, and
|
---|
8 | * that the name of the copyright holders not be used in advertising or
|
---|
9 | * publicity pertaining to distribution of the software without specific,
|
---|
10 | * written prior permission. The copyright holders make no representations
|
---|
11 | * about the suitability of this software for any purpose. It is provided "as
|
---|
12 | * is" without express or implied warranty.
|
---|
13 | *
|
---|
14 | * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
15 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
16 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
17 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
18 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
19 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
---|
20 | * OF THIS SOFTWARE.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef _DRI3_H_
|
---|
24 | #define _DRI3_H_
|
---|
25 |
|
---|
26 | #ifdef DRI3
|
---|
27 |
|
---|
28 | #include <X11/extensions/dri3proto.h>
|
---|
29 | #include <randrstr.h>
|
---|
30 |
|
---|
31 | #define DRI3_SCREEN_INFO_VERSION 1
|
---|
32 |
|
---|
33 | typedef int (*dri3_open_proc)(ScreenPtr screen,
|
---|
34 | RRProviderPtr provider,
|
---|
35 | int *fd);
|
---|
36 |
|
---|
37 | typedef int (*dri3_open_client_proc)(ClientPtr client,
|
---|
38 | ScreenPtr screen,
|
---|
39 | RRProviderPtr provider,
|
---|
40 | int *fd);
|
---|
41 |
|
---|
42 | typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen,
|
---|
43 | int fd,
|
---|
44 | CARD16 width,
|
---|
45 | CARD16 height,
|
---|
46 | CARD16 stride,
|
---|
47 | CARD8 depth,
|
---|
48 | CARD8 bpp);
|
---|
49 |
|
---|
50 | typedef int (*dri3_fd_from_pixmap_proc) (ScreenPtr screen,
|
---|
51 | PixmapPtr pixmap,
|
---|
52 | CARD16 *stride,
|
---|
53 | CARD32 *size);
|
---|
54 |
|
---|
55 | typedef struct dri3_screen_info {
|
---|
56 | uint32_t version;
|
---|
57 |
|
---|
58 | dri3_open_proc open;
|
---|
59 | dri3_pixmap_from_fd_proc pixmap_from_fd;
|
---|
60 | dri3_fd_from_pixmap_proc fd_from_pixmap;
|
---|
61 |
|
---|
62 | /* Version 1 */
|
---|
63 | dri3_open_client_proc open_client;
|
---|
64 |
|
---|
65 | } dri3_screen_info_rec, *dri3_screen_info_ptr;
|
---|
66 |
|
---|
67 | extern _X_EXPORT Bool
|
---|
68 | dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info);
|
---|
69 |
|
---|
70 | extern _X_EXPORT int
|
---|
71 | dri3_send_open_reply(ClientPtr client, int fd);
|
---|
72 |
|
---|
73 | #endif
|
---|
74 |
|
---|
75 | #endif /* _DRI3_H_ */
|
---|