Elias Naur
7ad60e0878
ui/app: print sRGB flag for eglCreateWindowSurface failure
...
For gio#35
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-02 15:17:29 +02:00
Elias Naur
52dd762405
ui/app: (wayland) define WL_EGL_PLATFORM=1 to force EGL in Wayland mode
...
Including wayland-egl.h will also set WL_EGL_PLATFORM, but generic
egl code in egl_linux.go cannot do that.
For gio#35
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-02 15:13:36 +02:00
Elias Naur
dc62058bce
ui/app: (wayland) ensure DestroyEvent is the last event
...
A ToplevelClose event could end in the same batch of events as
another event, which will result in the other event being sent
after a DestroyEvent. Window assumes no event will arrive after
DestroyEvent, so ensure that property for the Wayland backend.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-01 14:33:33 +02:00
Elias Naur
5766a8d226
ui/layout: avoid accumulating rounding errors from Flexible
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-30 21:15:18 +02:00
Elias Naur
12089ea62a
all: rename layout.Dimens to layout.Dimensions
...
Dimens is only 4 characters shorter and not worth the abbreviation.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-30 15:00:17 +02:00
Elias Naur
110da804a0
ui/app: (wayland) expand comments for double server roundtrip
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-30 13:38:58 +02:00
Kenshi Kamata
ea2ee1abcc
ui/app: fix example code in document
...
Signed-off-by: Kenshi Kamata <kenshi.kamata@gmail.com >
2019-08-29 17:49:27 +02:00
Elias Naur
069bb0e7cd
ui/app: merge goString implementations and add test
...
Fixes gio#30
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-26 21:19:58 +01:00
Elias Naur
7d47fe0fc9
ui/internal/ops: go fmt
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-26 20:35:16 +01:00
Elias Naur
8700a8ffc3
ui/key,ui/pointer: rename HandlerOp to InputOp
...
"Input" is more specific and reads better than "handler".
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-26 18:07:48 +01:00
Elias Naur
a112a580a7
ui/app(internal/gpu: remove unused parameters
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-25 23:58:19 +01:00
Daniel Martí
2542c55e9d
all: fix some issues spotted by static analysis
...
First, vet was upset by two incorrect fmt verbs. One was an extra %x,
when there was just one argument, so remove it. Another was a %p with a
non-pointer. It's a struct, so for now simply use %#v.
Second, staticcheck found some unused or unnecessary bits of code;
remove the obvious ones.
Finally, staticcheck also complained about some error strings which were
capitalized or had periods. Adjust those, which also makes all error
messages more consistent.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc >
2019-08-25 22:41:05 +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
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
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
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
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
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
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
Elias Naur
e2ab54a896
ui/f32: document
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 18:55:38 +02:00
Elias Naur
b25af47c45
ui/paint: expand documentation and add package description
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 18:39:46 +02:00
Elias Naur
40091c5918
ui/gesture: add Scroll.State method
...
And move Click.State to a method.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 18:18:27 +02:00
Elias Naur
5d28f9e690
ui/gesture: add documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 18:02:48 +02:00
Elias Naur
9cc6757da9
ui/pointer: expand documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 16:46:03 +02:00
Elias Naur
1a9e03bf68
ui/key: expand documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 13:09:55 +02:00
Elias Naur
340fff9814
ui/key: rename ChordEvent to just Event
...
Event is like pointer.Event and we don't want the stuttering of
key.KeyEvent.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 12:50:40 +02:00
Elias Naur
2a41ff9a59
ui/key: expand documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 12:41:24 +02:00
Elias Naur
b68c9c23c8
ui/input: expand package documentation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-11 12:31:39 +02:00
Elias Naur
e3ae277841
ui/layout: add List example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-10 18:54:18 +02:00
Elias Naur
b3e8f5953e
ui/layout: add Stack example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-10 18:46:18 +02:00
Elias Naur
44d16d04e9
ui/layout: add Flex example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-10 18:41:01 +02:00
Elias Naur
94f2752885
ui/layout: add Align example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-10 18:28:19 +02:00
Elias Naur
4ce8f4ea51
ui/layout: add Inset example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-10 18:18:18 +02:00