mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
8c9466e03e
Building an iOS results in errors about missing NSCursor: $ gogio -target ios -o app.app ./kitchen gogio: go build -ldflags=-s -w -X gioui.org/app/internal/log.appID=org.gioui.kitchen -buildmode=c-archive -o /var/folders/_7/lnt35k555hl2bs7fjygkhgx00000gp/T/gogio-770783182/gio-amd64 -tags ./kitchen failed: # gioui.org/app/internal/window os_darwin.m:26:10: error: use of undeclared identifier 'NSCursor' os_darwin.m:32:10: error: use of undeclared identifier 'NSCursor' os_darwin.m:40:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:43:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:46:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:49:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:52:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:55:14: error: use of undeclared identifier 'NSCursor' os_darwin.m:58:14: error: use of undeclared identifier 'NSCursor' NSCursor is supported under mac catalyst; disable NSCursor support while figuring out how. Signed-off-by: Elias Naur <mail@eliasnaur.com>
23 lines
548 B
Objective-C
23 lines
548 B
Objective-C
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
@import Dispatch;
|
|
@import Foundation;
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
void gio_wakeupMainThread(void) {
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
gio_dispatchMainFuncs();
|
|
});
|
|
}
|
|
|
|
NSUInteger gio_nsstringLength(CFTypeRef cstr) {
|
|
NSString *str = (__bridge NSString *)cstr;
|
|
return [str length];
|
|
}
|
|
|
|
void gio_nsstringGetCharacters(CFTypeRef cstr, unichar *chars, NSUInteger loc, NSUInteger length) {
|
|
NSString *str = (__bridge NSString *)cstr;
|
|
[str getCharacters:chars range:NSMakeRange(loc, length)];
|
|
}
|