summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-25 14:29:56 -0400
committerPietro Gagliardi <[email protected]>2014-05-25 14:29:56 -0400
commitd6e7eda29c9c4c774b1b8210ab5d9da0bc51fdfa (patch)
treed2bb1090652f0e9087127614ad2ef94052f98def
parent55c5776334f3e64e9c04fa0cbe547d3a65964309 (diff)
Removed constants from area_windows.go. I think I added a regression earlier when adding the WM_ACTIVATE exception that causes the click count to be reset...
-rw-r--r--area_windows.go26
-rw-r--r--zconstants_windows_386.go11
2 files changed, 11 insertions, 26 deletions
diff --git a/area_windows.go b/area_windows.go
index 6daf4bf..5d62291 100644
--- a/area_windows.go
+++ b/area_windows.go
@@ -67,21 +67,9 @@ var (
const (
areaBackgroundBrush = _HBRUSH(_COLOR_BTNFACE + 1)
-
- // from winuser.h
- _WM_PAINT = 0x000F
)
func paintArea(s *sysData) {
- const (
- // from wingdi.h
- _BI_RGB = 0
- _DIB_RGB_COLORS = 0
- _SRCCOPY = 0x00CC0020
- _AC_SRC_OVER = 0x00
- _AC_SRC_ALPHA = 0x01
- )
-
var xrect _RECT
var ps _PAINTSTRUCT
@@ -459,11 +447,6 @@ func getModifiers() (m Modifiers) {
return m
}
-const (
- _SM_CXDOUBLECLK = 36
- _SM_CYDOUBLECLK = 37
-)
-
var (
_getMessageTime = user32.NewProc("GetMessageTime")
_getDoubleClickTime = user32.NewProc("GetDoubleClickTime")
@@ -603,10 +586,6 @@ var (
func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
return func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
- const (
- _MA_ACTIVATE = 1
- )
-
defwndproc := func() _LRESULT {
r1, _, _ := defWindowProc.Call(
uintptr(hwnd),
@@ -722,11 +701,6 @@ func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lPara
}
func registerAreaWndClass(s *sysData) (newClassName string, err error) {
- const (
- _CS_HREDRAW = 0x0002
- _CS_VREDRAW = 0x0001
- )
-
areaWndClassNumLock.Lock()
newClassName = fmt.Sprintf(areaWndClassFormat, areaWndClassNum)
areaWndClassNum++
diff --git a/zconstants_windows_386.go b/zconstants_windows_386.go
index 3a63ddd..fcbdce0 100644
--- a/zconstants_windows_386.go
+++ b/zconstants_windows_386.go
@@ -1,6 +1,9 @@
// autogenerated by windowsconstgen; do not edit
package ui
+const _AC_SRC_ALPHA = 1
+const _AC_SRC_OVER = 0
const _BCM_GETIDEALSIZE = 5633
+const _BI_RGB = 0
const _BM_GETCHECK = 240
const _BN_CLICKED = 0
const _BST_CHECKED = 1
@@ -17,7 +20,10 @@ const _CB_GETCOUNT = 326
const _CB_GETCURSEL = 327
const _CB_INSERTSTRING = 330
const _COLOR_BTNFACE = 15
+const _CS_HREDRAW = 2
+const _CS_VREDRAW = 1
const _CW_USEDEFAULT = -2147483648
+const _DIB_RGB_COLORS = 0
const _ERROR = 0
const _ES_AUTOHSCROLL = 128
const _ES_PASSWORD = 32
@@ -37,6 +43,7 @@ const _LB_GETSELITEMS = 401
const _LB_GETTEXT = 393
const _LB_GETTEXTLEN = 394
const _LB_INSERTSTRING = 385
+const _MA_ACTIVATE = 1
const _MB_ICONERROR = 16
const _MB_OK = 0
const _MK_LBUTTON = 1
@@ -62,6 +69,9 @@ const _SIF_PAGE = 2
const _SIF_POS = 4
const _SIF_RANGE = 1
const _SIF_TRACKPOS = 16
+const _SM_CXDOUBLECLK = 36
+const _SM_CYDOUBLECLK = 37
+const _SRCCOPY = 13369376
const _SS_LEFTNOWORDWRAP = 12
const _SS_NOPREFIX = 128
const _SW_ERASE = 4
@@ -117,6 +127,7 @@ const _WM_MBUTTONDOWN = 519
const _WM_MBUTTONUP = 520
const _WM_MOUSEACTIVATE = 33
const _WM_MOUSEMOVE = 512
+const _WM_PAINT = 15
const _WM_RBUTTONDOWN = 516
const _WM_RBUTTONUP = 517
const _WM_SETFONT = 48