~muktupavels/compiz/gwd-improve-settings-storage

« back to all changes in this revision

Viewing changes to gtk/window-decorator/gwd-settings-writable-interface.c

  • Committer: CI Train Bot
  • Author(s): Alberts Muktupāvels
  • Date: 2016-05-25 14:20:28 UTC
  • mfrom: (4010.20.7 gwd-remove-settings-writable)
  • Revision ID: ci-train-bot@canonical.com-20160525142028-6pu2qyxof8ji4uds
Remove GWDSettingsWritable.
Approved by: Sam Spilsbury

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright © 2012 Canonical Ltd
3
 
 *
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.
8
 
 *
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.
13
 
 *
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.
17
 
 *
18
 
 * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
19
 
 */
20
 
#include "gwd-settings-writable-interface.h"
21
 
 
22
 
static void gwd_settings_writable_interface_default_init (GWDSettingsWritableInterface *settings_interface);
23
 
 
24
 
G_DEFINE_INTERFACE (GWDSettingsWritable, gwd_settings_writable_interface, G_TYPE_OBJECT);
25
 
 
26
 
static void gwd_settings_writable_interface_default_init (GWDSettingsWritableInterface *settings_interface)
27
 
{
28
 
}
29
 
 
30
 
void
31
 
gwd_settings_writable_freeze_updates (GWDSettingsWritable *settings)
32
 
{
33
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
34
 
    (*iface->freeze_updates) (settings);
35
 
}
36
 
 
37
 
void
38
 
gwd_settings_writable_thaw_updates (GWDSettingsWritable *settings)
39
 
{
40
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
41
 
    (*iface->thaw_updates) (settings);
42
 
}
43
 
 
44
 
gboolean
45
 
gwd_settings_writable_shadow_property_changed (GWDSettingsWritable *settings,
46
 
                                               gdouble             active_shadow_radius,
47
 
                                               gdouble             active_shadow_opacity,
48
 
                                               gdouble             active_shadow_offset_x,
49
 
                                               gdouble             active_shadow_offset_y,
50
 
                                               const gchar         *active_shadow_color,
51
 
                                               gdouble             inactive_shadow_radius,
52
 
                                               gdouble             inactive_shadow_opacity,
53
 
                                               gdouble             inactive_shadow_offset_x,
54
 
                                               gdouble             inactive_shadow_offset_y,
55
 
                                               const gchar         *inactive_shadow_color)
56
 
{
57
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
58
 
    return (*iface->shadow_property_changed) (settings,
59
 
                                              active_shadow_radius,
60
 
                                              active_shadow_opacity,
61
 
                                              active_shadow_offset_x,
62
 
                                              active_shadow_offset_y,
63
 
                                              active_shadow_color,
64
 
                                              inactive_shadow_radius,
65
 
                                              inactive_shadow_opacity,
66
 
                                              inactive_shadow_offset_x,
67
 
                                              inactive_shadow_offset_y,
68
 
                                              inactive_shadow_color);
69
 
}
70
 
 
71
 
gboolean
72
 
gwd_settings_writable_use_tooltips_changed (GWDSettingsWritable *settings,
73
 
                                            gboolean            use_tooltips)
74
 
{
75
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
76
 
    return (*iface->use_tooltips_changed) (settings, use_tooltips);
77
 
}
78
 
 
79
 
gboolean
80
 
gwd_settings_writable_blur_changed (GWDSettingsWritable *settings,
81
 
                                    const gchar         *blur_type)
82
 
{
83
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
84
 
    return (*iface->blur_changed) (settings, blur_type);
85
 
}
86
 
 
87
 
gboolean
88
 
gwd_settings_writable_metacity_theme_changed (GWDSettingsWritable *settings,
89
 
                                              gboolean            use_metacity_theme,
90
 
                                              const gchar         *metacity_theme)
91
 
{
92
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
93
 
    return (*iface->metacity_theme_changed) (settings, use_metacity_theme, metacity_theme);
94
 
}
95
 
 
96
 
gboolean
97
 
gwd_settings_writable_opacity_changed (GWDSettingsWritable *settings,
98
 
                                       gdouble             active_opacity,
99
 
                                       gdouble             inactive_opacity,
100
 
                                       gboolean            active_shade_opacity,
101
 
                                       gboolean            inactive_shade_opacity)
102
 
{
103
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
104
 
    return (*iface->opacity_changed) (settings, active_opacity, inactive_opacity, active_shade_opacity, inactive_shade_opacity);
105
 
}
106
 
 
107
 
gboolean
108
 
gwd_settings_writable_button_layout_changed (GWDSettingsWritable *settings,
109
 
                                             const gchar         *button_layout)
110
 
{
111
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
112
 
    return (*iface->button_layout_changed) (settings, button_layout);
113
 
}
114
 
 
115
 
gboolean
116
 
gwd_settings_writable_font_changed (GWDSettingsWritable *settings,
117
 
                                    gboolean            titlebar_uses_system_font,
118
 
                                    const gchar         *titlebar_font)
119
 
{
120
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
121
 
    return (*iface->font_changed) (settings, titlebar_uses_system_font, titlebar_font);
122
 
}
123
 
 
124
 
gboolean
125
 
gwd_settings_writable_titlebar_actions_changed (GWDSettingsWritable *settings,
126
 
                                                const gchar         *action_double_click_titlebar,
127
 
                                                const gchar         *action_middle_click_titlebar,
128
 
                                                const gchar         *action_right_click_titlebar,
129
 
                                                const gchar         *mouse_wheel_action)
130
 
{
131
 
    GWDSettingsWritableInterface *iface = GWD_SETTINGS_WRITABLE_GET_INTERFACE (settings);
132
 
    return (*iface->titlebar_actions_changed) (settings,
133
 
                                               action_double_click_titlebar,
134
 
                                               action_middle_click_titlebar,
135
 
                                               action_right_click_titlebar,
136
 
                                               mouse_wheel_action);
137
 
}