summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-11 18:22:39 -0500
committerPietro Gagliardi <[email protected]>2014-02-11 18:22:39 -0500
commitb918496ae453d5e4e703f02d4a70474b9a84d67a (patch)
tree9849c9dd9995b0c001e53fdd4e8ee032747c1de3 /stdwndclass_windows.go
parentc6a8a4d2f799756fa83a9e556d363decd896e8f2 (diff)
Filled in the standard window procedure.
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index e6796e5..730cd51 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -5,6 +5,7 @@ import (
"fmt"
"syscall"
"unsafe"
+ "sync"
)
const (
@@ -16,8 +17,26 @@ var (
)
func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
- // TODO get CreateWindowEx data
+ sysData := getSysData(hwnd)
switch uMsg {
+ case _WM_COMMAND:
+ id := wParam.LOWORD()
+ // ... member events
+ _ = id
+ return 0
+ case _WM_GETMINMAXINFO:
+ mm := lParam.MINMAXINFO()
+ // ... minimum size
+ _ = mm
+ return 0
+ case _WM_SIZE:
+ // TODO
+ return 0
+ case _WM_CLOSE:
+ if sysData.closing != nil {
+ sysData.closing <- struct{}
+ }
+ return 0
default:
r1, _, _ := defWindowProc.Call(
uintptr(hwnd),