1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-09-23 19:18:34 +02:00
Commit Graph

90 Commits

Author SHA1 Message Date
ocornut
cfae5ac71b Backends: make ImGui_ImplSDL2_KeyEventToImGuiKey(), ImGui_ImplSDL3_KeyEventToImGuiKey(), ImGui_ImplGlfw_KeyToImGuiKey(), ImGui_ImplWin32_KeyEventToImGuiKey(), ImGui_ImplAllegro5_KeyCodeToImGuiKey(), ImGui_ImplOSX_KeyCodeToImGuiKey(), non-static. (#7997)
Backends: Win32: Refactor ImGui_ImplWin32_KeyEventToImGuiKey() logic.
Ref #7672
2024-09-19 14:10:00 +02:00
Yan Pujante
6dcb7be35f CI: amend build tests for emscripten (#7965)
+ Backends: GLFW: minor preemptive fix.
2024-09-12 20:23:01 +02:00
Yan Pujante
ac2ad79812 Backends: GLFW+Emscripten: use OSX behaviors automatically when using contrib glfw port. (#7965, #7915) 2024-09-12 19:50:50 +02:00
Yan Pujante
30dcdcbe73 Backends: GLFW: Emscripten: use OpenURL() when available and using EMSCRIPTEN_USE_PORT_CONTRIB_GLFW3. Fixes popup blocked in some browsers. (#7915, #7660) 2024-09-03 19:32:00 +02:00
ocornut
d15da2c47d Backends: GLFW: undo accidentally not committing use of Platform_SetClipboardTextFn as I was testing the legacy path (amend 214977e). 2024-08-22 20:27:50 +02:00
ocornut
214977e5fd IO: (BREAKING) moved io.GetClipboardTextFn, io.SetClipboardTextFn to platform_io.Platform_GetClipboardTextFn, platform_io.Platform_SetClipboardTextFn. 2024-08-22 20:12:23 +02:00
ocornut
ba2f4a2cd5 IO: (BREAKING) moved GetIO().PlatformOpenInShellFn to GetPlatformIO(.Platform_OpenInShellFn. (#7660) 2024-08-22 20:11:36 +02:00
ocornut
8e40104795 Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString(). 2024-08-22 18:13:34 +02:00
ocornut
71ee2ce367 Examples: GLFW: rework examples main loop to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper.
2024-07-31 17:33:24 +02:00
ocornut
a8e96ae21a Backends: GLFW+Emscripten: Fixed build (#7647) 2024-07-08 22:26:14 +02:00
Yan Pujante
2937339c17 Backends: GLFW+Emscripten: Added support for GLFW3 contrib port. (#7647) 2024-07-08 22:06:24 +02:00
Yan Pujante
6816789a6b Backends: GLFW+Emscripten: (Breaking) Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to ImGui_ImplGlfw_InstallEmscriptenCallbacks(), added GLFWwindow* parameter. (#7647, #7600)
+ Fixed Emscripten warning when using mouse wheel on some setups.
2024-07-08 22:02:48 +02:00
ocornut
0ebf49b4c1 IO: amend PlatformOpenInShellFn specs to return a bool. (#7660)
Amend 8f36798
2024-07-02 19:03:40 +02:00
ocornut
380b3559c6 Backends: GLFW,SDL2: Added ioPlatformOpenInShellFn handler for web/Emscripten versions. (#7660) 2024-07-02 18:06:19 +02:00
ocornut
32f9dfc126 Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from docking branch for use by backends. 2024-06-26 14:32:48 +02:00
ocornut
5e23680454 Backends: all backends + demo now call IMGUI_CHECKVERSION() to verify ABI compatibility between caller code and compiled version of dear imgui. (#7568) 2024-05-13 15:07:13 +02:00
ocornut
d15574ce2a Backends: Win32: Removed silent return when calling ImGui_ImplWin32_WndProcHandler() with no active context! (#6275)
Better standardized similar checks in other backends.
2024-05-07 16:53:03 +02:00
Lukas Lipp
a60387a3c2
Backends: GLFW: Add define guards for glfw native defines. (#7536) 2024-04-29 19:24:17 +02:00
ocornut
1509842107 Backends: OpenGL3: Shallow tweak of compile-time extensions detection.
Detect polygon mode using same method as others (not define/symbol).
IMGUI_IMPL_OPENGL_MAY_HAVE_EXTENSIONS -> IMGUI_IMPL_OPENGL_HAS_EXTENSIONS
2024-01-24 15:21:46 +01:00
kida22
240ab5890b Backends: GLFW, Input: Use Unicode version of WndProc for get correct input for text in utf-8 code page. (#7174)
Similar to #6785, #6782, #5725, #5961 for for GLFW backend.
2023-12-29 18:21:21 +01:00
ocornut
3cb805489b Backends: GLFW, Emscripten: fixes for canvas resizing, amends. (#6751)
Amend 22a7d24
2023-12-19 16:09:44 +01:00
Pello Rao
22a7d241ff Backends: GLFW, Emscripten: fixes for canvas resizing. (#6751) 2023-12-19 15:56:31 +01:00
ocornut
b0758c86d8 Backends: Added support for extra ImGuiKey values: F13 to F24 function keys. (#6891, #4921) 2023-10-05 20:39:49 +02:00
ocornut
357f752bed Docs: add more links to the top of every examples and backends files. 2023-09-11 14:01:40 +02:00
Deal
56a7b8b724 Backends: GLFW: Clear emscripten's MouseWheel callback before shutdown. (#6790, #6096, #4019) 2023-09-06 11:49:23 +02:00
scorpion-26
e5977f05d8 Backends: GLFW: revert support for GLFW_CURSOR_DISABLED, let user use ImGuiConfigFlags_NoMouse. (#5625, #6609) 2023-07-18 11:49:43 +02:00
ocornut
33e13c85e1 Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601) 2023-07-13 11:27:52 +02:00
ocornut
884e3fd21f Backends: GLFW: Accept glfwGetTime() not returning a monotonically increasing value. (#6491, #6189, #6114) 2023-06-12 11:58:17 +02:00
Gereon V
055e71518e Backends: clear bits set in io.BackendFlags on backend Shutdown(). Clear BackendPlatformName. (#6334, #6335)
Amended with fix for missing clear for ImGuiBackendFlags_HasGamepad.
2023-04-17 14:57:12 +02:00
Michael Martz
506f7e0074 Using nullptr in locations where warning disable is not convenient. (#6313, #4537) 2023-04-11 11:33:50 +02:00
ocornut
f070497cbd Backends: Win32/SDL2/SDL3/GLFW: Added support for io.AddMouseSourceEvent(). (#2334, #2702)
SDL doesn't distinguish Pen yet, but we don't need it as much as TouchScreen which will alter trickling.
2023-04-04 20:19:01 +02:00
Aiekick
91577c7f51 Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) 2023-03-16 11:59:45 +01:00
ocornut
e39c2552ac Backends: GLFW: Avoid using glfwGetError() and glfwGetGamepadState() on Emscripten. (#6240) 2023-03-14 16:00:29 +01:00
ocornut
85395b76b0 CI: Update versions.
Backends: GLFW: Warning fix under Linux.
2023-02-07 20:17:18 +01:00
ocornut
e816bc6723 Merge misc changes from docking branch to reduce small drift.
In particular:
- imgui.cpp : move UpdateInputEvents() higher in NewFrame() to match docking + update RenderMouseCursor() to match.
- imgui_draw.cpp: ImDrawList::_ResetForNewFrame() change from c807192ab
- Backends: SDL2. Add MouseWindowID + change SDL_CaptureMouse() test to match docking branch. Not strictly necessary but aimed at reducing drift because we go on and fork this file.
+ moved responsability of checking valid names to TabBarGetTabName() to simplify both branches.
2023-02-07 13:22:23 +01:00
ocornut
a085581057 Backends: GLFW: added ImGui_ImplGlfw_SetCallbacksChainForAllWindows(). (#6142) 2023-02-03 17:53:53 +01:00
ocornut
d0b1aaa076 Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
Namely, GLFW JS emulation seems to quantize values to a min of -1/+1 which breaks modern OSX/Windows emulating smoothness with stepping wheels (slow steps are sending sub-1.0 values)
+ Massage changelog.
2023-02-03 15:05:39 +01:00
ocornut
1f1861dae6 Backends: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling + scaling for Emscripten. (#4019, #6096)
+ Missing changelog entries.
2023-02-02 19:18:58 +01:00
ocornut
624c057ae1 Backends: GLFW: revert flipping mouse-wheel axis for Emscripten. (#4019)
Latest version seems ok.
2023-02-02 18:09:20 +01:00
ocornut
0370856d78 Backends: GLFW: Removed mouse-wheel value scaling for Emscripten. (#4019, #6096, #6081) 2023-02-02 15:27:14 +01:00
ocornut
3617a96372 Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. (#4019, #6096, #1463)
Documented assumptions.
2023-02-01 21:29:08 +01:00
ocornut
1f6e62a4ae Backends: GLFW: Fixed mods state on Linux with Alt-GR text input (e.g. German keyboard layout), (#6034)
Amend 07557674, 1ad8ad62
Ref maybe https://github.com/glfw/glfw/issues/1630
2023-01-04 15:43:41 +01:00
ocornut
16476f99fd Backends: GLFW: cancel out errors emitted by glfwGetKeyName() when a name is missing. (#5908) 2022-11-22 18:08:25 +01:00
ocornut
ab6e48b833 Backends: GLFW: Perform a dummy glfwGetError() read to cancel missing mouse cursors errors. (#5785) 2022-10-18 12:21:31 +02:00
ocornut
c54230d14e Backends: Using nullptr instead of NULL. (#5760, #4537) + fix additional warnings. 2022-10-11 12:35:41 +02:00
ocornut
fd408c9790 Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (#4921, #456)
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
scorpion-26
5867a43dc8 Backends: GLFW: Honor GLFW_CURSOR_DISABLED by not setting mouse position. (#5625) 2022-09-01 20:50:08 +02:00
ocornut
e99c4fc668 Nav: fixes keyboard/gamepad nav actions running without the corresponding config flags (#5504). Fixes 8b8a61b. #4921, #4858, #787, #1599, #323)
NavUpdate() can now clears ImGuiInputSource_None.
2022-07-25 17:19:45 +02:00
ocornut
90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (#2625, #4921, #3724)
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
cpichard
709bc03d6f Backends: GLFW: fixed ImGui_ImplGlfw_TranslateUntranslatedKey() for lower case letters on OSX (#5260, #5261) 2022-04-30 15:34:40 +02:00