summaryrefslogtreecommitdiff
path: root/wndproc.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-08 23:51:11 -0500
committerPietro Gagliardi <[email protected]>2014-02-08 23:51:11 -0500
commitecc00bd1f5cb5d97387f762455c6c51afd0f2fae (patch)
treec8fdb445944dcb5d231c7d57a12b747708ed6f57 /wndproc.go
parent35e8a028f5d5f9654d7fa34ebadf26cfef845759 (diff)
Added a lot of the stuff needed to create a simple window. Not done yet...
Diffstat (limited to 'wndproc.go')
-rw-r--r--wndproc.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/wndproc.go b/wndproc.go
new file mode 100644
index 0000000..b9c13f2
--- /dev/null
+++ b/wndproc.go
@@ -0,0 +1,24 @@
+// 8 february 2014
+package main
+
+import (
+// "syscall"
+// "unsafe"
+)
+
+// TODO error handling
+type WNDPROC func(hwnd HWND, uMsg uint32, wParam WPARAM, lParam LPARAM) LRESULT
+
+var (
+ defWindowProc = user32.NewProc("DefWindowProcW")
+)
+
+// TODO error handling
+func DefWindowProc(hwnd HWND, uMsg uint32, wParam WPARAM, lParam LPARAM) LRESULT {
+ r1, _, _ := defWindowProc.Call(
+ uintptr(hwnd),
+ uintptr(uMsg),
+ uintptr(wParam),
+ uintptr(lParam))
+ return LRESULT(r1)
+}