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

Side by Side Diff: ppapi/c/ppb_input_event.h

Issue 2890323002: Add tilt_x and tilt_y to ppapi touchpoint. (Closed)
Patch Set: Created 3 years, 7 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
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 /* From ppb_input_event.idl modified Wed Apr 26 13:40:13 2017. */ 6 /* From ppb_input_event.idl modified Thu May 18 15:55:01 2017. */
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
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_point.h" 14 #include "ppapi/c/pp_point.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
(...skipping 10 matching lines...) Expand all
27 27
28 #define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0" 28 #define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0"
29 #define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 29 #define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0
30 30
31 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0" 31 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0"
32 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2 "PPB_KeyboardInputEvent;1.2" 32 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2 "PPB_KeyboardInputEvent;1.2"
33 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \ 33 #define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \
34 PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2 34 PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2
35 35
36 #define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 "PPB_TouchInputEvent;1.0" 36 #define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 "PPB_TouchInputEvent;1.0"
37 #define PPB_TOUCH_INPUT_EVENT_INTERFACE PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 37 #define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_1 "PPB_TouchInputEvent;1.1"
38 #define PPB_TOUCH_INPUT_EVENT_INTERFACE PPB_TOUCH_INPUT_EVENT_INTERFACE_1_1
38 39
39 #define PPB_IME_INPUT_EVENT_INTERFACE_1_0 "PPB_IMEInputEvent;1.0" 40 #define PPB_IME_INPUT_EVENT_INTERFACE_1_0 "PPB_IMEInputEvent;1.0"
40 #define PPB_IME_INPUT_EVENT_INTERFACE PPB_IME_INPUT_EVENT_INTERFACE_1_0 41 #define PPB_IME_INPUT_EVENT_INTERFACE PPB_IME_INPUT_EVENT_INTERFACE_1_0
41 42
42 /** 43 /**
43 * @file 44 * @file
44 * This file defines the Input Event interfaces. 45 * This file defines the Input Event interfaces.
45 */ 46 */
46 47
47 48
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 */ 822 */
822 823
823 /** 824 /**
824 * @addtogroup Interfaces 825 * @addtogroup Interfaces
825 * @{ 826 * @{
826 */ 827 */
827 /** 828 /**
828 * The <code>PPB_TouchInputEvent</code> interface contains pointers to several 829 * The <code>PPB_TouchInputEvent</code> interface contains pointers to several
829 * functions related to touch events. 830 * functions related to touch events.
830 */ 831 */
831 struct PPB_TouchInputEvent_1_0 { 832 struct PPB_TouchInputEvent_1_1 {
832 /** 833 /**
833 * Creates a touch input event with the given parameters. Normally you 834 * Creates a touch input event with the given parameters. Normally you
834 * will get a touch event passed through the HandleInputEvent and will not 835 * will get a touch event passed through the HandleInputEvent and will not
835 * need to create them, but some applications may want to create their own 836 * need to create them, but some applications may want to create their own
836 * for internal use. The type must be one of the touch event types. 837 * for internal use. The type must be one of the touch event types.
837 * This newly created touch input event does not have any touch point in any 838 * This newly created touch input event does not have any touch point in any
838 * of the touch-point lists. <code>AddTouchPoint</code> should be called to 839 * of the touch-point lists. <code>AddTouchPoint</code> should be called to
839 * add the touch-points. 840 * add the touch-points.
840 * 841 *
841 * @param[in] instance The instance for which this event occurred. 842 * @param[in] instance The instance for which this event occurred.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 * 912 *
912 * @param[in] list The list. 913 * @param[in] list The list.
913 * 914 *
914 * @param[in] touch_id The id of the touch-point. 915 * @param[in] touch_id The id of the touch-point.
915 * 916 *
916 * @return A <code>PP_TouchPoint</code> representing the touch-point. 917 * @return A <code>PP_TouchPoint</code> representing the touch-point.
917 */ 918 */
918 struct PP_TouchPoint (*GetTouchById)(PP_Resource resource, 919 struct PP_TouchPoint (*GetTouchById)(PP_Resource resource,
919 PP_TouchListType list, 920 PP_TouchListType list,
920 uint32_t touch_id); 921 uint32_t touch_id);
922 /**
923 * Returns the touch-tilt with the specified index in the specified list.
924 *
925 * @param[in] resource A <code>PP_Resource</code> corresponding to a touch
926 * event.
927 *
928 * @param[in] list The list.
929 *
930 * @param[in] touch_id The id of the touch-point.
931 *
932 * @return A <code>PP_FloatPoint</code> representing the tilt of the
933 * touch-point.
934 */
935 struct PP_FloatPoint (*GetTouchTiltByIndex)(PP_Resource resource,
936 PP_TouchListType list,
937 uint32_t index);
938 /**
939 * Returns the touch-tilt with the specified touch-id in the specified list.
940 *
941 * @param[in] resource A <code>PP_Resource</code> corresponding to a touch
942 * event.
943 *
944 * @param[in] list The list.
945 *
946 * @param[in] touch_id The id of the touch-point.
947 *
948 * @return A <code>PP_FloatPoint</code> representing the tilt of the
949 * touch-point.
950 */
951 struct PP_FloatPoint (*GetTouchTiltById)(PP_Resource resource,
952 PP_TouchListType list,
953 uint32_t touch_id);
954 };
955
956 typedef struct PPB_TouchInputEvent_1_1 PPB_TouchInputEvent;
957
958 struct PPB_TouchInputEvent_1_0 {
959 PP_Resource (*Create)(PP_Instance instance,
960 PP_InputEvent_Type type,
961 PP_TimeTicks time_stamp,
962 uint32_t modifiers);
963 void (*AddTouchPoint)(PP_Resource touch_event,
964 PP_TouchListType list,
965 const struct PP_TouchPoint* point);
966 PP_Bool (*IsTouchInputEvent)(PP_Resource resource);
967 uint32_t (*GetTouchCount)(PP_Resource resource, PP_TouchListType list);
968 struct PP_TouchPoint (*GetTouchByIndex)(PP_Resource resource,
969 PP_TouchListType list,
970 uint32_t index);
971 struct PP_TouchPoint (*GetTouchById)(PP_Resource resource,
972 PP_TouchListType list,
973 uint32_t touch_id);
921 }; 974 };
922 975
923 typedef struct PPB_TouchInputEvent_1_0 PPB_TouchInputEvent;
924
925 struct PPB_IMEInputEvent_1_0 { 976 struct PPB_IMEInputEvent_1_0 {
926 /** 977 /**
927 * Create() creates an IME input event with the given parameters. Normally 978 * Create() creates an IME input event with the given parameters. Normally
928 * you will get an IME event passed through the <code>HandleInputEvent</code> 979 * you will get an IME event passed through the <code>HandleInputEvent</code>
929 * and will not need to create them, but some applications may want to create 980 * and will not need to create them, but some applications may want to create
930 * their own for internal use. 981 * their own for internal use.
931 * 982 *
932 * @param[in] instance The instance for which this event occurred. 983 * @param[in] instance The instance for which this event occurred.
933 * 984 *
934 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of 985 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 void (*GetSelection)(PP_Resource ime_event, uint32_t* start, uint32_t* end); 1092 void (*GetSelection)(PP_Resource ime_event, uint32_t* start, uint32_t* end);
1042 }; 1093 };
1043 1094
1044 typedef struct PPB_IMEInputEvent_1_0 PPB_IMEInputEvent; 1095 typedef struct PPB_IMEInputEvent_1_0 PPB_IMEInputEvent;
1045 /** 1096 /**
1046 * @} 1097 * @}
1047 */ 1098 */
1048 1099
1049 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ 1100 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */
1050 1101
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698