Commit Graph

768 Commits

Author SHA1 Message Date
Elias Naur ddba67cc90 example: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-28 11:47:49 +01:00
Elias Naur 4a26bdad5d cmd/gogio: build for iOS/macOS without -fmodules and -fobjc-arc
The `gogio` tool adds the `-fmodules -fobjc-arc` flags to the Cgo
C flags. Unfortunately, that masks problems where Cgo packages
accidentally didn't have the flags in their #cgo directives such
as package log.

Move the flags so they're only explicitly mentioned when `gogio`
invokes the host compiler to build the `main.m` shim.

Fix package log to include the missing flags.

While we're here, silence OpenGL ES deprecation warnings on iOS, just
as we do for macOS. The warnings are normally not visible because
the gogio tool suppress output from the go tool.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-28 11:40:53 +01:00
Daniel Martí a0692d74af cmd/gogio: improve the UX of the e2e tests
First, add a headless boolean flag that defaults to true. That way, one
can run 'go test -headless=false' to, for example, see how Chrome runs
the webassembly endtoend test.

Second, skip the Chrome test if the browser isn't installed.

While at it, run 'gofmt -s' on the package.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2019-10-27 21:31:53 +01:00
Elias Naur 8fab2f8cb1 .builds: add automatic testing script
Add fedora.yml for testing on linux and windows.

Add android.yml for testing `gogio -target android`.

Add a build badge to the README.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-27 19:12:50 +01:00
Elias Naur f4c6ec4fbe README.md: add sr.ht related documentation from gioui.org
Use https for the Unlicense URL and add one for MIT as well.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-27 16:29:36 +01:00
Elias Naur 3de204b8ef cmd/gogio/testdata: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-27 15:42:18 +01:00
Elias Naur a8e5e7a788 example: update gio version (X11 support!)
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-27 15:12:15 +01:00
Denis Bernard 547ff2e484 app/internal/window: x11 driver
This driver still lacks fling support and dp/sp configuration.

By default, linux builds will try to use the Wayland driver then
fallback to X11 if it fails. Drivers can be disabled by using either the
nowayland or nox11 build tags.

Signed-off-by: Denis Bernard <db047h@gmail.com>
2019-10-27 15:06:53 +01:00
Elias Naur ec672ca06a README.md: remove documentation and link to gioui.org
There is now a real website on gioui.org. Use that for documentation.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-26 21:43:49 +02:00
Denis Bernard b78d144119 app/internal/window: add needVSync() to eglDriver interface
This enables calling eglSwapInterval with an interval value of 0 or 1
on a per driver basis.

Signed-off-by: Denis Bernard <db047h@gmail.com>
2019-10-26 15:45:03 +02:00
Elias Naur 2c75f52de6 example/go.*: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-26 11:38:33 +02:00
Elias Naur fff9293c9b app/internal/window: work around missing MESA_EGL_NO_X11_HEADERS support
Some versions of eglplatform.h don't support the MESA_EGL_NO_X11_HEADER
define for cross-platform definitions of the EGL types. Remove the
define and use an explicit cast instead.

Fixes gio#46

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-26 11:37:06 +02:00
Elias Naur 88adc0ee1a website: delete
The website is now in a separate repository.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-24 17:49:24 +02:00
Elias Naur c4ac40e609 layout: remove Format
Move Format to eliasnaur.com/giox/layout because it's not clear it
belongs in the Gio standard library.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-23 10:53:59 +02:00
Elias Naur 9a62468c25 example: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-23 10:21:08 +02:00
Elias Naur 143d2aae95 font/gofont: add explicit Register
Registering the font as a side effect of importing the gofont package
was too magic. Require an explicit Register call instead. As a side
effect, it is more clear which font is the default (the first one
registered).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-23 10:18:11 +02:00
Elias Naur 0504c27e46 widget/material: respect height minimum constraint in Button.Layout
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-23 09:56:34 +02:00
Elias Naur 2884604521 example/kitchen: clean up
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-22 08:42:59 +02:00
Elias Naur a35a2f5eb1 example/go.*: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-22 08:30:30 +02:00
Elias Naur 3a60a384e6 widget/material: respect min width in Button.Layout
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 12:58:05 +02:00
Elias Naur afcff9c8b5 layout: fix comment
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 10:38:58 +02:00
Elias Naur 72ed58e914 example/go.*: update Gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 09:37:49 +02:00
Elias Naur 86f45f813e widget/material: fix IconButton padding
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 09:34:26 +02:00
Elias Naur 78963bdaae widget/material: add and use Icon.Layout method
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 09:21:23 +02:00
Elias Naur dafb180176 layout: fix ambiguous parsing of stack and flex arguments
Fixed gio#44

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 01:04:31 +02:00
Elias Naur 79d505623a layout: parse empty names and let higher levels generate errors
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 01:04:31 +02:00
Elias Naur c07b520157 layout: rename formatState to formatter
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 01:04:31 +02:00
Elias Naur 32d51dd9e6 layout: fix spelling of "northeast"
Fixes gio#45

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-21 01:04:19 +02:00
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
Greg Pomerantz 175144fa99 cmd/gogio: Android: include jar files from package directory
Look for *.jar files in package directory for inclusion in
Android .apk file.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-10-18 16:45:43 +02:00
Elias Naur bf6741f2d6 widget/material: accept nil icon in IconButton.Layout
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 20:50:02 +02:00
Elias Naur 959da5e68f example/gophers: fix avatar image scaling
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 19:54:21 +02:00
Elias Naur 42d2c98455 app/internal/gpu: clip in floating point
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 15:30:37 +02:00
Elias Naur 0c75e7c605 app/internal/gpu: don't apply gamma linearization to alpha values
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 14:35:10 +02:00
Elias Naur 0d4cd822ef example: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 14:24:00 +02:00
Elias Naur 5c0f1ed954 layout: update tests
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 14:22:24 +02:00
Elias Naur b3c0eaac80 app/internal/window: fix Windows build
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 14:18:46 +02:00
Elias Naur 3ec0948bba widget/material: don't scale image when constrained
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 14:10:49 +02:00
Elias Naur 862061b363 layout: rename "exp" layout variants to "max"; add "min" variants
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-17 13:55:30 +02:00
Elias Naur 7835d6999f widget/material: don't use translucency for disabled icon buttons
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 21:11:16 +02:00
Elias Naur d7694ae95f layout: add "exp" format layout for expanding both constraints
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 20:51:20 +02:00
Elias Naur 759900902a layout: fix Flex baseline
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 20:35:24 +02:00
Elias Naur b1643e5e2a layout: skip Flex and Stack Layout when scanning format string
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 20:29:17 +02:00
Elias Naur f442512888 layout: more doc fixes for layout.Format
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 18:00:57 +02:00
Elias Naur 80b1af3024 layout: fix godoc.org rendering of layout.Format docs
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 17:59:04 +02:00
Elias Naur c76490956d layout: add support for layout format strings
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 17:44:13 +02:00
Elias Naur 30d0c986b6 example/gophers: correct baseline to be bottom-aligned
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 11:09:26 +02:00
Elias Naur 7f07933eb3 layout: unexport Context.Layout and make it a function
Layout wasn't used outside package layout, so let's not export it.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 11:08:52 +02:00
Elias Naur e2d0b3cfca layout: invert baseline to measure positive distance from bottom
With an inverted baseline, the zero value results in the widget
baseline aligned to its bottom.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 00:49:52 +02:00
Elias Naur 8e3d03f2c4 layout: correct Align baseline
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-16 00:49:52 +02:00