OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "inputMethodPrivate", | 7 "namespace": "inputMethodPrivate", |
8 "platforms": ["chromeos"], | 8 "platforms": ["chromeos"], |
9 "description": "none", | 9 "description": "none", |
10 "functions": [ | 10 "functions": [ |
11 { | 11 { |
12 "name": "get", | 12 "name": "getInputMethods", |
| 13 "type": "function", |
| 14 "description": "Gets all whitelisted input methods.", |
| 15 "parameters": [ |
| 16 { |
| 17 "name": "callback", |
| 18 "type": "function", |
| 19 "optional": false, |
| 20 "description": "Callback which is called with the input method objec
ts.", |
| 21 "parameters": [ |
| 22 { |
| 23 "name": "inputMethods", |
| 24 "type": "array", |
| 25 "description": "Whitelisted input method objects.", |
| 26 "items": { |
| 27 "type": "object", |
| 28 "properties": { |
| 29 "id": {"type": "string"}, |
| 30 "name": {"type": "string"}, |
| 31 "indicator": {"type": "string"} |
| 32 } |
| 33 } |
| 34 } |
| 35 ] |
| 36 } |
| 37 ] |
| 38 }, { |
| 39 "name": "getCurrentInputMethod", |
13 "type": "function", | 40 "type": "function", |
14 "description": "Gets the current input method.", | 41 "description": "Gets the current input method.", |
15 "parameters": [ | 42 "parameters": [ |
16 { | 43 { |
17 "name": "callback", | 44 "name": "callback", |
18 "type": "function", | 45 "type": "function", |
19 "optional": false, | 46 "optional": false, |
20 "description": "Callback which is called with the current input meth
od.", | 47 "description": "Callback which is called with the current input meth
od.", |
21 "parameters": [ | 48 "parameters": [ |
22 { | 49 { |
23 "name": "inputMethodId", | 50 "name": "inputMethodId", |
24 "type": "string", | 51 "type": "string", |
25 "description": "Current input method." | 52 "description": "Current input method." |
26 } | 53 } |
27 ] | 54 ] |
28 } | 55 } |
29 ] | 56 ] |
30 }, { | 57 }, { |
31 "name": "startIme", | 58 "name": "setCurrentInputMethod", |
32 "type": "function", | 59 "type": "function", |
33 "description": "Notify to input method engine to be ready to accept even
ts.", | 60 "description": "Sets the current input method.", |
34 "parameters" : [] | 61 "parameters": [ |
| 62 { |
| 63 "name": "inputMethodId", |
| 64 "type": "string", |
| 65 "optional": false, |
| 66 "description": "The input method ID to be set as current input metho
d." |
| 67 }, |
| 68 { |
| 69 "name": "callback", |
| 70 "type": "function", |
| 71 "optional": true, |
| 72 "description": "Callback which is called once the current input meth
od is set or error occurs.", |
| 73 "parameters": [] |
| 74 } |
| 75 ] |
35 } | 76 } |
36 ], | 77 ], |
37 "events": [ | 78 "events": [ |
38 { | 79 { |
39 "name": "onChanged", | 80 "name": "onChanged", |
40 "type": "function", | 81 "type": "function", |
41 "description": "Fired when the input method is changed.", | 82 "description": "Fired when the input method is changed.", |
42 "parameters": [ | 83 "parameters": [ |
43 { | 84 { |
44 "name": "newInputMethodId", | 85 "name": "newInputMethodId", |
45 "type": "string", | 86 "type": "string", |
46 "description": "New input method which is being used." | 87 "description": "New input method which is being used." |
47 } | 88 } |
48 ] | 89 ] |
49 } | 90 } |
50 ] | 91 ] |
51 } | 92 } |
52 ] | 93 ] |
OLD | NEW |