< Previous PageNext Page > Hide TOC

The Carbon Factory Tour

Carbon contains many programming interfaces. What interfaces you will require depends on the type of applications you want to write, but as is often the case, some are more commonly used than others. This section divides up the Carbon interfaces according to usage (from fundamental to esoteric) and gives some useful information about each one. To learn more about a particular interface, you can use the Documentation Help feature integrated into Xcode. You can also consult the technical documentation on the Apple developer web site.

Carbon interfaces are defined as those accessed through the Carbon umbrella framework. See the header Carbon.h to see which interfaces are included.

Note: Carbon also includes a number of legacy interfaces that you should not use unless you are supporting older systems. “Legacy Interfaces” lists these older interfaces.

In this section:

The Starter Kit
The Expansion Pack
Specialty and NonCarbon Interfaces
Utility Interfaces


The Starter Kit

This section covers the interfaces most likely to be called by a Macintosh application. These managers and services provide the basic user interface as well as fundamental features, such as the ability to save and print files. You can build basic but fully functional Carbon applications using the interfaces described here.

Note: If Carbon were an interface to build automobiles, the Starter Kit interfaces would define the engine, wheels, brakes and other essential components, as well as the user interface (dashboard, steering wheel, gas and brake pedals, and so on).

The Toolbox Interfaces

The following interfaces (sometimes called the Human Interface Toolbox or HIToolbox) are grouped together because they generally work together to create and manage the user interface. In most cases, Interface Builder and the Interface Builder Services programming interface can handle the creation and control of the basic user interface. However, to accomplish more esoteric tasks, you may need to call additional functions in the Human Interface Toolbox interfaces:

The User Interface

While the HIToolbox interfaces are flexible enough to let you do just about anything with your user interface, that doesn't mean you should. When designing and laying out your user interface, you need to follow the Apple Human Interface Guidelines. Just as adherence to common rules and customs when designing steering wheels and dashboards makes driving more pleasant and less confusing, following the Apple guidelines lets your application provide the best possible experience for your users.

If you use Interface Builder, adhering to the Apple Guidelines is that much easier; you can have it automatically tell you when various items in a window are spaced correctly.

Accessibility

While the standard user interface is sufficient for most users, those who have disabilities may need alternate methods to interact with your application. Apple provides a number of special accessibility features to meet this need. If you plan to sell your application to governmental agencies in the United States, your application must support accessibility.

Accessibility is not just a benefit for disabled users. An application that supports accessibility is also easier to test, and it makes it easier to provide explanatory help for all users.

See Accessibility Overview to learn more about accessibility on Mac OS X, and Accessibility Programming Guidelines for Carbon to learn what you need to do to support accessibility in Carbon applications.

Under the Hood

The following interfaces work behind the scenes, as it were, to provide the basic functionality that you expect from most applications:

The Expansion Pack

This section lists interfaces that are desirable, but not necessary for most applications. Full-featured commercial applications usually adopt a number of these interfaces.

Note: Continuing the automobile metaphor, these interfaces would add useful features that may be essential in some cases, such as power-steering, windshield wipers, and air conditioning.

Specialty and NonCarbon Interfaces

These are more esoteric interfaces that you generally would not use unless you were interested in creating specific types of applications. Some provide specialized features, while others expand on basic functionality (such as text manipulation). You use these interfaces to create highly sophisticated applications that take full advantage of the system software.

Many of these interfaces are not part of the Carbon framework, but can be called from Carbon applications.

Some of these interfaces have Objective-C APIs, which will require you to write some Objective-C code. For details on how to call Objective C code from C code, see Carbon-Cocoa Integration Guide.

Note: For automobiles, these features would be for specific types of cars: turbocharging and tight suspensions for sports cars, flatbeds and towhooks for trucks, leather seats and soft suspensions for luxury cars, and so on.

QuickTime

QuickTime is Apple's multimedia programming interface. You use QuickTime to create and play file-based or streaming movies, virtual reality environments, sounds, and music files. The QuickTime programming interface is broad and very powerful. To gain a better understanding of its features, read Getting Started with QuickTime and QuickTime Overview.

Core Video

Core Video complements QuickTime as it provides a way to access individual frames in the video pipeline. You can then manipulate the frames using OpenGL or Core Image. For example, if you want to add filter effects to the video, or map the video onto a shape, you can use Core Video to do so. See Core Video Programming Guide for more information.

Core Audio

Core Audio is the audio architecture for Mac OS X. It provides a broad range of audio and MIDI services for hardware and application developers, such as state-of-the-art audio recording and playback, digital signal processing, MIDI sequencing, low-level access to audio devices, software-based sound synthesis, and much more.

Color, Images, and Print Production

These interfaces are for applications that create and manipulate images, such as a photo retouching program:

3D Graphics

For high-quality 3D graphics, the interface of choice is OpenGL. In actuality this is an industry-standard interface and not part of Carbon, but it is fully compatible with Carbon (just make sure you link to the OpenGL framework when you build). You can use OpenGL's 3D rendering capabilities for everything from medical imaging to virtual reality to incredibly photorealistic games. See OpenGL Programming Guide for Mac OS X for more information about how to use OpenGL in Mac OS X.

HTML

To render HTML in Carbon windows, you can use Web Kit. HIView has a special web view that can display HTML acquired with Web Kit. See WebKit C Reference for more details.

Disc Recording and Playback

These interfaces let your application interact with CDs or DVDs.

Sync Services

If your application needs to synchronize some of its data with a device, such as an iPod or PDA, you should use Sync Services to do so. You can also synchronize separate Macintosh computers if the user has a .Mac account. Sync Services is an Objective-C API.

Speech

These interfaces let your application speak text or recognize speech:

Text and International Services

Most of these interfaces are only for developers writing text-intensive applications. For basic text input and display, the Multilingual Text Engine provides a much simpler interface for most of the same functionality.

Internet and Networking

If your application uses or enables network access, you may need to use one of the following managers or services:

Mac OS X also supports standard networking security features, such as SSL/TLS. See “Security” for more information.

Security

Mac OS X supports a number of standard security services (certificates, an authentication interface, SSL/TLS for networking, and so on) as well as Apple-specific features, such as keychains, which allow you store and access multiple passwords using a master password. For an overview of basic security concepts and the security services available in Mac OS X, see Security Overview. Getting Started with Security describes documentation available for implementing security features.

Low-Level Tweaking

Mac OS X is designed to shield applications from low-level workings of the system. However, if you are writing driver-level code that needs to talk directly to hardware (such as a video card), you need to use I/O Kit. Most applications don't need this level of control and should not be at all dependent on hardware.To that end, you should use I/O Kit only if you are sure you need it.

Utility Interfaces

This section covers utility interfaces that may be useful, depending on the application. These managers and services aren't particularly related to any technology or functionality:

Note: If Carbon were for cars, these interfaces would add possibly useful features, such as diagnostic self-checking (warning lights), headlight wipers, cup holders, curb feelers, and GPS units.



< Previous PageNext Page > Hide TOC


© 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-11-09)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.