~ubuntu-branches/ubuntu/trusty/compiz/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-08-22 06:58:07 UTC
  • mto: This revision was merged to the branch mainline in revision 3352.
  • Revision ID: package-import@ubuntu.com-20130822065807-17nlzez0d30y09so
Tags: upstream-0.9.10+13.10.20130822
ImportĀ upstreamĀ versionĀ 0.9.10+13.10.20130822

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 
76
76
    public:
77
77
 
78
 
        typedef enum {
 
78
        typedef enum
 
79
        {
79
80
            NORTHEAST,
80
81
            NORTHWEST,
81
82
            SOUTHEAST,
83
84
            CENTER
84
85
        } ZoomGravity;
85
86
 
86
 
        typedef enum {
 
87
        typedef enum
 
88
        {
87
89
            NORTH,
88
90
            SOUTH,
89
91
            EAST,
93
95
        class CursorTexture
94
96
        {
95
97
            public:
 
98
 
96
99
                bool       isSet;
97
100
                GLuint     texture;
98
101
                CompScreen *screen;
100
103
                int        height;
101
104
                int        hotX;
102
105
                int        hotY;
 
106
 
103
107
            public:
 
108
 
104
109
                CursorTexture ();
105
110
        };
106
111
 
135
140
                GLfloat           xtrans;
136
141
                GLfloat           ytrans;
137
142
                bool              locked;
 
143
 
138
144
            public:
139
145
 
140
146
                ZoomArea (int out);
146
152
 
147
153
    public:
148
154
 
149
 
        std::vector <ZoomArea>   zooms; // list of zooms (different zooms for
150
 
                                        // each output
151
 
        CompPoint                mouse; // we get this from mousepoll
152
 
        unsigned long int        grabbed;
153
 
        CompScreen::GrabHandle   grabIndex; // for zoomBox
154
 
        time_t                   lastChange;
155
 
        CursorTexture            cursor; // the texture for the faux-cursor
156
 
                                         // we paint to do fake input
157
 
                                         // handling
158
 
        bool                     cursorInfoSelected;
159
 
        bool                     cursorHidden;
160
 
        CompRect                 box;
161
 
        CompPoint                clickPos;
 
155
        std::vector <ZoomArea> zooms; // list of zooms (different zooms for each output)
 
156
        CompPoint              mouse; // we get this from mousepoll
 
157
        unsigned long int      grabbed;
 
158
        CompScreen::GrabHandle grabIndex; // for zoomBox
 
159
        time_t                 lastChange;
 
160
        CursorTexture          cursor;  // the texture for the faux-cursor
 
161
                                        // we paint to do fake input
 
162
                                        // handling
 
163
        bool                   cursorInfoSelected;
 
164
        bool                   cursorHidden;
 
165
        CompRect               box;
 
166
        CompPoint              clickPos;
162
167
 
163
 
        MousePoller              pollHandle; // mouse poller object
 
168
        MousePoller            pollHandle; // mouse poller object
164
169
 
165
170
     private:
166
171
 
167
172
        bool fixesSupported;
168
 
        int fixesEventBase;
169
 
        int fixesErrorBase;
 
173
        int  fixesEventBase;
 
174
        int  fixesErrorBase;
170
175
        bool canHideCursor;
171
176
 
172
177
     public:
176
181
 
177
182
        bool
178
183
        glPaintOutput (const GLScreenPaintAttrib &,
179
 
                       const GLMatrix            &,
180
 
                       const CompRegion          &,
181
 
                       CompOutput                *,
182
 
                       unsigned int);
 
184
                       const GLMatrix            &,
 
185
                       const CompRegion          &,
 
186
                       CompOutput                *,
 
187
                       unsigned int                );
183
188
 
184
189
        void
185
190
        donePaint ();
190
195
    public:
191
196
 
192
197
        int
193
 
        distanceToEdge (int out, EZoomScreen::ZoomEdge edge);
 
198
        distanceToEdge (int                   out,
 
199
                        EZoomScreen::ZoomEdge edge);
194
200
 
195
201
        bool
196
202
        isInMovement (int out);
197
203
 
198
204
        void
199
 
        adjustZoomVelocity (int out, float chunk);
 
205
        adjustZoomVelocity (int   out,
 
206
                            float chunk);
200
207
 
201
208
        void
202
 
        adjustXYVelocity (int out, float chunk);
 
209
        adjustXYVelocity (int   out,
 
210
                          float chunk);
203
211
 
204
212
        void
205
213
        drawBox (const GLMatrix &transform,
206
 
                 CompOutput          *output,
207
 
                 CompRect             box);
208
 
 
209
 
        void
210
 
        setCenter (int x, int y, bool instant);
211
 
 
212
 
        void
213
 
        setZoomArea (int        x,
214
 
                     int        y,
215
 
                     int        width,
216
 
                     int        height,
217
 
                     bool       instant);
 
214
                 CompOutput     *output,
 
215
                 CompRect       box);
 
216
 
 
217
        void
 
218
        setCenter (int  x,
 
219
                   int  y,
 
220
                   bool instant);
 
221
 
 
222
        void
 
223
        setZoomArea (int  x,
 
224
                     int  y,
 
225
                     int  width,
 
226
                     int  height,
 
227
                     bool instant);
218
228
 
219
229
        void
220
230
        areaToWindow (CompWindow *w);
221
231
 
222
232
        void
223
 
        panZoom (int xvalue, int yvalue);
 
233
        panZoom (int xvalue,
 
234
                 int yvalue);
224
235
 
225
236
        void
226
237
        enableMousePolling ();
227
238
 
228
239
        void
229
 
        setScale (int out, float value);
 
240
        setScale (int   out,
 
241
                  float value);
230
242
 
231
243
        void
232
244
        syncCenterToMouse ();
233
245
 
234
246
        void
235
 
        convertToZoomed (int        out,
236
 
                         int        x,
237
 
                         int        y,
238
 
                         int        *resultX,
239
 
                         int        *resultY);
 
247
        convertToZoomed (int out,
 
248
                         int x,
 
249
                         int y,
 
250
                         int *resultX,
 
251
                         int *resultY);
240
252
 
241
253
        void
242
 
        convertToZoomedTarget (int        out,
243
 
                               int        x,
244
 
                               int        y,
245
 
                               int        *resultX,
246
 
                               int        *resultY);
 
254
        convertToZoomedTarget (int out,
 
255
                               int x,
 
256
                               int y,
 
257
                               int *resultX,
 
258
                               int *resultY);
247
259
 
248
260
        bool
249
 
        ensureVisibility (int x, int y, int margin);
 
261
        ensureVisibility (int x,
 
262
                          int y,
 
263
                          int margin);
250
264
 
251
265
        void
252
266
        ensureVisibilityArea (int         x1,
273
287
        freeCursor (CursorTexture * cursor);
274
288
 
275
289
        void
276
 
        drawCursor (CompOutput          *output,
277
 
                    const GLMatrix      &transform);
 
290
        drawCursor (CompOutput     *output,
 
291
                    const GLMatrix &transform);
278
292
 
279
293
        void
280
294
        updateCursor (CursorTexture * cursor);