Notifies shared code of a mouse button click event
| 307 | // Notifies shared code of a mouse button click event |
| 308 | // |
| 309 | void _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 |
no outgoing calls
no test coverage detected