returnImFloor(ImClamp(pos,visible_rect.Min,visible_rect.Max));// ImFloor() is important because non-integer mouse position application in back-end might be lossy and result in undesirable non-zero delta.
// - For 'int user_key_index' you can use your own indices/enums according to how your backend/engine stored them in io.KeysDown[].
// - For 'int user_key_index' you can use your own indices/enums according to how your back-end/engine stored them in io.KeysDown[].
// - We don't know the meaning of those value. You can use GetKeyIndex() to map a ImGuiKey_ value into the user index.
IMGUI_APIintGetKeyIndex(ImGuiKeyimgui_key);// map ImGuiKey_* values into user's key index. == io.KeyMap[key]
IMGUI_APIboolIsKeyDown(intuser_key_index);// is key being held. == io.KeysDown[user_key_index].
@ -2479,15 +2479,17 @@ struct ImGuiViewport
ImDrawData*DrawData;// The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to NewFrame().
ImGuiIDParentViewportId;// (Advanced) 0: no parent. Instruct the platform back-end to setup a parent/child relationship between platform windows.
void*RendererUserData;// void* to hold custom data structure for the renderer (e.g. swap chain, frame-buffers etc.). If somehow everything you need can fit in the void* PlatformHandle field you may ignore this.
void*PlatformUserData;// void* to hold custom data structure for the OS / platform (e.g. windowing info, render context). If somehow everything you need can fit in the void* PlatformHandle field you may ignore this.
// Our design separate the Renderer and Platform back-ends to facilitate combining default back-ends with each others.
// When our create your own back-end for a custom engine, it is possible that both Renderer and Platform will be handled by the same system and you may not need to use all the UserData/Handle fields.
void*RendererUserData;// void* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.).
void*PlatformUserData;// void* to hold custom data structure for the OS / platform (e.g. windowing info, render context).
void*PlatformHandle;// void* for FindViewportByPlatformHandle(). (e.g. suggested to use natural platform handle such as HWND, GLFWWindow*, SDL_Window*)
void*PlatformHandleRaw;// void* to hold low-level, platform-native window handle (e.g. the HWND) when using an abstraction layer like GLFW or SDL (where PlatformHandle would be a SDL_Window*)
boolPlatformRequestClose;// Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing ALT-F4)
void*PlatformHandleRaw;// void* to hold lower-level, platform-native window handle (e.g. the HWND) when using an abstraction layer like GLFW or SDL (where PlatformHandle would be a SDL_Window*)
boolPlatformRequestMove;// Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position)
boolPlatformRequestResize;// Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative size will be OS window size)
boolPlatformRequestClose;// Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing ALT-F4)