Macros | Functions | Variables
imgui_impl_sdl.cpp File Reference
#include "imgui.h"
#include "imgui_impl_sdl.h"
#include <SDL.h>
#include <SDL_syswm.h>
Include dependency graph for imgui_impl_sdl.cpp:

Go to the source code of this file.

Macros

#define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1)   { float vn = (float)(SDL_GameControllerGetAxis(game_controller, AXIS_NO) - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }
 
#define MAP_BUTTON(NAV_NO, BUTTON_NO)   { io.NavInputs[NAV_NO] = (SDL_GameControllerGetButton(game_controller, BUTTON_NO) != 0) ? 1.0f : 0.0f; }
 
#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE   SDL_VERSION_ATLEAST(2,0,4)
 
#define SDL_HAS_VULKAN   SDL_VERSION_ATLEAST(2,0,6)
 

Functions

static const char * ImGui_ImplSDL2_GetClipboardText (void *)
 
static bool ImGui_ImplSDL2_Init (SDL_Window *window)
 
bool ImGui_ImplSDL2_InitForD3D (SDL_Window *window)
 
bool ImGui_ImplSDL2_InitForMetal (SDL_Window *window)
 
bool ImGui_ImplSDL2_InitForOpenGL (SDL_Window *window, void *sdl_gl_context)
 
bool ImGui_ImplSDL2_InitForVulkan (SDL_Window *window)
 
void ImGui_ImplSDL2_NewFrame (SDL_Window *window)
 
bool ImGui_ImplSDL2_ProcessEvent (const SDL_Event *event)
 
static void ImGui_ImplSDL2_SetClipboardText (void *, const char *text)
 
void ImGui_ImplSDL2_Shutdown ()
 
static void ImGui_ImplSDL2_UpdateGamepads ()
 
static void ImGui_ImplSDL2_UpdateMouseCursor ()
 
static void ImGui_ImplSDL2_UpdateMousePosAndButtons ()
 

Variables

static char * g_ClipboardTextData = NULL
 
static bool g_MouseCanUseGlobalState = true
 
static SDL_Cursor * g_MouseCursors [ImGuiMouseCursor_COUNT] = {}
 
static bool g_MousePressed [3] = { false, false, false }
 
static Uint64 g_Time = 0
 
static SDL_Window * g_Window = NULL
 

Macro Definition Documentation

◆ MAP_ANALOG

#define MAP_ANALOG (   NAV_NO,
  AXIS_NO,
  V0,
  V1 
)    { float vn = (float)(SDL_GameControllerGetAxis(game_controller, AXIS_NO) - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }

◆ MAP_BUTTON

#define MAP_BUTTON (   NAV_NO,
  BUTTON_NO 
)    { io.NavInputs[NAV_NO] = (SDL_GameControllerGetButton(game_controller, BUTTON_NO) != 0) ? 1.0f : 0.0f; }

◆ SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE

#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE   SDL_VERSION_ATLEAST(2,0,4)

Definition at line 56 of file imgui_impl_sdl.cpp.

◆ SDL_HAS_VULKAN

#define SDL_HAS_VULKAN   SDL_VERSION_ATLEAST(2,0,6)

Definition at line 57 of file imgui_impl_sdl.cpp.

Function Documentation

◆ ImGui_ImplSDL2_GetClipboardText()

static const char* ImGui_ImplSDL2_GetClipboardText ( void )
static

Definition at line 67 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_Init()

static bool ImGui_ImplSDL2_Init ( SDL_Window *  window)
static

Definition at line 130 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_InitForD3D()

bool ImGui_ImplSDL2_InitForD3D ( SDL_Window *  window)

Definition at line 208 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_InitForMetal()

bool ImGui_ImplSDL2_InitForMetal ( SDL_Window *  window)

Definition at line 216 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_InitForOpenGL()

bool ImGui_ImplSDL2_InitForOpenGL ( SDL_Window *  window,
void sdl_gl_context 
)

Definition at line 194 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_InitForVulkan()

bool ImGui_ImplSDL2_InitForVulkan ( SDL_Window *  window)

Definition at line 200 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_NewFrame()

void ImGui_ImplSDL2_NewFrame ( SDL_Window *  window)

Definition at line 342 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_ProcessEvent()

bool ImGui_ImplSDL2_ProcessEvent ( const SDL_Event event)

Definition at line 85 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_SetClipboardText()

static void ImGui_ImplSDL2_SetClipboardText ( void ,
const char *  text 
)
static

Definition at line 75 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_Shutdown()

void ImGui_ImplSDL2_Shutdown ( )

Definition at line 221 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_UpdateGamepads()

static void ImGui_ImplSDL2_UpdateGamepads ( )
static

Definition at line 301 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_UpdateMouseCursor()

static void ImGui_ImplSDL2_UpdateMouseCursor ( )
static

Definition at line 281 of file imgui_impl_sdl.cpp.

◆ ImGui_ImplSDL2_UpdateMousePosAndButtons()

static void ImGui_ImplSDL2_UpdateMousePosAndButtons ( )
static

Definition at line 236 of file imgui_impl_sdl.cpp.

Variable Documentation

◆ g_ClipboardTextData

char* g_ClipboardTextData = NULL
static

Definition at line 64 of file imgui_impl_sdl.cpp.

◆ g_MouseCanUseGlobalState

bool g_MouseCanUseGlobalState = true
static

Definition at line 65 of file imgui_impl_sdl.cpp.

◆ g_MouseCursors

SDL_Cursor* g_MouseCursors[ImGuiMouseCursor_COUNT] = {}
static

Definition at line 63 of file imgui_impl_sdl.cpp.

◆ g_MousePressed

bool g_MousePressed[3] = { false, false, false }
static

Definition at line 62 of file imgui_impl_sdl.cpp.

◆ g_Time

Uint64 g_Time = 0
static

Definition at line 61 of file imgui_impl_sdl.cpp.

◆ g_Window

SDL_Window* g_Window = NULL
static

Definition at line 60 of file imgui_impl_sdl.cpp.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:03