Lines Matching refs:button
345 // Notifies shared code of a mouse button click event
347 void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)
350 assert(button >= 0);
354 if (button < 0 || (!window->disableMouseButtonLimit && button > GLFW_MOUSE_BUTTON_LAST))
360 if (button <= GLFW_MOUSE_BUTTON_LAST)
363 window->mouseButtons[button] = _GLFW_STICK;
365 window->mouseButtons[button] = (char) action;
369 window->callbacks.mouseButton((GLFWwindow*) window, button, action, mods);
443 // Notifies shared code of the new value of a joystick button
445 void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value)
448 assert(button >= 0);
449 assert(button < js->buttonCount);
452 js->buttons[button] = value;
768 GLFWAPI int glfwGetMouseButton(GLFWwindow* handle, int button)
775 if (button < GLFW_MOUSE_BUTTON_1 || button > GLFW_MOUSE_BUTTON_LAST)
777 _glfwInputError(GLFW_INVALID_ENUM, "Invalid mouse button %i", button);
781 if (window->mouseButtons[button] == _GLFW_STICK)
783 // Sticky mode: release mouse button now
784 window->mouseButtons[button] = GLFW_RELEASE;
788 return (int) window->mouseButtons[button];