Changed Areas on Windows to store their sysData inside the window memory instead of being given it via a closure. Actually having only one window class for all Areas comes next.

This commit is contained in:
Pietro Gagliardi 2014-05-30 22:14:55 -04:00
parent a3e27bfbd0
commit 855a09656a
2 changed files with 6 additions and 1 deletions

View File

@ -604,8 +604,12 @@ var (
_setFocus = user32.NewProc("SetFocus")
)
func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
func areaWndProc(unused *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
return func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
s := getSysData(hwnd)
if s == nil { // not yet saved
return storeSysData(hwnd, uMsg, wParam, lParam)
}
switch uMsg {
case _WM_PAINT:
paintArea(s)

View File

@ -116,6 +116,7 @@ var classTypes = [nctypes]*classData{
register: registerAreaWndClass,
style: areastyle,
xstyle: areaxstyle,
storeSysData: true,
doNotLoadFont: true,
},
}