summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/input_ime.json
diff options
context:
space:
mode:
authorcduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-12 02:22:21 +0000
committercduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-12 02:22:21 +0000
commit15a28fd05ef7f31a705078b35539cc62a4cf603b (patch)
tree3e2f777c5a7c1492f73b808b5545894f4bf51e1a /chrome/common/extensions/api/input_ime.json
parent797510b8b3b3e68457476680ea1fdb40eb23ab45 (diff)
downloadchromium_src-15a28fd05ef7f31a705078b35539cc62a4cf603b.zip
chromium_src-15a28fd05ef7f31a705078b35539cc62a4cf603b.tar.gz
chromium_src-15a28fd05ef7f31a705078b35539cc62a4cf603b.tar.bz2
Files generated by the JSON schema compiler are named incorrectly
Files are now named like "file_name.h" instead of "fileName.h" or "file.name.h", and all the JSON files have been renamed. BUG=125669 TEST=All previous tests for the renamed files Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135077 Review URL: https://chromiumcodereview.appspot.com/10272021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api/input_ime.json')
-rw-r--r--chrome/common/extensions/api/input_ime.json531
1 files changed, 531 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/input_ime.json b/chrome/common/extensions/api/input_ime.json
new file mode 100644
index 0000000..9b96ca9
--- /dev/null
+++ b/chrome/common/extensions/api/input_ime.json
@@ -0,0 +1,531 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+ {
+ "namespace": "experimental.input.ime",
+ "platforms": ["chromeos"],
+ "types": [
+ {
+ "id": "KeyboardEvent",
+ "type": "object",
+ "description": "See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent",
+ "properties": {
+ "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
+ "requestId": {"type": "string", "description": "The ID of the request."},
+ "key": {"type": "string", "description": "Value of the key being pressed"},
+ "altKey": {"type": "boolean", "optional": true, "description": "Whether or not the ALT key is pressed."},
+ "ctrlKey": {"type": "boolean", "optional": true, "description": "Whether or not the CTRL key is pressed."},
+ "shiftKey": {"type": "boolean", "optional": true, "description": "Whether or not the SHIFT key is pressed."}
+ }
+ },
+ {
+ "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": {"type": "string", "description": "Type of value this text field edits, (Text, Number, Password, etc)", "enum": ["text", "number", "password"]}
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "setComposition",
+ "type": "function",
+ "description": "Set the current composition. If this extension does not own the active IME, this fails.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context where the composition text will be set",
+ "type": "integer"
+ },
+ "text": {
+ "description": "Text to set",
+ "type": "string"
+ },
+ "selectionStart": {
+ "description": "Position in the text that the selection starts at.",
+ "optional": true,
+ "type": "integer"
+ },
+ "selectionEnd": {
+ "description": "Position in the text that the selection ends at.",
+ "optional": true,
+ "type": "integer"
+ },
+ "cursor": {
+ "description": "Position in the text of the cursor.",
+ "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": {
+ "description": "How to render this segment",
+ "enum": ["underline", "doubleUnderline"],
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.extension.lastError is set.",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "clearComposition",
+ "type": "function",
+ "description": "Clear the current composition. If this extension does not own the active IME, this fails.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context where the composition will be cleared",
+ "type": "integer"
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.extension.lastError is set.",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "commitText",
+ "type": "function",
+ "description": "Commits the provided text to the current input.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context where the text will be committed",
+ "type": "integer"
+ },
+ "text": {
+ "description": "The text to commit",
+ "type": "string"
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.extension.lastError is set.",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setCandidateWindowProperties",
+ "type": "function",
+ "description": "Sets the properties of the candidate window. This fails if the extension doesn’t own the active IME",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "engineID": {
+ "description": "ID of the engine to set properties on.",
+ "type": "string"
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "visible": {
+ "type": "boolean",
+ "optional": true,
+ "description": "True to show the Candidate window, false to hide it."
+ },
+ "cursorVisible": {
+ "type": "boolean",
+ "optional": true,
+ "description": "True to show the cursor, false to hide it."
+ },
+ "vertical": {
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the candidate window should be rendered vertical, false to make it horizontal."
+ },
+ "pageSize": {
+ "type": "integer",
+ "optional": true,
+ "description": "The number of candidates to display per page."
+ },
+ "auxiliaryText": {
+ "type": "string",
+ "optional": true,
+ "description": "Text that is shown at the bottom of the candidate window."
+ },
+ "auxiliaryTextVisible": {
+ "type": "boolean",
+ "optional": true,
+ "description": "True to display the auxiliary text, false to hide it."
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes.",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setCandidates",
+ "type": "function",
+ "description": "Sets the current candidate list. This fails if this extension doesn’t own the active IME",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context that owns the candidate window.",
+ "type": "integer"
+ },
+ "candidates": {
+ "description": "List of candidates to show in the candidate window",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "candidate": {"type": "string", "description": "The candidate"},
+ "id": {"type": "integer", "description": "The candidate's id"},
+ "parentId": {"type": "integer", "optional": true, "description": "The id to add these candidates under"},
+ "label": {"type": "string", "optional": true, "description": "Short string displayed to next to the candidate, often the shortcut key or index"},
+ "annotation": {"type": "string", "optional": true, "description": "Additional text describing the candidate"}
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes.",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setCursorPosition",
+ "type": "function",
+ "description": "Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context that owns the candidate window.",
+ "type": "integer"
+ },
+ "candidateID": {
+ "description": "ID of the candidate to select.",
+ "type": "integer"
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes",
+ "parameters": [
+ {
+ "name": "success",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setMenuItems",
+ "type": "function",
+ "description": "Adds the provided menu items to the language menu when this IME is active.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "engineID": {
+ "description": "ID of the engine to use",
+ "type": "string"
+ },
+ "items": {
+ "description": "MenuItems to add. They will be added in the order they exist in the array.",
+ "type": "array",
+ "items": {
+ "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": {
+ "type": "string",
+ "optional": true,
+ "description": "Enum representing if this item is: none, check, radio, or a separator. Radio buttons between separators are considered grouped.",
+ "enum": ["none", "check", "radio", "separator"]
+ },
+ "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."}
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "",
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "updateMenuItems",
+ "type": "function",
+ "description": "Updates the state of the MenuItems specified",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "engineID": {
+ "description": "ID of the engine to use",
+ "type": "string"
+ },
+ "items": {
+ "description": "Array of MenuItems to update",
+ "type": "array",
+ "items": {
+ "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": {
+ "type": "string",
+ "optional": true,
+ "description": "Enum representing if this item is: none, check, radio, or a separator. Radio buttons between separators are considered grouped.",
+ "enum": ["none", "check", "radio", "separator"]
+ },
+ "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."}
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes",
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "eventHandled",
+ "nodoc": true,
+ "type": "function",
+ "description": "Used internally to send a response for onKeyEvent.",
+ "parameters": [
+ {"type": "string", "name": "requestId"},
+ {"type": "boolean", "name": "response"}
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onActivate",
+ "type": "function",
+ "description": "This event is sent when an IME is activated. It signals that the IME will be receiving onKeyPress events.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "engineID",
+ "description": "ID of the engine receiving the event"
+ }
+ ]
+ },
+ {
+ "name": "onDeactivated",
+ "type": "function",
+ "description": "This event is sent when an IME is deactivated. It signals that the IME will no longer be receiving onKeyPress events.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "engineID",
+ "description": "ID of the engine receiving the event"
+ }
+ ]
+ },
+ {
+ "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": [
+ {
+ "type": "InputContext",
+ "name": "context",
+ "description": "Describes the text field that has acquired focus."
+ }
+ ]
+ },
+ {
+ "name": "onBlur",
+ "type": "function",
+ "description": "This event is sent when focus leaves a text box. It is sent to all extensions that are listening to this event, and enabled by the user.",
+ "parameters": [
+ {
+ "type": "integer",
+ "name": "contextID",
+ "description": "The ID of the text field that has lost focus. The ID is invalid after this call"
+ }
+ ]
+ },
+ {
+ "name": "onInputContextUpdate",
+ "type": "function",
+ "description": "This event is sent when the properties of the current InputContext change, such as the the type. It is sent to all extensions that are listening to this event, and enabled by the user.",
+ "parameters": [
+ {
+ "type": "InputContext",
+ "name": "context",
+ "description": "An InputContext object describing the text field that has changed."
+ }
+ ]
+ },
+ {
+ "name": "onKeyEvent",
+ "type": "function",
+ "description": "This event is sent if this extension owns the active IME.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "engineID",
+ "description": "ID of the engine receiving the event"
+ },
+ {
+ "type": "KeyboardEvent",
+ "name": "keyData",
+ "description": "Data on the key event"
+ }
+ ],
+ "returns": {
+ "type": "boolean",
+ "description": "True if the keystroke was handled, false if not"
+ }
+ },
+ {
+ "name": "onCandidateClicked",
+ "type": "function",
+ "description": "This event is sent if this extension owns the active IME.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "engineID",
+ "description": "ID of the engine receiving the event"
+ },
+ {
+ "type": "integer",
+ "name": "candidateID",
+ "description": "ID of the candidate that was clicked."
+ },
+ {
+ "type": "string",
+ "name": "button",
+ "description": "Which mouse buttons was clicked.",
+ "enum": ["left", "middle", "right"]
+ }
+ ]
+ },
+ {
+ "name": "onMenuItemActivated",
+ "type": "function",
+ "description": "Called when the user selects a menu item",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "engineID",
+ "description": "ID of the engine receiving the event"
+ },
+ {
+ "type": "string",
+ "name": "name",
+ "description": "Name of the MenuItem which was activated"
+ }
+ ]
+ }
+ ]
+ }
+]