diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-25 15:06:43 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-25 15:06:43 -0400 |
| commit | 9533b3d7d482514bdfd06866fe8ebd7e3a96f274 (patch) | |
| tree | 8ce97a31d3257c4082bdb27eff4e01ced4e44941 /common_windows.go | |
| parent | 2b48f7cabfbf269ac5d5ff292a7c788715ecd411 (diff) | |
Added Area mouse events on Windows. Also more TODOs.
Diffstat (limited to 'common_windows.go')
| -rw-r--r-- | common_windows.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common_windows.go b/common_windows.go index ee09650..acc3b2e 100644 --- a/common_windows.go +++ b/common_windows.go @@ -50,6 +50,20 @@ func _MAKEINTRESOURCE(what uint16) uintptr { return uintptr(what) } +func (l _LPARAM) _X() int32 { + // according to windowsx.h + loword := uint16(l & 0xFFFF) + short := int16(loword) // convert to signed... + return int32(short) // ...and sign extend +} + +func (l _LPARAM) _Y() int32 { + // according to windowsx.h + hiword := uint16((l & 0xFFFF0000) >> 16) + short := int16(hiword) // convert to signed... + return int32(short) // ...and sign extend +} + type _POINT struct { X int32 Y int32 |
