⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glutint.h

📁 mesa-6.5-minigui源码
💻 H
📖 第 1 页 / 共 2 页
字号:
  GLUTreshapeFCB freshape;  /* Fortran reshape  */  GLUTmouseFCB fmouse;  /* Fortran mouse  */  GLUTmotionFCB fmotion;  /* Fortran motion  */  GLUTpassiveFCB fpassive;  /* Fortran passive  */  GLUTentryFCB fentry;  /* Fortran entry  */  GLUTkeyboardFCB fkeyboard;  /* Fortran keyboard  */  GLUTkeyboardFCB fkeyboardUp;  /* Fortran keyboard up */  GLUTwindowStatusFCB fwindowStatus;  /* Fortran visibility                                          */  GLUTvisibilityFCB fvisibility;  /* Fortran visibility                                      */  GLUTspecialFCB fspecial;  /* special key */  GLUTspecialFCB fspecialUp;  /* special key up */  GLUTbuttonBoxFCB fbuttonBox;  /* button box */  GLUTdialsFCB fdials;  /* dials */  GLUTspaceMotionFCB fspaceMotion;  /* Spaceball motion                                        */  GLUTspaceRotateFCB fspaceRotate;  /* Spaceball rotate                                        */  GLUTspaceButtonFCB fspaceButton;  /* Spaceball button                                        */  GLUTtabletMotionFCB ftabletMotion;  /* tablet motion                                       */  GLUTtabletButtonFCB ftabletButton;  /* tablet button                                       */#ifdef _WIN32  GLUTjoystickFCB fjoystick;  /* joystick */#endif#endif};struct _GLUToverlay {#if defined(_WIN32)  int pf;  HDC hdc;#endif  Window win;  GLXContext ctx;  XVisualInfo *vis;     /* visual for window */  Bool visAlloced;      /* if vis needs deallocate on destroy */  Colormap cmap;        /* RGB colormap for window; None if CI */  GLUTcolormap *colormap;  /* colormap; NULL if RGBA */  int shownState;       /* if overlay window mapped */  Bool treatAsSingle;   /* treat as single-buffered */#if !defined(_WIN32)  Bool isDirect;        /* if direct context */#endif  int transparentPixel; /* transparent pixel value */  GLUTdisplayCB display;  /* redraw  */  /* Special Fortran display  unneeded since no     parameters! */};typedef struct _GLUTstale GLUTstale;struct _GLUTstale {  GLUTwindow *window;  Window win;  GLUTstale *next;};extern GLUTstale *__glutStaleWindowList;#define GLUT_OVERLAY_EVENT_FILTER_MASK \  (ExposureMask | \  StructureNotifyMask | \  EnterWindowMask | \  LeaveWindowMask)#define GLUT_DONT_PROPAGATE_FILTER_MASK \  (ButtonReleaseMask | \  ButtonPressMask | \  KeyPressMask | \  KeyReleaseMask | \  PointerMotionMask | \  Button1MotionMask | \  Button2MotionMask | \  Button3MotionMask)#define GLUT_HACK_STOP_PROPAGATE_MASK \  (KeyPressMask | \  KeyReleaseMask)typedef struct _GLUTmenu GLUTmenu;typedef struct _GLUTmenuItem GLUTmenuItem;struct _GLUTmenu {  int id;               /* small integer menu id (0-based) */  Window win;           /* X window for the menu */  GLUTselectCB select;  /*  function of menu */  GLUTmenuItem *list;   /* list of menu entries */  int num;              /* number of entries */#if !defined(_WIN32)  Bool managed;         /* are the InputOnly windows size                           validated? */  Bool searched;	/* help detect menu loops */  int pixheight;        /* height of menu in pixels */  int pixwidth;         /* width of menu in pixels */#endif  int submenus;         /* number of submenu entries */  GLUTmenuItem *highlighted;  /* pointer to highlighted menu                                 entry, NULL not highlighted */  GLUTmenu *cascade;    /* currently cascading this menu  */  GLUTmenuItem *anchor; /* currently anchored to this entry */  int x;                /* current x origin relative to the                           root window */  int y;                /* current y origin relative to the                           root window */#ifdef SUPPORT_FORTRAN  GLUTselectFCB fselect;  /*  function of menu */#endif};struct _GLUTmenuItem {  Window win;           /* InputOnly X window for entry */  GLUTmenu *menu;       /* menu entry belongs to */  Bool isTrigger;       /* is a submenu trigger? */  int value;            /* value to return for selecting this                           entry; doubles as submenu id                           (0-base) if submenu trigger */#if defined(_WIN32)  UINT unique;          /* unique menu item id (Win32 only) */#endif  char *label;          /* __glutStrdup'ed label string */  int len;              /* length of label string */  int pixwidth;         /* width of X window in pixels */  GLUTmenuItem *next;   /* next menu entry on list for menu */};typedef struct _GLUTtimer GLUTtimer;struct _GLUTtimer {  GLUTtimer *next;      /* list of timers */  struct timeval timeout;  /* time to be called */  GLUTtimerCB func;     /* timer  (value) */  int value;            /*  return value */#ifdef SUPPORT_FORTRAN  GLUTtimerFCB ffunc;   /* Fortran timer  */#endif};typedef struct _GLUTeventParser GLUTeventParser;struct _GLUTeventParser {  int (*func) (XEvent *);  GLUTeventParser *next;};/* Declarations to implement glutFullScreen support with   mwm/4Dwm. *//* The following X property format is defined in Motif 1.1's   Xm/MwmUtils.h, but GLUT should not depend on that header   file. Note: Motif 1.2 expanded this structure with   uninteresting fields (to GLUT) so just stick with the   smaller Motif 1.1 structure. */typedef struct {#define MWM_HINTS_DECORATIONS   2  long flags;  long functions;  long decorations;  long input_mode;} MotifWmHints;/* Make current and buffer swap macros. */#ifdef _WIN32#define MAKE_CURRENT_LAYER(window)                                    \  {                                                                   \    HGLRC currentContext = wglGetCurrentContext();                    \    HDC currentDc = wglGetCurrentDC();                                \                                                                      \    if (currentContext != window->renderCtx                           \      || currentDc != window->renderDc) {                             \      wglMakeCurrent(window->renderDc, window->renderCtx);            \    }                                                                 \  }#define MAKE_CURRENT_WINDOW(window)                                   \  {                                                                   \    HGLRC currentContext = wglGetCurrentContext();                    \    HDC currentDc = wglGetCurrentDC();                                \                                                                      \    if (currentContext != window->ctx || currentDc != window->hdc) {  \      wglMakeCurrent(window->hdc, window->ctx);                       \    }                                                                 \  }#define MAKE_CURRENT_OVERLAY(overlay) \  wglMakeCurrent(overlay->hdc, overlay->ctx)#define UNMAKE_CURRENT() \  wglMakeCurrent(NULL, NULL)#define SWAP_BUFFERS_WINDOW(window) \  SwapBuffers(window->hdc)#define SWAP_BUFFERS_LAYER(window) \  SwapBuffers(window->renderDc)#else#define MAKE_CURRENT_LAYER(window) \  glXMakeCurrent(__glutDisplay, window->renderWin, window->renderCtx)#define MAKE_CURRENT_WINDOW(window) \  glXMakeCurrent(__glutDisplay, window->win, window->ctx)#define MAKE_CURRENT_OVERLAY(overlay) \  glXMakeCurrent(__glutDisplay, overlay->win, overlay->ctx)#define UNMAKE_CURRENT() \  glXMakeCurrent(__glutDisplay, None, NULL)#define SWAP_BUFFERS_WINDOW(window) \  glXSwapBuffers(__glutDisplay, window->win)#define SWAP_BUFFERS_LAYER(window) \  glXSwapBuffers(__glutDisplay, window->renderWin)#endif/* private variables from glut_event.c */extern GLUTwindow *__glutWindowWorkList;extern int __glutWindowDamaged;#ifdef SUPPORT_FORTRANextern GLUTtimer *__glutTimerList;extern GLUTtimer *__glutNewTimer;#endifextern GLUTmenu *__glutMappedMenu;extern void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *);#if !defined(_WIN32)extern void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item,  int num, int type);extern void (*__glutFinishMenu)(Window win, int x, int y);extern void (*__glutPaintMenu)(GLUTmenu * menu);extern void (*__glutStartMenu)(GLUTmenu * menu,  GLUTwindow * window, int x, int y, int x_win, int y_win);extern GLUTmenu * (*__glutGetMenuByNum)(int menunum);extern GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu,  Window win, int *which);extern GLUTmenu * (*__glutGetMenu)(Window win);#endif/* private variables from glut_init.c */extern Atom __glutWMDeleteWindow;extern Display *__glutDisplay;extern unsigned int __glutDisplayMode;extern char *__glutDisplayString;extern XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle,  Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc);extern GLboolean __glutDebug;extern GLboolean __glutForceDirect;extern GLboolean __glutIconic;extern GLboolean __glutTryDirect;extern Window __glutRoot;extern XSizeHints __glutSizeHints;extern char **__glutArgv;#endif  /* BeOS */extern char *__glutProgramName;#ifndef __BEOS__extern int __glutArgc;extern int __glutConnectionFD;extern int __glutInitHeight;extern int __glutInitWidth;extern int __glutInitX;extern int __glutInitY;extern int __glutScreen;extern int __glutScreenHeight;extern int __glutScreenWidth;extern Atom __glutMotifHints;extern unsigned int __glutModifierMask;/* private variables from glut_menu.c */extern GLUTmenuItem *__glutItemSelected;extern GLUTmenu **__glutMenuList;extern void (*__glutMenuStatusFunc) (int, int, int);extern void __glutMenuModificationError(void);extern void __glutSetMenuItem(GLUTmenuItem * item,  const char *label, int value, Bool isTrigger);/* private variables from glut_win.c */extern GLUTwindow **__glutWindowList;extern GLUTwindow *__glutCurrentWindow;extern GLUTwindow *__glutMenuWindow;extern GLUTmenu *__glutCurrentMenu;extern int __glutWindowListSize;extern void (*__glutFreeOverlayFunc) (GLUToverlay *);extern XVisualInfo *__glutDetermineWindowVisual(Bool * treatAsSingle,  Bool * visAlloced, void **fbc);/* private variables from glut_mesa.c */extern int __glutMesaSwapHackSupport;/* private variables from glut_gamemode.c */extern GLUTwindow *__glutGameModeWindow;/* private routines from glut_cindex.c */extern GLUTcolormap * __glutAssociateNewColormap(XVisualInfo * vis);extern void __glutFreeColormap(GLUTcolormap *);/* private routines from glut_cmap.c */extern void __glutSetupColormap(  XVisualInfo * vi,  GLUTcolormap ** colormap,  Colormap * cmap);#if !defined(_WIN32)extern void __glutEstablishColormapsProperty(  GLUTwindow * window);extern GLUTwindow *__glutToplevelOf(GLUTwindow * window);#endif/* private routines from glut_cursor.c */extern void __glutSetCursor(GLUTwindow *window);/* private routines from glut_event.c */extern void __glutPutOnWorkList(GLUTwindow * window,  int work_mask);extern void __glutRegisterEventParser(GLUTeventParser * parser);extern void __glutPostRedisplay(GLUTwindow * window, int layerMask);/* private routines from glut_init.c */#if !defined(_WIN32)extern void __glutOpenXConnection(char *display);#elseextern void __glutOpenWin32Connection(char *display);#endifextern void __glutInitTime(struct timeval *beginning);/* private routines for glut_menu.c (or win32_menu.c) */#if defined(_WIN32)extern GLUTmenu *__glutGetMenu(Window win);extern GLUTmenu *__glutGetMenuByNum(int menunum);extern GLUTmenuItem *__glutGetMenuItem(GLUTmenu * menu,  Window win, int *which);extern void __glutStartMenu(GLUTmenu * menu,  GLUTwindow * window, int x, int y, int x_win, int y_win);extern void __glutFinishMenu(Window win, int x, int y);#endifextern void __glutSetMenu(GLUTmenu * menu);#endif  /* BeOS */#ifdef __cplusplusextern "C" {#endif/* private routines from glut_util.c */extern char * __glutStrdup(const char *string);extern void __glutWarning(char *format,...);extern void __glutFatalError(char *format,...);extern void __glutFatalUsage(char *format,...);#ifdef __cplusplus}#endif#ifndef __BEOS__/* private routines from glut_win.c */extern GLUTwindow *__glutGetWindow(Window win);extern void __glutChangeWindowEventMask(long mask, Bool add);extern XVisualInfo *__glutDetermineVisual(  unsigned int mode,  Bool * fakeSingle,  XVisualInfo * (getVisualInfo) (unsigned int));extern XVisualInfo *__glutGetVisualInfo(unsigned int mode);extern void __glutSetWindow(GLUTwindow * window);extern void __glutReshapeFunc(GLUTreshapeCB reshapeFunc,  int callingConvention);extern void  __glutDefaultReshape(int, int);extern GLUTwindow *__glutCreateWindow(  GLUTwindow * parent,  int x, int y, int width, int height, int gamemode);extern void __glutDestroyWindow(  GLUTwindow * window,  GLUTwindow * initialWindow);#if !defined(_WIN32)/* private routines from glut_glxext.c */extern int __glutIsSupportedByGLX(char *);#endif/* private routines from glut_input.c */extern void  __glutUpdateInputDeviceMask(GLUTwindow * window);/* private routines from glut_mesa.c */extern void __glutDetermineMesaSwapHackSupport(void);/* private routines from glut_gameglut.c */extern void __glutCloseDownGameMode(void);#if defined(_WIN32)/* private routines from win32_*.c */extern LONG WINAPI __glutWindowProc(HWND win, UINT msg, WPARAM w, LPARAM l);extern HDC XHDC;#endif#else  /* BeOS *//* BeOS specific C++ function prototypes */#ifdef __cplusplus#include <SupportDefs.h>/* private routines from glutInit.cpp */void __glutInitTime(bigtime_t *beginning);void __glutInit();/* private routines from glutMenu.cpp */class GlutMenu;         // avoid including glutMenu.hGlutMenu *__glutGetMenuByNum(int menunum);/* private routines from glutWindow.cpp */int __glutConvertDisplayMode(unsigned long *options);void __glutDefaultReshape(int width, int height);class GlutWindow;       // avoid including glutWindow.h in every source filevoid __glutSetWindow(GlutWindow * window);void __glutDestroyAllWindows();/* private routines from glutDstr.cpp */int __glutConvertDisplayModeFromString(unsigned long *options);/* private routines from glutCursor.cpp */void __glutSetCursor(int cursor);#endif /* __cplusplus */#endif  /* BeOS */#endif /* __glutint_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -