1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
/* Metacity preferences */
6
* Copyright (C) 2001 Havoc Pennington
7
* Copyright (C) 2006 Elijah Newren
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License as
11
* published by the Free Software Foundation; either version 2 of the
12
* License, or (at your option) any later version.
14
* This program is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
28
/* This header is a "common" one between the UI and core side */
30
#include <pango/pango-font.h>
34
META_PREF_MOUSE_BUTTON_MODS,
36
META_PREF_FOCUS_NEW_WINDOWS,
37
META_PREF_RAISE_ON_CLICK,
38
META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR,
39
META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR,
40
META_PREF_ACTION_RIGHT_CLICK_TITLEBAR,
42
META_PREF_AUTO_RAISE_DELAY,
44
META_PREF_TITLEBAR_FONT,
45
META_PREF_NUM_WORKSPACES,
46
META_PREF_APPLICATION_BASED,
47
META_PREF_KEYBINDINGS,
48
META_PREF_DISABLE_WORKAROUNDS,
50
META_PREF_TERMINAL_COMMAND,
51
META_PREF_BUTTON_LAYOUT,
52
META_PREF_WORKSPACE_NAMES,
53
META_PREF_VISUAL_BELL,
54
META_PREF_AUDIBLE_BELL,
55
META_PREF_VISUAL_BELL_TYPE,
56
META_PREF_REDUCED_RESOURCES,
57
META_PREF_GNOME_ACCESSIBILITY,
58
META_PREF_GNOME_ANIMATIONS,
59
META_PREF_CURSOR_THEME,
60
META_PREF_CURSOR_SIZE,
61
META_PREF_COMPOSITING_MANAGER,
62
META_PREF_RESIZE_WITH_RIGHT_BUTTON,
63
META_PREF_FORCE_FULLSCREEN,
64
META_PREF_HIDE_DECORATOR_TOOLTIP
67
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
70
void meta_prefs_add_listener (MetaPrefsChangedFunc func,
72
void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
75
void meta_prefs_init (void);
76
const char* meta_preference_to_string (MetaPreference pref);
78
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);
79
guint meta_prefs_get_mouse_button_resize (void);
80
guint meta_prefs_get_mouse_button_menu (void);
81
MetaFocusMode meta_prefs_get_focus_mode (void);
82
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void);
83
gboolean meta_prefs_get_raise_on_click (void);
84
gboolean meta_prefs_get_hide_decorator_tooltip (void);
85
const char* meta_prefs_get_theme (void);
86
/* returns NULL if GTK default should be used */
87
const PangoFontDescription* meta_prefs_get_titlebar_font (void);
88
int meta_prefs_get_num_workspaces (void);
89
gboolean meta_prefs_get_application_based (void);
90
gboolean meta_prefs_get_disable_workarounds (void);
91
gboolean meta_prefs_get_auto_raise (void);
92
int meta_prefs_get_auto_raise_delay (void);
93
gboolean meta_prefs_get_reduced_resources (void);
94
gboolean meta_prefs_get_gnome_accessibility (void);
95
gboolean meta_prefs_get_gnome_animations (void);
97
const char* meta_prefs_get_command (int i);
99
char* meta_prefs_get_gconf_key_for_command (int i);
101
const char* meta_prefs_get_terminal_command (void);
102
const char* meta_prefs_get_gconf_key_for_terminal_command (void);
104
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
106
/* Double, right, middle click can be configured to any titlebar meta-action */
107
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
108
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
109
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
111
void meta_prefs_set_num_workspaces (int n_workspaces);
113
const char* meta_prefs_get_workspace_name (int i);
114
void meta_prefs_change_workspace_name (int i,
117
const char* meta_prefs_get_cursor_theme (void);
118
int meta_prefs_get_cursor_size (void);
119
gboolean meta_prefs_get_compositing_manager (void);
120
gboolean meta_prefs_get_force_fullscreen (void);
123
* Sets whether the compositor is turned on.
125
* \param whether TRUE to turn on, FALSE to turn off
127
void meta_prefs_set_compositing_manager (gboolean whether);
129
void meta_prefs_set_force_fullscreen (gboolean whether);
131
/* XXX FIXME This should be x-macroed, but isn't yet because it would be
132
* difficult (or perhaps impossible) to add the suffixes using the current
133
* system. It needs some more thought, perhaps after the current system
136
typedef enum _MetaKeyBindingAction
138
META_KEYBINDING_ACTION_NONE = -1,
139
META_KEYBINDING_ACTION_WORKSPACE_1,
140
META_KEYBINDING_ACTION_WORKSPACE_2,
141
META_KEYBINDING_ACTION_WORKSPACE_3,
142
META_KEYBINDING_ACTION_WORKSPACE_4,
143
META_KEYBINDING_ACTION_WORKSPACE_5,
144
META_KEYBINDING_ACTION_WORKSPACE_6,
145
META_KEYBINDING_ACTION_WORKSPACE_7,
146
META_KEYBINDING_ACTION_WORKSPACE_8,
147
META_KEYBINDING_ACTION_WORKSPACE_9,
148
META_KEYBINDING_ACTION_WORKSPACE_10,
149
META_KEYBINDING_ACTION_WORKSPACE_11,
150
META_KEYBINDING_ACTION_WORKSPACE_12,
151
META_KEYBINDING_ACTION_WORKSPACE_LEFT,
152
META_KEYBINDING_ACTION_WORKSPACE_RIGHT,
153
META_KEYBINDING_ACTION_WORKSPACE_UP,
154
META_KEYBINDING_ACTION_WORKSPACE_DOWN,
155
META_KEYBINDING_ACTION_SWITCH_GROUP,
156
META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD,
157
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
158
META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD,
159
META_KEYBINDING_ACTION_SWITCH_PANELS,
160
META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD,
161
META_KEYBINDING_ACTION_CYCLE_GROUP,
162
META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD,
163
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
164
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
165
META_KEYBINDING_ACTION_CYCLE_PANELS,
166
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
167
META_KEYBINDING_ACTION_SHOW_DESKTOP,
168
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
169
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
170
META_KEYBINDING_ACTION_COMMAND_1,
171
META_KEYBINDING_ACTION_COMMAND_2,
172
META_KEYBINDING_ACTION_COMMAND_3,
173
META_KEYBINDING_ACTION_COMMAND_4,
174
META_KEYBINDING_ACTION_COMMAND_5,
175
META_KEYBINDING_ACTION_COMMAND_6,
176
META_KEYBINDING_ACTION_COMMAND_7,
177
META_KEYBINDING_ACTION_COMMAND_8,
178
META_KEYBINDING_ACTION_COMMAND_9,
179
META_KEYBINDING_ACTION_COMMAND_10,
180
META_KEYBINDING_ACTION_COMMAND_11,
181
META_KEYBINDING_ACTION_COMMAND_12
182
} MetaKeyBindingAction;
187
unsigned int keycode;
188
MetaVirtualModifier modifiers;
195
* A list of MetaKeyCombos. Each of them is bound to
196
* this keypref. If one has keysym==modifiers==0, it is
197
* ignored. For historical reasons, the first entry is
198
* governed by the pref FOO and the remainder are
199
* governed by the pref FOO_list.
203
/** for keybindings that can have shift or not like Alt+Tab */
204
gboolean add_shift:1;
206
/** for keybindings that apply only to a window */
207
gboolean per_window:1;
210
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
213
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
215
void meta_prefs_get_window_binding (const char *name,
216
unsigned int *keysym,
217
MetaVirtualModifier *modifiers);
221
META_VISUAL_BELL_INVALID = 0,
222
META_VISUAL_BELL_FULLSCREEN_FLASH,
223
META_VISUAL_BELL_FRAME_FLASH
225
} MetaVisualBellType;
227
gboolean meta_prefs_get_visual_bell (void);
228
gboolean meta_prefs_bell_is_audible (void);
229
MetaVisualBellType meta_prefs_get_visual_bell_type (void);