Programmer’s Introduction to the Macintosh Family
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
Macintosh® Inside Macintosh Library Programmer's Introduction to the Macintosh Family File Edit Scaling ROBOT MainEvent BEGIN { of MAIN program MyProg InitGlobals; if StartUp then begin SetUpMenus; { Set up th SetUpWindows; { Set up th SetUpDefault; { Set up pr MainEvent; { Run the p end; ShutDown; END. {of MAIN program MyProg}
A cover with the Apple rainbow logo and a black Macintosh banner beside the title, above a screenshot of a blue and gray 3D robot arm program window with a Pascal code window labeled MainEvent.
Reading notes: Code window text is cut off at the right edge, so comments such as 'Set up th', 'Set up pr', and 'Run the p' are truncated. The 'ROBOT' window title is small and partly blurred, though it appears legible. The 'Scaling' menu item and the MyProg references are partly obscured or truncated.
- Printed product names
- Macintosh
- Languages
- English
PDF page 1
Programmer's Introduction
Programmer's Introduction Inside Macintosh Libra1y to the Macμitosh Family ; fil e Edi t ~ ca l m g MainEuent { of MA IN program My Pre lnitGlobals; if Start Up then begin SetupMenus; { Set up H SetUpWindows; {Set up th SetUpDefault; { Set up pr Mai nEvent; { Run the p end; ShutDown; END. {of MA IN program MyProg}
Reading notes: No image was supplied, so layout and artwork are inferred only from the extracted source text. The headline is taken from the top header line 'Programmer's Introduction' and may not be a true headline. OCR errors appear in the header, including 'Libra1y' and 'Macμitosh', and in the menu line 'fil e Edi t ~ ca l m g'. Several code lines are truncated mid-comment (for example '{Set up H', '{Set up th', '{Set up pr', '{Run the p'), so their full text is unknown. The source is a code listing rather than an advertisement, so no products, prices or dates were found. Reading order follows the extracted text line by line, and the spacing inside words such as 'MA IN' and 'Start Up' may reflect OCR gaps.
- Languages
- English
PDF page 2
> $22-95 FPT USA The Inside Macintosh library The Official Publications from Apple Computer, Inc. The Inside Macintosh Library is the complete set of technical information on the Macintosh® familv of computers, which includes the Macintosh 5121(, Macintosh 512 Enhanced, Macintosh Plus, Macintosh SE, and Macintosh II. These books provide programmers, developers, and hardware designers with comprehensive information on all aspects of the Macintosh technology. At the core of the Inside Macintosh Librarv is the original Inside Madntosh, the definitive reference to the Macintosh lbolbox and operating system. Inside Macintosb volumes I-ill describe the original Macintosh; volume N provides information about the Macintosh Plus and volume V pertains co the Macintosh SE and the Macintosh II. Recent additions co the Inside Macintosh Library include two introductory book5 and two comprehensive hardware references: Technical Introduction to the Macintosh Fami(l' Programmer's Introduction to the Madntosh Familv Macintosh Fami(v Hardware Reference Designing Cards and Drivers for Macintosb II and Macintosb SE The Inside Macintosh Library, written and produced by Apple Compurer, Inc., provides definitive references for those interested in getting the most out of their Macintosh.
Reading notes: OCR-like garbling in the supplied copy (e.g., 'Madntosh', 'Librarv', 'Compurer', 'book5', 'Fami(l'', 'lbolbox', 'Macintosb') could not be verified against the image and may be extraction errors. Layout and exact placement of '$22-95' and 'FPT USA' relative to the headline could not be confirmed. The product list includes titles from the body copy; whether each is visibly printed as a product name is unverified.
- Printed product names
- Macintosh 512 Enhanced · Macintosh Plus · Macintosh SE · Macintosh II · Inside Macintosh
- Printed prices
- $22-95
- Languages
- English
PDF page 3
A dark textured cover with a small gray Apple logo in the upper left and a line-drawn illustration of three computers with monitors and keyboards, arranged in a stepped diagonal composition.
Reading notes: A faint, tiny mark appears near the top beside the Apple logo but no legible text could be read. No headline, body copy, or fine print is visibly legible in the image.
PDF page 4
AL GUERRA
A nearly blank white page with a row of six line-drawn vintage personal computers with keyboards along the bottom, and a handwritten signature-like inscription 'AL GUERRA' in the lower right.
Reading notes: The handwritten text 'AL GUERRA' is a name-like inscription rather than printed advertising copy; it is handwritten and may be a signature. Faint ghosted marks appear near the top of the page and are not legible. Language assigned as Spanish is based only on the surname-style text and is uncertain.
- Languages
- Spanish
PDF page 5
S APPLE COMPUTER, INC. Copyright© 1988 by Apple Computer, Inc., 20525 Mariani Avenue Cupertino, California 95014 (408) 996-1010 All rights reserved. No part of this publication may be re- produced, stored in a retrival system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc. Printed in the United States of America. Apple, the Apple logo, Apple- Link, AppleTalk, ImageWriter, LaserWriter, and Macintosh are registered trademarks of Apple Computer, Inc. MacApp, HyperCard, and HyperTalk, are trademarks of Apple Computer, Inc. MacDraw, MacPaint, and MacWrite are registered trademarks of CLARIS Corporation. UNIX is a registered trademark of AT&T Information Systems. MS-DOS and MicroSoft Word are registered trademarks of Microsoft Corporation. Smalltalk-80 is a trademark of Xerox Corporation. CompuServe is a registered trademark of CompuServe Incorporated. GEnie is a trademark of General Electric Corporation. MCI Mail is a trademark of MCI Corporation. POSTSCRIPT is a registered trademark of Adobe Systems Incorporated. Adobe Illustrator is a trademark of Adobe Systems Incorporated. Simultaneously published in the United States and Canada. ISBN 0-201-19254-3 Second Printing, April 1988 BCDEFGHIJ-D0-898 WARRANTY INFORMATION All IMPLIED WARRANTIES ON THIS MANUAL, INCLUDING IMPLIED WARRANTIES. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY (90) DAYS FROM THE DATE OF THE ORIGIN:AL RETAIL PURCHASE OF THIS PRODUCT. Even though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR REPRESENTA- TION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD "AS IS," AND YOU, THE PURCHASER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.
Reading notes: OCR splits some words across lines (e.g., 'retrival', 'ORIGIN:AL', 'Apple-Link'), so spellings may be OCR artifacts Printed date 'NINETY (90) DAYS' is a duration rather than a calendar date
- Printed product names
- Apple · AppleTalk · ImageWriter · LaserWriter · Macintosh · MacApp · HyperCard · HyperTalk · MacDraw · MacPaint · MacWrite · UNIX · MS-DOS · MicroSoft Word · Smalltalk-80 · CompuServe · GEnie · MCI Mail · POSTSCRIPT · Adobe Illustrator
- Printed dates
- 1988 · April 1988 · NINETY (90) DAYS
- Languages
- English
PDF page 6
Programmer's Introduction to the Macintosh Family
Contents Figures and tables xi Preface Welcome to Programmer's Introduction to the Macintosh Family xiii What this book contains xiv About Macintosh technical documentation xvi Some conventions xix Chapter 1 An Overview of the Macintosh 1 Why program for the Macintosh family? 2 Powerful system and development tools 2 Pride in applications 3 A fast-growing installed base 3 The leading edge 3 A look at the Macintosh family 4 Types of programs 5 Key programming ideas 5 The user plays a central role 6 User interface design 6 Event-driven programming 7 Compatibility is easy; incompatibility is not 8 Templates ease programming 9 Chapter 2 The Software Anatomy of the Macintosh 11 An architectural overview 12 The pieces 15 Putting the pieces together 15 The Toolbox 17 What is the Toolbox? 17 What's in the Toolbox? 17 Why use Toolbox routines? 18 iii
Reading notes: Table of contents page numbers and chapter list appear as partial excerpt; heading boundaries may be incomplete
- Printed product names
- Macintosh
- Languages
- English
PDF page 7
iv Contents Marshalling your resources 19 What is a resource? 19 Resources and your program 20 The Macintosh Operating System 20 The Finder 21 The Finder and the user 22 The Finder and your application 22 Thinking about "last" things first 23 Printing functions and the Printing Manager 23 Printer independence 23 Bit-mapped graphics everywhere 24 The Undo routine 24 User interface design 25 Localization 26 Chapter 3 An Eventful Experience 29 An overview of the main event loop 30 Setting up the loop 31 The outer loop: How it works 31 The second level: What kind of event? 32 Activate events 33 Mouse events 33 Key events 34 Disk-inserted events 34 Update events 34 The third level: Mouse event handling 35 Locating the mouse 35 A desk accessory window 35 The menu bar 36 An application window 36 More about events 39 The event queue 39 Event masking 39 A note about errors 40 Chapter 4 Memory Management 41 How memory is organized 42 Memory and the parking garage 43 The elements of Macintosh memory 44 Pointers 45 Handles 45 Blocks 45 The stack 46 Heaps 46
Reading notes: Chapter 3 heading spacing and some indented entries may affect reading order
- Languages
- English
PDF page 8
Basic memory management 46 Relocatable and nonrelocatable blocks 47 Moving blocks in memory 47 Fragmentation 49 Obtaining and releasing memory blocks 51 Memory reorganization 52 System use of memory 52 Your program and the segment loader 53 Why segment your code? 53 Three classes of programs 54 Deciding on the segments' contents 54 Trade-offs in segmentation decisions 55 The main segment 55 Loading segments 56 Unloading segments 56 Out-of-memory conditions 56 What causes memory to "disappear"? 56 Nonrelocatable blocks 57 Desk accessories 57 The system's use of memory 57 Two strategies for handling out-of-memory conditions 58 Preflighting 58 Reserved heap space 58 Chapter 5 Display and Graphics Routines 59 An obvious advantage 60 Everything is in graphics 61 A world of graphics in a library 61 A quick look at QuickDraw 62 The QuickDraw programming model 63 Bits and pixels, maps and images 64 Bit images 64 Pixel images 65 Bit maps 66 Pixel maps 66 Graphics ports 67 What's in a graphics port's record? 67 Device information 68 Port and window descriptions 69 Pen description 69 Text description 71 Color description 73 Pattern-printing control 74 Status monitoring 74 Color QuickDraw graphics ports 74 Contents v
Reading notes: Source appears to be a table of contents rather than advertising copy; no products, prices, or dates are advertised.
- Languages
- English
PDF page 9
vi Contents Graphics ports and coordinate systems 75 Local coordinates 76 Rectangles 77 QuickDrawing 77 An outine of a QuickDraw program 78 Lines and the QuickDraw pen 78 Shapes 79 Rectangles: A reprise 80 Patterns 81 Fonts 82 Icons 83 Cursors 84 Regions 85 Pictures 86 Polygons 87 Color QuickDraw 87 Chapter 6 The User Interface Toolbox 89 The Window Manager 91 Regions of a window 92 The window record 93 Using the Window Manager 95 Initialization 95 Opening and closing windows 95 Updating windows 97 Of mice and windows 97 The Menu Manager 99 Menus as resources 100 Using the Menu Manager 101 Initialization 101 Setting up and removing menus 101 Responding to the user 103 Changing menu items 104 Accessing menus and items 104 Color in menus 105 The Dialog Manager 105 Types of dialogs and alerts 106 Using the Dialog Manager 107 Initialization 107 Opening and closing dialogs and alerts 107 Handling events in dialogs 107 Posting alerts 109 Text editing in dialogs 110 The Control Manager 110 Controls with more than one part 111
Reading notes: Source is a table of contents with page numbers; no advertised products, prices or dates appear.
- Languages
- English
PDF page 10
Using the Control Manager 112 Initialization 112 Creating and removing controls 112 Modifying controls 113 Responding to the user 114 TextEdit 115 Two important rectangles 116 Other edit record fields 117 The style record 118 Using TextEdit 118 Initialization 118 Opening and closing edit records 118 Tracking and managing the user's editing operations 118 Chapter 7 File Management 121 Documents and applications 122 An outline of file interaction 123 Types and creators 124 File types 124 Creators 124 Fil ~ manipulation and the Standard File Package 125 SFGetFile in operation 125 The File Open dialog box 126 The reply record structure 127 SFPutFile in operation 128 Program file use and the File Manager 129 Return codes, from disk 1/0 operations 129 Accessing file data 130 Creating new files 131 Opening existing files 131 Reading data from open files 131 Writing information to disk files 132 Closing files 132 Managing volumes 133 An example of file handling 133 Chapter 8 Development Tools 135 The Macintosh Programmer's Workshop (MPW) 136 The MPW Shell 139 Other parts of MPW 139 The debugger 139 Sample application source files 139 ResEdit 140 MPW Pascal 140 Contents vii
Reading notes: Table of contents includes extra spacing and inconsistent whitespace, e.g. 'Using the Control Manager' Some OCR-like spacing in 'Fil ~ manipulation' and 'Program file use' entries
- Languages
- English
PDF page 11
MPW C 140 MPW Assmebler 141 MacApp and object-oriented programming 141 An introduction to object-oriented programming 142 What are objects? 143 Objects and inheritance 145 Object Pascal 146 Object Pascal and MacApp 147 An introduction to MacApp 148 Programming in MacApp 149 HyperCard as a development environment 149 A common delivery vehicle 149 HyperTalk 150 Other programming languages and environments 151 Debugging Macintosh applications 151 Chapter 9 Becoming a Macintosh Developer 153 Continuing your Macintosh education 154 Finding your way through Inside Macintosh 154 The important calls 155 Guide to the documentation 155 The road map in Inside Macintosh 155 Examining other people's programs 156 Att~nding Apple programming seminars 156 Registering as a Macintosh developer 157 Appendix A Compatibility Issues and Guidelines 160 viii Contents Use system globals 161 Don't assume the screen is a fixed size 161 Don't assume the screen is in a fixed location 161 Don't assume screen width is in rowBytes 162 Don't make too many assumptions about files 162 Check errors returned by calls 162 Don't rely on things not changing 163 Watch copy-protection code closely 163 Don't use reserved bits 163 Don't write timing-sensitive code 163 Use ASCII to read keyboard input 164 Avoid direct printer output 164 Avoid using the system heap 164 Watch the use of Nil pointers 165
Reading notes: Line 'MPW Assmebler' appears to contain a misspelling of 'Assembler' as printed. Table-of-contents style listing; no primary heading or body copy is present, so headline is null. Source contains fragmentary index entries with a page-number layout that may affect reading order.
- Printed product names
- MPW · HyperCard · HyperTalk · MacApp · Object Pascal · Inside Macintosh
- Languages
- English