some callback naming cosmetics as suggested in an old comment

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1466 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-11-22 05:27:19 +00:00
parent eb968382e8
commit 79f3a0d64d

View File

@ -437,7 +437,7 @@ typedef void (*SFG_Proc)();
do \ do \
{ \ { \
if( FETCH_WCB( window, cbname ) != (SFG_Proc)(func) ) \ if( FETCH_WCB( window, cbname ) != (SFG_Proc)(func) ) \
(((window).CallBacks[CB_ ## cbname]) = (SFG_Proc)(func)); \ (((window).CallBacks[WCB_ ## cbname]) = (SFG_Proc)(func)); \
} while( 0 ) } while( 0 )
/* /*
@ -452,7 +452,7 @@ do \
* type. * type.
*/ */
#define FETCH_WCB(window,cbname) \ #define FETCH_WCB(window,cbname) \
((window).CallBacks[CB_ ## cbname]) ((window).CallBacks[WCB_ ## cbname])
/* /*
* INVOKE_WCB() is used as: * INVOKE_WCB() is used as:
@ -507,50 +507,46 @@ do \
* side with the old callback code. The old callback code used * side with the old callback code. The old callback code used
* the bare callback's name as a structure member, so I used a * the bare callback's name as a structure member, so I used a
* prefix for the array index name.) * prefix for the array index name.)
*
* XXX For consistancy, perhaps the prefix should match the
* XXX FETCH* and INVOKE* macro suffices. I.e., WCB_, rather than
* XXX CB_.
*/ */
enum enum
{ {
CB_Display, WCB_Display,
CB_Reshape, WCB_Reshape,
CB_Keyboard, WCB_Keyboard,
CB_KeyboardUp, WCB_KeyboardUp,
CB_Special, WCB_Special,
CB_SpecialUp, WCB_SpecialUp,
CB_Mouse, WCB_Mouse,
CB_MouseWheel, WCB_MouseWheel,
CB_Motion, WCB_Motion,
CB_Passive, WCB_Passive,
CB_Entry, WCB_Entry,
CB_Visibility, WCB_Visibility,
CB_WindowStatus, WCB_WindowStatus,
CB_Joystick, WCB_Joystick,
CB_Destroy, WCB_Destroy,
/* MPX-related */ /* Multi-Pointer X and touch related */
CB_MultiEntry, WCB_MultiEntry,
CB_MultiButton, WCB_MultiButton,
CB_MultiMotion, WCB_MultiMotion,
CB_MultiPassive, WCB_MultiPassive,
/* Mobile platforms LifeCycle */ /* Mobile platforms LifeCycle */
CB_InitContext, WCB_InitContext,
CB_Pause, WCB_Pause,
CB_Resume, WCB_Resume,
/* Presently ignored */ /* Presently ignored */
CB_Select, WCB_Select,
CB_OverlayDisplay, WCB_OverlayDisplay,
CB_SpaceMotion, /* presently implemented only on UNIX/X11 */ WCB_SpaceMotion, /* presently implemented only on UNIX/X11 */
CB_SpaceRotation, /* presently implemented only on UNIX/X11 */ WCB_SpaceRotation, /* presently implemented only on UNIX/X11 */
CB_SpaceButton, /* presently implemented only on UNIX/X11 */ WCB_SpaceButton, /* presently implemented only on UNIX/X11 */
CB_Dials, WCB_Dials,
CB_ButtonBox, WCB_ButtonBox,
CB_TabletMotion, WCB_TabletMotion,
CB_TabletButton, WCB_TabletButton,
/* Always make this the LAST one */ /* Always make this the LAST one */
TOTAL_CALLBACKS TOTAL_CALLBACKS