diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-18 07:23:28 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-18 07:23:28 +0000 |
| commit | 9b6e5f9cf49df78be25720f9c4b33a733b856c9b (patch) | |
| tree | 0da395f661151ce079d09483594f221c89e5d196 /otk/surface.hh | |
| parent | a4dd208a7955e25bca710d4bcf355de7e608b9e1 (diff) | |
provide RenderControls to all otk from the display class. initialize them all there. try use bitshifts instead of color tables in the TrueRenderControl class for finding correct rgbs. Move the image/pixmap/xftdraw into the surface class, and it maintains them, recreating them when it resizes.
Diffstat (limited to 'otk/surface.hh')
| -rw-r--r-- | otk/surface.hh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/otk/surface.hh b/otk/surface.hh index b027f796..53738128 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -7,28 +7,42 @@ extern "C" { #include <X11/Xlib.h> +#define _XFT_NO_COMPAT_ // no Xft 1 API +#include <X11/Xft/Xft.h> } namespace otk { +class ScreenInfo; + class Surface { + int _screen; Point _size; + XImage *_im; Pixmap _pm; + XftDraw *_xftdraw; + void createObjects(); + void destroyObjects(); + protected: - Surface(); - Surface(const Point &size); + Surface(int screen); + Surface(int screen, const Point &size); virtual void setSize(int w, int h); public: virtual ~Surface(); + inline int screen(void) const { return _screen; } virtual const Point& size() const { return _size; } virtual int width() const { return _size.x(); } virtual int height() const { return _size.y(); } virtual Pixmap pixmap() const { return _pm; } // TEMP + // The RenderControl classes use the internal objects in this class to render + // to it. Noone else needs them tho, so they are private. + friend class RenderControl; friend class TrueRenderControl; }; |
