forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PPAPI: Move IMEInputEvent and TextInput to stable.
To be able to work with current ppapi Flash, this CL keeps ABI of "PPB_IMEInputEvent_Dev_0_2", "PPB_TextInput_Dev_0_2" and "PPP_TextInput_Dev_0_2". BUG=None TEST=Manually checked that ppapi_example_ime works and also works with current Flash. NOTRY=True Review URL: https://chromiumcodereview.appspot.com/18671004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214878 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
nona@chromium.org
committed
Aug 1, 2013
1 parent
934e3c9
commit 79cad34
Showing
24 changed files
with
946 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* Copyright 2013 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_TextInputController</code> interface. | ||
*/ | ||
|
||
label Chrome { | ||
M30 = 1.0 | ||
}; | ||
|
||
/** | ||
* PP_TextInput_Type is used to indicate the status of a plugin in regard to | ||
* text input. | ||
*/ | ||
[assert_size(4)] | ||
enum PP_TextInput_Type { | ||
/** | ||
* 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 | ||
}; | ||
|
||
/** | ||
* <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). | ||
*/ | ||
interface PPB_TextInputController { | ||
/** | ||
* Informs the browser about the current text input mode of the plugin. | ||
* Typical use of this information in the browser is to properly | ||
* display/suppress tools for supporting text inputs (such as virtual | ||
* keyboards in touch screen based devices, or input method editors often | ||
* used for composing East Asian characters). | ||
*/ | ||
void SetTextInputType([in] PP_Instance instance, | ||
[in] PP_TextInput_Type type); | ||
|
||
/** | ||
* Informs the browser about the coordinates of the text input caret area. | ||
* Typical use of this information in the browser is to layout IME windows | ||
* etc. | ||
*/ | ||
void UpdateCaretPosition([in] PP_Instance instance, | ||
[in] PP_Rect caret); | ||
|
||
/** | ||
* Cancels the current composition in IME. | ||
*/ | ||
void CancelCompositionText([in] PP_Instance instance); | ||
|
||
/** | ||
* 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 | ||
* byte-index of the anchor position (i.e., if a range of text is selected, | ||
* it is the other edge of selection different from <code>caret</code>. If | ||
* there are no selection, <code>anchor</code> is equal to <code>caret</code>. | ||
* | ||
* Typical use of this information in the browser is to enable "reconversion" | ||
* features of IME that puts back the already committed text into the | ||
* pre-commit composition state. Another use is to improve the precision | ||
* of suggestion of IME by taking the context into account (e.g., if the caret | ||
* looks to be on the beginning of a sentence, suggest capital letters in a | ||
* virtual keyboard). | ||
* | ||
* When the focus is not on text, call this function setting <code>text</code> | ||
* to an empty string and <code>caret</code> and <code>anchor</code> to zero. | ||
* Also, the plugin should send the empty text when it does not want to reveal | ||
* the selection to IME (e.g., when the surrounding text is containing | ||
* password text). | ||
*/ | ||
void UpdateSurroundingText([in] PP_Instance instance, | ||
[in] PP_Var text, | ||
[in] uint32_t caret, | ||
[in] uint32_t anchor); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.