| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual PP_Bool GetWheelScrollByPage() OVERRIDE; | 77 virtual PP_Bool GetWheelScrollByPage() OVERRIDE; |
| 78 virtual uint32_t GetKeyCode() OVERRIDE; | 78 virtual uint32_t GetKeyCode() OVERRIDE; |
| 79 virtual PP_Var GetCharacterText() OVERRIDE; | 79 virtual PP_Var GetCharacterText() OVERRIDE; |
| 80 virtual PP_Bool SetUsbKeyCode(uint32_t usb_key_code) OVERRIDE; | 80 virtual PP_Bool SetUsbKeyCode(uint32_t usb_key_code) OVERRIDE; |
| 81 virtual uint32_t GetUsbKeyCode() OVERRIDE; | 81 virtual uint32_t GetUsbKeyCode() OVERRIDE; |
| 82 virtual uint32_t GetIMESegmentNumber() OVERRIDE; | 82 virtual uint32_t GetIMESegmentNumber() OVERRIDE; |
| 83 virtual uint32_t GetIMESegmentOffset(uint32_t index) OVERRIDE; | 83 virtual uint32_t GetIMESegmentOffset(uint32_t index) OVERRIDE; |
| 84 virtual int32_t GetIMETargetSegment() OVERRIDE; | 84 virtual int32_t GetIMETargetSegment() OVERRIDE; |
| 85 virtual void GetIMESelection(uint32_t* start, uint32_t* end) OVERRIDE; | 85 virtual void GetIMESelection(uint32_t* start, uint32_t* end) OVERRIDE; |
| 86 | 86 |
| 87 // Implementations for event creation. |
| 88 static PP_Resource CreateIMEInputEvent(ResourceObjectType type, |
| 89 PP_Instance instance, |
| 90 PP_InputEvent_Type event_type, |
| 91 PP_TimeTicks time_stamp, |
| 92 struct PP_Var text, |
| 93 uint32_t segment_number, |
| 94 const uint32_t* segment_offsets, |
| 95 int32_t target_segment, |
| 96 uint32_t selection_start, |
| 97 uint32_t selection_end); |
| 98 static PP_Resource CreateKeyboardInputEvent(ResourceObjectType type, |
| 99 PP_Instance instance, |
| 100 PP_InputEvent_Type event_type, |
| 101 PP_TimeTicks time_stamp, |
| 102 uint32_t modifiers, |
| 103 uint32_t key_code, |
| 104 struct PP_Var character_text); |
| 105 static PP_Resource CreateMouseInputEvent( |
| 106 ResourceObjectType type, |
| 107 PP_Instance instance, |
| 108 PP_InputEvent_Type event_type, |
| 109 PP_TimeTicks time_stamp, |
| 110 uint32_t modifiers, |
| 111 PP_InputEvent_MouseButton mouse_button, |
| 112 const PP_Point* mouse_position, |
| 113 int32_t click_count, |
| 114 const PP_Point* mouse_movement); |
| 115 static PP_Resource CreateWheelInputEvent(ResourceObjectType type, |
| 116 PP_Instance instance, |
| 117 PP_TimeTicks time_stamp, |
| 118 uint32_t modifiers, |
| 119 const PP_FloatPoint* wheel_delta, |
| 120 const PP_FloatPoint* wheel_ticks, |
| 121 PP_Bool scroll_by_page); |
| 122 |
| 87 private: | 123 private: |
| 88 InputEventData data_; | 124 InputEventData data_; |
| 89 | 125 |
| 90 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); | 126 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); |
| 91 }; | 127 }; |
| 92 | 128 |
| 93 } // namespace ppapi | 129 } // namespace ppapi |
| 94 | 130 |
| 95 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 131 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
| OLD | NEW |