Changeset 3022 for trunk/src


Ignore:
Timestamp:
Mar 5, 2000, 11:21:10 AM (25 years ago)
Author:
jeroen
Message:

* empty log message *

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 bird Exp $
     1# $Id: Makefile,v 1.10 2000-03-05 10:19:37 jeroen Exp $
    22
    33#
     
    1818CFLAGS   = -Tdp -I..\mesa\GL -I..\glu $(CFLAGS) -I$(PDWIN32_INCLUDE) -I..\mesa
    1919CXXFLAGS = -Tdp -I..\mesa\GL -I..\glu $(CXXFLAGS) -I$(PDWIN32_INCLUDE) -I..\mesa
    20 
    21 CFLAGS=$(CFLAGS) -O-
    2220
    2321TARGET=GLUT32
  • trunk/src/opengl/glut/glut_event.c

    r3000 r3022  
    1 /* $Id: glut_event.c,v 1.4 2000-03-04 19:33:43 jeroen Exp $ */
     1/* $Id: glut_event.c,v 1.5 2000-03-05 10:19:38 jeroen Exp $ */
    22/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */
    33
     
    161161  while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) {
    162162    timer = __glutTimerList;
    163     timer->func(timer->value);
     163    ((GLUTtimerCB)(timer->func))(timer->value);
    164164    __glutTimerList = timer->next;
    165165    timer->next = freeTimerList;
     
    245245      window->visState = GLUT_HIDDEN;
    246246      __glutSetWindow(window);
    247       window->windowStatus(GLUT_HIDDEN);
     247      ((GLUTwindowStatusCB)(window->windowStatus))(GLUT_HIDDEN);
    248248    }
    249249    /* An unmap is only reported on a single window; its
     
    375375               respect to the XResizeWindow request! */
    376376            glXWaitX();
    377             window->reshape(width, height);
     377            ((GLUTreshapeCB)(window->reshape))(width, height);
    378378            window->forceReshape = False;
    379379            /* A reshape should be considered like posting a
     
    449449              __glutSetWindow(window);
    450450              __glutModifierMask = event.xbutton.state;
    451               window->mouse(event.xbutton.button - 1,
     451              ((GLUTmouseCB)(window->mouse))(event.xbutton.button - 1,
    452452                event.type == ButtonRelease ?
    453453                GLUT_UP : GLUT_DOWN,
     
    472472              (Button1Mask | Button2Mask | Button3Mask)) {
    473473              __glutSetWindow(window);
    474               window->motion(event.xmotion.x, event.xmotion.y);
     474              ((GLUTmotionCB)(window->motion))(event.xmotion.x, event.xmotion.y);
    475475            }
    476476            /* If passive motion function registered _and_
     
    482482                0)) {
    483483              __glutSetWindow(window);
    484               window->passive(event.xmotion.x,
     484              ((GLUTpassiveCB)(window->passive))(event.xmotion.x,
    485485                event.xmotion.y);
    486486            }
     
    532532            __glutSetWindow(window);
    533533            __glutModifierMask = event.xkey.state;
    534             keyboard(tmp[0],
     534            ((GLUTkeyboardCB)(keyboard))(tmp[0],
    535535              event.xkey.x, event.xkey.y);
    536536            __glutModifierMask = ~0;
     
    644644            /* The Delete character is really an ASCII key. */
    645645            __glutSetWindow(window);
    646             keyboard(127,  /* ASCII Delete character. */
     646            ((GLUTkeyboardCB)(keyboard))(127,  /* ASCII Delete character. */
    647647              event.xkey.x, event.xkey.y);
    648648            goto skip;
     
    700700                window->entryState = EnterNotify;
    701701                __glutSetWindow(window);
    702                 window->entry(GLUT_ENTERED);
     702                ((GLUTentryCB)(window->entry))(GLUT_ENTERED);
    703703
    704704                if (__glutMappedMenu) {
     
    719719                  if (window && window->passive && window->win == xid) {
    720720                    __glutSetWindow(window);
    721                     window->passive(event.xcrossing.x, event.xcrossing.y);
     721                    ((GLUTpassiveCB)(window->passive))(event.xcrossing.x, event.xcrossing.y);
    722722                  }
    723723                }
     
    748748                window->entryState = LeaveNotify;
    749749                __glutSetWindow(window);
    750                 window->entry(GLUT_LEFT);
     750                ((GLUTentryCB)(window->entry))(GLUT_LEFT);
    751751              }
    752752            }
    753753          } else if (window->passive) {
    754754            __glutSetWindow(window);
    755             window->passive(event.xcrossing.x, event.xcrossing.y);
     755            ((GLUTpassiveCB)(window->passive))(event.xcrossing.x, event.xcrossing.y);
    756756          }
    757757        }
     
    789789              window->visState = visState;
    790790              __glutSetWindow(window);
    791               window->windowStatus(visState);
     791              ((GLUTwindowStatusCB)(window->windowStatus))(visState);
    792792            }
    793793          }
     
    950950  /* Make sure idle func still exists! */
    951951  if (__glutIdleFunc) {
    952     __glutIdleFunc();
     952    ((GLUTidleCB)(__glutIdleFunc))();
    953953  }
    954954}
     
    959959processWindowWorkList(GLUTwindow * window)
    960960{
     961//_interrupt(3);
     962
    961963  int workMask;
    962964
     
    12051207      __glutSetWindow(window);
    12061208
    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!!!!                   */
    12111209      ((GLUTreshapeCB)(window->reshape))(window->width, window->height);
    12121210      window->forceReshape = False;
     
    12621260        __glutSetWindow(window);
    12631261        window->usedSwapBuffers = 0;
    1264         window->display();
     1262        ((GLUTdisplayCB)(window->display))();
    12651263        __glutWindowDamaged = 0;
    12661264
     
    12811279          __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK);
    12821280          __glutSetWindow(window);
    1283           window->overlay->display();
     1281          ((GLUTdisplayCB)(window->overlay->display))();
    12841282          __glutWindowDamaged = 0;
    12851283        } else {
     
    13041302      __glutSetWindow(window);
    13051303      window->usedSwapBuffers = 0;
    1306       window->display();
     1304      ((GLUTdisplayCB)(window->display))();
    13071305      __glutWindowDamaged = 0;
    13081306
  • trunk/src/opengl/glut/glut_win.c

    r3000 r3022  
    1 /* $Id: glut_win.c,v 1.4 2000-03-04 19:33:43 jeroen Exp $ */
     1/* $Id: glut_win.c,v 1.5 2000-03-05 10:19:38 jeroen Exp $ */
    22/* Copyright (c) Mark J. Kilgard, 1994, 1997.  */
    33
     
    403403}
    404404
    405 void GLAPIENTRY
     405void CDECL
    406406__glutDefaultDisplay(void)
    407407{
     
    413413}
    414414
    415 void GLAPIENTRY
     415void CDECL
    416416__glutDefaultReshape(int width, int height)
    417417{
     
    10071007{
    10081008  if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED)
    1009     __glutCurrentWindow->visibility(GLUT_NOT_VISIBLE);
     1009    ((GLUTvisibilityCB)(__glutCurrentWindow->visibility))(GLUT_NOT_VISIBLE);
    10101010  else
    1011     __glutCurrentWindow->visibility(GLUT_VISIBLE);
     1011    ((GLUTvisibilityCB)(__glutCurrentWindow->visibility))(GLUT_VISIBLE);
    10121012}
    10131013
  • trunk/src/opengl/glut/glutint.h

    r2996 r3022  
    1 /* $Id: glutint.h,v 1.3 2000-03-04 19:10:16 jeroen Exp $ */
     1/* $Id: glutint.h,v 1.4 2000-03-05 10:19:38 jeroen Exp $ */
    22#ifndef __glutint_h__
    33#define __glutint_h__
     
    253253
    254254/* GLUT  function types */
    255 typedef void (* GLAPIENTRY GLUTdisplayCB) (void);
    256 typedef void (* GLAPIENTRY GLUTreshapeCB) (int, int);
    257 typedef void (* GLAPIENTRY GLUTkeyboardCB) (unsigned char, int, int);
    258 typedef void (* GLAPIENTRY GLUTmouseCB) (int, int, int, int);
    259 typedef void (* GLAPIENTRY GLUTmotionCB) (int, int);
    260 typedef void (* GLAPIENTRY GLUTpassiveCB) (int, int);
    261 typedef void (* GLAPIENTRY GLUTentryCB) (int);
    262 typedef void (* GLAPIENTRY GLUTvisibilityCB) (int);
    263 typedef void (* GLAPIENTRY GLUTwindowStatusCB) (int);
    264 typedef void (* GLAPIENTRY GLUTidleCB) (void);
    265 typedef void (* GLAPIENTRY GLUTtimerCB) (int);
    266 typedef void (* GLAPIENTRY GLUTmenuStateCB) (int);     /* DEPRICATED.      */
    267 typedef void (* GLAPIENTRY GLUTmenuStatusCB) (int, int, int);
    268 typedef void (* GLAPIENTRY GLUTselectCB) (int);
    269 typedef void (* GLAPIENTRY GLUTspecialCB) (int, int, int);
    270 typedef void (* GLAPIENTRY GLUTspaceMotionCB) (int, int, int);
    271 typedef void (* GLAPIENTRY GLUTspaceRotateCB) (int, int, int);
    272 typedef void (* GLAPIENTRY GLUTspaceButtonCB) (int, int);
    273 typedef void (* GLAPIENTRY GLUTdialsCB) (int, int);
    274 typedef void (* GLAPIENTRY GLUTbuttonBoxCB) (int, int);
    275 typedef void (* GLAPIENTRY GLUTtabletMotionCB) (int, int);
    276 typedef void (* GLAPIENTRY GLUTtabletButtonCB) (int, int, int, int);
    277 typedef void (* GLAPIENTRY GLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z);
     255typedef void (* CDECL GLUTdisplayCB) (void);
     256typedef void (* CDECL GLUTreshapeCB) (int, int);
     257typedef void (* CDECL GLUTkeyboardCB) (unsigned char, int, int);
     258typedef void (* CDECL GLUTmouseCB) (int, int, int, int);
     259typedef void (* CDECL GLUTmotionCB) (int, int);
     260typedef void (* CDECL GLUTpassiveCB) (int, int);
     261typedef void (* CDECL GLUTentryCB) (int);
     262typedef void (* CDECL GLUTvisibilityCB) (int);
     263typedef void (* CDECL GLUTwindowStatusCB) (int);
     264typedef void (* CDECL GLUTidleCB) (void);
     265typedef void (* CDECL GLUTtimerCB) (int);
     266typedef void (* CDECL GLUTmenuStateCB) (int);  /* DEPRICATED.              */
     267typedef void (* CDECL GLUTmenuStatusCB) (int, int, int);
     268typedef void (* CDECL GLUTselectCB) (int);
     269typedef void (* CDECL GLUTspecialCB) (int, int, int);
     270typedef void (* CDECL GLUTspaceMotionCB) (int, int, int);
     271typedef void (* CDECL GLUTspaceRotateCB) (int, int, int);
     272typedef void (* CDECL GLUTspaceButtonCB) (int, int);
     273typedef void (* CDECL GLUTdialsCB) (int, int);
     274typedef void (* CDECL GLUTbuttonBoxCB) (int, int);
     275typedef void (* CDECL GLUTtabletMotionCB) (int, int);
     276typedef void (* CDECL GLUTtabletButtonCB) (int, int, int, int);
     277typedef void (* CDECL GLUTjoystickCB) (unsigned int buttonMask, int x, int y, int z);
    278278#ifdef SUPPORT_FORTRAN
    279279typedef void (*GLUTdisplayFCB) (void);
     
    664664extern GLUTmenuItem *__glutItemSelected;
    665665extern GLUTmenu **__glutMenuList;
    666 extern void (* GLAPIENTRY __glutMenuStatusFunc) (int, int, int);
     666extern void (* CDECL __glutMenuStatusFunc) (int, int, int);
    667667extern void __glutMenuModificationError(void);
    668668extern void __glutSetMenuItem(GLUTmenuItem * item,
     
    746746extern void __glutReshapeFunc(GLUTreshapeCB reshapeFunc,
    747747  int callingConvention);
    748 extern void  GLAPIENTRY __glutDefaultReshape(int, int);
     748extern void  CDECL __glutDefaultReshape(int, int);
    749749extern GLUTwindow *__glutCreateWindow(
    750750  GLUTwindow * parent,
  • trunk/src/opengl/glut/win32_menu.c

    r2689 r3022  
    1 /* $Id: win32_menu.c,v 1.2 2000-02-09 08:46:22 jeroen Exp $ */
     1/* $Id: win32_menu.c,v 1.3 2000-03-05 10:19:39 jeroen Exp $ */
    22/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */
    33/* Copyright (c) Nate Robins, 1997. */
     
    1919#include "glutint.h"
    2020
    21 void (* APIENTRY __glutMenuStatusFunc) (int, int, int);
     21void (* CDECL __glutMenuStatusFunc) (int, int, int);
    2222extern GLUTmenu *__glutMappedMenu;
    2323extern GLUTwindow *__glutMenuWindow;
  • trunk/src/opengl/glut/win32_winproc.c

    r2996 r3022  
    1 /* $Id: win32_winproc.c,v 1.3 2000-03-04 19:10:17 jeroen Exp $ */
     1/* $Id: win32_winproc.c,v 1.4 2000-03-05 10:19:39 jeroen Exp $ */
    22/* Copyright (c) Nate Robins, 1997. */
    33/* portions Copyright (c) Mark Kilgard, 1997, 1998. */
     
    4141      window->visState = visState;
    4242      __glutSetWindow(window);
    43       window->windowStatus(visState);
     43      ((GLUTwindowStatusCB)(window->windowStatus))(visState);
    4444    }
    4545  }
     
    157157        /* Delete is an ASCII character. */
    158158        if (window->keyboardUp) {
    159           window->keyboardUp((unsigned char) 127, point.x, point.y);
     159          ((GLUTkeyboardCB)(window->keyboardUp))((unsigned char) 127, point.x, point.y);
    160160        }
    161161        return 0;
     
    176176            if (!(__glutModifierMask & ShiftMask))
    177177              key = tolower(key);
    178             window->keyboardUp((unsigned char) key, point.x, point.y);
     178            ((GLUTkeyboardCB)(window->keyboardUp))((unsigned char) key, point.x, point.y);
    179179          }
    180180        }
     
    222222      if (GetKeyState(VK_MENU) < 0)
    223223        __glutModifierMask |= Mod1Mask;
    224       window->keyboard((unsigned char)wParam, point.x, point.y);
     224      ((GLUTkeyboardCB)(window->keyboard))((unsigned char)wParam, point.x, point.y);
    225225      __glutModifierMask = (unsigned int) ~0;
    226226    }
     
    365365          if (GetKeyState(VK_MENU) < 0)
    366366            __glutModifierMask |= Mod1Mask;
    367           window->keyboard(key, point.x, point.y);
     367          ((GLUTkeyboardCB)(window->keyboard))(key, point.x, point.y);
    368368          __glutModifierMask = (unsigned int) ~0;
    369369
     
    428428        if (GetKeyState(VK_MENU) < 0)
    429429          __glutModifierMask |= Mod1Mask;
    430         window->mouse(button, GLUT_DOWN, x, y);
     430        ((GLUTmouseCB)(window->mouse))(button, GLUT_DOWN, x, y);
    431431        __glutModifierMask = (unsigned int)~0;
    432432      } else {
     
    493493      if (GetKeyState(VK_MENU) < 0)
    494494        __glutModifierMask |= Mod1Mask;
    495       window->mouse(button, GLUT_UP, x, y);
     495      ((GLUTmouseCB)(window->mouse))(button, GLUT_UP, x, y);
    496496      __glutModifierMask = (unsigned int)~0;
    497497    } else {
     
    528528#if 0
    529529     if (__glutIdleFunc)
    530        __glutIdleFunc();
     530       ((GLUTidleCB)(__glutIdleFunc))();
    531531#endif
    532532    if (__glutTimerList)
     
    576576            (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) {
    577577          __glutSetWindow(window);
    578           window->motion(x, y);
     578          ((GLUTmotionCB)(window->motion))(x, y);
    579579        }
    580580        /* If passive motion function registered _and_
     
    586586                  0)) {
    587587          __glutSetWindow(window);
    588           window->passive(x, y);
     588          ((GLUTpassiveCB)(window->passive))(x, y);
    589589        }
    590590      }
     
    659659      if (window->entry) {
    660660        __glutSetWindow(window);
    661         window->entry(GLUT_ENTERED);
     661        ((GLUTentryCB)(window->entry))(GLUT_ENTERED);
    662662        /* XXX Generation of fake passive notify?  See how much
    663663           work the X11 code does to support fake passive notify
     
    689689      if (window->entry) {
    690690        __glutSetWindow(window);
    691         window->entry(GLUT_LEFT);
     691        ((GLUTentryCB)(window->entry))(GLUT_LEFT);
    692692      }
    693693      if (window->joystick && __glutCurrentWindow) {
Note: See TracChangeset for help on using the changeset viewer.