X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.hh;h=9e140db07d462ca956521765c5417b2a84917bc7;hb=3147507622de5ab771c99a4bb636f55344f6cbd7;hp=72ad176fa1b6b87459279e8c078df9e547b8f102;hpb=9faca110acaffe21fd9f14cef807bc7aeb289a2a;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.hh b/otk/rendercontrol.hh index 72ad176f..9e140db0 100644 --- a/otk/rendercontrol.hh +++ b/otk/rendercontrol.hh @@ -26,10 +26,9 @@ 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 horizontalGradient(Surface &sf, const RenderTexture &texture) const; void diagonalGradient(Surface &sf, const RenderTexture &texture) const; void crossDiagonalGradient(Surface &sf, const RenderTexture &texture) const; virtual void drawGradientBackground(Surface &sf, @@ -37,13 +36,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); + static RenderControl *createRenderControl(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. @@ -60,6 +65,9 @@ public: virtual void drawImage(Surface &sf, int w, int h, unsigned long *data) const; + //! Draws an image onto the surface + virtual void drawImage(Surface &sf, Pixmap pixmap, Pixmap mask) const; + //! Draws a string onto a Surface virtual void drawString(Surface &sf, const Font &font, int x, int y, const RenderColor &color, @@ -68,6 +76,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; }; }