home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / src / h / graphics.h < prev    next >
C/C++ Source or Header  |  2001-12-12  |  18KB  |  580 lines

  1. /*
  2.  * graphics.h - macros and types used in Icon's graphics interface.
  3.  */
  4.  
  5. #ifdef MacGraph
  6.    #include "::h:macgraph.h"
  7. #endif                    /* MacGraph */
  8.  
  9. #ifdef XWindows
  10.    #include "../h/xwin.h"
  11. #endif                    /* XWindows */
  12.  
  13. #ifdef PresentationManager
  14.    #include "../h/pmwin.h"
  15. #endif                    /* PresentationManager */
  16.  
  17. #ifdef MSWindows
  18.    #include "../h/mswin.h"
  19. #endif                    /* MSWindows */
  20.  
  21. #ifndef MAXXOBJS
  22.    #define MAXXOBJS 256
  23. #endif                    /* MAXXOBJS */
  24.  
  25. #ifndef DMAXCOLORS
  26.    #define DMAXCOLORS 256
  27. #endif                    /* DMAXCOLORS */
  28.  
  29. #ifndef MAXCOLORNAME
  30.    #define MAXCOLORNAME 40
  31. #endif                    /* MAXCOLORNAME */
  32.  
  33. #ifndef MAXFONTWORD
  34.    #define MAXFONTWORD 40
  35. #endif                    /* MAXFONTWORD */
  36.  
  37. #define DEFAULTFONTSIZE 14
  38.  
  39. #define FONTATT_SPACING        0x01000000
  40. #define FONTFLAG_MONO        0x00000001
  41. #define FONTFLAG_PROPORTIONAL    0x00000002
  42.  
  43. #define FONTATT_SERIF        0x02000000
  44. #define FONTFLAG_SANS        0x00000004
  45. #define FONTFLAG_SERIF        0x00000008
  46.  
  47. #define FONTATT_SLANT        0x04000000
  48. #define FONTFLAG_ROMAN        0x00000010
  49. #define FONTFLAG_ITALIC        0x00000020
  50. #define FONTFLAG_OBLIQUE    0x00000040
  51.  
  52. #define FONTATT_WEIGHT        0x08000000
  53. #define FONTFLAG_LIGHT        0x00000100
  54. #define FONTFLAG_MEDIUM        0x00000200
  55. #define FONTFLAG_DEMI        0x00000400
  56. #define FONTFLAG_BOLD        0x00000800
  57.  
  58. #define FONTATT_WIDTH        0x10000000
  59. #define FONTFLAG_CONDENSED    0x00001000
  60. #define FONTFLAG_NARROW        0x00002000
  61. #define FONTFLAG_NORMAL        0x00004000
  62. #define FONTFLAG_WIDE        0x00008000
  63. #define FONTFLAG_EXTENDED    0x00010000
  64.  
  65. /*
  66.  * EVENT HANDLING
  67.  *
  68.  * Each window keeps an associated queue of events waiting to be
  69.  * processed.  The queue consists of <eventcode,x,y> triples,
  70.  * where eventcodes are strings for normal keyboard events, and
  71.  * integers for mouse and special keystroke events.
  72.  *
  73.  * The main queue is an icon list.  In addition, there is a queue of
  74.  * old keystrokes maintained for cooked mode operations, maintained
  75.  * in a little circular array of chars.
  76.  */
  77. #define EQ_MOD_CONTROL (1L<<16L)
  78. #define EQ_MOD_META    (1L<<17L)
  79. #define EQ_MOD_SHIFT   (1L<<18L)
  80.  
  81. #define EVQUESUB(w,i) *evquesub(w,i)
  82. #define EQUEUELEN 256
  83.  
  84. /*
  85.  * mode bits for the Icon window context (as opposed to X context)
  86.  */
  87.  
  88. #define ISINITIAL(w)    ((w)->window->bits & 1)
  89. #define ISINITIALW(ws)  ((ws)->bits & 1)
  90. #define ISCURSORON(w)   ((w)->window->bits & 2)
  91. #define ISCURSORONW(ws) ((ws->bits) & 2)
  92. #define ISMAPPED(w)    ((w)->window->bits & 4)
  93. #define ISREVERSE(w)    ((w)->context->bits & 8)
  94. #define ISXORREVERSE(w)    ((w)->context->bits & 16)
  95. #define ISXORREVERSEW(w) ((w)->bits & 16)
  96. #define ISCLOSED(w)    ((w)->window->bits & 64)
  97. #define ISRESIZABLE(w)    ((w)->window->bits & 128)
  98. #define ISEXPOSED(w)    ((w)->window->bits & 256)
  99. #define ISCEOLON(w)     ((w)->window->bits & 512)
  100. #define ISECHOON(w)     ((w)->window->bits & 1024)
  101.  
  102. #define SETCURSORON(w)  ((w)->window->bits |= 2)
  103. /* 4 is available */
  104. #define SETMAPPED(w)   ((w)->window->bits |= 4)
  105. #define SETREVERSE(w)   ((w)->context->bits |= 8)
  106. #define SETXORREVERSE(w) ((w)->context->bits |= 16)
  107. #define SETCLOSED(w)    ((w)->window->bits |= 64)
  108. #define SETRESIZABLE(w)    ((w)->window->bits |= 128)
  109. #define SETEXPOSED(w)   ((w)->window->bits |= 256)
  110. #define SETCEOLON(w)    ((w)->window->bits |= 512)
  111. #define SETECHOON(w)    ((w)->window->bits |= 1024)
  112.  
  113. #define CLRCURSORON(w)  ((w)->window->bits &= ~2)
  114. #define CLRMAPPED(w)    ((w)->window->bits &= ~4)
  115. #define CLRREVERSE(w)   ((w)->context->bits &= ~8)
  116. #define CLRXORREVERSE(w) ((w)->context->bits &= ~16)
  117. #define CLRCLOSED(w)    ((w)->window->bits &= ~64)
  118. #define CLRRESIZABLE(w)    ((w)->window->bits &= ~128)
  119. #define CLREXPOSED(w)   ((w)->window->bits &= ~256)
  120. #define CLRCEOLON(w)    ((w)->window->bits &= ~512)
  121. #define CLRECHOON(w)    ((w)->window->bits &= ~1024)
  122.  
  123. #ifdef XWindows
  124.    #define ISZOMBIE(w)     ((w)->window->bits & 1)
  125.    #define SETZOMBIE(w)    ((w)->window->bits |= 1)
  126.    #define CLRZOMBIE(w)    ((w)->window->bits &= ~1)
  127. #endif                    /* XWindows */
  128.  
  129. #ifdef PresentationManager
  130.    #define ISMINPEND(w)    ((w)->window->bits & 2048)
  131.    #define ISMINPENDW(ws)  ((ws)->bits & 2048)
  132.    #define SETINITIAL(w)   ((w)->window->bits |= 1)
  133.    #define SETMINPEND(w)   ((w)->window->bits |= 2048)
  134.    #define CLRINITIAL(w)   ((w)->window->bits &= ~1)
  135.    #define CLRINITIALW(w)  ((w)->bits &= ~1)
  136.    #define CLRMINPEND(w)   ((w)->window->bits &= ~2048)
  137.    #define CLRMINPENDW(w)  ((w)->bits &= ~2048)
  138. #endif                    /* PresentationManager */
  139.  
  140. #ifdef MSWindows
  141.    #define ISTOBEHIDDEN(ws)  ((ws)->bits & 4096)
  142.    #define SETTOBEHIDDEN(ws) ((ws)->bits |= 4096)
  143.    #define CLRTOBEHIDDEN(ws) ((ws)->bits &= ~4096)
  144. #endif                    /* MSWindows */
  145.  
  146. /*
  147.  * Window Resources
  148.  * Icon "Resources" are a layer on top of the window system resources,
  149.  * provided in order to facilitate resource sharing and minimize the
  150.  * number of calls to the window system.  Resources are reference counted.
  151.  * These data structures are simple sets of pointers
  152.  * into internal window system structures.
  153.  */
  154.  
  155. /*
  156.  * Fonts are allocated within displays.
  157.  */
  158. typedef struct _wfont {
  159.    int        refcount;
  160.    int        serial;            /* serial # */
  161.    struct _wfont *previous, *next;
  162. #ifdef MacGraph
  163.    short     fontNum;
  164.    Style     fontStyle;
  165.    int       fontSize;
  166.    FontInfo  fInfo;            /* I-173 */
  167. #endif                    /* MacGraph */
  168. #ifdef XWindows
  169.    char          *    name;            /* name for WAttrib and fontsearch */
  170.    int        height;            /* font height */
  171.    XFontStruct *fsp;            /* X font pointer */
  172. #endif                    /* XWindows */
  173. #ifdef PresentationManager
  174.    /* XXX replace this HUGE structure with single fields later - when we know
  175.       conclusively which ones we need */
  176.    FONTMETRICS    metrics;        /* more than you ever wanted to know */
  177. #endif                    /* PresentationManager */
  178. #ifdef MSWindows
  179.    char        *name;            /* name for WAttrib and fontsearch */
  180.    HFONT    font;
  181.    LONG        ascent;
  182.    LONG        descent;
  183.    LONG        charwidth;
  184.    LONG        height;
  185. #endif                    /* MSWindows */
  186.    } wfont, *wfp;
  187.  
  188. /*
  189.  * These structures and definitions are used for colors and images.
  190.  */
  191. typedef struct {
  192.    long red, green, blue;        /* color components, linear 0 - 65535*/
  193.    } LinearColor;
  194.  
  195. struct palentry {            /* entry for one palette member */
  196.    LinearColor clr;            /* RGB value of color */
  197.    char used;                /* nonzero if char is used */
  198.    char valid;                /* nonzero if entry is valid & opaque */
  199.    char transpt;            /* nonzero if char is transparent */
  200.    };
  201.  
  202. struct imgdata {            /* image loaded from a file */
  203.    int width, height;            /* image dimensions */
  204.    struct palentry *paltbl;        /* pointer to palette table */
  205.    unsigned char *data;            /* pointer to image data */
  206.    };
  207.  
  208. struct imgmem {
  209.    int x, y, width, height;
  210. #ifdef XWindows
  211.    XImage *im;
  212. #endif                    /* XWindows */
  213. #ifdef MSWindows
  214.    COLORREF *crp;
  215. #endif                    /* MSWindows */
  216.    };
  217.  
  218. #define TCH1 '~'            /* usual transparent character */
  219. #define TCH2 0377            /* alternate transparent character */
  220. #define PCH1 ' '            /* punctuation character */
  221. #define PCH2 ','            /* punctuation character */
  222.  
  223. #ifdef MacGraph
  224. typedef struct _wctype {
  225.    Pattern bkPat;
  226.    Pattern fillPat;
  227.    Point pnLoc;
  228.    Point pnSize;
  229.    short pnMode;
  230.    Pattern pnPat;
  231.    short txFont;
  232.    Style txFace;
  233.    short txMode;
  234.    short txSize;
  235.    Fixed spExtra;
  236.    RGBColor fgColor;
  237.    RGBColor bgColor;
  238.    } ContextType, *ContextPtrType;
  239. #endif                    /* MacGraph */
  240.  
  241. #ifdef XWindows
  242. /*
  243.  * Displays are maintained in a global list in rwinrsc.r.
  244.  */
  245. typedef struct _wdisplay {
  246.    int        refcount;
  247.    int        serial;            /* serial # */
  248.    char        name[MAXDISPLAYNAME];
  249.    Display *    display;
  250.    GC        icongc;
  251.    Colormap    cmap;
  252.    double    gamma;
  253.    int        screen;
  254.    int        numFonts;
  255.    wfp        fonts;
  256.    int           numColors;        /* allocated color info */
  257.    struct wcolor colors[DMAXCOLORS];
  258.    Cursor    cursors[NUMCURSORSYMS];
  259.    struct _wdisplay *previous, *next;
  260.    } *wdp;
  261. #endif                    /* XWindows */
  262.  
  263. #ifdef PresentationManager
  264. /*
  265.  * Presentation space local id's are used to identify fonts, bitmaps
  266.  * and markers.  Since we have 2 presentation spaces for each window,
  267.  * and contexts can be associated with different windows through bindings,
  268.  * the local identifier map must be identical throughout all ps (since the
  269.  * context can identify a font as ID 2 on one space and that must be valid
  270.  * on each space it is bound to).  This will be handled by a global array
  271.  * of lclIdentifier.
  272.  */
  273. #define MAXLOCALS               255
  274. #define IS_FONT                 1
  275. #define IS_PATTERN              2
  276. #define IS_MARKER               4               /* unused for now */
  277.  
  278. typedef struct _lclIdentifier {
  279.    SHORT idtype;    /* type of the id, either font or pattern */
  280.    SHORT refcount;    /* reference count, when < 1, deleted */
  281.    union {
  282.       wfont font;    /* font info */
  283.       HBITMAP   hpat;    /* pattern bitmap handle */
  284.       } u;
  285.    struct _lclIdentifier *next;          /* dbl linked list */
  286.    struct _lclIdentifier *previous;
  287.    } lclIdentifier;
  288.  
  289. #endif                    /* PresentationManager */
  290.  
  291. /*
  292.  * "Context" comprises the graphics context, and the font (i.e. text context).
  293.  * Foreground and background colors (pointers into the display color table)
  294.  * are stored here to reduce the number of window system queries.
  295.  * Contexts are allocated out of a global array in rwinrsrc.c.
  296.  */
  297. typedef struct _wcontext {
  298.    int        refcount;
  299.    int        serial;            /* serial # */
  300.    struct _wcontext *previous, *next;
  301.    int        clipx, clipy, clipw, cliph;
  302.    char        *patternname;
  303.    wfp        font;
  304.    int        dx, dy;
  305.    int        fillstyle;
  306.    int        drawop;
  307.    double    gamma;            /* gamma correction value */
  308.    int        bits;            /* context bits */
  309. #ifdef MacGraph
  310.    ContextPtrType   contextPtr;
  311. #endif                    /* MacGraph */
  312. #ifdef XWindows
  313.    wdp        display;
  314.    GC        gc;            /* X graphics context */
  315.    wclrp    fg, bg;
  316.    int        linestyle;
  317.    int        linewidth;
  318.    int        leading;        /* inter-line leading */
  319. #endif                    /* XWindows */
  320. #ifdef PresentationManager
  321.    /* attribute bundles */
  322.    CHARBUNDLE    charBundle;        /* text attributes */
  323.    LINEBUNDLE    lineBundle;        /* line/arc attributes */
  324.    AREABUNDLE    areaBundle;        /* polygon attributes... */
  325.    IMAGEBUNDLE    imageBundle;        /* attributes use in blit of mono bms */
  326.    LONG        fntLeading;        /* external leading for font - user */
  327.    SHORT    currPattern;        /* id of current pattern */
  328.    LONG        numDeps;        /* number of window dependants */
  329.    LONG        maxDeps;        /* max number of deps in curr table */
  330.    struct _wstate **depWindows;        /* array of window dependants */
  331. #endif                    /* PresentationManager */
  332. #ifdef MSWindows
  333.    LOGPEN    pen;
  334.    LOGPEN    bgpen;
  335.    LOGBRUSH    brush;
  336.    LOGBRUSH    bgbrush;
  337.    HRGN          cliprgn;
  338.    HBITMAP    pattern;
  339.    SysColor    fg, bg;
  340.    char        *fgname, *bgname;
  341.    int        leading, bkmode;
  342. #endif                    /* MSWindows*/
  343.    } wcontext, *wcp;
  344.  
  345. /*
  346.  * Native facilities include the following child controls (windows) that
  347.  * persist on the canvas and intercept various events.
  348.  */
  349. #ifdef MSWindows
  350.    #define CHILD_BUTTON 0
  351.    #define CHILD_SCROLLBAR 1
  352.    #define CHILD_EDIT 2
  353. typedef struct childcontrol {
  354.    int  type;                /* what kind of control? */
  355.    HWND win;                /* child window handle */
  356.    HFONT font;
  357.    char *id;                /* child window string id */
  358.    } childcontrol;
  359. #endif                    /* MSWindows */
  360.  
  361. /*
  362.  * "Window state" includes the actual X window and references to a large
  363.  * number of resources allocated on a per-window basis.  Windows are
  364.  * allocated out of a global array in rwinrsrc.c.  Windows remember the
  365.  * first WMAXCOLORS colors they allocate, and deallocate them on clearscreen.
  366.  */
  367. typedef struct _wstate {
  368.    int        refcount;        /* reference count */
  369.    int        serial;            /* serial # */
  370.    struct _wstate *previous, *next;
  371.    int        pixheight;        /* backing pixmap height, in pixels */
  372.    int        pixwidth;        /* pixmap width, in pixels */
  373.    char        *windowlabel;        /* window label */
  374.    char        *iconimage;        /* icon pixmap file name */
  375.    char        *iconlabel;        /* icon label */
  376.    struct imgdata initimage;        /* initial image data */
  377.    struct imgdata initicon;        /* initial icon image data */
  378.    int        y, x;            /* current cursor location, in pixels*/
  379.    int        pointery, pointerx;    /* current mouse location, in pixels */
  380.    int        posy, posx;        /* desired upper lefthand corner */
  381.    unsigned int    height;            /* window height, in pixels */
  382.    unsigned int    width;            /* window width, in pixels */
  383.    int        bits;            /* window bits */
  384.    int        theCursor;        /* index into cursor table */
  385.    word        timestamp;        /* last event time stamp */
  386.    char        eventQueue[EQUEUELEN];  /* queue of cooked-mode keystrokes */
  387.    int        eQfront, eQback;
  388.    char        *cursorname;
  389.    struct descrip filep, listp;        /* icon values for this window */
  390. #ifdef MacGraph
  391.    WindowPtr theWindow;            /* pointer to the window */
  392.    PicHandle windowPic;            /* handle to backing pixmap */
  393.    GWorldPtr offScreenGWorld;        /* offscreen graphics world */
  394.    CGrafPtr  origPort;
  395.    GDHandle  origDev;
  396.    PixMapHandle offScreenPMHandle;
  397.    Rect      sourceRect;
  398.    Rect      destRect;
  399.    Rect      GWorldRect;
  400.    Boolean   lockOK;
  401.    Boolean   visible;
  402. #endif                    /* MacGraph */
  403. #ifdef XWindows
  404.    wdp        display;
  405.    Window    win;            /* X window */
  406.    Pixmap    pix;            /* current screen state */
  407.    Pixmap    initialPix;        /* an initial image to display */
  408.    Window    iconwin;        /* icon window */
  409.    Pixmap    iconpix;        /* icon pixmap */
  410.    int        normalx, normaly;    /* pos to remember when maximized */
  411.    int        normalw, normalh;    /* size to remember when maximized */
  412.    int        numColors;        /* allocated color info */
  413.    short    *theColors;        /* indices into display color table */
  414.    int        numiColors;        /* allocated color info for the icon */
  415.    short        *iconColors;        /* indices into display color table */
  416.    int        iconic;            /* window state; icon, window or root*/
  417.    int        iconx, icony;        /* location of icon */
  418.    unsigned int    iconw, iconh;        /* width and height of icon */
  419.    long        wmhintflags;        /* window manager hints */
  420. #endif                    /* XWindows */
  421. #ifdef PresentationManager
  422.    HWND        hwnd;            /* handle to the window (client) */
  423.    HWND        hwndFrame;        /* handle to the frame window */
  424.    HMTX        mutex;            /* window access mutex sem */
  425.    HDC        hdcWin;            /* handle to window device context */
  426.    HPS        hpsWin;            /* pres space for window */
  427.    HPS        hpsBitmap;        /* pres space for the backing bitmap */
  428.    HBITMAP    hBitmap;        /* handle to the backing bitmap */
  429.    HDC        hdcBitmap;        /* handle to the bit, memory DC */
  430.    wcontext    *charContext;        /* context currently loaded in PS's */
  431.    wcontext    *lineContext;
  432.    wcontext    *areaContext;
  433.    wcontext    *imageContext;
  434.    wcontext    *clipContext;
  435.    LONG        winbg;            /* window background color */
  436.    HBITMAP    hInitialBitmap;        /* the initial image to display */
  437.    HPOINTER    hPointer;        /* handle to window's current pointer*/
  438.    CURSORINFO    cursInfo;        /* cursor info stored on lose focus */
  439.    LONG        numDeps;        /* number of context dependants */
  440.    LONG        maxDeps;
  441.    wcontext    **depContexts;        /* array of context dependants */
  442.    /* XXX I don't like this next line, but it will do for now - until I figure
  443.       out something better.  Following the charContext pointer to find the
  444.       descender value is not enough as it could be NULL */
  445.    SHORT    lastDescender;        /* font descender value from last wc */
  446.    HRGN        hClipWindow;        /* clipping regions */
  447.    HRGN        hClipBitmap;
  448.    BYTE        winState;        /* win state: icon, window, maximized */
  449.    HBITMAP    hIconBitmap;        /* bitmap to display when iconized */
  450. #endif                    /* PresentationManager */
  451. #ifdef MSWindows
  452.    HWND        win;            /* client window */
  453.    HWND        iconwin;        /* client window when iconic */
  454.    HBITMAP    pix;            /* backing bitmap */
  455.    HBITMAP    iconpix;        /* backing bitmap */
  456.    HBITMAP    initialPix;        /* backing bitmap */
  457.    HBITMAP    theOldPix;
  458.    int        hasCaret;
  459.    HCURSOR    curcursor;
  460.    HCURSOR    savedcursor;
  461.    HMENU        menuBar;
  462.    int        nmMapElems;
  463.    char **    menuMap;
  464.    HWND        focusChild;
  465.    int        nChildren;
  466.    childcontrol *child;
  467. #endif                    /* MSWindows */
  468.    } wstate, *wsp;
  469.  
  470. /*
  471.  * Icon window file variables are actually pointers to "bindings"
  472.  * of a window and a context.  They are allocated out of a global
  473.  * array in rwinrsrc.c.  There is one binding per Icon window value.
  474.  */
  475. typedef struct _wbinding {
  476.    int refcount;
  477.    int serial;
  478.    struct _wbinding *previous, *next;
  479.    wcp context;
  480.    wsp window;
  481.    } wbinding, *wbp;
  482.  
  483. #ifdef MacGraph
  484. typedef struct {
  485.    Boolean wasDown;
  486.    uword when;
  487.    Point where;
  488.    int whichButton;
  489.    int modKey;
  490.    wsp ws;
  491.    } MouseInfoType;
  492. #endif                    /* MacGraph */
  493.  
  494. typedef struct {
  495.    char *s;
  496.    int i;
  497.    } stringint, *siptr;
  498.  
  499. /*
  500.  * Gamma Correction value to compensate for nonlinear monitor color response
  501.  */
  502. #ifndef GammaCorrection
  503.    #define GammaCorrection 2.5
  504. #endif                    /* GammaCorrection */
  505.  
  506. /*
  507.  * Attributes
  508.  */
  509.  
  510. #define A_ASCENT    1
  511. #define A_BG        2
  512. #define A_CANVAS    3
  513. #define A_CEOL        4
  514. #define A_CLIPH        5
  515. #define A_CLIPW        6
  516. #define A_CLIPX        7
  517. #define A_CLIPY        8
  518. #define A_COL        9
  519. #define A_COLUMNS    10
  520. #define A_CURSOR    11
  521. #define A_DEPTH        12
  522. #define A_DESCENT    13
  523. #define A_DISPLAY    14
  524. #define A_DISPLAYHEIGHT    15
  525. #define A_DISPLAYWIDTH    16
  526. #define A_DRAWOP    17
  527. #define A_DX        18
  528. #define A_DY        19
  529. #define A_ECHO        20
  530. #define A_FG        21
  531. #define A_FHEIGHT    22
  532. #define A_FILLSTYLE    23
  533. #define A_FONT        24
  534. #define A_FWIDTH    25
  535. #define A_GAMMA        26
  536. #define A_GEOMETRY    27
  537. #define A_HEIGHT    28
  538. #define A_ICONIC    29
  539. #define A_ICONIMAGE     30
  540. #define A_ICONLABEL    31
  541. #define A_ICONPOS    32
  542. #define A_IMAGE        33
  543. #define A_LABEL        34
  544. #define A_LEADING    35
  545. #define A_LINES        36
  546. #define A_LINESTYLE    37
  547. #define A_LINEWIDTH    38
  548. #define A_PATTERN    39
  549. #define A_POINTERCOL    40
  550. #define A_POINTERROW    41
  551. #define A_POINTERX    42
  552. #define A_POINTERY    43
  553. #define A_POINTER    44
  554. #define A_POS        45
  555. #define A_POSX        46
  556. #define A_POSY        47
  557. #define A_RESIZE    48
  558. #define A_REVERSE    49
  559. #define A_ROW        50
  560. #define A_ROWS        51
  561. #define A_SIZE        52
  562. #define A_VISUAL    53
  563. #define A_WIDTH        54
  564. #define A_WINDOWLABEL   55
  565. #define A_X        56
  566. #define A_Y        57
  567.  
  568. #define NUMATTRIBS    57
  569.  
  570. #define XICONSLEEP    20 /* milliseconds */
  571.  
  572. /*
  573.  * flags for ConsoleFlags
  574.  */
  575. /* I/O redirection flags */
  576. #define StdOutRedirect        1
  577. #define StdErrRedirect        2
  578. #define StdInRedirect         4
  579. #define OutputToBuf           8
  580.