From b27caae7c3b66a1acf89e871fc5a1b8459572527 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 25 May 2014 01:03:45 -0400 Subject: [PATCH] Renamed _LPARAM._X()/_LPARAM._Y() to _LPARAM.X()/_LPARAM.Y(): it doesn't matter since _LPARAM is not exported anyway, _WPARAM already had this change, and the constant checking tool complains that _X()/_Y() remain undefined (too early? do I need to merge the package files?). --- area_windows.go | 4 ++-- common_windows.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/area_windows.go b/area_windows.go index 943c5af..6daf4bf 100644 --- a/area_windows.go +++ b/area_windows.go @@ -474,8 +474,8 @@ func areaMouseEvent(s *sysData, button uint, up bool, wparam _WPARAM, lparam _LP var me MouseEvent xpos, ypos := getScrollPos(s.hwnd) // mouse coordinates are relative to control; make them relative to Area - xpos += lparam._X() - ypos += lparam._Y() + xpos += lparam.X() + ypos += lparam.Y() me.Pos = image.Pt(int(xpos), int(ypos)) if !me.Pos.In(image.Rect(0, 0, s.areawidth, s.areaheight)) { // outside the actual Area; no event return diff --git a/common_windows.go b/common_windows.go index 52bfddf..85dce45 100644 --- a/common_windows.go +++ b/common_windows.go @@ -50,14 +50,14 @@ func _MAKEINTRESOURCE(what uint16) uintptr { return uintptr(what) } -func (l _LPARAM) _X() int32 { +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 { +func (l _LPARAM) Y() int32 { // according to windowsx.h hiword := uint16((l & 0xFFFF0000) >> 16) short := int16(hiword) // convert to signed...