Elias Naur
9e0e4af8c6
ui/app,ui/key: move TextInputState from key to internal package
...
Clients have no need for the TextInputState type.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-21 13:12:24 +02:00
Elias Naur
c7eb9be9f3
ui/key,ui/pointer: replace Key types with input.Key
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 14:53:45 +02:00
Elias Naur
31418eefbe
ui/key: rename TextInputClosed to TextInputClose
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-07 15:52:09 +02:00
Elias Naur
0b6dd4efd9
ui: change events to have "Event" suffixed, not prefixed
...
Match the Go error naming convention (FooError).
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:14:16 +02:00
Elias Naur
7aa7bb3be4
ui: rename ops to have Op suffixed, not prefixed
...
Match Go's FooError name pattern.
While we're here, rename RedrawOp to InvalidateOp.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:01:45 +02:00
Elias Naur
474b1e8e17
ui/key: add Modifiers.Contain
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 21:10:01 +02:00
Elias Naur
e24f19ecba
ui/key,ui/app: introduce ModShift modifier
...
And add desktop implementations.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 20:20:57 +02:00
Elias Naur
a35118d522
ui: add package input for merged input
...
To avoid passing a queue type for each kind of input (pointer, key),
introduce package input for mapping a handler key to all input events.
Future input sources can be added without changes to programs, and
as an added bonus, event ordering is preserved across input sources.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-08 10:58:57 +02:00
Elias Naur
955fe1bc77
ui: make the reference list argument to Ops.Write variadic
...
Makes the code nicer.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-03 15:22:11 +02:00
Elias Naur
0d2cffe196
ui: let OpsReader keep track of references
...
Instead of exposing the entire reference slice, return the relevant
references from Next.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-02 19:17:53 +02:00
Elias Naur
20f55a4ad7
all: delete the ui.Op type
...
It's no longer used.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-27 22:27:50 +02:00
Elias Naur
252e058766
all: serialize ops
...
Pros:
- Much less per-frame garbage
- Allow future preprocessing of ops while building it
- Much fewer interface calls and pointer chasing
- Allow future serialization of ops for remote rendering
Cons:
- Slightly clumsier API
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-27 22:19:34 +02:00
Elias Naur
0f05231c35
all: initial import
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-03-31 10:47:22 +02:00