aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/FbWindow.hh')
-rw-r--r--src/FbTk/FbWindow.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index 0c481c9..ff1b42e 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -34,6 +34,8 @@ namespace FbTk {
34 34
35class Color; 35class Color;
36class Transparent; 36class Transparent;
37class FbPixmap;
38class FbWindowRenderer;
37 39
38/// Wrapper for X window 40/// Wrapper for X window
39/** 41/**
@@ -82,7 +84,7 @@ public:
82 virtual void clearArea(int x, int y, 84 virtual void clearArea(int x, int y,
83 unsigned int width, unsigned int height, 85 unsigned int width, unsigned int height,
84 bool exposures = false); 86 bool exposures = false);
85 void updateTransparent(int x = -1, int y = -1, unsigned int width = 0, unsigned int height = 0); 87 void updateTransparent(int x = -1, int y = -1, unsigned int width = 0, unsigned int height = 0, Pixmap dest_override = None, bool override_is_offset = false);
86 88
87 void setAlpha(unsigned char alpha); 89 void setAlpha(unsigned char alpha);
88 90
@@ -182,6 +184,8 @@ public:
182 // used for composite 184 // used for composite
183 void setOpaque(unsigned char alpha); 185 void setOpaque(unsigned char alpha);
184 186
187 void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; }
188
185protected: 189protected:
186 /// creates a window with x window client (m_window = client) 190 /// creates a window with x window client (m_window = client)
187 explicit FbWindow(Window client); 191 explicit FbWindow(Window client);
@@ -213,6 +217,8 @@ private:
213 bool m_lastbg_color_set; 217 bool m_lastbg_color_set;
214 unsigned long m_lastbg_color; 218 unsigned long m_lastbg_color;
215 Pixmap m_lastbg_pm; 219 Pixmap m_lastbg_pm;
220
221 FbWindowRenderer *m_renderer;
216}; 222};
217 223
218bool operator == (Window win, const FbWindow &fbwin); 224bool operator == (Window win, const FbWindow &fbwin);
@@ -235,9 +241,15 @@ private:
235 unsigned char *m_state; 241 unsigned char *m_state;
236 int m_num; 242 int m_num;
237 int m_mode; 243 int m_mode;
244};
238 245
246/// Interface class to render FbWindow foregrounds.
247class FbWindowRenderer {
248public:
249 virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0;
239}; 250};
240 251
252
241} // end namespace FbTk 253} // end namespace FbTk
242 254
243#endif // FBTK_FBWINDOW_HH 255#endif // FBTK_FBWINDOW_HH