| 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.
|
| + */
|
| +
|
| +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:
|
| + * 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);
|
| + /**
|
| + * Force to commit the current composition text (if any).
|
| + */
|
| + void ConfirmCompositionText([in] PP_Instance instance);
|
| +
|
| + /**
|
| + * Cancel the current composition (if any).
|
| + */
|
| + void CancelCompositionText([in] PP_Instance instance);
|
| +};
|
|
|