Skip to main content

Programming Primer for the Macintosh®

Volume 1

  • 1st Edition - October 21, 1994
  • Latest edition
  • Authors: John M. May, Judy Whittle
  • Language: English

Programming Primer for the Macintosh, Volume 1 focuses on the principles and operations of the Macintosh system. The publication first offers information on the development… Read more

Data Mining & ML

Unlock the cutting edge

Up to 20% on trusted resources. Build expertise with data mining, ML methods.

Description

Programming Primer for the Macintosh, Volume 1 focuses on the principles and operations of the Macintosh system. The publication first offers information on the development environment, creating a simple program with Symantec C++, and a review of C++. Discussions focus on pointers, handles, patterns, points, creating a source file, compiling the program, adding libraries, adding file to the subject, building an application, and useful tools. The text then takes a look at the Macintosh ROM, Mac programs and system software, and toolbox managers. Topics include menu, window, control, and dialog manager, alerts, desktop interface, event-driven programming, trap mechanism, interface and library files, stack frame incompatibility, and the relationship between an application and toolbox. The book examines QuickDraw, alerts, and dialogs, memory manager, and object-oriented programming. Concerns include structures, linked list example, new and delete operators, and handling lines, rectangles, round rectangles, ovals, arcs, and polygons The publication is a dependable reference for computer programmers and researchers interested in the Macintosh system.

Table of contents

AcknowledgmentsChapter 1 Introduction History of the Macintosh Macintosh Innovations Apple Macintosh Naming Creations Elements Comprising a Macintosh System Common Peripheral Options Connecting Components Display Options Video Circuitry Input Options Apple Desktop Bus (ADB) Connections Small Computer Standard Interface (SCSI) Devices SCSI Connections Audio Input/Output Options Audio Connections Serial Device Options Serial Port Connections Network/Connectivity Options Telephone Jack Ethernet Port Optional Ports Electrical Power and Power Switch Programmer's Switch Startup Shutdown Sleep Restart SummaryChapter 2 The Development Environment What the Developer Needs CPU RAM Memory Disk Memory Screens Peripherals Other Things A Word About Development Environments MPW Symantec Development Environment Metrowerks® Code Warrior™ A Brief Look into the Future SummaryChapter 3 Creating a Simple Program with Symantec C++ Starting Symantec C++ Constructing a Project Segments Creating a Source File Adding the File to the Project Adding Libraries Compiling the Program Running the Program Building an Application SummaryChapter 4 A Review of C++, Mac Style Basic Variable Types Advanced Variable Types Points Rects Patterns Val Vs. Var Arrays Pointers Handles Comments Constants If Switch While Do-While For Break Continue Operators Unary Prefixed Operators Unary Postfix Operators Binary Arithmetic and Logical Operators Binary Assignment Operators Binary Comparison Operators The Ternary Operator The C Preprocessor Structure of a C Program C Features Not Used on the Mac Right-Left Rule Left-Right Walk Through Another Example SummaryChapter 5 The Macintosh ROM It's All in the Name: The Toolbox Managers Relationship Between an Application and the Toolbox Trap Mechanism A Final Word on Traps Interface and Library Files Stack Frame Incompatibility SummaryChapter 6 Mac Programs and System Software Macintosh Programs Desk Accessory Device Driver Code Resource Macintosh System Software Event-driven Programming Pizza Delivery Program Types of Events Structure of an Event-Driven Program Event Manager Priority of Events Keyboard Events: A Revisit Auto-Key Events The Desktop Interface SummaryChapter 7 Toolbox Managers Menu Manager Menu Bar Menus Resources Involved in Menus How Menus Work Menu Scrolling Keyboard Equivalents Window Manager Windows How Windows Work Window Regions Update Regions How Windows Are Drawn Control Manager How Controls Are Drawn Control States Dialog Manager Dialog Types How Dialog Boxes Are Drawn Alerts TextEdit Manager List Manager Scrap Manager Resources Advantages of Resources SummaryChapter 8 QuickDraw Video Principles The Macintosh Screen Shapes Drawn by QuickDraw Handling Lines QuickDraw Terminology—GrafVerbs Simple QuickDraw Toolbox Calls Handling Rectangles Handling Round Rectangles Handling Ovals Handling Arcs Handling Polygons Handling Regions Handling Points Handling Pictures Example of Putting a Picture Together More QuickDraw Terminology BitMaps/PixMaps CopyBits BitMap/PixMap Bounds Value Port Frame The Graphics Pen Pen Routines Pen Frame Pen and Port Frames Text Characteristics QuickDraw Text Routines Font Frame QuickDraw Color Color Frame Basic Color Cursors Example Summary ExerciseChapter 9 Alerts and Dialogs Alerts ParamText Alert Project Dialogs Button Dialog Project Dialog Check Box Project Radio Button Project Dialog Static Text Project Dialog Edit Text Project Dialog Icon Project Dialog PICT Project Dialog User Item Project Dialog Sound Project Editing Sounds SummaryChapter 10 Memory Manager Stack and Heap The Stack The Heap Stack Sniffer Memory Blocks in the Heap How Heap Space Is Allocated Pointers and the Heap Handles and the Heap Dereferencing A Valid Pointer Memory Frame Why You May Not Want to Lock a Handle Low-Memory Global Variables SummaryChapter 11 Object-Oriented Programming OOP and C++ Structures Declaring and Instance Structure Referencing Data Members of Individual Structures Member Functions and Structures Encapsulation Data Hiding Class Objects Instance Variable Methods Messages Accessor Constructor Destructor The New and Delete Operators Friends Linked List Example Designing the List Example Using the TList and TNode Classes Derived Classes Pointers and Objects Traditional or Object Programming: When to Use Each Class Libraries SummaryChapter 12 Debugging and Finder Resources Debugging Types of Bugs Debuggers Symantec C++ Debugging BOMBS!!! Finder Resources Giving an Application Its Own Icon Creating a BNDL Resource in ResEdit Adding the Icon to Your Program vers Resources SummaryAppendix A GlossaryAppendix B BibliographyIndex

Product details

  • Edition: 1
  • Latest edition
  • Published: May 10, 2014
  • Language: English

About the author

JM

John M. May

John May is the Group Leader for Computer Science in the Center for Applied Scientific Computing (CASC) at the Lawrence Livermore National Laboratory. His interests include parallel programming models, performance analysis, parallel I/O, and parallel programming tools. He has served on the MPI-2 Forum, the High Performance Debugger Forum, and the Steering Committee of the Parallel Tools Consortium. Currently, he works on the Parallel Performance Improvement project, where he is investigating performance analysis techniques for massively parallel computers.

Dr. May joined LLNL in 1994 after receiving his Ph.D. in Computer Science from the University of California, San Diego. He also holds a BA in Physics from Dartmouth College. Prior to entering graduate school, he worked at AT&T (now Lucent) Bell Laboratories on optoelectronic device technology.

Affiliations and expertise
Lawrence Livermore National Laboratory

View book on ScienceDirect

Read Programming Primer for the Macintosh® on ScienceDirect