Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1099)

Unified Diff: ppapi/api/dev/ppb_text_input_dev.idl

Issue 7882004: Declarations for Pepper IME API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split GetSegments into two functions, and improve comments and style. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/api/ppb_input_event.idl » ('j') | ppapi/api/ppb_input_event.idl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..69e800c65ccd3e82036809f41ebc3ac23eed98cf
--- /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.
+ */
+
+/**
+ * This file defines the <code>PPB_TextInput_Dev</code> 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 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
+ * 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 {
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
+ /**
+ * 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 bounding_box);
+ /**
+ * Forces to commit the current composition text (if any).
+ */
+ void ConfirmCompositionText([in] PP_Instance instance);
+
+ /**
+ * Cancels the current composition (if any).
+ */
+ void CancelCompositionText([in] PP_Instance instance);
+};
« no previous file with comments | « no previous file | ppapi/api/ppb_input_event.idl » ('j') | ppapi/api/ppb_input_event.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698