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

Side by Side Diff: ppapi/c/ppb_input_event.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 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 /* From ppb_input_event.idl modified Wed Aug 24 09:43:38 2011. */ 6 /* From ppb_input_event.idl modified Wed Aug 24 09:43:38 2011. */
7 7
8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ 8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_
9 #define PPAPI_C_PPB_INPUT_EVENT_H_ 9 #define PPAPI_C_PPB_INPUT_EVENT_H_
10 10
(...skipping 13 matching lines...) Expand all
24 #define PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1 "PPB_MouseInputEvent;1.1" 24 #define PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1 "PPB_MouseInputEvent;1.1"
25 #define PPB_MOUSE_INPUT_EVENT_INTERFACE PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1 25 #define PPB_MOUSE_INPUT_EVENT_INTERFACE PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1
26 26
27 #define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0" 27 #define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0"
28 #define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 28 #define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0
29 29
30 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0" 30 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0"
31 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \ 31 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \
32 PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 32 PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0
33 33
34 #define PPB_COMPOSITION_INPUT_EVENT_INTERFACE_1_0 "PPB_CompositionInputEvent;1.0 "
35 #define PPB_COMPOSITION_INPUT_EVENT_INTERFACE \
36 PPB_COMPOSITION_INPUT_EVENT_INTERFACE_1_0
37
34 /** 38 /**
35 * @file 39 * @file
36 * This file defines the Input Event interfaces. 40 * This file defines the Input Event interfaces.
37 */ 41 */
38 42
39 43
40 /** 44 /**
41 * @addtogroup Enums 45 * @addtogroup Enums
42 * @{ 46 * @{
43 */ 47 */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 * on the key, locale, and operating system. 114 * on the key, locale, and operating system.
111 * 115 *
112 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. 116 * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class.
113 */ 117 */
114 PP_INPUTEVENT_TYPE_CHAR = 9, 118 PP_INPUTEVENT_TYPE_CHAR = 9,
115 /** 119 /**
116 * TODO(brettw) when is this used? 120 * TODO(brettw) when is this used?
117 * 121 *
118 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class. 122 * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.
119 */ 123 */
120 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10 124 PP_INPUTEVENT_TYPE_CONTEXTMENU = 10,
125 /**
126 * Notification that an input method composition process has just started.
127 *
128 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
129 */
130 PP_INPUTEVENT_TYPE_COMPOSITION_START = 11,
131 /**
132 * Notification that the input method composition string is updated.
133 *
134 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
135 */
136 PP_INPUTEVENT_TYPE_COMPOSITION_UPDATE = 12,
137 /**
138 * Notification that an input method composition process has completed.
139 *
140 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
141 */
142 PP_INPUTEVENT_TYPE_COMPOSITION_END = 13,
143 /**
144 * Notification that an input method committed a string.
145 *
146 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
147 */
148 PP_INPUTEVENT_TYPE_IME_TEXT = 14
121 } PP_InputEvent_Type; 149 } PP_InputEvent_Type;
122 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_InputEvent_Type, 4); 150 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_InputEvent_Type, 4);
123 151
124 /** 152 /**
125 * This enumeration contains event modifier constants. Each modifier is one 153 * This enumeration contains event modifier constants. Each modifier is one
126 * bit. Retrieve the modifiers from an input event using the GetEventModifiers 154 * bit. Retrieve the modifiers from an input event using the GetEventModifiers
127 * function on PPB_InputEvent. 155 * function on PPB_InputEvent.
128 */ 156 */
129 typedef enum { 157 typedef enum {
130 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0, 158 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0,
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 * 695 *
668 * @param[in] character_event A <code>PP_Resource</code> corresponding to a 696 * @param[in] character_event A <code>PP_Resource</code> corresponding to a
669 * keyboard event. 697 * keyboard event.
670 * 698 *
671 * @return A string var representing a single typed character for character 699 * @return A string var representing a single typed character for character
672 * input events. For non-character input events the return value will be an 700 * input events. For non-character input events the return value will be an
673 * undefined var. 701 * undefined var.
674 */ 702 */
675 struct PP_Var (*GetCharacterText)(PP_Resource character_event); 703 struct PP_Var (*GetCharacterText)(PP_Resource character_event);
676 }; 704 };
705
706 /**
707 * The <code>PPB_CompositionInputEvent</code> interface contains pointers to
708 * several functions related to composition input events.
709 */
710 #define PPB_COMPOSITION_INPUT_EVENT_INTERFACE \
711 PPB_COMPOSITION_INPUT_EVENT_INTERFACE_1_0
712
713 struct PPB_CompositionInputEvent {
714 /**
715 * IsCompositionInputEvent() determines if a resource is a composition event.
716 *
717 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
718 *
719 * @return <code>PP_TRUE</code> if the given resource is a valid input event.
720 */
721 PP_Bool (*IsCompositionInputEvent)(PP_Resource resource);
722 /**
723 * GetText() returns the composition text as a UTF-8 string for the given
724 * composition event.
725 *
726 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
727 * composition event.
728 *
729 * @return A string var representing the composition text. For non-composition
730 * input events the return value will be an undefined var.
731 */
732 struct PP_Var (*GetText)(PP_Resource composition_event);
733 /**
734 * GetTargetSegment() returns the index in the array retrieved by GetSegments
735 * indicating the segment currently under composition.
736 *
737 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
738 * composition event.
739 *
740 * @return An integer indicating the index of the target segment.
741 * For events other than COMPOSITION_UPDATE, returns 0.
742 */
743 uint32_t (*GetTargetSegment)(PP_Resource composition_event);
kochi 2011/09/09 07:58:59 Could you change this to GetSelectionRange()? prob
744 /**
745 * GetSegments() returns the segmentation information by a list of indices of
746 * a UTF-8 string returned by GetText. For events other than
747 * COMPOSITION_UPDATE, it does nothing.
748 *
749 * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
750 * composition event.
751 *
752 * @param[out] segments A pointer to an array containing the list of indices
753 * of the segmentation.
754 *
755 * @param[out] segments The length of the array <code>segments</code>.
756 */
757 void (*GetSegments)(PP_Resource composition_event,
758 uint32_t** segments,
759 uint32_t* size);
760 };
677 /** 761 /**
678 * @} 762 * @}
679 */ 763 */
680 764
681 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ 765 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */
682 766
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698