Changeset 1087 for trunk/src/platform/nacl/nacl_instance.cpp
- Timestamp:
- Nov 25, 2011, 12:30:26 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/nacl/nacl_instance.cpp
r1084 r1087 18 18 #include <ppapi/cpp/module.h> 19 19 #include <ppapi/cpp/completion_callback.h> 20 #include <ppapi/cpp/input_event.h> 20 21 21 22 #include "core.h" … … 32 33 m_size(0, 0) 33 34 { 34 ;35 RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE); 35 36 } 36 37 … … 102 103 } 103 104 105 bool NaClInstance::HandleInputEvent(const pp::InputEvent& event) 106 { 107 switch (event.GetType()) 108 { 109 case PP_INPUTEVENT_TYPE_MOUSEDOWN: 110 Input::SetMouseButton(pp::MouseInputEvent(event).GetButton()); 111 break; 112 case PP_INPUTEVENT_TYPE_MOUSEUP: 113 Input::UnsetMouseButton(pp::MouseInputEvent(event).GetButton()); 114 break; 115 case PP_INPUTEVENT_TYPE_MOUSEMOVE: 116 Input::SetMousePos(ivec2(pp::MouseInputEvent(event).GetPosition().x(), opengl_context_->GetSize().height() - 1 - pp::MouseInputEvent(event).GetPosition().y())); 117 break; 118 default: 119 break; 120 } 121 return true; 122 } 123 104 124 void NaClInstance::DrawSelf() 105 125 {
Note: See TracChangeset
for help on using the changeset viewer.