X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.hh;h=5e21da291f0cc3528428d0eec0184e366d27aad2;hb=d2dcef46752df01312cbb3c5a89b3227c6959087;hp=72ad176fa1b6b87459279e8c078df9e547b8f102;hpb=9faca110acaffe21fd9f14cef807bc7aeb289a2a;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.hh b/otk/rendercontrol.hh index 72ad176f..5e21da29 100644 --- a/otk/rendercontrol.hh +++ b/otk/rendercontrol.hh @@ -26,8 +26,6 @@ protected: RenderControl(int screen); - virtual void reduceDepth(Surface &sf, XImage *im) const = 0; - inline void highlight(pixel32 *x, pixel32 *y, bool raised) const; void verticalGradient(Surface &sf, const RenderTexture &texture) const; void diagonalGradient(Surface &sf, const RenderTexture &texture) const; @@ -37,13 +35,19 @@ protected: virtual void drawSolidBackground(Surface& sf, const RenderTexture& texture) const; + //! Reduces a Surface's Surface::pixelData so that it will display correctly + //! on the screen's depth + /*! + This function allocates and sets the im->data member. The allocated memory + will be freed when XDetroyImage is called on the XImage. + */ + virtual void reduceDepth(Surface &sf, XImage *im) const = 0; + public: virtual ~RenderControl(); static RenderControl *getRenderControl(int screen); - virtual void drawRoot(const RenderColor &color) const; - //! Draws a background onto a Surface, as specified by a RenderTexture /*! This function will overwrite the entire surface. @@ -68,6 +72,8 @@ public: //! Draws a PixmapMask with a specified color onto a Surface virtual void drawMask(Surface &sf, const RenderColor &color, const PixmapMask &mask) const; + + virtual void allocateColor(XColor *color) const = 0; }; }