-
Notifications
You must be signed in to change notification settings - Fork 2
/
messages_and_message_queues.go
153 lines (128 loc) · 5.44 KB
/
messages_and_message_queues.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
package winapi
import (
"unsafe"
)
// https://msdn.microsoft.com/en-us/library/ms644932.aspx
func BroadcastSystemMessage(dwFlags uintptr, lpdwRecipients *uintptr, uiMessage uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procBroadcastSystemMessage.Call(dwFlags, uintptr(unsafe.Pointer(lpdwRecipients)), uiMessage, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644933.aspx
func BroadcastSystemMessageEx(dwFlags uintptr, lpdwRecipients *uintptr, uiMessage uintptr, wParam uintptr, lParam uintptr, pBSMInfo *BSMINFO) (uintptr, error) {
r1, _, err := procBroadcastSystemMessageEx.Call(dwFlags, uintptr(unsafe.Pointer(lpdwRecipients)), uiMessage, wParam, lParam, uintptr(unsafe.Pointer(pBSMInfo)))
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644934.aspx
func DispatchMessage(lpMsg *MSG) (uintptr, error) {
r1, _, err := procDispatchMessage.Call(uintptr(unsafe.Pointer(lpMsg)))
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644935.aspx
func GetInputState() (uintptr, error) {
r1, _, err := procGetInputState.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644936.aspx
func GetMessage(lpMsg *MSG, hWnd uintptr, wMsgFilterMin uintptr, wMsgFilterMax uintptr) (uintptr, error) {
r1, _, err := procGetMessage.Call(uintptr(unsafe.Pointer(lpMsg)), hWnd, wMsgFilterMin, wMsgFilterMax)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644937.aspx
func GetMessageExtraInfo() (uintptr, error) {
r1, _, err := procGetMessageExtraInfo.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644938.aspx
func GetMessagePos() (uintptr, error) {
r1, _, err := procGetMessagePos.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644939.aspx
func GetGetMessageTime() (uintptr, error) {
r1, _, err := procGetMessageTime.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644940.aspx
func GetQueueStatus(flags uintptr) (uintptr, error) {
r1, _, err := procGetQueueStatus.Call(flags)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644941.aspx
func InSendMessage() (uintptr, error) {
r1, _, err := procInSendMessage.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644942.aspx
func InSendMessageEx() (uintptr, error) {
r1, _, err := procInSendMessageEx.Call()
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644943.aspx
func PeekMessage(lpMsg *MSG, hWnd uintptr, wMsgFilterMin uintptr, wMsgFilterMax uintptr, wRemoveMsg uintptr) (uintptr, error) {
r1, _, err := procPeekMessage.Call(uintptr(unsafe.Pointer(lpMsg)), hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644944.aspx
func PostMessage(hWnd uintptr, Msg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procPostMessage.Call(hWnd, Msg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644945.aspx
func PostQuitMessage(nExitCode int32) (uintptr, error) {
r1, _, err := procPostQuitMessage.Call(int32ToUintptr(nExitCode))
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644946.aspx
func PostThreadMessage(idThread uintptr, Msg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procPostThreadMessage.Call(idThread, Msg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644947.aspx
func RegisterWindowMessage(lpString string) (uintptr, error) {
_lpString, err := stringToUintptr(lpString)
if err != nil {
return 0, err
}
r1, _, err := procRegisterWindowMessage.Call(_lpString)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644948.aspx
func ReplyMessage(lResult uintptr) (uintptr, error) {
r1, _, err := procReplyMessage.Call(lResult)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644950.aspx
func SendMessage(hWnd uintptr, Msg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procSendMessage.Call(hWnd, Msg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644951.aspx
func SendMessageCallback(hWnd uintptr, Msg uintptr, wParam uintptr, lParam uintptr, lpCallback uintptr, dwData uintptr) (uintptr, error) {
r1, _, err := procSendMessageCallback.Call(hWnd, Msg, wParam, lParam, lpCallback, dwData)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644952.aspx
func SendMessageTimeout(hWnd uintptr, Msg uintptr, wParam uintptr, lParam uintptr, fuFlags uintptr, uTimeout uintptr, lpdwResult *uintptr) (uintptr, error) {
r1, _, err := procSendMessageTimeout.Call(hWnd, Msg, wParam, lParam, fuFlags, uTimeout, uintptr(unsafe.Pointer(lpdwResult)))
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644953.aspx
func SendNotifyMessage(hWnd uintptr, Msg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procSendNotifyMessage.Call(hWnd, Msg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644954.aspx
func SetMessageExtraInfo(lParam uintptr) (uintptr, error) {
r1, _, err := procSetMessageExtraInfo.Call(lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644955.aspx
func TranslateMessage(lpMsg *MSG) (uintptr, error) {
r1, _, err := procTranslateMessage.Call(uintptr(unsafe.Pointer(lpMsg)))
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644956.aspx
func WaitMessage() (uintptr, error) {
r1, _, err := procWaitMessage.Call()
return r1, err
}