mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
app: added windows.TRUE for Windows
Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
@@ -229,7 +229,7 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
|
|||||||
case windows.WM_UNICHAR:
|
case windows.WM_UNICHAR:
|
||||||
if wParam == windows.UNICODE_NOCHAR {
|
if wParam == windows.UNICODE_NOCHAR {
|
||||||
// Tell the system that we accept WM_UNICHAR messages.
|
// Tell the system that we accept WM_UNICHAR messages.
|
||||||
return 1
|
return windows.TRUE
|
||||||
}
|
}
|
||||||
fallthrough
|
fallthrough
|
||||||
case windows.WM_CHAR:
|
case windows.WM_CHAR:
|
||||||
@@ -237,13 +237,13 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
|
|||||||
w.w.Event(key.EditEvent{Text: string(r)})
|
w.w.Event(key.EditEvent{Text: string(r)})
|
||||||
}
|
}
|
||||||
// The message is processed.
|
// The message is processed.
|
||||||
return 1
|
return windows.TRUE
|
||||||
case windows.WM_DPICHANGED:
|
case windows.WM_DPICHANGED:
|
||||||
// Let Windows know we're prepared for runtime DPI changes.
|
// Let Windows know we're prepared for runtime DPI changes.
|
||||||
return 1
|
return windows.TRUE
|
||||||
case windows.WM_ERASEBKGND:
|
case windows.WM_ERASEBKGND:
|
||||||
// Avoid flickering between GPU content and background color.
|
// Avoid flickering between GPU content and background color.
|
||||||
return 1
|
return windows.TRUE
|
||||||
case windows.WM_KEYDOWN, windows.WM_KEYUP, windows.WM_SYSKEYDOWN, windows.WM_SYSKEYUP:
|
case windows.WM_KEYDOWN, windows.WM_KEYUP, windows.WM_SYSKEYDOWN, windows.WM_SYSKEYUP:
|
||||||
if n, ok := convertKeyCode(wParam); ok {
|
if n, ok := convertKeyCode(wParam); ok {
|
||||||
e := key.Event{
|
e := key.Event{
|
||||||
@@ -321,7 +321,7 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
|
|||||||
case _WM_CURSOR:
|
case _WM_CURSOR:
|
||||||
if w.cursorIn {
|
if w.cursorIn {
|
||||||
windows.SetCursor(w.cursor)
|
windows.SetCursor(w.cursor)
|
||||||
return 1
|
return windows.TRUE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ type MinMaxInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
TRUE = 1
|
||||||
|
|
||||||
CS_HREDRAW = 0x0002
|
CS_HREDRAW = 0x0002
|
||||||
CS_VREDRAW = 0x0001
|
CS_VREDRAW = 0x0001
|
||||||
CS_OWNDC = 0x0020
|
CS_OWNDC = 0x0020
|
||||||
|
|||||||
Reference in New Issue
Block a user