1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
3
/* gnome-window-manager.h
4
* Copyright (C) 2002 Seth Nickell
5
* Copyright (C) 2002 Red Hat, Inc.
7
* Written by: Seth Nickell <snickell@stanford.edu>,
8
* Havoc Pennington <hp@redhat.com>
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)
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.
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
26
#ifndef GNOME_WINDOW_MANAGER_H
27
#define GNOME_WINDOW_MANAGER_H
29
#include <glib-object.h>
31
#include <libgnome/gnome-desktop-item.h>
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.
37
#define GNOME_WINDOW_MANAGER_INTERFACE_VERSION 1
39
typedef GObject * (* GnomeWindowManagerNewFunc) (int expected_interface_version);
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;
63
const char *human_readable_name;
64
} GnomeWMDoubleClickAction;
68
GnomeWMSettingsFlags flags; /* this allows us to expand the struct
69
* while remaining binary compatible
73
/* One of the strings "Alt", "Control", "Super", "Hyper", "Meta" */
74
const char *mouse_move_modifier;
76
int double_click_action;
78
guint focus_follows_mouse : 1;
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))
90
typedef struct _GnomeWindowManager GnomeWindowManager;
91
typedef struct _GnomeWindowManagerClass GnomeWindowManagerClass;
93
typedef struct _GnomeWindowManagerPrivate GnomeWindowManagerPrivate;
95
struct _GnomeWindowManager
99
GnomeWindowManagerPrivate *p;
102
struct _GnomeWindowManagerClass
106
void (* settings_changed) (GnomeWindowManager *wm);
108
void (* change_settings) (GnomeWindowManager *wm,
109
const GnomeWMSettings *settings);
110
void (* get_settings) (GnomeWindowManager *wm,
111
GnomeWMSettings *settings);
113
GList * (* get_theme_list) (GnomeWindowManager *wm);
114
char * (* get_user_theme_folder) (GnomeWindowManager *wm);
116
int (* get_settings_mask) (GnomeWindowManager *wm);
118
void (* get_double_click_actions) (GnomeWindowManager *wm,
119
const GnomeWMDoubleClickAction **actions,
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);
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);
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);
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)
149
void gnome_window_manager_get_settings (GnomeWindowManager *wm,
150
GnomeWMSettings *settings);
152
void gnome_window_manager_settings_changed (GnomeWindowManager *wm);
154
void gnome_window_manager_get_double_click_actions (GnomeWindowManager *wm,
155
const GnomeWMDoubleClickAction **actions,
158
/* Helper functions for GnomeWMSettings */
159
GnomeWMSettings *gnome_wm_settings_copy (GnomeWMSettings *settings);
160
void gnome_wm_settings_free (GnomeWMSettings *settings);
164
#endif /* GNOME_WINDOW_MANAGER_H */