- Timestamp:
- Mar 5, 2000, 11:21:10 AM (25 years ago)
- Location:
- trunk/src/opengl/glut
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/glut/Makefile
r3008 r3022 1 # $Id: Makefile,v 1. 9 2000-03-04 19:55:35 birdExp $1 # $Id: Makefile,v 1.10 2000-03-05 10:19:37 jeroen Exp $ 2 2 3 3 # … … 18 18 CFLAGS = -Tdp -I..\mesa\GL -I..\glu $(CFLAGS) -I$(PDWIN32_INCLUDE) -I..\mesa 19 19 CXXFLAGS = -Tdp -I..\mesa\GL -I..\glu $(CXXFLAGS) -I$(PDWIN32_INCLUDE) -I..\mesa 20 21 CFLAGS=$(CFLAGS) -O-22 20 23 21 TARGET=GLUT32 -
trunk/src/opengl/glut/glut_event.c
r3000 r3022 1 /* $Id: glut_event.c,v 1. 4 2000-03-04 19:33:43jeroen Exp $ */1 /* $Id: glut_event.c,v 1.5 2000-03-05 10:19:38 jeroen Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */ 3 3 … … 161 161 while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) { 162 162 timer = __glutTimerList; 163 timer->func(timer->value);163 ((GLUTtimerCB)(timer->func))(timer->value); 164 164 __glutTimerList = timer->next; 165 165 timer->next = freeTimerList; … … 245 245 window->visState = GLUT_HIDDEN; 246 246 __glutSetWindow(window); 247 window->windowStatus(GLUT_HIDDEN);247 ((GLUTwindowStatusCB)(window->windowStatus))(GLUT_HIDDEN); 248 248 } 249 249 /* An unmap is only reported on a single window; its … … 375 375 respect to the XResizeWindow request! */ 376 376 glXWaitX(); 377 window->reshape(width, height);377 ((GLUTreshapeCB)(window->reshape))(width, height); 378 378 window->forceReshape = False; 379 379 /* A reshape should be considered like posting a … … 449 449 __glutSetWindow(window); 450 450 __glutModifierMask = event.xbutton.state; 451 window->mouse(event.xbutton.button - 1,451 ((GLUTmouseCB)(window->mouse))(event.xbutton.button - 1, 452 452 event.type == ButtonRelease ? 453 453 GLUT_UP : GLUT_DOWN, … … 472 472 (Button1Mask | Button2Mask | Button3Mask)) { 473 473 __glutSetWindow(window); 474 window->motion(event.xmotion.x, event.xmotion.y);474 ((GLUTmotionCB)(window->motion))(event.xmotion.x, event.xmotion.y); 475 475 } 476 476 /* If passive motion function registered _and_ … … 482 482 0)) { 483 483 __glutSetWindow(window); 484 window->passive(event.xmotion.x,484 ((GLUTpassiveCB)(window->passive))(event.xmotion.x, 485 485 event.xmotion.y); 486 486 } … … 532 532 __glutSetWindow(window); 533 533 __glutModifierMask = event.xkey.state; 534 keyboard(tmp[0],534 ((GLUTkeyboardCB)(keyboard))(tmp[0], 535 535 event.xkey.x, event.xkey.y); 536 536 __glutModifierMask = ~0; … … 644 644 /* The Delete character is really an ASCII key. */ 645 645 __glutSetWindow(window); 646 keyboard(127, /* ASCII Delete character. */646 ((GLUTkeyboardCB)(keyboard))(127, /* ASCII Delete character. */ 647 647 event.xkey.x, event.xkey.y); 648 648 goto skip; … … 700 700 window->entryState = EnterNotify; 701 701 __glutSetWindow(window); 702 window->entry(GLUT_ENTERED);702 ((GLUTentryCB)(window->entry))(GLUT_ENTERED); 703 703 704 704 if (__glutMappedMenu) { … … 719 719 if (window && window->passive && window->win == xid) { 720 720 __glutSetWindow(window); 721 window->passive(event.xcrossing.x, event.xcrossing.y);721 ((GLUTpassiveCB)(window->passive))(event.xcrossing.x, event.xcrossing.y); 722 722 } 723 723 } … … 748 748 window->entryState = LeaveNotify; 749 749 __glutSetWindow(window); 750 window->entry(GLUT_LEFT);750 ((GLUTentryCB)(window->entry))(GLUT_LEFT); 751 751 } 752 752 } 753 753 } else if (window->passive) { 754 754 __glutSetWindow(window); 755 window->passive(event.xcrossing.x, event.xcrossing.y);755 ((GLUTpassiveCB)(window->passive))(event.xcrossing.x, event.xcrossing.y); 756 756 } 757 757 } … … 789 789 window->visState = visState; 790 790 __glutSetWindow(window); 791 window->windowStatus(visState);791 ((GLUTwindowStatusCB)(window->windowStatus))(visState); 792 792 } 793 793 } … … 950 950 /* Make sure idle func still exists! */ 951 951 if (__glutIdleFunc) { 952 __glutIdleFunc();952 ((GLUTidleCB)(__glutIdleFunc))(); 953 953 } 954 954 } … … 959 959 processWindowWorkList(GLUTwindow * window) 960 960 { 961 //_interrupt(3); 962 961 963 int workMask; 962 964 … … 1205 1207 __glutSetWindow(window); 1206 1208 1207 /* JvdH: DO NOT REMPVE THE EXPLICIT TYPECAST TO THIS GLAPIENTRY */1208 /* FUNCTION, OR THE COMPILER WILL NUKE THE STACK WHEN OPTIMIZING! */1209 /* VACPP obviously has a bug, and will adjust the ESP after the */1210 /* call, but the callee has already done so!!!! */1211 1209 ((GLUTreshapeCB)(window->reshape))(window->width, window->height); 1212 1210 window->forceReshape = False; … … 1262 1260 __glutSetWindow(window); 1263 1261 window->usedSwapBuffers = 0; 1264 window->display();1262 ((GLUTdisplayCB)(window->display))(); 1265 1263 __glutWindowDamaged = 0; 1266 1264 … … 1281 1279 __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK); 1282 1280 __glutSetWindow(window); 1283 window->overlay->display();1281 ((GLUTdisplayCB)(window->overlay->display))(); 1284 1282 __glutWindowDamaged = 0; 1285 1283 } else { … … 1304 1302 __glutSetWindow(window); 1305 1303 window->usedSwapBuffers = 0; 1306 window->display();1304 ((GLUTdisplayCB)(window->display))(); 1307 1305 __glutWindowDamaged = 0; 1308 1306 -
trunk/src/opengl/glut/glut_win.c
r3000 r3022 1 /* $Id: glut_win.c,v 1. 4 2000-03-04 19:33:43jeroen Exp $ */1 /* $Id: glut_win.c,v 1.5 2000-03-05 10:19:38 jeroen Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1997. */ 3 3 … … 403 403 } 404 404 405 void GLAPIENTRY405 void CDECL 406 406 __glutDefaultDisplay(void) 407 407 { … … 413 413 } 414 414 415 void GLAPIENTRY415 void CDECL 416 416 __glutDefaultReshape(int width, int height) 417 417 { … … 1007 1007 { 1008 1008 if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED) 1009 __glutCurrentWindow->visibility(GLUT_NOT_VISIBLE);1009 ((GLUTvisibilityCB)(__glutCurrentWindow->visibility))(GLUT_NOT_VISIBLE); 1010 1010 else 1011 __glutCurrentWindow->visibility(GLUT_VISIBLE);1011 ((GLUTvisibilityCB)(__glutCurrentWindow->visibility))(GLUT_VISIBLE); 1012 1012 } 1013 1013 -
trunk/src/opengl/glut/glutint.h
r2996 r3022 1 /* $Id: glutint.h,v 1. 3 2000-03-04 19:10:16jeroen Exp $ */1 /* $Id: glutint.h,v 1.4 2000-03-05 10:19:38 jeroen Exp $ */ 2 2 #ifndef __glutint_h__ 3 3 #define __glutint_h__ … … 253 253 254 254 /* GLUT function types */ 255 typedef void (* GLAPIENTRYGLUTdisplayCB) (void);256 typedef void (* GLAPIENTRYGLUTreshapeCB) (int, int);257 typedef void (* GLAPIENTRYGLUTkeyboardCB) (unsigned char, int, int);258 typedef void (* GLAPIENTRYGLUTmouseCB) (int, int, int, int);259 typedef void (* GLAPIENTRYGLUTmotionCB) (int, int);260 typedef void (* GLAPIENTRYGLUTpassiveCB) (int, int);261 typedef void (* GLAPIENTRYGLUTentryCB) (int);262 typedef void (* GLAPIENTRYGLUTvisibilityCB) (int);263 typedef void (* GLAPIENTRYGLUTwindowStatusCB) (int);264 typedef void (* GLAPIENTRYGLUTidleCB) (void);265 typedef void (* GLAPIENTRYGLUTtimerCB) (int);266 typedef void (* GLAPIENTRY GLUTmenuStateCB) (int); /* DEPRICATED.*/267 typedef void (* GLAPIENTRYGLUTmenuStatusCB) (int, int, int);268 typedef void (* GLAPIENTRYGLUTselectCB) (int);269 typedef void (* GLAPIENTRYGLUTspecialCB) (int, int, int);270 typedef void (* GLAPIENTRYGLUTspaceMotionCB) (int, int, int);271 typedef void (* GLAPIENTRYGLUTspaceRotateCB) (int, int, int);272 typedef void (* GLAPIENTRYGLUTspaceButtonCB) (int, int);273 typedef void (* GLAPIENTRYGLUTdialsCB) (int, int);274 typedef void (* GLAPIENTRYGLUTbuttonBoxCB) (int, int);275 typedef void (* GLAPIENTRYGLUTtabletMotionCB) (int, int);276 typedef void (* GLAPIENTRYGLUTtabletButtonCB) (int, int, int, int);277 typedef void (* GLAPIENTRYGLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z);255 typedef void (* CDECL GLUTdisplayCB) (void); 256 typedef void (* CDECL GLUTreshapeCB) (int, int); 257 typedef void (* CDECL GLUTkeyboardCB) (unsigned char, int, int); 258 typedef void (* CDECL GLUTmouseCB) (int, int, int, int); 259 typedef void (* CDECL GLUTmotionCB) (int, int); 260 typedef void (* CDECL GLUTpassiveCB) (int, int); 261 typedef void (* CDECL GLUTentryCB) (int); 262 typedef void (* CDECL GLUTvisibilityCB) (int); 263 typedef void (* CDECL GLUTwindowStatusCB) (int); 264 typedef void (* CDECL GLUTidleCB) (void); 265 typedef void (* CDECL GLUTtimerCB) (int); 266 typedef void (* CDECL GLUTmenuStateCB) (int); /* DEPRICATED. */ 267 typedef void (* CDECL GLUTmenuStatusCB) (int, int, int); 268 typedef void (* CDECL GLUTselectCB) (int); 269 typedef void (* CDECL GLUTspecialCB) (int, int, int); 270 typedef void (* CDECL GLUTspaceMotionCB) (int, int, int); 271 typedef void (* CDECL GLUTspaceRotateCB) (int, int, int); 272 typedef void (* CDECL GLUTspaceButtonCB) (int, int); 273 typedef void (* CDECL GLUTdialsCB) (int, int); 274 typedef void (* CDECL GLUTbuttonBoxCB) (int, int); 275 typedef void (* CDECL GLUTtabletMotionCB) (int, int); 276 typedef void (* CDECL GLUTtabletButtonCB) (int, int, int, int); 277 typedef void (* CDECL GLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z); 278 278 #ifdef SUPPORT_FORTRAN 279 279 typedef void (*GLUTdisplayFCB) (void); … … 664 664 extern GLUTmenuItem *__glutItemSelected; 665 665 extern GLUTmenu **__glutMenuList; 666 extern void (* GLAPIENTRY__glutMenuStatusFunc) (int, int, int);666 extern void (* CDECL __glutMenuStatusFunc) (int, int, int); 667 667 extern void __glutMenuModificationError(void); 668 668 extern void __glutSetMenuItem(GLUTmenuItem * item, … … 746 746 extern void __glutReshapeFunc(GLUTreshapeCB reshapeFunc, 747 747 int callingConvention); 748 extern void GLAPIENTRY__glutDefaultReshape(int, int);748 extern void CDECL __glutDefaultReshape(int, int); 749 749 extern GLUTwindow *__glutCreateWindow( 750 750 GLUTwindow * parent, -
trunk/src/opengl/glut/win32_menu.c
r2689 r3022 1 /* $Id: win32_menu.c,v 1. 2 2000-02-09 08:46:22jeroen Exp $ */1 /* $Id: win32_menu.c,v 1.3 2000-03-05 10:19:39 jeroen Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ 3 3 /* Copyright (c) Nate Robins, 1997. */ … … 19 19 #include "glutint.h" 20 20 21 void (* APIENTRY__glutMenuStatusFunc) (int, int, int);21 void (* CDECL __glutMenuStatusFunc) (int, int, int); 22 22 extern GLUTmenu *__glutMappedMenu; 23 23 extern GLUTwindow *__glutMenuWindow; -
trunk/src/opengl/glut/win32_winproc.c
r2996 r3022 1 /* $Id: win32_winproc.c,v 1. 3 2000-03-04 19:10:17jeroen Exp $ */1 /* $Id: win32_winproc.c,v 1.4 2000-03-05 10:19:39 jeroen Exp $ */ 2 2 /* Copyright (c) Nate Robins, 1997. */ 3 3 /* portions Copyright (c) Mark Kilgard, 1997, 1998. */ … … 41 41 window->visState = visState; 42 42 __glutSetWindow(window); 43 window->windowStatus(visState);43 ((GLUTwindowStatusCB)(window->windowStatus))(visState); 44 44 } 45 45 } … … 157 157 /* Delete is an ASCII character. */ 158 158 if (window->keyboardUp) { 159 window->keyboardUp((unsigned char) 127, point.x, point.y);159 ((GLUTkeyboardCB)(window->keyboardUp))((unsigned char) 127, point.x, point.y); 160 160 } 161 161 return 0; … … 176 176 if (!(__glutModifierMask & ShiftMask)) 177 177 key = tolower(key); 178 window->keyboardUp((unsigned char) key, point.x, point.y);178 ((GLUTkeyboardCB)(window->keyboardUp))((unsigned char) key, point.x, point.y); 179 179 } 180 180 } … … 222 222 if (GetKeyState(VK_MENU) < 0) 223 223 __glutModifierMask |= Mod1Mask; 224 window->keyboard((unsigned char)wParam, point.x, point.y);224 ((GLUTkeyboardCB)(window->keyboard))((unsigned char)wParam, point.x, point.y); 225 225 __glutModifierMask = (unsigned int) ~0; 226 226 } … … 365 365 if (GetKeyState(VK_MENU) < 0) 366 366 __glutModifierMask |= Mod1Mask; 367 window->keyboard(key, point.x, point.y);367 ((GLUTkeyboardCB)(window->keyboard))(key, point.x, point.y); 368 368 __glutModifierMask = (unsigned int) ~0; 369 369 … … 428 428 if (GetKeyState(VK_MENU) < 0) 429 429 __glutModifierMask |= Mod1Mask; 430 window->mouse(button, GLUT_DOWN, x, y);430 ((GLUTmouseCB)(window->mouse))(button, GLUT_DOWN, x, y); 431 431 __glutModifierMask = (unsigned int)~0; 432 432 } else { … … 493 493 if (GetKeyState(VK_MENU) < 0) 494 494 __glutModifierMask |= Mod1Mask; 495 window->mouse(button, GLUT_UP, x, y);495 ((GLUTmouseCB)(window->mouse))(button, GLUT_UP, x, y); 496 496 __glutModifierMask = (unsigned int)~0; 497 497 } else { … … 528 528 #if 0 529 529 if (__glutIdleFunc) 530 __glutIdleFunc();530 ((GLUTidleCB)(__glutIdleFunc))(); 531 531 #endif 532 532 if (__glutTimerList) … … 576 576 (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { 577 577 __glutSetWindow(window); 578 window->motion(x, y);578 ((GLUTmotionCB)(window->motion))(x, y); 579 579 } 580 580 /* If passive motion function registered _and_ … … 586 586 0)) { 587 587 __glutSetWindow(window); 588 window->passive(x, y);588 ((GLUTpassiveCB)(window->passive))(x, y); 589 589 } 590 590 } … … 659 659 if (window->entry) { 660 660 __glutSetWindow(window); 661 window->entry(GLUT_ENTERED);661 ((GLUTentryCB)(window->entry))(GLUT_ENTERED); 662 662 /* XXX Generation of fake passive notify? See how much 663 663 work the X11 code does to support fake passive notify … … 689 689 if (window->entry) { 690 690 __glutSetWindow(window); 691 window->entry(GLUT_LEFT);691 ((GLUTentryCB)(window->entry))(GLUT_LEFT); 692 692 } 693 693 if (window->joystick && __glutCurrentWindow) {
Note:
See TracChangeset
for help on using the changeset viewer.