Annotation of researchv10dc/630/include/dmd.h, revision 1.1.1.1

1.1       root        1: /*       Copyright (c) 1987 AT&T   */
                      2: /*       All Rights Reserved       */
                      3: 
                      4: /*       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T   */
                      5: /*       The copyright notice above does not evidence any      */
                      6: /*       actual or intended publication of such source code.   */
                      7: 
                      8: #include <sccsid.h>
                      9: HVERSION(dmd, @(#)dmd.h        1.1.1.3 (5/10/87));
                     10: 
                     11: 
                     12: /*
                     13:  * Model 630 Dot Mapped Display
                     14:  */
                     15: 
                     16: 
                     17: #define        WORDSHIFT       4
                     18: #define        WORDSIZE        16
                     19: #define        WORDMASK        (WORDSIZE-1)
                     20: #define        ONES            0xFFFF
                     21: #define        FIRSTBIT        ((unsigned short)0x8000)
                     22: #define        LASTBIT         ((unsigned short)0x1)
                     23: 
                     24: #define        XMAX    1024
                     25: #define        YMAX    1024
                     26: 
                     27: /*
                     28:  *     Graphics definitions
                     29:  */
                     30: 
                     31: #define        POLY_F  -32768
                     32: 
                     33: #define        Pt(x, y)        x, y
                     34: #define        Rpt(x, y)       x, y
                     35: #define        Rect(a, b, c, d)        a, b, c, d
                     36: 
                     37: typedef short Word;
                     38: typedef unsigned short UWord;
                     39: 
                     40: typedef struct Point {
                     41:        short   x;
                     42:        short   y;
                     43: } Point;
                     44: 
                     45: typedef struct Rectangle {
                     46:        Point origin;
                     47:        Point corner;
                     48: } Rectangle;
                     49: 
                     50: typedef struct Bitmap {
                     51:        Word    *base;          /* pointer to start of data */
                     52:        unsigned short width;   /* width in Word's of total data area */
                     53:        Rectangle rect;         /* rectangle in data area, local coords */
                     54:        char    *_null;         /* unused, always zero */
                     55: } Bitmap;
                     56: 
                     57: typedef struct Menu{
                     58:        char    **item;                 /* string array, ending with 0 */
                     59:        short   prevhit;                /* retained from previous call */
                     60:        short   prevtop;                /* also retained from previous call */
                     61:        char    *(*generator)();        /* used if item == 0 */
                     62: } Menu;
                     63: 
                     64: typedef struct Texture16 {
                     65:        Word bits[16];
                     66: } Texture16;
                     67: 
                     68: struct Mouse {
                     69:        Point   xy, jxy;
                     70:        short   buttons;
                     71: };
                     72: 
                     73: extern Rectangle Jrect;
                     74: 
                     75: #define bttn(i)                (mouse.buttons & (8 >> i))
                     76: #define bttn1()                (mouse.buttons&4)
                     77: #define bttn2()                (mouse.buttons&2)
                     78: #define bttn3()                (mouse.buttons&1)
                     79: #define bttn12()       (mouse.buttons&6)
                     80: #define bttn13()       (mouse.buttons&5)
                     81: #define bttn23()       (mouse.buttons&3)
                     82: #define bttn123()      (mouse.buttons&7)
                     83: 
                     84: #define        muldiv(a,b,c)   ((short)((a)*((long)b)/(c)))
                     85: 
                     86: 
                     87: /*
                     88:  * Function Codes
                     89:  */
                     90: typedef int    Code;
                     91: #define        F_STORE ((Code) 0)      /* target = source */
                     92: #define        F_OR    ((Code) 1)      /* target |= source */
                     93: #define        F_CLR   ((Code) 2)      /* target &= ~source */
                     94: #define        F_XOR   ((Code) 3)      /* target ^= source */
                     95: 
                     96: #define        NULL    ((char *)0)
                     97: #define        KBD     1
                     98: #define        SEND    2
                     99: #define        MOUSE   4
                    100: #define        RCV     8
                    101: #define        CPU     16
                    102: #define ALARM  32
                    103: #define PSEND  64
                    104: #define DELETE  128
                    105: #define MSG    256
                    106: #define RESHAPED       0x800   /* this must be the same as in dmdproc.h */
                    107: 
                    108: #include <mpx.h>

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.