Go to the documentation of this file.
47 #define GLFW_EXPOSE_NATIVE_WIN32
50 #define GLFW_HAS_WINDOW_TOPMOST (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ GLFW_FLOATING
51 #define GLFW_HAS_WINDOW_HOVERED (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ GLFW_HOVERED
52 #define GLFW_HAS_WINDOW_ALPHA (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwSetWindowOpacity
53 #define GLFW_HAS_PER_MONITOR_DPI (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwGetMonitorContentScale
54 #define GLFW_HAS_VULKAN (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ glfwCreateWindowSurface
55 #ifdef GLFW_RESIZE_NESW_CURSOR // let's be nice to people who pulled GLFW between 2019-04-16 (3.4 define) and 2019-11-29 (cursors defines) // FIXME: Remove when GLFW 3.4 is released?
56 #define GLFW_HAS_NEW_CURSORS (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3400) // 3.4+ GLFW_RESIZE_ALL_CURSOR, GLFW_RESIZE_NESW_CURSOR, GLFW_RESIZE_NWSE_CURSOR, GLFW_NOT_ALLOWED_CURSOR
58 #define GLFW_HAS_NEW_CURSORS (0)
193 #if GLFW_HAS_NEW_CURSORS
211 if (install_callbacks)
267 #ifdef __EMSCRIPTEN__
268 const bool focused =
true;
280 double mouse_x, mouse_y;
316 #define MAP_BUTTON(NAV_NO, BUTTON_NO) { if (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS) io.NavInputs[NAV_NO] = 1.0f; }
317 #define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1) { float v = (axes_count > AXIS_NO) ? axes[AXIS_NO] : V0; v = (v - V0) / (V1 - V0); if (v > 1.0f) v = 1.0f; if (io.NavInputs[NAV_NO] < v) io.NavInputs[NAV_NO] = v; }
318 int axes_count = 0, buttons_count = 0;
339 if (axes_count > 0 && buttons_count > 0)
348 IM_ASSERT(io.
Fonts->
IsBuilt() &&
"Font atlas not built! It is generally built by the renderer back-end. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame().");
352 int display_w, display_h;
int KeyMap[ImGuiKey_COUNT]
#define GLFW_KEY_LEFT_ALT
@ ImGuiMouseCursor_ResizeEW
#define GLFW_KEY_PAGE_DOWN
The header of the native access functions.
#define GLFW_CURSOR_DISABLED
#define GLFW_CURSOR_NORMAL
static void ImGui_ImplGlfw_UpdateGamepads()
bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool install_callbacks)
#define GLFW_CURSOR_HIDDEN
static bool g_InstalledCallbacks
@ ImGuiNavInput_FocusNext
GLint GLint GLint yoffset
#define GLFW_ARROW_CURSOR
The regular arrow cursor shape.
@ ImGuiConfigFlags_NavEnableGamepad
bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool install_callbacks)
@ ImGuiNavInput_TweakSlow
The header of the GLFW 3 API.
@ ImGuiNavInput_TweakFast
void(* GLFWerrorfun)(int, const char *)
The function signature for error callbacks.
ImVec2 DisplayFramebufferScale
void ImGui_ImplGlfw_Shutdown()
static const char * ImGui_ImplGlfw_GetClipboardText(void *user_data)
static bool ImGui_ImplGlfw_Init(GLFWwindow *window, bool install_callbacks, GlfwClientApi client_api)
static GLFWcursor * g_MouseCursors[ImGuiMouseCursor_COUNT]
static GLFWkeyfun g_PrevUserCallbackKey
struct GLFWwindow GLFWwindow
Opaque window object.
#define GLFW_KEY_KP_ENTER
float NavInputs[ImGuiNavInput_COUNT]
const char *(* GetClipboardTextFn)(void *user_data)
IMGUI_API ImGuiIO & GetIO()
static GLFWmousebuttonfun g_PrevUserCallbackMousebutton
IMGUI_API ImGuiMouseCursor GetMouseCursor()
IMGUI_API void AddInputCharacter(unsigned int c)
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
void ImGui_ImplGlfw_KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
@ ImGuiNavInput_LStickLeft
#define GLFW_KEY_RIGHT_CONTROL
#define GLFW_KEY_BACKSPACE
@ ImGuiBackendFlags_HasMouseCursors
#define GLFW_KEY_LEFT_SHIFT
GLFWAPI void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the client area of the specified window.
static GLFWscrollfun g_PrevUserCallbackScroll
static void ImGui_ImplGlfw_UpdateMousePosAndButtons()
@ ImGuiMouseCursor_NotAllowed
GLFWAPI int glfwGetWindowAttrib(GLFWwindow *window, int attrib)
Returns an attribute of the specified window.
#define GLFW_IBEAM_CURSOR
The text input I-beam cursor shape.
#define GLFW_HAND_CURSOR
The hand shape.
ImGuiConfigFlags ConfigFlags
@ ImGuiNavInput_FocusPrev
static void ImGui_ImplGlfw_UpdateMouseCursor()
void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
static GlfwClientApi g_ClientApi
@ ImGuiBackendFlags_HasSetMousePos
void ImGui_ImplGlfw_NewFrame()
static bool g_MouseJustPressed[5]
static GLFWwindow * g_Window
static void ImGui_ImplGlfw_SetClipboardText(void *user_data, const char *text)
void ImGui_ImplGlfw_CharCallback(GLFWwindow *window, unsigned int c)
#define IM_ARRAYSIZE(_ARR)
@ ImGuiMouseCursor_ResizeAll
void ImGui_ImplGlfw_ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
static GLFWcharfun g_PrevUserCallbackChar
const SETUP_TEARDOWN_TESTCONTEXT char * key
#define MAP_BUTTON(NAV_NO, BUTTON_NO)
#define GLFW_KEY_LEFT_CONTROL
#define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1)
#define GLFW_VRESIZE_CURSOR
The vertical resize arrow shape.
@ ImGuiMouseCursor_ResizeNWSE
const char * BackendPlatformName
struct GLFWcursor GLFWcursor
Opaque cursor object.
#define GLFW_KEY_RIGHT_SUPER
#define GLFW_KEY_RIGHT_SHIFT
#define GLFW_HRESIZE_CURSOR
The horizontal resize arrow shape.
@ ImGuiMouseCursor_ResizeNESW
@ ImGuiMouseCursor_TextInput
#define GLFW_KEY_RIGHT_ALT
@ ImGuiNavInput_LStickDown
@ ImGuiNavInput_LStickRight
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
GLubyte GLubyte GLubyte GLubyte w
#define GLFW_KEY_LEFT_SUPER
@ ImGuiMouseCursor_ResizeNS
ImGuiBackendFlags BackendFlags
@ ImGuiConfigFlags_NoMouseCursorChange
@ ImGuiBackendFlags_HasGamepad
@ ImGuiNavInput_DpadRight
GLfloat GLfloat GLfloat GLfloat h
void(* SetClipboardTextFn)(void *user_data, const char *text)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:54