summaryrefslogtreecommitdiff
path: root/src/pkg/exp/wingui/zwinapi.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
commitc072558b90f1bbedc2022b0f30c8b1ac4712538e (patch)
tree67767591619e4bd8111fb05fac185cde94fb7378 /src/pkg/exp/wingui/zwinapi.go
parent5859517b767c99749a45651c15d4bae5520ebae8 (diff)
downloadgolang-upstream/2011.02.15.tar.gz
Imported Upstream version 2011.02.15upstream/2011.02.15
Diffstat (limited to 'src/pkg/exp/wingui/zwinapi.go')
-rw-r--r--src/pkg/exp/wingui/zwinapi.go29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/pkg/exp/wingui/zwinapi.go b/src/pkg/exp/wingui/zwinapi.go
index 324bf1773..60aaac6cf 100644
--- a/src/pkg/exp/wingui/zwinapi.go
+++ b/src/pkg/exp/wingui/zwinapi.go
@@ -79,10 +79,9 @@ func DefWindowProc(hwnd uint32, msg uint32, wparam int32, lparam int32) (lresult
return
}
-func DestroyWindow(hwnd uint32) (ok bool, errno int) {
- r0, _, e1 := syscall.Syscall(procDestroyWindow, 1, uintptr(hwnd), 0, 0)
- ok = bool(r0 != 0)
- if !ok {
+func DestroyWindow(hwnd uint32) (errno int) {
+ r1, _, e1 := syscall.Syscall(procDestroyWindow, 1, uintptr(hwnd), 0, 0)
+ if int(r1) == 0 {
if e1 != 0 {
errno = int(e1)
} else {
@@ -99,16 +98,15 @@ func PostQuitMessage(exitcode int32) {
return
}
-func ShowWindow(hwnd uint32, cmdshow int32) (ok bool) {
+func ShowWindow(hwnd uint32, cmdshow int32) (wasvisible bool) {
r0, _, _ := syscall.Syscall(procShowWindow, 2, uintptr(hwnd), uintptr(cmdshow), 0)
- ok = bool(r0 != 0)
+ wasvisible = bool(r0 != 0)
return
}
-func UpdateWindow(hwnd uint32) (ok bool, errno int) {
- r0, _, e1 := syscall.Syscall(procUpdateWindow, 1, uintptr(hwnd), 0, 0)
- ok = bool(r0 != 0)
- if !ok {
+func UpdateWindow(hwnd uint32) (errno int) {
+ r1, _, e1 := syscall.Syscall(procUpdateWindow, 1, uintptr(hwnd), 0, 0)
+ if int(r1) == 0 {
if e1 != 0 {
errno = int(e1)
} else {
@@ -135,9 +133,9 @@ func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32)
return
}
-func TranslateMessage(msg *Msg) (ok bool) {
+func TranslateMessage(msg *Msg) (done bool) {
r0, _, _ := syscall.Syscall(procTranslateMessage, 1, uintptr(unsafe.Pointer(msg)), 0, 0)
- ok = bool(r0 != 0)
+ done = bool(r0 != 0)
return
}
@@ -198,10 +196,9 @@ func SendMessage(hwnd uint32, msg uint32, wparam int32, lparam int32) (lresult i
return
}
-func PostMessage(hwnd uint32, msg uint32, wparam int32, lparam int32) (ok bool, errno int) {
- r0, _, e1 := syscall.Syscall6(procPostMessageW, 4, uintptr(hwnd), uintptr(msg), uintptr(wparam), uintptr(lparam), 0, 0)
- ok = bool(r0 != 0)
- if !ok {
+func PostMessage(hwnd uint32, msg uint32, wparam int32, lparam int32) (errno int) {
+ r1, _, e1 := syscall.Syscall6(procPostMessageW, 4, uintptr(hwnd), uintptr(msg), uintptr(wparam), uintptr(lparam), 0, 0)
+ if int(r1) == 0 {
if e1 != 0 {
errno = int(e1)
} else {