mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/window: don't use C.BOOL
Apparently, darwin/arm64 cgo doesn't match the types of YES and BOOL: os_macos.go:235:40: cannot use _Ciconst_YES (type untyped int) as type _Ctype__Bool Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -230,9 +230,9 @@ func gio_onDraw(view C.CFTypeRef) {
|
||||
}
|
||||
|
||||
//export gio_onFocus
|
||||
func gio_onFocus(view C.CFTypeRef, focus C.BOOL) {
|
||||
func gio_onFocus(view C.CFTypeRef, focus C.int) {
|
||||
w := mustView(view)
|
||||
w.w.Event(key.FocusEvent{Focus: focus == C.YES})
|
||||
w.w.Event(key.FocusEvent{Focus: focus == 1})
|
||||
w.SetCursor(w.cursor)
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
}
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification {
|
||||
NSWindow *window = (NSWindow *)[notification object];
|
||||
gio_onFocus((__bridge CFTypeRef)window.contentView, YES);
|
||||
gio_onFocus((__bridge CFTypeRef)window.contentView, 1);
|
||||
}
|
||||
- (void)windowDidResignKey:(NSNotification *)notification {
|
||||
NSWindow *window = (NSWindow *)[notification object];
|
||||
gio_onFocus((__bridge CFTypeRef)window.contentView, NO);
|
||||
gio_onFocus((__bridge CFTypeRef)window.contentView, 0);
|
||||
}
|
||||
- (void)windowWillClose:(NSNotification *)notification {
|
||||
NSWindow *window = (NSWindow *)[notification object];
|
||||
|
||||
Reference in New Issue
Block a user