summaryrefslogtreecommitdiff
path: root/util/epist/window.hh
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-20 20:04:27 +0000
committerDana Jansens <danakj@orodu.net>2002-07-20 20:04:27 +0000
commit6595476d81f01cee9001bbc90dda5b37915e5821 (patch)
tree00666d4a79d6619469ed308cee1c16e706d6d512 /util/epist/window.hh
parent54dfa44cbecdb31cecb035e6ef8287007617b00c (diff)
keep track of window dimentions
use them for window moving
Diffstat (limited to 'util/epist/window.hh')
-rw-r--r--util/epist/window.hh24
1 files changed, 18 insertions, 6 deletions
diff --git a/util/epist/window.hh b/util/epist/window.hh
index e7f38280..df925ad6 100644
--- a/util/epist/window.hh
+++ b/util/epist/window.hh
@@ -30,13 +30,12 @@ extern "C" {
#include <list>
#include <string>
+#include "../../src/Util.hh"
+
class epist;
class screen;
-class XWindow;
class XAtom;
-typedef std::list<XWindow *> WindowList;
-
class XWindow {
public:
enum Max {
@@ -47,15 +46,18 @@ public:
};
private:
- epist *_epist;
+ epist *_epist;
screen *_screen;
- XAtom *_xatom;
+ XAtom *_xatom;
+
Window _window;
-
+
unsigned int _desktop;
std::string _title;
std::string _app_name;
std::string _app_class;
+ Rect _rect;
+ int _gravity;
// states
bool _shaded;
@@ -65,6 +67,8 @@ private:
bool _unmapped;
+ void updateDimentions();
+ void updateGravity();
void updateState();
void updateDesktop();
void updateTitle();
@@ -87,6 +91,11 @@ public:
inline bool iconic() const { return _iconic; }
inline bool maxVert() const { return _max_vert; }
inline bool maxHorz() const { return _max_horz; }
+ inline const Rect &area() const { return _rect; }
+ inline unsigned int x() const { return _rect.x(); }
+ inline unsigned int y() const { return _rect.y(); }
+ inline unsigned int width() const { return _rect.width(); }
+ inline unsigned int height() const { return _rect.height(); }
void processEvent(const XEvent &e);
@@ -98,6 +107,7 @@ public:
void focus() const;
void sendTo(unsigned int dest) const;
void move(int x, int y) const;
+ void resize(unsigned int width, unsigned int height) const;
void toggleMaximize(Max max) const; // i hate toggle functions
void maximize(Max max) const;
@@ -105,4 +115,6 @@ public:
bool operator == (const Window &w) const { return w == _window; }
};
+typedef std::list<XWindow *> WindowList;
+
#endif // __window_hh