1 | /**
|
---|
2 | * DMX utility functions.
|
---|
3 | */
|
---|
4 |
|
---|
5 | #ifndef CR_DMX_H
|
---|
6 | #define CR_DMX_H
|
---|
7 |
|
---|
8 | #include <X11/Xlib.h>
|
---|
9 | #include <X11/extensions/dmxext.h>
|
---|
10 |
|
---|
11 | #include "cr_spu.h"
|
---|
12 | #include "state/cr_statetypes.h"
|
---|
13 |
|
---|
14 |
|
---|
15 | typedef struct {
|
---|
16 | GLXDrawable xwin; /**< backend server's X window */
|
---|
17 | GLXDrawable xsubwin; /**< child of xwin, clipped to screen bounds */
|
---|
18 | Display *dpy; /**< DMX back-end server display */
|
---|
19 | CRrecti visrect; /**< visible rect, in front-end screen coords */
|
---|
20 | } CRDMXBackendWindowInfo;
|
---|
21 |
|
---|
22 |
|
---|
23 | #ifdef __cplusplus
|
---|
24 | extern "C" {
|
---|
25 | #endif
|
---|
26 |
|
---|
27 |
|
---|
28 | extern int
|
---|
29 | crDMXSupported(Display *dpy);
|
---|
30 |
|
---|
31 | extern CRDMXBackendWindowInfo *
|
---|
32 | crDMXAllocBackendWindowInfo(unsigned int numBackendWindows);
|
---|
33 |
|
---|
34 | extern void
|
---|
35 | crDMXFreeBackendWindowInfo(unsigned int numBackendWindows,
|
---|
36 | CRDMXBackendWindowInfo *backendWindows);
|
---|
37 |
|
---|
38 | /* Given the DMX front-end display "dpy" and window "xwin", update the
|
---|
39 | * backend window information in "backendWindows". If new subwindows are
|
---|
40 | * needed, and an OpenGL interface pointer is provided, use that interface
|
---|
41 | * and the subwindowVisBits to create new subwindows.
|
---|
42 | */
|
---|
43 | extern GLboolean
|
---|
44 | crDMXGetBackendWindowInfo(Display *dpy, GLXDrawable xwin,
|
---|
45 | unsigned int numBackendWindows,
|
---|
46 | CRDMXBackendWindowInfo *backendWindows,
|
---|
47 | const crOpenGLInterface *openGlInterface,
|
---|
48 | GLint subwindowVisBits);
|
---|
49 |
|
---|
50 |
|
---|
51 | #ifdef __cplusplus
|
---|
52 | }
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #endif /* CR_DLM_H */
|
---|