| OLD | NEW | 
| (Empty) |  | 
 |    1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
 |    2  * Use of this source code is governed by a BSD-style license that can be | 
 |    3  * found in the LICENSE file. | 
 |    4  */ | 
 |    5  | 
 |    6 /* From dev/ppb_text_input_dev.idl modified Wed Sep 14 12:51:46 2011. */ | 
 |    7  | 
 |    8 #ifndef PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ | 
 |    9 #define PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ | 
 |   10  | 
 |   11 #include "ppapi/c/pp_instance.h" | 
 |   12 #include "ppapi/c/pp_macros.h" | 
 |   13 #include "ppapi/c/pp_point.h" | 
 |   14 #include "ppapi/c/pp_rect.h" | 
 |   15 #include "ppapi/c/pp_size.h" | 
 |   16 #include "ppapi/c/pp_stdint.h" | 
 |   17  | 
 |   18 #define PPB_TEXTINPUT_DEV_INTERFACE_0_1 "PPB_TextInput(Dev);0.1" | 
 |   19 #define PPB_TEXTINPUT_DEV_INTERFACE PPB_TEXTINPUT_DEV_INTERFACE_0_1 | 
 |   20  | 
 |   21 /** | 
 |   22  * @file | 
 |   23  * This file defines the <code>PPB_TextInput_Dev</code> interface. | 
 |   24  */ | 
 |   25  | 
 |   26  | 
 |   27 /** | 
 |   28  * @addtogroup Enums | 
 |   29  * @{ | 
 |   30  */ | 
 |   31 /** | 
 |   32  * PP_TextInput_Type is used to indicate the status of a plugin in regard to | 
 |   33  * text input. | 
 |   34  */ | 
 |   35 typedef enum { | 
 |   36   /** | 
 |   37    * Input caret is not in an editable mode, no input method shall be used. | 
 |   38    */ | 
 |   39   PP_TEXTINPUT_TYPE_NONE = 0, | 
 |   40   /** | 
 |   41    * Input caret is in a normal editable mode, any input method can be used. | 
 |   42    */ | 
 |   43   PP_TEXTINPUT_TYPE_TEXT = 1, | 
 |   44   /** | 
 |   45    * Input caret is in a password box, an input method may be used only if | 
 |   46    * it's suitable for password input. | 
 |   47    */ | 
 |   48   PP_TEXTINPUT_TYPE_PASSWORD = 2, | 
 |   49   PP_TEXTINPUT_TYPE_SEARCH = 3, | 
 |   50   PP_TEXTINPUT_TYPE_EMAIL = 4, | 
 |   51   PP_TEXTINPUT_TYPE_NUMBER = 5, | 
 |   52   PP_TEXTINPUT_TYPE_TELEPHONE = 6, | 
 |   53   PP_TEXTINPUT_TYPE_URL = 7 | 
 |   54 } PP_TextInput_Type; | 
 |   55 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TextInput_Type, 4); | 
 |   56 /** | 
 |   57  * @} | 
 |   58  */ | 
 |   59  | 
 |   60 /** | 
 |   61  * @addtogroup Interfaces | 
 |   62  * @{ | 
 |   63  */ | 
 |   64 /** | 
 |   65  * <code>PPB_TextInput_Dev</code> provides a set of functions for giving hints | 
 |   66  * to the browser about the text input status of plugins, and functions for | 
 |   67  * controlling input method editors (IMEs). | 
 |   68  */ | 
 |   69 struct PPB_TextInput_Dev { | 
 |   70   /** | 
 |   71    * Informs the browser about the current text input mode of the plugin. | 
 |   72    * Typical use of this information in the browser is to properly | 
 |   73    * display/suppress tools for supporting text inputs (such as virtual | 
 |   74    * keyboards in touch screen based devices, or input method editors often | 
 |   75    * used for composing East Asian characters). | 
 |   76    */ | 
 |   77   void (*SetTextInputType)(PP_Instance instance, PP_TextInput_Type type); | 
 |   78   /** | 
 |   79    * Informs the browser about the coordinates of the text input caret and the | 
 |   80    * bounding box of the text input area. Typical use of this information in | 
 |   81    * the browser is to layout IME windows etc. | 
 |   82    */ | 
 |   83   void (*UpdateCaretPosition)(PP_Instance instance, | 
 |   84                               const struct PP_Rect* caret, | 
 |   85                               const struct PP_Rect* bounding_box); | 
 |   86   /** | 
 |   87    * Forces to commit the current composition text in IME. | 
 |   88    */ | 
 |   89   void (*ConfirmCompositionText)(PP_Instance instance); | 
 |   90   /** | 
 |   91    * Cancels the current composition in IME. | 
 |   92    */ | 
 |   93   void (*CancelCompositionText)(PP_Instance instance); | 
 |   94 }; | 
 |   95 /** | 
 |   96  * @} | 
 |   97  */ | 
 |   98  | 
 |   99 #endif  /* PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ */ | 
 |  100  | 
| OLD | NEW |