| 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 #ifndef PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ |
| 6 #define PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 12 #include "ppapi/shared_impl/resource.h" | 13 #include "ppapi/shared_impl/resource.h" |
| 13 #include "ppapi/thunk/ppb_input_event_api.h" | 14 #include "ppapi/thunk/ppb_input_event_api.h" |
| 14 | 15 |
| 15 namespace ppapi { | 16 namespace ppapi { |
| 16 | 17 |
| 17 // IF YOU ADD STUFF TO THIS CLASS | 18 // IF YOU ADD STUFF TO THIS CLASS |
| 18 // ============================== | 19 // ============================== |
| (...skipping 15 matching lines...) Expand all Loading... |
| 34 int32_t mouse_click_count; | 35 int32_t mouse_click_count; |
| 35 PP_Point mouse_movement; | 36 PP_Point mouse_movement; |
| 36 | 37 |
| 37 PP_FloatPoint wheel_delta; | 38 PP_FloatPoint wheel_delta; |
| 38 PP_FloatPoint wheel_ticks; | 39 PP_FloatPoint wheel_ticks; |
| 39 bool wheel_scroll_by_page; | 40 bool wheel_scroll_by_page; |
| 40 | 41 |
| 41 uint32_t key_code; | 42 uint32_t key_code; |
| 42 | 43 |
| 43 std::string character_text; | 44 std::string character_text; |
| 45 |
| 46 std::vector<uint32_t> composition_segments; |
| 47 int32_t composition_target_segment; |
| 48 uint32_t composition_selection_start; |
| 49 uint32_t composition_selection_end; |
| 44 }; | 50 }; |
| 45 | 51 |
| 46 // This simple class implements the PPB_InputEvent_API in terms of the | 52 // This simple class implements the PPB_InputEvent_API in terms of the |
| 47 // shared InputEventData structure | 53 // shared InputEventData structure |
| 48 class PPAPI_SHARED_EXPORT InputEventImpl | 54 class PPAPI_SHARED_EXPORT InputEventImpl |
| 49 : public Resource, | 55 : public Resource, |
| 50 public thunk::PPB_InputEvent_API { | 56 public thunk::PPB_InputEvent_API { |
| 51 public: | 57 public: |
| 52 struct InitAsImpl {}; | 58 struct InitAsImpl {}; |
| 53 struct InitAsProxy {}; | 59 struct InitAsProxy {}; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 71 virtual uint32_t GetModifiers() OVERRIDE; | 77 virtual uint32_t GetModifiers() OVERRIDE; |
| 72 virtual PP_InputEvent_MouseButton GetMouseButton() OVERRIDE; | 78 virtual PP_InputEvent_MouseButton GetMouseButton() OVERRIDE; |
| 73 virtual PP_Point GetMousePosition() OVERRIDE; | 79 virtual PP_Point GetMousePosition() OVERRIDE; |
| 74 virtual int32_t GetMouseClickCount() OVERRIDE; | 80 virtual int32_t GetMouseClickCount() OVERRIDE; |
| 75 virtual PP_Point GetMouseMovement() OVERRIDE; | 81 virtual PP_Point GetMouseMovement() OVERRIDE; |
| 76 virtual PP_FloatPoint GetWheelDelta() OVERRIDE; | 82 virtual PP_FloatPoint GetWheelDelta() OVERRIDE; |
| 77 virtual PP_FloatPoint GetWheelTicks() OVERRIDE; | 83 virtual PP_FloatPoint GetWheelTicks() OVERRIDE; |
| 78 virtual PP_Bool GetWheelScrollByPage() OVERRIDE; | 84 virtual PP_Bool GetWheelScrollByPage() OVERRIDE; |
| 79 virtual uint32_t GetKeyCode() OVERRIDE; | 85 virtual uint32_t GetKeyCode() OVERRIDE; |
| 80 virtual PP_Var GetCharacterText() OVERRIDE; | 86 virtual PP_Var GetCharacterText() OVERRIDE; |
| 87 virtual void GetCompositionSegments(uint32_t**, uint32_t*) OVERRIDE; |
| 88 virtual int32_t GetCompositionTargetSegment() OVERRIDE; |
| 89 virtual void GetCompositionSelection(uint32_t*, uint32_t*) OVERRIDE; |
| 81 | 90 |
| 82 private: | 91 private: |
| 83 InputEventData data_; | 92 InputEventData data_; |
| 84 | 93 |
| 85 DISALLOW_IMPLICIT_CONSTRUCTORS(InputEventImpl); | 94 DISALLOW_IMPLICIT_CONSTRUCTORS(InputEventImpl); |
| 86 }; | 95 }; |
| 87 | 96 |
| 88 } // namespace ppapi | 97 } // namespace ppapi |
| 89 | 98 |
| 90 #endif // PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ | 99 #endif // PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ |
| 91 | 100 |
| OLD | NEW |