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.hh66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index b69dfd7..863c2df 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -55,19 +55,19 @@ public:
55 FbWindow(const FbWindow &win_copy); 55 FbWindow(const FbWindow &win_copy);
56 56
57 FbWindow(int screen_num, 57 FbWindow(int screen_num,
58 int x, int y, unsigned int width, unsigned int height, long eventmask, 58 int x, int y, unsigned int width, unsigned int height, long eventmask,
59 bool overrride_redirect = false, 59 bool overrride_redirect = false,
60 bool save_unders = false, 60 bool save_unders = false,
61 unsigned int depth = CopyFromParent, 61 unsigned int depth = CopyFromParent,
62 int class_type = InputOutput); 62 int class_type = InputOutput);
63 63
64 FbWindow(const FbWindow &parent, 64 FbWindow(const FbWindow &parent,
65 int x, int y, 65 int x, int y,
66 unsigned int width, unsigned int height, 66 unsigned int width, unsigned int height,
67 long eventmask, 67 long eventmask,
68 bool overrride_redirect = false, 68 bool overrride_redirect = false,
69 bool save_unders = false, 69 bool save_unders = false,
70 unsigned int depth = CopyFromParent, 70 unsigned int depth = CopyFromParent,
71 int class_type = InputOutput); 71 int class_type = InputOutput);
72 72
73 virtual ~FbWindow(); 73 virtual ~FbWindow();
@@ -83,10 +83,10 @@ public:
83 /// clear window with background pixmap or color 83 /// clear window with background pixmap or color
84 virtual void clear(); 84 virtual void clear();
85 /// @param exposures wheter Expose event should be generated 85 /// @param exposures wheter Expose event should be generated
86 virtual void clearArea(int x, int y, 86 virtual void clearArea(int x, int y,
87 unsigned int width, unsigned int height, 87 unsigned int width, unsigned int height,
88 bool exposures = false); 88 bool exposures = false);
89 void updateTransparent(int x = -1, int y = -1, unsigned int width = 0, 89 void updateTransparent(int x = -1, int y = -1, unsigned int width = 0,
90 unsigned int height = 0, Pixmap dest_override = None, 90 unsigned int height = 0, Pixmap dest_override = None,
91 bool override_is_offset = false); 91 bool override_is_offset = false);
92 92
@@ -94,18 +94,18 @@ public:
94 94
95 virtual FbWindow &operator = (const FbWindow &win); 95 virtual FbWindow &operator = (const FbWindow &win);
96 /// assign a new X window to this 96 /// assign a new X window to this
97 virtual FbWindow &operator = (Window win); 97 virtual FbWindow &operator = (Window win);
98 virtual void hide(); 98 virtual void hide();
99 virtual void show(); 99 virtual void show();
100 virtual void showSubwindows(); 100 virtual void showSubwindows();
101 101
102 /// Notify that the parent window was moved, 102 /// Notify that the parent window was moved,
103 /// thus the absolute position of this one moved 103 /// thus the absolute position of this one moved
104 virtual inline void parentMoved() { 104 virtual void parentMoved() {
105 updateBackground(true); 105 updateBackground(true);
106 } 106 }
107 107
108 virtual inline void move(int x, int y) { 108 virtual void move(int x, int y) {
109 if (x == m_x && y == m_y) 109 if (x == m_x && y == m_y)
110 return; 110 return;
111 XMoveWindow(s_display, m_window, x, y); 111 XMoveWindow(s_display, m_window, x, y);
@@ -114,7 +114,7 @@ public:
114 updateBackground(true); 114 updateBackground(true);
115 } 115 }
116 116
117 virtual inline void resize(unsigned int width, unsigned int height) { 117 virtual void resize(unsigned int width, unsigned int height) {
118 if (width == m_width && height == m_height) 118 if (width == m_width && height == m_height)
119 return; 119 return;
120 XResizeWindow(s_display, m_window, width, height); 120 XResizeWindow(s_display, m_window, width, height);
@@ -123,7 +123,7 @@ public:
123 updateBackground(false); 123 updateBackground(false);
124 } 124 }
125 125
126 virtual inline void moveResize(int x, int y, unsigned int width, unsigned int height) { 126 virtual void moveResize(int x, int y, unsigned int width, unsigned int height) {
127 if (x == m_x && y == m_y && width == m_width && height == m_height) 127 if (x == m_x && y == m_y && width == m_width && height == m_height)
128 return; 128 return;
129 XMoveResizeWindow(s_display, m_window, x, y, width, height); 129 XMoveResizeWindow(s_display, m_window, x, y, width, height);
@@ -171,26 +171,26 @@ public:
171 /// @return parent FbWindow 171 /// @return parent FbWindow
172 const FbWindow *parent() const { return m_parent; } 172 const FbWindow *parent() const { return m_parent; }
173 /// @return real X window 173 /// @return real X window
174 inline Window window() const { return m_window; } 174 Window window() const { return m_window; }
175 /// @return drawable (the X window) 175 /// @return drawable (the X window)
176 inline Drawable drawable() const { return window(); } 176 Drawable drawable() const { return window(); }
177 inline int x() const { return m_x; } 177 int x() const { return m_x; }
178 inline int y() const { return m_y; } 178 int y() const { return m_y; }
179 inline unsigned int width() const { return m_width; } 179 unsigned int width() const { return m_width; }
180 inline unsigned int height() const { return m_height; } 180 unsigned int height() const { return m_height; }
181 inline unsigned int borderWidth() const { return m_border_width; } 181 unsigned int borderWidth() const { return m_border_width; }
182 inline unsigned int depth() const { return m_depth; } 182 unsigned int depth() const { return m_depth; }
183 unsigned char alpha() const; 183 unsigned char alpha() const;
184 int screenNumber() const; 184 int screenNumber() const;
185 long eventMask() const; 185 long eventMask() const;
186 Display *display() const { return s_display; } 186 Display *display() const { return s_display; }
187 187
188 /// compare X window 188 /// compare X window
189 inline bool operator == (Window win) const { return m_window == win; } 189 bool operator == (Window win) const { return m_window == win; }
190 inline bool operator != (Window win) const { return m_window != win; } 190 bool operator != (Window win) const { return m_window != win; }
191 /// compare two windows 191 /// compare two windows
192 inline bool operator == (const FbWindow &win) const { return m_window == win.m_window; } 192 bool operator == (const FbWindow &win) const { return m_window == win.m_window; }
193 inline bool operator != (const FbWindow &win) const { return m_window != win.m_window; } 193 bool operator != (const FbWindow &win) const { return m_window != win.m_window; }
194 194
195 // used for composite 195 // used for composite
196 void setOpaque(unsigned char alpha); 196 void setOpaque(unsigned char alpha);
@@ -215,10 +215,10 @@ private:
215 void setNew(Window win); 215 void setNew(Window win);
216 /// creates a new X window 216 /// creates a new X window
217 void create(Window parent, int x, int y, unsigned int width, unsigned int height, 217 void create(Window parent, int x, int y, unsigned int width, unsigned int height,
218 long eventmask, 218 long eventmask,
219 bool override_redirect, 219 bool override_redirect,
220 bool save_unders, 220 bool save_unders,
221 unsigned int depth, 221 unsigned int depth,
222 int class_type); 222 int class_type);
223 223
224 const FbWindow *m_parent; ///< parent FbWindow 224 const FbWindow *m_parent; ///< parent FbWindow
@@ -250,11 +250,11 @@ class ChangeProperty {
250public: 250public:
251 ChangeProperty(Display *disp, Atom prop, int mode, 251 ChangeProperty(Display *disp, Atom prop, int mode,
252 unsigned char *state, int num):m_disp(disp), 252 unsigned char *state, int num):m_disp(disp),
253 m_prop(prop), 253 m_prop(prop),
254 m_state(state), 254 m_state(state),
255 m_num(num), 255 m_num(num),
256 m_mode(mode){ 256 m_mode(mode){
257 257
258 } 258 }
259 void operator () (FbTk::FbWindow *win) { 259 void operator () (FbTk::FbWindow *win) {
260 XChangeProperty(m_disp, win->window(), m_prop, m_prop, 32, m_mode, 260 XChangeProperty(m_disp, win->window(), m_prop, m_prop, 32, m_mode,