Macros | Enumerations | Functions | Variables
imgui_impl_glfw.cpp File Reference
#include "imgui.h"
#include "imgui_impl_glfw.h"
#include <GLFW/glfw3.h>
Include dependency graph for imgui_impl_glfw.cpp:

Go to the source code of this file.

Macros

#define GLFW_HAS_NEW_CURSORS   (0)
 
#define GLFW_HAS_PER_MONITOR_DPI   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)
 
#define GLFW_HAS_VULKAN   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200)
 
#define GLFW_HAS_WINDOW_ALPHA   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)
 
#define GLFW_HAS_WINDOW_HOVERED   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)
 
#define GLFW_HAS_WINDOW_TOPMOST   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200)
 
#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; }
 
#define MAP_BUTTON(NAV_NO, BUTTON_NO)   { if (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS) io.NavInputs[NAV_NO] = 1.0f; }
 

Enumerations

enum  GlfwClientApi { GlfwClientApi_Unknown, GlfwClientApi_OpenGL, GlfwClientApi_Vulkan }
 

Functions

void ImGui_ImplGlfw_CharCallback (GLFWwindow *window, unsigned int c)
 
static const char * ImGui_ImplGlfw_GetClipboardText (void *user_data)
 
static bool ImGui_ImplGlfw_Init (GLFWwindow *window, bool install_callbacks, GlfwClientApi client_api)
 
bool ImGui_ImplGlfw_InitForOpenGL (GLFWwindow *window, bool install_callbacks)
 
bool ImGui_ImplGlfw_InitForVulkan (GLFWwindow *window, bool install_callbacks)
 
void ImGui_ImplGlfw_KeyCallback (GLFWwindow *window, int key, int scancode, int action, int mods)
 
void ImGui_ImplGlfw_MouseButtonCallback (GLFWwindow *window, int button, int action, int mods)
 
void ImGui_ImplGlfw_NewFrame ()
 
void ImGui_ImplGlfw_ScrollCallback (GLFWwindow *window, double xoffset, double yoffset)
 
static void ImGui_ImplGlfw_SetClipboardText (void *user_data, const char *text)
 
void ImGui_ImplGlfw_Shutdown ()
 
static void ImGui_ImplGlfw_UpdateGamepads ()
 
static void ImGui_ImplGlfw_UpdateMouseCursor ()
 
static void ImGui_ImplGlfw_UpdateMousePosAndButtons ()
 

Variables

static GlfwClientApi g_ClientApi = GlfwClientApi_Unknown
 
static bool g_InstalledCallbacks = false
 
static GLFWcursorg_MouseCursors [ImGuiMouseCursor_COUNT] = {}
 
static bool g_MouseJustPressed [5] = { false, false, false, false, false }
 
static GLFWcharfun g_PrevUserCallbackChar = NULL
 
static GLFWkeyfun g_PrevUserCallbackKey = NULL
 
static GLFWmousebuttonfun g_PrevUserCallbackMousebutton = NULL
 
static GLFWscrollfun g_PrevUserCallbackScroll = NULL
 
static double g_Time = 0.0
 
static GLFWwindowg_Window = NULL
 

Macro Definition Documentation

◆ GLFW_HAS_NEW_CURSORS

#define GLFW_HAS_NEW_CURSORS   (0)

Definition at line 58 of file imgui_impl_glfw.cpp.

◆ GLFW_HAS_PER_MONITOR_DPI

#define GLFW_HAS_PER_MONITOR_DPI   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)

Definition at line 53 of file imgui_impl_glfw.cpp.

◆ GLFW_HAS_VULKAN

#define GLFW_HAS_VULKAN   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200)

Definition at line 54 of file imgui_impl_glfw.cpp.

◆ GLFW_HAS_WINDOW_ALPHA

#define GLFW_HAS_WINDOW_ALPHA   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)

Definition at line 52 of file imgui_impl_glfw.cpp.

◆ GLFW_HAS_WINDOW_HOVERED

#define GLFW_HAS_WINDOW_HOVERED   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300)

Definition at line 51 of file imgui_impl_glfw.cpp.

◆ GLFW_HAS_WINDOW_TOPMOST

#define GLFW_HAS_WINDOW_TOPMOST   (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200)

Definition at line 50 of file imgui_impl_glfw.cpp.

◆ MAP_ANALOG

#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; }

◆ MAP_BUTTON

#define MAP_BUTTON (   NAV_NO,
  BUTTON_NO 
)    { if (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS) io.NavInputs[NAV_NO] = 1.0f; }

Enumeration Type Documentation

◆ GlfwClientApi

Enumerator
GlfwClientApi_Unknown 
GlfwClientApi_OpenGL 
GlfwClientApi_Vulkan 

Definition at line 62 of file imgui_impl_glfw.cpp.

Function Documentation

◆ ImGui_ImplGlfw_CharCallback()

void ImGui_ImplGlfw_CharCallback ( GLFWwindow window,
unsigned int  c 
)

Definition at line 132 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_GetClipboardText()

static const char* ImGui_ImplGlfw_GetClipboardText ( void user_data)
static

Definition at line 81 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_Init()

static bool ImGui_ImplGlfw_Init ( GLFWwindow window,
bool  install_callbacks,
GlfwClientApi  client_api 
)
static

Definition at line 141 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_InitForOpenGL()

bool ImGui_ImplGlfw_InitForOpenGL ( GLFWwindow window,
bool  install_callbacks 
)

Definition at line 224 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_InitForVulkan()

bool ImGui_ImplGlfw_InitForVulkan ( GLFWwindow window,
bool  install_callbacks 
)

Definition at line 229 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_KeyCallback()

void ImGui_ImplGlfw_KeyCallback ( GLFWwindow window,
int  key,
int  scancode,
int  action,
int  mods 
)

Definition at line 110 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_MouseButtonCallback()

void ImGui_ImplGlfw_MouseButtonCallback ( GLFWwindow window,
int  button,
int  action,
int  mods 
)

Definition at line 91 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_NewFrame()

void ImGui_ImplGlfw_NewFrame ( )

Definition at line 345 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_ScrollCallback()

void ImGui_ImplGlfw_ScrollCallback ( GLFWwindow window,
double  xoffset,
double  yoffset 
)

Definition at line 100 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_SetClipboardText()

static void ImGui_ImplGlfw_SetClipboardText ( void user_data,
const char *  text 
)
static

Definition at line 86 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_Shutdown()

void ImGui_ImplGlfw_Shutdown ( )

Definition at line 234 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_UpdateGamepads()

static void ImGui_ImplGlfw_UpdateGamepads ( )
static

Definition at line 308 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_UpdateMouseCursor()

static void ImGui_ImplGlfw_UpdateMouseCursor ( )
static

Definition at line 287 of file imgui_impl_glfw.cpp.

◆ ImGui_ImplGlfw_UpdateMousePosAndButtons()

static void ImGui_ImplGlfw_UpdateMousePosAndButtons ( )
static

Definition at line 253 of file imgui_impl_glfw.cpp.

Variable Documentation

◆ g_ClientApi

GlfwClientApi g_ClientApi = GlfwClientApi_Unknown
static

Definition at line 69 of file imgui_impl_glfw.cpp.

◆ g_InstalledCallbacks

bool g_InstalledCallbacks = false
static

Definition at line 73 of file imgui_impl_glfw.cpp.

◆ g_MouseCursors

GLFWcursor* g_MouseCursors[ImGuiMouseCursor_COUNT] = {}
static

Definition at line 72 of file imgui_impl_glfw.cpp.

◆ g_MouseJustPressed

bool g_MouseJustPressed[5] = { false, false, false, false, false }
static

Definition at line 71 of file imgui_impl_glfw.cpp.

◆ g_PrevUserCallbackChar

GLFWcharfun g_PrevUserCallbackChar = NULL
static

Definition at line 79 of file imgui_impl_glfw.cpp.

◆ g_PrevUserCallbackKey

GLFWkeyfun g_PrevUserCallbackKey = NULL
static

Definition at line 78 of file imgui_impl_glfw.cpp.

◆ g_PrevUserCallbackMousebutton

GLFWmousebuttonfun g_PrevUserCallbackMousebutton = NULL
static

Definition at line 76 of file imgui_impl_glfw.cpp.

◆ g_PrevUserCallbackScroll

GLFWscrollfun g_PrevUserCallbackScroll = NULL
static

Definition at line 77 of file imgui_impl_glfw.cpp.

◆ g_Time

double g_Time = 0.0
static

Definition at line 70 of file imgui_impl_glfw.cpp.

◆ g_Window

GLFWwindow* g_Window = NULL
static

Definition at line 68 of file imgui_impl_glfw.cpp.



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