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. */
19 glutSetWindowTitle(const char *title
)
21 #if defined(__OS2PM__)
22 __glutSetWindowText(__glutCurrentWindow
->win
, (char *)title
);
25 XTextProperty textprop
;
27 assert(!__glutCurrentWindow
->parent
);
28 IGNORE_IN_GAME_MODE();
29 textprop
.value
= (unsigned char *) title
;
30 textprop
.encoding
= XA_STRING
;
32 textprop
.nitems
= strlen(title
);
33 XSetWMName(__glutDisplay
,
34 __glutCurrentWindow
->win
, &textprop
);
35 XFlush(__glutDisplay
);
40 glutSetIconTitle(const char *title
)
42 #if defined(__OS2PM__)
46 XTextProperty textprop
;
48 assert(!__glutCurrentWindow
->parent
);
49 IGNORE_IN_GAME_MODE();
50 textprop
.value
= (unsigned char *) title
;
51 textprop
.encoding
= XA_STRING
;
53 textprop
.nitems
= strlen(title
);
54 XSetWMIconName(__glutDisplay
,
55 __glutCurrentWindow
->win
, &textprop
);
56 XFlush(__glutDisplay
);
61 glutPositionWindow(int x
, int y
)
63 IGNORE_IN_GAME_MODE();
64 __glutCurrentWindow
->desiredX
= x
;
65 __glutCurrentWindow
->desiredY
= y
;
66 __glutCurrentWindow
->desiredConfMask
|= CWX
| CWY
;
67 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_CONFIGURE_WORK
);
71 glutReshapeWindow(int w
, int h
)
73 IGNORE_IN_GAME_MODE();
75 __glutWarning("glutReshapeWindow: non-positive width or height not allowed");
77 __glutCurrentWindow
->desiredWidth
= w
;
78 __glutCurrentWindow
->desiredHeight
= h
;
79 __glutCurrentWindow
->desiredConfMask
|= CWWidth
| CWHeight
;
80 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_CONFIGURE_WORK
);
86 IGNORE_IN_GAME_MODE();
87 __glutCurrentWindow
->desiredStack
= Above
;
88 __glutCurrentWindow
->desiredConfMask
|= CWStackMode
;
89 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_CONFIGURE_WORK
);
95 IGNORE_IN_GAME_MODE();
96 __glutCurrentWindow
->desiredStack
= Below
;
97 __glutCurrentWindow
->desiredConfMask
|= CWStackMode
;
98 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_CONFIGURE_WORK
);
102 glutIconifyWindow(void)
104 IGNORE_IN_GAME_MODE();
105 assert(!__glutCurrentWindow
->parent
);
106 __glutCurrentWindow
->desiredMapState
= IconicState
;
107 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_MAP_WORK
);
113 IGNORE_IN_GAME_MODE();
114 __glutCurrentWindow
->desiredMapState
= NormalState
;
115 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_MAP_WORK
);
121 IGNORE_IN_GAME_MODE();
122 __glutCurrentWindow
->desiredMapState
= WithdrawnState
;
123 __glutPutOnWorkList(__glutCurrentWindow
, GLUT_MAP_WORK
);