Commit Graph

65 Commits

Author SHA1 Message Date
Hajime Hoshi
8ab047853e internal/glfw: Bug fix: build failure with GOOS=js
Updates #1672
2021-06-13 23:00:40 +09:00
Hajime Hoshi
7371f2fe61 internal/glfw: Clean up the code
Updates #1672
2021-06-13 22:49:05 +09:00
Hajime Hoshi
2ce104de0d internal/glfw: Bug fix: NewCallbackCDecl objects were leaked
Callbacks created by NewCallbackCDecl were never released and then
they are leaked, especially when the window size was changed by
SetWindowSize on Windows.

This change defines new callback ID types with uintptr, and reuse
the callbacks.

Closes #1672
2021-06-13 22:32:53 +09:00
Hajime Hoshi
61c0908b13 internal/glfw: Refactoring 2021-04-18 03:33:01 +09:00
Hajime Hoshi
f62576d88d internal/glfw: Add tools.go to keep go.sum 2021-04-17 20:24:39 +09:00
Hajime Hoshi
855edcd2ff internal/glfw: Update Dockerfile and regenerate DLLs 2021-04-17 20:11:10 +09:00
Hajime Hoshi
99b2b5c1ee internal/glfw: Bug fix: compile error on Windows
Updates #1385
2021-04-17 04:24:19 +09:00
Hajime Hoshi
9b6ba5ed2c ebiten: Add {Set,}WindowSizeLimits
Closes #1385
2021-04-17 03:58:06 +09:00
Hajime Hoshi
d00d0c8556 ebiten: Add CursorShape/SetCursorShape/CursorShapeType
This change adds APIs to enable to use system cursor shapes other
than the default shape (an arrow).

This change doesn't add these cursors since they seem a little
different on macOS from the other platforms.

 * GLFW_HRESIZE_CURSOR
 * GLFW_VRESIZE_CURSOR

Closes #995
2021-04-16 01:09:19 +09:00
Hajime Hoshi
052947d7b7 internal/glfw: Update GLFW to 3.3.3 for Windows
Closes #1523
2021-03-09 02:19:34 +09:00
Hajime Hoshi
d913e66cd9 Revert "uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically"
This reverts commit 61bf10e73e.

Reason: This prevents the app from iconifying when toggling apps.

Updates #1405
Closes #1504
2021-02-23 20:13:21 +09:00
Hajime Hoshi
18d526c2d3 internal/uidriver/glfw: Bug fix: Crash when returning from fullscreen
ForceUpdate was called unexpectedly inside Update. This caused the
race condition.

Closes #1505
2021-02-23 16:52:12 +09:00
Hajime Hoshi
b9907c03fa glfw: Create a DLL file atomically by renaming the file
Fixes #1393
2020-11-02 22:55:08 +09:00
Hajime Hoshi
5b8370298a glfw: Use os.UserConfigDir for GLFW DLL instead of temporary directories
As of this change, Ebiten requries Go 1.13 due to os.UserConfigDir.

Fixes #1393
2020-11-01 17:51:44 +09:00
Hajime Hoshi
61bf10e73e uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically
Fixes #1405
2020-10-27 03:14:55 +09:00
Hajime Hoshi
dc288d37f8 Bug fix: Compile error for Wasm 2020-10-07 02:23:45 +09:00
Hajime Hoshi
ee4ebaaa95 Clean up the 'js' build tags
Updates #1129
2020-10-07 02:07:03 +09:00
Hajime Hoshi
51f06139a6 uidriver/glfw: Bug fix: Treat X scale (HiDPI) correctly
Fixes #1350
2020-09-19 01:24:18 +09:00
Hajime Hoshi
760225df75 glfw: Replace the pointer size calc with bits.UintSize / 8
Updates #1306
2020-09-04 01:18:42 +09:00
Hajime Hoshi
ee15e06c50 glfw: Remove some suspicious codes depending on the memory layout 2020-09-04 01:10:39 +09:00
Hajime Hoshi
a3b41515a9 ui: Replace the native window's type (unsafe.Pointer) with uintptr
Updates #1306
2020-09-04 00:51:48 +09:00
Hajime Hoshi
77fa0cb9ef ui: Add SetInitFocused
Fixes #769
2020-08-23 02:19:09 +09:00
Hajime Hoshi
7307a148f5 glfw: Use Dockerfile for ease to generate the embedding files for Windows
As MinGW version is specified, the result should be more deterministic.

Fixes #1201
2020-08-14 01:34:58 +09:00
Hajime Hoshi
d73472f4f2 Use the library style of file2byteslice 2020-08-14 00:50:09 +09:00
Hajime Hoshi
3eaa7dd0e1 uidriver/glfw: Set No-API when creating a hidden window first
GLFW tries to create an OpenGL context by default when creating a
window. This is not necessary when OpenGL is not used. This is an
optimization by skipping to create an OpenGL context if possible.
2020-07-05 15:01:06 +09:00
Hajime Hoshi
7ac6b0bfa3 Update dependencies 2020-03-31 03:32:38 +09:00
Hajime Hoshi
63caca720b ui: Bug fix: Compile error on Windows 2020-03-21 22:16:23 +09:00
Hajime Hoshi
f317f3b5fd ui: Add fuctions to maximize or minimize the window
This change adds these functions:

  * MaximizeWindow
  * IsWindowMaximized
  * MinimizeWIndow
  * IsWindowMinimized
  * RestoreWindow

Fixes #994
2020-03-21 22:13:58 +09:00
Hajime Hoshi
4ef3b3e804 ui: Add SetWindowFloating / IsWindowFloating
Fixes #880
2020-03-20 22:16:27 +09:00
Hajime Hoshi
c166fe8eea Update GLFW to v3.3.2
Fixes #1086
2020-02-23 03:10:38 +09:00
Hajime Hoshi
099ce1b3b4 Revert "ui: Add SetInitFocused"
This reverts commit bb04fc8a29.

Reason: glfw.Focused / glfw.FocusOnShow did not work

Updates #769
2020-02-10 01:10:40 +09:00
Hajime Hoshi
bb04fc8a29 ui: Add SetInitFocused
Updates #769
2020-02-09 23:45:59 +09:00
Jake Bentvelzen
c17946bb82 ui: Add GamepadGUID and GamepadName functions (#1035)
Fixes #1034
2020-01-09 22:11:32 +09:00
Zachary Burkett
ed19d6fae9 Add cursor capture functionality (#1016)
Fixes #1016
2019-12-14 12:30:03 +09:00
Hajime Hoshi
0ec447e0d0 ui: Add SetScreenTransparent / IsScreenTransparent
Fixes #1001
2019-12-01 03:31:32 +09:00
Hajime Hoshi
e0d780b029 uidriver/glfw: Enable to call SetWindowDecorated after Run
Fixes #556
2019-11-26 11:46:18 +09:00
Hajime Hoshi
995ba3afcf glfw: Update GLFW 3.3 2019-11-26 11:21:07 +09:00
Hajime Hoshi
a040aae83b glfw: Update to GLFW 3.3
Fixes #1000
2019-11-26 01:19:20 +09:00
Hajime Hoshi
51951d6087 glfw: Take a byte pointer instead of a uintptr at the callback
Make 'go vet' happy on Windows.
2019-06-27 22:57:44 +09:00
Hajime Hoshi
9a0cefedce glfw: Bug fix: Missed to initialize a member of VidMode on Windows 2019-06-27 03:38:14 +09:00
Hajime Hoshi
a19bf4214b Improve testability on Wasm 2019-06-14 23:59:38 +09:00
Hajime Hoshi
da671a6d8c glfw: Better way to get C files 2019-05-20 03:48:58 +09:00
Hajime Hoshi
289fb77d20 glfw: Sort C files in alphabetical order 2019-05-20 03:48:49 +09:00
Hajime Hoshi
d4a522d9da glfw: Bug fix: Do not pass Go's int pointer
Go's int can be 64bit or 32bit, while C's int is always 32bit on
Windows in Ebiten usage. For C's int argument, do not pass Go's
int pointer or broken values are set.

Related to #829
2019-02-24 23:10:18 +09:00
Hajime Hoshi
28665cfc4b glfw: Bug fix: Compilation error on Windows 2019-01-09 10:34:54 +09:00
Hajime Hoshi
ae84e79d16 ui: Add IsWindowResizable and SetWindowResizable (again)
Fixes #320
2019-01-09 00:24:16 +09:00
Hajime Hoshi
0d4e903b7a Revert "ui: Add IsWindowResizable and SetWindowResizable"
This reverts commit f403e0716f.

Reason: Compilation error on browsers
2019-01-09 00:12:57 +09:00
Hajime Hoshi
f403e0716f ui: Add IsWindowResizable and SetWindowResizable
Fixes #320
2019-01-08 23:52:53 +09:00
Hajime Hoshi
947fbe0a2e glwf: Implement SetIcon 2018-12-31 15:49:45 +09:00
Hajime Hoshi
efc7225ee1 glfw: Skip error check at proc call 2018-12-31 15:48:37 +09:00