MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / _glfwInputMouseClick

Function _glfwInputMouseClick

extern/glfw/src/input.c:309–324  ·  view source on GitHub ↗

Notifies shared code of a mouse button click event

Source from the content-addressed store, hash-verified

307// Notifies shared code of a mouse button click event
308//
309void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)
310{
311 if (button < 0 || button > GLFW_MOUSE_BUTTON_LAST)
312 return;
313
314 if (!window->lockKeyMods)
315 mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);
316
317 if (action == GLFW_RELEASE && window->stickyMouseButtons)
318 window->mouseButtons[button] = _GLFW_STICK;
319 else
320 window->mouseButtons[button] = (char) action;
321
322 if (window->callbacks.mouseButton)
323 window->callbacks.mouseButton((GLFWwindow*) window, button, action, mods);
324}
325
326// Notifies shared code of a cursor motion event
327// The position is specified in content area relative screen coordinates

Callers 4

processEventFunction · 0.85
_glfwInputWindowFocusFunction · 0.85
windowProcFunction · 0.85
pointerHandleButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected