Mac OS X Technology Overview
Total Page:16
File Type:pdf, Size:1020Kb
Mac OS X Technology Overview May 27, 2004 and Xserve are trademarks of Apple Apple Computer, Inc. Computer, Inc. © 2004 Apple Computer, Inc. Objective-C is a trademark of NeXT All rights reserved. Software, Inc. No part of this publication may be Java and all Java-based trademarks are reproduced, stored in a retrieval system, or trademarks or registered trademarks of Sun transmitted, in any form or by any means, Microsystems, Inc. in the U.S. and other mechanical, electronic, photocopying, countries. recording, or otherwise, without prior OpenGL is a trademark of Silicon Graphics, written permission of Apple Computer, Inc., Inc. with the following exceptions: Any person PowerPC and and the PowerPC logo are is hereby authorized to store documentation trademarks of International Business on a single computer for personal use only Machines Corporation, used under license and to print copies of documentation for therefrom. personal use provided that the documentation contains Apple's copyright Simultaneously published in the United notice. States and Canada. The Apple logo is a trademark of Apple Even though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR Computer, Inc. REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, Use of the ªkeyboardº Apple logo ITS QUALITY, ACCURACY, (Option-Shift-K) for commercial purposes MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS without the prior written consent of Apple MANUAL IS SOLD ªAS IS,º AND YOU, THE may constitute trademark infringement and PURCHASER, ARE ASSUMING THE ENTIRE unfair competition in violation of federal RISK AS TO ITS QUALITY AND ACCURACY. and state laws. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, No licenses, express or implied, are granted OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR with respect to any of the technology INACCURACY IN THIS MANUAL, even if described in this document. Apple retains advised of the possibility of such damages. all intellectual property rights associated THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN with the technology described in this LIEU OF ALL OTHERS, ORAL OR WRITTEN, document. This document is intended to EXPRESS OR IMPLIED. No Apple dealer, agent, assist application developers to develop or employee is authorized to make any modification, extension, or addition to this applications only for Apple-labeled or warranty. Apple-licensed computers. Some states do not allow the exclusion or limitation of implied warranties or liability for Every effort has been made to ensure that incidental or consequential damages, so the the information in this document is above limitation or exclusion may not apply to you. This warranty gives you specific legal accurate. Apple is not responsible for rights, and you may also have other rights which typographical errors. vary from state to state. Apple Computer, Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, the Apple logo, AirPort, AppleScript, AppleScript Studio, AppleShare, AppleTalk, Aqua, Carbon, Cocoa, ColorSync, Final Cut, FireWire, iBook, iMovie, iTunes, Keychain, Mac, Mac OS, Macintosh, QuickDraw, QuickTime, Sherlock, TrueType, and WebObjects are trademarks of Apple Computer, Inc., registered in the United States and other countries. eMac, Finder, Quartz, Rendezvous, Safari, Sound Manager, Velocity Engine, Xcode, Contents Chapter 1 Introduction to Mac OS X Technology Overview 9 Who Should Read This Document 9 Organization of This Document 9 Developer Tools 10 Reporting Bugs 10 See Also 11 Developer Documentation 11 Information on BSD 11 Darwin and Open Source Development 12 Other Information on the Web 12 Chapter 2 Mac OS X Architectural Overview 13 A Layered Look at the Mac OS X Architecture 13 Mac OS X Runtime Architecture 14 Dyld Runtime Environment 15 CFM Runtime Environment 15 The Classic Environment 16 Chapter 3 Software Development Overview 19 Application Environments 19 Carbon 19 Cocoa 20 Java 21 WebObjects 21 BSD and X11 22 Frameworks 22 Plug-Ins 23 Address Book Action Plug-Ins 23 QuickTime Components 23 Core Audio Plug-Ins 24 Application Plug-Ins 24 Agent Applications 24 Screen Savers 25 Slideshows 25 Programmatic Screen Savers 25 3 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. CONTENTS Services 25 Preference Panes 26 Web Content 26 Dynamic Websites 26 Sherlock Channels 27 SOAP and XML-RPC 27 Command-Line Tools 28 Login Items 28 Scripts 29 Scripting Additions for AppleScript 30 Kernel Extensions 30 Device Drivers 31 Chapter 4 Mac OS X Technologies 33 Core OS 33 Darwin 33 Network Support 37 Velocity Engine 41 Java Support 42 Graphics, Imaging, and Multimedia 43 Quartz 43 QuickTime 45 OpenGL 47 Text and Fonts 47 ColorSync 48 Core Audio 48 DVD Playback 49 Printing 49 QuickDraw 50 Application Technologies 51 Address Book 51 Core Foundation 51 Disc Recording 52 Help 52 Human Interface Toolbox 53 Image Capture 53 Ink 53 Keychain Services 54 Launch Services 54 Open Directory 54 Rendezvous 55 Search Kit 55 Security Services 55 Speech Technologies 56 Web Kit 57 4 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. CONTENTS Web Service Access 57 XML Parsing 57 Interprocess Communication 57 Distributed Objects for Cocoa 58 Apple Events 58 Distributed Notifications 58 BSD Notifications 59 Sockets, Ports, and Streams 59 BSD Pipes 60 Shared Memory 60 Mach Messaging 61 User Experience 61 Aqua 61 Accessibility 61 AppleScript 62 Bundles and Packages 62 Fast User Switching 63 Internationalization and Localization 63 Software Configuration 64 System Applications 64 The Finder 64 The Dock 65 Appendix A Mac OS X Frameworks 67 Umbrella Framework Contents 71 Accelerate Framework 71 Application Services Framework 72 Carbon Framework 73 Core Services Framework 74 Web Kit Framework 74 System Libraries 75 Document Revision History 77 Glossary 79 Index 89 5 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. CONTENTS 6 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. Tables and Figures Chapter 2 Mac OS X Architectural Overview 13 Figure 2-1 Layers of Mac OS X 13 Chapter 3 Software Development Overview 19 Table 3-1 Scripting language summary 30 Chapter 4 Mac OS X Technologies 33 Figure 4-1 Quartz Compositor and the rendering APIs on Mac OS X 45 Table 4-1 Supported local volume formats 36 Table 4-2 Supported network file-sharing protocols 37 Table 4-3 Network protocols 39 Table 4-4 Network technology support 40 Table 4-5 Quartz technical specifications 44 Table 4-6 Partial list of formats supported by QuickTime 46 Table 4-7 Features of the Mac OS X printing system 50 Appendix A Mac OS X Frameworks 67 Table A-1 System frameworks 71 Table A-2 Subframeworks of the Accelerate framework 72 Table A-3 Subframeworks of the Application Services framework 72 Table A-4 Subframeworks of the Carbon framework 73 Table A-5 Subframeworks of the Core Services framework 74 Table A-6 Subframeworks of the Web Kit framework 75 7 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. TABLES AND FIGURES 8 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. CHAPTER 1 Introduction to Mac OS X Technology Overview Mac OS X is a modern operating system that combines a stable core with advanced technologies to help you deliver world-class products. The technologies in Mac OS X range help you do everything from manage your data to display high-resolution graphics and multimedia content, all while delivering the consistency and ease of use that are hallmarks of the Macintosh experience. This document offers a summary of the technologies available in Mac OS X and how you can use them to create outstanding products. Knowing what is available in the system can help you make good design decisions and deliver highly desirable products to your users. Who Should Read This Document Mac OS X Technology Overview is an essential guide for anyone who wants to develop software for Mac OS X. It orients all developers to the technologies available in Mac OS X, providing a quick reference with links to relevant documentation. This document also orients developers to the types of software they can create (besides applications), providing examples of when each of these types might be appropriate. Finally, the document offers guidelines and advice on the best ways to proceed with software development for Mac OS X. New developers should find this document useful for getting familiar with Mac OS X. Experienced developers should find it a useful reference and road map for exploring specific technologies and development techniques. Organization of This Document This document has the following chapters and appendix: ■ ªMac OS X Architectural Overviewº (page 13) provides background information for understanding the terminology and basic development environment of Mac OS X. It also provides a high-level overview of the Mac OS X system architecture. ■ ªSoftware Development Overviewº (page 19) describes the types of software you can create for Mac OS X and offers recommendations and examples of when to create software of each type. Who Should Read This Document 9 May 27, 2004 | © 2004 Apple Computer, Inc. All Rights Reserved. CHAPTER 1 Introduction to Mac OS X Technology Overview ■ ªMac OS X Technologiesº (page 33) describes the technologies in Mac OS X that are relevant to developers. It explains the purpose of each technology and points to additional resources for more details. ■ ªMac OS X Frameworksº (page 67) lists the frameworks in /System/Library/Frameworks along with a description of their contents. Use this list to learn about specific frameworks during your development cycle. Developer Tools Apple provides a comprehensive suite of developer tools for creating Mac OS X software. The Xcode Tools include applications to help you design, create, debug, and optimize your software. This tools suite also includes header files, sample code, and documentation for Apple technologies.