]> icculus.org git repositories - dana/openbox.git/blob - render2/instance.h
add painting
[dana/openbox.git] / render2 / instance.h
1 #ifndef __render_instance_h
2 #define __render_instance_h
3
4 #include <X11/Xlib.h>
5 #include <X11/Xutil.h>
6 #include <GL/glx.h>
7
8 struct RrInstance {
9     Display *display;
10     int screen;
11     XVisualInfo visinfo;
12     Colormap cmap;
13     GLXContext glx_context;
14 };
15
16 struct RrInstance *RrInstanceNew(Display *display,
17                                  int screen,
18                                  XVisualInfo visinfo);
19 void RrInstanceFree(struct RrInstance *inst);
20
21
22 #define RrDisplay(i)  ((i)->display)
23 #define RrScreen(i)   ((i)->screen)
24 #define RrScreenWidth(i) (WidthOfScreen(ScreenOfDisplay((i)->display, \
25                                                         (i)->screen)))
26 #define RrScreenHeight(i) (HeightOfScreen(ScreenOfDisplay((i)->display, \
27                                                           (i)->screen)))
28 #define RrDepth(i)    ((i)->visinfo.depth)
29 #define RrVisual(i)   ((i)->visinfo.visual)
30 #define RrColormap(i) ((i)->cmap)
31 #define RrContext(i)  ((i)->glx_context)
32
33 #endif