| OLD | NEW |
| 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 #include "ppapi/shared_impl/input_event_impl.h" | 5 #include "ppapi/shared_impl/input_event_impl.h" |
| 6 | 6 |
| 7 namespace ppapi { | 7 namespace ppapi { |
| 8 | 8 |
| 9 InputEventData::InputEventData() | 9 InputEventData::InputEventData() |
| 10 : is_filtered(false), | 10 : is_filtered(false), |
| 11 event_type(PP_INPUTEVENT_TYPE_UNDEFINED), | 11 event_type(PP_INPUTEVENT_TYPE_UNDEFINED), |
| 12 event_time_stamp(0.0), | 12 event_time_stamp(0.0), |
| 13 event_modifiers(0), | 13 event_modifiers(0), |
| 14 mouse_button(PP_INPUTEVENT_MOUSEBUTTON_NONE), | 14 mouse_button(PP_INPUTEVENT_MOUSEBUTTON_NONE), |
| 15 mouse_position(PP_MakePoint(0, 0)), | 15 mouse_position(PP_MakePoint(0, 0)), |
| 16 mouse_click_count(0), | 16 mouse_click_count(0), |
| 17 mouse_movement(PP_MakePoint(0, 0)), |
| 17 wheel_delta(PP_MakeFloatPoint(0.0f, 0.0f)), | 18 wheel_delta(PP_MakeFloatPoint(0.0f, 0.0f)), |
| 18 wheel_ticks(PP_MakeFloatPoint(0.0f, 0.0f)), | 19 wheel_ticks(PP_MakeFloatPoint(0.0f, 0.0f)), |
| 19 wheel_scroll_by_page(false), | 20 wheel_scroll_by_page(false), |
| 20 key_code(0), | 21 key_code(0), |
| 21 character_text() { | 22 character_text() { |
| 22 } | 23 } |
| 23 | 24 |
| 24 InputEventData::~InputEventData() { | 25 InputEventData::~InputEventData() { |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 } | 49 } |
| 49 | 50 |
| 50 PP_Point InputEventImpl::GetMousePosition() { | 51 PP_Point InputEventImpl::GetMousePosition() { |
| 51 return data_.mouse_position; | 52 return data_.mouse_position; |
| 52 } | 53 } |
| 53 | 54 |
| 54 int32_t InputEventImpl::GetMouseClickCount() { | 55 int32_t InputEventImpl::GetMouseClickCount() { |
| 55 return data_.mouse_click_count; | 56 return data_.mouse_click_count; |
| 56 } | 57 } |
| 57 | 58 |
| 59 PP_Point InputEventImpl::GetMouseMovement() { |
| 60 return data_.mouse_movement; |
| 61 } |
| 62 |
| 58 PP_FloatPoint InputEventImpl::GetWheelDelta() { | 63 PP_FloatPoint InputEventImpl::GetWheelDelta() { |
| 59 return data_.wheel_delta; | 64 return data_.wheel_delta; |
| 60 } | 65 } |
| 61 | 66 |
| 62 PP_FloatPoint InputEventImpl::GetWheelTicks() { | 67 PP_FloatPoint InputEventImpl::GetWheelTicks() { |
| 63 return data_.wheel_ticks; | 68 return data_.wheel_ticks; |
| 64 } | 69 } |
| 65 | 70 |
| 66 PP_Bool InputEventImpl::GetWheelScrollByPage() { | 71 PP_Bool InputEventImpl::GetWheelScrollByPage() { |
| 67 return PP_FromBool(data_.wheel_scroll_by_page); | 72 return PP_FromBool(data_.wheel_scroll_by_page); |
| 68 } | 73 } |
| 69 | 74 |
| 70 uint32_t InputEventImpl::GetKeyCode() { | 75 uint32_t InputEventImpl::GetKeyCode() { |
| 71 return data_.key_code; | 76 return data_.key_code; |
| 72 } | 77 } |
| 73 | 78 |
| 74 PP_Var InputEventImpl::GetCharacterText() { | 79 PP_Var InputEventImpl::GetCharacterText() { |
| 75 return StringToPPVar(data_.character_text); | 80 return StringToPPVar(data_.character_text); |
| 76 } | 81 } |
| 77 | 82 |
| 78 } // namespace ppapi | 83 } // namespace ppapi |
| 79 | 84 |
| OLD | NEW |