Chromium Code Reviews| Index: ppapi/api/dev/ppb_text_input_dev.idl |
| diff --git a/ppapi/api/dev/ppb_text_input_dev.idl b/ppapi/api/dev/ppb_text_input_dev.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8cdd33fb44657c39d2a73e0376ccd3540ea98e77 |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppb_text_input_dev.idl |
| @@ -0,0 +1,65 @@ |
| +/* Copyright (c) 2011 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. |
| + */ |
| + |
| +/** |
| + * Implementation of the TextInput interface. |
|
yzshen1
2011/09/13 06:28:34
It is not an "implementation". :)
kinaba
2011/09/13 09:29:01
Done. :-)
|
| + */ |
| + |
| +label Chrome { |
| + M16 = 0.1 |
| +}; |
| + |
| +/** |
| + * PP_TextInput_Type is used to indicate the status of a plugin in regard to |
| + * text input. Intentionally kept sync with WebKit::WebTextInputType defined in: |
|
yzshen1
2011/09/13 06:28:34
Minor: kept sync with ->kept in sync with?
kinaba
2011/09/13 09:29:01
Done.
|
| + * third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h |
| + */ |
| +[assert_size(4)] |
| +enum PP_TextInput_Type { |
| + /** |
| + * Input caret is not in an editable node, no input method shall be used. |
| + */ |
| + PP_TEXTINPUT_TYPE_NONE = 0, |
| + /** |
| + * Input caret is in a normal editable node, any input method can be used. |
| + */ |
| + PP_TEXTINPUT_TYPE_TEXT = 1, |
| + /** |
| + * Input caret is in a password box, an input method may be used only if |
| + * it's suitable for password input. |
| + */ |
| + PP_TEXTINPUT_TYPE_PASSWORD = 2, |
| + PP_TEXTINPUT_TYPE_SEARCH = 3, |
| + PP_TEXTINPUT_TYPE_EMAIL = 4, |
| + PP_TEXTINPUT_TYPE_NUMBER = 5, |
| + PP_TEXTINPUT_TYPE_TELEPHONE = 6, |
| + PP_TEXTINPUT_TYPE_URL = 7 |
| +}; |
| + |
| +interface PPB_TextInput_Dev { |
| + /** |
| + * Informs the browser about the current text input mode of the plugin. |
| + */ |
| + void SetTextInputType([in] PP_Instance instance, |
| + [in] PP_TextInput_Type type); |
| + |
| + /** |
| + * Informs the browser about the coordinates of the text input caret, and the |
| + * bounding box of the text input area. The browser uses the information to |
| + * locate the composition candidate window, etc. |
| + */ |
| + void UpdateCaretPosition([in] PP_Instance instance, |
| + [in] PP_Rect caret, |
| + [in] PP_Rect boundingBox); |
|
yzshen1
2011/09/13 06:28:34
boundingBox -> bounding_box.
kinaba
2011/09/13 09:29:01
Done.
|
| + /** |
| + * Force to commit the current composition text (if any). |
|
yzshen1
2011/09/13 06:28:34
Minor: Force -> Forces.
kinaba
2011/09/13 09:29:01
Done.
|
| + */ |
| + void ConfirmCompositionText([in] PP_Instance instance); |
| + |
| + /** |
| + * Cancel the current composition (if any). |
|
yzshen1
2011/09/13 06:28:34
Minor: Cancel -> Cancels.
kinaba
2011/09/13 09:29:01
Done.
|
| + */ |
| + void CancelCompositionText([in] PP_Instance instance); |
| +}; |