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

Unified Diff: ppapi/c/ppb_text_input_controller.h

Issue 18671004: PPAPI: Move IMEInputEvent and TextInput to stable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 5 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
Index: ppapi/c/ppb_text_input_controller.h
diff --git a/ppapi/c/dev/ppb_text_input_dev.h b/ppapi/c/ppb_text_input_controller.h
similarity index 53%
copy from ppapi/c/dev/ppb_text_input_dev.h
copy to ppapi/c/ppb_text_input_controller.h
index 8b7df4425c93f007dc1e59b935b97d7ab184387d..2320a60beef3ca4714d9e32cb3634c3f9e519b5c 100644
--- a/ppapi/c/dev/ppb_text_input_dev.h
+++ b/ppapi/c/ppb_text_input_controller.h
@@ -3,11 +3,12 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_text_input_dev.idl modified Thu Mar 28 10:54:47 2013. */
+/* From ppb_text_input_controller.idl modified Tue Jul 23 19:56:23 2013. */
-#ifndef PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_
-#define PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_
+#ifndef PPAPI_C_PPB_TEXT_INPUT_CONTROLLER_H_
+#define PPAPI_C_PPB_TEXT_INPUT_CONTROLLER_H_
+#include "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"
@@ -15,59 +16,25 @@
#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_0_2 "PPB_TextInput(Dev);0.2"
-#define PPB_TEXTINPUT_DEV_INTERFACE PPB_TEXTINPUT_DEV_INTERFACE_0_2
+#define PPB_TEXTINPUTCONTROLLER_INTERFACE_1_0 "PPB_TextInputController;1.0"
+#define PPB_TEXTINPUTCONTROLLER_INTERFACE PPB_TEXTINPUTCONTROLLER_INTERFACE_1_0
/**
* @file
- * This file defines the <code>PPB_TextInput_Dev</code> interface.
+ * This file defines the <code>PPB_TextInputController</code> interface.
*/
/**
- * @addtogroup Enums
- * @{
- */
-/**
- * PP_TextInput_Type is used to indicate the status of a plugin in regard to
- * text input.
- */
-typedef enum {
- /**
- * Input caret is not in an editable mode, no input method shall be used.
- */
- PP_TEXTINPUT_TYPE_NONE = 0,
- /**
- * Input caret is in a normal editable mode, 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
* @{
*/
/**
- * <code>PPB_TextInput_Dev</code> provides a set of functions for giving hints
- * to the browser about the text input status of plugins, and functions for
- * controlling input method editors (IMEs).
+ * <code>PPB_TextInputController</code> provides a set of functions for giving
+ * hints to the browser about the text input status of plugins, and functions
+ * for controlling input method editors (IMEs).
*/
-struct PPB_TextInput_Dev_0_2 {
+struct PPB_TextInputController_1_0 {
/**
* Informs the browser about the current text input mode of the plugin.
* Typical use of this information in the browser is to properly
@@ -89,8 +56,7 @@ struct PPB_TextInput_Dev_0_2 {
*/
void (*CancelCompositionText)(PP_Instance instance);
/**
- * In response to the <code>PPP_TextInput_Dev::RequestSurroundingText</code>
- * call, informs the browser about the current text selection and surrounding
+ * Informs the browser about the current text selection and surrounding
* text. <code>text</code> is a UTF-8 string that contains the current range
* of text selection in the plugin. <code>caret</code> is the byte-index of
* the caret position within <code>text</code>. <code>anchor</code> is the
@@ -115,28 +81,12 @@ struct PPB_TextInput_Dev_0_2 {
const char* text,
uint32_t caret,
uint32_t anchor);
- /**
- * Informs the browser when a range of text selection is changed in a plugin.
- * When the browser needs to know the content of the updated selection, it
- * pings back by <code>PPP_TextInput_Dev::RequestSurroundingText</code>. The
- * plugin then should send the information with
- * <code>UpdateSurroundingText</code>.
- */
- void (*SelectionChanged)(PP_Instance instance);
};
-typedef struct PPB_TextInput_Dev_0_2 PPB_TextInput_Dev;
-
-struct PPB_TextInput_Dev_0_1 {
- void (*SetTextInputType)(PP_Instance instance, PP_TextInput_Type type);
- void (*UpdateCaretPosition)(PP_Instance instance,
- const struct PP_Rect* caret,
- const struct PP_Rect* bounding_box);
- void (*CancelCompositionText)(PP_Instance instance);
-};
+typedef struct PPB_TextInputController_1_0 PPB_TextInputController;
/**
* @}
*/
-#endif /* PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ */
+#endif /* PPAPI_C_PPB_TEXT_INPUT_CONTROLLER_H_ */

Powered by Google App Engine
This is Rietveld 408576698