2
* Copyright © 2012 Canonical Ltd.
4
* Permission to use, copy, modify, distribute, and sell this software
5
* and its documentation for any purpose is hereby granted without
6
* fee, provided that the above copyright notice appear in all copies
7
* and that both that copyright notice and this permission notice
8
* appear in supporting documentation, and that the name of
9
* Novell, Inc. not be used in advertising or publicity pertaining to
10
* distribution of the software without specific, written prior permission.
11
* Novell, Inc. makes no representations about the suitability of this
12
* software for any purpose. It is provided "as is" without express or
15
* NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17
* NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
20
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
21
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
* Author: Daniel d'Andrada <daniel.dandrada@canonical.com>
26
#ifndef RESIZE_MOCK_WINDOW_H
27
#define RESIZE_MOCK_WINDOW_H
29
#include <gmock/gmock.h>
31
#include "window-interface.h"
32
#include "gl-window-interface.h"
33
#include "composite-window-interface.h"
38
class MockWindow : public CompWindowInterface,
39
public GLWindowInterface,
40
public CompositeWindowInterface
43
MOCK_METHOD0(id, Window());
44
MOCK_CONST_METHOD0(outputRect, CompRect());
45
MOCK_METHOD0(syncAlarm, XSyncAlarm());
46
MOCK_CONST_METHOD0(sizeHints, XSizeHints&());
47
MOCK_CONST_METHOD0(serverGeometry, CompWindow::Geometry &());
48
MOCK_CONST_METHOD0(border, CompWindowExtents&());
49
MOCK_CONST_METHOD0(output, CompWindowExtents&());
50
MOCK_METHOD4(constrainNewWindowSize, bool (int width,
54
MOCK_METHOD0(syncWait, bool());
55
MOCK_METHOD0(sendSyncRequest, void());
56
MOCK_METHOD2(configureXWindow, void(unsigned int valueMask,
57
XWindowChanges *xwc));
58
MOCK_METHOD4(grabNotify, void (int x, int y,
61
MOCK_METHOD0(ungrabNotify, void());
62
MOCK_METHOD0(shaded, bool());
63
MOCK_CONST_METHOD0(size, CompSize());
64
MOCK_METHOD0(actions, unsigned int());
65
MOCK_METHOD0(type, unsigned int());
66
MOCK_METHOD0(state, unsigned int &());
67
MOCK_METHOD0(overrideRedirect, bool());
68
MOCK_METHOD1(updateAttributes, void(CompStackingUpdateMode stackingMode));
69
MOCK_METHOD0(outputDevice, int());
70
MOCK_CONST_METHOD0(serverSize, const CompSize());
71
MOCK_METHOD1(maximize, void(unsigned int state));
72
MOCK_METHOD1(evaluate, bool(CompMatch &match));
74
MOCK_METHOD0(getResizeInterface, ResizeWindowInterface*());
75
MOCK_METHOD0(getGLInterface, GLWindowInterface*());
76
MOCK_METHOD0(getCompositeInterface, CompositeWindowInterface*());
78
/* from GLWindowInterface */
79
MOCK_METHOD1(glPaintSetEnabled, void(bool enable));
81
/* from CompositeWindowInterface */
82
MOCK_METHOD1(damageRectSetEnabled, void(bool enable));
85
} /* namespace resize */
87
#endif /* RESIZE_MOCK_WINDOW_H */