Move initializePlatform(), initializeGLFW(), and the monitor callback
registration from UserInterface.init() (called at package init time)
to initOnMainThread() (called only when RunGame() is invoked).
This prevents go test from hanging for packages that transitively
import Ebitengine, since GLFW initialization requires a display and
blocks in headless environments.
Also move initializeWindowPositionIfNeeded logic into initOnMainThread
since it depends on the monitor being available, which requires GLFW.
The window size and position-set flag are now passed through RunOptions.
Closes#3430
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Also, this change fixes redundant checks the case when a monitor
does not exist. Now Ebitengine checks a monitor existence at the
initialization.
Closes#2145Closes#2795
This allows a new state to disallow resizing the window but allow
making the window fullscreen on macOS by a user.
This change adds the new type WindowResizingModeType. There are
these constants of this type:
* WindowResizingModeDisabled
* WindowResizingModeOnlyFullscreenEnabled
* WindowResizingModeEnabled
Closes#1819
Unfortunately, it is almost impossible to provide a consistent behavior
to keep the aspect ratio of the window on Windows. Instead of having an
incomplete API, let's remove this.
Closes#1988
IsWindowBeingClosed reports whether the window is being closed by
the user.
SetWindowClosingHandled sets whether the window closing is handled
or not. If the state is true, the window is not closed immediately
by the user and the game can handle the closing state. In this case,
the Update function should return an error in order to end the game.
This change also adds examples/windowclosing.
Closes#1574
On Windows, the window could be maximized even when the window was
not resizable. This behavior is confusing. Forbid it so that the
behavior will be clearer.
This change changes the behavior of WindowPosition /
SetWindowPosition. The window position is now a relative position
and the origin position is the left-upper of the current monitor.
Fixes#1115