2
* Copyright 2012 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3, as published
6
* by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* version 3 along with this program. If not, see
15
* <http://www.gnu.org/licenses/>
17
* Authored by: Daniel d'Andrada <daniel.dandrada@canonical.com>
21
#ifndef COMPIZ_SCREEN_MOCK_H
22
#define COMPIZ_SCREEN_MOCK_H
27
// The real CompScreen
28
#include <core/screen.h>
30
typedef std::vector<CompWindowMock*> CompWindowMockVector;
32
class CompScreenMock {
34
typedef int GrabHandle;
36
int width() const {return _width;}
37
int height() const {return _height;}
39
Display *dpy() {return _dpy;}
41
const CompWindowMockVector & clientList(bool stackingOrder = true) {
43
return _client_list_stacking;
48
Window root() {return _root;}
50
GrabHandle pushGrab(Cursor cursor, const char *name) {return 0;}
51
void removeGrab(GrabHandle handle, CompPoint *restorePointer) {}
53
Cursor invisibleCursor() {return 1;}
58
CompWindowMockVector _client_list;
59
CompWindowMockVector _client_list_stacking;
63
extern CompScreenMock *screen_mock;
64
extern int pointerX_mock;
65
extern int pointerY_mock;