2
* Copyright © 2012 Canonical Ltd
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
* Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
20
#ifndef _COMPIZ_GWD_MOCK_SETTINGS_WRITABLE_H
21
#define _COMPIZ_GWD_MOCK_SETTINGS_WRITABLE_H
23
#include <gtest/gtest.h>
24
#include <gmock/gmock.h>
26
#include <glib-object.h>
28
typedef struct _GWDSettingsWritable GWDSettingsWritable;
30
class GWDMockSettingsWritableGMockInterface;
34
#define GWD_TYPE_MOCK_SETTINGS_WRITABLE (gwd_mock_settings_writable_get_type ())
35
GType gwd_mock_settings_writable_get_type ();
38
gwd_mock_settings_writable_new (GWDMockSettingsWritableGMockInterface *);
42
class GWDMockSettingsWritableGMockInterface
46
virtual ~GWDMockSettingsWritableGMockInterface () {}
48
virtual void freezeUpdates() = 0;
49
virtual void thawUpdates () = 0;
50
virtual gboolean shadowPropertyChanged (gdouble active_shadow_radius,
51
gdouble active_shadow_opacity,
52
gdouble active_shadow_offset_x,
53
gdouble active_shadow_offset_y,
54
const gchar *active_shadow_color,
55
gdouble inactive_shadow_radius,
56
gdouble inactive_shadow_opacity,
57
gdouble inactive_shadow_offset_x,
58
gdouble inactive_shadow_offset_y,
59
const gchar *inactive_shadow_color) = 0;
60
virtual gboolean useTooltipsChanged (gboolean newValue) = 0;
61
virtual gboolean blurChanged (const gchar *type) = 0;
62
virtual gboolean metacityThemeChanged (gboolean useMetacityTheme, const gchar *metacityTheme) = 0;
63
virtual gboolean opacityChanged (gdouble inactiveOpacity,
64
gdouble activeOpacity,
65
gboolean inactiveShadeOpacity,
66
gboolean activeShadeOpacity) = 0;
67
virtual gboolean buttonLayoutChanged (const gchar *buttonLayout) = 0;
68
virtual gboolean fontChanged (gboolean useSystemFont,
69
const gchar *titlebarFont) = 0;
70
virtual gboolean titlebarActionsChanged (const gchar *doubleClickAction,
71
const gchar *middleClickAction,
72
const gchar *rightClickAction,
73
const gchar *mouseWheelAction) = 0;
76
virtual void dispose () = 0;
77
virtual void finalize () = 0;
80
class GWDMockSettingsWritableGMock :
81
public GWDMockSettingsWritableGMockInterface
85
MOCK_METHOD0 (freezeUpdates, void ());
86
MOCK_METHOD0 (thawUpdates, void ());
87
MOCK_METHOD10 (shadowPropertyChanged, gboolean (gdouble, gdouble, gdouble, gdouble, const gchar *,
88
gdouble, gdouble, gdouble, gdouble, const gchar *));
89
MOCK_METHOD1 (useTooltipsChanged, gboolean (gboolean));
90
MOCK_METHOD1 (blurChanged, gboolean (const gchar *));
91
MOCK_METHOD2 (metacityThemeChanged, gboolean (gboolean, const gchar *));
92
MOCK_METHOD4 (opacityChanged, gboolean (gdouble, gdouble, gboolean, gboolean));
93
MOCK_METHOD1 (buttonLayoutChanged, gboolean (const gchar *));
94
MOCK_METHOD2 (fontChanged, gboolean (gboolean, const gchar *));
95
MOCK_METHOD4 (titlebarActionsChanged, gboolean (const gchar *,
100
MOCK_METHOD0 (dispose, void ());
101
MOCK_METHOD0 (finalize, void ());