Skip to content

Releases: pongasoft/emscripten-glfw

Version 3.4.0.20240907

07 Sep 17:00
Compare
Choose a tag to compare
  • Fixed Meta/Super key workaround to also handle the rare (but possible) use-case of having other keys down before
    pressing the Meta/Super key

Version 3.4.0.20240817

18 Aug 14:24
Compare
Choose a tag to compare
  • Major clipboard changes: the clipboard now uses the browser events to handle cut, copy and paste
  • Added a way to tweak the timeouts for the Super + Key workaround (Super is also known as Meta or Cmd)
  • Added a way to set which keys are allowed to be handled by the browser
  • Added a convenient API to open a URL (emscripten::glfw3::OpenURL)
  • Added a convenient API to detect if the runtime platform is Apple (emscripten::glfw3::IsRuntimePlatformApple),
    mostly used for keyboard shortcuts (Ctrl vs. Cmd).
  • Added GLFW/emscripten_glfw3_version.h with EMSCRIPTEN_GLFW_VERSION define for compilation time version detection
  • EMSCRIPTEN_USE_PORT_CONTRIB_GLFW3 port define now also contains the version

Warning

Breaking changes!
The clipboard async API has been removed. Check the Clipboard support section for details on how to deal with the clipboard in your application.

Version 3.4.0.20240804

04 Aug 21:52
Compare
Choose a tag to compare
  • Fixed nullptr issue when clipboard is emtpy
  • Fixed the internal clipboard being wiped on asynchronous callback error

Version 3.4.0.20240731

31 Jul 13:03
Compare
Choose a tag to compare
  • Added emscripten_glfw_get_clipboard_string the C version of emscripten::glfw3::GetClipboardString to
    retrieve the clipboard asynchronously
  • Added a helper class emscripten::glfw3::FutureClipboardString to greatly simplify the more frequent use-cases
  • GetClipboardString::value() now returns the internal clipboard in case of error, instead of throwing exception
  • Added optimizationLevel option to the emscripten port

Version 3.4.0.20240727

27 Jul 18:42
Compare
Choose a tag to compare
  • Introduced C++ API (namespace emscripten::glfw3) included with GLFW3/emscripten_glfw3.h:
    • provides a more correct API with sensible defaults (ex: std::string_view / std::optional<std::string_view>
      vs char const * which may or may not be nullptr)
    • allow for C++ only API (ex: std::future)
    • the C API is still available if you would rather stick to it
  • Implemented emscripten::glfw3::GetClipboardString (C++ only) which provides a way of fetching the global
    clipboard in a browser environment (glfwGetClipboardString is not the right API due to the asynchronous nature
    of the underlying platform API).
  • The cursor position is no longer clamped to the window size, and as a result, can have negative values or values
    greater than the window size.
    Note that GLFW implements a similar behavior on the macOS desktop platform.
  • Implemented glfwSetWindowPosCallback
  • Added support for GLFW Window Attribute GLFW_HOVERED
  • Fixed #6: emscripten_glfw_make_canvas_resizable does not clean up properly.
  • Fixed an issue with opacity: when using opacity, the handle is not working unless its z-index is higher than the
    canvas z-index

Version 3.4.0.20240627

27 Jun 18:26
Compare
Choose a tag to compare
  • Fixed internal implementation to use EM_BOOL (PR #5)

Version 3.4.0.20240625

25 Jun 16:36
Compare
Choose a tag to compare
  • Implemented workaround for #4: Using Super + "Key" on macOS results in "Key" not being released.
    Due to the broken state of javascript handling the Super/Meta key, there is no good solution. The workaround implemented, releases all keys when Super is released. Although not a perfect solution, it guarantees that the state is eventually consistent:
    • if "Key" was released while "Super" was held, then when "Super" gets released, "Key" is released (later than when actually released, final state is consistent: "Key" in Release state)
    • if "Key" is still held when "Super" is released, "Key" is released when "Super" gets released, but immediately gets a down event (Up/Down event, final state is consistent": "Key" in Pressed state)

Version 3.4.0.20240617

17 Jun 12:53
Compare
Choose a tag to compare
  • Fixed #3: glfwGetKey must return one of GLFW_PRESS or GLFW_RELEASE

Version 3.4.0.20240616

16 Jun 18:17
Compare
Choose a tag to compare
  • Implemented glfwGetClipboardString. Note that due to the async (and restrictive) nature of the
    navigator.clipboard.readText call, this synchronous API returns whatever was set via a previous call
    to glfwSetClipboardString and ignores the external clipboard entirely.

Version 3.4.0.20240601

01 Jun 11:49
Compare
Choose a tag to compare
  • Fixed #2: Dynamically changing HiDPI awareness does not trigger content callback