1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
9 #define _XFT_NO_COMPAT_ // no Xft 1 API
10 #include <X11/Xft/Xft.h>
15 # ifdef HAVE_SYS_TYPES_H
16 # include <sys/types.h>
26 class TrueRenderControl;
27 class PseudoRenderControl;
30 typedef uint32_t pixel32;
31 typedef uint16_t pixel16;
33 typedef u_int32_t pixel32;
34 typedef u_int16_t pixel16;
35 #endif /* HAVE_STDINT_H */
37 #ifdef WORDS_BIGENDIAN
38 const int default_red_shift=0;
39 const int default_green_shift=8;
40 const int default_blue_shift=16;
41 const int endian=MSBFirst;
43 const int default_red_shift=16;
44 const int default_green_shift=8;
45 const int default_blue_shift=0;
46 const int endian=LSBFirst;
47 #endif /* WORDS_BIGENDIAN */
58 void destroyObjects();
60 void setPixmap(XImage *image);
61 void setPixmap(const RenderColor &color);
64 Surface(int screen, const Size &size);
67 inline int screen(void) const { return _screen; }
69 const Size& size() const { return _size; }
71 Pixmap pixmap() const { return _pixmap; }
73 pixel32 *pixelData() { return _pixel_data; }
75 //! Frees the pixel data when it will no longer be needed. Only do this once
76 //! you have completed rendering onto the surface.
79 // The RenderControl classes use the internal objects in this class to render
80 // to it. Noone else needs them tho, so they are private.
81 friend class RenderControl;
82 friend class TrueRenderControl;
83 friend class PseudoRenderControl;
88 #endif // __surface_hh