forked from Green-Sky/tomato
Green Sky
1dccce8097
070c046cd1f Internals: rename recently added TreeNodeIsOpen() -> TreeNodeGetOpen(). (#7553, #1131, #2958, #2079, #722) 7c6d4ff28de TreeNode: Internals: facilitate dissociating item ID from storage ID (useful for 1861) 8bab3eab6a8 Clipper: added SeekCursorForItem() function, for use when using ImGuiListClipper::Begin(INT_MAX). (#1311) 74a1854db9a Nav, Demo: comments. 669021be4cd Style: close button and collapse/window-menu button hover highlight made rectangular instead of round. 67e9aa4d3df Demo: Property Editor: add basic filter. 4247f190c23 Demo: Property Editor: rearrange code + replace use of bool to proper ImGuiChildFlags. 9c1f922b02b Fixed pvs-studio warning. 0e4dcfa5529 Obsoleted PushTabStop()/PopTabStop() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_NoTabStop. 3de75138d1c (Breaking) Renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups. (#1379, #1468, #2200, #4936, #5216, #7302, #7573) 0de88a928d7 Added ImGuiItemFlags_AutoClosePopups as a replacement for internal's ImGuiItemFlags_SelectableDontClosePopup. (#1379, #1468, #2200, #4936, #5216, #7302, #7573) b4ca869c407 (Breaking) Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_ButtonRepeat. 7e0800e7186 Added PushItemFlag(), PopItemFlag(), ImGuiItemFlags. 46691d172ec Demo: Reworked "Property Editor" demo in a manner that more ressemble the tree data and struct description data that a real application would want to use. bc9e5b62b6b Added ImGuiDataType_Bool for convenience. ac7d6fb5ca0 Internals: Added TreeNodeIsOpen() to facilitate discoverability. (#7553, #1131, #2958, #2079, #722) 9c2f6003e4f Backends: SDL3: fixed typo leading to PlatformHandleRaw not being set leading to SHOWNA path not working for multi-viewports. df3a74389e8 Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) 126569ad5b3 Fix definition check (#7793) c3c90b49e03 Examples: SDL3+OpenGL: Update for API changes: SDL_GL_DeleteContext() renamed to SDL_GL_DestroyContext(). a8e96ae21a4 Backends: GLFW+Emscripten: Fixed build (#7647) 2937339c175 Backends: GLFW+Emscripten: Added support for GLFW3 contrib port. (#7647) 6816789a6b0 Backends: GLFW+Emscripten: (Breaking) Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to ImGui_ImplGlfw_InstallEmscriptenCallbacks(), added GLFWwindow* parameter. (#7647, #7600) 9504068f66c Backends: Win32: fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN (#7768, #4858, #2622) 6b6026b1332 DemosFix typo in help text in demo Tables/Borders (#7780) 1ec1f7a3de2 Fixed Unix version of PlatformOpenInShellFn_DefaultImpl. (#7772, #7660) 2d0baaabe62 TreeNode: rename/rework ImGuiNavTreeNodeData system to be usable by more features. (#2920, #1131, #7553) 0a73c6ec3f6 Misc tweaks, comments. 0ebf49b4c1f IO: amend PlatformOpenInShellFn specs to return a bool. (#7660) 380b3559c6d Backends: GLFW,SDL2: Added ioPlatformOpenInShellFn handler for web/Emscripten versions. (#7660) 05a4f280596 Internals: added FontScale storage (amend 0f63d3e). 5496050f5f2 Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660) 0f63d3e9164 Internals: added FontScale storage. dadf9cd039b IO: disable default io.PlatformOpenInShellFn() implementation on iPhone, as compiler errors that system() is not available on iOS. 43925b9fa4c Build fix for non Windows platforms. ddd4c9d6b95 Commented out obsolete ImGuiModFlags and ImGuiModFlags_XXX values (renamed to ImGuiKeyChord and ImGuiMod_XXX in 1.89). (#4921, #456) fb799bba7fd (Breaking) IO, IME: renamed platform IME hook io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() and added explicit context. 8f367980357 IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell, added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS. (#7660) 0250dc903ef Demo: changed style editor inline block to its own window. ae708e3bcd7 Backends: SDL3: add default case to fix warnings. (#7763) 7e0b3b9caf8 Debug Log: Added "Configure Outputs.." button. (#5855) a62794359aa Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855) a489585f843 Backends: SDL3: Updated comments (IME seems fixed in SDL3). Added SDL3 examples to Visual Studio solution. 12f92518bc5 Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762) 84cc72f3720 Version 1.91.0 WIP cb16be3a3fc Version 1.90.9 c554c402d30 IO: do not claim io.WantCaptureMouse=true on the mouse release frame of a button which was pressed over void. (#1392) 50a0f18e6ae imgui_freetype: fixed divide by zero while handling FT_PIXEL_MODE_BGRA glyphs. (#7267, #3369) dd5c30d2d75 Disabled: Reworked 1.90.8 behavior of Begin() not inheriting current BeginDisabled() state. Only tooltip are clearing that state. (#211, #7640) 67216910fb0 Examples: SDL3: Remove use of SDL_HINT_IME_NATIVE_UI. ccf3ee674a0 Backends: SDL3: update for SDL_SetTextInputRect() -> SDL_SetTextInputArea() api change. (#7760, #7754) 751bbf38ba5 Backends: SDLRenderer3: Update for SDL_RenderGeometryRaw() API changes. f2c07ed7175 Backends: Allegro5: Correctly handle unstable bit in version checks (#7755) c47928ffc0f Checkbox: minor tidying up to simplify work on multi-select branch. 372eebbeb29 Fix typo, rename ImGuisliderFlags_WrapAround flag to ImGuiSliderFlags_WrapAround. (#7752, #7749) 0403096a9d3 Drags: added ImGuisliderFlags_WrapAround flag for DragInt(), DragFloat() etc. (#7749) c7df9c71214 Backends: Win32: Fixed warning with old MinGW/GCC versions. 404af570049 Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748) 0582f7678a4 Nav: store NavJustMovedToIsTabbing + shuffle a few nav related fields. 77d582fa37b Windows: BeginChild(): fixed a glitch when during a resize of a child window which is tightly close to the boundaries of its parent. (#7706) 953d40c929f Tables: moved TableGetHoveredColumn() to public API. (#7715, #3740) fbb903e1580 Inputs: fixed using Shortcut() or SetNextItemShortcut() within a disabled block bypassing the disabled state. (#7726) dbffb702f83 ImGuiStorage: tweak impl for BuildSortByKey(). 0c2650e8339 Backends: OSX: build fix. Amend 32f9dfc 22b36bef9e6 Examples: undo adding SDL3 example to Visual Studio sln. 7c2476986b5 Backends: SDL3: Update for SDL_StartTextInput()/SDL_StopTextInput() API changes. (#7735) 32f9dfc1261 Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from docking branch for use by backends. eb1cc4b8b4e Metrics/Debugger: Browsing a Storage perform hover lookup on identifier. a18fb406ace Backends: Vulkan: Remove Volk/ from volk.h #include directives (#7722, #6582, #4854) aab27130a61 Demo: Style Editor: clarify how _CalcCircleAutoSegmentCount() doesn't always get exact final segment count. (#7731) 48e7e7bfe85 Backends: SDL3: Follow SDL3 removal of keysym field in SDL_KeyboardEvent (#7729) 755bf2b8c2e (Breaking) Move ImGuiWindowFlags_NavFlattened to ImGuiChildFlags_NavFlattened. (#7687) 2c8cc58fd16 Internals: storing HoveredWindowBeforeClear for use by multi-context compositor drag and drop propagation. 7f20a4b0415 Nav: CTRL+Tab overlay display context name if any. e3971079cf5 IO: added ImGuiConfigFlags_NoKeyboard for consistency and convenience. (#4921) 8067d05f744 IO: added ClearInputMouse(). made ClearInputKeys() not clear mouse data. (#4921) 21581cf70ce Fixed build warning. 7e7c97ac5f9 Ignore .ini file with other suffixes. 77d9f80754e Drag and Drop: Added ImGuiDragDropFlags_PayloadNoCrossContext and ImGuiDragDropFlags_PayloadNoCrossProcess flags. 8c318dc7702 Drag and Drop: (Breaking) renamed ImGuiDragDropFlags_SourceAutoExpirePayload to ImGuiDragDropFlags_PayloadAutoExpire. (#1725, #143) 50709454b3f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern assume a mouse button being pressed. (#143) 413c056359b Drag and Drop: comments, debug log entries. 37c243bb35a Internals: added ImGuiContext::ContextName optionally used by debug log and to facilitate debugging. 8c517fee357 Drag and Drop: Fixes an issue when elapsing payload would be based on last payload frame instead of last drag source frame. 32a037c030f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern. (#143) 21bda2ed994 TabBar, Style: added ImGuiTabBarFlags_DrawSelectedOverline and ImGuiCol_TabSelectedOverline, ImGuiCol_TabDimmedSelectedOverline. 1b9593e8894 Style: (Breaking) renamed ImGuiCol_TabActive -> ImGuiCol_TabSelected, ImGuiCol_TabUnfocused -> ImGuiCol_TabDimmed, ImGuiCol_TabUnfocusedActive -> ImGuiCol_TabDimmedSelected. b902fa4c449 IO: do not disable io.ConfigWindowsResizeFromEdges when ImGuiBackendFlags_HasMouseCursors is not set by backend. 8caf7afbad6 Internals: made ImLowerBound() accessible in internals + take a span. + rearrange child/popup/tooltips section. 22d65c7949d Removed old nested structure: renaming ImGuiStorage::ImGuiStoragePair type to ImGuiStoragePair (simpler for many languages). 7538ca6f405 Examples: SDL+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671) a47bfb1b5b1 Examples: GLFW+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671) d46a0aa0693 Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consistency. 7260bb51cfc Version 1.90.9 WIP git-subtree-dir: external/imgui/imgui git-subtree-split: 070c046cd1fcbe694e3f19e2f5eaff9df0cb6357
60 lines
4.2 KiB
C
60 lines
4.2 KiB
C
// dear imgui: Platform Backend for GLFW
|
|
// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..)
|
|
// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
|
|
|
|
// Implemented features:
|
|
// [X] Platform: Clipboard support.
|
|
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen (Windows only).
|
|
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy GLFW_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
|
|
// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
|
|
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange' (note: the resizing cursors requires GLFW 3.4+).
|
|
|
|
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
|
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
|
|
// Learn about Dear ImGui:
|
|
// - FAQ https://dearimgui.com/faq
|
|
// - Getting Started https://dearimgui.com/getting-started
|
|
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
|
|
// - Introduction, links and more at the top of imgui.cpp
|
|
|
|
#pragma once
|
|
#include "imgui.h" // IMGUI_IMPL_API
|
|
#ifndef IMGUI_DISABLE
|
|
|
|
struct GLFWwindow;
|
|
struct GLFWmonitor;
|
|
|
|
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks);
|
|
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks);
|
|
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool install_callbacks);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
|
|
|
|
// Emscripten related initialization phase methods (call after ImGui_ImplGlfw_InitForOpenGL)
|
|
#ifdef __EMSCRIPTEN__
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow* window, const char* canvas_selector);
|
|
//static inline void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector) { ImGui_ImplGlfw_InstallEmscriptenCallbacks(nullptr, canvas_selector); } } // Renamed in 1.91.0
|
|
#endif
|
|
|
|
// GLFW callbacks install
|
|
// - When calling Init with 'install_callbacks=true': ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any.
|
|
// - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks.
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window);
|
|
|
|
// GFLW callbacks options:
|
|
// - Set 'chain_for_all_windows=true' to enable chaining callbacks for all windows (including secondary viewports created by backends or by user)
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_SetCallbacksChainForAllWindows(bool chain_for_all_windows);
|
|
|
|
// GLFW callbacks (individual callbacks to call yourself if you didn't install callbacks)
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused); // Since 1.84
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_CursorEnterCallback(GLFWwindow* window, int entered); // Since 1.84
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_CursorPosCallback(GLFWwindow* window, double x, double y); // Since 1.87
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
|
|
IMGUI_IMPL_API void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor* monitor, int event);
|
|
|
|
#endif // #ifndef IMGUI_DISABLE
|