| // Copyright 2012 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| [ |
| { |
| "namespace": "inputMethodPrivate", |
| "compiler_options": { |
| "implemented_in": "chrome/browser/ash/extensions/input_method_api.h" |
| }, |
| "description": "none", |
| "types": [ |
| { |
| "id": "MenuItemStyle", |
| "type": "string", |
| "description": "The type of menu item. Radio buttons between separators are considered grouped.", |
| "enum": ["check", "radio", "separator"] |
| }, |
| { |
| "id": "MenuItem", |
| "type": "object", |
| "description": "A menu item used by an input method to interact with the user from the language menu.", |
| "properties": { |
| "id": {"type": "string", "description": "String that will be passed to callbacks referencing this MenuItem."}, |
| "label": {"type": "string", "optional": true, "description": "Text displayed in the menu for this item."}, |
| "style": { |
| "$ref": "MenuItemStyle", |
| "optional": true, |
| "description": "The type of menu item." |
| }, |
| "visible": {"type": "boolean", "optional": true, "description": "Indicates this item is visible."}, |
| "checked": {"type": "boolean", "optional": true, "description": "Indicates this item should be drawn with a check."}, |
| "enabled": {"type": "boolean", "optional": true, "description": "Indicates this item is enabled."} |
| } |
| }, |
| { |
| "id": "UnderlineStyle", |
| "type": "string", |
| "description": "The type of the underline to modify a composition segment.", |
| "enum": ["underline", "doubleUnderline", "noUnderline"] |
| }, |
| { |
| "id": "FocusReason", |
| "type": "string", |
| "description": "Describes how the text field was focused", |
| "enum": ["mouse", "touch", "pen", "other"] |
| }, |
| { |
| "id": "InputModeType", |
| "type": "string", |
| "description": "Type of keyboard to show for this text field, (Text, Number, URL, etc) set by mode property of input tag", |
| "enum": ["noKeyboard", "text", "tel", "url", "email", "numeric", "decimal", "search"] |
| }, |
| { |
| "id": "InputContextType", |
| "type": "string", |
| "description": "Type of value this text field edits, (Text, Number, URL, etc)", |
| "enum": ["text", "search", "tel", "url", "email", "number", "password", "null"] |
| }, |
| { |
| "id": "AutoCapitalizeType", |
| "type": "string", |
| "description": "The auto-capitalize type of the text field.", |
| "enum": ["off", "characters", "words", "sentences"] |
| }, |
| { |
| "id": "LanguagePackStatus", |
| "type": "string", |
| "description": "The aggregated status of all language packs for a given input method.", |
| "enum": [ |
| // This should only be used when we have uninitialised data. |
| "unknown", |
| "notInstalled", |
| "inProgress", |
| // If there are no language packs associated with an input method, |
| // such as for input methods which aren't Google 1P, installed is |
| // returned. |
| "installed", |
| "errorOther", |
| "errorNeedsReboot" |
| ] |
| }, |
| { |
| "id": "LanguagePackStatusChange", |
| "type": "object", |
| "description": "Object returned by callbacks when the status of language packs change.", |
| "properties": { |
| "engineIds": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| }, |
| "description": "All engine IDs for which this language pack status change applies to." |
| }, |
| "status": { |
| "$ref": "LanguagePackStatus", |
| "description": "The new language pack status." |
| } |
| } |
| }, |
| { |
| "id": "InputContext", |
| "type": "object", |
| "description": "Describes an input Context", |
| "properties": { |
| "contextID": {"type": "integer", "description": "This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called."}, |
| "type": {"$ref": "InputContextType", "description": "Type of value this text field edits, (Text, Number, URL, etc)"}, |
| "mode": {"$ref": "InputModeType", "description": "Type of keyboard to show for this field (Text, Number, URL, etc)"}, |
| "autoCorrect": {"type": "boolean", "description": "Whether the text field wants auto-correct."}, |
| "autoComplete": {"type": "boolean", "description": "Whether the text field wants auto-complete."}, |
| "autoCapitalize": {"$ref": "AutoCapitalizeType", "description": "The auto-capitalize type of the text field."}, |
| "spellCheck": {"type": "boolean", "description": "Whether the text field wants spell-check."}, |
| "shouldDoLearning": {"type": "boolean", "description": "Whether text entered into the text field should be used to improve typing suggestions for the user."}, |
| "focusReason": {"$ref": "FocusReason", "description": "How the text field was focused"}, |
| "appKey": {"type": "string", "optional": true, "description": "Key of the app associated with this text field if any."} |
| } |
| }, |
| { |
| "id": "JapaneseInputMode", |
| "type": "string", |
| "description": "Japanese IME: input mode. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["Kana", "Romaji"] |
| }, |
| { |
| "id": "JapanesePunctuationStyle", |
| "type": "string", |
| "description": "Japanese IME: punctuation style. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["KutenTouten", "CommaPeriod", "KutenPeriod", "CommaTouten"] |
| }, |
| { |
| "id": "JapaneseSymbolStyle", |
| "type": "string", |
| "description": "Japanese IME: symbol style. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["CornerBracketMiddleDot", "SquareBracketSlash", "CornerBracketSlash", "SquareBracketMiddleDot"] |
| }, |
| { |
| "id": "JapaneseSpaceInputStyle", |
| "type": "string", |
| "description": "Japanese IME: space input style. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["InputMode", "Fullwidth", "Halfwidth"] |
| }, |
| { |
| "id": "JapaneseSelectionShortcut", |
| "type": "string", |
| "description": "Japanese IME: selection shortcut. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["NoShortcut", "Digits123456789", "ASDFGHJKL"] |
| }, |
| { |
| "id": "JapaneseKeymapStyle", |
| "type": "string", |
| "description": "Japanese IME: keymap style. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["Atok", "MsIme", "Kotoeri", "ChromeOs"] |
| }, |
| { |
| "id": "ShiftKeyModeStyle", |
| "type": "string", |
| "description": "Japanese IME: shift key mode switch. Enum values MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "enum": ["Off", "Alphanumeric", "Katakana"] |
| }, |
| { |
| "id": "InputMethodSettings", |
| "type": "object", |
| "description": "User preference settings for a specific input method. Entry names MUST match CrOS Settings @ https://crsrc.org/c/chrome/browser/resources/ash/settings/os_languages_page/input_method_prefs_consts.ts", |
| "properties": { |
| "enableCompletion": { "type": "boolean", "optional": true, "description": "Whether to enable auto completion."}, |
| "enableDoubleSpacePeriod": { "type": "boolean", "optional": true, "description": "Whether to auto transform double spaces to type period."}, |
| "enableGestureTyping": { "type": "boolean", "optional": true, "description": "Whether to enable gesture typing."}, |
| "enablePrediction": { "type": "boolean", "optional": true, "description": "Whether to enable word prediction."}, |
| "enableSoundOnKeypress": { "type": "boolean", "optional": true, "description": "Whether to enable sound on keypress."}, |
| "physicalKeyboardAutoCorrectionEnabledByDefault": {"type": "boolean", "optional": true, "description": "Whether auto correction should be enabled for physical keyboard by default."}, |
| "physicalKeyboardAutoCorrectionLevel": { "type": "integer", "optional": true, "description": "The level of auto correction for physical keyboard (0: Off, 1: Modest, 2: Aggressive)."}, |
| "physicalKeyboardEnableCapitalization": { "type": "boolean", "optional": true, "description": "Whether to enable auto capitalization for physical keyboard."}, |
| "physicalKeyboardEnableDiacriticsOnLongpress": { "type": "boolean", "optional": true, "description": "Whether to enable diacritics on longpress for physical keyboard."}, |
| "physicalKeyboardEnablePredictiveWriting" : {"type": "boolean", "optional": true, "description": "Whether to enable physical keyboard predictive writing"}, |
| "virtualKeyboardAutoCorrectionLevel": { "type": "integer", "optional": true, "description": "The level of auto correction for virtual keyboard (0: Off, 1: Modest, 2: Aggressive)."}, |
| "virtualKeyboardEnableCapitalization": { "type": "boolean", "optional": true, "description": "Whether enable auto capitalization for virtual keyboard."}, |
| "xkbLayout": { "type": "string", "optional": true, "description": "The xkb keyboard (system provided keyboard) layout."}, |
| "JapaneseInputMode": { |
| "$ref": "JapaneseInputMode", |
| "optional": true, |
| "description": "Japanese IME: input mode." |
| }, |
| "JapanesePunctuationStyle": { |
| "$ref": "JapanesePunctuationStyle", |
| "optional": true, |
| "description": "Japanese IME: punctuation style." |
| }, |
| "JapaneseSymbolStyle": { |
| "$ref": "JapaneseSymbolStyle", |
| "optional": true, |
| "description": "Japanese IME: symbol style." |
| }, |
| "JapaneseSpaceInputStyle": { |
| "$ref": "JapaneseSpaceInputStyle", |
| "optional": true, |
| "description": "Japanese IME: space input style." |
| }, |
| "JapaneseSectionShortcut": { |
| "$ref": "JapaneseSelectionShortcut", |
| "optional": true, |
| "description": "Japanese IME: selection shortcut (NOTE: 'Section' in property name is a persisted typo)." |
| }, |
| "JapaneseKeymapStyle": { |
| "$ref": "JapaneseKeymapStyle", |
| "optional": true, |
| "description": "Japanese IME: keymap style." |
| }, |
| "AutomaticallySwitchToHalfwidth": { |
| "type": "boolean", |
| "optional": true, |
| "description": "Japanese IME: Whether to switch to halfwidth automatically." |
| }, |
| "ShiftKeyModeStyle": { |
| "$ref": "ShiftKeyModeStyle", |
| "optional": true, |
| "description": "Japanese IME: shift key mode switch." |
| }, |
| "UseInputHistory": { |
| "type": "boolean", |
| "optional": true, |
| "description": "Japanese IME: Whether to use input history for suggestions." |
| }, |
| "UseSystemDictionary": { |
| "type": "boolean", |
| "optional": true, |
| "description": "Japanese IME: Whether to use system dictionary for suggestions." |
| }, |
| "numberOfSuggestions" : { |
| "type": "integer", |
| "optional": true, |
| "description": "Japanese IME: Number of suggestions." |
| }, |
| "JapaneseDisableSuggestions": { |
| "type": "boolean", |
| "optional": true, |
| "description": "Japanese IME: Whether to disable personalized conversions, suggestions, and user dictionary." |
| }, |
| "koreanEnableSyllableInput": { "type": "boolean", "optional": true, "description": "Whether input one syllable at a time in korean input method."}, |
| "koreanKeyboardLayout": { "type": "string", "optional": true, "description": "The layout of korean keyboard."}, |
| "koreanShowHangulCandidate": { "type": "boolean", "optional": true, "description": "Whether to show hangul candidates in korean input method."}, |
| "pinyinChinesePunctuation": { "type": "boolean", "optional": true, "description": "Whether to use Chinese punctuations in pinyin."}, |
| "pinyinDefaultChinese": { |
| "type": "boolean", |
| "optional": true, |
| "description": "User can use shortcuts to switch between Chinese and English quickly when using pinyin, this flag indicates whether the default language is Chinese." |
| }, |
| "pinyinEnableLowerPaging": { "type": "boolean", "optional": true, "description": "Whether to enable using ','/'.' to page up/down the candidates in pinyin."}, |
| "pinyinEnableUpperPaging": { "type": "boolean", "optional": true, "description": "Whether to enable using '-'/'=' to page up/down the candidates in pinyin."}, |
| "pinyinFullWidthCharacter": { "type": "boolean", "optional": true, "description": "Whether to output full width letters and digits in pinyin."}, |
| "zhuyinKeyboardLayout": { "type": "string", "optional": true, "description": "The layout of zhuyin keyboard."}, |
| "zhuyinPageSize": { "type": "integer", "optional": true, "description": "The page size of zhuyin candidate page."}, |
| "zhuyinSelectKeys": { "type": "string", "optional": true, "description": "The keys used to select candidates in zhuyin."}, |
| "vietnameseVniAllowFlexibleDiacritics": { "type": "boolean", "optional": true, "description": "Enable VNI flexible Vietnamese typing mode"}, |
| "vietnameseVniNewStyleToneMarkPlacement": { "type": "boolean", "optional": true, "description": "Enable VNI modern tone mark placement"}, |
| "vietnameseVniInsertDoubleHornOnUo": { "type": "boolean", "optional": true, "description": "Enable VNI insert-double-horn-on-UO shortcut"}, |
| "vietnameseVniShowUnderline": { "type": "boolean", "optional": true, "description": "Enable VNI showing underline on composition text"}, |
| "vietnameseTelexAllowFlexibleDiacritics": { "type": "boolean", "optional": true, "description": "Enable Telex flexible Vietnamese typing mode"}, |
| "vietnameseTelexNewStyleToneMarkPlacement": { "type": "boolean", "optional": true, "description": "Enable Telex modern tone mark placement"}, |
| "vietnameseTelexInsertDoubleHornOnUo": { "type": "boolean", "optional": true, "description": "Enable Telex insert-double-horn-on-UO horn shortcut"}, |
| "vietnameseTelexInsertUHornOnW": { "type": "boolean", "optional": true, "description": "Enable Telex inser-U-Horn-on-W shortcut"}, |
| "vietnameseTelexShowUnderline": { "type": "boolean", "optional": true, "description": "Enable Telex showing underline on composition text"} |
| } |
| } |
| ], |
| "functions": [ |
| { |
| "name": "getInputMethodConfig", |
| "type": "function", |
| "description": "Gets configurations for input methods.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves with the config object.", |
| "parameters": [ |
| { |
| "name": "config", |
| "type": "object", |
| "description": "The input method config object.", |
| "properties": { |
| "isPhysicalKeyboardAutocorrectEnabled": {"type": "boolean"}, |
| "isImeMenuActivated": {"type": "boolean"} |
| } |
| } |
| ] |
| } |
| }, { |
| "name": "getInputMethods", |
| "type": "function", |
| "description": "Gets all enabled input methods, sorted in ascending order of their localized full display names, according to the lexicographical order defined by the current system locale aka. display language.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves with the input method objects.", |
| "parameters": [ |
| { |
| "name": "inputMethods", |
| "type": "array", |
| "description": "Enabled input method objects, sorted in ascending order of their localized full display names, according to the lexicographical order defined by the current system locale aka. display language.", |
| "items": { |
| "type": "object", |
| "properties": { |
| "id": {"type": "string"}, |
| "name": {"type": "string"}, |
| "indicator": {"type": "string"} |
| } |
| } |
| } |
| ] |
| } |
| }, { |
| "name": "getCurrentInputMethod", |
| "type": "function", |
| "description": "Gets the current input method.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves with the current input method.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "description": "Current input method." |
| } |
| ] |
| } |
| }, { |
| "name": "setCurrentInputMethod", |
| "type": "function", |
| "description": "Sets the current input method.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "description": "The input method ID to be set as current input method." |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves once the current input method is set. If unsuccessful, the promise is rejected.", |
| "parameters": [] |
| } |
| }, { |
| "name": "switchToLastUsedInputMethod", |
| "type": "function", |
| "description": "Switches to the last used input method. If no last used input method, this is a no-op.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves once the input method is swapped (if applicable). If unsuccessful, the promise is rejected.", |
| "parameters": [] |
| } |
| }, { |
| "name": "fetchAllDictionaryWords", |
| "type": "function", |
| "description": "Fetches a list of all the words currently in the dictionary.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves once the list of dictionary words are ready.", |
| "parameters": [ |
| { |
| "name": "words", |
| "type": "array", |
| "description": "List of dictionary words.", |
| "items": { |
| "type": "string" |
| } |
| } |
| ] |
| } |
| }, { |
| "name": "addWordToDictionary", |
| "type": "function", |
| "description": "Adds a single word to be stored in the dictionary.", |
| "parameters": [ |
| { |
| "name": "word", |
| "type": "string", |
| "description": "A new word to add to the dictionary." |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves once the word is added. If unsuccessful, the promise is rejected.", |
| "parameters": [] |
| } |
| }, { |
| "name": "setXkbLayout", |
| "type": "function", |
| "description": "Sets the XKB layout for the given input method.", |
| "parameters": [ |
| { |
| "name": "xkb_name", |
| "type": "string", |
| "description": "The XKB layout name." |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves when the layout is set.", |
| "parameters": [] |
| } |
| }, { |
| "name": "finishComposingText", |
| "type": "function", |
| "description": "Commits the text currently being composed without moving the selected text range. This is a no-op if the context is incorrect.", |
| "parameters": [ |
| { |
| "name": "parameters", |
| "type": "object", |
| "properties": { |
| "contextID": { |
| "description": "ID of the context where we want to finish composing.", |
| "type": "integer" |
| } |
| } |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves when the operation completes.", |
| "parameters": [] |
| } |
| }, { |
| "name": "showInputView", |
| "type": "function", |
| "description": "Shows the input view window. If the input view window is already shown, this function will do nothing.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves when the operation completes.", |
| "parameters": [] |
| } |
| }, { |
| "name": "hideInputView", |
| "type": "function", |
| "description": "Hides the input view window. If the input view window is already hidden, this function will do nothing.", |
| "parameters": [], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves when the operation completes.", |
| "parameters": [] |
| } |
| }, { |
| "name": "openOptionsPage", |
| "type": "function", |
| "description": "Opens the options page for the input method extension. If the input method does not have options, this function will do nothing.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "description": "ID of the input method to open options for." |
| } |
| ] |
| }, { |
| "name": "getSurroundingText", |
| "type": "function", |
| "description": "Gets the surrounding text of the current selection. WARNING: This could return a stale cache that doesn't reflect reality, due to async between IMF and TextInputClient.", |
| "parameters": [ |
| { |
| "name": "beforeLength", |
| "type": "integer", |
| "description": "The number of characters before the current selection." |
| }, |
| { |
| "name": "afterLength", |
| "type": "integer", |
| "description": "The number of characters after the current selection." |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves to provide the result", |
| "parameters": [ |
| { |
| "name": "surroundingInfo", |
| "type": "object", |
| "description": "The surrouding text info.", |
| "properties": { |
| "before": {"type": "string"}, |
| "selected": {"type": "string"}, |
| "after": {"type": "string"} |
| } |
| } |
| ] |
| } |
| }, { |
| "name": "getSettings", |
| "type": "function", |
| "description": "Gets the current values of all settings for a particular input method", |
| "parameters": [ |
| { |
| "name": "engineID", |
| "type": "string", |
| "description": "The ID of the engine (e.g. 'zh-t-i0-pinyin', 'xkb:us::eng')" |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves with the settings", |
| "parameters": [ |
| { |
| "name": "settings", |
| "$ref": "InputMethodSettings", |
| "optional": true, |
| "description": "The requested setting, or null if there's no value" |
| } |
| ] |
| } |
| }, { |
| "name": "setSettings", |
| "type": "function", |
| "description": "Sets the value of all settings for a particular input method", |
| "parameters": [ |
| { |
| "name": "engineID", |
| "type": "string", |
| "description": "The ID of the engine (e.g. 'zh-t-i0-pinyin', 'xkb:us::eng')" |
| }, |
| { |
| "name": "settings", |
| "$ref": "InputMethodSettings", |
| "description": "The settings to set" |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves to notify that the new value has been set", |
| "parameters": [] |
| } |
| }, { |
| "name": "setCompositionRange", |
| "type": "function", |
| "description": "(Deprecated) Set the composition range. If this extension does not own the active IME, this fails. Use setComposingRange instead.", |
| "parameters": [ |
| { |
| "name": "parameters", |
| "type": "object", |
| "properties": { |
| "contextID": { |
| "description": "ID of the context where the composition text will be set", |
| "type": "integer" |
| }, |
| "selectionBefore": { |
| "description": "How much before the current selection to set as composition.", |
| "type": "integer" |
| }, |
| "selectionAfter": { |
| "description": "How much after the current selection to set as composition.", |
| "type": "integer" |
| }, |
| "segments": { |
| "description": "List of segments and their associated types.", |
| "type": "array", |
| "optional": true, |
| "items": { |
| "type": "object", |
| "properties": { |
| "start": { |
| "description": "Index of the character to start this segment at", |
| "type": "integer" |
| }, |
| "end": { |
| "description": "Index of the character to end this segment after.", |
| "type": "integer" |
| }, |
| "style": { |
| "$ref": "UnderlineStyle", |
| "description": "The type of the underline to modify this segment." |
| } |
| } |
| } |
| } |
| } |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "optional": true, |
| "description": "Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.", |
| "parameters": [ |
| { |
| "name": "success", |
| "type": "boolean" |
| } |
| ] |
| } |
| }, { |
| "name": "reset", |
| "type": "function", |
| "description": "Resets the current engine to its initial state. Fires an OnReset event.", |
| "parameters": [] |
| }, |
| { |
| "name": "onAutocorrect", |
| "type": "function", |
| "description": "Called after a word has been autocorrected to show some UI for autocorrect.", |
| "platforms": ["chromeos"], |
| "parameters": [{ |
| "name": "parameters", |
| "type": "object", |
| "properties": { |
| "contextID": { |
| "description": "ID of the context where the autocorrect occurred.", |
| "type": "integer" |
| }, |
| "typedWord": { |
| "type": "string", |
| "description": "Corrected word will be replaced by this when clicking undo" |
| }, |
| "correctedWord": { |
| "type": "string", |
| "description": "Needed primarily to know the length of the autocorrected text to show the correct length of underline. String content technically redundant; required however, as what IMF knows may be stale due to async." |
| }, |
| "startIndex": { |
| "type": "integer", |
| "description": "Offset index (in code units) in surroundingInfo (see onSurroundingTextChanged) for the start of the autocorrected text" |
| } |
| } |
| }] |
| }, |
| { |
| "name" : "notifyInputMethodReadyForTesting", |
| "type" : "function", |
| "description" : "Notifies Chrome that the current input method is ready to accept key events from Tast.", |
| "parameters": [] |
| }, |
| { |
| "name": "getLanguagePackStatus", |
| "type": "function", |
| "description": "Gets the aggregate status of all language packs for a given input method.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "description": "Fully qualified ID of the input method" |
| } |
| ], |
| "returns_async": { |
| "name": "callback", |
| "description": "Resolves with a LanguagePackStatus when the operation completes.", |
| "parameters": [ |
| { |
| "name": "status", |
| "$ref": "LanguagePackStatus", |
| "description": "The aggregated status of all language packs for the given input method, or 'installed' if there are no language packs." |
| } |
| ] |
| } |
| } |
| ], |
| "events": [ |
| { |
| "name": "onCaretBoundsChanged", |
| "type": "function", |
| "description": "Fired when the caret bounds change.", |
| "parameters": [ |
| { |
| "name": "caretBounds", |
| "type": "object", |
| "description": "The bounds information for the caret.", |
| "properties": { |
| "x": {"type": "integer"}, |
| "y": {"type": "integer"}, |
| "w": {"type": "integer"}, |
| "h": {"type": "integer"} |
| } |
| } |
| ] |
| }, |
| { |
| "name": "onChanged", |
| "type": "function", |
| "description": "Fired when the input method is changed.", |
| "parameters": [ |
| { |
| "name": "newInputMethodId", |
| "type": "string", |
| "description": "New input method which is being used." |
| } |
| ] |
| }, { |
| "name": "onDictionaryLoaded", |
| "type": "function", |
| "description": "Fired when the custom spelling dictionary is loaded.", |
| "parameters": [] |
| }, { |
| "name": "onDictionaryChanged", |
| "type": "function", |
| "description": "Fired when words are added or removed from the custom spelling dictionary.", |
| "parameters": [ |
| { |
| "name": "added", |
| "type": "array", |
| "description": "List of added words.", |
| "items": { |
| "type": "string" |
| } |
| }, { |
| "name": "removed", |
| "type": "array", |
| "description": "List of removed words.", |
| "items": { |
| "type": "string" |
| } |
| } |
| ] |
| }, { |
| "name": "onImeMenuActivationChanged", |
| "type": "function", |
| "description": "Fired when the IME menu is activated or deactivated.", |
| "parameters": [ |
| { |
| "name": "activation", |
| "type": "boolean", |
| "description": "Whether the IME menu is currently active." |
| } |
| ] |
| }, { |
| "name": "onImeMenuListChanged", |
| "type": "function", |
| "description": "Fired when the input method or the list of active input method IDs is changed.", |
| "parameters": [] |
| }, { |
| "name": "onImeMenuItemsChanged", |
| "type": "function", |
| "description": "Fired when the input.ime.setMenuItems or input.ime.updateMenuItems API is called.", |
| "parameters": [ |
| { |
| "name": "engineID", |
| "type": "string", |
| "description": "ID of the engine to use" |
| }, |
| { |
| "name": "items", |
| "type": "array", |
| "items": { |
| "$ref": "MenuItem" |
| }, |
| "description": "MenuItems to add or update." |
| } |
| ] |
| }, { |
| "name": "onFocus", |
| "type": "function", |
| "description": "This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user.", |
| "parameters": [ |
| { |
| "$ref": "InputContext", |
| "name": "context", |
| "description": "Describes the text field that has acquired focus." |
| } |
| ] |
| }, { |
| "name": "onScreenProjectionChanged", |
| "type": "function", |
| "description": "This event is sent when the screen is being mirrored or the desktop is being cast.", |
| "parameters": [ |
| { |
| "name": "isProjected", |
| "type": "boolean", |
| "description": "Whether the screen is projected." |
| } |
| ] |
| }, { |
| "name": "onSuggestionsChanged", |
| "type": "function", |
| "description": "This event is sent when a new set of suggestions has been generated", |
| "parameters": [ |
| { |
| "name": "suggestions", |
| "type": "array", |
| "description": "List of suggestions to display, in order of relevance", |
| "items": { |
| "type": "string" |
| } |
| } |
| ] |
| }, { |
| "name": "onInputMethodOptionsChanged", |
| "type": "function", |
| "description": "This event is sent when input method options are changed.", |
| "parameters": [ |
| { |
| "name": "engineID", |
| "type": "string", |
| "description": "The engine ID for the input method being changed." |
| } |
| ] |
| }, { |
| "name": "onLanguagePackStatusChanged", |
| "type": "function", |
| "description": "This event is sent when any IME's language pack status is changed.", |
| "parameters": [ |
| { |
| "name": "change", |
| "$ref": "LanguagePackStatusChange", |
| "description": "Information about what changed." |
| } |
| ] |
| } |
| ] |
| } |
| ] |