From: Fay J. F C. AAC/W. <joh...@eg...> - 2003-10-03 13:54:09
|
(1) Let me repeat a bit about what Windows does with the mouse wheel. There is a defined constant called "WHEEL_DELTA" which is currently set to 120. When a wheel turn event (we've been calling it a "click") comes in, one of the arguments unpacks to give a value of +WHEEL_DELTA for a turn in one direction and of -WHEEL_DELTA for a turn in the other direction. I think this is a built-in accumulation and is looking forward to the days of continuous mouse wheels, when this argument will unpack to give different values than +/-120. In the interests of cross-platform compatibility, I would like to request that our "direction" argument be +/-120 instead of +/-1. I also think this will help us in the future. (2) We definitely need mouse coordinates. Since Windows provides them with the event (admittedly we have to subtract off the window position, but that should be simple), shall I change the "freeglut" Windows code to use these most current coordinates instead of the coordinates from the last motion event? (3) I think the suggestion of having "freeglut" call the mouse callback if there is no mouse wheel callback is an excellent one. Perhaps we can specify the following for everybody: - If your application specifies a mouse wheel callback, then buttons 4 and 5 (on a multi-button mouse) or the mouse wheel (on a wheeled mouse) will invoke this callback. - If your application does not specify a mouse wheel callback but specifies a mouse callback, then buttons 4 and 5 (on a multi-button mouse) or the mouse wheel (on a wheeled mouse) will invoke the mouse callback. - If your application does not specify either a mouse callback or a mouse wheel callback, then all mouse button clicks or wheel turns will be ignored. - If you want the mouse wheel disabled, specify a mouse wheel callback that does nothing. I also think that we should NOT distinguish (in our API) between systems that report mouse wheel events as buttons and systems that do not report mouse wheel events as buttons. Removing the platform dependencies is the whole purpose of this library. In fact, in my draft mouse wheel handling code for Windows, I have put in that if there is no mouse wheel callback then "freeglut" is to call the mouse callback ... twice in a row. (4) On a different but related subject, should we deprecate "GLUT_LEFT_BUTTON", "GLUT_MIDDLE_BUTTON", and "GLUT_RIGHT_BUTTON"? Their values are 0, 1, and 2 at the moment. Steve suggested in a separate e-mail that numerical values were preferable. John F. Fay joh...@eg... -----Original Message----- From: Steve Baker [mailto:sjb...@ai...] Sent: Thursday, October 02, 2003 10:27 PM To: fre...@li... Subject: Re: [Freeglut-developer] Freeglut 2.0.0 is Released! <snip> |