summaryrefslogtreecommitdiffstatshomepage
path: root/mouseevent.go
diff options
context:
space:
mode:
authorllxwj <llxwjlove@gmail.com>2015-11-23 16:20:07 +0800
committerllxwj <llxwjlove@gmail.com>2015-11-23 16:20:07 +0800
commit506827a83ed2c94ea07485248247073886630b66 (patch)
tree71431f68a0c27f357c0c44010d54a8fb9a783646 /mouseevent.go
parentMerge pull request #172 from tajtiattila/master (diff)
downloadwireguard-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.go8
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)
+}