]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdksettings.c
35bc452b1fb1944c6286e8300ded145dfc9de9ec
[~andy/gtk] / gdk / x11 / gdksettings.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26
27
28 #define GDK_SETTINGS_N_ELEMENTS()       G_N_ELEMENTS (gdk_settings_map)
29 #define GDK_SETTINGS_X_NAME(nth)        (gdk_settings_names + gdk_settings_map[nth].xsettings_offset)
30 #define GDK_SETTINGS_GDK_NAME(nth)      (gdk_settings_names + gdk_settings_map[nth].gdk_offset)
31
32 /* WARNING:
33  * You will need to update gdk_settings_map when adding a
34  * new setting, and make sure that checksettings does not
35  * fail before committing
36  */
37 static const char gdk_settings_names[] =
38   "Net/DoubleClickTime\0"     "gtk-double-click-time\0"
39   "Net/DoubleClickDistance\0" "gtk-double-click-distance\0"
40   "Net/DndDragThreshold\0"    "gtk-dnd-drag-threshold\0"
41   "Net/CursorBlink\0"         "gtk-cursor-blink\0"
42   "Net/CursorBlinkTime\0"     "gtk-cursor-blink-time\0"
43   "Net/ThemeName\0"           "gtk-theme-name\0"
44   "Net/IconThemeName\0"       "gtk-icon-theme-name\0"
45   "Gtk/CanChangeAccels\0"     "gtk-can-change-accels\0"
46   "Gtk/ColorPalette\0"        "gtk-color-palette\0"
47   "Gtk/FontName\0"            "gtk-font-name\0"
48   "Gtk/IconSizes\0"           "gtk-icon-sizes\0"
49   "Gtk/KeyThemeName\0"        "gtk-key-theme-name\0"
50   "Gtk/ToolbarStyle\0"        "gtk-toolbar-style\0"
51   "Gtk/ToolbarIconSize\0"     "gtk-toolbar-icon-size\0"
52   "Gtk/IMPreeditStyle\0"      "gtk-im-preedit-style\0"
53   "Gtk/IMStatusStyle\0"       "gtk-im-status-style\0"
54   "Gtk/Modules\0"             "gtk-modules\0"
55   "Gtk/FileChooserBackend\0"  "gtk-file-chooser-backend\0"
56   "Gtk/ButtonImages\0"        "gtk-button-images\0"
57   "Gtk/MenuImages\0"          "gtk-menu-images\0"
58   "Gtk/MenuBarAccel\0"        "gtk-menu-bar-accel\0"
59   "Gtk/CursorThemeName\0"     "gtk-cursor-theme-name\0"
60   "Gtk/CursorThemeSize\0"     "gtk-cursor-theme-size\0"
61   "Gtk/ShowInputMethodMenu\0" "gtk-show-input-method-menu\0"
62   "Gtk/ShowUnicodeMenu\0"     "gtk-show-unicode-menu\0"
63   "Gtk/TimeoutInitial\0"      "gtk-timeout-initial\0"
64   "Gtk/TimeoutRepeat\0"       "gtk-timeout-repeat\0"
65   "Gtk/ColorScheme\0"         "gtk-color-scheme\0"
66   "Gtk/EnableAnimations\0"    "gtk-enable-animations\0"
67   "Xft/Antialias\0"           "gtk-xft-antialias\0"
68   "Xft/Hinting\0"             "gtk-xft-hinting\0"
69   "Xft/HintStyle\0"           "gtk-xft-hintstyle\0"
70   "Xft/RGBA\0"                "gtk-xft-rgba\0"
71   "Xft/DPI\0"                 "gtk-xft-dpi\0"
72   "Net/FallbackIconTheme\0"   "gtk-fallback-icon-theme\0"
73   "Gtk/TouchscreenMode\0"     "gtk-touchscreen-mode\0"
74   "Gtk/EnableAccels\0"        "gtk-enable-accels\0"
75   "Gtk/EnableMnemonics\0"     "gtk-enable-mnemonics\0"
76   "Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0"
77   "Gtk/IMModule\0"            "gtk-im-module\0"
78   "Fontconfig/Timestamp\0"    "gtk-fontconfig-timestamp\0"
79   "Net/SoundThemeName\0"      "gtk-sound-theme-name\0"
80   "Net/EnableInputFeedbackSounds\0" "gtk-enable-input-feedback-sounds\0"
81   "Net/EnableEventSounds\0"   "gtk-enable-event-sounds\0"
82   "Gtk/CursorBlinkTimeout\0"  "gtk-cursor-blink-timeout\0"
83   "Gtk/AutoMnemonics\0"       "gtk-auto-mnemonics\0"
84   "Gtk/VisibleFocus\0"        "gtk-visible-focus\0"
85   "Gtk/ShellShowsAppMenu\0"   "gtk-shell-shows-app-menu\0"
86   "Gtk/ShellShowsMenubar\0"   "gtk-shell-shows-menubar\0";
87
88
89 static const struct
90 {
91   gint xsettings_offset;
92   gint gdk_offset;
93 } gdk_settings_map[] = {
94   {    0,   20 },
95   {   42,   66 },
96   {   92,  113 },
97   {  136,  152 },
98   {  169,  189 },
99   {  211,  225 },
100   {  240,  258 },
101   {  278,  298 },
102   {  320,  337 },
103   {  355,  368 },
104   {  382,  396 },
105   {  411,  428 },
106   {  447,  464 },
107   {  482,  502 },
108   {  524,  543 },
109   {  564,  582 },
110   {  602,  614 },
111   {  626,  649 },
112   {  674,  691 },
113   {  709,  724 },
114   {  740,  757 },
115   {  776,  796 },
116   {  818,  838 },
117   {  860,  884 },
118   {  911,  931 },
119   {  953,  972 },
120   {  992, 1010 },
121   { 1029, 1045 },
122   { 1062, 1083 },
123   { 1105, 1119 },
124   { 1137, 1149 },
125   { 1165, 1179 },
126   { 1197, 1206 },
127   { 1219, 1227 },
128   { 1239, 1261 },
129   { 1285, 1305 },
130   { 1326, 1343 },
131   { 1361, 1381 },
132   { 1402, 1430 },
133   { 1460, 1473 },
134   { 1487, 1508 },
135   { 1533, 1552 },
136   { 1573, 1603 },
137   { 1636, 1658 },
138   { 1682, 1705 },
139   { 1730, 1748 },
140   { 1767, 1784 },
141   { 1802, 1824 },
142   { 1849, 1871 }
143 };