3
Copyright 1989, 1998 The Open Group
5
Permission to use, copy, modify, distribute, and sell this software and its
6
documentation for any purpose is hereby granted without fee, provided that
7
the above copyright notice appear in all copies and that both that
8
copyright notice and this permission notice appear in supporting
11
The above copyright notice and this permission notice shall be included in
12
all copies or substantial portions of the Software.
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
Except as contained in this notice, the name of The Open Group shall not be
22
used in advertising or otherwise to promote the sale, use or other dealings
23
in this Software without prior written authorization from The Open Group.
26
/***********************************************************************
28
* $Xorg: screen.h,v 1.4 2001/02/09 02:05:37 xorgcvs Exp $
30
* twm per-screen data include file
32
* 11-3-88 Dave Payne, Apple Computer File created
34
***********************************************************************/
35
/* $XFree86: xc/programs/twm/screen.h,v 1.5 2001/12/14 20:01:10 dawes Exp $ */
41
#include <X11/Xutil.h>
42
#include <X11/cursorfont.h>
47
typedef struct _StdCmap {
48
struct _StdCmap *next; /* next link in chain */
49
Atom atom; /* property from which this came */
50
int nmaps; /* number of maps below */
51
XStandardColormap *maps; /* the actual maps */
54
#define SIZE_HINDENT 10
55
#define SIZE_VINDENT 2
57
typedef struct _TitlebarPixmaps {
65
typedef struct ScreenInfo
67
int screen; /* the default screen */
68
int d_depth; /* copy of DefaultDepth(dpy, screen) */
69
Visual *d_visual; /* copy of DefaultVisual(dpy, screen) */
70
int Monochrome; /* is the display monochrome ? */
71
int MyDisplayWidth; /* my copy of DisplayWidth(dpy, screen) */
72
int MyDisplayHeight; /* my copy of DisplayHeight(dpy, screen) */
73
int MaxWindowWidth; /* largest window to allow */
74
int MaxWindowHeight; /* ditto */
76
TwmWindow TwmRoot; /* the head of the twm window list */
78
Window Root; /* the root window */
79
Window SizeWindow; /* the resize dimensions window */
80
Window InfoWindow; /* the information window */
82
name_list *Icons; /* list of icon pixmaps */
83
TitlebarPixmaps tbpm; /* titlebar pixmaps */
84
Pixmap UnknownPm; /* the unknown icon pixmap */
85
Pixmap siconifyPm; /* the icon manager iconify pixmap */
86
Pixmap pullPm; /* pull right menu icon */
87
unsigned int pullW, pullH; /* size of pull right menu icon */
88
Pixmap hilitePm; /* focus highlight window background */
89
int hilite_pm_width, hilite_pm_height; /* cache the size */
91
MenuRoot *MenuList; /* head of the menu list */
92
MenuRoot *LastMenu; /* the last menu (mostly unused?) */
93
MenuRoot *Windows; /* the TwmWindows menu */
95
TwmWindow *Ring; /* one of the windows in window ring */
96
TwmWindow *RingLeader; /* current winodw in ring */
98
MouseButton Mouse[MAX_BUTTONS+1][NUM_CONTEXTS][MOD_SIZE];
99
MouseButton DefaultFunction;
100
MouseButton WindowFunction;
103
Colormaps *cmaps; /* current list of colormap windows */
104
int maxCmaps; /* maximum number of installed colormaps */
105
unsigned long first_req; /* seq # for first XInstallColormap() req in
106
pass thru loading a colortable list */
107
int root_pushes; /* current push level to install root
109
TwmWindow *pushed_window; /* saved window to install when pushes drops
114
StdCmap *head, *tail; /* list of maps */
115
StdCmap *mru; /* most recently used in list */
116
int mruindex; /* index of mru in entry */
120
int nleft, nright; /* numbers of buttons in list */
121
TitleButton *head; /* start of list */
122
int border; /* button border */
123
int pad; /* button-padding */
124
int width; /* width of single button & border */
125
int leftx; /* start of left buttons */
126
int titlex; /* start of title string */
127
int rightoff; /* offset back from right edge */
129
ColorPair BorderTileC; /* border tile colors */
130
ColorPair TitleC; /* titlebar colors */
131
ColorPair MenuC; /* menu colors */
132
ColorPair MenuTitleC; /* menu title colors */
133
ColorPair IconC; /* icon colors */
134
ColorPair IconManagerC; /* icon manager colors */
135
XColor PointerForeground; /* pointer foreground color */
136
XColor PointerBackground; /* pointer background color */
137
ColorPair DefaultC; /* default colors */
138
Pixel BorderColor; /* color of window borders */
139
Pixel MenuShadowColor; /* menu shadow color */
140
Pixel IconBorderColor; /* icon border color */
141
Pixel IconManagerHighlight; /* icon manager highlight */
143
Cursor TitleCursor; /* title bar cursor */
144
Cursor FrameCursor; /* frame cursor */
145
Cursor IconCursor; /* icon cursor */
146
Cursor IconMgrCursor; /* icon manager cursor */
147
Cursor ButtonCursor; /* title bar button cursor */
148
Cursor MoveCursor; /* move cursor */
149
Cursor ResizeCursor; /* resize cursor */
150
Cursor WaitCursor; /* wait a while cursor */
151
Cursor MenuCursor; /* menu cursor */
152
Cursor SelectCursor; /* dot cursor for f.move, etc. from menus */
153
Cursor DestroyCursor; /* skull and cross bones, f.destroy */
155
name_list *BorderColorL;
156
name_list *IconBorderColorL;
157
name_list *BorderTileForegroundL;
158
name_list *BorderTileBackgroundL;
159
name_list *TitleForegroundL;
160
name_list *TitleBackgroundL;
161
name_list *IconForegroundL;
162
name_list *IconBackgroundL;
163
name_list *IconManagerFL;
164
name_list *IconManagerBL;
166
name_list *NoTitle; /* list of window names with no title bar */
167
name_list *MakeTitle; /* list of window names with title bar */
168
name_list *AutoRaise; /* list of window names to auto-raise */
169
name_list *IconNames; /* list of window names and icon names */
170
name_list *NoHighlight; /* list of windows to not highlight */
171
name_list *NoStackModeL; /* windows to ignore stack mode requests */
172
name_list *NoTitleHighlight;/* list of windows to not highlight the TB*/
173
name_list *DontIconify; /* don't iconify by unmapping */
174
name_list *IconMgrNoShow; /* don't show in the icon manager */
175
name_list *IconMgrShow; /* show in the icon manager */
176
name_list *IconifyByUn; /* windows to iconify by unmapping */
177
name_list *StartIconified; /* windows to start iconic */
178
name_list *IconManagerHighlightL; /* icon manager highlight colors */
179
name_list *SqueezeTitleL; /* windows of which to squeeze title */
180
name_list *DontSqueezeTitleL; /* windows of which not to squeeze */
181
name_list *WindowRingL; /* windows in ring */
182
name_list *WarpCursorL; /* windows to warp cursor to on deiconify */
184
GC NormalGC; /* normal GC for everything */
185
GC MenuGC; /* gc for menus */
186
GC DrawGC; /* GC to draw lines for move and resize */
190
unsigned long XORvalue; /* number to use when drawing xor'ed */
191
MyFont TitleBarFont; /* title bar font structure */
192
MyFont MenuFont; /* menu font structure */
193
MyFont IconFont; /* icon font structure */
194
MyFont SizeFont; /* resize font structure */
195
MyFont IconManagerFont; /* window list font structure */
197
IconMgr iconmgr; /* default icon manager */
198
struct IconRegion *FirstRegion; /* pointer to icon regions */
199
struct IconRegion *LastRegion; /* pointer to the last icon region */
200
char *IconDirectory; /* icon directory to search */
201
int SizeStringOffset; /* x offset in size window for drawing */
202
int SizeStringWidth; /* minimum width of size window */
203
int BorderWidth; /* border width of twm windows */
204
int IconBorderWidth; /* border width of icon windows */
205
int UnknownWidth; /* width of the unknown icon */
206
int UnknownHeight; /* height of the unknown icon */
207
int TitleHeight; /* height of the title bar window */
208
TwmWindow *Focus; /* the twm window that has focus */
209
int EntryHeight; /* menu entry height */
210
int FramePadding; /* distance between decorations and border */
211
int TitlePadding; /* distance between items in titlebar */
212
int ButtonIndent; /* amount to shrink buttons on each side */
213
int NumAutoRaises; /* number of autoraise windows on screen */
214
short NoDefaults; /* do not add in default UI stuff */
215
short UsePPosition; /* what do with PPosition, see values below */
216
short AutoRelativeResize; /* start resize relative to position in quad */
217
short FocusRoot; /* is the input focus on the root ? */
218
short WarpCursor; /* warp cursor on de-iconify ? */
219
short ForceIcon; /* force the icon to the user specified */
220
short NoGrabServer; /* don't do server grabs */
221
short NoRaiseMove; /* don't raise window following move */
222
short NoRaiseResize; /* don't raise window following resize */
223
short NoRaiseDeicon; /* don't raise window on deiconify */
224
short NoRaiseWarp; /* don't raise window on warp */
225
short DontMoveOff; /* don't allow windows to be moved off */
226
short DoZoom; /* zoom in and out of icons */
227
short TitleFocus; /* focus on window in title bar ? */
228
short NoTitlebar; /* put title bars on windows */
229
short DecorateTransients; /* put title bars on transients */
230
short IconifyByUnmapping; /* simply unmap windows when iconifying */
231
short ShowIconManager; /* display the window list */
232
short IconManagerDontShow; /* show nothing in the icon manager */
233
short BackingStore; /* use backing store for menus */
234
short SaveUnder; /* use save under's for menus */
235
short RandomPlacement; /* randomly place windows that no give hints */
236
short OpaqueMove; /* move the window rather than outline */
237
short Highlight; /* should we highlight the window borders */
238
short StackMode; /* should we honor stack mode requests */
239
short TitleHighlight; /* should we highlight the titlebar */
240
short MoveDelta; /* number of pixels before f.move starts */
241
short ZoomCount; /* zoom outline count */
242
short SortIconMgr; /* sort entries in the icon manager */
243
short Shadow; /* show the menu shadow */
244
short InterpolateMenuColors;/* make pretty menus */
245
short NoIconManagers; /* Don't create any icon managers */
246
short ClientBorderWidth; /* respect client window border width */
247
short SqueezeTitle; /* make title as small as possible */
248
short HaveFonts; /* set if fonts have been loaded */
249
short FirstTime; /* first time we've read .twmrc */
250
short CaseSensitive; /* be case-sensitive when sorting names */
251
short WarpUnmapped; /* allow warping to unmapped windows */
256
extern int MultiScreen;
257
extern int NumScreens;
258
extern ScreenInfo **ScreenList;
259
extern ScreenInfo *Scr;
260
extern int FirstScreen;
264
#define PPOS_NON_ZERO 2
265
/* may eventually want an option for having the PPosition be the initial
266
location for the drag lines */
268
#endif /* _SCREEN_ */