📄 glutint.h
字号:
int joyPollInterval; /* joystick polling interval */#endif#ifdef SUPPORT_FORTRAN GLUTdisplayFCB fdisplay; /* Fortran display */ 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 window status */ 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 */#ifdef SUPPORT_FORTRAN GLUTdisplayFCB fdisplay; /* redraw */#endif};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 */#ifdef OLD_VMS struct timeval6 timeout; /* time to be called */#else struct timeval timeout; /* time to be called */#endif 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 = GetCurrentContext(); \ HDC currentDc = GetCurrentDC(); \ \ if (currentContext != window->renderCtx \ || currentDc != window->renderDc) { \ MakeCurrent(window->renderDc, window->renderCtx); \ } \ }#define MAKE_CURRENT_WINDOW(window) \ { \ HGLRC currentContext = GetCurrentContext(); \ HDC currentDc = GetCurrentDC(); \ \ if (currentContext != window->ctx || currentDc != window->hdc) { \ MakeCurrent(window->hdc, window->ctx); \ } \ }#define MAKE_CURRENT_OVERLAY(overlay) \ MakeCurrent(overlay->hdc, overlay->ctx)#define UNMAKE_CURRENT() \ MakeCurrent(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;extern char *__glutProgramName;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;#ifdef _WIN32extern void (__cdecl *__glutExitFunc)(int retval);#endif/* private variables from glut_menu.c */extern GLUTmenuItem *__glutItemSelected;extern GLUTmenu **__glutMenuList;extern void (GLUTCALLBACK *__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 void __glutFreeOverlay(GLUToverlay * overlay);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);extern void handleTimeouts(void);/* private routines from glut_init.c */#if !defined(_WIN32)extern void __glutOpenXConnection(char *display);#elseextern void __glutOpenWin32Connection(char *display);#endif#ifdef OLD_VMSextern void __glutInitTime(struct timeval6 *beginning);#elseextern void __glutInitTime(struct timeval *beginning);#endif/* 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);/* 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,...);/* 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 GLUTCALLBACK __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 *);extern int __glut_glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel, Window window);extern int __glut_glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h);extern int __glut_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h);extern int __glut_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh);extern int __glut_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype);extern GLXContext __glut_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);extern int __glut_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);extern GLXFBConfigSGIX __glut_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis);#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);/* private variables from glut_swap.c (BrianP) */extern GLint __glutFPS;extern GLint __glutSwapCount;extern GLint __glutSwapTime;#if defined(_WIN32)/* private routines from win32_*.c */extern LONG WINAPI __glutWindowProc(HWND win, UINT msg, WPARAM w, LPARAM l);extern HDC XHDC;#endif#endif /* __glutint_h__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -