diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-11 16:14:15 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-11 16:14:15 -0500 |
| commit | 9794814e9375e597d087b94e9643c943f7999f9c (patch) | |
| tree | 1e5df32921f49590756dbe604ec6578f6f671fe1 /uitask_windows.go | |
| parent | 394bf3ed9c0319924c06e864763cf0464545fa6b (diff) | |
Started implementing the public API: added the Window and Control types and the skeleton of the Windows implementation.
Diffstat (limited to 'uitask_windows.go')
| -rw-r--r-- | uitask_windows.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/uitask_windows.go b/uitask_windows.go new file mode 100644 index 0000000..4f0f04f --- /dev/null +++ b/uitask_windows.go @@ -0,0 +1,40 @@ +// 11 february 2014 +//package ui +package main + +import ( + "syscall" + "unsafe" + "runtime" +) + +var uitask chan *uimsg + +type uimsg struct { + call *syscall.LazyProc + p []uintptr + ret chan uiret +} + +type uiret struct { + ret uintptr + err error +} + +func ui(initDone chan error) { + runtime.LockOSThread() + + // initialize hInstance + // initialize nCmdShow + // initialize the common window class + uitask = make(chan *uimsg) + initDone <- nil + + for m := range uitask { + r1, _, err := m.msg.Call(m.p...) + m.ret <- uiret{ + ret: r1, + err: err, + } + } +} |
