home *** CD-ROM | disk | FTP | other *** search
- /*
- * Name: MicroEMACS Amiga console device virtual terminal header file
- * Version: MG 2a Last edit: 28-Nov-87
- * ...!seismo!ut-sally!ut-ngp!mic (mic@emx.cc.utexas.edu) Created:
- * 20-Apr-86 ...!seismo!ut-sally!ut-ngp!mic
- */
-
- #define TOP_OFFSET 11 /* # raster lines from top of window */
-
- #ifndef LR_BORDER
- #define LR_BORDER (3 + 20) /* Vertical border size (pixels) */
- #endif
-
- #ifndef TB_BORDER
- #define TB_BORDER (TOP_OFFSET + 2) /* Horizontal border size (pixels) */
- #endif
-
- /*
- * Function key codes (using 16-bit KEY values)
- */
- #define KFIRST 0x100
-
- #define KUP 0x100
- #define KDOWN 0x101
- #define KLEFT 0x102
- #define KRIGHT 0x103
-
- #define KSUP 0x104
- #define KSDOWN 0x105
- #define KSLEFT 0x106
- #define KSRIGHT 0x107
-
- #define KF1 0x108
- #define KF2 0x109
- #define KF3 0x10A
- #define KF4 0x10B
- #define KF5 0x10C
- #define KF6 0x10D
- #define KF7 0x10E
- #define KF8 0x10F
- #define KF9 0x110
- #define KF10 0x111
-
- #define KSF1 0x112
- #define KSF2 0x113
- #define KSF3 0x114
- #define KSF4 0x115
- #define KSF5 0x116
- #define KSF6 0x117
- #define KSF7 0x118
- #define KSF8 0x119
- #define KSF9 0x11A
- #define KSF10 0x11B
-
- #define KHELP 0x11C
- #define KMENU 0x11D
- #define KRESIZE 0x11E
-
- #define KW___MOUSE 0x120
- #define KW__CMOUSE 0x121
- #define KW_S_MOUSE 0x122
- #define KW_SCMOUSE 0x123
- #define KWA__MOUSE 0x124
- #define KWA_CMOUSE 0x125
- #define KWAS_MOUSE 0x126
- #define KWASCMOUSE 0x127
- #define KM___MOUSE 0x128
- #define KM__CMOUSE 0x129
- #define KM_S_MOUSE 0x12A
- #define KM_SCMOUSE 0x12B
- #define KMA__MOUSE 0x12C
- #define KMA_CMOUSE 0x12D
- #define KMAS_MOUSE 0x12E
- #define KMASCMOUSE 0x12F
- #define KE___MOUSE 0x130
- #define KE__CMOUSE 0x131
- #define KE_S_MOUSE 0x132
- #define KE_SCMOUSE 0x133
- #define KEA__MOUSE 0x134
- #define KEA_CMOUSE 0x135
- #define KEAS_MOUSE 0x136
- #define KEASCMOUSE 0x137
-
- #define KLAST KEASCMOUSE
-
- /*
- * Mouse key encoding stuff... The bit fields are:
- *
- * 4 3 2 1 0
- * | where | ALT | SHIFT | CTRL
- *
- * Where ALT, SHIFT, and CTRL indicate qualifiers, and the 2-bit where field
- * indicates whether the click was (initially) in a window, a mode line, or
- * the echo line. The mouse functions are smart enough to remap themselves
- * if necessary; we implement these as keys so users can rebind things to
- * their taste.
- */
- #define M_X_ZERO ' '
- #define M_Y_ZERO ' '
- #define MQ_OFFSET 0x40
- #define MQ_NOQUAL 0x00
- #define MQ_CTRL 0x01
- #define MQ_SHIFT 0x02
- #define MQ_ALT 0x04
- #define MQ_WINDOW 0x00
- #define MQ_MODE 0x08
- #define MQ_ECHO 0x10
- #define MQ_WHERE(m) (m & 0x18) /* get where field */
- #define MQ_QUALS(m) (m & 0x07) /* get qualifier field */
-
- /*
- * Intuition menu interface. Each set of menu items kept in a table of
- * MenuBinding structures, which is in turn kept in a table of MenuInfo
- * structures. These tables are indexed via the menu and item numbers to find
- * the internal extended name of the function associated with a certain item.
- */
- #define MN_OFFSET ' ' /* menu char - ' ' = real code */
- struct MenuBinding {
- char *Command;
- int (*Function) ();
- };
-
- struct MenuInfo {
- char *Name; /* name of menu */
- short NumItems; /* # of items */
- struct MenuBinding *Items; /* item name, internal binding */
- };
-
- #define NITEMS(arr) (sizeof(arr) / (sizeof(arr[0])))
-
- /*
- * Return the width and height of the default font for a window.
- */
-
- #define FontWidth(w) (w)->RPort->TxWidth
- #define FontHeight(w) (w)->RPort->TxHeight
-