]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - mac_res.r
Menu items now turn on and off in a vaguely useful way.
[PuTTY.git] / mac_res.r
1 /* $Id: mac_res.r,v 1.1.2.9 1999/03/11 21:40:31 ben Exp $ */
2 /*
3  * Copyright (c) 1999 Ben Harris
4  * All rights reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person
7  * obtaining a copy of this software and associated documentation
8  * files (the "Software"), to deal in the Software without
9  * restriction, including without limitation the rights to use,
10  * copy, modify, merge, publish, distribute, sublicense, and/or
11  * sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following
13  * conditions:
14  * 
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  * 
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
22  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
23  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  */
27
28 /* PuTTY resources */
29
30 #include "Types.r"
31 #include "Dialogs.r"
32 #include "Palettes.r"
33
34 /* Get resource IDs we share with C code */
35 #include "macresid.h"
36
37 /*
38  * Finder-related resources
39  */
40
41 /* 'pTTY' is now registered with Apple as PuTTY's signature */
42
43 type 'pTTY' as 'STR ';
44
45 resource 'pTTY' (0, purgeable) {
46     "PuTTY experimental Mac port"
47 };
48
49 resource 'vers' (1, purgeable) {
50     0x00, 0x45,         /* Major and minor (BCD) */
51     development, 0,     /* Status and pre-release */
52     2,                  /* Region code (2 = UK) */
53     "Mac exp",          /* Short version (list views) */
54     "Mac experimental version.  "
55     "Copyright Simon Tatham 1997-9",    /* Long version (get info) */
56 };
57
58 resource 'SIZE' (-1) {
59     reserved,
60     ignoreSuspendResumeEvents,
61     reserved,
62     cannotBackground,
63     needsActivateOnFGSwitch,
64     backgroundAndForeground,
65     dontGetFrontClicks,
66     ignoreAppDiedEvents,
67     is32BitCompatible,
68     notHighLevelEventAware,
69     onlyLocalHLEvents,
70     notStationeryAware,
71     useTextEditServices,
72     reserved,
73     reserved,
74     reserved,
75     1024 * 1024,        /* Minimum size */
76     1024 * 1024,        /* Preferred size */
77 };
78
79 resource 'FREF' (128, purgeable) {
80     /* The application itself */
81     'APPL', 128, ""
82 };
83
84 resource 'FREF' (129, purgeable) {
85     /* Saved session */
86     'Sess', 129, ""
87     };
88
89 resource 'FREF' (130, purgeable) {
90     /* SSH host keys database */
91     'HKey', 130, ""
92 };
93
94 resource 'BNDL' (128, purgeable) {
95     'pTTY', 0,
96     {
97         'ICN#', {
98             128, 128,
99             129, 129,
100             130, 130
101         },
102         'FREF', {
103             128, 128,
104             129, 129,
105             130, 130
106         };
107     };
108 };
109
110 /* Icons, courtesy of DeRez */
111
112 /* Application icon */
113 resource 'ICN#' (128, purgeable) {
114         {       /* array: 2 elements */
115                 /* [1] */
116                 $"00003FFE 00004001 00004FF9 00005005"
117                 $"00005355 00004505 00005A05 00002405"
118                 $"00004A85 00019005 000223F9 00047C01"
119                 $"00180201 7FA00C7D 801F1001 9FE22001"
120                 $"A00CDFFE AA892002 A0123FFE A82C0000"
121                 $"A0520000 AA6A0000 A00A0000 9FF20000"
122                 $"80020000 80020000 80FA0000 80020000"
123                 $"80020000 7FFC0000 40040000 7FFC",
124                 /* [2] */
125                 $"00003FFE 00007FFF 0000 7FFF 00007FFF"
126                 $"00007FFF 00007FFF 0000 7FFF 00007FFF"
127                 $"00007FFF 00007FFF 0000 7FFF 00007FFF"
128                 $"00007FFF 7FFC7FFF FFFE 7FFF FFFE7FFF"
129                 $"FFFE3FFE FFFE3FFE FFFE 3FFE FFFE0000"
130                 $"FFFE0000 FFFE0000 FFFE 0000 FFFE0000"
131                 $"FFFE0000 FFFE0000 FFFE 0000 FFFE0000"
132                 $"FFFE0000 7FFC0000 7FFC 0000 7FFC"
133         }
134 };
135 resource 'ics#' (128, purgeable) {
136         {       /* array: 2 elements */
137                 /* [1] */
138                 $"00FF 0081 00BD 00A5 00A5 00BD FF81 818D"
139                 $"BD81 A57E A500 BD00 8100 8D00 8100 7E",
140                 /* [2] */
141                 $"00FF 00FF 00FF 00FF 00FF 00FF FFFF FFFF"
142                 $"FFFF FF7E FF00 FF00 FF00 FF00 FF00 7E"
143         }
144 };
145
146 /* Known hosts icon */
147 resource 'ICN#' (130, purgeable) {
148         {       /* array: 2 elements */
149                 /* [1] */
150                 $"1FFFFC00 10000600 10000500 1FFFFC80"
151                 $"10000440 10000420 1FFFFFF0 10000010"
152                 $"13FC0F90 1C03F0F0 15FA8090 150A8090"
153                 $"1D0B80F0 150A8050 15FA8050 1C038070"
154                 $"143A8050 14028050 1FFFABF0 12048110"
155                 $"13FCFF10 1AAAAAB0 10000010 17FFFFD0"
156                 $"14000050 15252250 15555550 15252250"
157                 $"14000050 17FFFFD0 10000010 1FFFFFF0",
158                 /* [2] */
159                 $"1FFFFC00 1FFFFE00 1FFFFF00 1FFFFF80"
160                 $"1FFFFFC0 1FFFFFE0 1FFFFFF0 1FFFFFF0"
161                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
162                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
163                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
164                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
165                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
166                 $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0"
167         }
168 };
169
170 resource 'icl4' (130, purgeable) {
171         $"000FFFFFFFFFFFFFFFFFFF0000000000"
172         $"000F00000000000000000FF000000000"
173         $"000F00000000000000000FCF00000000"
174         $"000FFFFFFFFFFFFFFFFFFFCCF0000000"
175         $"000F00000000000000000FCCCF000000"
176         $"000F00000000000000000FCCCCF00000"
177         $"000FFFFFFFFFFFFFFFFFFFFFFFFF0000"
178         $"000F00000000000000000000000F0000"
179         $"000F00FFFFFFFF000000FFFFF00F0000"
180         $"000FFFCCCCCCCCFFFFFFCCCCFFFF0000"
181         $"000F0FCEEEEECCF0FCCCCCCCF00F0000"
182         $"000F0FCE0D0D0CF0FCCCCCCCF00F0000"
183         $"000FFFCED0D0CCFFFCCCCCCCFFFF0000"
184         $"000F0FCE0D0D0CF0FCCCCCCCCF0F0000"
185         $"000F0FCCC0C0CCF0FCCCCCCCCF0F0000"
186         $"000FFFCCCCCCCCFFFCCCCCCCCFFF0000"
187         $"000F0FCCCCFFFCF0FCCCCCCCCF0F0000"
188         $"000F0FCCCCCCCCF0FCCCCCCCCF0F0000"
189         $"000FFFFFFFFFFFFFFDDDDDDFFFFF0000"
190         $"000F00FCCDDEEF00FDDDDDDF000F0000"
191         $"000F00FFFFFFFF00FFFFFFFF000F0000"
192         $"000F0C0C0C0C0C0C0C0C0C0C0C0F0000"
193         $"000FC0C0C0C0C0C0C0C0C0C0C0CF0000"
194         $"000F0FFFFFFFFFFFFFFFFFFFFF0F0000"
195         $"000FCF0000000000000000000FCF0000"
196         $"000F0F0F00F00F0F00F000F00F0F0000"
197         $"000FCF0F0F0F0F0F0F0F0F0F0FCF0000"
198         $"000F0F0F00F00F0F00F000F00F0F0000"
199         $"000FCF0000000000000000000FCF0000"
200         $"000F0FFFFFFFFFFFFFFFFFFFFF0F0000"
201         $"000FC0C0C0C0C0C0C0C0C0C0C0CF0000"
202         $"000FFFFFFFFFFFFFFFFFFFFFFFFF"
203 };
204 resource 'icl8' (130, purgeable) {
205         $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000"
206         $"000000FF0000000000000000000000000000000000FFFF000000000000000000"
207         $"000000FF0000000000000000000000000000000000FFF6FF0000000000000000"
208         $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F6FF00000000000000"
209         $"000000FF0000000000000000000000000000000000FFF6F6F6FF000000000000"
210         $"000000FF0000000000000000000000000000000000FFF6F6F6F6FF0000000000"
211         $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000"
212         $"000000FF0000000000000000000000000000000000000000000000FF00000000"
213         $"000000FF0000FFFFFFFFFFFFFFFF000000000000FFFFFFFFFF0000FF00000000"
214         $"000000FFFFFF2B2B2B2B2B2B2B2BFFFFFFFFFFFF2B2B2B2BFFFFFFFF00000000"
215         $"000000FF00FF2BFCFCFCFCFCF82BFF00FF2B2B2B2B2B2B2BFF0000FF00000000"
216         $"000000FF00FF2BFC2A2A2A2A002BFF00FF2B2B2B2B2B2B2BFF0000FF00000000"
217         $"000000FFFFFF2BFC2A2A2A2A002BFFFFFF2B2B2B2B2B2B2BFFFFFFFF00000000"
218         $"000000FF00FF2BFC2A2A2A2A002BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000"
219         $"000000FF00FF2BF800000000002BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000"
220         $"000000FFFFFF2B2B2B2B2B2B2B2BFFFFFF2B2B2B2B2B2B2B2BFFFFFF00000000"
221         $"000000FF00FF2B2B2B2BFFFFFF2BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000"
222         $"000000FF00FF2B2B2B2B2B2B2B2BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000"
223         $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF9F9F9F9F9F9FFFFFFFFFF00000000"
224         $"000000FF0000FFF7F8F9FAFBFCFF0000FFF9F9F9F9F9F9FF000000FF00000000"
225         $"000000FF0000FFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF000000FF00000000"
226         $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000"
227         $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000"
228         $"000000FFF5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FF00000000"
229         $"000000FFF5FF00000000000000000000000000000000000000FFF5FF00000000"
230         $"000000FFF5FF00FF0000FF0000FF00FF0000FF000000FF0000FFF5FF00000000"
231         $"000000FFF5FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FFF5FF00000000"
232         $"000000FFF5FF00FF0000FF0000FF00FF0000FF000000FF0000FFF5FF00000000"
233         $"000000FFF5FF00000000000000000000000000000000000000FFF5FF00000000"
234         $"000000FFF5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FF00000000"
235         $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000"
236         $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
237 };
238
239
240 /*
241  * Internal resources
242  */
243
244 /* Menu bar */
245
246 resource 'MBAR' (MBAR_Main, preload) {
247     { mApple, mFile, mEdit }
248 };
249
250 resource 'MENU' (mApple, preload) {
251     mApple,
252     textMenuProc,
253     0b11111111111111111111111111111101,
254     enabled,
255     apple,
256     {
257         "About PuTTYÉ",         noicon, nokey, nomark, plain,
258         "-",                    noicon, nokey, nomark, plain,
259     }
260 };
261
262 resource 'MENU' (mFile, preload) {
263     mFile,
264     textMenuProc,
265     0b11111111111111111111111111111011,
266     enabled,
267     "File",
268     {
269         "New Session",          noicon, "N",   nomark, plain,
270         "Close",                noicon, "W",   nomark, plain,
271         "-",                    noicon, nokey, nomark, plain,
272         "Quit",                 noicon, "Q",   nomark, plain,
273     }
274 };
275
276 resource 'MENU' (mEdit, preload) {
277     mEdit,
278     textMenuProc,
279     0b11111111111111111111111111111101,
280     enabled,
281     "Edit",
282     {
283         "Undo",                 noicon, "Z",   nomark, plain,
284         "-",                    noicon, nokey, nomark, plain,
285         "Cut",                  noicon, "X",   nomark, plain,
286         "Copy",                 noicon, "C",   nomark, plain,
287         "Paste",                noicon, "V",   nomark, plain,
288         "Clear",                noicon, nokey, nomark, plain,
289         "Select All",           noicon, "A",   nomark, plain,
290     }
291 };
292
293 /* Fatal error box.  Stolen from the Finder. */
294
295 resource 'ALRT' (wFatal, "fatalbox", purgeable) {
296         {54, 67, 152, 435},
297         wFatal,
298         beepStages,
299         alertPositionMainScreen
300 };
301
302 resource 'DITL' (wFatal, "fatalbox", purgeable) {
303         {       /* array DITLarray: 3 elements */
304                 /* [1] */
305                 {68, 299, 88, 358},
306                 Button {
307                         enabled,
308                         "OK"
309                 },
310                 /* [2] */
311                 {68, 227, 88, 286},
312                 StaticText {
313                         disabled,
314                         ""
315                 },
316                 /* [3] */
317                 {7, 74, 55, 358},
318                 StaticText {
319                         disabled,
320                         "^0"
321                 }
322         }
323 };
324
325 /* Terminal window */
326
327 resource 'WIND' (wTerminal, "terminal", purgeable) {
328     { 0, 0, 200, 200 },
329     zoomDocProc,
330     invisible,
331     goAway,
332     0x0,
333     "untitled",
334     staggerParentWindowScreen
335 };
336
337 resource 'CNTL' (cVScroll, "vscroll", purgeable) {
338     { 0, 0, 48, 16 },
339     0, invisible, 0, 0,
340     scrollBarProc, 0, ""
341 };
342
343 /* "About" box */
344
345 resource 'DLOG' (wAbout, "about", purgeable) {
346     { 0, 0, 120, 186 },
347     noGrowDocProc,
348     visible,
349     goAway,
350     wAbout,             /* RefCon -- identifies the window to PuTTY */
351     wAbout,             /* DITL ID */
352     "About PuTTY",
353     alertPositionMainScreen
354 };
355
356 resource 'dlgx' (wAbout, "about", purgeable) {
357     versionZero {
358         kDialogFlagsUseThemeBackground | kDialogFlagsUseThemeControls
359     }
360 };
361
362 resource 'DITL' (wAbout, "about", purgeable) {
363     {
364         { 87, 13, 107, 173 },
365         Button { enabled, "View Licence" },
366         { 13, 13, 29, 173 },
367         StaticText { disabled, "PuTTY"},
368         { 42, 13, 74, 173 },
369         StaticText { disabled, "Experimental Mac Port\n"
370                                "© 1997-9 Simon Tatham"},
371     }
372 };
373
374 /* Licence box */
375
376 resource 'WIND' (wLicence, "licence", purgeable) {
377     { 0, 0, 300, 300 },
378     noGrowDocProc,
379     visible,
380     goAway,
381     wLicence,
382     "PuTTY Licence",
383     alertPositionParentWindowScreen
384 };
385
386 type 'TEXT' {
387     string;
388 };
389
390 resource 'TEXT' (wLicence, "licence", purgeable) {
391     "Copyright Â© 1997-9 Simon Tatham\n"
392     "Portions copyright Gary S. Brown and Eric Young\n\n"
393     
394     "Permission is hereby granted, free of charge, to any person "
395     "obtaining a copy of this software and associated documentation "
396     "files (the \"Software\"), to deal in the Software without "
397     "restriction, including without limitation the rights to use, "
398     "copy, modify, merge, publish, distribute, sublicense, and/or "
399     "sell copies of the Software, and to permit persons to whom the "
400     "Software is furnished to do so, subject to the following "
401     "conditions:\n\n"
402     
403     "The above copyright notice and this permission notice shall be "
404     "included in all copies or substantial portions of the Software.\n\n"
405     
406     "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, "
407     "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
408     "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND "
409     "NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR "
410     "ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF "
411     "CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
412     "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE "
413     "SOFTWARE."
414 };
415
416 /* Default Preferences */
417
418 type PREF_wordness_type {
419     wide array [256] {
420         integer;
421     };
422 };
423
424 /*
425  * This resource collects together the various short settings we need.
426  * Each area of the system gets its own longword for flags, and then
427  * we have the other settings.  Strings are stored as two shorts --
428  * the id of a STR# or STR resource, and the index if it's a STR# (0
429  * for STR).
430  */
431
432 type 'pSET' {
433     /* Basic boolean options */
434     boolean dont_close_on_exit, close_on_exit;
435     align long;
436     /* SSH options */
437     boolean use_pty, no_pty;
438     align long;
439     /* Telnet options */
440     boolean bsd_environ, rfc_environ;
441     align long;
442     /* Keyboard options */
443     boolean backspace, delete;
444     boolean std_home_end, rxvt_home_end;
445     boolean std_funkeys, linux_funkeys;
446     boolean normal_cursor, app_cursor;
447     boolean normal_keypad, app_keypad;
448     align long;
449     /* Terminal options */
450     boolean no_dec_om, dec_om;
451     boolean no_auto_wrap, auto_wrap;
452     boolean no_auto_cr, auto_cr;
453     boolean use_icon_name, win_name_always;
454     align long;
455     /* Colour options */
456     boolean bold_font, bold_colour;
457     align long;
458     /* Non-boolean options */
459     integer; integer;           /* host */
460     longint;                    /* port */
461     longint prot_telnet = 0, prot_ssh = 1; /* protocol */
462     integer; integer;           /* termtype */
463     integer; integer;           /* termspeed */
464     integer; integer;           /* environmt */
465     integer; integer;           /* username */
466     longint;                    /* width */
467     longint;                    /* height */
468     longint;                    /* save_lines */
469     integer; unsigned integer;  /* font */
470     longint;                    /* font_height */
471     integer;                    /* 'pltt' for colours */
472     integer;                    /* 'wORD' for wordness */
473 };
474
475 resource 'pSET' (PREF_settings, "settings", purgeable) {
476     close_on_exit,
477     use_pty,
478     rfc_environ,
479     delete,
480     std_home_end,
481     std_funkeys,
482     normal_cursor,
483     normal_keypad,
484     no_dec_om,
485     auto_wrap,
486     no_auto_cr,
487     use_icon_name,
488     bold_colour,
489 #define PREF_strings 1024
490     PREF_strings, 1,            /* host 'STR#' */
491     23, prot_telnet,            /* port, protocol */
492     PREF_strings, 2,            /* termtype 'STR#' */
493     PREF_strings, 3,            /* termspeed 'STR#' */
494     PREF_strings, 4,            /* environmt 'STR#' */
495     PREF_strings, 5,            /* username */
496     80, 24, 200,                /* width, height, save_lines */
497     PREF_strings, 6,            /* font 'STR#' */
498     9,                          /* font_height */
499 #define PREF_pltt 1024
500     PREF_pltt,                  /* colours 'pltt' */
501 #define PREF_wordness 1024
502     PREF_wordness,              /* wordness 'wORD */
503 };
504
505 resource 'STR#' (PREF_strings, "strings", purgeable) {
506     {
507         "nowhere.loopback.edu",
508         "xterm",
509         "38400,38400",
510         "\000",
511         "",
512         "Monaco",
513     }
514 };
515
516 resource PREF_wordness_type (PREF_wordness, "wordness", purgeable) {
517     {
518         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
519         0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,
520         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,
521         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,
522         1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
523         1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
524         2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,
525         2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2
526     }
527 };
528
529 /*
530  * and _why_ isn't this provided for us?
531  */
532 type 'TMPL' {
533     array {
534         pstring;                /* Item name */
535         literal longint;        /* Item type */
536     };
537 };
538
539 resource 'TMPL' (128, "pSET") {
540     {
541         "Close on exit", 'BBIT',
542         "", 'BBIT', /* Must pad to a multiple of 8 */
543         "", 'BBIT',
544         "", 'BBIT',
545         "", 'BBIT',
546         "", 'BBIT',
547         "", 'BBIT',
548         "", 'BBIT',
549         "", 'ALNG',
550         "No PTY", 'BBIT',
551         "", 'BBIT',
552         "", 'BBIT',
553         "", 'BBIT',
554         "", 'BBIT',
555         "", 'BBIT',
556         "", 'BBIT',
557         "", 'BBIT',
558         "", 'ALNG',
559         "RFC OLD-ENVIRON", 'BBIT',
560         "", 'BBIT',
561         "", 'BBIT',
562         "", 'BBIT',
563         "", 'BBIT',
564         "", 'BBIT',
565         "", 'BBIT',
566         "", 'BBIT',
567         "", 'ALNG',
568         "Delete key sends delete", 'BBIT',
569         "rxvt home/end", 'BBIT',
570         "Linux function keys", 'BBIT',
571         "Application cursor keys", 'BBIT',
572         "Application keypad", 'BBIT',
573         "", 'BBIT',
574         "", 'BBIT',
575         "", 'BBIT',
576         "", 'ALNG',
577         "Use colour for bold", 'BBIT',
578         "", 'BBIT',
579         "", 'BBIT',
580         "", 'BBIT',
581         "", 'BBIT',
582         "", 'BBIT',
583         "", 'BBIT',
584         "", 'BBIT',
585         "", 'ALNG',
586         "Host STR# ID", 'DWRD',
587         "Host STR# index", 'DWRD',
588         "Port", 'DLNG',
589         "Protocol", 'DLNG',
590         "Termspeed STR# ID", 'DWRD',
591         "Termspeed STR# index", 'DWRD',
592         "Environ STR# ID", 'DWRD',
593         "Environ STR# index", 'DWRD',
594         "Username STR# ID", 'DWRD',
595         "Username STR# index", 'DWRD',
596         "Terminal width", 'DLNG',
597         "Terminal height", 'DLNG',
598         "Save lines", 'DLNG',
599         "Font STR# ID", 'DWRD',
600         "Font STR# index", 'DWRD',
601         "Font size", 'DLNG',
602         "pltt ID", 'DWRD',
603         "wORD ID", 'DWRD',
604     };
605 };
606
607
608 /*
609  * *mutter*  It might be nice if Apple could actually put all the flags in
610  * Palettes.r.
611  */
612
613 #define pmCourteous     0x0000
614 #define pmDithered      0x0001
615 #define pmTolerant      0x0002
616 #define pmAnimated      0x0004
617 #define pmExplicit      0x0008
618 #define pmWhite         0x0010
619 #define pmBlack         0x0020
620 #define pmInhibitG2     0x0100
621 #define pmInhibitC2     0x0200
622 #define pmInhibitG4     0x0400
623 #define pmInhibitC4     0x0800
624 #define pmInhibitG8     0x1000
625 #define pmInhibitC8     0x2000
626
627 #define PM_BASIC (pmTolerant | pmInhibitG4 | pmInhibitG8)
628 #define PM_NORMAL (PM_BASIC | pmInhibitG2 | pmInhibitC2)
629
630 resource 'pltt' (PREF_pltt, purgeable) {
631     {
632         0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000,      /* black */
633         0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000,      /* bright black */
634         0xbbbb, 0x0000, 0x0000, PM_NORMAL, 0x2000,      /* red */
635         0xffff, 0x5555, 0x5555, PM_NORMAL, 0x2000,      /* bright red */
636         0x0000, 0xbbbb, 0x0000, PM_NORMAL, 0x2000,      /* green */
637         0x5555, 0xffff, 0x5555, PM_NORMAL, 0x2000,      /* bright green */
638         0xbbbb, 0xbbbb, 0x0000, PM_NORMAL, 0x2000,      /* yellow */
639         0xffff, 0xffff, 0x0000, PM_NORMAL, 0x2000,      /* bright yellow */
640         0x0000, 0x0000, 0xbbbb, PM_NORMAL, 0x2000,      /* blue */
641         0x5555, 0x5555, 0xffff, PM_NORMAL, 0x2000,      /* bright blue */
642         0xbbbb, 0x0000, 0xbbbb, PM_NORMAL, 0x2000,      /* magenta */
643         0xffff, 0x5555, 0xffff, PM_NORMAL, 0x2000,      /* bright magenta */
644         0x0000, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000,      /* cyan */
645         0x5555, 0xffff, 0xffff, PM_NORMAL, 0x2000,      /* bright cyan */
646         0xbbbb, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000,      /* white */
647         0xffff, 0xffff, 0xffff, PM_NORMAL, 0x2000,      /* bright white */
648         0xbbbb, 0xbbbb, 0xbbbb, PM_BASIC,  0x2000,      /* default fg */
649         0xffff, 0xffff, 0xffff, PM_BASIC,  0x2000,      /* default bold fg */
650         0x0000, 0x0000, 0x0000, PM_BASIC,  0x2000,      /* default bg */
651         0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000,      /* default bold bg */
652         0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000,      /* cursor bg */
653         0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000,      /* bold cursor bg */
654         0x0000, 0xffff, 0x0000, PM_BASIC,  0x2000,      /* cursor fg */
655         0x0000, 0xffff, 0x0000, PM_NORMAL, 0x2000,      /* bold cursor fg */
656     }
657 };
658
659 read 'pTST' (128, "test data", purgeable) "fragment";
660
661 type 'pMAP' {
662     hex string;
663 };
664
665 resource 'pMAP' (128, "Latin-1 G1 -> Mac OS Roman") {
666     $"20 c1 a2 a3 db b4 00 a4 ac a9 bb c7 c2 00 a8 f8"
667     $"a1 b1 00 00 ab b5 a6 e1 fc 00 bc c8 00 00 00 c0"
668     $"cb e7 e5 cc 80 81 ae 82 e9 83 e6 e8 ed ea eb ec"
669     $"00 84 f1 ee ef cd 85 00 af f4 f2 f3 86 00 00 a7"
670     $"88 87 89 8b 8a 8c be 8d 8f 8e 90 91 93 92 94 95"
671     $"00 96 98 97 99 9b 9a d6 bf 9d 9c 9e 9f 00 00 D8"
672 };
673
674 resource 'pMAP' (129, "DEC line drawing -> Mac OS VT100") {
675     $"d7 bd 09 0c 0d 0a a1 b1 00 0b d2 d3 d4 d5 da e2"
676     $"e3 e4 f5 f6 f7 f8 f9 fa fb b2 b3 b9 ad a3 e1"
677 };