glutMouseFunc(3GLUT) GLUT glutMouseFunc(3GLUT)NAME
glutMouseFunc - sets the mouse callback for the current window.
void glutMouseFunc(void (*func)(int button, int state,
int x, int y));
func The new mouse callback function.
glutMouseFunc sets the mouse callback for the current window. When a user presses and releases mouse buttons in the window, each press and
each release generates a mouse callback. The button parameter is one of GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, or GLUT_RIGHT_BUTTON. For
systems with only two mouse buttons, it may not be possible to generate GLUT_MIDDLE_BUTTON callback. For systems with a single mouse but-
ton, it may be possible to generate only a GLUT_LEFT_BUTTON callback. The state parameter is either GLUT_UP or GLUT_DOWN indicating whether
the callback was due to a release or press respectively. The x and y callback parameters indicate the window relative coordinates when the
mouse button state changed. If a GLUT_DOWN callback for a specific button is triggered, the program can assume a GLUT_UP callback for the
same button will be generated (assuming the window still has a mouse callback registered) when the mouse button is released even if the
mouse has moved outside the window.
If a menu is attached to a button for a window, mouse callbacks will not be generated for that button.
During a mouse callback, glutGetModifiers may be called to determine the state of modifier keys when the mouse event generating the call-
Passing NULL to glutMouseFunc disables the generation of mouse callbacks.
glutKeyboardFunc, glutMotionFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers
Mark J. Kilgard (firstname.lastname@example.org)
GLUT 3.7 glutMouseFunc(3GLUT)
Check Out this Related Man Page
glutSpaceballButtonFunc(3GLUT) GLUT glutSpaceballButtonFunc(3GLUT)NAME
glutSpaceballButtonFunc - sets the Spaceball button callback for the current window.
void glutSpaceballButtonFunc(void (*func)(int button, int state));
func The new spaceball button callback function.
glutSpaceballButtonFunc sets the Spaceball button callback for the current window. The Spaceball button callback for a window is called
when the window has Spaceball input focus (normally, when the mouse is in the window) and the user generates Spaceball button presses. The
button parameter will be the button number (starting at one). The number of available Spaceball buttons can be determined with glutDe-
viceGet(GLUT_NUM_SPACEBALL_BUTTONS). The state is either GLUT_UP or GLUT_DOWN indicating whether the callback was due to a release or press
Registering a Spaceball button callback when a Spaceball device is not available is ineffectual and not an error. In this case, no Space-
ball button callbacks will be generated.
Passing NULL to glutSpaceballButtonFunc disables the generation of Spaceball button callbacks. When a new window is created, no Spaceball
button callback is initially registered.
glutSpaceballMotionFunc, glutSpaceballRotateFunc, glutMouseFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutJoystickFunc, glutDeviceGet
Mark J. Kilgard (email@example.com)
GLUT 3.7 glutSpaceballButtonFunc(3GLUT)
i ve a urgent situation of mouse hangin in our sun environment where we have one sun server n several sunray machines attached to it
sunray machines ve frequent mouse hangin prob
so kindly suggest how to overcome this problem
thanks in advance (1 Reply)
I have a Belkin KVM switcher, but when I switch from Unix to Windows, then back to Unix, the mouse stops working is there any way to reset the mouse without restarting the workstation?
thanks! (0 Replies)
Okay, I'm new on the damn forum and I don't know how I'd concentrate more on it.
I keep pointing my mouse onto multiplayer games and I want to know how I can direct my mind and my mouse on the Unix topics here at the Unix forum.
Where should I start from? Tips forum? Newbie forum? Any sites to... (2 Replies)
On one of our Solaris machines the user has managed to destroy his mouse key bindings. Usally if he clicks the middle button it presents some applications but now it just minimises the CDE panel to the top. I have compared his /usr/dt/config/C/sys.dtwmrc with another machine that is... (0 Replies)
All XKCD jokes aside, can a feature be added to a bash script to move the mouse every X seconds to prevent the screensaver from activating? As is it, I launch mplayer through a script that sets some preferences (such as -zoom). Can I add something to that script which wiggles the mouse?
Relevant... (1 Reply)
Hi, I'm using rxvt in Cygwin and I'm wondering how to change my mouse bindings from the middle button for pasting to the right button. The main reason why I want to do this is because my laptop doesn't have a middle mouse button. Thanks for any help! (2 Replies)
Is there any command to tell me where did I click? I know it's a litle confuse but it's like this.
if I execute this script by clicking with the right button of my mouse, it gaves me the dir or file where I clicked
zenity --info --title="Echo:" --text "`echo "?????"`"
... (3 Replies)
Can anybody tell me how to configure mouse on linux box. I am using Red Hat Enterprise Linux Server release 5.4
I am able to enable my mouse from vim sessions using "set mouse=a"
How to make it available by default? (1 Reply)
I have no idea what happened, but my middle mouse button stopped working since yesterday. I checked the settings for the mouse, everything seems fine. Reconnected mouse , restarted PC, nothing works.
What kind of issue this could be, anyone experienced something like this before?
If you have... (4 Replies)
Does more have any advantages over less? I know less has a ton of advantages over more. It can go up, you can use several vi commands, you can do page up and down, you can scroll with the mouse wheel. What other advantages does less have over more? (7 Replies)