Function Set-Mouse-Button-Callback
(
set-mouse-button-callback < cbfun > )
Parameters
cbfun
Pointer to a callback function that will be called every time a mouse button is pressed or released.
The function should have the following C language prototype:
void GLFWCALL functionname( int button, int action );
Where functionname is the name of the callback function, button is a mouse button identifier (see
table 3.4 on page 56), and action is either GLFW_PRESS or GLFW_RELEASE.
If cbfun is NULL, any previously selected callback function will be deselected.
Return values
none
Description
The function selects which function to be called upon a mouse button event.
A window has to be opened for this function to have any effect.
Notes
Mouse button events are recorded continuously, but only reported when glfwPollEvents,
glfwWaitEvents or glfwSwapBuffers is called.
GLFW_MOUSE_BUTTON_LEFT is equal to GLFW_MOUSE_BUTTON_1.
GLFW_MOUSE_BUTTON_RIGHT is equal to GLFW_MOUSE_BUTTON_2.
GLFW_MOUSE_BUTTON_MIDDLE is equal to GLFW_MOUSE_BUTTON_3.