~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to libwindow-settings/gnome-window-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2
 
 
3
 
/* gnome-window-manager.h
4
 
 * Copyright (C) 2002 Seth Nickell
5
 
 * Copyright (C) 2002 Red Hat, Inc.
6
 
 *
7
 
 * Written by: Seth Nickell <snickell@stanford.edu>,
8
 
 *             Havoc Pennington <hp@redhat.com>
9
 
 *
10
 
 * This program is free software; you can redistribute it and/or modify
11
 
 * it under the terms of the GNU General Public License as published by
12
 
 * the Free Software Foundation; either version 2, or (at your option)
13
 
 * any later version.
14
 
 *
15
 
 * This program is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with this program; if not, write to the Free Software
22
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23
 
 * 02111-1307, USA.
24
 
 */
25
 
 
26
 
#ifndef GNOME_WINDOW_MANAGER_H
27
 
#define GNOME_WINDOW_MANAGER_H
28
 
 
29
 
#include <glib-object.h>
30
 
 
31
 
#include <libgnome/gnome-desktop-item.h>
32
 
 
33
 
/* Increment if backward-incompatible changes are made, so we get a clean
34
 
 * error. In principle the libtool versioning handles this, but
35
 
 * in combination with dlopen I don't quite trust that.
36
 
 */
37
 
#define GNOME_WINDOW_MANAGER_INTERFACE_VERSION 1
38
 
 
39
 
typedef GObject * (* GnomeWindowManagerNewFunc) (int expected_interface_version);
40
 
 
41
 
typedef enum
42
 
{
43
 
        GNOME_WM_SETTING_FONT                = 1 << 0,
44
 
        GNOME_WM_SETTING_MOUSE_FOCUS         = 1 << 1,
45
 
        GNOME_WM_SETTING_AUTORAISE           = 1 << 2,
46
 
        GNOME_WM_SETTING_AUTORAISE_DELAY     = 1 << 3,
47
 
        GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER = 1 << 4,
48
 
        GNOME_WM_SETTING_THEME               = 1 << 5,
49
 
        GNOME_WM_SETTING_DOUBLE_CLICK_ACTION = 1 << 6,
50
 
        GNOME_WM_SETTING_MASK                =
51
 
        GNOME_WM_SETTING_FONT                |
52
 
        GNOME_WM_SETTING_MOUSE_FOCUS         |
53
 
        GNOME_WM_SETTING_AUTORAISE           |
54
 
        GNOME_WM_SETTING_AUTORAISE_DELAY     |
55
 
        GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER |
56
 
        GNOME_WM_SETTING_THEME               |
57
 
        GNOME_WM_SETTING_DOUBLE_CLICK_ACTION
58
 
} GnomeWMSettingsFlags;
59
 
 
60
 
typedef struct
61
 
{
62
 
        int number;
63
 
        const char *human_readable_name;
64
 
} GnomeWMDoubleClickAction;
65
 
 
66
 
typedef struct
67
 
{
68
 
        GnomeWMSettingsFlags flags; /* this allows us to expand the struct
69
 
                                     * while remaining binary compatible
70
 
                                     */
71
 
        const char *font;
72
 
        int autoraise_delay;
73
 
        /* One of the strings "Alt", "Control", "Super", "Hyper", "Meta" */
74
 
        const char *mouse_move_modifier;
75
 
        const char *theme;
76
 
        int double_click_action;
77
 
        
78
 
        guint focus_follows_mouse : 1;
79
 
        guint autoraise : 1;
80
 
 
81
 
} GnomeWMSettings;
82
 
 
83
 
G_BEGIN_DECLS
84
 
 
85
 
#define GNOME_WINDOW_MANAGER(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, gnome_window_manager_get_type (), GnomeWindowManager)
86
 
#define GNOME_WINDOW_MANAGER_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, gnome_window_manager_get_type (), GnomeWindowManagerClass)
87
 
#define IS_GNOME_WINDOW_MANAGER(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, gnome_window_manager_get_type ())
88
 
#define GNOME_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), gnome_window_manager_get_type, GnomeWindowManagerClass))
89
 
 
90
 
typedef struct _GnomeWindowManager GnomeWindowManager;
91
 
typedef struct _GnomeWindowManagerClass GnomeWindowManagerClass;
92
 
 
93
 
typedef struct _GnomeWindowManagerPrivate GnomeWindowManagerPrivate;
94
 
 
95
 
struct _GnomeWindowManager
96
 
{
97
 
        GObject parent;
98
 
        
99
 
        GnomeWindowManagerPrivate *p;
100
 
};
101
 
 
102
 
struct _GnomeWindowManagerClass
103
 
{
104
 
        GObjectClass klass;
105
 
 
106
 
        void         (* settings_changed)       (GnomeWindowManager    *wm);
107
 
        
108
 
        void         (* change_settings)        (GnomeWindowManager    *wm,
109
 
                                                 const GnomeWMSettings *settings);
110
 
        void         (* get_settings)           (GnomeWindowManager    *wm,
111
 
                                                 GnomeWMSettings       *settings);
112
 
 
113
 
        GList *      (* get_theme_list)         (GnomeWindowManager *wm);
114
 
        char *       (* get_user_theme_folder)  (GnomeWindowManager *wm);
115
 
 
116
 
        int          (* get_settings_mask)      (GnomeWindowManager *wm);
117
 
 
118
 
        void         (* get_double_click_actions) (GnomeWindowManager              *wm,
119
 
                                                   const GnomeWMDoubleClickAction **actions,
120
 
                                                   int                             *n_actions);
121
 
        
122
 
        void         (* padding_func_1)         (GnomeWindowManager *wm);
123
 
        void         (* padding_func_2)         (GnomeWindowManager *wm);
124
 
        void         (* padding_func_3)         (GnomeWindowManager *wm);
125
 
        void         (* padding_func_4)         (GnomeWindowManager *wm);
126
 
        void         (* padding_func_5)         (GnomeWindowManager *wm);
127
 
        void         (* padding_func_6)         (GnomeWindowManager *wm);
128
 
        void         (* padding_func_7)         (GnomeWindowManager *wm);
129
 
        void         (* padding_func_8)         (GnomeWindowManager *wm);
130
 
        void         (* padding_func_9)         (GnomeWindowManager *wm);
131
 
        void         (* padding_func_10)        (GnomeWindowManager *wm);
132
 
};
133
 
 
134
 
GObject *         gnome_window_manager_new                     (GnomeDesktopItem   *item);
135
 
GType             gnome_window_manager_get_type                (void);
136
 
const char *      gnome_window_manager_get_name                (GnomeWindowManager *wm);
137
 
GnomeDesktopItem *gnome_window_manager_get_ditem               (GnomeWindowManager *wm);
138
 
 
139
 
/* GList of char *'s */
140
 
GList *           gnome_window_manager_get_theme_list          (GnomeWindowManager *wm);
141
 
char *            gnome_window_manager_get_user_theme_folder   (GnomeWindowManager *wm);
142
 
 
143
 
/* only uses fields with their flags set */
144
 
void              gnome_window_manager_change_settings  (GnomeWindowManager    *wm,
145
 
                                                         const GnomeWMSettings *settings);
146
 
/* only gets fields with their flags set (and if it fails to get a field,
147
 
 * it unsets that flag, so flags should be checked on return)
148
 
 */
149
 
void              gnome_window_manager_get_settings     (GnomeWindowManager *wm,
150
 
                                                         GnomeWMSettings    *settings);
151
 
 
152
 
void              gnome_window_manager_settings_changed (GnomeWindowManager *wm);
153
 
 
154
 
void gnome_window_manager_get_double_click_actions (GnomeWindowManager              *wm,
155
 
                                                    const GnomeWMDoubleClickAction **actions,
156
 
                                                    int                             *n_actions);
157
 
 
158
 
/* Helper functions for GnomeWMSettings */
159
 
GnomeWMSettings *gnome_wm_settings_copy (GnomeWMSettings *settings);
160
 
void             gnome_wm_settings_free (GnomeWMSettings *settings);
161
 
 
162
 
G_END_DECLS
163
 
 
164
 
#endif /* GNOME_WINDOW_MANAGER_H */