Hajime Hoshi
83b2d4b112
input: driver.Key now distinguishes left/right modifier keys
...
This is a preparation for event package, that will have key enum.
Updates #926
2019-09-01 23:49:00 +09:00
Hajime Hoshi
42c70e48ff
uidriver/mobile: No need to use sync.Once
...
devicescale.At is already locked by a mutex and keeps values in its
cache.
2019-08-19 02:32:53 +09:00
Hajime Hoshi
2c23860226
uidriver/mobile: Prefer sync.Once to sync.Mutex
2019-08-19 02:25:01 +09:00
Hajime Hoshi
d7aa24c295
uidriver/glfw: Bug fix: Wrong usage of RWLock
2019-08-19 01:47:55 +09:00
Hajime Hoshi
4d0e23c460
uidriver/glfw: Reduce mutex to avoid potential deadlock
2019-08-19 01:01:43 +09:00
Hajime Hoshi
25ac788ee6
uidriver/mobile: Reduce mutex to avoid potential deadlock
2019-08-19 00:32:52 +09:00
Hajime Hoshi
6cd74a9f4d
uidriver/mobile: Simplify updating logic
2019-08-19 00:13:56 +09:00
Hajime Hoshi
f835c8ce7f
uidriver/mobile: Convert a panic to an error for handling
...
This is a dirty hack but there is no other way to handle panics to
report to Crashlytics.
2019-08-13 11:30:50 +09:00
Hajime Hoshi
df8fdc855a
Bug fix: Compile error on GOOS=linux CGO_ENABLED=0
2019-08-01 08:17:58 +09:00
Hajime Hoshi
2003b7d292
Fix misspellings
2019-08-01 01:07:23 +09:00
Hajime Hoshi
de915a1736
Move driver getters to graphicsdriver/uidriver packages
...
This enables to add internal functions to these packages so that
the driver selector logics can be modified.
2019-08-01 00:40:59 +09:00
Hajime Hoshi
4a9a7f936d
Make go vet a little happier on macOS
...
Updates #889
2019-07-22 20:16:22 +09:00
Hajime Hoshi
e6a88a7d1f
uidriver/glfw: Add panic in the case of Windows Remote Desktop
...
Updates #903
2019-07-21 23:41:55 +09:00
Hajime Hoshi
480c5527a3
ui/mobile: Move 'DoWork' logic to ui/mobile package
...
This simplifies driver.Graphics interface, and will make it easy
to use another graphics driver than OpenGL.
2019-06-27 00:32:37 +09:00
Hajime Hoshi
de4b439228
uidriver/glfw: Bug fix: Thread must be set before the loop starts
...
The graphics driver needs to have its thread before the loop
starts, or the driver crashes (nil reference) when it tries to use
the thread.
2019-06-24 02:03:14 +09:00
Hajime Hoshi
8dc2301e54
thread: Bug fix: Queue funcs instead of panic
...
Now the thread object is created at (*UserInterface).Run, we don't
have to care whether the (main) thread is started or not when
Call is called. Admit queueing the functions.
Fixes #884
2019-06-21 11:10:27 +09:00
Hajime Hoshi
fa377ce9d1
mobile: Refactoring
2019-06-08 01:57:13 +09:00
Hajime Hoshi
449679665b
thread: Use standard context.Context
2019-06-08 01:46:06 +09:00
Hajime Hoshi
1e93d9c699
graphicsdriver/opengl: Use context.Context when possible
2019-06-08 01:30:15 +09:00
Hajime Hoshi
85dcafe176
thread: Rename Run -> Call
2019-06-06 00:25:57 +09:00
Hajime Hoshi
15a5896efd
thread: Rename mainthread -> thread and add struct Thread
...
This enables thread available not only for the main thread but also
any threads.
This is a preparation for iOS Metal, that runs drawing functions on
a particular thread.
Updates #737
2019-06-06 00:25:53 +09:00
Hajime Hoshi
dbd5e25b89
uidriver/mobile: Bug fix: Error must be handled whenever possible
...
Updates #860
2019-06-01 03:12:04 +09:00
Hajime Hoshi
2dc6042858
uidriver/mobile: Remove time-out logic
...
This was introduced at 8121b2102f
.
I am not sure the reason.
As Render must sync with updating and never returns until updating
finishes, the time-out case should never be chosen.
2019-06-01 01:47:01 +09:00
Hajime Hoshi
13ce1c28b4
uidriver/mobile: Use timer.NewTimer instead of time.After
...
timer.NewTimer is much better than time.After in terms of memory
usage. See also https://golang.org/pkg/time/#After
2019-06-01 01:30:08 +09:00
Hajime Hoshi
ca907e2846
uidriver/mobile: Refactoring
2019-06-01 00:21:59 +09:00
Hajime Hoshi
10fb5e33be
Replace GopherWasm with syscall/js
...
Fixes #857
2019-05-01 17:28:00 +09:00
Hajime Hoshi
865523048d
uidriver/js: Bug fix: Touches were not updated correctly
...
Fixes #846
2019-04-15 03:01:02 +09:00
Hajime Hoshi
db689f4e50
driver: Remove UI.Loop and add UI.RunWithoutMainLoop
2019-04-09 21:55:59 -04:00
Hajime Hoshi
864c28e8d9
Revert "uidriver/glfw: Rename ui_unix.go -> ui_linbsd.go"
...
This reverts commit 794ccd6ade
.
2019-04-09 01:06:07 -04:00
Hajime Hoshi
794ccd6ade
uidriver/glfw: Rename ui_unix.go -> ui_linbsd.go
2019-04-09 00:39:20 -04:00
Hajime Hoshi
24fdcdd8e4
uidriver: Rename updateGraphics -> updateSize
2019-04-08 23:49:31 -04:00
Hajime Hoshi
f6367308fc
driver: Rename GraphicsContext -> UIContext
2019-04-08 23:28:08 -04:00
Hajime Hoshi
aecfd6b13d
uidriver: Remove dependency on hooks package
2019-04-08 23:13:44 -04:00
Hajime Hoshi
099c7bd5c9
driver: Remove Touch struct
2019-04-07 19:25:10 -04:00
Hajime Hoshi
08308a7edf
uidriver/mobile: Refactoring
2019-04-07 18:51:32 -04:00
Hajime Hoshi
0aa3135082
driver: Remove UI.AdjustPosition
2019-04-07 19:31:49 +09:00
Hajime Hoshi
26c32d36b5
uidriver: Move input implementation to uidrivers
2019-04-07 19:16:00 +09:00
Hajime Hoshi
a1697feeb1
driver: Add UI.Input()
2019-04-07 18:37:54 +09:00
Hajime Hoshi
7e5085f15b
Add uidriver package and move UI implementation to this packaage
2019-04-07 18:21:16 +09:00