Commit graph

14 commits

Author SHA1 Message Date
WerWolv fdf9209605 build: Updated ImGui to v1.90.6 2024-05-08 22:56:20 +02:00
WerWolv b2edb0441a build: Make external plugins build again 2024-02-24 15:06:10 +01:00
Sten Feldman d70f7422b7
feat: Support Copy/Paste on WASM build outside the application border (#1542)
### Problem description
WASM build does not support copy/paste beyond the application. Meaning,
there's no practical way of sending text back and forth across the
application border.

There are lengthy threads why this is a technical challenge in
WASM/Browser world, e.g:
- https://github.com/pthom/hello_imgui/issues/3
- https://github.com/emscripten-core/emscripten/pull/19510

### Implementation description
Implements a workaround solution as Header only C++ library, as proposed
and implemented at:
https://github.com/Armchair-Software/emscripten-browser-clipboard

Maybe there are cleaner ways of achieving the functionality. Definitely
would like to have some discussion around this. 👀

ℹ️ The proposed PR "works for me" on Windows, using CTRL-C/V shortcuts
to copy text from and to the application. On MacOS the system shortcut
to Paste is different from what ImHex has defined. This results in
system Paste shortcut of command-V triggering the browser callback to
synchronise the application clipboard, but no actual Paste takes place
within ImHex.

If there would be a clean way to trigger the paste command, that would
be wonderful (or get the context and references to write the data to the
cursor, but I was unable to find a clean solution). The only proposed
solutions in the referenced threads were about triggering paste event
internally via Key events. This seemed wonky 🙃 , so is not currently
implemented. At the moment the paste on MacOS is command+V followed by
control+V.

### Additional things
This is definitely a stopgap solution before the ImGui and Emscripten
take a more proper solution in enabling Copy/Paste outside the
application borders. However, I feel like this is a must have capability
to make the WASM build more useful, not just for trying out ImHex.

Cheers! 🍻

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-02-13 20:30:18 +01:00
WerWolv 5d405b4d10 build: Updated GLFW and OpenGL3 ImGui Backends 2024-02-11 11:44:44 +01:00
WerWolv 76e304c34e build: Fix various issues with linking, clang and unity builds 2024-01-29 22:57:39 +01:00
Nik 6ae86ce906
build: Get rid of pkgconfig as much as possible (#1517) 2024-01-26 12:13:22 +01:00
Nik 84bfd10416
build: Restructured entire custom plugin system (#1469) 2023-12-22 23:39:38 +01:00
WerWolv e84b8cb96d build: Fix glfw linking 2023-12-21 16:02:28 +01:00
WerWolv 86231d0154 build: Release build on Windows trying to link to glfw3dll for some reason 2023-12-21 13:57:25 +01:00
WerWolv fc23efdb25 impr: Move OpenGL loaders into header to avoid issues in the future 2023-11-20 23:58:49 +01:00
WerWolv ffbf409174 build: Fix emscripten build 2023-11-20 22:15:16 +01:00
WerWolv 8b3c297514 build: Fix building on macOS M1 2023-11-20 21:47:23 +01:00
WerWolv 7b25d97ea2 build: Make sure that ImGui libraries have access to dependencies 2023-11-19 14:55:50 +01:00
WerWolv 60b640d9f5 build: Restructure ImGui dependencies, added Readmes and licenses 2023-11-19 11:59:25 +01:00