add move-to-screen shortcuts
[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,
19              int ignorestruts__=-1,
20              int reserveNorth__=0, int reserveSouth__=0, int reserveWest__=0, int reserveEast__=0,
21              int southstrut__=0, int strutscreen__=-2);
22
23     virtual void move(int __xslot, int __yslot);
24     virtual void resize(int __xsize, int __ysize);
25     virtual void moveResize(int __xslot, int __yslot,
26                             int __xsize, int __ysize);
27     virtual void moveRelative(int __xdiff, int __ydiff);
28     virtual void resizeRelative(int __xdiff, int __ydiff);
29     virtual void toScreen(int screen);
30     virtual void toDesk(int __desk);
31
32     virtual void quit();
33
34     virtual int activeWindow();
35
36 public slots:
37     void move_TL();
38     void move_TR();
39     void move_BL();
40     void move_BR();
41
42     void resize_Q();
43     void resize_H();
44     void resize_V();
45     void resize_F();
46
47     void move32_00();
48     void move32_10();
49     void move32_20();
50     void move32_01();
51     void move32_11();
52     void move32_21();
53     void resize32_00();
54     void resize32_10();
55     void resize32_20();
56     void resize32_01();
57     void resize32_11();
58     void resize32_21();
59
60     void move43_00();
61     void move43_10();
62     void move43_20();
63     void move43_30();
64     void move43_01();
65     void move43_11();
66     void move43_21();
67     void move43_31();
68     void move43_02();
69     void move43_12();
70     void move43_22();
71     void move43_32();
72     void resize43_00();
73     void resize43_10();
74     void resize43_20();
75     void resize43_30();
76     void resize43_01();
77     void resize43_11();
78     void resize43_21();
79     void resize43_31();
80     void resize43_02();
81     void resize43_12();
82     void resize43_22();
83     void resize43_32();
84
85     void move_L();
86     void move_R();
87     void move_U();
88     void move_D();
89
90     void resize_IH();
91     void resize_DH();
92     void resize_IV();
93     void resize_DV();
94
95     void move_Screen0();
96     void move_Screen1();
97
98 public slots:
99     void activeWindowChanged(WId id);
100
101 private:
102     void initGeometry(int __forceScreens=-1);
103     void updateGeometry(QRect& __new);
104     void applyGeometry();
105     QRect doMoveResize(int __xslot, int __yslot,
106                        int __xsize, int __ysize);
107     void moveSlot(int nx, int ny, int posx, int posy);
108     void resizeSlot(int nx, int ny, int szx, int szy);
109
110     void updateTimestamp(void);
111
112     int split_;
113     int ignorestruts_;
114     int reserveNorth_;
115     int reserveSouth_;
116     int reserveEast_;
117     int reserveWest_;
118
119     int activeWindow_;
120     QRect inner_;
121     QRect outer_;
122     QRect orig_;
123     QRect region_;
124     XSizeHints hints_;
125     int screen_;
126     int numScreens_;
127
128     int hsize_;
129     int vsize_;
130
131     int hgap_;
132     int vgap_;
133     int hsplit_;
134     int vsplit_;
135
136     int southstrut_;
137     int strutscreen_;
138
139     QDateTime timestamp_;
140 };
141
142 #endif