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

Unified Diff: ppapi/c/dev/ppb_text_input_dev.h

Issue 7621010: Never submit: tentative Pepper IME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot. 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 | « ppapi/api/ppb_input_event.idl ('k') | ppapi/c/ppb_input_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/dev/ppb_text_input_dev.h
diff --git a/ppapi/c/dev/ppb_text_input_dev.h b/ppapi/c/dev/ppb_text_input_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..37428238404c09bad4f63a46991dee2b8cbfc548
--- /dev/null
+++ b/ppapi/c/dev/ppb_text_input_dev.h
@@ -0,0 +1,92 @@
+/* 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.
+ */
+
+/* From dev/ppb_text_input_dev.idl modified Tue Sep 13 10:29:19 2011. */
+
+#ifndef PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_
+#define PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_
+
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_rect.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_TEXTINPUT_DEV_INTERFACE_0_1 "PPB_TextInput(Dev);0.1"
+#define PPB_TEXTINPUT_DEV_INTERFACE PPB_TEXTINPUT_DEV_INTERFACE_0_1
+
+/**
+ * @file
+ * Implementation of the TextInput interface.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * 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
+ */
+typedef enum {
+ /**
+ * 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
+} PP_TextInput_Type;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TextInput_Type, 4);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_TextInput_Dev {
+ /**
+ * Informs the browser about the current text input mode of the plugin.
+ */
+ void (*SetTextInputType)(PP_Instance instance, 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)(PP_Instance instance,
+ const struct PP_Rect* caret,
+ const struct PP_Rect* boundingBox);
+ /**
+ * Force to commit the current composition text (if any).
+ */
+ void (*ConfirmCompositionText)(PP_Instance instance);
+ /**
+ * Cancel the current composition (if any).
+ */
+ void (*CancelCompositionText)(PP_Instance instance);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ */
+
« no previous file with comments | « ppapi/api/ppb_input_event.idl ('k') | ppapi/c/ppb_input_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698