~ubuntu-branches/ubuntu/quantal/compiz/quantal

« back to all changes in this revision

Viewing changes to plugins/resize/src/logic/tests/mock-window.h

  • Committer: Sebastien Bacher
  • Date: 2012-08-23 15:45:49 UTC
  • mfrom: (3269.2.21 gsettings-transition)
  • Revision ID: seb128@ubuntu.com-20120823154549-llj2223vo54js0li
  - Restore the fix for avoiding re-entering the glib event loop and 
    crashing. (LP: #1036490)
  - Including rsvg-cairo.h is now deprecated. (LP: #1039482)
  - Add keybinding integration for gnome-control-center
  - Separate the configuration for the minimize and unminimize animations.
    (LP: #1036739)
  - Ignore mouse press and release if it does not happen inside of the expo
    screen. (LP: #1036542). 
  - Additional keys from metacity to convert to GSettings
  - Maximize vertically if pointer reaches top or bottom edges.
  - Explicitly depend on resize-options. (LP: #1039834)
  - Add some docstring warnings about using those classes directly.
  - Fix some memory management issues on the mock objects, namely:
    Make destructor functions virtual where appropriate, so that we can add 
    them to lists polymorphically. Support polymorphic ccs*Unref function.
    Also make some other necessary changes to libcompizconfig.
  - Detect if rsvg 2.36.2 is installed (LP: #1039843)
  - GSettings integration backend, created a testsuite for it. Refactors a 
    bunch of the backend code, adds appropriate testsuites and refactors 
    the integration code to make it more flexible. (LP: #1035261)
* Add support for disabling gconf schemas installation
  - However, not enabled because of gtk-window-decorator for now
* Add libcompizconfig_gsettings_backend.so
* Workaround to install xml files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2012 Canonical Ltd.
 
3
 *
 
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
 
13
 * implied warranty.
 
14
 *
 
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.
 
22
 *
 
23
 * Author: Daniel d'Andrada <daniel.dandrada@canonical.com>
 
24
 */
 
25
 
 
26
#ifndef RESIZE_MOCK_WINDOW_H
 
27
#define RESIZE_MOCK_WINDOW_H
 
28
 
 
29
#include <gmock/gmock.h>
 
30
 
 
31
#include "window-interface.h"
 
32
#include "gl-window-interface.h"
 
33
#include "composite-window-interface.h"
 
34
 
 
35
namespace resize
 
36
{
 
37
 
 
38
class MockWindow :  public CompWindowInterface,
 
39
                    public GLWindowInterface,
 
40
                    public CompositeWindowInterface
 
41
{
 
42
public:
 
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,
 
51
                                               int height,
 
52
                                               int *newWidth,
 
53
                                               int *newHeight));
 
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,
 
59
                                   unsigned int state,
 
60
                                   unsigned int mask));
 
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));
 
73
 
 
74
    MOCK_METHOD0(getResizeInterface, ResizeWindowInterface*());
 
75
    MOCK_METHOD0(getGLInterface, GLWindowInterface*());
 
76
    MOCK_METHOD0(getCompositeInterface, CompositeWindowInterface*());
 
77
 
 
78
    /* from GLWindowInterface  */
 
79
    MOCK_METHOD1(glPaintSetEnabled, void(bool enable));
 
80
 
 
81
    /* from CompositeWindowInterface  */
 
82
    MOCK_METHOD1(damageRectSetEnabled, void(bool enable));
 
83
};
 
84
 
 
85
} /* namespace resize */
 
86
 
 
87
#endif /* RESIZE_MOCK_WINDOW_H */