KDE4 port
[kwingrid.git] / kwingrid.h
1 // -*- c++ -*-
2
3 #ifndef __kwingrid_h
4 #define __kwingrid_h 1
5
6 #include <Xlib.h>
7 #include <Xutil.h>
8
9 #include <QtCore/QObject>
10 #include <QtCore/QDateTime>
11 #include <QtCore/QRect>
12
13 class KWinGrid : public QObject
14 {
15     Q_OBJECT
16
17 public:
18     KWinGrid(int hgap__, int vgap__, int hsplit__, int vsplit__, int split__=0, int ignorestruts__=-1);
19
20     virtual void move(int __xslot, int __yslot);
21     virtual void resize(int __xsize, int __ysize);
22     virtual void moveResize(int __xslot, int __yslot,
23                             int __xsize, int __ysize);
24     virtual void moveRelative(int __xdiff, int __ydiff);
25     virtual void resizeRelative(int __xdiff, int __ydiff);
26     virtual void toDesk(int __desk);
27
28     virtual void quit();
29
30     virtual int activeWindow();
31
32 public slots:
33     void move_TL();
34     void move_TR();
35     void move_BL();
36     void move_BR();
37
38     void resize_Q();
39     void resize_H();
40     void resize_V();
41     void resize_F();
42
43     void move_L();
44     void move_R();
45     void move_U();
46     void move_D();
47
48     void resize_IH();
49     void resize_DH();
50     void resize_IV();
51     void resize_DV();
52
53 public slots:
54     void activeWindowChanged(WId id);
55
56 private:
57     void initGeometry(int __forceScreens=-1);
58     void updateGeometry(QRect& __new);
59     void applyGeometry();
60     QRect doMoveResize(int __xslot, int __yslot,
61                        int __xsize, int __ysize);
62
63     void updateTimestamp(void);
64
65     int split_;
66     int ignorestruts_;
67
68     int activeWindow_;
69     QRect inner_;
70     QRect outer_;
71     QRect orig_;
72     QRect region_;
73     XSizeHints hints_;
74     int screen_;
75     int numScreens_;
76
77     int hsize_;
78     int vsize_;
79
80     int hgap_;
81     int vgap_;
82     int hsplit_;
83     int vsplit_;
84
85     QDateTime timestamp_;
86 };
87
88 #endif