20 #define GLFW_EXPOSE_NATIVE_WIN32 21 #define GLFW_EXPOSE_NATIVE_WGL 41 if (fb_width == 0 || fb_height == 0)
72 #define OFFSETOF(TYPE, ELEMENT) ((size_t)&(((TYPE *)0)->ELEMENT)) 76 const unsigned char* vtx_buffer = (
const unsigned char*)&cmd_list->
VtxBuffer.
front();
82 for (
int cmd_i = 0; cmd_i < cmd_list->
CmdBuffer.
size(); cmd_i++)
125 if (action ==
GLFW_PRESS && button >= 0 && button < 3)
152 if (c > 0 && c < 0x10000)
224 if (install_callbacks)
250 int display_w, display_h;
252 if (scale_factor > 0.
f)
254 w =
static_cast<int>(w / scale_factor);
255 h =
static_cast<int>(h / scale_factor);
270 double mouse_x, mouse_y;
272 io.
MousePos =
ImVec2((
float)mouse_x / scale_factor, (
float)mouse_y / scale_factor);
279 for (
int i = 0;
i < 3;
i++)
void ImGui_ImplGlfw_ScrollCallback(GLFWwindow *, double, double yoffset)
#define glDisableClientState
#define GL_TEXTURE_MAG_FILTER
#define glEnableClientState
#define GLFW_KEY_RIGHT_CONTROL
GLFWAPI void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the client area of the specified window.
static const char * ImGui_ImplGlfw_GetClipboardText()
#define OFFSETOF(TYPE, ELEMENT)
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
GLFWAPI int glfwGetWindowAttrib(GLFWwindow *window, int attrib)
Returns an attribute of the specified window.
The header of the GLFW 3 API.
IMGUI_API void AddInputCharacter(ImWchar c)
static GLFWwindow * window
#define GL_TEXTURE_BINDING_2D
IMGUI_API void NewFrame()
void ImGui_ImplGlfw_CharCallback(GLFWwindow *, unsigned int c)
void ImGui_ImplGlfw_Shutdown()
#define GLFW_KEY_LEFT_SHIFT
#define GLFW_KEY_PAGE_DOWN
GLdouble GLdouble GLdouble w
static GLuint g_FontTexture
GLfloat GLfloat GLfloat GLfloat h
#define GLFW_KEY_BACKSPACE
int KeyMap[ImGuiKey_COUNT]
IMGUI_API void ScaleClipRects(const ImVec2 &sc)
void ImGui_ImplGlFw_KeyCallback(GLFWwindow *, int key, int, int action, int mods)
#define glTexCoordPointer
#define GLFW_KEY_RIGHT_SUPER
#define GL_COLOR_BUFFER_BIT
#define GLFW_CURSOR_NORMAL
void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow *, int button, int action, int)
bool ImGui_ImplGlfw_Init(GLFWwindow *window, bool install_callbacks)
ImVector< ImDrawCmd > CmdBuffer
void(* SetClipboardTextFn)(const char *text)
IMGUI_API ImGuiIO & GetIO()
GLint GLsizei GLsizei height
#define GL_UNSIGNED_SHORT
static GLFWwindow * g_Window
#define GL_TEXTURE_MIN_FILTER
static float g_MouseWheel
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
#define GL_ONE_MINUS_SRC_ALPHA
#define GLFW_FOCUSED
Input focus window hint and attribute.
const char *(* GetClipboardTextFn)()
static bool g_MousePressed[3]
The header of the native access functions.
ImDrawCallback UserCallback
void ImGui_ImplGlfw_NewFrame(float scale_factor)
IMGUI_API void GetTexDataAsAlpha8(unsigned char **out_pixels, int *out_width, int *out_height, int *out_bytes_per_pixel=NULL)
IMGUI_API void Shutdown()
void(* RenderDrawListsFn)(ImDrawData *data)
void ImGui_ImplGlfw_InvalidateDeviceObjects()
#define GLFW_CURSOR_HIDDEN
GLint GLint GLint yoffset
#define GLFW_KEY_RIGHT_ALT
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
#define GLFW_KEY_LEFT_CONTROL
bool ImGui_ImplGlfw_CreateDeviceObjects()
ImVector< ImDrawVert > VtxBuffer
ImVec2 DisplayFramebufferScale
#define GLFW_KEY_LEFT_ALT
#define GLFW_KEY_RIGHT_SHIFT
#define GL_TEXTURE_COORD_ARRAY
ImVector< ImDrawIdx > IdxBuffer
void ImGui_ImplGlfw_RenderDrawLists(ImDrawData *draw_data)
static void ImGui_ImplGlfw_SetClipboardText(const char *text)
struct GLFWwindow GLFWwindow
#define GLFW_KEY_LEFT_SUPER
GLFWAPI HWND glfwGetWin32Window(GLFWwindow *handle)