Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutmousefunc(3) [centos man page]

UNTITLED
LOCAL UNTITLED NAME
glutMouseFunc -- Sets the mouse-button callback for the current window. LIBRARY
OpenGLUT - input SYNOPSIS
#include <openglut.h> void glutMouseFunc(void( *callback )( int button, int state, int x, int y )); PARAMETERS
callback Client hook for mouse-buttons. DESCRIPTION
Whenever a mouse button is pressed or released in an OpenGLUT window, OpenGLUT checks if that window has a mouse-button (Mouse) callback reg- istered. If so, OpenGLUT gives the event to the handler. button is the button number, starting from 0. state is GLUT_UP or GLUT_DOWN to indicate the button's new state. The other parameters are the mouse coordinates. Mouse wheel motion can be reported as buttons. If you do not request otherwise, a wheel spun forward will act like a button clicking down, immediately followed by clicking up. Spinning the same wheel backward will act like a different button clicking. Mouse wheel pseudo-buttons are added after all real buttons. While the button is held and the mouse is dragged, you receive mouse-motion events (glutMotionFunc()), even if the mouse is dragged out of the window. This callback is bound to the current window . CAVEATS
Reporting the wheel as buttons is actually inherited from X. freeglut added code to support this on WIN32. OpenGLUT inherited that support from freeglut. Old GLUT defines the symbols GLUT_LEFT_BUTTON, GLUT_RIGHT_BUTTON, and GLUT_MIDDLE_BUTTON. However, mice can have more than 3 buttons, so these symbols are deprecated. Windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent. SEE ALSO
glutMotionFunc(3) glutPassiveMotionFunc(3) glutMouseWheelFunc(3) Epoch

Check Out this Related 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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mouse settings

How do I change the mouse pointer speed settings in Unix. I know in Windows there is the option to change the pointer speed. (3 Replies)
Discussion started by: chyzm
3 Replies

2. Linux

Mouse Problems

I just got the other computer working again and i put Fedora Core 2 on it but theres a problem. It wont recongnize my mouse at all. Not in installation or in the actual desktop... it doesnt even know its there. It says No - Mouse.... does anyone know how i can fix this? (4 Replies)
Discussion started by: FordGuy
4 Replies

3. UNIX for Dummies Questions & Answers

Mouse can not work in Solaris 10

Dear frends, My mouse in Solaris 10 machine has just failed today. The mouse itself is physically Ok, I can use it in my colleagues' Unix. In my own box, the cursor is just floating in the centre of screen. Any suggestions? Any method to check / modify hardware in solaris 10? thanks! (2 Replies)
Discussion started by: Dunhill_Zhao
2 Replies

4. 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

5. Shell Programming and Scripting

win32::IEAutomation

Hi folks, what is the command used to click on the 'x' button of popup browser window in perl windows.I am using WIN32::IEAutomation module. Please any one can help on this.... (3 Replies)
Discussion started by: jyo123.jyothi
3 Replies

6. UNIX for Advanced & Expert Users

aixterm vs cterm: HELP

been trying to get the mouse scroll wheel to page the terminal for about 2 yrs now on aixterm. any ideas. the below syntax does not work in aixterm but does work in xterm. ------------------------- this does not work in aixterm but does work in xterm,, with a cat Xdefult | sed... (1 Reply)
Discussion started by: nullwhat
1 Replies

7. Solaris

Sun Type 6 Mouse (Crossbow) broken?

Hello, I'll already apologize for my question, as it'll probably be hurting for an expert. About two years ago I obtained a used Sun Ultra 10 with many accessoires for a very low price. I'm not much into UNIX (or rather not into it at all), but I wanted to play around a bit with it, especially as... (3 Replies)
Discussion started by: Superidiot
3 Replies

8. 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

9. Shell Programming and Scripting

How to make a script (Bash, KornShell, etc.) executable by mouse clicking?

Hello everybody, Is there any way to make a script (Bash, KornShell, etc.) executable by mouse clicking? For example you have a file myscript.sh, you run: $ chmod u+x myscript.sh Therefore it becomes executable and all you need is to run from the terminal: $./myscript.sh... (2 Replies)
Discussion started by: dariyoosh
2 Replies

10. UNIX for Dummies Questions & Answers

reg putty problem

Hi, i am using PUTTY 0.51 release for connecting the Red hate linux box in SSH mode. its working fine but i can't able to scoll the scoll bar using scroll wheel inthe mouse. please suggest me how to solve it. thanks in advance. thanks and regards, ilayans (2 Replies)
Discussion started by: ilayans
2 Replies

11. Red Hat

How to configure mini optical mouse ?

hello, someone gave me a set of electronic gadgets 'Brookstone' which has mini optical mouse. This mouse label doesn't have model or etc. Mouse does not work properly i.e. pointer is moving right but left/right buttons work opposite and not always could open or close controls. I suggest it might... (3 Replies)
Discussion started by: susja
3 Replies

12. 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

13. Linux

Remap Mouse Buttons with Xmodmap

Hi Guys I am having an issue with remapping a mouse i have a thumb button that i want to remap to be middle click i used xev to find out that it is button 10 and and that middle click is button 6 and so i tired this but it did not work xmodmap -e "pointer = 1 2 3 4 5 6 10 7 8 9 6 " ... (2 Replies)
Discussion started by: ab52
2 Replies

14. UNIX for Dummies Questions & Answers

system, wheel and everyone

I open a file in MAC OSX with command i and wanted to chenge the authorisation. What is 'wheel'? Can somebody tell m what does it mean? (4 Replies)
Discussion started by: Vera
4 Replies

15. 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