1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* 3 * Copyright © 2000-2003 Marco Pesenti Gritti 4 * Copyright © 2010 Igalia S.L. 5 * 6 * This file is part of Epiphany. 7 * 8 * Epiphany is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * Epiphany is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with Epiphany. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #pragma once 23 24 G_BEGIN_DECLS 25 26 typedef enum 27 { 28 EPHY_PREFS_READER_FONT_STYLE_SANS, 29 EPHY_PREFS_READER_FONT_STYLE_SERIF, 30 } EphyPrefsReaderFontStyle; 31 32 typedef enum 33 { 34 EPHY_PREFS_READER_COLORS_LIGHT, 35 EPHY_PREFS_READER_COLORS_DARK, 36 } EphyPrefsReaderColorScheme; 37 38 typedef enum 39 { 40 EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS, 41 EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED 42 } EphyPrefsRestoreSessionPolicy; 43 44 typedef enum 45 { 46 EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS, 47 EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE, 48 EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_NEVER 49 } EphyPrefsUITabsBarVisibilityPolicy; 50 51 typedef enum 52 { 53 EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY_ON_DEMAND, 54 EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY_ALWAYS, 55 EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY_NEVER 56 } EphyPrefsWebHardwareAccelerationPolicy; 57 58 #define EPHY_PREFS_UI_SCHEMA "org.gnome.Epiphany.ui" 59 #define EPHY_PREFS_UI_EXPAND_TABS_BAR "expand-tabs-bar" 60 #define EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY "tabs-bar-visibility-policy" 61 #define EPHY_PREFS_UI_KEEP_WINDOW_OPEN "keep-window-open" 62 63 #define EPHY_PREFS_READER_SCHEMA "org.gnome.Epiphany.reader" 64 #define EPHY_PREFS_READER_FONT_STYLE "font-style" 65 #define EPHY_PREFS_READER_COLOR_SCHEME "color-scheme" 66 67 #define EPHY_PREFS_STATE_SCHEMA "org.gnome.Epiphany.state" 68 #define EPHY_PREFS_STATE_DOWNLOAD_DIR "download-dir" 69 #define EPHY_PREFS_STATE_RECENT_ENCODINGS "recent-encodings" 70 #define EPHY_PREFS_STATE_WINDOW_POSITION "window-position" 71 #define EPHY_PREFS_STATE_WINDOW_SIZE "window-size" 72 #define EPHY_PREFS_STATE_IS_MAXIMIZED "is-maximized" 73 74 static const char * const ephy_prefs_state_schema[] = { 75 EPHY_PREFS_STATE_DOWNLOAD_DIR, 76 EPHY_PREFS_STATE_RECENT_ENCODINGS, 77 EPHY_PREFS_STATE_WINDOW_POSITION, 78 EPHY_PREFS_STATE_WINDOW_SIZE, 79 EPHY_PREFS_STATE_IS_MAXIMIZED 80 }; 81 82 #define EPHY_PREFS_WEB_SCHEMA "org.gnome.Epiphany.web" 83 #define EPHY_PREFS_WEB_FONT_MIN_SIZE "min-font-size" 84 #define EPHY_PREFS_WEB_LANGUAGE "language" 85 #define EPHY_PREFS_WEB_USE_GNOME_FONTS "use-gnome-fonts" 86 #define EPHY_PREFS_WEB_SANS_SERIF_FONT "sans-serif-font" 87 #define EPHY_PREFS_WEB_SERIF_FONT "serif-font" 88 #define EPHY_PREFS_WEB_MONOSPACE_FONT "monospace-font" 89 #define EPHY_PREFS_WEB_ENABLE_USER_CSS "enable-user-css" 90 #define EPHY_PREFS_WEB_ENABLE_USER_JS "enable-user-js" 91 #define EPHY_PREFS_WEB_ENABLE_POPUPS "enable-popups" 92 #define EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING "enable-spell-checking" 93 #define EPHY_PREFS_WEB_USER_AGENT "user-agent" 94 #define EPHY_PREFS_WEB_DEFAULT_ENCODING "default-encoding" 95 #define EPHY_PREFS_WEB_ENABLE_ADBLOCK "enable-adblock" 96 #define EPHY_PREFS_WEB_REMEMBER_PASSWORDS "remember-passwords" 97 #define EPHY_PREFS_WEB_ENABLE_SITE_SPECIFIC_QUIRKS "enable-site-specific-quirks" 98 #define EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING "enable-safe-browsing" 99 #define EPHY_PREFS_WEB_ENABLE_ITP "enable-itp" 100 #define EPHY_PREFS_WEB_ENABLE_WEBSITE_DATA_STORAGE "enable-website-data-storage" 101 #define EPHY_PREFS_WEB_DEFAULT_ZOOM_LEVEL "default-zoom-level" 102 #define EPHY_PREFS_WEB_ENABLE_AUTOSEARCH "enable-autosearch" 103 #define EPHY_PREFS_WEB_ENABLE_MOUSE_GESTURES "enable-mouse-gestures" 104 #define EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY "last-upload-directory" 105 #define EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY "last-download-directory" 106 #define EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY "hardware-acceleration-policy" 107 #define EPHY_PREFS_WEB_ASK_ON_DOWNLOAD "ask-on-download" 108 #define EPHY_PREFS_WEB_SWITCH_TO_NEW_TAB "switch-to-new-tab" 109 #define EPHY_PREFS_WEB_ENABLE_WEBEXTENSIONS "enable-webextensions" 110 #define EPHY_PREFS_WEB_WEBEXTENSIONS_ACTIVE "webextensions-active" 111 112 static const char * const ephy_prefs_web_schema[] = { 113 EPHY_PREFS_WEB_FONT_MIN_SIZE, 114 EPHY_PREFS_WEB_LANGUAGE, 115 EPHY_PREFS_WEB_USE_GNOME_FONTS, 116 EPHY_PREFS_WEB_SANS_SERIF_FONT, 117 EPHY_PREFS_WEB_SERIF_FONT, 118 EPHY_PREFS_WEB_MONOSPACE_FONT, 119 EPHY_PREFS_WEB_ENABLE_USER_CSS, 120 EPHY_PREFS_WEB_ENABLE_USER_JS, 121 EPHY_PREFS_WEB_ENABLE_POPUPS, 122 EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING, 123 EPHY_PREFS_WEB_USER_AGENT, 124 EPHY_PREFS_WEB_DEFAULT_ENCODING, 125 EPHY_PREFS_WEB_ENABLE_ADBLOCK, 126 EPHY_PREFS_WEB_REMEMBER_PASSWORDS, 127 EPHY_PREFS_WEB_ENABLE_SITE_SPECIFIC_QUIRKS, 128 EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING, 129 EPHY_PREFS_WEB_ENABLE_ITP, 130 EPHY_PREFS_WEB_ENABLE_WEBSITE_DATA_STORAGE, 131 EPHY_PREFS_WEB_DEFAULT_ZOOM_LEVEL, 132 EPHY_PREFS_WEB_ENABLE_AUTOSEARCH, 133 EPHY_PREFS_WEB_ENABLE_MOUSE_GESTURES, 134 EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY, 135 EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY, 136 EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY, 137 EPHY_PREFS_WEB_ASK_ON_DOWNLOAD, 138 EPHY_PREFS_WEB_SWITCH_TO_NEW_TAB, 139 EPHY_PREFS_WEB_ENABLE_WEBEXTENSIONS, 140 }; 141 142 #define EPHY_PREFS_SCHEMA "org.gnome.Epiphany" 143 #define EPHY_PREFS_HOMEPAGE_URL "homepage-url" 144 #define EPHY_PREFS_NEW_WINDOWS_IN_TABS "new-windows-in-tabs" 145 #define EPHY_PREFS_WARN_ON_CLOSE_UNSUBMITTED_DATA "warn-on-close-unsubmitted-data" 146 #define EPHY_PREFS_ENABLE_CARET_BROWSING "enable-caret-browsing" 147 #define EPHY_PREFS_RESTORE_SESSION_POLICY "restore-session-policy" 148 #define EPHY_PREFS_RESTORE_SESSION_DELAYING_LOADS "restore-session-delaying-loads" 149 #define EPHY_PREFS_CONTENT_FILTERS "content-filters" 150 #define EPHY_PREFS_SEARCH_ENGINES "search-engines" 151 #define EPHY_PREFS_DEFAULT_SEARCH_ENGINE "default-search-engine" 152 #define EPHY_PREFS_ASK_FOR_DEFAULT "ask-for-default" 153 #define EPHY_PREFS_START_IN_INCOGNITO_MODE "start-in-incognito-mode" 154 #define EPHY_PREFS_ACTIVE_CLEAR_DATA_ITEMS "active-clear-data-items" 155 #define EPHY_PREFS_USE_GOOGLE_SEARCH_SUGGESTIONS "use-google-search-suggestions" 156 157 #define EPHY_PREFS_LOCKDOWN_SCHEMA "org.gnome.Epiphany.lockdown" 158 #define EPHY_PREFS_LOCKDOWN_FULLSCREEN "disable-fullscreen" 159 #define EPHY_PREFS_LOCKDOWN_ARBITRARY_URL "disable-arbitrary-url" 160 #define EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING "disable-bookmark-editing" 161 #define EPHY_PREFS_LOCKDOWN_HISTORY "disable-history" 162 #define EPHY_PREFS_LOCKDOWN_SAVE_TO_DISK "disable-save-to-disk" 163 #define EPHY_PREFS_LOCKDOWN_PRINTING "disable-printing" 164 #define EPHY_PREFS_LOCKDOWN_QUIT "disable-quit" 165 #define EPHY_PREFS_LOCKDOWN_CONTEXT_MENU "disable-context-menu" 166 167 #define EPHY_PREFS_SYNC_SCHEMA "org.gnome.Epiphany.sync" 168 #define EPHY_PREFS_SYNC_USER "sync-user" 169 #define EPHY_PREFS_SYNC_TIME "sync-time" 170 #define EPHY_PREFS_SYNC_DEVICE_ID "sync-device-id" 171 #define EPHY_PREFS_SYNC_DEVICE_NAME "sync-device-name" 172 #define EPHY_PREFS_SYNC_FREQUENCY "sync-frequency" 173 #define EPHY_PREFS_SYNC_WITH_FIREFOX "sync-with-firefox" 174 #define EPHY_PREFS_SYNC_BOOKMARKS_ENABLED "sync-bookmarks-enabled" 175 #define EPHY_PREFS_SYNC_BOOKMARKS_TIME "sync-bookmarks-time" 176 #define EPHY_PREFS_SYNC_BOOKMARKS_INITIAL "sync-bookmarks-initial" 177 #define EPHY_PREFS_SYNC_PASSWORDS_ENABLED "sync-passwords-enabled" 178 #define EPHY_PREFS_SYNC_PASSWORDS_TIME "sync-passwords-time" 179 #define EPHY_PREFS_SYNC_PASSWORDS_INITIAL "sync-passwords-initial" 180 #define EPHY_PREFS_SYNC_HISTORY_ENABLED "sync-history-enabled" 181 #define EPHY_PREFS_SYNC_HISTORY_TIME "sync-history-time" 182 #define EPHY_PREFS_SYNC_HISTORY_INITIAL "sync-history-initial" 183 #define EPHY_PREFS_SYNC_OPEN_TABS_ENABLED "sync-open-tabs-enabled" 184 #define EPHY_PREFS_SYNC_OPEN_TABS_TIME "sync-open-tabs-time" 185 #define EPHY_PREFS_SYNC_TOKEN_SERVER "sync-token-server" 186 #define EPHY_PREFS_SYNC_ACCOUNTS_SERVER "sync-accounts-server" 187 188 #define EPHY_PREFS_WEB_APP_SCHEMA "org.gnome.Epiphany.webapp" 189 #define EPHY_PREFS_WEB_APP_ADDITIONAL_URLS "additional-urls" 190 #define EPHY_PREFS_WEB_APP_SHOW_NAVIGATION_BUTTONS "show-navigation-buttons" 191 #define EPHY_PREFS_WEB_APP_RUN_IN_BACKGROUND "run-in-background" 192 #define EPHY_PREFS_WEB_APP_SYSTEM "system" 193 194 static struct { 195 const char *schema; 196 const char *path; 197 gboolean is_webapp_only; 198 } const ephy_prefs_relocatable_schemas[] = { 199 { EPHY_PREFS_STATE_SCHEMA, "state/", FALSE }, 200 { EPHY_PREFS_WEB_SCHEMA, "web/", FALSE }, 201 { EPHY_PREFS_WEB_APP_SCHEMA, "webapp/", TRUE } 202 }; 203 204 G_END_DECLS 205