OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
| 2 // limitations under the License. |
| 3 // See the License for the specific language governing permissions and |
| 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
| 6 // Unless required by applicable law or agreed to in writing, software |
| 7 // |
| 8 // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 // |
| 10 // You may obtain a copy of the License at |
| 11 // you may not use this file except in compliance with the License. |
| 12 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 // |
| 14 goog.provide('i18n.input.chrome.inputview.Settings'); |
| 15 |
| 16 |
| 17 goog.scope(function() { |
| 18 |
| 19 |
| 20 |
| 21 /** |
| 22 * The settings. |
| 23 * |
| 24 * @constructor |
| 25 */ |
| 26 i18n.input.chrome.inputview.Settings = function() {}; |
| 27 var Settings = i18n.input.chrome.inputview.Settings; |
| 28 |
| 29 |
| 30 /** |
| 31 * True to always render the altgr character in the soft key. |
| 32 * |
| 33 * @type {boolean} |
| 34 */ |
| 35 Settings.prototype.alwaysRenderAltGrCharacter = false; |
| 36 |
| 37 |
| 38 /** @type {boolean} */ |
| 39 Settings.prototype.autoSpace = false; |
| 40 |
| 41 |
| 42 /** @type {boolean} */ |
| 43 Settings.prototype.autoCapital = false; |
| 44 |
| 45 |
| 46 /** @type {boolean} */ |
| 47 Settings.prototype.autoCorrection = false; |
| 48 |
| 49 |
| 50 /** @type {boolean} */ |
| 51 Settings.prototype.supportCompact = false; |
| 52 |
| 53 |
| 54 /** @type {boolean} */ |
| 55 Settings.prototype.enableLongPress = true; |
| 56 |
| 57 |
| 58 /** @type {boolean} */ |
| 59 Settings.prototype.doubleSpacePeriod = false; |
| 60 |
| 61 |
| 62 /** @type {boolean} */ |
| 63 Settings.prototype.soundOnKeypress = false; |
| 64 |
| 65 |
| 66 /** |
| 67 * The flag to control whether candidates naviagation feature is enabled. |
| 68 * |
| 69 * @type {boolean} |
| 70 */ |
| 71 Settings.prototype.candidatesNavigation = false; |
| 72 |
| 73 |
| 74 /** |
| 75 * Saves the preferences. |
| 76 * |
| 77 * @param {string} preference The name of the preference. |
| 78 * @param {*} value The preference value. |
| 79 */ |
| 80 Settings.prototype.savePreference = function(preference, value) { |
| 81 window.localStorage.setItem(preference, /** @type {string} */(value)); |
| 82 }; |
| 83 |
| 84 |
| 85 /** |
| 86 * Gets the preference value. |
| 87 * |
| 88 * @param {string} preference The name of the preference. |
| 89 * @return {*} The value. |
| 90 */ |
| 91 Settings.prototype.getPreference = function(preference) { |
| 92 return window.localStorage.getItem(preference); |
| 93 }; |
| 94 |
| 95 }); // goog.scope |
| 96 |
OLD | NEW |