~ps-jenkins/compiz/latestsnapshot-10.9.9daily13.06.1913.04-0ubuntu1

« back to all changes in this revision

Viewing changes to plugins/showdesktop/src/showdesktop.h

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2013-04-02 19:24:11 UTC
  • mfrom: (3643.1.3 back-to-raring)
  • Revision ID: tarmac-20130402192411-8jqkwbion75aazvt
Make lp:compiz/0.9.9 identical to lp:compiz/raring, so we can use it for 
raring maintenance and eliminate lp:compiz/raring.

The changes that this proposal "undoes" have not been lost. They have just
moved to the new development series: lp:compiz/0.9.10 (lp:compiz now points
to this).

Approved by PS Jenkins bot, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
#include "showdesktop_options.h"
43
43
 
 
44
#define WIN_X(w) ((w)->x () - (w)->border ().left)
 
45
#define WIN_Y(w) ((w)->y () - (w)->border ().top)
 
46
#define WIN_W(w) ((w)->width () + (w)->border ().left + (w)->border ().right)
 
47
#define WIN_H(w) ((w)->height () + (w)->border ().top + (w)->border ().bottom)
 
48
 
 
49
#define OFF_LEFT(w) ((w)->width () + (w)->border ().right)
 
50
#define OFF_RIGHT(w) ((w)->border ().left)
 
51
#define OFF_TOP(w) ((w)->height () + (w)->border ().bottom)
 
52
#define OFF_BOTTOM(w) ((w)->border ().top)
 
53
 
 
54
#define MOVE_LEFT(w) ((WIN_X (w) + (WIN_W (w) / 2)) < (screen->width () / 2))
 
55
#define MOVE_UP(w) ((WIN_Y (w) + (WIN_H (w) / 2)) < (screen->height () / 2))
 
56
 
44
57
extern const unsigned short SD_STATE_OFF;
45
58
extern const unsigned short SD_STATE_ACTIVATING;
46
59
extern const unsigned short SD_STATE_ON;
47
60
extern const unsigned short SD_STATE_DEACTIVATING;
48
61
 
49
 
/* Initialize the enums containing allowed directions
50
 
 * for intelligent random and fully random direction modes */
51
 
 
52
 
enum IRDirection
53
 
{
54
 
    IntelligentRandomToCorners,
55
 
    IntelligentRandomUpDown,
56
 
    IntelligentRandomLeftRight
57
 
};
58
 
 
59
 
enum FRDirection
60
 
{
61
 
    FullRandomUp,
62
 
    FullRandomDown,
63
 
    FullRandomLeft,
64
 
    FullRandomRight,
65
 
    FullRandomTopLeft,
66
 
    FullRandomBottomLeft,
67
 
    FullRandomTopRight,
68
 
    FullRandomBottomRight
69
 
};
70
 
 
71
62
class ShowdesktopPlacer
72
63
{
73
64
    public:
74
65
        ShowdesktopPlacer ();
75
66
 
76
 
        void up (const CompRect                         &workArea,
77
 
                 const compiz::window::Geometry         &geometry,
78
 
                 const compiz::window::extents::Extents &border,
79
 
                 int                                    partSize);
80
 
 
81
 
        void down (const CompRect                         &workArea,
82
 
                   const compiz::window::Geometry         &geometry,
83
 
                   const compiz::window::extents::Extents &border,
84
 
                   int                                    partSize);
85
 
 
86
 
        void left (const CompRect                         &workArea,
87
 
                   const compiz::window::Geometry         &geometry,
88
 
                   const compiz::window::extents::Extents &border,
89
 
                   int                                    partSize);
90
 
 
91
 
        void right (const CompRect                         &workArea,
92
 
                    const compiz::window::Geometry         &geometry,
93
 
                    const compiz::window::extents::Extents &border,
94
 
                    int                                    partSize);
95
 
 
96
 
        void topLeft (const CompRect                         &workArea,
97
 
                      const compiz::window::Geometry         &geometry,
98
 
                      const compiz::window::extents::Extents &border,
99
 
                      int                                    partSize);
100
 
 
101
 
        void topRight (const CompRect                         &workArea,
102
 
                       const compiz::window::Geometry         &geometry,
103
 
                       const compiz::window::extents::Extents &border,
104
 
                       int                                    partSize);
105
 
 
106
 
        void bottomLeft (const CompRect                         &workArea,
107
 
                         const compiz::window::Geometry         &geometry,
108
 
                         const compiz::window::extents::Extents &border,
109
 
                         int                                    partSize);
110
 
 
111
 
        void bottomRight (const CompRect                         &workArea,
112
 
                          const compiz::window::Geometry         &geometry,
113
 
                          const compiz::window::extents::Extents &border,
114
 
                          int                                    partSize);
115
 
 
116
 
        void upOrDown (const CompRect                         &workArea,
117
 
                       const compiz::window::Geometry         &geometry,
118
 
                       const compiz::window::extents::Extents &border,
119
 
                       const CompSize                         &screen,
120
 
                       int                                    partSize);
121
 
 
122
 
        void leftOrRight (const CompRect                         &workArea,
123
 
                          const compiz::window::Geometry         &geometry,
124
 
                          const compiz::window::extents::Extents &border,
125
 
                          const CompSize                         &screen,
126
 
                          int                                    partSize);
127
 
 
128
 
        void closestCorner (const CompRect                         &workArea,
129
 
                            const compiz::window::Geometry         &geometry,
130
 
                            const compiz::window::extents::Extents &border,
131
 
                            const CompSize                         &screen,
132
 
                            int                                    partSize);
133
 
 
134
 
        void partRandom (const CompRect                         &workArea,
135
 
                         const compiz::window::Geometry         &geometry,
136
 
                         const compiz::window::extents::Extents &border,
137
 
                         const CompSize                         &screen,
138
 
                         int                                    partSize);
139
 
 
140
 
        void random (const CompRect                         &workArea,
141
 
                     const compiz::window::Geometry         &geometry,
142
 
                     const compiz::window::extents::Extents &border,
143
 
                     int                                    partSize);
144
 
 
145
67
        int placed;
146
68
        int onScreenX, onScreenY;
147
69
        int offScreenX, offScreenY;
190
112
 
191
113
        int
192
114
        prepareWindows (int oldState);
 
115
 
 
116
 
 
117
 
193
118
};
194
119
 
195
120
class ShowdesktopWindow: