home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / awm2 / part05 / awm.h next >
Encoding:
C/C++ Source or Header  |  1989-02-20  |  21.8 KB  |  665 lines

  1. #ifndef lint
  2. static char *rcsid_awm_h = "$Header: /usr/graph2/X11.3/contrib/windowmgrs/awm/RCS/awm.h,v 1.2 89/02/07 21:24:27 jkh Exp $";
  3. #endif  lint
  4.  
  5. #include <X11/copyright.h>
  6. /*
  7.  *
  8.  * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  9.  *
  10.  * Copyright 1987 by Jordan Hubbard.
  11.  *
  12.  *
  13.  *                         All Rights Reserved
  14.  *
  15.  * Permission to use, copy, modify, and distribute this software and its
  16.  * documentation for any purpose and without fee is hereby granted,
  17.  * provided that the above copyright notice appear in all copies and that
  18.  * both that copyright notice and this permission notice appear in
  19.  * supporting documentation, and that the name of Ardent Computer
  20.  * Corporation or Jordan Hubbard not be used in advertising or publicity
  21.  * pertaining to distribution of the software without specific, written
  22.  * prior permission.
  23.  *
  24.  */
  25.  
  26. /*
  27.  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  28.  *
  29.  *                         All Rights Reserved
  30.  *
  31.  * Permission to use, copy, modify, and distribute this software and its
  32.  * documentation for any purpose and without fee is hereby granted,
  33.  * provided that the above copyright notice appear in all copies and that
  34.  * both that copyright notice and this permission notice appear in
  35.  * supporting documentation, and that the name of Digital Equipment
  36.  * Corporation not be used in advertising or publicity pertaining to
  37.  * distribution of the software without specific, written prior permission.
  38.  *
  39.  *
  40.  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  41.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  42.  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  43.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  44.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  45.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  46.  * SOFTWARE.
  47.  */
  48.  
  49.  
  50.  
  51. /*
  52.  * MODIFICATION HISTORY
  53.  *
  54.  * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  55.  * 001 -- R. Kittell, DEC Storage A/D May 19, 1986
  56.  *  Added global vars for warp options.
  57.  * 002 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  58.  *  Western Software Lab, Port to X11
  59.  * 003 -- Jordan Hubbard, Ardent Computer
  60.  *  Many additional declarations for awm.
  61.  * 1.3 -- Support for WM_STATE (Mike Wexler)
  62.  */
  63.  
  64. #ifndef AWM_INCLUDE
  65. #define AWM_INCLUDE
  66. #include <errno.h>
  67. #include <stdio.h>
  68. #include <X11/Intrinsic.h>
  69. #include <X11/Xatom.h>
  70.  
  71. #include "menus/rtlmenu.h"
  72. #include "support.h"
  73.  
  74. #define MIN(x, y)    ((x) <= (y) ? (x) : (y))
  75. #define MAX(x, y)    ((x) >= (y) ? (x) : (y))
  76. #define VOLUME_PERCENTAGE(x)    ((x)*14) 
  77. #define ModMask 0xFF
  78. #define ButtonMask(b)    (((b)==Button1) ? Button1Mask : \
  79.               (((b)==Button2) ? Button2Mask : Button3Mask))
  80.  
  81. #define DEF_DELTA        1
  82. #define DEF_FUNC        GXcopy
  83. #define DEF_ICON_BORDER_WIDTH     2
  84. #define DEF_ICON_PAD        4
  85. #define DEF_POP_BORDER_WIDTH     2
  86. #define DEF_POP_PAD        4
  87. #define DEF_MENU_BORDER_WIDTH     2
  88. #define DEF_MENU_PAD        4
  89. #define DEF_GADGET_PAD        3
  90. #define DEF_GADGET_BORDER    1
  91. #define DEF_TITLE_PAD        2
  92. #define DEF_VOLUME        4
  93. #define DEF_PUSH        5
  94. #define DEF_BCONTEXT_WIDTH    0
  95. #define DEF_RAISE_DELAY        100    /* milliseconds */
  96. #define DEF_MAX_COLORS        0    /* 0 means take as many as we can */
  97. #ifndef DEF_BCONTEXT_CURSOR
  98. #define DEF_BCONTEXT_CURSOR    XC_plus
  99. #endif    DEF_BCONTEXT_CURSOR
  100. #ifndef    DEF_TITLE_CURSOR
  101. #define DEF_TITLE_CURSOR    XC_left_ptr
  102. #endif    DEF_TITLE_CURSOR
  103. #ifndef    NAME
  104. #define NAME            "awm"
  105. #endif    NAME
  106. #ifndef CLASS
  107. #define    CLASS            "Wm"
  108. #endif    CLASS
  109. #ifndef    DEF_FONT
  110. #define    DEF_FONT        "fixed"
  111. #endif    DEF_FONT
  112. #ifndef    DEF_TITLE_FONT
  113. #define    DEF_TITLE_FONT        "8x13"
  114. #endif    DEF_TITLE_FONT
  115. #ifndef    DEF_ICON_FONT
  116. #define    DEF_ICON_FONT        "8x13"
  117. #endif    DEF_ICON_FONT
  118. #ifndef    DEF_POPUP_FONT
  119. #define    DEF_POPUP_FONT        "9x15"
  120. #endif    DEF_POPUP_FONT
  121. #ifndef    DEF_GADGET_FONT
  122. #define DEF_GADGET_FONT        "fixed"
  123. #endif    DEF_GADGET_FONT
  124. #ifndef    DEF_MENU_FONT
  125. #define    DEF_MENU_FONT        "8x13"
  126. #endif    DEF_MENU_FONT
  127. #ifndef    DEF_BOLD_FONT
  128. #define    DEF_BOLD_FONT        "8x13bold"
  129. #endif    DEF_BOLD_FONT
  130. #define DEF_MENU_DELTA        20
  131. #ifndef DEF_NAME
  132. #define DEF_NAME        "NoName" /* for clients w/no name */
  133. #endif
  134.  
  135. #define INIT_PTEXT        {'0', '0', '0', 'x', '0', '0', '0'}
  136.  
  137. #ifndef TEMPFILE
  138. #define TEMPFILE        "/tmp/awm.XXXXXX"
  139. #endif    TEMPFILE
  140.  
  141. #define CURSOR_WIDTH        16
  142. #define CURSOR_HEIGHT        16
  143.  
  144. #define MAX_ZAP_VECTORS        8
  145. #define MAX_BOX_VECTORS        20
  146.  
  147. #define DRAW_WIDTH        0     /* use fastest hardware draw */
  148. #define DRAW_VALUE        0xfd
  149. #define DRAW_FUNC        GXxor
  150. #define DRAW_PLANES        1
  151.  
  152. #define NOCOLOR            -1
  153.  
  154. /*
  155.  * The first BITS_USED bits of the mask are used to define the most generic
  156.  * types. All other bits are free for storing peripheral information.
  157.  * For now, we use the extra bits to specify which gadget(s) are bound
  158.  * to an action. MAX_GADGETS depends on BITS_USED to determine the maximum
  159.  * number of gadgets possible. If you add a new context type, be sure to
  160.  * increment BITS_USED.
  161.  */
  162. #define ROOT            0x1
  163. #define WINDOW            0x2
  164. #define ICON            0x4
  165. #define TITLE            0x8
  166. #define BORDER            0x10
  167. #define GADGET            0x20
  168.  
  169. #define BITS_USED        6
  170.  
  171. /* Window states */
  172. #define ST_WINDOW    0x1
  173. #define ST_ICON        0x2
  174. #define ST_PLACED    0x4
  175. #define ST_DECORATED    0x8
  176.  
  177. #define DECORATED(a) (a && (a->state & ST_DECORATED))
  178.  
  179. /* Window attributes */
  180. #define AT_NONE        0x0
  181. #define AT_TITLE    0x1
  182. #define AT_GADGETS    0x2
  183. #define AT_RAISE    0x4
  184. #define AT_BORDER    0x8
  185. #define AT_INPUT    0x10
  186. #define AT_ICONLABEL    0x20
  187.  
  188. /*
  189.  * Gadgets aren't the sort of embellishments that one uses in quantitity
  190.  * (unless one is designing a truly odd interface), so we keep the information
  191.  * in an array instead of using the usual linked list. MAX_GADGETS is a derived
  192.  * macro (see BITS_USED) that is used to determine the size of the
  193.  * Array.
  194.  *
  195.  */
  196. #define MAX_GADGETS        ((sizeof(int) * 8) - BITS_USED)
  197.  
  198. #ifndef FAILURE
  199. #define FAILURE    0
  200. #endif    FAILURE
  201.  
  202. #define NAME_LEN        256L    /* Maximum length string names */
  203. #define EVENTMASK        (ButtonPressMask | ButtonReleaseMask)
  204.  
  205.  
  206. #define DrawBox() XDrawSegments(dpy, RootWindow(dpy, scr),DrawGC,box,num_vectors)
  207. #define DrawZap() XDrawSegments(dpy, RootWindow(dpy, scr),DrawGC,zap,num_vectors)
  208.  
  209. #define gray_width 16
  210. #define gray_height 16
  211. extern char gray_bits[];
  212.  
  213. #define solid_width 16
  214. #define solid_height 16
  215. extern char solid_bits[];
  216.  
  217. #define xlogo32_width 32
  218. #define xlogo32_height 32
  219. extern char xlogo32_bits[];
  220.  
  221. /*
  222.  * All one needs to know about an awm managed window.. (so far...)
  223.  */
  224. #ifdef WMSTATE
  225. #define WithdrawState    0
  226. #define NormalState    1
  227. #define IconicState    3
  228.  
  229. typedef struct {
  230.   int state;
  231.   Window icon;
  232. } WM_STATE;
  233.  
  234. extern Atom wm_state_atom;
  235. #endif /* WMSTATE */
  236.  
  237.  
  238. typedef struct _awminfo {
  239.      Window title, client, frame, icon;    /* Associated windows */
  240.      Window *gadgets;            /* associated gadgets */
  241.      char *name;            /* The formatted window name */
  242.      Boolean own;            /* Do we own the icon window? */
  243.      Pixmap back, bold, iconPixmap;    /* background, bold and icon pix */
  244.      Pixmap BC_back, BC_bold;        /* BC back and bold pixmaps */
  245. #ifdef RAINBOW
  246.      /* Per window versions of the globals colours */
  247.      Pixmap grayPixmap, solidPixmap;
  248.      Pixmap iBackPixmap;
  249.      Pixel foreColor, backColor;
  250.      Pixel iBorder;
  251.      Pixel iBackground, iForeground;
  252.      Pixel iTextForeground, iTextBackground;
  253. #endif
  254.      unsigned int border_width;        /* original border width */
  255.      int state;                /* The state of the window */
  256.      int attrs;                /* Window "attributes" */
  257.      GC winGC;                /* GC at proper depth for window */
  258. #ifdef WMSTATE
  259.      WM_STATE wm_state;
  260. #endif /* WMSTATE */
  261. } AwmInfo, *AwmInfoPtr;
  262.  
  263. /*
  264.  * This whole section has changed substantially. Basically, since all the
  265.  * variables have vanished into the resource manager, the keyword table
  266.  * only needs to keep track of function pointers, boolean pointers and
  267.  * "special" keywords like menu and gagdet. Since some things are still
  268.  * modifiable from menus (only booleans, currently, though this will change),
  269.  * we keep these in the keyword table even though
  270.  * they're no longer directly modifable from the .awmrc
  271.  */
  272.  
  273. /*
  274.  * Keyword table entry.
  275.  */
  276. typedef struct _keyword {
  277.      char *name;
  278.      int type;
  279.      Boolean *bptr;
  280.      Boolean (*fptr)();
  281. } Keyword;
  282.  
  283. /*
  284.  * Keyword table type entry.
  285.  */
  286. #define IsFunction    1
  287. #define IsMenuMap    2
  288. #define IsMenu        3
  289. #define IsDownFunction    4
  290. #define IsParser    5
  291. #define IsQuitFunction    6
  292. #define IsGadget    7
  293. #define IsBoolean    8
  294. #define IsAction    9
  295.  
  296. /*
  297.  * Button/key binding type.
  298.  */
  299. typedef struct _binding {
  300.     struct _binding *next;
  301.     int context;
  302.     unsigned int mask;
  303.     int button;
  304.     Boolean (*func)();
  305.     char *menuname;
  306.     RTLMenu menu;
  307. } Binding;
  308.  
  309. /*
  310.  * Key expression type.
  311.  */
  312. typedef struct _keyexpr {
  313.     char *name;
  314.     int mask;
  315. } KeyExpr;
  316.  
  317. /*
  318.  * Context expression type.
  319.  */
  320. typedef struct _contexpr {
  321.     char *name;
  322.     int mask;
  323. } ContExpr;
  324.  
  325. /*
  326.  * Button modifier type.
  327.  */
  328. typedef struct _buttonmodifier {
  329.     char *name;
  330.     int mask;
  331. } ButtonModifier;
  332.  
  333. /*
  334.  * Gravity expression type.
  335.  */
  336. typedef struct _gravityexpr {
  337.      char *name;
  338.      int mask;
  339. } GravityExpr;
  340.  
  341. /*
  342.  * Button modifier mask definitions.
  343.  * bits 13 and 14 unused in key masks, according to X.h
  344.  * steal bit 15, since we don't use AnyModifier
  345.  */
  346.  
  347. #define DeltaMotion    (1<<13)
  348. #define ButtonUp    (1<<14)
  349. #define ButtonDown    AnyModifier
  350. #define ButtonMods    DeltaMotion+ButtonUp+ButtonDown
  351.  
  352. /* 
  353.  * Button and mask redefinitions, for X11
  354.  */
  355. #define LeftMask     Button1Mask
  356. #define MiddleMask     Button2Mask
  357. #define RightMask     Button3Mask
  358. #define LeftButton    Button1
  359. #define MiddleButton    Button2
  360. #define RightButton    Button3
  361.  
  362. /*
  363.  * Declaration specific information for gadgets. This defines only gadget
  364.  * types, not the actual gadgets. The pixmap member is only used if a pixmap
  365.  * is being displayed. Gravity and offset are purely optional.
  366.  */
  367.  
  368. #define NoGadgetGravity        0
  369. #define LeftGadgetGravity    1
  370. #define RightGadgetGravity    2
  371. #define CenterGadgetGravity    3
  372.  
  373. typedef struct _gadgetdecl {    /*   Declaration (type) information */
  374.      unsigned char *name;    /* Either text label or pixmap file name */
  375.      unsigned char *data;    /* If pixmap file, this is the data from it */
  376.      char *forecolor;        /* foreground color for pixmap */
  377.      char *backcolor;        /* background color for pixmap */
  378.      XFontStruct *fontInfo;    /* font for text */
  379.      int high, wide;        /* width and height of pixmap or text */
  380.      int gravity;        /* stick to the left or right? */
  381.      int offset;        /* offset from previous item */
  382. } GadgetDecl;
  383.  
  384. /*
  385.  * MenuInfo data type.
  386.  */
  387. typedef struct _menuinfo {
  388.     char *name;            /* Name of this menu. */
  389.     char *pixmapname;        /* Name of label pixmap (opt) */
  390.     RTLMenu menu;        /* RTL menu handle for destroy */
  391.     struct _actionline *line;    /* Linked list of menu items. */
  392. } MenuInfo;
  393.  
  394. /*
  395.  * Action Line data type.
  396.  */
  397. typedef struct _actionline {
  398.     struct _actionline *next;    /* Pointer to next line. */
  399.     char *name;            /* Name of this line. */
  400.     char *pixmapname;        /* Name of the backing pixmap (opt) */
  401.     int type;            /* IsShellCommand, IsText, IsTextNL... */
  402.     RTLMenuItem item;        /* RTL item handle */
  403.     char *text;            /* Text string to be acted upon. */
  404.     Boolean (*func)();        /* Window manager function to be invoked. */
  405. } ActionLine;
  406.  
  407. /*
  408.  * ActionLine->type definitions.
  409.  */
  410. #define IsShellCommand        1
  411. #define IsText            2
  412. #define IsTextNL        3
  413. #define IsUwmFunction        4
  414. #define IsMenuFunction        5
  415. #define IsImmFunction        6    /* Immediate (context-less) function. */
  416. #define IsVar            7    /* we're setting a boolean variable */
  417.  
  418. /*
  419.  * Menu Link data type.  Used by the parser when creating a linked list
  420.  * of menus. 
  421.  */
  422. typedef struct _menulink {
  423.     struct _menulink *next;    /* Pointer to next MenuLink. */
  424.     struct _menuinfo *menu;    /* Pointer to the menu in this link. */
  425. } MenuLink;
  426.  
  427. /*
  428.  * External variable definitions.
  429.  */
  430. extern int errno;
  431. extern Window Pop;        /* Pop-up dimension display window. */
  432. extern Window Frozen;        /* Contains window id of "gridded" window. */
  433. extern XFontStruct *IFontInfo;    /* Icon text font information. */
  434. extern XFontStruct *PFontInfo;    /* Pop-up text font information. */
  435. extern XFontStruct *TFontInfo;    /* Title text font information. */
  436. extern XFontStruct *TFontBoldInfo;/* Title text (bold) font information. */
  437. extern XFontStruct *GFontInfo; /* Gadget box text font */
  438. extern XFontStruct *MFontInfo;    /* Menu font */
  439. extern XFontStruct *MBoldFontInfo;/* Menu bold font */
  440. extern Pixmap GrayPixmap;    /* Gray pixmap. */
  441. extern Pixmap SolidPixmap;
  442. extern Pixmap IBackPixmap;    /* Icon window background pixmap. */
  443. extern Pixmap IDefPixmap;    /* Icon pixmap for twm style icons */
  444. extern char *BForeground;    /* Border Context (pixmap) foreground pixel */
  445. extern char *BBackground;    /* Border Context (pixmap) background pixel */
  446. extern char *WBorder;        /* Window border pixel */
  447. extern char *TTextForeground;    /* Title text foreground pixel */
  448. extern char *TTextBackground;    /* Title text background pixel */
  449. extern char *TForeground;    /* Title (pixmap) foreground pixel */
  450. extern char *TBackground;    /* Title (pixmap) background pixel */
  451. extern char *Foreground;    /* default forground color (text) */
  452. extern char *Background;    /* default background color (text) */
  453. extern Pixel IBorder;        /* Icon window border pixel. */
  454. extern Pixel ITextForeground;    /* Icon window text forground color. */
  455. extern Pixel ITextBackground;    /* Icon window text background color. */
  456. extern Pixel IForeground;    /* Icon pixmap foreground color */
  457. extern Pixel IBackground;    /* Icon pixmap background color */
  458. extern Pixel PForeground;    /* Pop-up window forground color. */
  459. extern Pixel PBackground;    /* Pop-up window background color. */
  460. extern Pixel PBorder;        /* Pop-Up Window border pixel. */
  461. extern Pixel ForeColor;        /* default foreground color */
  462. extern Pixel BackColor;        /* default background color */
  463. extern Pixel MBorder;        /* Menu border color */
  464. extern Pixel MForeground;    /* Menu foreground color */
  465. extern Pixel MBackground;    /* Menu background color */
  466. extern Cursor ArrowCrossCursor; /* Arrow cross cursor. */
  467. extern Cursor TextCursor;    /* Text cursor used in icon windows. */
  468. extern Cursor IconCursor;    /* Icon Cursor. */
  469. extern Cursor LeftButtonCursor;    /* Left button main cursor. */
  470. extern Cursor MiddleButtonCursor;/* Middle button main cursor. */
  471. extern Cursor RightButtonCursor;/* Right button main cursor. */
  472. extern Cursor TargetCursor;    /* Target (select-a-window) cursor. */
  473. extern Cursor TitleCursor;    /* Title bar cursor */
  474. extern Cursor FrameCursor;    /* Frame cursor */
  475. extern Cursor GumbyCursor;    /* Used in icons if not type-in   */
  476. extern unsigned int GadgetBorder;    /* Width of gadget borders */
  477. extern int ScreenWidth;        /* Display screen width. */
  478. extern int ScreenHeight;    /* Display screen height. */
  479. extern int TitleHeight;        /* Height in pixels of title bar(s) */
  480. extern int titleHeight;        /* Derived height of title bar(s) */
  481. extern int gadgetHeight;    /* Height of highest gadget */
  482. extern int NameOffset;        /* Offset for window name */
  483. extern int IBorderWidth;    /* Icon window border width. */
  484. extern int PWidth;        /* Pop-up window width (including borders). */
  485. extern int PHeight;        /* Pop-up window height (including borders). */
  486. extern unsigned int PBorderWidth;    /* Pop-up window border width. */
  487. extern int PPadding;        /* Pop-up window padding. */
  488. extern int Delta;        /* Mouse movement slop. */
  489. extern int HIconPad;        /* Icon horizontal padding. */
  490. extern int VIconPad;        /* Icon vertical padding. */
  491. extern int Pushval;        /* Number of pixels to push window by. */
  492. extern int BContext;        /* Width of border context area in pixels */
  493. extern int RaiseDelay;        /* Delay in milliseconds before autoraising windows */
  494. extern int Volume;        /* Audible alarm volume. */
  495. extern int NumGadgets;        /* Number of gadgets used */
  496. extern int GadgetPad;        /* Padding between gadgets */
  497. extern int TitlePad;        /* Title text padding */
  498. extern int status;        /* Routine return status. */
  499. extern int MPad;        /* menu padding */
  500. extern int MDelta;        /* Menu subitem delta */
  501. extern int MBorderWidth;    /* Menu border width */
  502. extern int MItemBorder;        /* Menu item border width */
  503. extern unsigned int BCursor;    /* Border context cursor */
  504. extern unsigned int TCursor;    /* Title context cursor */
  505. extern MenuLink *Menus;        /* Linked list of menus. */
  506. extern GC  IconGC;        /* graphics context for icon */
  507. extern GC  PopGC;        /* graphics context for pop */
  508. extern GC  DrawGC;        /* graphics context for zap */
  509.  
  510. extern Boolean Autoraise;    /* Raise window on input focus? */
  511. extern Boolean Autoselect;    /* Warp mouse to default menu selection? */
  512. extern Boolean Borders;        /* Display border context areas? */
  513. extern Boolean ConstrainResize;    /* Don't resize until pointer leaves window */
  514. extern Boolean Freeze;        /* Freeze server during move/resize? */
  515. extern Boolean Grid;        /* Should the m/r box contain a 9 seg. grid. */
  516. extern Boolean Hilite;        /* Should we highlight titles on focus? */
  517. extern Boolean BorderHilite;    /* Should we highlight borders on focus? */
  518. extern Boolean FrameFocus;    /* Should frame be considered part of window */
  519. extern Boolean ShowName;    /* Display names in title bars */
  520. extern Boolean NWindow;        /* Normalize windows? */
  521. extern Boolean NIcon;        /* Normalize icons? */
  522. extern Boolean RootResizeBox;    /* Should resize box obscure window? */
  523. extern Boolean InstallColormap;    /* Install colormap for clients? */
  524. extern Boolean Push;        /* Relative=TRUE, Absolute=FALSE. */
  525. extern Boolean ResizeRelative;    /* Relative=TRUE, Absolute=FALSE. */
  526. extern Boolean Reverse;        /* Reverse video? */
  527. extern Boolean SaveUnder;    /* Save unders? */
  528. extern Boolean Snatched;    /* We're in the middle of an no-highlight/raise op */
  529. extern Boolean Titles;        /* Title bars on windows? */
  530. extern Boolean IconLabels;    /* Labels on pixmap icons? (twm style) */
  531. extern Boolean ILabelTop;    /* label top of icon? */
  532. extern Boolean PushDown;    /* Down=TRUE, Up=FALSE */
  533. extern Boolean UseGadgets;    /* Gadget boxes in title bars? */
  534. extern Boolean Wall;        /* Don't allow windows past edges of screen */
  535. extern Boolean WarpOnRaise;    /* Warp to upper right corner on raise. */
  536. extern Boolean WarpOnIconify;   /* Warp to icon center on iconify. */
  537. extern Boolean WarpOnDeIconify; /* Warp to upper right corner on de-iconify. */
  538. extern Boolean Zap;        /* Should the the zap effect be used. */
  539. extern Boolean FocusSetByUser;  /* True if f.focus called */
  540. extern Boolean FocusSetByWM;    /* True if awm set the focus */
  541.  
  542. extern char PText[];        /* Pop-up window dummy text. */
  543. extern int PTextSize;        /* Pop-up window dummy text size. */
  544.  
  545. extern int Lineno;        /* Line count for parser. */
  546. extern Boolean Startup_File_Error; /* Startup file error flag. */
  547. extern char Startup_File[];    /* Startup file name. */
  548. extern char *IFontName;        /* Icon font name. */
  549. extern char *PFontName;        /* Pop-up font name. */
  550. extern char *TFontName;        /* Title font name. */
  551. extern char *GFontName;        /* Gadget font name */
  552. extern char *TFontBoldName;    /* Bold Title font name. */
  553. extern char *TBoldPixmapName;    /* Title (highlighted) pixmap file */
  554. extern char *TBackPixmapData;    /* Bitmap data file title background */
  555. extern char *TBoldPixmapData;    /* ditto, except highlighted */
  556. extern char *BBackPixmapData;    /* Border Context area background pixmap data */
  557. extern char *BBoldPixmapData;    /* Border Context bold pixmap data */
  558. extern char *awmPath;        /* Pathlist for pixmap files */
  559. extern char **Argv;        /* Pointer to command line parameters. */
  560. extern char **Environ;        /* Pointer to environment. */
  561.  
  562. extern char *DefaultBindings[];    /* Default bindings string array. */
  563. extern Keyword KeywordTable[];    /* Keyword lookup table. */
  564. extern Binding *Blist;        /* Button/key bindings list. */
  565. extern KeyExpr KeyExprTbl[];    /* Key expression table. */
  566. extern ContExpr ContExprTbl[];    /* Context expression table. */
  567. extern ButtonModifier ButtModTbl[];/* Button modifier table. */
  568. extern GravityExpr GravityExprTbl[]; /* Gravity expression table. */
  569.  
  570. extern GadgetDecl **Gadgets;    /* Gadgets declared. See gram.y */
  571. extern int scr;
  572. extern Display *dpy;        /* Display info pointer. */
  573.  
  574. #ifdef PROFIL
  575. int ptrap();
  576. #endif
  577.  
  578. /*
  579.  * External routine typing.
  580.  */
  581. extern Boolean Beep();
  582. extern Boolean CircleDown();
  583. extern Boolean CircleUp();
  584. extern Boolean Continue();
  585. extern Boolean Focus();
  586. extern Boolean UnFocus();
  587. extern Boolean GetButton();
  588. extern Boolean Iconify();
  589. extern Boolean Lower();
  590. extern Boolean DoMenu();
  591. extern Boolean DoAction();
  592. extern Boolean Lock();
  593. extern Boolean Move();
  594. extern Boolean MoveOpaque();
  595. extern Boolean Neaten();
  596. extern Boolean NewIconify();
  597. extern Boolean Pause();
  598. extern Boolean ShoveDown();
  599. extern Boolean ShoveLeft();
  600. extern Boolean ShoveRight();
  601. extern Boolean ShoveUp();
  602. extern Boolean Quit();
  603. extern Boolean Raise();
  604. extern Boolean Redraw();
  605. extern Boolean Refresh();
  606. extern Boolean ResetBindings();
  607. extern Boolean ResetMenus();
  608. extern Boolean ResetGadgets();
  609. extern Boolean Resize();
  610. extern Boolean Restart();
  611. extern Boolean FDecorate();
  612. extern Boolean FNoDecorate();
  613. extern Boolean DestroyClient();
  614. extern Boolean GetBoolRes();
  615. extern Boolean ConfigureWindow();
  616. extern int StoreCursors();
  617. extern int StoreBox();
  618. extern int StoreTitleBox();
  619. extern int StoreGridBox();
  620. extern int StoreTitleGridBox();
  621. extern int StoreZap();
  622. extern int Error();
  623. extern int XError();
  624. extern int GetIntRes();
  625. extern Window Reparent(), Decorate();
  626. extern unsigned char *expand_metachars();
  627. extern char *stash();
  628. extern char *GetIconName();
  629. extern char *expand_from_path();
  630. extern char *GetStringRes();
  631. extern char *GetPixmapDataRes();
  632. extern Pixmap GetPixmapRes();
  633. extern Pixel GetColorRes();
  634. extern Pixel GetPixel();
  635. extern XFontStruct *GetFontRes();
  636. extern Drawable GetPixmapFromCache();
  637. extern AwmInfoPtr GetAwmInfo();
  638. extern AwmInfoPtr RegisterWindow();
  639. extern AwmInfoPtr IsTitled();
  640. extern AwmInfoPtr IsGadgetWin();
  641.  
  642. extern void Init_Titles(), Init_Frames();
  643. extern void NoDecorate();
  644. extern void PaintTitle();
  645. extern void SetBorderPixmaps();
  646. extern void FreePixmapFromCache();
  647.  
  648. #ifdef    NEATEN
  649. #define DEFAULT_ABS_MIN        64
  650. #define SEPARATION        2
  651. #define DEF_PRIMARY_PLACEMENT    "Top"
  652. #define DEF_SECONDARY_PLACEMENT    "Left"
  653.  
  654. extern int AbsMinWidth;
  655. extern int AbsMinHeight;
  656. extern Boolean RetainSize;
  657. extern Boolean KeepOpen;
  658. extern Boolean Fill;
  659. extern Boolean UsePriorities;
  660. extern Boolean FixTopOfStack;
  661. extern char *PrimaryIconPlacement;
  662. extern char *SecondaryIconPlacement;
  663. #endif    NEATEN
  664. #endif AWM_INCLUDE
  665.