| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [ | |
| 6 { | |
| 7 "namespace": "experimental.input.virtualKeyboard", | |
| 8 "nodoc": true, | |
| 9 "types": [], | |
| 10 "functions": [ | |
| 11 { | |
| 12 "name": "sendKeyboardEvent", | |
| 13 "type": "function", | |
| 14 "description": "Sends a keyboard event to Chrome.", | |
| 15 "parameters": [ | |
| 16 { "type": "object", | |
| 17 "name": "event", | |
| 18 "properties": { | |
| 19 "type": { | |
| 20 "type": "string", | |
| 21 "description": "One of 'keyup' or 'keydown'." | |
| 22 }, | |
| 23 "keyIdentifier": { | |
| 24 "type": "string", | |
| 25 "description": "See http://www.w3.org/TR/2003/NOTE-DOM-Level-3-E
vents-20031107/keyset.html#KeySet-Set" | |
| 26 }, | |
| 27 "altKey": { | |
| 28 "type": "boolean", | |
| 29 "optional": true, | |
| 30 "description": "Whether or not the ALT key is pressed." | |
| 31 }, | |
| 32 "ctrlKey": { | |
| 33 "type": "boolean", | |
| 34 "optional": true, | |
| 35 "description": "Whether or not the CTRL key is pressed." | |
| 36 }, | |
| 37 "metaKey": { | |
| 38 "type": "boolean", | |
| 39 "optional": true, | |
| 40 "description": "Whether or not the META key is pressed." | |
| 41 }, | |
| 42 "shiftKey": { | |
| 43 "type": "boolean", | |
| 44 "optional": true, | |
| 45 "description": "Whether or not the SHIFT key is pressed." | |
| 46 } | |
| 47 }, | |
| 48 "description": "The keyboard event to be sent." | |
| 49 }, | |
| 50 { "type": "function", | |
| 51 "name": "callback", | |
| 52 "optional": true, | |
| 53 "description": "This function is called when the event processing is
completed.", | |
| 54 "parameters": [] | |
| 55 } | |
| 56 ] | |
| 57 }, | |
| 58 { | |
| 59 "name": "hideKeyboard", | |
| 60 "type": "function", | |
| 61 "description": "Hides the keyboard UI.", | |
| 62 "parameters": [ | |
| 63 { "type": "function", | |
| 64 "name": "callback", | |
| 65 "optional": true, | |
| 66 "description": "This function is called when the event processing is
completed.", | |
| 67 "parameters": [] | |
| 68 } | |
| 69 ] | |
| 70 }, | |
| 71 { | |
| 72 "name": "setKeyboardHeight", | |
| 73 "type": "function", | |
| 74 "description": "Sets the height of the keyboard UI.", | |
| 75 "parameters": [ | |
| 76 { "type": "integer", | |
| 77 "name": "height", | |
| 78 "minimum": 0, | |
| 79 "optional": false, | |
| 80 "description": "The height of the keyboard UI." | |
| 81 }, | |
| 82 { "type": "function", | |
| 83 "name": "callback", | |
| 84 "optional": true, | |
| 85 "description": "This function is called when the event processing is
completed but the resizeing may be not finished.", | |
| 86 "parameters": [] | |
| 87 } | |
| 88 ] | |
| 89 }, | |
| 90 { | |
| 91 "name": "sendHandwritingStroke", | |
| 92 "type": "function", | |
| 93 "description": "Sends a handwriting event to Chrome.", | |
| 94 "parameters": [ | |
| 95 { | |
| 96 "name": "stroke", | |
| 97 "type": "array", | |
| 98 "items": { | |
| 99 "type": "object", | |
| 100 "properties": { | |
| 101 "x": {"type": "number", "minimum": 0, "maximum": 1}, | |
| 102 "y": {"type": "number", "minimum": 0, "maximum": 1} | |
| 103 } | |
| 104 } | |
| 105 } | |
| 106 ] | |
| 107 }, | |
| 108 { | |
| 109 "name": "cancelHandwritingStrokes", | |
| 110 "type": "function", | |
| 111 "description": "Clears last N handwriting strokes.", | |
| 112 "parameters": [ | |
| 113 { | |
| 114 "name": "strokeCount", | |
| 115 "optional": true, | |
| 116 "description": "The number of strokes to be removed. Pass 0 to remov
e all strokes. If omitted, removes all.", | |
| 117 "type": "integer", | |
| 118 "minimum": 0 | |
| 119 } | |
| 120 ] | |
| 121 } | |
| 122 ], | |
| 123 "events": [ | |
| 124 { | |
| 125 "name": "onTextInputTypeChanged", | |
| 126 "type": "function", | |
| 127 "description": "This event is sent to the virtual keyboard when the text
input type is changed.", | |
| 128 "parameters": [ | |
| 129 { | |
| 130 "type": "string", | |
| 131 "name": "type", | |
| 132 "enum": ["none", "text", "password", "search", "email", "number", "t
el", "url"], | |
| 133 "description": "Type of the current focused input field." | |
| 134 } | |
| 135 ] | |
| 136 } | |
| 137 ] | |
| 138 } | |
| 139 ] | |
| OLD | NEW |