Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutmousefunc(3glut) [mojave man page]

glutMouseFunc(3GLUT)						       GLUT						      glutMouseFunc(3GLUT)

NAME
glutMouseFunc - sets the mouse callback for the current window. SYNTAX
#include <GLUT/glut.h> void glutMouseFunc(void (*func)(int button, int state, int x, int y)); ARGUMENTS
func The new mouse callback function. DESCRIPTION
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- back occurred. Passing NULL to glutMouseFunc disables the generation of mouse callbacks. SEE ALSO
glutKeyboardFunc, glutMotionFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutMouseFunc(3GLUT)

Check Out this Related Man Page

glutMouseFunc(3GLUT)						       GLUT						      glutMouseFunc(3GLUT)

NAME
glutMouseFunc - sets the mouse callback for the current window. SYNTAX
void glutMouseFunc(void (*func)(int button, int state, int x, int y)); ARGUMENTS
func The new mouse callback function. DESCRIPTION
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- back occurred. Passing NULL to glutMouseFunc disables the generation of mouse callbacks. SEE ALSO
glutKeyboardFunc, glutMotionFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutMouseFunc(3GLUT)
Man Page

7 More Discussions You Might Find Interesting

1. Solaris

urgent --- mouse hangin problem

hello everyone 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)
Discussion started by: livemyway
1 Replies

2. UNIX for Advanced & Expert Users

Move mouse to disable screensaver?

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)
Discussion started by: dotancohen
1 Replies

3. UNIX for Dummies Questions & Answers

Changing middle mouse button for pasting to right mouse button in cygwin rxvt

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)
Discussion started by: sayeo
2 Replies

4. Shell Programming and Scripting

Where am I?

Hi! 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 #!/bin/sh zenity --info --title="Echo:" --text "`echo "?????"`" ... (3 Replies)
Discussion started by: ruben.rodrigues
3 Replies

5. Hardware

Middle Mouse Button stopped working

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)
Discussion started by: zdorian
4 Replies

6. Red Hat

Edit right mouse click menu

Hello, I have Centos 5.8 installed in a Virtual box. I want to edit the menu which appears when the right button of the mouse is clicked on the desktop. I found this procedure for gnome "window manager": Place any script, link or binary (must be executable) in the folder ... (0 Replies)
Discussion started by: tyanata
0 Replies

7. UNIX for Advanced & Expert Users

More vs less Linux

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)
Discussion started by: cokedude
7 Replies