IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell, added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS. (#7660)

This commit is contained in:
ocornut
2024-07-02 15:36:08 +02:00
parent 0250dc903e
commit 8f36798035
4 changed files with 49 additions and 3 deletions
+6 -1
View File
@@ -28,7 +28,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.91.0 WIP"
#define IMGUI_VERSION_NUM 19091
#define IMGUI_VERSION_NUM 19092
#define IMGUI_HAS_TABLE
/*
@@ -2240,6 +2240,11 @@ struct ImGuiIO
void (*SetClipboardTextFn)(void* user_data, const char* text);
void* ClipboardUserData;
// Optional: Open link/folder/file in OS Shell
// (default to use ShellExecuteA() on Windows, system() on Linux/Mac)
void (*PlatformOpenInShellFn)(ImGuiContext* ctx, const char* path);
void* PlatformOpenInShellUserData;
// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows)
// (default to use native imm32 api on Windows)
void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data);