Elias Naur
73b1e64209
ui/input: change Queue to return Events one at a time
...
By returning all events, widgets that might return early from its
event loop might throw away subsequent events. Instead of requiring
those widgets to store the event list, convert input.Queue to step
through the available events one at a time.
Functional revert of 1735d5ced8 .
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-08-01 18:56:49 +02:00
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
3f7735ccdf
ui/app/internal/input: redraw if focus events was added
...
The key queue might generate focus events. Schedule a redraw if so.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-21 12:50:53 +02:00
Elias Naur
d9d8df989d
ui/app: rename Window.Redraw to Invalidate to match ui.InvalidateOp
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-18 18:45:46 +02:00
Elias Naur
46cee54dd6
io/app/internal/input: go fmt
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 20:47:29 +02:00
Elias Naur
2296393471
ui/system: move package ui/input/system
...
Just like the pointer and key packages.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 15:54:41 +02:00
Elias Naur
86533ae683
ui/input/system: introduce package for system events
...
And add ProfileOp and ProfileEvent for registering and receiving
profile data.
Remove the Profiling field and Timings method from app.Window.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 15:31:29 +02:00
Elias Naur
032e9a380e
ui/app,ui/internal/input: move InvalidateOp summary to Router
...
In preparation for extracting more op types in Router.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 15:11:20 +02:00
Elias Naur
ba18817400
ui/app/internal/input: add tracking up updates to handlerEvents
...
In preparation for only redrawing when new events are available.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 14:34:24 +02:00
Elias Naur
cbdda4e9c5
ui/input: move Router and input queues to internal package
...
Now that only app.Window needs the Router, make it unavailable for
clients.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-12 13:51:00 +02:00