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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)