2 #include <msp/graphics/window_private.h>
8 void Mouse::input_event(const Graphics::Window::Event &event)
10 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms703320.aspx
11 if(window.get_touch_input() && (event.extra&0xFFFFFF00)==0xFF515700)
18 set_button_state(1, event.msg==WM_LBUTTONDOWN, true);
22 set_button_state(2, event.msg==WM_MBUTTONDOWN, true);
26 set_button_state(3, event.msg==WM_RBUTTONDOWN, true);
30 unsigned btn = (HIWORD(event.wparam)&0x8000) ? 5 : 4;
31 set_button_state(btn, true, true);
32 set_button_state(btn, false, true);
36 set_axis_value(0, GET_X_LPARAM(event.lparam)*2.0/window.get_width()-1.0, true);
37 set_axis_value(1, 1.0-GET_Y_LPARAM(event.lparam)*2.0/window.get_height(), true);