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 _DRI3PRIV_H_
|
---|
24 | #define _DRI3PRIV_H_
|
---|
25 |
|
---|
26 | #include <X11/X.h>
|
---|
27 | #include "scrnintstr.h"
|
---|
28 | #include "misc.h"
|
---|
29 | #include "list.h"
|
---|
30 | #include "windowstr.h"
|
---|
31 | #include "dixstruct.h"
|
---|
32 | #include <randrstr.h>
|
---|
33 | #include "dri3.h"
|
---|
34 |
|
---|
35 | extern DevPrivateKeyRec dri3_screen_private_key;
|
---|
36 |
|
---|
37 | typedef struct dri3_screen_priv {
|
---|
38 | CloseScreenProcPtr CloseScreen;
|
---|
39 | ConfigNotifyProcPtr ConfigNotify;
|
---|
40 | DestroyWindowProcPtr DestroyWindow;
|
---|
41 |
|
---|
42 | dri3_screen_info_ptr info;
|
---|
43 | } dri3_screen_priv_rec, *dri3_screen_priv_ptr;
|
---|
44 |
|
---|
45 | #define wrap(priv,real,mem,func) {\
|
---|
46 | priv->mem = real->mem; \
|
---|
47 | real->mem = func; \
|
---|
48 | }
|
---|
49 |
|
---|
50 | #define unwrap(priv,real,mem) {\
|
---|
51 | real->mem = priv->mem; \
|
---|
52 | }
|
---|
53 |
|
---|
54 | static inline dri3_screen_priv_ptr
|
---|
55 | dri3_screen_priv(ScreenPtr screen)
|
---|
56 | {
|
---|
57 | return (dri3_screen_priv_ptr)dixLookupPrivate(&(screen)->devPrivates, &dri3_screen_private_key);
|
---|
58 | }
|
---|
59 |
|
---|
60 | int
|
---|
61 | proc_dri3_dispatch(ClientPtr client);
|
---|
62 |
|
---|
63 | int
|
---|
64 | sproc_dri3_dispatch(ClientPtr client);
|
---|
65 |
|
---|
66 | /* DDX interface */
|
---|
67 |
|
---|
68 | int
|
---|
69 | dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd);
|
---|
70 |
|
---|
71 | int
|
---|
72 | dri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd,
|
---|
73 | CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp);
|
---|
74 |
|
---|
75 | int
|
---|
76 | dri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size);
|
---|
77 |
|
---|
78 | #endif /* _DRI3PRIV_H_ */
|
---|