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

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

Issue 10543159: ppapi: Add support for touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: idl-goodness Created 8 years, 6 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
« no previous file with comments | « no previous file | ppapi/api/ppb_touch_point.idl » ('j') | ppapi/api/ppb_touch_point.idl » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 * 126 *
127 * Register for this event using the PP_INPUTEVENT_CLASS_IME class. 127 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
128 */ 128 */
129 PP_INPUTEVENT_TYPE_IME_COMPOSITION_END = 13, 129 PP_INPUTEVENT_TYPE_IME_COMPOSITION_END = 13,
130 130
131 /** 131 /**
132 * Notification that an input method committed a string. 132 * Notification that an input method committed a string.
133 * 133 *
134 * Register for this event using the PP_INPUTEVENT_CLASS_IME class. 134 * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
135 */ 135 */
136 PP_INPUTEVENT_TYPE_IME_TEXT = 14 136 PP_INPUTEVENT_TYPE_IME_TEXT = 14,
137
138 /**
139 * Notification that a finger was placed on a touch-enabled device.
140 *
141 * Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.
142 */
143 PP_INPUTEVENT_TYPE_TOUCHSTART = 15,
144
145 /**
146 * Notification that a finger was moved on a touch-enabled device.
147 *
148 * Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.
149 */
150 PP_INPUTEVENT_TYPE_TOUCHMOVE = 16,
151
152 /**
153 * Notification that a finger was released on a touch-enabled device.
154 *
155 * Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.
156 */
157 PP_INPUTEVENT_TYPE_TOUCHEND = 17,
158
159 /**
160 * Notification that a touch event was canceled.
161 *
162 * Register for this event using the PP_INPUTEVENT_CLASS_TOUCH class.
163 */
164 PP_INPUTEVENT_TYPE_TOUCHCANCEL = 18
137 }; 165 };
138 166
139 /** 167 /**
140 * This enumeration contains event modifier constants. Each modifier is one 168 * This enumeration contains event modifier constants. Each modifier is one
141 * bit. Retrieve the modifiers from an input event using the GetEventModifiers 169 * bit. Retrieve the modifiers from an input event using the GetEventModifiers
142 * function on PPB_InputEvent. 170 * function on PPB_InputEvent.
143 */ 171 */
144 [assert_size(4)] 172 [assert_size(4)]
145 enum PP_InputEvent_Modifier { 173 enum PP_InputEvent_Modifier {
146 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0, 174 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0,
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 * @param[in] character_event A <code>PP_Resource</code> corresponding to a 751 * @param[in] character_event A <code>PP_Resource</code> corresponding to a
724 * keyboard event. 752 * keyboard event.
725 * 753 *
726 * @return A string var representing a single typed character for character 754 * @return A string var representing a single typed character for character
727 * input events. For non-character input events the return value will be an 755 * input events. For non-character input events the return value will be an
728 * undefined var. 756 * undefined var.
729 */ 757 */
730 PP_Var GetCharacterText([in] PP_Resource character_event); 758 PP_Var GetCharacterText([in] PP_Resource character_event);
731 }; 759 };
732 760
761 [assert_size(4)]
762 enum PP_TouchListType {
763 /**
764 * The list of all TouchPoints which are currently down.
765 */
766 PP_TOUCHLIST_TYPE_TOUCHES = 0,
767
768 /**
769 * The list of all TouchPoints whose state has changed since the last
770 * TouchInputEvent.
771 */
772 PP_TOUCHLIST_TYPE_CHANGEDTOUCHES = 1,
773
774 /**
775 * The list of all TouchPoints which are targeting this plugin. This is a
776 * subset of Touches.
777 */
778 PP_TOUCHLIST_TYPE_TARGETTOUCHES = 2
779 };
780
781 /**
782 * The <code>PPB_TouchInputEvent</code> interface contains pointers to several
783 * functions related to touch events.
784 */
785 [version=1.0, macro="PPB_TOUCH_INPUT_EVENT_INTERFACE"]
786 interface PPB_TouchInputEvent {
787 /**
788 * Creates a touch input event with the given parameters. Normally you
789 * will get a touch event passed through the HandleInputEvent and will not
790 * need to create them, but some applications may want to create their own
791 * for internal use. The type must be one of the touch event types.
792 *
793 * @param[in] instance The instance for which this event occurred.
794 *
795 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
796 * input event.
797 *
798 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
799 * when the event occurred.
800 *
801 * @param[in] modifiers A bit field combination of the
802 * <code>PP_InputEvent_Modifier</code> flags.
803 *
804 * @return A <code>PP_Resource</code> containing the new touch input event.
805 */
806 PP_Resource Create([in] PP_Instance instance,
807 [in] PP_InputEvent_Type type,
808 [in] PP_TimeTicks time_stamp,
809 [in] uint32_t modifiers);
810
811 /**
812 * Adds a touch point to the touch event in the specified toucyh-list.
813 *
814 * @param[in] touch_event A <code>PP_Resource</code> corresponding to a touch
815 * event.
816 *
817 * @param[in] list The list to add the touch point to.
818 *
819 * @param[in] point The point to add to the list.
820 */
821 void AddTouchPoint([in] PP_Resource touch_event,
822 [in] PP_TouchListType list,
823 [in] PP_TouchPoint point);
824
825 /**
826 * IsTouchInputEvent() determines if a resource is a touch event.
827 *
828 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
829 *
830 * @return <code>PP_TRUE</code> if the given resource is a valid touch input
831 * event, otherwise <code>PP_FALSE</code>.
832 */
833 PP_Bool IsTouchInputEvent([in] PP_Resource resource);
834
835 /**
836 * Returns the number of touch-points in the specified list.
837 *
838 * @param[in] resource A <code>PP_Resource</code> corresponding to a touch
839 * event.
840 *
841 * @param[in] list The list.
842 *
843 * @return The number of touch-points in the specified list.
844 */
845 uint32_t GetTouchCount([in] PP_Resource resource,
846 [in] PP_TouchListType list);
847
848 /**
849 * Returns the touch-point at the specified index from the specified list.
850 *
851 * @param[in] resource A <code>PP_Resource</code> corresponding to a touch
852 * event.
853 *
854 * @param[in] list The list.
855 *
856 * @param[in] index The index.
857 *
858 * @return A <code>PP_TouchPoint</code> representing the touch-point.
859 */
860 PP_TouchPoint GetTouchByIndex([in] PP_Resource resource,
861 [in] PP_TouchListType list,
862 [in] uint32_t index);
863
864 /**
865 * Returns the touch-point with the spcified touch-id in the specified list.
866 *
867 * @param[in] resource A <code>PP_Resource</code> corresponding to a touch
868 * event.
869 *
870 * @param[in] list The list.
871 *
872 * @param[in] touch_id The id of the touch-point.
873 *
874 * @return A <code>PP_TouchPoint</code> representing the touch-point.
875 */
876 PP_TouchPoint GetTouchById([in] PP_Resource resource,
877 [in] PP_TouchListType list,
878 [in] uint32_t touch_id);
879 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/api/ppb_touch_point.idl » ('j') | ppapi/api/ppb_touch_point.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698