1: #ifndef lint
   2: static char *rcsid_globals_c = "$Header: globals.c,v 10.3 86/02/01 16:24:12 tony Rel $";
   3: #endif	lint
   4: 
   5: /************************************************************************
   6:  *									*
   7:  *			Copyright (c) 1986 by				*
   8:  *		Digital Equipment Corporation, Maynard, MA		*
   9:  *		         All Rights Reserved.				*
  10:  *									*
  11:  *	Permission to use, copy, modify, and distribute this software	*
  12:  *	and its documentation is hereby granted only to licensees of 	*
  13:  *	The Regents of the University of California pursuant to their	*
  14:  *	license agreement for the Berkeley Software Distribution 	*
  15:  *	provided that the following appears on all copies.		*
  16:  *									*
  17:  *            "LICENSED FROM DIGITAL EQUIPMENT CORPORATION		*
  18:  *                      COPYRIGHT (C) 1986				*
  19:  *                 DIGITAL EQUIPMENT CORPORATION			*
  20:  *                         MAYNARD, MA					*
  21:  *                     ALL RIGHTS RESERVED.				*
  22:  *									*
  23:  *      THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT	*
  24:  *	NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL	*
  25:  *	EQUIPMENT CORPORATION.  DIGITAL MAKES NO REPRESENTATIONS	*
  26:  *	ABOUT SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS	*
  27:  *	SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.		*
  28:  *									*
  29:  * 	IF THE UNIVERSITY OF CALIFORNIA OR ITS LICENSEES MODIFY 	*
  30:  *	THE SOFTWARE IN A MANNER CREATING DERIVATIVE COPYRIGHT 		*
  31:  *	RIGHTS APPROPRIATE COPYRIGHT LEGENDS MAY BE PLACED ON THE	*
  32:  *	DERIVATIVE WORK IN ADDITION TO THAT SET FORTH ABOVE."		*
  33:  *									*
  34:  ************************************************************************/
  35: 
  36: 
  37: /*
  38:  * MODIFICATION HISTORY
  39:  *
  40:  * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  41:  */
  42: 
  43: #ifndef lint
  44: static char *sccsid = "@(#)globals.c	3.8	1/24/86";
  45: #endif
  46: /*
  47:  * globals.c - window manager global data
  48:  *
  49:  */
  50: 
  51: #include "uwm.h"
  52: 
  53: Window Pop;         /* Pop up dimension display window. */
  54: Window Frozen;          /* Contains window id of "gridded" window. */
  55: Font IFont;         /* Icon text font. */
  56: Font PFont;         /* Pop-up text font. */
  57: Font MFont;         /* Menu text font. */
  58: FontInfo IFontInfo;     /* Icon text font information. */
  59: FontInfo PFontInfo;     /* Pop-up text font information. */
  60: FontInfo MFontInfo;     /* Menu text font information. */
  61: Pixmap GrayPixmap;      /* Gray pixmap. */
  62: Pixmap IBorder;         /* Icon window border pixmap. */
  63: Pixmap IBackground;     /* Icon window background pixmap. */
  64: Pixmap PBorder;         /* Pop-Up Window border pixmap. */
  65: Pixmap PBackground;     /* Pop-up Window background pixmap. */
  66: Pixmap MBorder;         /* Menu Window border pixmap. */
  67: Pixmap MBackground;     /* Menu Window background pixmap. */
  68: Cursor ArrowCrossCursor;    /* Arrow cross cursor. */
  69: Cursor TextCursor;      /* Text cursor used in icon windows. */
  70: Cursor IconCursor;      /* Icon Cursor. */
  71: Cursor MenuCursor;      /* Menu cursor. */
  72: Cursor MenuMaskCursor;      /* Menu mask cursor. */
  73: Cursor LeftButtonCursor;    /* Left button main cursor. */
  74: Cursor MiddleButtonCursor;  /* Middle button main cursor. */
  75: Cursor RightButtonCursor;   /* Right button main cursor. */
  76: int ScreenWidth;        /* Display screen width. */
  77: int ScreenHeight;       /* Display screen height. */
  78: int CursorFunc;         /* Mouse cursor function. */
  79: int IconCursorFunc;     /* Icon Mouse Cursor function. */
  80: int ITextForground;     /* Icon window text forground color. */
  81: int ITextBackground;        /* Icon window text background color. */
  82: int IBorderWidth;       /* Icon window border width. */
  83: int PTextForground;     /* Pop-up window text forground color. */
  84: int PTextBackground;        /* Pop-up window text background color. */
  85: int MTextForground;     /* Menu window text forground color. */
  86: int MTextBackground;        /* Menu window text background color. */
  87: int PWidth;         /* Pop-up window width. */
  88: int PHeight;            /* Pop-up window height. */
  89: int PBorderWidth;       /* Pop-up window border width. */
  90: int PPadding;           /* Pop-up window padding. */
  91: int MBorderWidth;       /* Menu window border width. */
  92: int MPadding;           /* Menu window padding. */
  93: int ButtonMask;         /* Global mouse button event mask. */
  94: int Delay;          /* Delay between clicks of a double click. */
  95: int Delta;          /* Mouse movement slop. */
  96: int HIconPad;           /* Icon horizontal padding. */
  97: int VIconPad;           /* Icon vertical padding. */
  98: int HMenuPad;           /* Menu horizontal padding. */
  99: int VMenuPad;           /* Menu vertical padding. */
 100: int MaxColors;          /* Maximum number of colors to use. */
 101: int Pushval;            /* Number of pixels to push window by. */
 102: int Volume;         /* Audible alarm volume. */
 103: int status;         /* Routine return status. */
 104: int Maxfd;          /* Maximum file descriptors for select(2). */
 105: MenuLink *Menus;        /* Linked list of menus. */
 106: Binding *Blist;         /* Button/key binding list. */
 107: 
 108: Bool Autoselect;        /* Warp mouse to default menu selection? */
 109: Bool Freeze;            /* Freeze server during move/resize? */
 110: Bool Grid;          /* Should the m/r box contain a 9 seg. grid. */
 111: Bool NWindow;                /* Normalize windows? */
 112: Bool NIcon;                  /* Normalize icons? */
 113: Bool Push;          /* Relative=TRUE, Absolute=FALSE. */
 114: Bool Reverse;           /* Reverse video? */
 115: Bool Zap;           /* Should the the zap effect be used. */
 116: 
 117: char PText[7] = INIT_PTEXT; /* Pop-up window dummy text. */
 118: int PTextSize = sizeof(PText);  /* Pop-up window dummy text size. */
 119: 
 120: int Lineno = 1;         /* Line count for parser. */
 121: Bool Startup_File_Error = FALSE;/* Startup file error flag. */
 122: char Startup_File[NAME_LEN] = "";/* Startup file name. */
 123: char IFontName[NAME_LEN];   /* Icon font name. */
 124: char PFontName[NAME_LEN];   /* Pop-up font name. */
 125: char MFontName[NAME_LEN];   /* Menu font name. */
 126: char **Argv;            /* Pointer to command line parameters. */
 127: char **Environ;         /* Pointer to environment. */
 128: 
 129: /*
 130:  * Keyword lookup table for parser.
 131:  */
 132: Keyword KeywordTable[] = {
 133:     { "autoselect", IsBoolTrue, &Autoselect,0,0,0 },
 134:     { "delay",      IsNumeric,  0,&Delay,0,0 },
 135:     { "delta",      IsNumeric,  0,&Delta,0,0 },
 136:     { "freeze",     IsBoolTrue, &Freeze,0,0,0 },
 137:     { "iconfont",   IsString,   0,0,IFontName,0 },
 138:     { "f.beep",     IsFunction, 0,0,0,Beep },
 139:     { "f.circledown",   IsFunction, 0,0,0,CircleDown },
 140:     { "f.circleup", IsFunction, 0,0,0,CircleUp },
 141:     { "f.continue", IsFunction, 0,0,0,Continue },
 142:     { "f.focus",    IsFunction, 0,0,0,Focus },
 143:     { "f.iconify",  IsFunction, 0,0,0,Iconify },
 144:     { "f.lower",    IsFunction, 0,0,0,Lower },
 145:     { "f.menu",     IsMenuMap,  0,0,0,Menu },
 146:     { "f.move",     IsDownFunction, 0,0,0,Move },
 147:     { "f.moveopaque",   IsDownFunction, 0,0,0,MoveOpaque },
 148:     { "f.newiconify",   IsDownFunction, 0,0,0,NewIconify },
 149:     { "f.pause",    IsFunction, 0,0,0,Pause },
 150:     { "f.pushdown", IsFunction, 0,0,0,PushDown },
 151:     { "f.pushleft", IsFunction, 0,0,0,PushLeft },
 152:     { "f.pushright",    IsFunction, 0,0,0,PushRight },
 153:     { "f.pushup",   IsFunction, 0,0,0,PushUp },
 154:     { "f.raise",    IsFunction, 0,0,0,Raise },
 155:     { "f.refresh",  IsFunction, 0,0,0,Refresh },
 156:     { "f.resize",   IsDownFunction, 0,0,0,Resize },
 157:     { "f.restart",  IsQuitFunction, 0,0,0,Restart },
 158:     { "grid",       IsBoolTrue, &Grid,0,0,0 },
 159:     { "hiconpad",   IsNumeric,  0,&HIconPad,0,0 },
 160:     { "hmenupad",   IsNumeric,  0,&HMenuPad,0,0 },
 161:     { "maxcolors",  IsNumeric,  0,&MaxColors,0,0 },
 162:     { "menu",       IsMenu,     0,0,0,0 },
 163:     { "menufont",   IsString,   0,0,MFontName,0 },
 164:     { "noautoselect",   IsBoolFalse,    &Autoselect,0,0,0 },
 165:     { "nofreeze",   IsBoolFalse,    &Freeze,0,0,0 },
 166:     { "nogrid",     IsBoolFalse,    &Grid,0,0,0 },
 167:     { "nonormali",  IsBoolFalse,    &NIcon,0,0,0 },
 168:     { "nonormalw",  IsBoolFalse,    &NWindow,0,0,0 },
 169:     { "noreverse",  IsBoolFalse,    &Reverse,0,0,0 },
 170:     { "normali",    IsBoolTrue, &NIcon,0,0,0 },
 171:     { "normalw",    IsBoolTrue, &NWindow,0,0,0 },
 172:     { "nozap",      IsBoolFalse,    &Zap,0,0,0 },
 173:     { "push",       IsNumeric,  0,&Pushval,0,0 },
 174:     { "pushabsolute",   IsBoolFalse,    &Push,0,0,0 },
 175:     { "pushrelative",   IsBoolTrue, &Push,0,0,0 },
 176:     { "resetbindings",  IsParser,   0,0,0,ResetBindings },
 177:     { "resetmenus", IsParser,   0,0,0,ResetMenus },
 178:     { "resetvariables", IsParser,   0,0,0,ResetVariables },
 179:     { "resizefont", IsString,   0,0,PFontName,0 },
 180:     { "reverse",    IsBoolTrue, &Reverse,0,0,0 },
 181:     { "viconpad",   IsNumeric,  0,&VIconPad,0,0 },
 182:     { "vmenupad",   IsNumeric,  0,&VMenuPad,0,0 },
 183:     { "volume",     IsNumeric,  0,&Volume,0,0 },
 184:     { "zap",        IsBoolTrue, &Zap,0,0,0 },
 185:     { NULL,     NULL,       NULL,NULL,NULL,NULL }
 186: };
 187: 
 188: /*
 189:  * Key expression table for parser.
 190:  */
 191: KeyExpr KeyExprTbl[] = {
 192:     { "ctrl", ControlMask },
 193:     { "c", ControlMask },
 194:     { "lock", ShiftLockMask },
 195:     { "l", ShiftLockMask },
 196:     { "meta", MetaMask },
 197:     { "m", MetaMask },
 198:     { "shift", ShiftMask },
 199:     { "s", ShiftMask },
 200:     { NULL, NULL }
 201: };
 202: 
 203: /*
 204:  * Context expression table for parser.
 205:  */
 206: ContExpr ContExprTbl[] = {
 207:     { "icon", ICON },
 208:     { "i", ICON },
 209:     { "root", ROOT },
 210:     { "r", ROOT },
 211:     { "window", WINDOW },
 212:     { "w", WINDOW },
 213:     { NULL, NULL }
 214: };
 215: 
 216: /*
 217:  * Button expression table for parser.
 218:  */
 219: ButtonModifier ButtModTbl[] = {
 220:     { "left", LeftMask },
 221:     { "leftbutton", LeftMask },
 222:     { "l", LeftMask },
 223:     { "middle", MiddleMask },
 224:     { "middlebutton", MiddleMask },
 225:     { "m", MiddleMask },
 226:     { "right", RightMask },
 227:     { "rightbutton", RightMask },
 228:     { "r", RightMask },
 229:     /*
 230:      * The following are for double-clicking the mouse.  It's a future!
 231:      */
 232:     /***
 233:     { "double", DoubleClick },
 234:     { "doubleclick", DoubleClick },
 235:     { "dclick", DoubleClick },
 236:     ***/
 237:     { "move", DeltaMotion },
 238:     { "motion", DeltaMotion },
 239:     { "delta", DeltaMotion },
 240:     { "down", ButtonDown },
 241:     { "d", ButtonDown },
 242:     { "up", ButtonUp },
 243:     { "u", ButtonUp },
 244:     { NULL, NULL }
 245: };

Defined variables

Argv defined in line 126; never used
ArrowCrossCursor defined in line 68; never used
Autoselect defined in line 108; used 2 times
Blist defined in line 106; never used
ButtModTbl defined in line 219; never used
ButtonMask defined in line 93; never used
ContExprTbl defined in line 206; never used
CursorFunc defined in line 78; never used
Delay defined in line 94; used 1 times
Delta defined in line 95; used 1 times
Environ defined in line 127; never used
Freeze defined in line 109; used 2 times
Frozen defined in line 54; never used
GrayPixmap defined in line 61; never used
Grid defined in line 110; used 2 times
HIconPad defined in line 96; used 1 times
HMenuPad defined in line 98; used 1 times
IBackground defined in line 63; never used
IBorder defined in line 62; never used
IBorderWidth defined in line 82; never used
IFont defined in line 55; never used
IFontInfo defined in line 58; never used
IFontName defined in line 123; used 1 times
ITextBackground defined in line 81; never used
ITextForground defined in line 80; never used
IconCursor defined in line 70; never used
IconCursorFunc defined in line 79; never used
KeyExprTbl defined in line 191; never used
KeywordTable defined in line 132; never used
LeftButtonCursor defined in line 73; never used
Lineno defined in line 120; never used
MBackground defined in line 67; never used
MBorder defined in line 66; never used
MBorderWidth defined in line 91; never used
MFont defined in line 57; never used
MFontInfo defined in line 60; never used
MFontName defined in line 125; used 1 times
MPadding defined in line 92; never used
MTextBackground defined in line 86; never used
MTextForground defined in line 85; never used
MaxColors defined in line 100; used 1 times
Maxfd defined in line 104; never used
MenuCursor defined in line 71; never used
MenuMaskCursor defined in line 72; never used
Menus defined in line 105; never used
MiddleButtonCursor defined in line 74; never used
NIcon defined in line 112; used 2 times
NWindow defined in line 111; used 2 times
PBackground defined in line 65; never used
PBorder defined in line 64; never used
PBorderWidth defined in line 89; never used
PFont defined in line 56; never used
PFontInfo defined in line 59; never used
PFontName defined in line 124; used 1 times
PHeight defined in line 88; never used
PPadding defined in line 90; never used
PText defined in line 117; used 1 times
PTextBackground defined in line 84; never used
PTextForground defined in line 83; never used
PTextSize defined in line 118; never used
PWidth defined in line 87; never used
Pop defined in line 53; never used
Push defined in line 113; used 2 times
Pushval defined in line 101; used 1 times
Reverse defined in line 114; used 2 times
RightButtonCursor defined in line 75; never used
ScreenHeight defined in line 77; never used
ScreenWidth defined in line 76; never used
Startup_File defined in line 122; never used
Startup_File_Error defined in line 121; never used
TextCursor defined in line 69; never used
VIconPad defined in line 97; used 1 times
VMenuPad defined in line 99; used 1 times
Volume defined in line 102; used 1 times
Zap defined in line 115; used 2 times
rcsid_globals_c defined in line 2; never used
sccsid defined in line 44; never used
status defined in line 103; never used
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1966
Valid CSS Valid XHTML 1.0 Strict