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

Side by Side Diff: ppapi/api/ppb_input_event.idl

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * This file defines the Input Event interfaces. 7 * This file defines the Input Event interfaces.
8 */ 8 */
9 9
10 label Chrome { 10 label Chrome {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 * 93 *
94 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. 94 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.
95 */ 95 */
96 PP_INPUTEVENT_TYPE_CHAR = 9, 96 PP_INPUTEVENT_TYPE_CHAR = 9,
97 97
98 /** 98 /**
99 * TODO(brettw) when is this used? 99 * TODO(brettw) when is this used?
100 * 100 *
101 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. 101 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.
102 */ 102 */
103 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10 103 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10,
104
105 /**
106 * Notification that an input method composition process has just started.
107 *
108 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
109 */
110 PP_INPUTEVENT_TYPE_COMPOSITION_START = 11,
111
112 /**
113 * Notification that the input method composition string is updated.
114 *
115 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
116 */
117 PP_INPUTEVENT_TYPE_COMPOSITION_UPDATE = 12,
118
119 /**
120 * Notification that an input method composition process has completed.
121 *
122 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
123 */
124 PP_INPUTEVENT_TYPE_COMPOSITION_END = 13,
125
126 /**
127 * Notification that an input method committed a string.
128 *
129 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
130 */
131 PP_INPUTEVENT_TYPE_IME_TEXT = 14
104 }; 132 };
105 133
106 /** 134 /**
107 * This enumeration contains event modifier constants. Each modifier is one 135 * This enumeration contains event modifier constants. Each modifier is one
108 * bit. Retrieve the modifiers from an input event using the GetEventModifiers 136 * bit. Retrieve the modifiers from an input event using the GetEventModifiers
109 * function on PPB_InputEvent. 137 * function on PPB_InputEvent.
110 */ 138 */
111 [assert_size(4)] 139 [assert_size(4)]
112 enum PP_InputEvent_Modifier { 140 enum PP_InputEvent_Modifier {
113 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0, 141 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0,
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 * @param[in] character_event A <code>PP_Resource</code> corresponding to a 722 * @param[in] character_event A <code>PP_Resource</code> corresponding to a
695 * keyboard event. 723 * keyboard event.
696 * 724 *
697 * @return A string var representing a single typed character for character 725 * @return A string var representing a single typed character for character
698 * input events. For non-character input events the return value will be an 726 * input events. For non-character input events the return value will be an
699 * undefined var. 727 * undefined var.
700 */ 728 */
701 PP_Var GetCharacterText([in] PP_Resource character_event); 729 PP_Var GetCharacterText([in] PP_Resource character_event);
702 }; 730 };
703 731
732
733 /**
734 * The <code>PPB_CompositionInputEvent</code> interface contains pointers to
735 * several functions related to composition input events.
736 */
737 [version=1.0, macro="PPB_COMPOSITION_INPUT_EVENT_INTERFACE"]
738 interface PPB_CompositionInputEvent {
739 /**
740 * IsCompositionInputEvent() determines if a resource is a composition event.
741 *
742 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
743 *
744 * @return <code>PP_TRUE</code> if the given resource is a valid input event.
745 */
746 PP_Bool IsCompositionInputEvent([in] PP_Resource resource);
747
748 /**
749 * GetText() returns the composition text as a UTF-8 string for the given
750 * composition event.
751 *
752 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
753 * composition event.
754 *
755 * @return A string var representing the composition text. For non-composition
756 * input events the return value will be an undefined var.
757 */
758 PP_Var GetText([in] PP_Resource composition_event);
759
760 /**
761 * GetTargetSegment() returns the index in the array retrieved by GetSegments
762 * indicating the segment currently under composition.
763 *
764 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
765 * composition event.
766 *
767 * @return An integer indicating the index of the target segment.
768 * For events other than COMPOSITION_UPDATE, returns 0.
769 */
770 uint32_t GetTargetSegment([in] PP_Resource composition_event);
771
772 /**
773 * GetSegments() returns the segmentation information by a list of indices of
774 * a UTF-8 string returned by GetText. For events other than
775 * COMPOSITION_UPDATE, it does nothing.
776 *
777 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
778 * composition event.
779 *
780 * @param[out] segments A pointer to an array containing the list of uint32_t
781 * indices of the segmentation.
782 *
783 * @param[out] segments The length of the array <code>segments</code>.
784 */
785 void GetSegments([in] PP_Resource composition_event,
786 [out] mem_t segments,
787 [out] uint32_t size);
788 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698