Commit Graph

528 Commits

Author SHA1 Message Date
Elias Naur 44c7be6750 cmd/gio: expand usage document
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 22:48:00 +01:00
Elias Naur 470478e574 cmd/gio: replace errorf with a main function returning errors
While we're here, split the usage print out to its own function and
don't display the usage when a package is missing.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 21:44:21 +01:00
Elias Naur 32a348b1ab go.*: drop -replace for gioui.org/ui
As pointed out by Daniel Martí, the replace line is convenient for
development but results in build differences depending on whether
you're inside or outside the gioui.org/apps module.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 19:00:32 +01:00
Elias Naur c3f30188a5 all: delete unused variables
Found by Daniel Martí.

Fixes gio#24

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 18:25:37 +01:00
Elias Naur 7780cf1353 cmd/gio: use path.Base for Go import paths
Go import paths always use forward slashes as separators.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 17:44:51 +01:00
Elias Naur 6433cb2d88 cmd/gio: change all occurences of *appID with the buildInfo field
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-24 17:44:14 +01:00
Elias Naur b34389ac2c apps/gophers: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-22 17:19:04 +02:00
Elias Naur a6483a421f ui/gesture: replace Click.Events with Click.Next
Everything else was converted to use the Next
style event API, but Click was forgotten.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-22 17:16:06 +02:00
Elias Naur 9520a9278f ui/app/internal/gpu: set the default material to black
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-22 11:25:11 +02:00
Elias Naur c427597fde apps: update go latest gioui.org/ui version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-21 15:01:24 +02:00
Elias Naur 6a7e38eb32 ui/app: go fmt
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-21 14:59:35 +02:00
Elias Naur bff8b64e5a ui/app: replace WindowOptions with WindowOption
Thanks to Larry Clapp for noticing the opportunity for improvement.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-21 10:31:16 +02:00
Elias Naur e140f2a1c0 ui/app: (iOS) check for first responder status before changing focus
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 17:30:19 +02:00
Elias Naur ac6f0c3f18 ui/app: (iOS) move memory pressure callback to view controller
With multiple GioViewControllers we might invoke the garbage collector
more than once, but in return we simplify the GioAppDelegate which will
become the interface to native widgets.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 16:50:35 +02:00
Elias Naur e6a68db4c0 ui/app: (iOS) resize window when the software keyboard is shown
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 16:48:00 +02:00
Elias Naur 46ecbb86d2 ui/app: remove unused method
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 12:57:35 +02:00
Elias Naur 9c9656e729 ui/app: fix indent
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 12:51:13 +02:00
Elias Naur d2132fce3b ui/app: remove debug line
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 11:14:48 +02:00
Elias Naur 1f918c751e cmd/gio: use package name for iOS binaries
To make it easier to locate the app in the Console app.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 11:10:59 +02:00
Elias Naur 4b3b8fa413 ui/app: (iOS) move UIWindow notifications to GioView
Simplifies GioAppDelegate and allows for proper deregistering of
listener.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-20 09:04:00 +02:00
Elias Naur 3099e7474f README.md: fix link
Thanks to Antonio D'souza for noticing.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-18 21:25:13 +02:00
Elias Naur c52376065e cmd/gio: list available bundle ids when no match was found
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-16 14:24:58 +02:00
Elias Naur 9d9051d468 cmd/gio: provide DT* fields in iOS Info.plists
Required by App Store.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-16 13:50:55 +02:00
Elias Naur 6007a8c90e cmd/gio: specify CFBundleSupportedPlatforms in iOS ipa bundles
Required by App Store.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-16 12:53:09 +02:00
Elias Naur c4e46e0348 cmd/gio: add support for iOS App Store icons
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-16 12:32:53 +02:00
Elias Naur 50599bc65d cmd/gio: support app icons
If there is an appicon.png file in the main package the gio tool
will use it for Android and iOS apps in buildmode exe.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-16 12:08:44 +02:00
Elias Naur c578043970 cmd/gio: handle subdirectories in apk files
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-15 17:50:56 +02:00
Elias Naur 2440e1880e cmd/gio: specify UISupportedInterfaceOrientations
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-15 09:43:31 +02:00
Elias Naur b10175b233 cmd/gio: add -version flag
For Android and iOS.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 17:09:44 +02:00
Elias Naur 105d094030 cmd/gio: drop appDir function
It's not worth its weight.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 17:02:36 +02:00
Elias Naur 632e4e3ae6 cmd/gio: specify UIDeviceFamily
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 16:52:58 +02:00
Elias Naur ed0bbe9dd2 cmd/gio: filter out unsupported architectures, specify MinimumOSVersion
For the App Store.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 16:43:44 +02:00
Elias Naur 5ac1b6ea3c cmd/gio: set DTPlatformName, DTPlatformVersion, UIRequiredDeviceCapabilities
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 14:59:27 +02:00
Elias Naur 564f30ca0f cmd/gio: use the package name for app directories inside ipa files
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 14:24:51 +02:00
Elias Naur 2a07890086 cmd/gio: add provisioning file to ipa apps
Required by App Store.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 12:49:50 +02:00
Elias Naur 74295d5b77 ui/go.*: update golang.org/x/sys
In particular to get the ptrace fix for iOS from

https://go-review.googlesource.com/c/sys/+/182317

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 10:53:20 +02:00
Elias Naur bf99199287 apps/go.mod: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-14 10:43:44 +02:00
Larry Clapp 56926a0449 ui/app: fix init() appending '' to os.Args
init() says

  args := strings.Split(extraArgs, "|")
  os.Args = append(os.Args, args...)

strings.Split says

  If s does not contain sep and sep is not empty, Split returns a slice
  of length 1 whose only element is s.

which means init() adds a blank arg to the end of os.Args when extraArgs
is empty.  This fixes that.

Signed-off-by: Larry Clapp <larry@theclapp.org>
2019-08-14 10:35:08 +02:00
Elias Naur 7c197cc666 ui/app: support EGL versions >= 2.0
Versions with major > 1 don't exists, but let's handle the version
correctly in any case.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-12 00:29:18 +02:00
Elias Naur 5605919555 ui/app: (windows) don't fail eglChooseConfig just because no configs were found
The resulting eglGetError will return a confusing EGL_SUCCESS.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-12 00:05:57 +02:00
Elias Naur 8c121374b1 apps/hello: fix build
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 23:57:04 +02:00
Elias Naur 3c69c81401 cmd/gio: add package documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 20:03:39 +02:00
Elias Naur a296903c76 ui: documentation fixes
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:50:03 +02:00
Elias Naur c4c75d42ef ui/f32: add space between licence header and package documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:43:20 +02:00
Elias Naur 6deb8f007d ui/widget: add package documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:41:28 +02:00
Elias Naur 2bcac7dfbe ui/text: document Editor
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:39:35 +02:00
Elias Naur 842d29373f ui: documentation tweaks
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:36:46 +02:00
Elias Naur 2f9ac5aebb ui/text: rename Center Alignment to Middle and drop IsNewline
Middle matches the similar layout.Middle constant, and IsNewline is
too simple to export.

Add documentation while we're here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:25:50 +02:00
Elias Naur 628a97cd71 ui/measure: document and export Face
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 19:14:53 +02:00
Elias Naur 5c3dcc6f9a ui/gesture: typo
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-08-11 18:57:12 +02:00