summaryrefslogtreecommitdiff
path: root/wndproc_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-11 13:06:12 -0500
committerPietro Gagliardi <[email protected]>2014-02-11 13:06:12 -0500
commit42229820d2a47594f68d92356f8e8a86133a29f5 (patch)
tree3cd5deef283b4540bae2f75c049a5e69d4e9db20 /wndproc_windows.go
parenta488e3ab36de1d6a329110fbaae44cd5747c854b (diff)
Added _windows.go extensions to all the files in preparation for the library writing.
Diffstat (limited to 'wndproc_windows.go')
-rw-r--r--wndproc_windows.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/wndproc_windows.go b/wndproc_windows.go
new file mode 100644
index 0000000..b9c13f2
--- /dev/null
+++ b/wndproc_windows.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)
+}