Commit Graph

6 Commits

Author SHA1 Message Date
Greg Pomerantz 5ef176af81 app: add Handle type and PlatformHandle()
On Android, allow access to JVM and Application context.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-10-18 20:16:17 +02:00
Elias Naur 10c1b2cb8d app,internal/window: extract native window code to separate package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 16:39:32 +02:00
Elias Naur 36d1cd90f2 app,io/system: extract system events to separate package
Package app is the only package that depends on native libraries and
Cgo. Minimize its API, thereby minimizing Gio clients' dependency on
it. In the future, a headless, testing or remote "Window" should be
very easy to replace app.Window.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 16:20:20 +02:00
Elias Naur a937a76534 app: rename UpdateEvent to FrameEvent and add Frame field
While "DrawEvent" was too specific (op.Ops contains non-draw events),
"Update" is too vague: it's a common word, and could be misunderstood
to mean update parts of a window, not replace it.

"FrameEvent" is more specific, and is the usual way to refer to immediate
mode drawing.

While we're here, unexport Window.Update and add a Frame function to
FrameEvent, to emphasize that updating the window frame is only
appropriate during the handling of a FrameEvent.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur 3784ece6dd all: rename package ui to unit
Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur 22cd88df9f all: rename the gioui.org/ui module to gioui.org
The "ui" is redundant and stutters.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 12:37:06 +02:00