home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1990-05-23 | 6.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: applic.c.bin
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| AMOS Picture Packer (image/amosPicturePacker)
| ext
| Supported |
1%
| dexvert
| Debian floppy split (archive/debianFloppySplit)
| ext
| Unsupported |
1%
| dexvert
| Sound Images sound sample (audio/soundImagesSoundSample)
| ext
| Unsupported |
1%
| dexvert
| DESI-III drawing (image/desiIIIDrawing)
| ext
| Unsupported |
1%
| dexvert
| MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable)
| ext
| Unsupported |
1%
| dexvert
| Alien Trilogytextures (other/alienTrilogyTextures)
| ext
| Unsupported |
1%
| dexvert
| APT cache data (other/aptCacheData)
| ext
| Unsupported |
1%
| dexvert
| CorelTRACE configuration (other/corelTRACEConfiguration)
| ext
| Unsupported |
1%
| dexvert
| Dreamcast Disc (other/dreamcastDisc)
| ext
| Unsupported |
1%
| dexvert
| EST flat binary (other/estFlatBinary)
| ext
| Unsupported |
1%
| dexvert
| Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat)
| ext
| Unsupported |
1%
| dexvert
| Sega Genesis/Megadrive/32x ROM (other/genesisROM)
| ext
| Unsupported |
1%
| dexvert
| Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive)
| ext
| Unsupported |
1%
| dexvert
| Sound Images Sound Driver (other/soundImagesSoundDriver)
| ext
| Unsupported |
1%
| dexvert
| Symantec/Norton Config (other/symantecNortonConfig)
| ext
| Unsupported |
1%
| dexvert
| Vectrex ROM (other/vectrexROM)
| ext
| Unsupported |
1%
| dexvert
| BIS raP encoded format (other/bisraPEncoded)
| ext
| Unsupported |
1%
| dexvert
| Pascal Script binary (other/pascalScriptBinary)
| ext
| Unsupported |
1%
| dexvert
| 7th Level game data archive (other/seventhLevelGameDataArchive)
| ext
| Unsupported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Binary Text (image/binaryText)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary, Tue Jan 24 10:24:14 1989, modified Fri Jan 26 14:28:43 1990, creator Think C, type ASCII, 6773 bytes "applic.c"
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 61 70 70 6c 69 63 | 2e 63 00 00 00 00 00 00 |..applic|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 1a 75 00 | 00 00 00 a0 02 45 9e a1 |......u.|.....E..|
|00000060| e6 55 6b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Uk.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 0d 20 2a 09 61 70 70 | 6c 69 63 2e 63 0d 20 2a |*. *.app|lic.c. *|
|000000e0| 0d 20 2a 09 54 48 49 4e | 4b 20 43 20 34 2e 30 20 |. *.THIN|K C 4.0 |
|000000f0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 20 53 68 65 6c |Applicat|ion Shel|
|00000100| 6c 20 66 6f 72 20 74 68 | 65 20 4d 61 63 69 6e 74 |l for th|e Macint|
|00000110| 6f 73 68 0d 20 2a 0d 20 | 2a 09 57 72 69 74 74 65 |osh. *. |*.Writte|
|00000120| 6e 20 62 79 20 50 61 63 | 6f 20 58 61 6e 64 65 72 |n by Pac|o Xander|
|00000130| 20 4e 61 74 68 61 6e 0d | 20 2a 09 a9 31 39 39 30 | Nathan.| *..1990|
|00000140| 2c 20 4d 6f 74 6f 72 6f | 6c 61 20 49 6e 63 2e 20 |, Motoro|la Inc. |
|00000150| 20 50 75 62 6c 69 63 20 | 64 6f 6d 61 69 6e 20 73 | Public |domain s|
|00000160| 6f 75 72 63 65 20 63 6f | 64 65 2e 0d 20 2a 2a 2a |ource co|de.. ***|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 0d |********|*****/..|
|000001c0| 23 69 6e 63 6c 75 64 65 | 20 22 61 70 70 6c 69 63 |#include| "applic|
|000001d0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 77 69 |.h".#inc|lude "wi|
|000001e0| 6e 64 6f 77 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |ndow.h".|#include|
|000001f0| 20 22 64 69 61 6c 6f 67 | 2e 68 22 0d 23 69 6e 63 | "dialog|.h".#inc|
|00000200| 6c 75 64 65 20 22 63 6f | 6e 74 65 78 74 2e 68 22 |lude "co|ntext.h"|
|00000210| 0d 23 69 6e 63 6c 75 64 | 65 20 22 65 64 69 74 2e |.#includ|e "edit.|
|00000220| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 6e 6f 69 |h".#incl|ude "noi|
|00000230| 73 65 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |se.h".#i|nclude "|
|00000240| 73 65 74 75 70 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |setup.h"|.#includ|
|00000250| 65 20 22 70 72 69 6e 74 | 2e 68 22 0d 23 69 6e 63 |e "print|.h".#inc|
|00000260| 6c 75 64 65 20 22 64 6f | 63 75 6d 65 6e 74 2e 68 |lude "do|cument.h|
|00000270| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 61 73 63 69 |".#inclu|de "asci|
|00000280| 69 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 68 |i.h".#in|clude "h|
|00000290| 65 6c 70 2e 68 22 0d 0d | 0d 23 64 65 66 69 6e 65 |elp.h"..|.#define|
|000002a0| 20 6d 6f 75 73 65 4d 6f | 76 65 64 4d 73 67 09 09 | mouseMo|vedMsg..|
|000002b0| 30 78 66 61 0d 23 64 65 | 66 69 6e 65 20 6f 73 45 |0xfa.#de|fine osE|
|000002c0| 76 65 6e 74 09 09 09 09 | 61 70 70 34 45 76 74 0d |vent....|app4Evt.|
|000002d0| 23 64 65 66 69 6e 65 20 | 72 65 73 75 6d 65 4d 61 |#define |resumeMa|
|000002e0| 73 6b 09 09 09 31 0d 23 | 64 65 66 69 6e 65 20 73 |sk...1.#|define s|
|000002f0| 75 73 70 65 6e 64 52 65 | 73 75 6d 65 4d 73 67 09 |uspendRe|sumeMsg.|
|00000300| 31 0d 23 64 65 66 69 6e | 65 20 43 55 52 53 5f 44 |1.#defin|e CURS_D|
|00000310| 45 4c 41 59 09 09 09 36 | 4c 0d 0d 0d 2f 2a 20 45 |ELAY...6|L.../* E|
|00000320| 78 74 65 72 6e 61 6c 20 | 44 61 74 61 20 53 74 72 |xternal |Data Str|
|00000330| 75 63 74 75 72 65 73 0d | 20 2a 2f 0d 61 63 75 72 |uctures.| */.acur|
|00000340| 48 61 6e 64 6c 65 0d 09 | 63 75 72 4c 69 73 74 3b |Handle..|curList;|
|00000350| 09 09 09 09 2f 2a 20 72 | 73 72 63 20 66 6f 72 20 |..../* r|src for |
|00000360| 77 61 74 63 68 20 63 75 | 72 73 6f 72 20 2a 2f 0d |watch cu|rsor */.|
|00000370| 0d 4d 61 63 68 69 6e 65 | 43 6f 6e 66 69 67 0d 09 |.Machine|Config..|
|00000380| 6c 61 4d 61 63 68 69 6e | 65 3b 0d 0d 0d 23 69 66 |laMachin|e;...#if|
|00000390| 64 65 66 20 50 52 4f 54 | 4f 54 59 50 45 53 0d 2f |def PROT|OTYPES./|
|000003a0| 2a 20 4c 6f 63 61 6c 20 | 46 75 6e 63 74 69 6f 6e |* Local |Function|
|000003b0| 20 50 72 6f 74 6f 74 79 | 70 65 73 0d 20 2a 2f 0d | Prototy|pes. */.|
|000003c0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 41 70 |unsigned| long Ap|
|000003d0| 70 6c 53 6c 65 65 70 20 | 28 76 6f 69 64 29 3b 0d |plSleep |(void);.|
|000003e0| 76 6f 69 64 20 41 70 70 | 6c 45 76 65 6e 74 4c 6f |void App|lEventLo|
|000003f0| 6f 70 20 28 45 76 65 6e | 74 52 65 63 6f 72 64 20 |op (Even|tRecord |
|00000400| 2a 74 68 65 45 76 65 6e | 74 29 3b 0d 73 68 6f 72 |*theEven|t);.shor|
|00000410| 74 20 6d 61 69 6e 20 28 | 76 6f 69 64 29 3b 0d 23 |t main (|void);.#|
|00000420| 65 6e 64 69 66 0d 0d 2f | 2a 20 41 6e 69 6d 61 74 |endif../|* Animat|
|00000430| 65 20 74 68 65 20 77 61 | 74 63 68 20 63 75 72 73 |e the wa|tch curs|
|00000440| 6f 72 20 2d 20 63 61 6c | 6c 20 77 69 74 68 20 61 |or - cal|l with a|
|00000450| 20 22 54 52 55 45 22 20 | 61 72 67 75 6d 65 6e 74 | "TRUE" |argument|
|00000460| 20 74 6f 20 72 65 73 65 | 74 20 74 6f 20 74 68 65 | to rese|t to the|
|00000470| 20 69 6e 69 74 69 61 6c | 0d 20 2a 20 22 6e 69 6e | initial|. * "nin|
|00000480| 65 20 6f 27 63 6c 6f 63 | 6b 22 20 70 6f 73 69 74 |e o'cloc|k" posit|
|00000490| 69 6f 6e 20 74 68 65 6e | 20 77 69 74 68 20 61 20 |ion then| with a |
|000004a0| 22 46 41 4c 53 45 20 61 | 72 67 75 6d 65 6e 74 20 |"FALSE a|rgument |
|000004b0| 74 6f 20 74 75 72 6e 20 | 74 68 65 20 68 61 6e 64 |to turn |the hand|
|000004c0| 73 2e 2e 2e 0d 20 2a 2f | 0d 76 6f 69 64 0d 41 70 |s.... */|.void.Ap|
|000004d0| 70 6c 53 70 69 6e 43 75 | 72 73 20 28 72 65 73 65 |plSpinCu|rs (rese|
|000004e0| 74 29 0d 09 72 65 67 69 | 73 74 65 72 20 42 6f 6f |t)..regi|ster Boo|
|000004f0| 6c 65 61 6e 20 72 65 73 | 65 74 3b 0d 7b 0d 09 72 |lean res|et;.{..r|
|00000500| 65 67 69 73 74 65 72 20 | 43 75 72 73 48 61 6e 64 |egister |CursHand|
|00000510| 6c 65 20 77 61 74 63 68 | 48 64 6c 3b 0d 09 73 74 |le watch|Hdl;..st|
|00000520| 61 74 69 63 20 6c 6f 6e | 67 20 6c 61 73 74 54 69 |atic lon|g lastTi|
|00000530| 63 6b 20 3d 20 30 4c 3b | 0d 09 0d 09 69 66 20 28 |ck = 0L;|....if (|
|00000540| 28 54 69 63 6b 43 6f 75 | 6e 74 28 29 20 2d 20 6c |(TickCou|nt() - l|
|00000550| 61 73 74 54 69 63 6b 29 | 20 3e 20 43 55 52 53 5f |astTick)| > CURS_|
|00000560| 44 45 4c 41 59 29 20 7b | 0d 09 09 48 4c 6f 63 6b |DELAY) {|...HLock|
|00000570| 28 63 75 72 4c 69 73 74 | 29 3b 0d 09 0d 09 09 2f |(curList|);...../|
|00000580| 2a 20 4c 6f 61 64 20 74 | 68 65 20 22 6e 69 6e 65 |* Load t|he "nine|
|00000590| 20 6f 27 63 6c 6f 63 6b | 22 20 77 61 74 63 68 20 | o'clock|" watch |
|000005a0| 63 75 72 73 6f 72 20 69 | 66 20 72 65 71 75 65 73 |cursor i|f reques|
|000005b0| 74 65 64 0d 09 09 20 2a | 2f 0d 09 09 69 66 20 28 |ted... *|/...if (|
|000005c0| 72 65 73 65 74 29 0d 09 | 09 09 28 2a 63 75 72 4c |reset)..|..(*curL|
|000005d0| 69 73 74 29 2d 3e 77 68 | 69 63 68 20 3d 20 30 3b |ist)->wh|ich = 0;|
|000005e0| 0d 0d 09 09 2f 2a 20 43 | 79 63 6c 65 20 74 6f 20 |..../* C|ycle to |
|000005f0| 74 68 65 20 6e 65 78 74 | 20 70 6f 73 69 74 69 6f |the next| positio|
|00000600| 6e 20 77 61 74 63 68 20 | 63 75 72 73 6f 72 0d 09 |n watch |cursor..|
|00000610| 09 20 2a 2f 0d 09 09 53 | 65 74 43 75 72 73 6f 72 |. */...S|etCursor|
|00000620| 28 2a 28 28 2a 63 75 72 | 4c 69 73 74 29 2d 3e 63 |(*((*cur|List)->c|
|00000630| 75 72 73 5b 28 28 2a 63 | 75 72 4c 69 73 74 29 2d |urs[((*c|urList)-|
|00000640| 3e 77 68 69 63 68 20 3c | 20 28 2a 63 75 72 4c 69 |>which <| (*curLi|
|00000650| 73 74 29 2d 3e 66 72 61 | 6d 65 73 29 20 3f 20 28 |st)->fra|mes) ? (|
|00000660| 28 2a 63 75 72 4c 69 73 | 74 29 2d 3e 77 68 69 63 |(*curLis|t)->whic|
|00000670| 68 2b 2b 29 20 3a 20 28 | 28 2a 63 75 72 4c 69 73 |h++) : (|(*curLis|
|00000680| 74 29 2d 3e 77 68 69 63 | 68 20 3d 20 30 29 5d 29 |t)->whic|h = 0)])|
|00000690| 29 3b 0d 09 0d 09 09 48 | 55 6e 6c 6f 63 6b 28 63 |);.....H|Unlock(c|
|000006a0| 75 72 4c 69 73 74 29 3b | 0d 09 09 6c 61 73 74 54 |urList);|...lastT|
|000006b0| 69 63 6b 20 3d 20 54 69 | 63 6b 43 6f 75 6e 74 28 |ick = Ti|ckCount(|
|000006c0| 29 3b 0d 09 7d 0d 7d 0d | 0d 0d 2f 2a 20 53 70 65 |);..}.}.|../* Spe|
|000006d0| 63 69 61 6c 20 63 61 73 | 65 20 6f 66 20 65 76 65 |cial cas|e of eve|
|000006e0| 6e 74 20 68 61 6e 64 6c | 69 6e 67 3b 20 63 68 65 |nt handl|ing; che|
|000006f0| 63 6b 20 66 6f 72 20 61 | 62 6f 72 74 20 65 76 65 |ck for a|bort eve|
|00000700| 6e 74 20 28 63 6d 64 2d | 2e 29 0d 20 2a 2f 0d 42 |nt (cmd-|.). */.B|
|00000710| 6f 6f 6c 65 61 6e 0d 41 | 70 70 6c 41 62 6f 72 74 |oolean.A|pplAbort|
|00000720| 20 28 29 0d 7b 0d 09 45 | 76 65 6e 74 52 65 63 6f | ().{..E|ventReco|
|00000730| 72 64 20 74 68 65 45 76 | 65 6e 74 3b 0d 09 72 65 |rd theEv|ent;..re|
|00000740| 67 69 73 74 65 72 20 42 | 6f 6f 6c 65 61 6e 20 61 |gister B|oolean a|
|00000750| 62 6f 72 74 65 64 20 3d | 20 46 41 4c 53 45 3b 0d |borted =| FALSE;.|
|00000760| 0d 09 69 66 20 28 45 76 | 65 6e 74 41 76 61 69 6c |..if (Ev|entAvail|
|00000770| 28 6b 65 79 44 6f 77 6e | 4d 61 73 6b 2c 20 26 74 |(keyDown|Mask, &t|
|00000780| 68 65 45 76 65 6e 74 29 | 29 0d 09 09 69 66 20 28 |heEvent)|)...if (|
|00000790| 74 68 65 45 76 65 6e 74 | 2e 6d 6f 64 69 66 69 65 |theEvent|.modifie|
|000007a0| 72 73 20 26 20 63 6d 64 | 4b 65 79 29 20 0d 09 09 |rs & cmd|Key) ...|
|000007b0| 09 69 66 20 28 28 75 6e | 73 69 67 6e 65 64 20 63 |.if ((un|signed c|
|000007c0| 68 61 72 29 20 74 68 65 | 45 76 65 6e 74 2e 6d 65 |har) the|Event.me|
|000007d0| 73 73 61 67 65 20 3d 3d | 20 27 2e 27 29 0d 09 09 |ssage ==| '.')...|
|000007e0| 09 09 61 62 6f 72 74 65 | 64 20 3d 20 54 52 55 45 |..aborte|d = TRUE|
|000007f0| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 61 62 6f 72 74 |;...retu|rn abort|
|00000800| 65 64 3b 0d 7d 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |ed;.}...|/* This |
|00000810| 69 73 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |is the a|pplicati|
|00000820| 6f 6e 27 73 20 22 69 64 | 6c 65 20 74 69 6d 65 22 |on's "id|le time"|
|00000830| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 72 6f 75 74 | process|ing rout|
|00000840| 69 6e 65 2e 2e 2e 20 20 | 4e 75 6c 6c 20 65 76 65 |ine... |Null eve|
|00000850| 6e 74 73 2c 0d 20 2a 20 | 62 61 63 6b 67 72 6f 75 |nts,. * |backgrou|
|00000860| 6e 64 20 65 76 65 6e 74 | 73 2c 20 62 6c 69 6e 6b |nd event|s, blink|
|00000870| 69 6e 67 20 63 75 72 73 | 6f 72 73 2c 20 65 74 63 |ing curs|ors, etc|
|00000880| 2e 0d 20 2a 2f 0d 76 6f | 69 64 0d 41 70 70 6c 54 |.. */.vo|id.ApplT|
|00000890| 61 73 6b 20 28 29 0d 7b | 0d 09 72 65 67 69 73 74 |ask ().{|..regist|
|000008a0| 65 72 20 57 69 6e 64 6f | 77 50 74 72 20 74 68 65 |er Windo|wPtr the|
|000008b0| 57 69 6e 64 6f 77 20 3d | 20 46 72 6f 6e 74 57 69 |Window =| FrontWi|
|000008c0| 6e 64 6f 77 28 29 3b 0d | 09 72 65 67 69 73 74 65 |ndow();.|.registe|
|000008d0| 72 20 49 6e 66 6f 50 74 | 72 20 69 6e 66 6f 50 74 |r InfoPt|r infoPt|
|000008e0| 72 20 3d 20 28 49 6e 66 | 6f 50 74 72 29 20 47 65 |r = (Inf|oPtr) Ge|
|000008f0| 74 57 52 65 66 43 6f 6e | 28 74 68 65 57 69 6e 64 |tWRefCon|(theWind|
|00000900| 6f 77 29 3b 0d 0d 09 2f | 2a 20 4b 65 65 70 20 74 |ow);.../|* Keep t|
|00000910| 68 65 20 63 75 72 73 6f | 72 20 62 6c 69 6e 6b 69 |he curso|r blinki|
|00000920| 6e 67 20 69 6e 20 74 65 | 78 74 20 65 64 69 74 6f |ng in te|xt edito|
|00000930| 72 20 77 69 6e 64 6f 77 | 73 0d 09 20 2a 2f 0d 20 |r window|s.. */. |
|00000940| 09 69 66 20 28 57 69 6e | 64 49 73 41 70 70 28 74 |.if (Win|dIsApp(t|
|00000950| 68 65 57 69 6e 64 6f 77 | 29 20 26 26 20 28 69 6e |heWindow|) && (in|
|00000960| 66 6f 50 74 72 2d 3e 6b | 69 6e 64 20 3d 3d 20 77 |foPtr->k|ind == w|
|00000970| 6b 54 65 78 74 29 20 26 | 26 20 69 6e 66 6f 50 74 |kText) &|& infoPt|
|00000980| 72 2d 3e 61 63 74 69 76 | 65 29 0d 09 09 54 45 49 |r->activ|e)...TEI|
|00000990| 64 6c 65 28 69 6e 66 6f | 50 74 72 2d 3e 69 74 65 |dle(info|Ptr->ite|
|000009a0| 6d 2e 74 65 78 74 2e 74 | 65 48 64 6c 29 3b 0d 0d |m.text.t|eHdl);..|
|000009b0| 09 2f 2a 20 41 64 6a 75 | 73 74 20 74 68 65 20 77 |./* Adju|st the w|
|000009c0| 69 6e 64 6f 77 20 6c 61 | 79 6f 75 74 0d 09 20 2a |indow la|yout.. *|
|000009d0| 2f 0d 09 69 66 20 28 77 | 69 6e 64 54 72 69 70 29 |/..if (w|indTrip)|
|000009e0| 0d 09 09 57 69 6e 64 54 | 69 6c 65 53 74 61 63 6b |...WindT|ileStack|
|000009f0| 28 29 3b 0d 7d 0d 0d 0d | 2f 2a 20 45 78 69 74 20 |();.}...|/* Exit |
|00000a00| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00000a10| 77 69 74 68 20 74 68 65 | 20 75 74 6d 6f 73 74 20 |with the| utmost |
|00000a20| 70 6f 69 73 65 20 61 6e | 64 20 67 72 61 63 65 0d |poise an|d grace.|
|00000a30| 20 2a 2f 0d 76 6f 69 64 | 0d 41 70 70 6c 51 75 69 | */.void|.ApplQui|
|00000a40| 74 20 28 29 0d 7b 0d 09 | 2f 2a 20 41 70 70 6c 69 |t ().{..|/* Appli|
|00000a50| 63 61 74 69 6f 6e 20 73 | 70 65 63 69 66 69 63 20 |cation s|pecific |
|00000a60| 63 6c 65 61 6e 20 75 70 | 0d 09 20 2a 2f 0d 09 69 |clean up|.. */..i|
|00000a70| 66 20 28 28 28 57 69 6e | 64 6f 77 50 65 65 6b 29 |f (((Win|dowPeek)|
|00000a80| 20 77 50 74 72 47 6e 6f | 73 29 2d 3e 76 69 73 69 | wPtrGno|s)->visi|
|00000a90| 62 6c 65 29 0d 09 09 44 | 6f 63 43 6c 6f 73 65 28 |ble)...D|ocClose(|
|00000aa0| 77 50 74 72 47 6e 6f 73 | 29 3b 0d 0d 09 2f 2a 20 |wPtrGnos|);.../* |
|00000ab0| 47 6f 6f 64 62 79 65 2c | 20 6d 79 20 6c 6f 76 65 |Goodbye,| my love|
|00000ac0| 21 0d 09 20 2a 2f 0d 09 | 45 78 69 74 54 6f 53 68 |!.. */..|ExitToSh|
|00000ad0| 65 6c 6c 28 29 3b 0d 7d | 0d 0d 0d 2f 2a 20 43 61 |ell();.}|.../* Ca|
|00000ae0| 6c 63 75 6c 61 74 65 20 | 61 20 73 6c 65 65 70 20 |lculate |a sleep |
|00000af0| 76 61 6c 75 65 20 66 6f | 72 20 57 61 69 74 4e 65 |value fo|r WaitNe|
|00000b00| 78 74 45 76 65 6e 74 2e | 20 20 54 68 69 73 20 74 |xtEvent.| This t|
|00000b10| 61 6b 65 73 20 69 6e 74 | 6f 20 61 63 63 6f 75 6e |akes int|o accoun|
|00000b20| 74 20 74 68 65 20 70 72 | 6f 63 65 73 73 69 6e 67 |t the pr|ocessing|
|00000b30| 0d 20 2a 20 74 69 6d 65 | 20 66 6f 72 20 77 68 69 |. * time| for whi|
|00000b40| 63 68 20 41 70 70 6c 54 | 61 73 6b 28 29 20 75 73 |ch ApplT|ask() us|
|00000b50| 65 73 20 69 64 6c 65 20 | 74 69 6d 65 2c 20 6e 75 |es idle |time, nu|
|00000b60| 6c 6c 20 65 76 65 6e 74 | 73 2c 20 65 74 63 2e 0d |ll event|s, etc..|
|00000b70| 20 2a 2f 0d 73 74 61 74 | 69 63 20 75 6e 73 69 67 | */.stat|ic unsig|
|00000b80| 6e 65 64 20 6c 6f 6e 67 | 0d 41 70 70 6c 53 6c 65 |ned long|.ApplSle|
|00000b90| 65 70 20 28 29 0d 7b 0d | 09 72 65 67 69 73 74 65 |ep ().{.|.registe|
|00000ba0| 72 20 6c 6f 6e 67 20 74 | 68 65 53 6c 65 65 70 20 |r long t|heSleep |
|00000bb0| 3d 20 31 30 4c 3b 0d 09 | 72 65 67 69 73 74 65 72 |= 10L;..|register|
|00000bc0| 20 57 69 6e 64 6f 77 50 | 74 72 20 74 68 65 57 69 | WindowP|tr theWi|
|00000bd0| 6e 64 6f 77 3b 0d 09 72 | 65 67 69 73 74 65 72 20 |ndow;..r|egister |
|00000be0| 49 6e 66 6f 50 74 72 20 | 69 6e 66 6f 50 74 72 3b |InfoPtr |infoPtr;|
|00000bf0| 0d 09 0d 09 69 66 20 28 | 21 6c 61 4d 61 63 68 69 |....if (|!laMachi|
|00000c00| 6e 65 2e 69 6e 42 61 63 | 6b 67 72 6f 75 6e 64 20 |ne.inBac|kground |
|00000c10| 26 26 20 57 69 6e 64 49 | 73 41 70 70 28 74 68 65 |&& WindI|sApp(the|
|00000c20| 57 69 6e 64 6f 77 20 3d | 20 46 72 6f 6e 74 57 69 |Window =| FrontWi|
|00000c30| 6e 64 6f 77 28 29 29 29 | 20 7b 0d 09 20 09 2f 2a |ndow()))| {.. ./*|
|00000c40| 20 47 65 74 20 74 68 65 | 20 77 69 6e 64 6f 77 20 | Get the| window |
|00000c50| 69 6e 66 6f 0d 09 09 20 | 2a 2f 0d 09 09 69 6e 66 |info... |*/...inf|
|00000c60| 6f 50 74 72 20 3d 20 28 | 49 6e 66 6f 50 74 72 29 |oPtr = (|InfoPtr)|
|00000c70| 20 47 65 74 57 52 65 66 | 43 6f 6e 28 74 68 65 57 | GetWRef|Con(theW|
|00000c80| 69 6e 64 6f 77 29 3b 0d | 0d 20 09 09 69 66 20 28 |indow);.|. ..if (|
|00000c90| 28 69 6e 66 6f 50 74 72 | 2d 3e 6b 69 6e 64 20 3d |(infoPtr|->kind =|
|00000ca0| 3d 20 77 6b 54 65 78 74 | 29 20 26 26 20 69 6e 66 |= wkText|) && inf|
|00000cb0| 6f 50 74 72 2d 3e 61 63 | 74 69 76 65 29 0d 09 09 |oPtr->ac|tive)...|
|00000cc0| 09 74 68 65 53 6c 65 65 | 70 20 3d 20 47 65 74 43 |.theSlee|p = GetC|
|00000cd0| 61 72 65 74 54 69 6d 65 | 28 29 3b 0d 09 7d 0d 09 |aretTime|();..}..|
|00000ce0| 0d 09 72 65 74 75 72 6e | 20 74 68 65 53 6c 65 65 |..return| theSlee|
|00000cf0| 70 3b 0d 7d 0d 0d 0d 2f | 2a 20 48 61 6e 64 6c 65 |p;.}.../|* Handle|
|00000d00| 20 76 61 72 69 6f 75 73 | 20 65 76 65 6e 74 20 63 | various| event c|
|00000d10| 61 73 65 73 20 69 6e 20 | 61 20 4d 75 6c 74 69 2d |ases in |a Multi-|
|00000d20| 54 61 73 6b 69 6e 67 2c | 20 4d 75 6c 74 69 2d 57 |Tasking,| Multi-W|
|00000d30| 69 6e 64 6f 77 69 6e 67 | 20 4d 61 63 4f 53 20 65 |indowing| MacOS e|
|00000d40| 6e 76 69 72 6f 6e 6d 65 | 6e 74 0d 20 2a 2f 0d 73 |nvironme|nt. */.s|
|00000d50| 74 61 74 69 63 20 76 6f | 69 64 0d 41 70 70 6c 45 |tatic vo|id.ApplE|
|00000d60| 76 65 6e 74 4c 6f 6f 70 | 20 28 74 68 65 45 76 65 |ventLoop| (theEve|
|00000d70| 6e 74 29 20 0d 09 72 65 | 67 69 73 74 65 72 20 45 |nt) ..re|gister E|
|00000d80| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 74 68 65 45 |ventReco|rd *theE|
|00000d90| 76 65 6e 74 3b 0d 7b 0d | 09 57 69 6e 64 6f 77 50 |vent;.{.|.WindowP|
|00000da0| 74 72 20 74 68 65 57 69 | 6e 64 6f 77 3b 0d 09 72 |tr theWi|ndow;..r|
|00000db0| 65 67 69 73 74 65 72 20 | 49 6e 66 6f 50 74 72 20 |egister |InfoPtr |
|00000dc0| 69 6e 66 6f 50 74 72 3b | 0d 09 72 65 67 69 73 74 |infoPtr;|..regist|
|00000dd0| 65 72 20 63 68 61 72 20 | 74 68 65 43 68 61 72 3b |er char |theChar;|
|00000de0| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|00000df0| 20 74 68 65 50 61 72 74 | 3b 0d 09 0d 09 73 77 69 | thePart|;....swi|
|00000e00| 74 63 68 28 74 68 65 45 | 76 65 6e 74 2d 3e 77 68 |tch(theE|vent->wh|
|00000e10| 61 74 29 20 7b 0d 09 63 | 61 73 65 20 6e 75 6c 6c |at) {..c|ase null|
|00000e20| 45 76 65 6e 74 3a 0d 09 | 09 41 70 70 6c 54 61 73 |Event:..|.ApplTas|
|00000e30| 6b 28 29 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 0d 09 |k();...b|reak;...|
|00000e40| 63 61 73 65 20 6d 6f 75 | 73 65 44 6f 77 6e 3a 0d |case mou|seDown:.|
|00000e50| 09 09 73 77 69 74 63 68 | 28 74 68 65 50 61 72 74 |..switch|(thePart|
|00000e60| 20 3d 20 46 69 6e 64 57 | 69 6e 64 6f 77 28 74 68 | = FindW|indow(th|
|00000e70| 65 45 76 65 6e 74 2d 3e | 77 68 65 72 65 2c 20 26 |eEvent->|where, &|
|00000e80| 74 68 65 57 69 6e 64 6f | 77 29 29 20 7b 0d 09 09 |theWindo|w)) {...|
|00000e90| 63 61 73 65 20 69 6e 44 | 65 73 6b 3a 20 0d 09 09 |case inD|esk: ...|
|00000ea0| 09 53 79 73 42 65 65 70 | 28 35 29 3b 0d 09 09 09 |.SysBeep|(5);....|
|00000eb0| 62 72 65 61 6b 3b 0d 09 | 0d 09 09 63 61 73 65 20 |break;..|...case |
|00000ec0| 69 6e 47 6f 41 77 61 79 | 3a 0d 09 09 09 69 66 20 |inGoAway|:....if |
|00000ed0| 28 57 69 6e 64 49 73 41 | 70 70 28 74 68 65 57 69 |(WindIsA|pp(theWi|
|00000ee0| 6e 64 6f 77 29 20 26 26 | 20 54 72 61 63 6b 47 6f |ndow) &&| TrackGo|
|00000ef0| 41 77 61 79 28 74 68 65 | 57 69 6e 64 6f 77 2c 20 |Away(the|Window, |
|00000f00| 74 68 65 45 76 65 6e 74 | 2d 3e 77 68 65 72 65 29 |theEvent|->where)|
|00000f10| 29 0d 09 09 09 09 57 69 | 6e 64 43 6c 6f 73 65 28 |).....Wi|ndClose(|
|00000f20| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 0d 09 09 09 |theWindo|w);.....|
|00000f30| 62 72 65 61 6b 3b 0d 0d | 09 09 63 61 73 65 20 69 |break;..|..case i|
|00000f40| 6e 4d 65 6e 75 42 61 72 | 3a 0d 09 09 09 43 6f 6e |nMenuBar|:....Con|
|00000f50| 74 41 64 6a 4d 65 6e 75 | 28 29 3b 0d 09 09 09 43 |tAdjMenu|();....C|
|00000f60| 6f 6e 74 44 69 73 70 61 | 74 63 68 28 4d 65 6e 75 |ontDispa|tch(Menu|
|00000f70| 53 65 6c 65 63 74 28 74 | 68 65 45 76 65 6e 74 2d |Select(t|heEvent-|
|00000f80| 3e 77 68 65 72 65 29 29 | 3b 0d 09 09 09 62 72 65 |>where))|;....bre|
|00000f90| 61 6b 3b 0d 09 09 09 09 | 0d 09 09 63 61 73 65 20 |ak;.....|...case |
|00000fa0| 69 6e 53 79 73 57 69 6e | 64 6f 77 3a 0d 09 09 09 |inSysWin|dow:....|
|00000fb0| 53 79 73 74 65 6d 43 6c | 69 63 6b 28 74 68 65 45 |SystemCl|ick(theE|
|00000fc0| 76 65 6e 74 2c 20 74 68 | 65 57 69 6e 64 6f 77 29 |vent, th|eWindow)|
|00000fd0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 0d 09 |;....bre|ak;.....|
|00000fe0| 09 63 61 73 65 20 69 6e | 44 72 61 67 3a 0d 09 09 |.case in|Drag:...|
|00000ff0| 09 69 66 20 28 57 69 6e | 64 49 73 41 70 70 28 74 |.if (Win|dIsApp(t|
|00001000| 68 65 57 69 6e 64 6f 77 | 29 29 0d 09 09 09 09 44 |heWindow|)).....D|
|00001010| 72 61 67 57 69 6e 64 6f | 77 28 74 68 65 57 69 6e |ragWindo|w(theWin|
|00001020| 64 6f 77 2c 20 74 68 65 | 45 76 65 6e 74 2d 3e 77 |dow, the|Event->w|
|00001030| 68 65 72 65 2c 20 26 64 | 72 61 67 41 72 65 61 29 |here, &d|ragArea)|
|00001040| 3b 0d 0d 09 09 09 62 72 | 65 61 6b 3b 0d 0d 09 09 |;.....br|eak;....|
|00001050| 63 61 73 65 20 69 6e 47 | 72 6f 77 3a 0d 09 09 09 |case inG|row:....|
|00001060| 69 66 20 28 57 69 6e 64 | 49 73 41 70 70 28 74 68 |if (Wind|IsApp(th|
|00001070| 65 57 69 6e 64 6f 77 29 | 29 0d 09 09 09 09 57 69 |eWindow)|).....Wi|
|00001080| 6e 64 47 72 6f 77 28 74 | 68 65 57 69 6e 64 6f 77 |ndGrow(t|heWindow|
|00001090| 2c 20 74 68 65 45 76 65 | 6e 74 29 3b 0d 09 09 09 |, theEve|nt);....|
|000010a0| 62 72 65 61 6b 3b 0d 0d | 09 09 63 61 73 65 20 69 |break;..|..case i|
|000010b0| 6e 43 6f 6e 74 65 6e 74 | 3a 0d 09 09 09 69 66 20 |nContent|:....if |
|000010c0| 28 74 68 65 57 69 6e 64 | 6f 77 20 21 3d 20 46 72 |(theWind|ow != Fr|
|000010d0| 6f 6e 74 57 69 6e 64 6f | 77 28 29 20 26 26 20 57 |ontWindo|w() && W|
|000010e0| 69 6e 64 49 73 41 70 70 | 28 74 68 65 57 69 6e 64 |indIsApp|(theWind|
|000010f0| 6f 77 29 29 0d 09 09 09 | 09 53 65 6c 65 63 74 57 |ow))....|.SelectW|
|00001100| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|00001110| 3b 0d 09 09 09 65 6c 73 | 65 20 0d 09 09 09 09 57 |;....els|e .....W|
|00001120| 69 6e 64 43 6f 6e 74 65 | 6e 74 28 74 68 65 57 69 |indConte|nt(theWi|
|00001130| 6e 64 6f 77 2c 20 74 68 | 65 45 76 65 6e 74 29 3b |ndow, th|eEvent);|
|00001140| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 0d 09 09 63 61 |....brea|k;....ca|
|00001150| 73 65 20 69 6e 5a 6f 6f | 6d 49 6e 3a 0d 09 09 63 |se inZoo|mIn:...c|
|00001160| 61 73 65 20 69 6e 5a 6f | 6f 6d 4f 75 74 3a 0d 09 |ase inZo|omOut:..|
|00001170| 09 09 69 66 20 28 54 72 | 61 63 6b 42 6f 78 28 74 |..if (Tr|ackBox(t|
|00001180| 68 65 57 69 6e 64 6f 77 | 2c 20 74 68 65 45 76 65 |heWindow|, theEve|
|00001190| 6e 74 2d 3e 77 68 65 72 | 65 2c 20 74 68 65 50 61 |nt->wher|e, thePa|
|000011a0| 72 74 29 29 0d 09 09 09 | 09 57 69 6e 64 5a 6f 6f |rt))....|.WindZoo|
|000011b0| 6d 28 74 68 65 57 69 6e | 64 6f 77 2c 20 74 68 65 |m(theWin|dow, the|
|000011c0| 50 61 72 74 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |Part);..|..break;|
|000011d0| 0d 09 09 7d 0d 09 09 62 | 72 65 61 6b 3b 0d 0d 09 |...}...b|reak;...|
|000011e0| 63 61 73 65 20 6b 65 79 | 44 6f 77 6e 3a 0d 09 63 |case key|Down:..c|
|000011f0| 61 73 65 20 61 75 74 6f | 4b 65 79 3a 20 0d 09 09 |ase auto|Key: ...|
|00001200| 74 68 65 43 68 61 72 20 | 3d 20 28 63 68 61 72 29 |theChar |= (char)|
|00001210| 20 74 68 65 45 76 65 6e | 74 2d 3e 6d 65 73 73 61 | theEven|t->messa|
|00001220| 67 65 20 26 20 63 68 61 | 72 43 6f 64 65 4d 61 73 |ge & cha|rCodeMas|
|00001230| 6b 3b 0d 0d 09 09 69 66 | 20 28 28 74 68 65 45 76 |k;....if| ((theEv|
|00001240| 65 6e 74 2d 3e 6d 6f 64 | 69 66 69 65 72 73 20 26 |ent->mod|ifiers &|
|00001250| 20 62 74 6e 53 74 61 74 | 65 29 20 26 26 20 28 74 | btnStat|e) && (t|
|00001260| 68 65 43 68 61 72 20 3d | 3d 20 61 73 63 69 69 48 |heChar =|= asciiH|
|00001270| 65 6c 70 29 29 20 7b 0d | 09 09 09 48 65 6c 70 41 |elp)) {.|...HelpA|
|00001280| 70 70 6c 28 29 3b 0d 09 | 09 7d 0d 09 09 65 6c 73 |ppl();..|.}...els|
|00001290| 65 20 69 66 20 28 74 68 | 65 45 76 65 6e 74 2d 3e |e if (th|eEvent->|
|000012a0| 6d 6f 64 69 66 69 65 72 | 73 20 26 20 63 6d 64 4b |modifier|s & cmdK|
|000012b0| 65 79 29 20 7b 0d 09 09 | 09 69 66 20 28 74 68 65 |ey) {...|.if (the|
|000012c0| 45 76 65 6e 74 2d 3e 77 | 68 61 74 20 21 3d 20 61 |Event->w|hat != a|
|000012d0| 75 74 6f 4b 65 79 29 20 | 7b 0d 09 09 09 09 43 6f |utoKey) |{.....Co|
|000012e0| 6e 74 41 64 6a 4d 65 6e | 75 28 29 3b 0d 09 09 09 |ntAdjMen|u();....|
|000012f0| 09 43 6f 6e 74 44 69 73 | 70 61 74 63 68 28 4d 65 |.ContDis|patch(Me|
|00001300| 6e 75 4b 65 79 28 74 68 | 65 43 68 61 72 29 29 3b |nuKey(th|eChar));|
|00001310| 0d 09 09 09 7d 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |....}...|}...else|
|00001320| 20 7b 0d 09 09 09 74 68 | 65 57 69 6e 64 6f 77 20 | {....th|eWindow |
|00001330| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 3b |= FrontW|indow();|
|00001340| 0d 09 09 09 69 6e 66 6f | 50 74 72 20 3d 20 28 49 |....info|Ptr = (I|
|00001350| 6e 66 6f 50 74 72 29 20 | 47 65 74 57 52 65 66 43 |nfoPtr) |GetWRefC|
|00001360| 6f 6e 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 0d |on(theWi|ndow);..|
|00001370| 09 09 09 69 66 20 28 57 | 69 6e 64 49 73 41 70 70 |...if (W|indIsApp|
|00001380| 28 74 68 65 57 69 6e 64 | 6f 77 29 20 26 26 20 28 |(theWind|ow) && (|
|00001390| 69 6e 66 6f 50 74 72 2d | 3e 6b 69 6e 64 20 3d 3d |infoPtr-|>kind ==|
|000013a0| 20 77 6b 54 65 78 74 29 | 20 26 26 20 69 6e 66 6f | wkText)| && info|
|000013b0| 50 74 72 2d 3e 61 63 74 | 69 76 65 29 0d 09 09 09 |Ptr->act|ive)....|
|000013c0| 09 45 64 69 74 4b 65 79 | 53 74 72 6f 6b 65 28 74 |.EditKey|Stroke(t|
|000013d0| 68 65 57 69 6e 64 6f 77 | 2c 20 74 68 65 43 68 61 |heWindow|, theCha|
|000013e0| 72 29 3b 0d 09 09 7d 0d | 0d 09 09 62 72 65 61 6b |r);...}.|...break|
|000013f0| 3b 0d 0d 09 63 61 73 65 | 20 61 63 74 69 76 61 74 |;...case| activat|
|00001400| 65 45 76 74 3a 0d 09 09 | 69 66 20 28 57 69 6e 64 |eEvt:...|if (Wind|
|00001410| 49 73 41 70 70 28 28 57 | 69 6e 64 6f 77 50 74 72 |IsApp((W|indowPtr|
|00001420| 29 20 74 68 65 45 76 65 | 6e 74 2d 3e 6d 65 73 73 |) theEve|nt->mess|
|00001430| 61 67 65 29 29 0d 09 09 | 09 57 69 6e 64 41 63 74 |age))...|.WindAct|
|00001440| 69 76 61 74 65 28 28 57 | 69 6e 64 6f 77 50 74 72 |ivate((W|indowPtr|
|00001450| 29 20 74 68 65 45 76 65 | 6e 74 2d 3e 6d 65 73 73 |) theEve|nt->mess|
|00001460| 61 67 65 2c 20 74 68 65 | 45 76 65 6e 74 2d 3e 6d |age, the|Event->m|
|00001470| 6f 64 69 66 69 65 72 73 | 20 26 20 61 63 74 69 76 |odifiers| & activ|
|00001480| 65 46 6c 61 67 29 3b 0d | 09 09 62 72 65 61 6b 3b |eFlag);.|..break;|
|00001490| 0d 0d 09 63 61 73 65 20 | 75 70 64 61 74 65 45 76 |...case |updateEv|
|000014a0| 74 3a 20 0d 09 09 69 66 | 20 28 57 69 6e 64 49 73 |t: ...if| (WindIs|
|000014b0| 41 70 70 28 28 57 69 6e | 64 6f 77 50 74 72 29 20 |App((Win|dowPtr) |
|000014c0| 74 68 65 45 76 65 6e 74 | 2d 3e 6d 65 73 73 61 67 |theEvent|->messag|
|000014d0| 65 29 29 0d 09 09 09 57 | 69 6e 64 55 70 64 61 74 |e))....W|indUpdat|
|000014e0| 65 28 28 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |e((Windo|wPtr) th|
|000014f0| 65 45 76 65 6e 74 2d 3e | 6d 65 73 73 61 67 65 29 |eEvent->|message)|
|00001500| 3b 0d 09 09 62 72 65 61 | 6b 3b 0d 0d 09 63 61 73 |;...brea|k;...cas|
|00001510| 65 20 6f 73 45 76 65 6e | 74 3a 0d 09 09 73 77 69 |e osEven|t:...swi|
|00001520| 74 63 68 20 28 74 68 65 | 45 76 65 6e 74 2d 3e 6d |tch (the|Event->m|
|00001530| 65 73 73 61 67 65 20 3e | 3e 20 32 34 29 20 7b 0d |essage >|> 24) {.|
|00001540| 09 09 63 61 73 65 20 6d | 6f 75 73 65 4d 6f 76 65 |..case m|ouseMove|
|00001550| 64 4d 73 67 3a 0d 09 09 | 09 41 70 70 6c 54 61 73 |dMsg:...|.ApplTas|
|00001560| 6b 28 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |k();....|break;..|
|00001570| 09 0d 09 09 63 61 73 65 | 20 73 75 73 70 65 6e 64 |....case| suspend|
|00001580| 52 65 73 75 6d 65 4d 73 | 67 3a 0d 09 09 09 69 66 |ResumeMs|g:....if|
|00001590| 20 28 74 68 65 45 76 65 | 6e 74 2d 3e 6d 65 73 73 | (theEve|nt->mess|
|000015a0| 61 67 65 20 26 20 72 65 | 73 75 6d 65 4d 61 73 6b |age & re|sumeMask|
|000015b0| 29 20 7b 0d 09 09 09 09 | 6c 61 4d 61 63 68 69 6e |) {.....|laMachin|
|000015c0| 65 2e 69 6e 42 61 63 6b | 67 72 6f 75 6e 64 20 3d |e.inBack|ground =|
|000015d0| 20 46 41 4c 53 45 3b 0d | 0d 09 09 09 09 69 66 20 | FALSE;.|.....if |
|000015e0| 28 57 69 6e 64 49 73 41 | 70 70 28 46 72 6f 6e 74 |(WindIsA|pp(Front|
|000015f0| 57 69 6e 64 6f 77 28 29 | 29 29 0d 09 09 09 09 09 |Window()|))......|
|00001600| 57 69 6e 64 41 63 74 69 | 76 61 74 65 28 46 72 6f |WindActi|vate(Fro|
|00001610| 6e 74 57 69 6e 64 6f 77 | 28 29 2c 20 54 52 55 45 |ntWindow|(), TRUE|
|00001620| 29 3b 0d 09 09 09 7d 0d | 09 09 09 65 6c 73 65 20 |);....}.|...else |
|00001630| 7b 0d 09 09 09 09 6c 61 | 4d 61 63 68 69 6e 65 2e |{.....la|Machine.|
|00001640| 69 6e 42 61 63 6b 67 72 | 6f 75 6e 64 20 3d 20 54 |inBackgr|ound = T|
|00001650| 52 55 45 3b 0d 0d 09 09 | 09 09 69 66 20 28 57 69 |RUE;....|..if (Wi|
|00001660| 6e 64 49 73 41 70 70 28 | 46 72 6f 6e 74 57 69 6e |ndIsApp(|FrontWin|
|00001670| 64 6f 77 28 29 29 29 0d | 09 09 09 09 09 57 69 6e |dow())).|.....Win|
|00001680| 64 41 63 74 69 76 61 74 | 65 28 46 72 6f 6e 74 57 |dActivat|e(FrontW|
|00001690| 69 6e 64 6f 77 28 29 2c | 20 46 41 4c 53 45 29 3b |indow(),| FALSE);|
|000016a0| 0d 09 09 09 7d 0d 09 09 | 09 62 72 65 61 6b 3b 0d |....}...|.break;.|
|000016b0| 09 09 09 0d 09 09 7d 0d | 09 09 62 72 65 61 6b 3b |......}.|..break;|
|000016c0| 0d 0d 09 64 65 66 61 75 | 6c 74 3a 0d 09 09 3b 0d |...defau|lt:...;.|
|000016d0| 09 7d 0d 7d 0d 0d 0d 2f | 2a 20 54 68 65 20 6d 61 |.}.}.../|* The ma|
|000016e0| 69 6e 28 29 20 72 6f 75 | 74 69 6e 65 0d 20 2a 2f |in() rou|tine. */|
|000016f0| 0d 73 68 6f 72 74 0d 6d | 61 69 6e 20 28 29 20 0d |.short.m|ain () .|
|00001700| 7b 0d 09 72 65 67 69 73 | 74 65 72 20 52 67 6e 48 |{..regis|ter RgnH|
|00001710| 61 6e 64 6c 65 20 63 75 | 72 73 6f 72 52 67 6e 3b |andle cu|rsorRgn;|
|00001720| 0d 09 72 65 67 69 73 74 | 65 72 20 42 6f 6f 6c 65 |..regist|er Boole|
|00001730| 61 6e 20 68 61 73 45 76 | 65 6e 74 3b 0d 09 45 76 |an hasEv|ent;..Ev|
|00001740| 65 6e 74 52 65 63 6f 72 | 64 20 74 68 65 45 76 65 |entRecor|d theEve|
|00001750| 6e 74 3b 0d 0d 09 2f 2a | 20 49 6e 69 74 69 61 6c |nt;.../*| Initial|
|00001760| 69 7a 61 74 69 6f 6e 20 | 74 68 65 20 61 70 70 6c |ization |the appl|
|00001770| 69 63 61 74 69 6f 6e 20 | 61 6e 64 20 75 6e 6c 6f |ication |and unlo|
|00001780| 61 64 20 74 68 65 20 6e | 6f 6e 2d 65 73 73 65 6e |ad the n|on-essen|
|00001790| 74 69 61 6c 20 63 6f 64 | 65 20 73 65 67 6d 65 6e |tial cod|e segmen|
|000017a0| 74 73 0d 09 20 2a 2f 0d | 09 53 65 74 75 70 41 70 |ts.. */.|.SetupAp|
|000017b0| 70 6c 28 29 3b 0d 09 55 | 6e 6c 6f 61 64 53 65 67 |pl();..U|nloadSeg|
|000017c0| 28 28 50 74 72 29 20 53 | 65 74 75 70 41 70 70 6c |((Ptr) S|etupAppl|
|000017d0| 29 3b 0d 09 55 6e 6c 6f | 61 64 53 65 67 28 28 50 |);..Unlo|adSeg((P|
|000017e0| 74 72 29 20 50 72 69 6e | 74 44 6f 63 75 6d 65 6e |tr) Prin|tDocumen|
|000017f0| 74 29 3b 0d 09 63 75 72 | 73 6f 72 52 67 6e 20 3d |t);..cur|sorRgn =|
|00001800| 20 4e 65 77 52 67 6e 28 | 29 3b 0d 09 0d 09 2f 2a | NewRgn(|);..../*|
|00001810| 20 4d 75 6c 74 69 46 69 | 6e 64 65 72 20 61 77 61 | MultiFi|nder awa|
|00001820| 72 65 20 65 76 65 6e 74 | 20 70 72 6f 63 65 73 73 |re event| process|
|00001830| 69 6e 67 20 6c 6f 6f 70 | 0d 09 20 2a 2f 0d 09 69 |ing loop|.. */..i|
|00001840| 66 20 28 6c 61 4d 61 63 | 68 69 6e 65 2e 68 61 73 |f (laMac|hine.has|
|00001850| 57 4e 45 29 0d 09 09 77 | 68 69 6c 65 20 28 54 52 |WNE)...w|hile (TR|
|00001860| 55 45 29 20 7b 0d 09 09 | 09 43 6f 6e 74 41 64 6a |UE) {...|.ContAdj|
|00001870| 43 75 72 73 28 74 68 65 | 45 76 65 6e 74 2e 77 68 |Curs(the|Event.wh|
|00001880| 65 72 65 2c 20 63 75 72 | 73 6f 72 52 67 6e 29 3b |ere, cur|sorRgn);|
|00001890| 0d 09 09 09 41 70 70 6c | 54 61 73 6b 28 29 3b 0d |....Appl|Task();.|
|000018a0| 0d 09 09 09 69 66 20 28 | 57 61 69 74 4e 65 78 74 |....if (|WaitNext|
|000018b0| 45 76 65 6e 74 28 65 76 | 65 72 79 45 76 65 6e 74 |Event(ev|eryEvent|
|000018c0| 2c 20 26 74 68 65 45 76 | 65 6e 74 2c 20 41 70 70 |, &theEv|ent, App|
|000018d0| 6c 53 6c 65 65 70 28 29 | 2c 20 63 75 72 73 6f 72 |lSleep()|, cursor|
|000018e0| 52 67 6e 29 29 20 7b 0d | 09 09 09 09 69 66 20 28 |Rgn)) {.|....if (|
|000018f0| 21 28 28 74 68 65 45 76 | 65 6e 74 2e 77 68 61 74 |!((theEv|ent.what|
|00001900| 20 3d 3d 20 6b 65 79 44 | 6f 77 6e 29 20 26 26 20 | == keyD|own) && |
|00001910| 28 74 68 65 45 76 65 6e | 74 2e 6d 6f 64 69 66 69 |(theEven|t.modifi|
|00001920| 65 72 73 20 26 20 63 6d | 64 4b 65 79 29 29 20 26 |ers & cm|dKey)) &|
|00001930| 26 20 49 73 44 69 61 6c | 6f 67 45 76 65 6e 74 28 |& IsDial|ogEvent(|
|00001940| 26 74 68 65 45 76 65 6e | 74 29 29 0d 09 09 09 09 |&theEven|t)).....|
|00001950| 09 44 6c 6f 67 4d 6f 64 | 65 6c 65 73 73 45 76 65 |.DlogMod|elessEve|
|00001960| 6e 74 28 26 74 68 65 45 | 76 65 6e 74 29 3b 0d 09 |nt(&theE|vent);..|
|00001970| 09 09 09 65 6c 73 65 0d | 09 09 09 09 09 41 70 70 |...else.|.....App|
|00001980| 6c 45 76 65 6e 74 4c 6f | 6f 70 28 26 74 68 65 45 |lEventLo|op(&theE|
|00001990| 76 65 6e 74 29 3b 0d 09 | 09 09 7d 0d 09 09 7d 0d |vent);..|..}...}.|
|000019a0| 09 65 6c 73 65 0d 09 09 | 77 68 69 6c 65 20 28 54 |.else...|while (T|
|000019b0| 52 55 45 29 20 7b 0d 09 | 09 09 43 6f 6e 74 41 64 |RUE) {..|..ContAd|
|000019c0| 6a 43 75 72 73 28 74 68 | 65 45 76 65 6e 74 2e 77 |jCurs(th|eEvent.w|
|000019d0| 68 65 72 65 2c 20 63 75 | 72 73 6f 72 52 67 6e 29 |here, cu|rsorRgn)|
|000019e0| 3b 0d 09 09 09 53 79 73 | 74 65 6d 54 61 73 6b 28 |;....Sys|temTask(|
|000019f0| 29 3b 0d 09 09 09 41 70 | 70 6c 54 61 73 6b 28 29 |);....Ap|plTask()|
|00001a00| 3b 0d 09 09 09 68 61 73 | 45 76 65 6e 74 20 3d 20 |;....has|Event = |
|00001a10| 47 65 74 4e 65 78 74 45 | 76 65 6e 74 28 65 76 65 |GetNextE|vent(eve|
|00001a20| 72 79 45 76 65 6e 74 2c | 20 26 74 68 65 45 76 65 |ryEvent,| &theEve|
|00001a30| 6e 74 29 3b 0d 0d 09 09 | 09 69 66 20 28 21 28 28 |nt);....|.if (!((|
|00001a40| 74 68 65 45 76 65 6e 74 | 2e 77 68 61 74 20 3d 3d |theEvent|.what ==|
|00001a50| 20 6b 65 79 44 6f 77 6e | 29 20 26 26 20 28 74 68 | keyDown|) && (th|
|00001a60| 65 45 76 65 6e 74 2e 6d | 6f 64 69 66 69 65 72 73 |eEvent.m|odifiers|
|00001a70| 20 26 20 63 6d 64 4b 65 | 79 29 29 20 26 26 20 49 | & cmdKe|y)) && I|
|00001a80| 73 44 69 61 6c 6f 67 45 | 76 65 6e 74 28 26 74 68 |sDialogE|vent(&th|
|00001a90| 65 45 76 65 6e 74 29 29 | 0d 09 09 09 09 44 6c 6f |eEvent))|.....Dlo|
|00001aa0| 67 4d 6f 64 65 6c 65 73 | 73 45 76 65 6e 74 28 26 |gModeles|sEvent(&|
|00001ab0| 74 68 65 45 76 65 6e 74 | 29 3b 0d 09 09 09 65 6c |theEvent|);....el|
|00001ac0| 73 65 20 69 66 20 28 68 | 61 73 45 76 65 6e 74 29 |se if (h|asEvent)|
|00001ad0| 0d 09 09 09 09 41 70 70 | 6c 45 76 65 6e 74 4c 6f |.....App|lEventLo|
|00001ae0| 6f 70 28 26 74 68 65 45 | 76 65 6e 74 29 3b 0d 09 |op(&theE|vent);..|
|00001af0| 09 7d 0d 7d 0d 00 00 00 | 00 00 00 00 00 00 00 00 |.}.}....|........|
+--------+-------------------------+-------------------------+--------+--------+