2 /* Copyright (c) Mark J. Kilgard, 1994. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
9 #include <GL/vms_x_fix.h>
19 #include <X11/Xutil.h>
20 #include <X11/Xatom.h> /* for XA_STRING atom */
27 glutSetWindowTitle(const char *title)
29 XTextProperty textprop;
31 assert(!__glutCurrentWindow->parent);
32 IGNORE_IN_GAME_MODE();
33 textprop.value = (unsigned char *) title;
34 textprop.encoding = XA_STRING;
36 textprop.nitems = strlen(title);
37 XSetWMName(__glutDisplay,
38 __glutCurrentWindow->win, &textprop);
39 XFlush(__glutDisplay);
43 glutSetIconTitle(const char *title)
45 XTextProperty textprop;
47 assert(!__glutCurrentWindow->parent);
48 IGNORE_IN_GAME_MODE();
49 textprop.value = (unsigned char *) title;
50 textprop.encoding = XA_STRING;
52 textprop.nitems = strlen(title);
53 XSetWMIconName(__glutDisplay,
54 __glutCurrentWindow->win, &textprop);
55 XFlush(__glutDisplay);
59 glutPositionWindow(int x, int y)
61 IGNORE_IN_GAME_MODE();
62 __glutCurrentWindow->desiredX = x;
63 __glutCurrentWindow->desiredY = y;
64 __glutCurrentWindow->desiredConfMask |= CWX | CWY;
65 __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
69 glutReshapeWindow(int w, int h)
71 IGNORE_IN_GAME_MODE();
73 __glutWarning("glutReshapeWindow: non-positive width or height not allowed");
75 __glutCurrentWindow->desiredWidth = w;
76 __glutCurrentWindow->desiredHeight = h;
77 __glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight;
78 __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
84 IGNORE_IN_GAME_MODE();
85 __glutCurrentWindow->desiredStack = Above;
86 __glutCurrentWindow->desiredConfMask |= CWStackMode;
87 __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
93 IGNORE_IN_GAME_MODE();
94 __glutCurrentWindow->desiredStack = Below;
95 __glutCurrentWindow->desiredConfMask |= CWStackMode;
96 __glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
100 glutIconifyWindow(void)
102 IGNORE_IN_GAME_MODE();
103 assert(!__glutCurrentWindow->parent);
104 __glutCurrentWindow->desiredMapState = IconicState;
105 __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
111 IGNORE_IN_GAME_MODE();
112 __glutCurrentWindow->desiredMapState = NormalState;
113 __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
119 IGNORE_IN_GAME_MODE();
120 __glutCurrentWindow->desiredMapState = WithdrawnState;
121 __glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);