OLD | NEW |
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 #ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // shared InputEventData structure | 65 // shared InputEventData structure |
66 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared | 66 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared |
67 : public Resource, | 67 : public Resource, |
68 public thunk::PPB_InputEvent_API { | 68 public thunk::PPB_InputEvent_API { |
69 public: | 69 public: |
70 PPB_InputEvent_Shared(ResourceObjectType type, | 70 PPB_InputEvent_Shared(ResourceObjectType type, |
71 PP_Instance instance, | 71 PP_Instance instance, |
72 const InputEventData& data); | 72 const InputEventData& data); |
73 | 73 |
74 // Resource overrides. | 74 // Resource overrides. |
75 virtual PPB_InputEvent_API* AsPPB_InputEvent_API() override; | 75 PPB_InputEvent_API* AsPPB_InputEvent_API() override; |
76 | 76 |
77 // PPB_InputEvent_API implementation. | 77 // PPB_InputEvent_API implementation. |
78 virtual const InputEventData& GetInputEventData() const override; | 78 const InputEventData& GetInputEventData() const override; |
79 virtual PP_InputEvent_Type GetType() override; | 79 PP_InputEvent_Type GetType() override; |
80 virtual PP_TimeTicks GetTimeStamp() override; | 80 PP_TimeTicks GetTimeStamp() override; |
81 virtual uint32_t GetModifiers() override; | 81 uint32_t GetModifiers() override; |
82 virtual PP_InputEvent_MouseButton GetMouseButton() override; | 82 PP_InputEvent_MouseButton GetMouseButton() override; |
83 virtual PP_Point GetMousePosition() override; | 83 PP_Point GetMousePosition() override; |
84 virtual int32_t GetMouseClickCount() override; | 84 int32_t GetMouseClickCount() override; |
85 virtual PP_Point GetMouseMovement() override; | 85 PP_Point GetMouseMovement() override; |
86 virtual PP_FloatPoint GetWheelDelta() override; | 86 PP_FloatPoint GetWheelDelta() override; |
87 virtual PP_FloatPoint GetWheelTicks() override; | 87 PP_FloatPoint GetWheelTicks() override; |
88 virtual PP_Bool GetWheelScrollByPage() override; | 88 PP_Bool GetWheelScrollByPage() override; |
89 virtual uint32_t GetKeyCode() override; | 89 uint32_t GetKeyCode() override; |
90 virtual PP_Var GetCharacterText() override; | 90 PP_Var GetCharacterText() override; |
91 virtual PP_Var GetCode() override; | 91 PP_Var GetCode() override; |
92 virtual uint32_t GetIMESegmentNumber() override; | 92 uint32_t GetIMESegmentNumber() override; |
93 virtual uint32_t GetIMESegmentOffset(uint32_t index) override; | 93 uint32_t GetIMESegmentOffset(uint32_t index) override; |
94 virtual int32_t GetIMETargetSegment() override; | 94 int32_t GetIMETargetSegment() override; |
95 virtual void GetIMESelection(uint32_t* start, uint32_t* end) override; | 95 void GetIMESelection(uint32_t* start, uint32_t* end) override; |
96 virtual void AddTouchPoint(PP_TouchListType list, | 96 void AddTouchPoint(PP_TouchListType list, |
97 const PP_TouchPoint& point) override; | 97 const PP_TouchPoint& point) override; |
98 virtual uint32_t GetTouchCount(PP_TouchListType list) override; | 98 uint32_t GetTouchCount(PP_TouchListType list) override; |
99 virtual PP_TouchPoint GetTouchByIndex(PP_TouchListType list, | 99 PP_TouchPoint GetTouchByIndex(PP_TouchListType list, uint32_t index) override; |
100 uint32_t index) override; | 100 PP_TouchPoint GetTouchById(PP_TouchListType list, uint32_t id) override; |
101 virtual PP_TouchPoint GetTouchById(PP_TouchListType list, | 101 PP_Bool TraceInputLatency(PP_Bool has_damage) override; |
102 uint32_t id) override; | |
103 virtual PP_Bool TraceInputLatency(PP_Bool has_damage) override; | |
104 | 102 |
105 // Implementations for event creation. | 103 // Implementations for event creation. |
106 static PP_Resource CreateIMEInputEvent(ResourceObjectType type, | 104 static PP_Resource CreateIMEInputEvent(ResourceObjectType type, |
107 PP_Instance instance, | 105 PP_Instance instance, |
108 PP_InputEvent_Type event_type, | 106 PP_InputEvent_Type event_type, |
109 PP_TimeTicks time_stamp, | 107 PP_TimeTicks time_stamp, |
110 struct PP_Var text, | 108 struct PP_Var text, |
111 uint32_t segment_number, | 109 uint32_t segment_number, |
112 const uint32_t* segment_offsets, | 110 const uint32_t* segment_offsets, |
113 int32_t target_segment, | 111 int32_t target_segment, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 144 |
147 private: | 145 private: |
148 InputEventData data_; | 146 InputEventData data_; |
149 | 147 |
150 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); | 148 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); |
151 }; | 149 }; |
152 | 150 |
153 } // namespace ppapi | 151 } // namespace ppapi |
154 | 152 |
155 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 153 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
OLD | NEW |