Revision 932a86a1
Added by david.sorber over 1 year ago
| src/backend/imgui_impl_sdl2.h | ||
|---|---|---|
|
// Implemented features:
|
||
|
// [X] Platform: Clipboard support.
|
||
|
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
|
||
|
// [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 SDL_SCANCODE_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
|
||
|
// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
|
||
|
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
|
||
|
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
|
||
|
// [X] Platform: Basic IME support. App needs to call 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");' before SDL_CreateWindow()!.
|
||
| ... | ... | |
|
|
||
|
struct SDL_Window;
|
||
|
struct SDL_Renderer;
|
||
|
struct _SDL_GameController;
|
||
|
typedef union SDL_Event SDL_Event;
|
||
|
|
||
|
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
|
||
|
IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context);
|
||
|
IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window);
|
||
|
IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window);
|
||
| ... | ... | |
|
IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame();
|
||
|
IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);
|
||
|
|
||
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||
|
static inline void ImGui_ImplSDL2_NewFrame(SDL_Window*) { ImGui_ImplSDL2_NewFrame(); } // 1.84: removed unnecessary parameter
|
||
|
#endif
|
||
|
// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this.
|
||
|
// When using manual mode, caller is responsible for opening/closing gamepad.
|
||
|
enum ImGui_ImplSDL2_GamepadMode { ImGui_ImplSDL2_GamepadMode_AutoFirst, ImGui_ImplSDL2_GamepadMode_AutoAll, ImGui_ImplSDL2_GamepadMode_Manual };
|
||
|
IMGUI_IMPL_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array = NULL, int manual_gamepads_count = -1);
|
||
|
|
||
|
#endif // #ifndef IMGUI_DISABLE
|
||
Update Dear ImGui to v1.91.5.