1645f5050Syouri/*
20bbfda8aSnia * twm per-screen data include file
3645f5050Syouri *
4645f5050Syouri *
50bbfda8aSnia * Copyright 1989 Massachusetts Institute of Technology
6645f5050Syouri *
70bbfda8aSnia * $XConsortium: screen.h,v 1.62 91/05/01 17:33:09 keith Exp $
8645f5050Syouri *
90bbfda8aSnia * 11-3-88 Dave Payne, Apple Computer                   File created
10645f5050Syouri *
110bbfda8aSnia * Copyright 1992 Claude Lecommandeur.
12645f5050Syouri */
13645f5050Syouri
140bbfda8aSnia#ifndef _CTWM_SCREEN_H
150bbfda8aSnia#define _CTWM_SCREEN_H
160bbfda8aSnia
170bbfda8aSnia/* Needed for doxygen to get at the #define's for config (like EMWH) */
180bbfda8aSnia#ifdef DOXYGEN
190bbfda8aSnia# include "ctwm_config.h"
20645f5050Syouri#endif
21645f5050Syouri
220bbfda8aSnia#include "menus.h"  // embedded MouseButton/Func{Button,Key}
230bbfda8aSnia#include "workspace_structs.h"  // embedded ScreenInfo.workSpaceMgr
240bbfda8aSnia
250bbfda8aSnia
260bbfda8aSnia/**
270bbfda8aSnia * Type for iconification styles.  Options correspond to the values in
280bbfda8aSnia * IconifyStyle config var.  \sa ScreenInfo.IconifyStyle   \todo Maybe
290bbfda8aSnia * should just be moved inline in ScreenInfo struct, since it's never
300bbfda8aSnia * directly used elsewhere.
310bbfda8aSnia */
320bbfda8aSniatypedef enum {
330bbfda8aSnia	ICONIFY_NORMAL,
340bbfda8aSnia	ICONIFY_MOSAIC,
350bbfda8aSnia	ICONIFY_ZOOMIN,
360bbfda8aSnia	ICONIFY_ZOOMOUT,
370bbfda8aSnia	ICONIFY_FADE,
380bbfda8aSnia	ICONIFY_SWEEP,
390bbfda8aSnia} IcStyle;
400bbfda8aSnia
410bbfda8aSnia
420bbfda8aSnia/**
430bbfda8aSnia * Information about some XStandardColormap we're using.  See Xlib docs
440bbfda8aSnia * for details.
450bbfda8aSnia */
460bbfda8aSniastruct StdCmap {
470bbfda8aSnia	struct StdCmap *next;               /* next link in chain */
480bbfda8aSnia	Atom atom;                          /* property from which this came */
490bbfda8aSnia	int nmaps;                          /* number of maps below */
500bbfda8aSnia	XStandardColormap *maps;            /* the actual maps */
51645f5050Syouri};
52645f5050Syouri
530bbfda8aSnia
540bbfda8aSnia/**
550bbfda8aSnia * Internal padding in the size window.  \sa ScreenInfo.SizeWindow
560bbfda8aSnia * \todo Possibly these should be in another header...
570bbfda8aSnia */
58645f5050Syouri#define SIZE_HINDENT 10
590bbfda8aSnia#define SIZE_VINDENT 2  ///< \copydoc #SIZE_HINDENT
60645f5050Syouri
61645f5050Syouri
620bbfda8aSnia/**
630bbfda8aSnia * Stash for memoizing various pixmaps used in titlebars.
640bbfda8aSnia * \sa the TBPM_* constants in image.h
650bbfda8aSnia * \todo This probably doesn't need to live on its own, since it only
660bbfda8aSnia * exists to define a member in the ScreenInfo struct.  Maybe it should
670bbfda8aSnia * just be moved to being defined nested in there...
68645f5050Syouri */
690bbfda8aSniastruct TitlebarPixmaps {
700bbfda8aSnia	Pixmap xlogo;    ///< #TBPM_XLOGO
710bbfda8aSnia	Pixmap resize;   ///< #TBPM_RESIZE
720bbfda8aSnia	Pixmap question; ///< #TBPM_QUESTION
730bbfda8aSnia	Pixmap menu;     ///< #TBPM_MENU
740bbfda8aSnia	Pixmap delete;   ///< #TBPM_DOT
750bbfda8aSnia};
760bbfda8aSnia
77645f5050Syouri
780bbfda8aSnia/**
790bbfda8aSnia * Info and control for each X Screen we control.
800bbfda8aSnia *
810bbfda8aSnia * We start up on an X Display (e.g., ":0"), and by default try to take
820bbfda8aSnia * over each X Screen on that display (e.g, ":0.0", ":0.1", ...).  Each
830bbfda8aSnia * of those Screens will have its own ScreenInfo.
840bbfda8aSnia *
850bbfda8aSnia * This contains pure physical or X info (size, coordinates, color
860bbfda8aSnia * depth), ctwm info (lists of windows on it, window rings, how it fits
870bbfda8aSnia * with other Screens we control), most of the config file settings which
880bbfda8aSnia * may differ from Screen to Screen, menus, special windows (Occupy,
890bbfda8aSnia * Identify, etc), and piles of other stuff.
900bbfda8aSnia *
910bbfda8aSnia * \note
920bbfda8aSnia * Possibly this should be broken up somewhat.  e.g., much of the
930bbfda8aSnia * config-related bits pulled out into their own structure, which could
940bbfda8aSnia * allow decoupling the config parsing from the X screens a bit.
950bbfda8aSnia */
960bbfda8aSniastruct ScreenInfo {
970bbfda8aSnia	int screen;       ///< Which screen (i.e., the x after the dot in ":0.x")
980bbfda8aSnia
990bbfda8aSnia	int d_depth;      ///< Copy of DefaultDepth(dpy, screen)
1000bbfda8aSnia	Visual *d_visual; ///< Copy of DefaultVisual(dpy, screen)
1010bbfda8aSnia	int Monochrome;   ///< Is the display monochrome?
1020bbfda8aSnia
1030bbfda8aSnia	/**
1040bbfda8aSnia	 * The x coordinate of the root window relative to RealRoot.  This is
1050bbfda8aSnia	 * usually 0, except in the case of captive mode where it shows where
1060bbfda8aSnia	 * we are on the real screen, or when we have VirtualScreens and are
1070bbfda8aSnia	 * positioning our real Screens on a virtual RealRoot.
1080bbfda8aSnia	 */
1090bbfda8aSnia	int rootx;
1100bbfda8aSnia	/// The y coordinate of the root window relative to RealRoot.
1110bbfda8aSnia	/// \copydetails rootx
1120bbfda8aSnia	int rooty;
1130bbfda8aSnia
1140bbfda8aSnia	int rootw; ///< Copy of DisplayWidth(dpy, screen)
1150bbfda8aSnia	int rooth; ///< Copy of DisplayHeight(dpy, screen)
1160bbfda8aSnia
117df1c27a6Snia	int mm_w;  ///< Physical mm width of the root
118df1c27a6Snia	int mm_h;  ///< Physical mm height of the root
119df1c27a6Snia
120df1c27a6Snia#ifdef CAPTIVE
1210bbfda8aSnia	/**
1220bbfda8aSnia	 * \defgroup scr_captive_bits Captive ctwm bits
1230bbfda8aSnia	 * These are various fields related to running a captive ctwm (i.e.,
1240bbfda8aSnia	 * with \--window).  They'll generally be empty for non-captive
1250bbfda8aSnia	 * invocations, or describe our position inside the "outside" world
1260bbfda8aSnia	 * if we are.
1270bbfda8aSnia	 * @{
1280bbfda8aSnia	 */
1290bbfda8aSnia	/// The name of the captive root window if any.  Autogen'd or set
1300bbfda8aSnia	/// with \--name
1310bbfda8aSnia	char *captivename;
1320bbfda8aSnia	/// The x coordinate of the captive root window if any.
1330bbfda8aSnia	int crootx;
1340bbfda8aSnia	/// The y coordinate of the captive root window if any.
1350bbfda8aSnia	int crooty;
1360bbfda8aSnia	/// Initially copy of DisplayWidth(dpy, screen).  See also
1370bbfda8aSnia	/// ConfigureCaptiveRootWindow()
1380bbfda8aSnia	int crootw;
1390bbfda8aSnia	/// Initially copy of DisplayHeight(dpy, screen).
1400bbfda8aSnia	/// \copydetails crootw
1410bbfda8aSnia	int crooth;
1420bbfda8aSnia	/// @}
143df1c27a6Snia#endif
1440bbfda8aSnia
1450bbfda8aSnia	int MaxWindowWidth;   ///< Largest window width to allow
1460bbfda8aSnia	int MaxWindowHeight;  ///< Largest window height to allow
1470bbfda8aSnia
1480bbfda8aSnia	/// The head of the screen's twm window list.  This is used for
1490bbfda8aSnia	/// places where we need to iterate over the TwmWindow's in a single
1500bbfda8aSnia	/// Screen, by following the TwmWindow.next pointers.
1510bbfda8aSnia	TwmWindow *FirstWindow;
1520bbfda8aSnia
1530bbfda8aSnia	Colormaps RootColormaps;  ///< The colormaps of the root window
1540bbfda8aSnia
1550bbfda8aSnia
1560bbfda8aSnia	/**
1570bbfda8aSnia	 * \defgroup scr_roots Various root and pseudo-root Windows.
1580bbfda8aSnia	 * These are the various forms of root and almost-root windows that
1590bbfda8aSnia	 * things on this Screen reside in.  It's probable that there's a lot
1600bbfda8aSnia	 * of confusion of these, and they get set, reset, and used
1610bbfda8aSnia	 * incorrectly in a lot of places.  We mostly get away with it
1620bbfda8aSnia	 * because in normal usage, they're often all identical.
1630bbfda8aSnia	 *
1640bbfda8aSnia	 * \verbatim
1650bbfda8aSnia	 *
1660bbfda8aSnia	 *  +--RealRoot-----------------------------------------------------------+
1670bbfda8aSnia	 *  | the root of the display (most uses of this are probably incorrect!) |
1680bbfda8aSnia	 *  |                                                                     |
1690bbfda8aSnia	 *  |   +--CaptiveRoot--------------------------------------------------+ |
1700bbfda8aSnia	 *  |   | when captive window is used (most uses are likely incorrect!) | |
1710bbfda8aSnia	 *  |   |                                                               | |
1720bbfda8aSnia	 *  |   | +--XineramaRoot---------------------------------------------+ | |
1730bbfda8aSnia	 *  |   | | the root that encompasses all virtual screens             | | |
1740bbfda8aSnia	 *  |   | |                                                           | | |
1750bbfda8aSnia	 *  |   | | +--Root-----------+ +--Root--------+ +--Root------------+ | | |
1760bbfda8aSnia	 *  |   | | | one or more     | | Most cases   | |                  | | | |
1770bbfda8aSnia	 *  |   | | | virtual screens | | use Root.    | |                  | | | |
1780bbfda8aSnia	 *  |   | | |                 | |              | |                  | | | |
1790bbfda8aSnia	 *  |   | | |                 | |              | |                  | | | |
1800bbfda8aSnia	 *  |   | | +-----------------+ +--------------+ +------------------+ | | |
1810bbfda8aSnia	 *  |   | +-----------------------------------------------------------+ | |
1820bbfda8aSnia	 *  |   +---------------------------------------------------------------+ |
1830bbfda8aSnia	 *  +---------------------------------------------------------------------+
1840bbfda8aSnia	 * \endverbatim
1850bbfda8aSnia	 *
1860bbfda8aSnia	 * @{
1870bbfda8aSnia	 */
1880bbfda8aSnia
1890bbfda8aSnia	/**
1900bbfda8aSnia	 * Root window for the current vscreen.  Initially either the real X
1910bbfda8aSnia	 * RootWindow(), or the existing or created Window for a captive
1920bbfda8aSnia	 * ctwm.  Gets reset to a vscreen's window in InitVirtualScreens().
1930bbfda8aSnia	 */
1940bbfda8aSnia	Window Root;
1950bbfda8aSnia
1960bbfda8aSnia	/**
1970bbfda8aSnia	 * Root window holding our vscreens.  Initialized to the same value
1980bbfda8aSnia	 * as ScreenInfo.Root, and isn't changed afterward.
1990bbfda8aSnia	 */
2000bbfda8aSnia	Window XineramaRoot;
201df1c27a6Snia#ifdef CAPTIVE
2020bbfda8aSnia	/// The captive root window, if any, or None
2030bbfda8aSnia	Window CaptiveRoot;
204df1c27a6Snia#endif
2050bbfda8aSnia	/// The actual X root window of the display.  This is always X's
2060bbfda8aSnia	/// RootWindow().
2070bbfda8aSnia	Window RealRoot;
2080bbfda8aSnia	/// @}
2090bbfda8aSnia
210df1c27a6Snia	/// Layout of our roow window and monitor(s).
211df1c27a6Snia	RLayout *Layout;
212df1c27a6Snia	/// Layout taking into account Border{Top,Left,Right,Bottom} config
213df1c27a6Snia	/// params.
214df1c27a6Snia	RLayout *BorderedLayout;
2150bbfda8aSnia
2160bbfda8aSnia	/**
2170bbfda8aSnia	 * Dimensions/coordinates window.  This is the small window (usually
2180bbfda8aSnia	 * in the upper left of the screen, unless
2190bbfda8aSnia	 * ScreenInfo.CenterFeedbackWindow is set) that shows
2200bbfda8aSnia	 * dimensions/coordinates for resize/move operations.
2210bbfda8aSnia	 */
2220bbfda8aSnia	Window SizeWindow;
2230bbfda8aSnia
2240bbfda8aSnia	/**
2250bbfda8aSnia	 * Window info window.  This is the window that pops up with the
2260bbfda8aSnia	 * various information when you f.identify a window, and also the
2270bbfda8aSnia	 * truncated version of that that f.version pulls up.
2280bbfda8aSnia	 */
2290bbfda8aSnia	struct _InfoWindow {
2300bbfda8aSnia		Window       win;          ///< Actual X window
2310bbfda8aSnia		bool         mapped;       ///< Whether it's currently up
2320bbfda8aSnia		int          lines;        ///< Current number of lines
2330bbfda8aSnia		unsigned int width;        ///< Current size
2340bbfda8aSnia		unsigned int height;       ///< Current size
2350bbfda8aSnia	} InfoWindow; ///< \copydoc ScreenInfo::_InfoWindow
2360bbfda8aSnia	/*
2370bbfda8aSnia	 * Naming this struct type is pointless, but necessary for doxygen to
2380bbfda8aSnia	 * not barf on it.  The copydoc is needed so the desc shows up in the
2390bbfda8aSnia	 * ScreenInfo docs as well as the struct's own.
2400bbfda8aSnia	 */
2410bbfda8aSnia
2420bbfda8aSnia	/**
2430bbfda8aSnia	 * \defgroup scr_maskwin Screen masking window stuff
2440bbfda8aSnia	 * These are bits for a window that covers up everything on the
2450bbfda8aSnia	 * screen during startup if we're showing the "Welcome window"
2460bbfda8aSnia	 * splash screen.  That is, if ScreenInfo.ShowWelcomeWindow is true.
2470bbfda8aSnia	 * @{
2480bbfda8aSnia	 */
2490bbfda8aSnia	/// Startup splash screen masking window if
2500bbfda8aSnia	/// ScreenInfo.ShowWelcomeWindow
2510bbfda8aSnia	Window WindowMask;
2520bbfda8aSnia	/// Utility window for animated icons
2530bbfda8aSnia	Window ShapeWindow;
2540bbfda8aSnia	/// Image to show on ScreenInfo.WindowMask
2550bbfda8aSnia	Image *WelcomeImage;
2560bbfda8aSnia	/// GC for drawing ScreenInfo.WelcomeImage on ScreenInfo.WindowMask
2570bbfda8aSnia	GC     WelcomeGC;
2580bbfda8aSnia	/// Colormap for ScreenInfo.WindowMask
2590bbfda8aSnia	Colormap WelcomeCmap;
2600bbfda8aSnia	/// @}
2610bbfda8aSnia
2620bbfda8aSnia	name_list *ImageCache;  ///< Cached pixmaps used in image loading
2630bbfda8aSnia	TitlebarPixmaps tbpm;   ///< Memoized titlebar pixmaps
2640bbfda8aSnia	Image *UnknownImage;    ///< Fallback icon pixmap
2650bbfda8aSnia	Pixmap siconifyPm;      ///< In-icon manager iconifed marker pixmap
2660bbfda8aSnia	Pixmap pullPm;          ///< In-menu submenu item marker icon
2670bbfda8aSnia	unsigned int pullW;     ///< Dimensions of ScreenInfo.pullPm
2680bbfda8aSnia	unsigned int pullH;     ///< Dimensions of ScreenInfo.pullPm
2690bbfda8aSnia
2700bbfda8aSnia	/**
2710bbfda8aSnia	 * Name of titlebar focus hilite image if any.  This is an
2720bbfda8aSnia	 * alternative to the builtin shading on the titlebar when a window
2730bbfda8aSnia	 * has focus.  See Pixmaps config var.
2740bbfda8aSnia	 */
2750bbfda8aSnia	char *HighlightPixmapName;
2760bbfda8aSnia
2770bbfda8aSnia	/// \defgroup scr_menu_bits Various menus
2780bbfda8aSnia	/// These hold references to the various menus on the Screen.
2790bbfda8aSnia	/// @{
2800bbfda8aSnia	MenuRoot *MenuList;    ///< Head of the menu list
2810bbfda8aSnia	MenuRoot *LastMenu;    ///< Temp var used in creating the Screen's menus
2820bbfda8aSnia	MenuRoot *Windows;     ///< f.menu TwmWindows
2830bbfda8aSnia	MenuRoot *Icons;       ///< f.menu TwmIcons
2840bbfda8aSnia	MenuRoot *Workspaces;  ///< f.menu TwmWorkspaces
2850bbfda8aSnia	MenuRoot *AllWindows;  ///< f.menu TwmAllWindows
2860bbfda8aSnia
2870bbfda8aSnia	/*Added by dl 2004 */
2880bbfda8aSnia	MenuRoot *AllIcons;    ///< f.menu TwmAllIcons
2890bbfda8aSnia
2900bbfda8aSnia	/* Added by Dan Lilliehorn (dl@dl.nu) 2000-02-29)     */
2910bbfda8aSnia	MenuRoot *Keys;        ///< f.menu TwmKeys
2920bbfda8aSnia	MenuRoot *Visible;     ///< f.menu TwmVisible
2930bbfda8aSnia
2940bbfda8aSnia	/// @}
2950bbfda8aSnia
2960bbfda8aSnia	TwmWindow *Ring;       ///< One of the windows in the Screen's ring
2970bbfda8aSnia	TwmWindow *RingLeader; ///< Current window in ring
2980bbfda8aSnia
2990bbfda8aSnia	MouseButton DefaultFunction;   ///< DefaultFunction config var
3000bbfda8aSnia	MouseButton WindowFunction;    ///< WindowFunction config var
3010bbfda8aSnia	MouseButton ChangeWorkspaceFunction; ///< ChangeWorkspaceFunction config var
3020bbfda8aSnia	MouseButton DeIconifyFunction; ///< DeIconifyFunction config var
3030bbfda8aSnia	MouseButton IconifyFunction;   ///< IconifyFunction config var
3040bbfda8aSnia
3050bbfda8aSnia	/// Various colormaps used on the Screen.  These probably have little
3060bbfda8aSnia	/// effect in a world where 24bpp is a baseline...
3070bbfda8aSnia	struct _cmapInfo {
3080bbfda8aSnia		Colormaps *cmaps;  ///< Current list of colormap windows
3090bbfda8aSnia		int maxCmaps;      ///< Maximum number of installed colormaps
3100bbfda8aSnia		/// seq # for first XInstallColormap() req in pass thru loading a
3110bbfda8aSnia		/// colortable list
3120bbfda8aSnia		unsigned long first_req;
3130bbfda8aSnia		/// current push level to install root colormap windows
3140bbfda8aSnia		int root_pushes;
3150bbfda8aSnia		/// saved colormaps to install when pushes drops to zero
3160bbfda8aSnia		Colormaps *pushed_cmaps;
3170bbfda8aSnia	} cmapInfo; ///< \copydoc ScreenInfo::_cmapInfo
3180bbfda8aSnia	///< \todo Somebody needs to understand and document this better.
3190bbfda8aSnia	// x-ref trailing comment on InfoWindow above
3200bbfda8aSnia
3210bbfda8aSnia	/**
3220bbfda8aSnia	 * Various XStandardColormaps on the screen.  See Xlib documentation
3230bbfda8aSnia	 * for XStandardColormaps (e.g.,
3240bbfda8aSnia	 * <https://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html#Standard_Colormaps>)
3250bbfda8aSnia	 * if you need to make sense of it.
3260bbfda8aSnia	 */
3270bbfda8aSnia	struct _StdCmapInfo {
3280bbfda8aSnia		StdCmap *head;         ///< list of maps
3290bbfda8aSnia		StdCmap *tail;         ///< list of maps
3300bbfda8aSnia		StdCmap *mru;          ///< Most recently used in list
3310bbfda8aSnia		int mruindex;          ///< index of mru in entry
3320bbfda8aSnia	} StdCmapInfo; ///< \copydoc ScreenInfo::_StdCmapInfo
3330bbfda8aSnia	///< \todo Somebody needs to understand and document this better.
3340bbfda8aSnia	// x-ref trailing comment on InfoWindow above
3350bbfda8aSnia
3360bbfda8aSnia	/**
3370bbfda8aSnia	 * Various titlebar buttons that will be put in the window
3380bbfda8aSnia	 * decorations for the screen.  This is setup by
3390bbfda8aSnia	 * InitTitlebarButtons() and possibly added to via
3400bbfda8aSnia	 * Left/RightTitleButton config vars.
3410bbfda8aSnia	 * \sa CreateWindowTitlebarButtons() where this gets used to build
3420bbfda8aSnia	 * the titlebar of an individual window.
3430bbfda8aSnia	 */
3440bbfda8aSnia	struct _TBInfo {
3450bbfda8aSnia		int nleft;         ///< numbers of buttons on left side
3460bbfda8aSnia		int nright;        ///< numbers of buttons on right side
3470bbfda8aSnia		TitleButton *head; ///< start of list
3480bbfda8aSnia		int border;        ///< button border
3490bbfda8aSnia		int pad;           ///< button-padding
3500bbfda8aSnia		int width;         ///< width of single button & border
3510bbfda8aSnia		int leftx;         ///< start of left buttons
3520bbfda8aSnia		int titlex;        ///< start of title
3530bbfda8aSnia		int rightoff;      ///< offset back from right edge
3540bbfda8aSnia		int titlew;        ///< width of title part
3550bbfda8aSnia	} TBInfo; ///< \copydoc ScreenInfo::_TBInfo
3560bbfda8aSnia	// x-ref trailing comment on InfoWindow above
3570bbfda8aSnia
3580bbfda8aSnia	/**
3590bbfda8aSnia	 * \defgroup scr_color_bits Various color definitions.
3600bbfda8aSnia	 * These define various colors we use for things on the screen.
3610bbfda8aSnia	 * They tend to come from things inside a Color {} section in the
3620bbfda8aSnia	 * config.  There are often correspondences between the "simple"
3630bbfda8aSnia	 * ColorPair or Pixel values (for the "normal" colors of each type)
3640bbfda8aSnia	 * and a name_list (for per-window settings of that type).
3650bbfda8aSnia	 * @{
3660bbfda8aSnia	 */
3670bbfda8aSnia	/// Border tile colors.  \sa ScreenInfo.BorderTileForegroundL
3680bbfda8aSnia	/// \sa ScreenInfo.BorderTileBackgroundL
3690bbfda8aSnia	ColorPair BorderTileC;
3700bbfda8aSnia
3710bbfda8aSnia	/// Titlebar colors  \sa ScreenInfo.TitleForegroundL
3720bbfda8aSnia	/// \sa ScreenInfo.TitleBackgroundL
3730bbfda8aSnia	ColorPair TitleC;
3740bbfda8aSnia
3750bbfda8aSnia	/// Menu colors
3760bbfda8aSnia	ColorPair MenuC;
3770bbfda8aSnia
3780bbfda8aSnia	/// Menu title colors
3790bbfda8aSnia	ColorPair MenuTitleC;
3800bbfda8aSnia
3810bbfda8aSnia	/// %Icon colors.  \sa ScreenInfo.IconForegroundL
3820bbfda8aSnia	/// \sa ScreenInfo.IconBackgroundL
3830bbfda8aSnia	ColorPair IconC;
3840bbfda8aSnia
3850bbfda8aSnia	/// %Icon manager colors.  \sa ScreenInfo.IconManagerFL
3860bbfda8aSnia	/// \sa ScreenInfo.IconManagerBL
3870bbfda8aSnia	ColorPair IconManagerC;
3880bbfda8aSnia
3890bbfda8aSnia	/// Default colors
3900bbfda8aSnia	ColorPair DefaultC;
3910bbfda8aSnia
3920bbfda8aSnia	/// Color of window borders.  \sa ScreenInfo.BorderColorL
3930bbfda8aSnia	ColorPair BorderColorC;
3940bbfda8aSnia
3950bbfda8aSnia	/// Specialized border colors for windows.  From BorderColor config
3960bbfda8aSnia	/// var.  \sa ScreenInfo.BorderColorC
3970bbfda8aSnia	name_list *BorderColorL;
3980bbfda8aSnia
3990bbfda8aSnia	/// Specialized border colors for icons.  From IconBorderColor config
4000bbfda8aSnia	/// var.  \sa ScreenInfo.IconBorderColor
4010bbfda8aSnia	name_list *IconBorderColorL;
4020bbfda8aSnia
4030bbfda8aSnia	/// Specialized border coloring.  From BorderTileForeground config
4040bbfda8aSnia	/// var.  \sa ScreenInfo.BorderTileC
4050bbfda8aSnia	name_list *BorderTileForegroundL;
4060bbfda8aSnia
4070bbfda8aSnia	/// \copydoc ScreenInfo::BorderTileForegroundL
4080bbfda8aSnia	name_list *BorderTileBackgroundL;
4090bbfda8aSnia
4100bbfda8aSnia	/// Specialized titlebar foreground coloring.  From TitleForeground
4110bbfda8aSnia	/// config var.  \sa ScreenInfo.TitleC
4120bbfda8aSnia	name_list *TitleForegroundL;
4130bbfda8aSnia
4140bbfda8aSnia	/// Specialized titlebar background coloring.  From TitleBackground
4150bbfda8aSnia	/// config var.  \sa ScreenInfo.TitleC
4160bbfda8aSnia	name_list *TitleBackgroundL;
4170bbfda8aSnia
4180bbfda8aSnia	/// Specialized icon foreground coloring.  From IconForeground
4190bbfda8aSnia	/// config var.  \sa ScreenInfo.IconC
4200bbfda8aSnia	name_list *IconForegroundL;
4210bbfda8aSnia
4220bbfda8aSnia	/// Specialized icon background coloring.  From IconBackground
4230bbfda8aSnia	/// config var.  \sa ScreenInfo.IconC
4240bbfda8aSnia	name_list *IconBackgroundL;
4250bbfda8aSnia
4260bbfda8aSnia	/// Specialized icon manager foreground coloring.  From
4270bbfda8aSnia	/// IconManagerForeground config var.  \sa ScreenInfo.IconManagerC
4280bbfda8aSnia	name_list *IconManagerFL;
4290bbfda8aSnia
4300bbfda8aSnia	/// Specialized icon manager background coloring.  From
4310bbfda8aSnia	/// IconManagerBackground config var.  \sa ScreenInfo.IconManagerC
4320bbfda8aSnia	name_list *IconManagerBL;
4330bbfda8aSnia
4340bbfda8aSnia	/// Color to highlight focused windows in icon manager.
4350bbfda8aSnia	/// \sa ScreenInfo.IconManagerHighlight
4360bbfda8aSnia	name_list *IconManagerHighlightL;
4370bbfda8aSnia
4380bbfda8aSnia	/// Menu shadow color
4390bbfda8aSnia	Pixel MenuShadowColor;
4400bbfda8aSnia
4410bbfda8aSnia	/// %Icon border color.  \sa ScreenInfo.IconBorderColorL
4420bbfda8aSnia	Pixel IconBorderColor;
4430bbfda8aSnia
4440bbfda8aSnia	/// %Icon manager highlight color.
4450bbfda8aSnia	/// \sa ScreenInfo.IconManagerHighlightL
4460bbfda8aSnia	Pixel IconManagerHighlight;
4470bbfda8aSnia
4480bbfda8aSnia	/// The contrast of the clear shadow
4490bbfda8aSnia	short ClearShadowContrast;
4500bbfda8aSnia
4510bbfda8aSnia	/// The contrast of the dark shadow
4520bbfda8aSnia	short DarkShadowContrast;
4530bbfda8aSnia	/// @}
4540bbfda8aSnia
4550bbfda8aSnia	/**
4560bbfda8aSnia	 * \defgroup scr_icon_bits Various icon control bits.
4570bbfda8aSnia	 * Various configurations for how icons get displayed and laid out.
4580bbfda8aSnia	 * @{
4590bbfda8aSnia	 */
4600bbfda8aSnia	/// How icon images/titles are aligned.  From IconJustification
4610bbfda8aSnia	/// config var.  X-ref IconRegion.TitleJustification.
4620bbfda8aSnia	TitleJust IconJustification;
4630bbfda8aSnia
4640bbfda8aSnia	/// How icons are laid out horizontally inside a region.  From
4650bbfda8aSnia	/// IconRegionJustificationconfig var.
4660bbfda8aSnia	IRJust IconRegionJustification;
4670bbfda8aSnia
4680bbfda8aSnia	/// How icons are laid out vertically inside a region.  From
4690bbfda8aSnia	/// IconRegionAlignement config var.
4700bbfda8aSnia	IRAlignement IconRegionAlignement;
4710bbfda8aSnia
4720bbfda8aSnia	/// How to animate window iconification, if any.  From IconifyStyle
4730bbfda8aSnia	/// config var.
4740bbfda8aSnia	IcStyle IconifyStyle;       /* ICONIFY_* */
4750bbfda8aSnia	/// Limit on icon title size.  From MaxIconTitleWidth config var.
4760bbfda8aSnia	int MaxIconTitleWidth;
4770bbfda8aSnia#ifdef EWMH
4780bbfda8aSnia	int PreferredIconWidth;     ///< Width from IconSize config var
4790bbfda8aSnia	int PreferredIconHeight;    ///< Height from IconSize config var
4800bbfda8aSnia#endif
4810bbfda8aSnia	/// @}
4820bbfda8aSnia
4830bbfda8aSnia	/// How title text is aligned in window titlebars.  From
4840bbfda8aSnia	/// TitleJustification config var.  \note Despite the naming
4850bbfda8aSnia	/// similarity, this is *not* related to
4860bbfda8aSnia	/// IconRegion.TitleJustification.  That comes instead from
4870bbfda8aSnia	/// ScreenInfo.IconJustification.
4880bbfda8aSnia	TitleJust TitleJustification;
4890bbfda8aSnia
4900bbfda8aSnia	/// \defgroup scr_cursors Various cursors used on the screen.
4910bbfda8aSnia	/// These all come from the Cursors config var, or defaults.
4920bbfda8aSnia	/// @{
4930bbfda8aSnia	Cursor TitleCursor;    ///< title bar cursor
4940bbfda8aSnia	Cursor FrameCursor;    ///< frame cursor
4950bbfda8aSnia	Cursor IconCursor;     ///< icon cursor
4960bbfda8aSnia	Cursor IconMgrCursor;  ///< icon manager cursor
4970bbfda8aSnia	Cursor ButtonCursor;   ///< title bar button cursor
4980bbfda8aSnia	Cursor MoveCursor;     ///< move cursor
4990bbfda8aSnia	Cursor ResizeCursor;   ///< resize cursor
5000bbfda8aSnia	Cursor WaitCursor;     ///< wait a while cursor
5010bbfda8aSnia	Cursor MenuCursor;     ///< menu cursor
5020bbfda8aSnia	Cursor SelectCursor;   ///< dot cursor for f.move, etc. from menus
5030bbfda8aSnia	Cursor DestroyCursor;  ///< skull and cross bones, f.destroy
5040bbfda8aSnia	Cursor AlterCursor;    ///< cursor for alternate keymaps
5050bbfda8aSnia	/// @}
5060bbfda8aSnia
5070bbfda8aSnia	/// Info about the WorkSpaceManager (and Occupy window) for the screen.
5080bbfda8aSnia	WorkSpaceMgr workSpaceMgr;
5090bbfda8aSnia	bool workSpaceManagerActive; ///< Whether the WSM is being shown
5100bbfda8aSnia
5110bbfda8aSnia	/// \defgroup scr_vscreen_bits VScreen bits
5120bbfda8aSnia	/// @{
5130bbfda8aSnia	VirtualScreen *vScreenList;    ///< Linked list of per-VS info
5140bbfda8aSnia	VirtualScreen *currentvs;      ///< Currently active VS
515df1c27a6Snia#ifdef VSCREEN
5160bbfda8aSnia	name_list     *VirtualScreens; ///< List of defined VS's
5170bbfda8aSnia	int           numVscreens;     ///< Number of defined VS's
518df1c27a6Snia#endif
5190bbfda8aSnia	/// @}
5200bbfda8aSnia
5210bbfda8aSnia	name_list   *OccupyAll;       ///< OccupyAll config var
5220bbfda8aSnia	name_list   *UnmapByMovingFarAway; ///< UnmapByMovingFarAway config var
5230bbfda8aSnia	name_list   *DontSetInactive; ///< DontSetInactive config var
5240bbfda8aSnia	name_list   *AutoSqueeze;     ///< AutoSqueeze config var
5250bbfda8aSnia	name_list   *StartSqueezed;   ///< StartSqueezed config var
5260bbfda8aSnia
5270bbfda8aSnia	bool  use3Dmenus;        ///< UseThreeDMenus config var
5280bbfda8aSnia	bool  use3Dtitles;       ///< UseThreeDTitles config var
5290bbfda8aSnia	bool  use3Diconmanagers; ///< UseThreeDIconManagers config var
5300bbfda8aSnia	bool  use3Dborders;      ///< UseThreeDBorders config var
5310bbfda8aSnia	bool  use3Dwmap;         ///< UseThreeDWMap config var
5320bbfda8aSnia	bool  SunkFocusWindowTitle;  ///< SunkFocusWindowTitle config var
5330bbfda8aSnia	short WMgrVertButtonIndent;  ///< WMgrVertButtonIndent config var
5340bbfda8aSnia	short WMgrHorizButtonIndent; ///< WMgrHorizButtonIndent config var
5350bbfda8aSnia	short WMgrButtonShadowDepth; ///< WMgrButtonShadowDepth config var
5360bbfda8aSnia	bool  BeNiceToColormap; ///< BeNiceToColormap config var
5370bbfda8aSnia	bool  BorderCursors;    ///< BorderResizeCursors config var
5380bbfda8aSnia	/// AutoPopup config flag.  \sa ScreenInfo.AutoPopupL
5390bbfda8aSnia	bool  AutoPopup;
5400bbfda8aSnia	short BorderShadowDepth;      ///< BorderShadowDepth config var
5410bbfda8aSnia	short TitleButtonShadowDepth; ///< TitleButtonShadowDepth config var
5420bbfda8aSnia	short TitleShadowDepth;       ///< TitleShadowDepth config var
5430bbfda8aSnia	short MenuShadowDepth;        ///< MenuShadowDepth config var
5440bbfda8aSnia	short IconManagerShadowDepth; ///< IconManagerShadowDepth config var
5450bbfda8aSnia	/// ReallyMoveInWorkspaceManager config var
5460bbfda8aSnia	bool  ReallyMoveInWorkspaceManager;
5470bbfda8aSnia	/// AlwaysShowWindowWhenMovingFromWorkspaceManager config var
5480bbfda8aSnia	bool  ShowWinWhenMovingInWmgr;
5490bbfda8aSnia	bool  ReverseCurrentWorkspace; ///< ReverseCurrentWorkspace config var
5500bbfda8aSnia	bool  DontWarpCursorInWMap;  ///< DontWarpCursorInWMap config var
5510bbfda8aSnia	short XMoveGrid;             ///< XMoveGrid config var
5520bbfda8aSnia	short YMoveGrid;             ///< YMoveGrid config var
5530bbfda8aSnia	bool  CenterFeedbackWindow;  ///< CenterFeedbackWindow config var
5540bbfda8aSnia	bool  ShrinkIconTitles;      ///< ShrinkIconTitles config var
5550bbfda8aSnia	bool  AutoRaiseIcons;        ///< AutoRaiseIcons config var
5560bbfda8aSnia	bool  AutoFocusToTransients; ///< AutoFocusToTransients config var
5570bbfda8aSnia	bool  PackNewWindows;        ///< PackNewWindows config var
5580bbfda8aSnia
5590bbfda8aSnia	/// Stash of various OTP info about the windows on the screen.  This
5600bbfda8aSnia	/// is only used internally in various otp.c code; nothing else
5610bbfda8aSnia	/// currently references it.
5620bbfda8aSnia	struct OtpPreferences *OTP;
5630bbfda8aSnia	/// Stash of OTP info about icons on the screen. \copydetails OTP
5640bbfda8aSnia	struct OtpPreferences *IconOTP;
5650bbfda8aSnia	/// Pointer to the start of the OTP winlists for the screen.
5660bbfda8aSnia	struct OtpWinList *bottomOwl;
5670bbfda8aSnia
5680bbfda8aSnia	/// From IconManagers config var.  This is a mapping from the window
5690bbfda8aSnia	/// name pattern to the IconMgr structure it should go in.  All the
5700bbfda8aSnia	/// IM's for the screen wind up in the iconmgr element.
5710bbfda8aSnia	/// \sa ScreenInfo.iconmgr
5720bbfda8aSnia	name_list *IconMgrs;
5730bbfda8aSnia
5740bbfda8aSnia	/// AutoPopup config var (list).  Windows that popup when changed.
5750bbfda8aSnia	/// \sa ScreenInfo.AutoPopup
5760bbfda8aSnia	name_list *AutoPopupL;
5770bbfda8aSnia
5780bbfda8aSnia	/// NoBorder config var.  Windows without borders.
5790bbfda8aSnia	name_list *NoBorder;
5800bbfda8aSnia
5810bbfda8aSnia	/// NoIconTitle config var (list).  Windows to not show a title on
5820bbfda8aSnia	/// the icons for.  \sa ScreenInfo.NoIconTitlebar
5830bbfda8aSnia	name_list *NoIconTitle;
5840bbfda8aSnia
5850bbfda8aSnia	/// NoTitle config var (list).  Windows to not put a titlebar on.
5860bbfda8aSnia	/// \sa ScreenInfo.NoTitlebar
5870bbfda8aSnia	name_list *NoTitle;
5880bbfda8aSnia
5890bbfda8aSnia	/// MakeTitle config var.  Windows to pup a titlebar on when general
5900bbfda8aSnia	/// NoTitle is set.  \sa ScreenInfo.NoTitlebar \sa ScreenInfo.NoTitle
5910bbfda8aSnia	name_list *MakeTitle;
5920bbfda8aSnia
5930bbfda8aSnia	/// AutoRaise config var (list).  Windows to automatically raise when
5940bbfda8aSnia	/// pointed to (possible after a delay).
5950bbfda8aSnia	/// \sa ScreenInfo.AutoRaiseDefault \sa ScreenInfo.RaiseDelay
5960bbfda8aSnia	name_list *AutoRaise;
5970bbfda8aSnia
5980bbfda8aSnia	/// WarpOnDeIconify config var.  Windows to occupy over to current
5990bbfda8aSnia	/// workspace on deiconification.  \note Minor nomenclature issue;
6000bbfda8aSnia	/// 'Warp' in name suggests we move to the win, but it actually means
6010bbfda8aSnia	/// move the win to us.
6020bbfda8aSnia	name_list *WarpOnDeIconify;
6030bbfda8aSnia
6040bbfda8aSnia	/// AutoLower config var (list).  Windows to automatically lower when
6050bbfda8aSnia	/// pointed away from.  \sa ScreenInfo.AutoLowerDefault
6060bbfda8aSnia	name_list *AutoLower;
6070bbfda8aSnia
6080bbfda8aSnia	/// Icons config var.  Manually specified icons for particular
6090bbfda8aSnia	/// windows.
6100bbfda8aSnia	name_list *IconNames;
6110bbfda8aSnia
6120bbfda8aSnia	/// NoHightlight config var (list).  Windows to not highlight border
6130bbfda8aSnia	/// of when focused.  \sa ScreenInfo.Highlight
6140bbfda8aSnia	name_list *NoHighlight;
6150bbfda8aSnia
6160bbfda8aSnia	/// NoStackMode config var (list).  Windows to ignore
6170bbfda8aSnia	/// application-initiated restacking requests from.
6180bbfda8aSnia	/// \sa ScreenInfo.StackMode
6190bbfda8aSnia	name_list *NoStackModeL;
6200bbfda8aSnia
6210bbfda8aSnia	/// NoTitleHighlight config var (list).  Windows to not highlight in
6220bbfda8aSnia	/// titlevar when focused.  \sa ScreenInfo.TitleHighlight
6230bbfda8aSnia	name_list *NoTitleHighlight;
6240bbfda8aSnia
6250bbfda8aSnia	/// DontIconifyByUnmapping config var.  Windows to iconify by making
6260bbfda8aSnia	/// an icon for, overriding IconifyByUnmapping setting.
6270bbfda8aSnia	name_list *DontIconify;
6280bbfda8aSnia
6290bbfda8aSnia	/// IconManagerDontShow config var (list).
6300bbfda8aSnia	/// \sa ScreenInfo.IconManagerDontShow
6310bbfda8aSnia	name_list *IconMgrNoShow;
6320bbfda8aSnia
6330bbfda8aSnia	/// IconManagerShow config var.  Windows to show in icon manager even
6340bbfda8aSnia	/// if global IconManagerDontShow is set.
6350bbfda8aSnia	name_list *IconMgrShow;
6360bbfda8aSnia
6370bbfda8aSnia	/// IconifyByUnmapping config var (list).  \sa ScreenInfo.IconifyByUnmapping
6380bbfda8aSnia	name_list *IconifyByUn;
6390bbfda8aSnia
6400bbfda8aSnia	/// StartIconified config var.
6410bbfda8aSnia	name_list *StartIconified;
6420bbfda8aSnia
6430bbfda8aSnia	/// SqueezeTitle config var (list).  \sa ScreenInfo.SqueezeTitle
6440bbfda8aSnia	name_list *SqueezeTitleL;
6450bbfda8aSnia
6460bbfda8aSnia	/// DontSqueezeTitle config var (list).  \sa ScreenInfo.SqueezeTitle
6470bbfda8aSnia	name_list *DontSqueezeTitleL;
6480bbfda8aSnia
6490bbfda8aSnia	/// AlwaysSqueezeToGravity config var (list).
6500bbfda8aSnia	/// \sa ScreenInfo.AlwaysSqueezeToGravity
6510bbfda8aSnia	name_list *AlwaysSqueezeToGravityL;
6520bbfda8aSnia
6530bbfda8aSnia	/// WindowRing config var (list).  Windows to put in warp ring.
6540bbfda8aSnia	/// \sa ScreenInfo.WindowRingAll
6550bbfda8aSnia	name_list *WindowRingL;
6560bbfda8aSnia
6570bbfda8aSnia	/// WindowRingExclude config var.  Windows to exclude from warp ring.
6580bbfda8aSnia	name_list *WindowRingExcludeL;
6590bbfda8aSnia
6600bbfda8aSnia	/// WarpCursor config var (list).  Windows to warp to on deiconify.
6610bbfda8aSnia	/// \sa ScreenInfo.WarpCursor
6620bbfda8aSnia	name_list *WarpCursorL;
6630bbfda8aSnia
6640bbfda8aSnia	/// DontSave config var.  Windows to not save info in session manager.
6650bbfda8aSnia	name_list *DontSave;
6660bbfda8aSnia
6670bbfda8aSnia	/// WindowGeometries config var.  Default geometries for windows.
6680bbfda8aSnia	name_list *WindowGeometries;
6690bbfda8aSnia
6700bbfda8aSnia	/// IgnoreTransient config var.  Windows that we should pretend
6710bbfda8aSnia	/// aren't transient even if they are.
6720bbfda8aSnia	name_list *IgnoreTransientL;
6730bbfda8aSnia
6740bbfda8aSnia	/// OpaqueMove config var (list).  Windows to move opaquely rather
6750bbfda8aSnia	/// than in outline.  \sa ScreenInfo.DoOpaqueMove
6760bbfda8aSnia	name_list *OpaqueMoveList;
6770bbfda8aSnia
6780bbfda8aSnia	/// NoOpaqueMove config var (list).  Windows to not move opaquely.
6790bbfda8aSnia	/// \sa ScreenInfo.DoOpaqueMove
6800bbfda8aSnia	name_list *NoOpaqueMoveList;
6810bbfda8aSnia
6820bbfda8aSnia	/// OpaqueResize config var (list).  Windows to resize opaquely
6830bbfda8aSnia	/// rather than in outline.  \sa ScreenInfo.DoOpaqueResize
6840bbfda8aSnia	name_list *OpaqueResizeList;
6850bbfda8aSnia
6860bbfda8aSnia	/// NoOpaqueResize config var (list).  Windows to not resize
6870bbfda8aSnia	/// opaquely.  \sa ScreenInfo.DoOpaqueResize
6880bbfda8aSnia	name_list *NoOpaqueResizeList;
6890bbfda8aSnia
6900bbfda8aSnia	/// IconMenuDontShow config var.  Windows whose icons to not list in
6910bbfda8aSnia	/// TwmIcons menu.
6920bbfda8aSnia	name_list *IconMenuDontShow;
6930bbfda8aSnia
6940bbfda8aSnia
6950bbfda8aSnia	/**
6960bbfda8aSnia	 * \defgroup scr_gc_bits Various graphics contexts
6970bbfda8aSnia	 * These are X Graphics Contexts, which are used for various sorts of
6980bbfda8aSnia	 * drawing in X.  Stuff that needs to draw lines, or write out text,
6990bbfda8aSnia	 * all needs to use a GC.  X-ref
7000bbfda8aSnia	 * <https://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html#Graphics_Context_Functions>
7010bbfda8aSnia	 * for upstream details.
7020bbfda8aSnia	 * @{
7030bbfda8aSnia	 */
7040bbfda8aSnia	GC NormalGC; ///< normal GC for everything
7050bbfda8aSnia	GC MenuGC;   ///< GC for menus
7060bbfda8aSnia	GC DrawGC;   ///< GC to draw lines for move and resize
7070bbfda8aSnia	GC BorderGC; ///< GC for drawing 3D borders
7080bbfda8aSnia	GC rootGC;   ///< GC for internal pixmaps in image.c / image_bitmap.c
7090bbfda8aSnia	/// @}
7100bbfda8aSnia
7110bbfda8aSnia	Pixel Black; ///< Stash of "Black" X color for the screen
7120bbfda8aSnia	Pixel White; ///< Stash of "White" X color for the screen
7130bbfda8aSnia	unsigned long XORvalue;  ///< XorValue config var, or default
7140bbfda8aSnia
7150bbfda8aSnia	/// \defgroup scr_font_bits Various font settings
7160bbfda8aSnia	/// Definitions of various fonts to use on the Screen.
7170bbfda8aSnia	/// @{
7180bbfda8aSnia	MyFont TitleBarFont;     ///< TitleFont config var
7190bbfda8aSnia	MyFont MenuFont;         ///< MenuFont config var
7200bbfda8aSnia	MyFont IconFont;         ///< IconFont config var
7210bbfda8aSnia	MyFont SizeFont;         ///< SizeFont config var
7220bbfda8aSnia	MyFont IconManagerFont;  ///< IconManagerFont config var
7230bbfda8aSnia	MyFont DefaultFont;      ///< Hardcoded fallback font
7240bbfda8aSnia	/// @}
7250bbfda8aSnia
7260bbfda8aSnia	/// Head of linked list of Screen's icon managers.  The head is also
7270bbfda8aSnia	/// the default icon manager for the screen.  \sa ScreenInfo.IconMgrs
7280bbfda8aSnia	IconMgr *iconmgr;
7290bbfda8aSnia
7300bbfda8aSnia	/// Head of the list of IconRegion structs on the Screen.  Built out
7310bbfda8aSnia	/// from %IconRegion config var.
7320bbfda8aSnia	struct IconRegion *FirstRegion;
7330bbfda8aSnia
7340bbfda8aSnia	/// Tail of the list of IconRegion structs on the Screen.  Used as an
7350bbfda8aSnia	/// optimization in configuring the list on startup.  \todo Is this
7360bbfda8aSnia	/// actually necessary?  Does the order matter?
7370bbfda8aSnia	struct IconRegion *LastRegion;
7380bbfda8aSnia
7390bbfda8aSnia	/// Pointer to head of list of window regions on screen.  Built from
7400bbfda8aSnia	/// %WindowRegion config var.
7410bbfda8aSnia	struct WindowRegion *FirstWindowRegion;
7420bbfda8aSnia
743df1c27a6Snia#ifdef WINBOX
7440bbfda8aSnia	/// Pointer to head of list of windowboxes on screen.  Built from
7450bbfda8aSnia	/// %WindowBox config var.
7460bbfda8aSnia	WindowBox *FirstWindowBox;
747df1c27a6Snia#endif
7480bbfda8aSnia
7490bbfda8aSnia	char *IconDirectory;    ///< IconDirectory config var
7500bbfda8aSnia	char *PixmapDirectory;  ///< PixmapDirectory config var
7510bbfda8aSnia
7520bbfda8aSnia	int SizeStringOffset;   ///< X offset in size window for drawing
7530bbfda8aSnia	int SizeStringWidth;    ///< Minimum width of size window
7540bbfda8aSnia
7550bbfda8aSnia	int BorderWidth;        ///< BorderWidth config var
7560bbfda8aSnia	int BorderLeft;         ///< BorderLeft config var
7570bbfda8aSnia	int BorderRight;        ///< BorderRight config var
7580bbfda8aSnia	int BorderTop;          ///< BorderTop config var
7590bbfda8aSnia	int BorderBottom;       ///< BorderBottom config var
7600bbfda8aSnia	int ThreeDBorderWidth;  ///< ThreeDBorderWidth config var
7610bbfda8aSnia	int IconBorderWidth;    ///< IconBorderWidth config var
7620bbfda8aSnia
7630bbfda8aSnia	/// Height of the title bar window.  Calculated from font height and
7640bbfda8aSnia	/// padding.  \todo Maybe this should be in ScreenInfo.TBInfo above?
7650bbfda8aSnia	/// Same can be said for a number of following fields that are
7660bbfda8aSnia	/// titlebar related...
7670bbfda8aSnia	int TitleHeight;
7680bbfda8aSnia
7690bbfda8aSnia	TwmWindow *Focus;    ///< The twm window that has focus.
7700bbfda8aSnia	int EntryHeight;     ///< Menu entry height.  Calc'd from font height.
7710bbfda8aSnia
7720bbfda8aSnia	/// FramePadding config var.  Distance between titlebar contents and
7730bbfda8aSnia	/// frame.
7740bbfda8aSnia	int FramePadding;
7750bbfda8aSnia	/// TitlePadding config var.  Distance between items in titlebar.
7760bbfda8aSnia	int TitlePadding;
7770bbfda8aSnia
7780bbfda8aSnia	/// ButtonIndent config var.  Amount to shrink titlebar buttons.
7790bbfda8aSnia	int ButtonIndent;
7800bbfda8aSnia	int NumAutoRaises;   ///< Number of autoraise windows on screen
7810bbfda8aSnia	int NumAutoLowers;   ///< Number of autolower windows on screen
7820bbfda8aSnia	int TransientOnTop;  ///< TransientOnTop config var
7830bbfda8aSnia
7840bbfda8aSnia	/// AutoRaise config flag.  \sa ScreenInfo.AutoRaise
7850bbfda8aSnia	bool AutoRaiseDefault;
7860bbfda8aSnia
7870bbfda8aSnia	/// AutoLower config flag.  \sa ScreenInfo.AutoLower
7880bbfda8aSnia	bool AutoLowerDefault;
7890bbfda8aSnia
7900bbfda8aSnia	bool NoDefaults;    ///< NoDefaults config var
7910bbfda8aSnia	UsePPoss UsePPosition;     ///< UsePPosition config var
7920bbfda8aSnia	bool UseSunkTitlePixmap;  ///< UseSunkTitlePixmap config var
7930bbfda8aSnia	bool AutoRelativeResize;  ///< AutoRelativeResize config var
7940bbfda8aSnia
7950bbfda8aSnia	/// Whether focus is allowed to move.  At one point this allegedly
7960bbfda8aSnia	/// meant something like "is the input focus on the root?".  In
7970bbfda8aSnia	/// current use, however, it's used as a flag for whether to
7980bbfda8aSnia	/// auto-move focus to a new window; it's set to false in the
7990bbfda8aSnia	/// ClickToFocus case, as well as when f.focus is called on a window,
8000bbfda8aSnia	/// and then prevents Enter notifications from setting focus on new
8010bbfda8aSnia	/// windows.
8020bbfda8aSnia	/// \todo Rename to something better fitting.
8030bbfda8aSnia	bool  FocusRoot;
8040bbfda8aSnia
8050bbfda8aSnia	bool WarpCursor;    ///< WarpCursor config var.  \sa ScreenInfo.WarpCursorL
8060bbfda8aSnia	bool ForceIcon;     ///< ForceIcons config var
8070bbfda8aSnia	bool NoGrabServer;  ///< NoGrabServer config var
8080bbfda8aSnia	bool NoRaiseMove;   ///< NoRaiseOnMove config var
8090bbfda8aSnia	bool NoRaiseResize; ///< NoRaiseOnResize config var
8100bbfda8aSnia	bool NoRaiseDeicon; ///< NoRaiseOnDeiconify config var
8110bbfda8aSnia	bool RaiseOnWarp;   ///< NoRaiseOnWarp config var (inverse)
8120bbfda8aSnia	bool DontMoveOff;   ///< DontMoveOff config var
8130bbfda8aSnia	int MoveOffResistance;  ///< MoveOffResistence config var
8140bbfda8aSnia	int MovePackResistance; ///< MovePackResistence config var
8150bbfda8aSnia
8160bbfda8aSnia	/// Whether we're animating [de]iconification zooms.  From Zoom
8170bbfda8aSnia	/// config var.  \sa ScreenInfo.ZoomCount
8180bbfda8aSnia	bool DoZoom;
8190bbfda8aSnia
8200bbfda8aSnia	bool TitleFocus;       ///< NoTitleFocus config var (inverse)
8210bbfda8aSnia	bool IconManagerFocus; ///< NoIconManagerFocus config var (inverse)
8220bbfda8aSnia
8230bbfda8aSnia	/// NoIconTitle config var.  \sa ScreenInfo.NoIconTitle
8240bbfda8aSnia	bool NoIconTitlebar;
8250bbfda8aSnia
8260bbfda8aSnia	/// NoTitle config var.  \sa ScreenInfo.NoTitle
8270bbfda8aSnia	bool NoTitlebar;
8280bbfda8aSnia
8290bbfda8aSnia	bool DecorateTransients; ///< DecorateTransients config var
8300bbfda8aSnia
8310bbfda8aSnia	/// IconifyByUnmapping config var.  \sa ScreenInfo.IconifyByUn
8320bbfda8aSnia	bool IconifyByUnmapping;
8330bbfda8aSnia
8340bbfda8aSnia	bool ShowIconManager; ///< ShowIconManager config var
8350bbfda8aSnia	bool ShowWorkspaceManager; ///< ShowWorkSpaceManager config var
8360bbfda8aSnia
8370bbfda8aSnia	/// IconManagerDontShow config var.  \sa ScreenInfo.IconMgrNoShow
8380bbfda8aSnia	bool IconManagerDontShow;
8390bbfda8aSnia
8400bbfda8aSnia	bool AutoOccupy;   ///< AutoOccupy config var
8410bbfda8aSnia	bool AutoPriority; ///< AutoPriority config var
8420bbfda8aSnia	bool TransientHasOccupation; ///< TransientHasOccupation config var
8430bbfda8aSnia	bool DontPaintRootWindow;    ///< DontPaintRootWindow config var
8440bbfda8aSnia	bool BackingStore; ///< BackingStore config var
8450bbfda8aSnia	bool SaveUnder;    ///< NoSaveUnders config var (inverse)
8460bbfda8aSnia	RandPlac RandomPlacement;  ///< RandomPlacement config var (1st arg)
8470bbfda8aSnia	short RandomDisplacementX; ///< RandomPlacement config var (2nd arg)
8480bbfda8aSnia	short RandomDisplacementY; ///< RandomPlacement config var (2nd arg)
8490bbfda8aSnia
8500bbfda8aSnia	/// Whether we're doing a window opaque move.  This is set at runtime
8510bbfda8aSnia	/// for each particular move we start doing, acting as a "what are we
8520bbfda8aSnia	/// in the middle of" flag.  It will get figured based on various
8530bbfda8aSnia	/// things, like TwmWindow.OpaqueMove and
8540bbfda8aSnia	/// ScreenInfo.OpaqueMoveThreshold.
8550bbfda8aSnia	bool OpaqueMove;
8560bbfda8aSnia
8570bbfda8aSnia	/// OpaqueMove config var.  \sa ScreenInfo.OpaqueMoveList
8580bbfda8aSnia	bool DoOpaqueMove;
8590bbfda8aSnia
8600bbfda8aSnia	unsigned short OpaqueMoveThreshold;  ///< OpaqueMoveThreshold config var
8610bbfda8aSnia
8620bbfda8aSnia	/// OpaqueResize config var.  \sa ScreenInfo.OpaqueResizeList
8630bbfda8aSnia	bool DoOpaqueResize;
8640bbfda8aSnia
8650bbfda8aSnia	/// Whether we're in the midst of an opaque resizing.  Transiently
8660bbfda8aSnia	/// set at runtime based on things like TwmWindow.OpaqueResize and
8670bbfda8aSnia	/// ScreenInfo.OpaqueResizeThreshold.  X-ref ScreenInfo.OpaqueMove
8680bbfda8aSnia	/// for its counterpart in the window-moving department.
8690bbfda8aSnia	bool OpaqueResize;
8700bbfda8aSnia
8710bbfda8aSnia	unsigned short OpaqueResizeThreshold; ///< OpaqueResizeThreshold config var
8720bbfda8aSnia
8730bbfda8aSnia	/// NoHighlight config var (inverse).  \sa ScreenInfo.NoHighlight
8740bbfda8aSnia	bool Highlight;
8750bbfda8aSnia
8760bbfda8aSnia	/// NoStackMode config var (inverse).  \sa ScreenInfo.NoStackModeL
8770bbfda8aSnia	bool StackMode;
8780bbfda8aSnia
8790bbfda8aSnia	/// NoTitleHighlight config var (inverse).  \sa ScreenInfo.NoTitleHighlight
8800bbfda8aSnia	bool TitleHighlight;
8810bbfda8aSnia
8820bbfda8aSnia	/// MoveDelta config var.  Number of pixels before f.move starts
8830bbfda8aSnia	short MoveDelta;
8840bbfda8aSnia
8850bbfda8aSnia	/// Zoom config var.  Number of animated steps in [de]iconifying.
8860bbfda8aSnia	short ZoomCount;
8870bbfda8aSnia
8880bbfda8aSnia	bool SortIconMgr;  ///< SortIconManager config var
8890bbfda8aSnia	bool Shadow;       ///< NoMenuShadows config var (inverse)
8900bbfda8aSnia	bool InterpolateMenuColors;  ///< InterpolateMenuColors config var
8910bbfda8aSnia	bool StayUpMenus;  ///< StayUpMenus config var
8920bbfda8aSnia	bool WarpToDefaultMenuEntry; ///< WarpToDefaultMenuEntry config var
8930bbfda8aSnia	bool ClickToFocus; ///< ClickToFocus config var
8940bbfda8aSnia	bool SloppyFocus;  ///< SloppyFocus config var
8950bbfda8aSnia	bool SaveWorkspaceFocus; ///< SaveWorkspaceFocus config var
8960bbfda8aSnia	bool NoIconManagers;     ///< NoIconManagers config var
8970bbfda8aSnia	bool ClientBorderWidth;  ///< ClientBorderWidth config var
8980bbfda8aSnia
8990bbfda8aSnia	/// SqueezeTitle and/or DontSqueezeTitle config vars.
9000bbfda8aSnia	/// \sa ScreenInfo.SqueezeTitleL  \sa ScreenInfo.DontSqueezeTitleL
9010bbfda8aSnia	bool SqueezeTitle;
9020bbfda8aSnia
9030bbfda8aSnia	/// AlwaysSqueezeToGravity config var.
9040bbfda8aSnia	/// \sa ScreenInfo.AlwaysSqueezeToGravityL
9050bbfda8aSnia	bool AlwaysSqueezeToGravity;
9060bbfda8aSnia
9070bbfda8aSnia	/// Whether fonts have been loaded yet in the startup process
9080bbfda8aSnia	bool HaveFonts;
9090bbfda8aSnia
9100bbfda8aSnia	/// Some sort of attempt to determine whether this is the first
9110bbfda8aSnia	/// config file we've parsed for this screen (which is bogus, since
9120bbfda8aSnia	/// we only parse one file for each screen!), but also used in some
9130bbfda8aSnia	/// color getting for obscure reasons.  This needs careful
9140bbfda8aSnia	/// consideration and auditing; it may be just bogus.  X-ref work
9150bbfda8aSnia	/// vtwm did in adjusting its use in GetColor() to avoid all the
9160bbfda8aSnia	/// save/restore dances on calls around it, and the \#ifdef inside
9170bbfda8aSnia	/// GetColor().  \todo Evaulate to determine whether it should exist.
9180bbfda8aSnia	bool FirstTime;
9190bbfda8aSnia
9200bbfda8aSnia	bool  CaseSensitive; ///< NoCaseSensitive config var (inverse)
9210bbfda8aSnia	bool  WarpUnmapped;  ///< WarpUnmapped config var
9220bbfda8aSnia	bool  WindowRingAll; ///< WindowRing config var.  \sa ScreenInfo.WindowRingL
9230bbfda8aSnia	bool  WarpRingAnyWhere;       ///< WarpRingOnScreen config var (inverse)
9240bbfda8aSnia	bool  ShortAllWindowsMenus;   ///< ShortAllWindowsMenus config var
9250bbfda8aSnia	short OpenWindowTimeout;      ///< OpenWindowTimeout config var
9260bbfda8aSnia	bool  RaiseWhenAutoUnSqueeze; ///< RaiseWhenAutoUnSqueeze config var
9270bbfda8aSnia	bool  RaiseOnClick;           ///< RaiseOnClick config var
9280bbfda8aSnia	short RaiseOnClickButton;     ///< RaiseOnClickButton config var
9290bbfda8aSnia	unsigned int IgnoreModifier;  ///< IgnoreModifier config var
9300bbfda8aSnia	bool IgnoreCaseInMenuSelection;  ///< IgnoreCaseInMenuSelection config var
9310bbfda8aSnia	bool NoWarpToMenuTitle;          ///< NoWarpToMenuTitle config var
9320bbfda8aSnia	bool NoImagesInWorkSpaceManager; ///< NoImagesInWorkSpaceManager config var
9330bbfda8aSnia
9340bbfda8aSnia	/// DontToggleWorkspaceManagerState config var
9350bbfda8aSnia	bool DontToggleWorkspaceManagerState;
9360bbfda8aSnia
9370bbfda8aSnia	/// Whether to show the welcome window.  Related to the
9380bbfda8aSnia	/// DontShowWelcomeWindow config var or the \--nowelcome command-line
9390bbfda8aSnia	/// arg.  \ingroup scr_maskwin
9400bbfda8aSnia	bool ShowWelcomeWindow;
9410bbfda8aSnia
9420bbfda8aSnia	bool NameDecorations;  ///< DontNameDecorations config var (inverse)
9430bbfda8aSnia
9440bbfda8aSnia	/// Whether to be strict about what encoding of window naming
9450bbfda8aSnia	/// properties (WM_NAME etc) we accept.  From StrictWinNameEncoding
9460bbfda8aSnia	/// config var.
9470bbfda8aSnia	bool StrictWinNameEncoding;
9480bbfda8aSnia
9490bbfda8aSnia	/// ForceFocus config var.  Forcing focus-setting on windows.
9500bbfda8aSnia	/// \sa ScreenInfo.ForceFocusL
9510bbfda8aSnia	bool      ForceFocus;
9520bbfda8aSnia	/// \copybrief ForceFocus \sa ScreenInfo.ForceFocus
9530bbfda8aSnia	name_list *ForceFocusL;
9540bbfda8aSnia
9550bbfda8aSnia	FuncKey FuncKeyRoot;       ///< Key bindings
9560bbfda8aSnia	FuncButton FuncButtonRoot; ///< Mouse click bindings
9570bbfda8aSnia
9580bbfda8aSnia#ifdef EWMH
9590bbfda8aSnia	/// Special-purpose window for WM_S<screennum> window selection.  See
9600bbfda8aSnia	/// ICCCM sections 4.3, 2.8.
9610bbfda8aSnia	Window icccm_Window;
9620bbfda8aSnia
9630bbfda8aSnia	/// List of known client windows.  Stashed in _NET_CLIENT_LIST
9640bbfda8aSnia	/// property.
9650bbfda8aSnia	long *ewmh_CLIENT_LIST;
9660bbfda8aSnia	int ewmh_CLIENT_LIST_size; ///< Allocated ScreenInfo.ewmh_CLIENT_LIST memory
9670bbfda8aSnia	int ewmh_CLIENT_LIST_used; ///< Used ScreenInfo.ewmh_CLIENT_LIST slots
9680bbfda8aSnia
9690bbfda8aSnia	/// List of EWMH struts.  From _NET_WM_STRUT properties.  EWMH config
9700bbfda8aSnia	/// for windows that reserve spaces at the sides of a screen (e.g.,
9710bbfda8aSnia	/// taskbars, panels, etc).
9720bbfda8aSnia	EwmhStrut *ewmhStruts;
9730bbfda8aSnia
9740bbfda8aSnia	name_list *EWMHIgnore; ///< EWMHIgnore config var.  Messages to ignore.
9750bbfda8aSnia#endif /* EWMH */
9760bbfda8aSnia
9770bbfda8aSnia	name_list *MWMIgnore; ///< Motif WM messages to ignore
978645f5050Syouri};
979645f5050Syouri
980645f5050Syouri
981645f5050Syouri
9820bbfda8aSnia/*
9830bbfda8aSnia * A few global vars that talk about Screen stuff
9840bbfda8aSnia */
9850bbfda8aSniaextern int NumScreens;  ///< How many Screens are on our display
9860bbfda8aSniaextern ScreenInfo **ScreenList; ///< List of ScreenInfo structs for each Screen
9870bbfda8aSniaextern ScreenInfo *Scr; ///< The ScreenInfo struct for the current Screen
988645f5050Syouri
989645f5050Syouri
9900bbfda8aSnia#endif /* _CTWM_SCREEN_H */
991