Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* Copyright (c) 2011 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 * This file defines the <code>PPB_TextInput_Dev</code> interface. | |
| 8 */ | |
| 9 | |
| 10 label Chrome { | |
| 11 M16 = 0.1 | |
| 12 }; | |
| 13 | |
| 14 /** | |
| 15 * PP_TextInput_Type is used to indicate the status of a plugin in regard to | |
| 16 * text input. Intentionally kept in sync with WebKit::WebTextInputType in: | |
|
brettw
2011/09/13 22:36:04
We shouldn't be talking about the sync with webkit
kinaba
2011/09/14 08:54:04
Done. In fact, the static asserts are already set
| |
| 17 * third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h | |
| 18 */ | |
| 19 [assert_size(4)] | |
| 20 enum PP_TextInput_Type { | |
| 21 /** | |
| 22 * Input caret is not in an editable node, no input method shall be used. | |
| 23 */ | |
| 24 PP_TEXTINPUT_TYPE_NONE = 0, | |
| 25 /** | |
| 26 * Input caret is in a normal editable node, any input method can be used. | |
| 27 */ | |
| 28 PP_TEXTINPUT_TYPE_TEXT = 1, | |
| 29 /** | |
| 30 * Input caret is in a password box, an input method may be used only if | |
| 31 * it's suitable for password input. | |
| 32 */ | |
| 33 PP_TEXTINPUT_TYPE_PASSWORD = 2, | |
| 34 PP_TEXTINPUT_TYPE_SEARCH = 3, | |
| 35 PP_TEXTINPUT_TYPE_EMAIL = 4, | |
| 36 PP_TEXTINPUT_TYPE_NUMBER = 5, | |
| 37 PP_TEXTINPUT_TYPE_TELEPHONE = 6, | |
| 38 PP_TEXTINPUT_TYPE_URL = 7 | |
| 39 }; | |
| 40 | |
| 41 interface PPB_TextInput_Dev { | |
|
brettw
2011/09/13 22:36:04
I'm worried the very generic name "TextInput" migh
kochi
2011/09/14 02:07:05
IME generally accepted as CJK input methods, but e
kinaba
2011/09/14 08:54:04
It is not limited to IME. For instance, touch UI r
yzshen1
2011/09/14 17:32:56
Is it true that Confirm/CancelCompositionText are
kinaba
2011/09/15 08:53:50
Yes--they are IME-specific and very closely relate
| |
| 42 /** | |
| 43 * Informs the browser about the current text input mode of the plugin. | |
| 44 */ | |
| 45 void SetTextInputType([in] PP_Instance instance, | |
| 46 [in] PP_TextInput_Type type); | |
| 47 | |
| 48 /** | |
| 49 * Informs the browser about the coordinates of the text input caret, and the | |
| 50 * bounding box of the text input area. The browser uses the information to | |
| 51 * locate the composition candidate window, etc. | |
| 52 */ | |
| 53 void UpdateCaretPosition([in] PP_Instance instance, | |
| 54 [in] PP_Rect caret, | |
| 55 [in] PP_Rect bounding_box); | |
| 56 /** | |
| 57 * Forces to commit the current composition text (if any). | |
| 58 */ | |
| 59 void ConfirmCompositionText([in] PP_Instance instance); | |
| 60 | |
| 61 /** | |
| 62 * Cancels the current composition (if any). | |
| 63 */ | |
| 64 void CancelCompositionText([in] PP_Instance instance); | |
| 65 }; | |
| OLD | NEW |