1 /* $Id: mac_res.r,v 1.1.2.7 1999/03/02 23:19:20 ben Exp $ */
3 * Copyright (c) 1999 Ben Harris
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
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
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
34 /* Get resource IDs we share with C code */
38 * Finder-related resources
41 /* 'pTTY' is now registered with Apple as PuTTY's signature */
43 type 'pTTY' as 'STR ';
45 resource 'pTTY' (0, purgeable) {
46 "PuTTY experimental Mac port"
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) */
58 resource 'SIZE' (-1) {
60 ignoreSuspendResumeEvents,
63 needsActivateOnFGSwitch,
64 backgroundAndForeground,
68 notHighLevelEventAware,
75 1024 * 1024, /* Minimum size */
76 1024 * 1024, /* Preferred size */
79 resource 'FREF' (128, purgeable) {
80 /* The application itself */
84 resource 'FREF' (129, purgeable) {
89 resource 'FREF' (130, purgeable) {
90 /* SSH host keys database */
94 resource 'BNDL' (128, purgeable) {
110 /* Icons, courtesy of DeRez */
112 /* Application icon */
113 resource 'ICN#' (128, purgeable) {
114 { /* array: 2 elements */
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",
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"
135 resource 'ics#' (128, purgeable) {
136 { /* array: 2 elements */
138 $"00FF 0081 00BD 00A5 00A5 00BD FF81 818D"
139 $"BD81 A57E A500 BD00 8100 8D00 8100 7E",
141 $"00FF 00FF 00FF 00FF 00FF 00FF FFFF FFFF"
142 $"FFFF FF7E FF00 FF00 FF00 FF00 FF00 7E"
146 /* Known hosts icon */
147 resource 'ICN#' (130, purgeable) {
148 { /* array: 2 elements */
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",
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"
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"
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"
246 resource 'MBAR' (MBAR_Main, preload) {
250 resource 'MENU' (mApple, preload) {
253 0b11111111111111111111111111111101,
257 "About PuTTYÉ", noicon, nokey, nomark, plain,
258 "-", noicon, nokey, nomark, plain,
262 resource 'MENU' (mFile, preload) {
265 0b11111111111111111111111111111011,
269 "New Session", noicon, "N", nomark, plain,
270 "Close", noicon, "W", nomark, plain,
271 "-", noicon, nokey, nomark, plain,
272 "Quit", noicon, "Q", nomark, plain,
276 /* Fatal error box. Stolen from the Finder. */
278 resource 'ALRT' (wFatal, "fatalbox", purgeable) {
282 alertPositionMainScreen
285 resource 'DITL' (wFatal, "fatalbox", purgeable) {
286 { /* array DITLarray: 3 elements */
308 /* Terminal window */
310 resource 'WIND' (wTerminal, "terminal", purgeable) {
317 staggerParentWindowScreen
320 resource 'CNTL' (cVScroll, "vscroll", purgeable) {
328 resource 'DLOG' (wAbout, "about", purgeable) {
333 wAbout, /* RefCon -- identifies the window to PuTTY */
334 wAbout, /* DITL ID */
336 alertPositionMainScreen
339 resource 'dlgx' (wAbout, "about", purgeable) {
341 kDialogFlagsUseThemeBackground | kDialogFlagsUseThemeControls
345 resource 'DITL' (wAbout, "about", purgeable) {
347 { 87, 13, 107, 173 },
348 Button { enabled, "View Licence" },
350 StaticText { disabled, "PuTTY"},
352 StaticText { disabled, "Experimental Mac Port\n"
353 "© 1997-9 Simon Tatham"},
359 resource 'WIND' (wLicence, "licence", purgeable) {
366 alertPositionParentWindowScreen
373 resource 'TEXT' (wLicence, "licence", purgeable) {
374 "Copyright © 1997-9 Simon Tatham\n"
375 "Portions copyright Gary S. Brown and Eric Young\n\n"
377 "Permission is hereby granted, free of charge, to any person "
378 "obtaining a copy of this software and associated documentation "
379 "files (the \"Software\"), to deal in the Software without "
380 "restriction, including without limitation the rights to use, "
381 "copy, modify, merge, publish, distribute, sublicense, and/or "
382 "sell copies of the Software, and to permit persons to whom the "
383 "Software is furnished to do so, subject to the following "
386 "The above copyright notice and this permission notice shall be "
387 "included in all copies or substantial portions of the Software.\n\n"
389 "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, "
390 "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
391 "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND "
392 "NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR "
393 "ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF "
394 "CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
395 "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE "
399 /* Default Preferences */
401 type PREF_wordness_type {
408 * This resource collects together the various short settings we need.
409 * Each area of the system gets its own longword for flags, and then
410 * we have the other settings. Strings are stored as two shorts --
411 * the id of a STR# or STR resource, and the index if it's a STR# (0
416 /* Basic boolean options */
417 boolean dont_close_on_exit, close_on_exit;
420 boolean use_pty, no_pty;
423 boolean bsd_environ, rfc_environ;
425 /* Keyboard options */
426 boolean backspace, delete;
427 boolean std_home_end, rxvt_home_end;
428 boolean std_funkeys, linux_funkeys;
429 boolean normal_cursor, app_cursor;
430 boolean normal_keypad, app_keypad;
432 /* Terminal options */
433 boolean no_dec_om, dec_om;
434 boolean no_auto_wrap, auto_wrap;
435 boolean no_auto_cr, auto_cr;
436 boolean use_icon_name, win_name_always;
439 boolean bold_font, bold_colour;
441 /* Non-boolean options */
442 integer; integer; /* host */
444 longint prot_telnet = 0, prot_ssh = 1; /* protocol */
445 integer; integer; /* termtype */
446 integer; integer; /* termspeed */
447 integer; integer; /* environmt */
448 integer; integer; /* username */
450 longint; /* height */
451 longint; /* save_lines */
452 integer; unsigned integer; /* font */
453 longint; /* font_height */
454 integer; /* 'pltt' for colours */
455 integer; /* 'wORD' for wordness */
458 resource 'pSET' (PREF_settings, "settings", purgeable) {
472 #define PREF_strings 1024
473 PREF_strings, 1, /* host 'STR#' */
474 23, prot_telnet, /* port, protocol */
475 PREF_strings, 2, /* termtype 'STR#' */
476 PREF_strings, 3, /* termspeed 'STR#' */
477 PREF_strings, 4, /* environmt 'STR#' */
478 PREF_strings, 5, /* username */
479 80, 24, 200, /* width, height, save_lines */
480 PREF_strings, 6, /* font 'STR#' */
482 #define PREF_pltt 1024
483 PREF_pltt, /* colours 'pltt' */
484 #define PREF_wordness 1024
485 PREF_wordness, /* wordness 'wORD */
488 resource 'STR#' (PREF_strings, "strings", purgeable) {
490 "nowhere.loopback.edu",
499 resource PREF_wordness_type (PREF_wordness, "wordness", purgeable) {
501 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,
502 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,
503 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,
504 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,
505 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,
506 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,
507 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,
508 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
513 * and _why_ isn't this provided for us?
517 pstring; /* Item name */
518 literal longint; /* Item type */
522 resource 'TMPL' (128, "pSET") {
524 "Close on exit", 'BBIT',
525 "", 'BBIT', /* Must pad to a multiple of 8 */
542 "RFC OLD-ENVIRON", 'BBIT',
551 "Delete key sends delete", 'BBIT',
552 "rxvt home/end", 'BBIT',
553 "Linux function keys", 'BBIT',
554 "Application cursor keys", 'BBIT',
555 "Application keypad", 'BBIT',
560 "Use colour for bold", 'BBIT',
569 "Host STR# ID", 'DWRD',
570 "Host STR# index", 'DWRD',
573 "Termspeed STR# ID", 'DWRD',
574 "Termspeed STR# index", 'DWRD',
575 "Environ STR# ID", 'DWRD',
576 "Environ STR# index", 'DWRD',
577 "Username STR# ID", 'DWRD',
578 "Username STR# index", 'DWRD',
579 "Terminal width", 'DLNG',
580 "Terminal height", 'DLNG',
581 "Save lines", 'DLNG',
582 "Font STR# ID", 'DWRD',
583 "Font STR# index", 'DWRD',
592 * *mutter* It might be nice if Apple could actually put all the flags in
596 #define pmCourteous 0x0000
597 #define pmDithered 0x0001
598 #define pmTolerant 0x0002
599 #define pmAnimated 0x0004
600 #define pmExplicit 0x0008
601 #define pmWhite 0x0010
602 #define pmBlack 0x0020
603 #define pmInhibitG2 0x0100
604 #define pmInhibitC2 0x0200
605 #define pmInhibitG4 0x0400
606 #define pmInhibitC4 0x0800
607 #define pmInhibitG8 0x1000
608 #define pmInhibitC8 0x2000
610 #define PM_BASIC (pmTolerant | pmInhibitG4 | pmInhibitG8)
611 #define PM_NORMAL (PM_BASIC | pmInhibitG2 | pmInhibitC2)
613 resource 'pltt' (PREF_pltt, purgeable) {
615 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* black */
616 0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* bright black */
617 0xbbbb, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* red */
618 0xffff, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* bright red */
619 0x0000, 0xbbbb, 0x0000, PM_NORMAL, 0x2000, /* green */
620 0x5555, 0xffff, 0x5555, PM_NORMAL, 0x2000, /* bright green */
621 0xbbbb, 0xbbbb, 0x0000, PM_NORMAL, 0x2000, /* yellow */
622 0xffff, 0xffff, 0x0000, PM_NORMAL, 0x2000, /* bright yellow */
623 0x0000, 0x0000, 0xbbbb, PM_NORMAL, 0x2000, /* blue */
624 0x5555, 0x5555, 0xffff, PM_NORMAL, 0x2000, /* bright blue */
625 0xbbbb, 0x0000, 0xbbbb, PM_NORMAL, 0x2000, /* magenta */
626 0xffff, 0x5555, 0xffff, PM_NORMAL, 0x2000, /* bright magenta */
627 0x0000, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000, /* cyan */
628 0x5555, 0xffff, 0xffff, PM_NORMAL, 0x2000, /* bright cyan */
629 0xbbbb, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000, /* white */
630 0xffff, 0xffff, 0xffff, PM_NORMAL, 0x2000, /* bright white */
631 0xbbbb, 0xbbbb, 0xbbbb, PM_BASIC, 0x2000, /* default fg */
632 0xffff, 0xffff, 0xffff, PM_BASIC, 0x2000, /* default bold fg */
633 0x0000, 0x0000, 0x0000, PM_BASIC, 0x2000, /* default bg */
634 0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* default bold bg */
635 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* cursor bg */
636 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* bold cursor bg */
637 0x0000, 0xffff, 0x0000, PM_BASIC, 0x2000, /* cursor fg */
638 0x0000, 0xffff, 0x0000, PM_NORMAL, 0x2000, /* bold cursor fg */
642 read 'pTST' (128, "test data", purgeable) "fragment";