1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
|
#define INT_MAX +32767
#define INT_MIN -32767
/* resource id's */
#define CWINRES 400
#define GWINRES 401
#define MBAR_RES 400
#define APPLE_MENU_RES 400
#define FILE_MENU_RES 401
#define EDIT_MENU_RES 402
#define CONTROL_MENU_RES 403
#define STRINGS_RES 400
/* Apple menu */
#define ABOUT_ITEM 1
#define ABOUT_BOX 400
#define ABOUT_PICT 400
/* File menu */
#define LOAD 1
#define LOAD_NOISILY 2
#define QUIT 4
/* Edit menu */
#define UNDO 1
#define CUT 3
#define COPY 4
#define PASTE 5
#define CLEAR 6
/* Control menu */
#define BREAK 1
#define CONTINUE 2
#define CLEAN_UP 3
#define CANCEL_INPUT 4
#define TOP_LEVEL 5
#define SHOW_GRAPHICS 7
#define SPLIT_SCREEN 8
/* window sizing/dragging stuff */
#define DRAG_THRESHOLD 8
#define MIN_WIN_HEIGHT 80
#define MIN_WIN_WIDTH 120
#define MAX_BUF 250 /* max chars in output buffer */
#define SCROLLBACK_THRESHHOLD 30000 /* max chars kept in window */
#define DELETE_BLOCK 10000 /* how many chars to delete when threshhold reached */
#define LINEHEIGHT 11 /* height in pixels of 9-point Geneva, the font used */
#define STACKMIN 400000 /* amout of memory for application stack */
#define MASTERS 3 /* arbitrary -- how many times to call MoreMasters() */
/* key codes */
#define RETURN 0x0d
#define ENTER 0x03
#define DELETE 0x08
#define FWDDEL 0x7F
#define CLRKEY 0x1b
#define PAGEUP 0x0b
#define PAGEDN 0x0c
#define HOMEKEY 0x01
#define ENDKEY 0x04
#define HELPKEY 0x05
#define FNKEY 0x10
#define LEFTARROW 0x1c
#define RIGHTARROW 0x1d
#define UPARROW 0x1e
#define DOWNARROW 0x1f
#define DBLQUOTE '\"'
/* useful definitions */
#define MBAR_HEIGHT 20
#define TITLEBAR_HEIGHT 20
#define SCROLLER_WIDTH 15
#define SCREEN_MARGIN 2
#define TEXT_MARGIN 4
#define GRAFWIN_HEIGHT 232
void AdjustMenus(void);
void DoMenu(long choice);
void HideGrafWin(void);
void DoContent(EventRecord *theEvent);
void InitMac(void);
void MacWrapUp(void);
void DoEvent (void);
|