aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 20:08:31 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 20:08:31 +0200
commit6133e17b9a77d21a33f4dc30c3409aa19129cd08 (patch)
treea71ff44e95ef528d5f7447ef89f33276988f2603 /src/win32
parent1e615b59a6e9685ec283b290eb337faab888f262 (diff)
downloadglutin-6133e17b9a77d21a33f4dc30c3409aa19129cd08.tar.gz
glutin-6133e17b9a77d21a33f4dc30c3409aa19129cd08.zip
Add moved events for win32
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/ffi.rs1
-rw-r--r--src/win32/mod.rs8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/win32/ffi.rs b/src/win32/ffi.rs
index 96f09d4..8ff7c43 100644
--- a/src/win32/ffi.rs
+++ b/src/win32/ffi.rs
@@ -309,6 +309,7 @@ pub static WM_KILLFOCUS: UINT = 0x0008;
pub static WM_MBUTTONDOWN: UINT = 0x0207;
pub static WM_MBUTTONUP: UINT = 0x0208;
pub static WM_MOUSEMOVE: UINT = 0x0200;
+pub static WM_MOVE: UINT = 0x0003;
pub static WM_PAINT: UINT = 0x000F;
pub static WM_RBUTTONDOWN: UINT = 0x0204;
pub static WM_RBUTTONUP: UINT = 0x0205;
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index be6014e..481436c 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -299,6 +299,14 @@ extern "stdcall" fn callback(window: ffi::HWND, msg: ffi::UINT,
0
},
+ ffi::WM_MOVE => {
+ use events::Moved;
+ let x = ffi::LOWORD(lparam as ffi::DWORD) as uint;
+ let y = ffi::HIWORD(lparam as ffi::DWORD) as uint;
+ send_event(window, Moved(x, y));
+ 0
+ },
+
ffi::WM_CHAR => {
use std::mem;
use events::ReceivedCharacter;