summaryrefslogtreecommitdiff
path: root/common_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'common_windows.go')
-rw-r--r--common_windows.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common_windows.go b/common_windows.go
index 85dce45..f9289cb 100644
--- a/common_windows.go
+++ b/common_windows.go
@@ -76,6 +76,12 @@ type _RECT struct {
bottom int32
}
+// Go doesn't allow negative constants to be forced into unsigned types at compile-time; this will do it at runtime.
+// TODO make sure sign extension works fine here (check Go's rules and ABI sign extension rules)
+func negConst(c int) uintptr {
+ return uintptr(c)
+}
+
// Predefined cursor resource IDs.
const (
_IDC_APPSTARTING = 32650