mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
ui/app: call main from Android and iOS
Android can only run c-shared libraries which means that every Gio program must create its window and event loop from an init function. The same applies to iOS but for a more benign reason: the gio tool builds programs in c-archive mode for iOS and links the binary with a Objective-C driver. Allow Gio programs to run off its main function by linking to and invoking main even from Android libraries and iOS ditto. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -252,6 +252,4 @@ func createWindow(win *Window, opts *WindowOptions) error {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
// iOS runs in c-archive mode, so this is never reached.
|
||||
panic("call to Main from outside main")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user