mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
8611894b4bb36629b1255ee30989d38438274fe9
app.Window implements a method for safely running functions against the underlying native window through the driverFuncs channel. However, the functions still run in a different goroutine than the one driving the native event loop, which forces the implementations in package wm to do complicated synchronization. A previous change added a mechanism to run functions in the native event loop thread. The macOS port needed this functionality, but with some care it can be generalized. That's what this change does through the new Run method. The advantage is that the thread switch dance is now confined to app.Window, with the help of a generic wm.Driver.Wakeup method. All other Driver methods can then assume they run on their event loop threads. Run is exported because it is also needed for programs that use Windows configured with CustomRenderer to control their own rendering. Signed-off-by: Elias Naur <mail@eliasnaur.com>
Gio - https://gioui.org
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD, OpenBSD, Windows, and WebAssembly (experimental).
Installation, examples, documentation
Go to gioui.org.
Issues
File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.
Contributing
Post discussion to the mailing list and patches to gio-patches. No Sourcehut account is required and you can post without being subscribed.
See the contribution guide for more details.
An official GitHub mirror is available.
Description
Languages
Go
89.6%
C
7%
Java
1.7%
Objective-C
1.6%