diff options
author | llxwj <llxwjlove@gmail.com> | 2015-11-23 16:20:07 +0800 |
---|---|---|
committer | llxwj <llxwjlove@gmail.com> | 2015-11-23 16:20:07 +0800 |
commit | 506827a83ed2c94ea07485248247073886630b66 (patch) | |
tree | 71431f68a0c27f357c0c44010d54a8fb9a783646 /mouseevent.go | |
parent | Merge pull request #172 from tajtiattila/master (diff) | |
download | wireguard-windows-506827a83ed2c94ea07485248247073886630b66.tar.xz wireguard-windows-506827a83ed2c94ea07485248247073886630b66.zip |
To add the mouse wheel event processing for WindowBase
Diffstat (limited to 'mouseevent.go')
-rw-r--r-- | mouseevent.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mouseevent.go b/mouseevent.go index 5f48ff5c..848a5ea2 100644 --- a/mouseevent.go +++ b/mouseevent.go @@ -55,3 +55,11 @@ func (p *MouseEventPublisher) Publish(x, y int, button MouseButton) { } } } + +func MouseWheelEventDelta(button MouseButton) int { + return int(int32(button) >> 16) +} + +func MouseWheelEventKeyState(button MouseButton) int { + return int(int32(button) & 0xFFFF) +} |