예제 #1
0
void GLUTAPIENTRY 
glutHideWindow(void)
{
  IGNORE_IN_GAME_MODE();
  __glutCurrentWindow->desiredMapState = WithdrawnState;
  __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
}
예제 #2
0
/* 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);
}
예제 #3
0
void GLUTAPIENTRY 
glutShowWindow(void)
{
  IGNORE_IN_GAME_MODE();
  __glutCurrentWindow->desiredMapState = NormalState;
  __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
}
예제 #4
0
void GLUTAPIENTRY 
glutPushWindow(void)
{
  IGNORE_IN_GAME_MODE();
  __glutCurrentWindow->desiredStack = Below;
  __glutCurrentWindow->desiredConfMask |= CWStackMode;
  __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
}
예제 #5
0
void GLUTAPIENTRY 
glutIconifyWindow(void)
{
  IGNORE_IN_GAME_MODE();
  assert(!__glutCurrentWindow->parent);
  __glutCurrentWindow->desiredMapState = IconicState;
  __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
}
예제 #6
0
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);
}
예제 #7
0
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);
}
예제 #8
0
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);
}
예제 #9
0
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);
}