void GLUTAPIENTRY glutHideWindow(void) { IGNORE_IN_GAME_MODE(); __glutCurrentWindow->desiredMapState = WithdrawnState; __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); }
/* CENTRY */ void APIENTRY glutFullScreen(void) { assert(!__glutCurrentWindow->parent); IGNORE_IN_GAME_MODE(); #if !defined(_WIN32) if (__glutMotifHints == None) { __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", SGI_XA__MOTIF_WM_HINTS, 0); if (__glutMotifHints == None) { __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); } } #endif __glutCurrentWindow->desiredX = 0; __glutCurrentWindow->desiredY = 0; __glutCurrentWindow->desiredWidth = __glutScreenWidth; __glutCurrentWindow->desiredHeight = __glutScreenHeight; __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); }
void GLUTAPIENTRY glutShowWindow(void) { IGNORE_IN_GAME_MODE(); __glutCurrentWindow->desiredMapState = NormalState; __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); }
void GLUTAPIENTRY glutPushWindow(void) { IGNORE_IN_GAME_MODE(); __glutCurrentWindow->desiredStack = Below; __glutCurrentWindow->desiredConfMask |= CWStackMode; __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); }
void GLUTAPIENTRY glutIconifyWindow(void) { IGNORE_IN_GAME_MODE(); assert(!__glutCurrentWindow->parent); __glutCurrentWindow->desiredMapState = IconicState; __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK); }
void GLUTAPIENTRY glutPositionWindow(int x, int y) { IGNORE_IN_GAME_MODE(); __glutCurrentWindow->desiredX = x; __glutCurrentWindow->desiredY = y; __glutCurrentWindow->desiredConfMask |= CWX | CWY; __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); }
void GLUTAPIENTRY glutReshapeWindow(int w, int h) { IGNORE_IN_GAME_MODE(); if (w <= 0 || h <= 0) __glutWarning("glutReshapeWindow: non-positive width or height not allowed"); __glutCurrentWindow->desiredWidth = w; __glutCurrentWindow->desiredHeight = h; __glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight; __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK); }
void GLUTAPIENTRY glutSetIconTitle(const char *title) { XTextProperty textprop; assert(!__glutCurrentWindow->parent); IGNORE_IN_GAME_MODE(); textprop.value = (unsigned char *) title; textprop.encoding = XA_STRING; textprop.format = 8; textprop.nitems = (unsigned long) strlen(title); XSetWMIconName(__glutDisplay, __glutCurrentWindow->win, &textprop); XFlush(__glutDisplay); }
void GLUTAPIENTRY glutSetIconTitle(const char *title) { XTextProperty textprop; const char **pvalue = (const char**) &textprop.value; // See below for why... assert(!__glutCurrentWindow->parent); IGNORE_IN_GAME_MODE(); *pvalue = title; /* We want to write "textprop.value = (unsigned char *) title;" but gcc complains about discarding const-ness of pointer */ assert(!strcmp((const char*)textprop.value, title)); textprop.encoding = XA_STRING; textprop.format = 8; textprop.nitems = (unsigned long)strlen(title); XSetWMIconName(__glutDisplay, __glutCurrentWindow->win, &textprop); XFlush(__glutDisplay); }