Jump To:
Leopard Sample Code
Carbon is a set of C APIs offering developers an advanced user interface tool kit, event handling, the Quartz 2D graphics library, and multiprocessing support. Developers have access to other C and C++ APIs, including the OpenGL drawing system and the Mach microkernel.

A guided introduction and learning path for developers new to Carbon.   Essential information for developers using procedural C.   C API references organized by framework.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Interapplication Communication 2003-10-27
MoreOSL (HTML) (DMG) (ZIP)
C library for implementing AppleScript support within your application.
Interapplication Communication 2003-01-14
ODOC (HTML) (DMG) (ZIP)
Illustrates how to send an open document ('odoc') Apple event to another application process.
Interapplication Communication 2003-01-14
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Interapplication Communication 2005-08-10
PutAwayVolumes (HTML) (DMG) (ZIP)
Deprecated - Demonstrates several ways to unmount a volume and which contexts might require which techniques.
Interapplication Communication 2003-01-14
ATSUICurveAccessDemo (HTML) (DMG) (ZIP)
Demonstrates low-level ATSUI APIs which allow access to raw glyph curve data.
Internationalization 2003-01-14
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Internationalization 2003-10-27
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Internet & Web 2006-07-25
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Networking 2003-06-12
CFHostSample (HTML) (DMG) (ZIP)
Uses the CFHost API to do DNS hostname lookups and to determine host reachability.
Networking 2004-04-20
CFNetworkHTTPDownload (HTML) (DMG) (ZIP)
Demonstrates how to download a URL using CFNetworking.
Networking 2006-01-18
GetHWEthernetAddr (HTML) (DMG) (ZIP)
Deprecated - Shows how to obtain the hardware Ethernet address of a machine.
Networking 2003-01-14
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Networking 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Networking 2005-10-27
GetSetOptions (HTML) (DMG) (ZIP)
Demonstrates a variety of uses of Open Transport's option management routines.
Networking 2003-01-14
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Networking 2005-06-01
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Networking 2003-01-14
LocalServer (HTML) (DMG) (ZIP)
Deprecated - Sample demonstrates how a Classic process can communicate with a Mac OS X process using IP networking protocols.
Networking 2003-01-30
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Networking 2003-10-27
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Networking 2003-01-14
NSLMiniBrowser (HTML) (DMG) (ZIP)
Deprecated - Uses the NSL API to find network services using SLP, NBP, and Directory Services.
Networking 2003-01-14
OT Virtual Server (HTML) (DMG) (ZIP)
Deprecated - Sample code which uses Open Transport and demonstrates real world issues.
Networking 2003-01-14
OTEndpointInfo (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to query an endpoint for its 'vital statistic' using OTGetEndpointInfo.
Networking 2003-08-20
OTLookupNameTest (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to lookup NBP entities on an AppleTalk network using Open Transport.
Networking 2003-01-14
OTMP (HTML) (DMG) (ZIP)
Deprecated - A library for calling Open Transport synchronously from preemptively scheduled tasks (MP tasks).
Networking 2003-07-22
OTPingSample (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implement ping on top of the Open Transport API.
Networking 2003-07-22
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Networking 2003-05-15
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Performance 2003-06-12
CopyBits vs. CopyMask (HTML) (DMG) (ZIP)
Deprecated - CopyBits (using a mask region) vs. CopyMask (using a mask BitMap). Which do you think is faster?
Performance 2003-07-22
DockBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetServices to take advantage of Bonjour service discovery and name resolution.
Performance 2005-02-08
icon cache demo (HTML) (DMG) (ZIP)
Demonstrates the use of an icon cache to limit the search for icon resource to one resource file.
Performance 2003-01-30
Carbon Porting Tutorial (HTML) (DMG) (ZIP)
Porting a simple application from Mac OS 9 to Mac OS X
Porting 2006-07-25
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
Porting 2007-01-12
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Porting 2007-05-31
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Porting 2003-10-27
SDKExample (HTML) (DMG) (ZIP)
Shows how to weak-link against the Carbon framework in various SDKs to adopt new OS features in a single executable.
Porting 2005-06-06
CarbonQuartzDrawingWPrinting (HTML) (DMG) (ZIP)
Deprecated - Demonstrates mixing QuickDraw and Quartz 2D drawing both on screen and during printing.
Printing 2003-01-14
Cocoa PDE with Carbon Printing (HTML) (DMG) (ZIP)
Application that uses a Cocoa PDE along with the Carbon Printing APIs.
Printing 2007-07-27
PDEProject (HTML) (DMG) (ZIP)
Deprecated - Demonstrates an application-hosted printing dialog extension (PDE) that displays a custom pane in the Print dialog.
Printing 2003-01-14
PMPrinterPrintWithFile (HTML) (DMG) (ZIP)
How to send files, for example PostScript and PDF, directly to the printer. Replaces the pict-ps path.
Printing 2006-07-18
PMPrinterTest (HTML) (DMG) (ZIP)
Demonstrates using the PMPrinter APIs to obtain information about the connected printers.
Printing 2009-02-13
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Process Management 2007-05-31
Folder Watching (HTML) (DMG) (ZIP)
Demonstrates how a background only application can use Apple events to pass work to another application.
Process Management 2003-01-14
KillEveryOneButMe (HTML) (DMG) (ZIP)
Demonstrates how to terminate all other processes.
Process Management 2005-08-24
LoginItemsAE (HTML) (DMG) (ZIP)
Uses Apple events to manipulate the list of login items (items launched when you log in).
Process Management 2005-10-17
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Process Management 2003-10-27
MPFileCopy (HTML) (DMG) (ZIP)
Demonstrates how to copy a folder and its contents using the HFS Plus APIs from an MP task.
Process Management 2003-01-14
PreLoginAgents (HTML) (DMG) (ZIP)
Pre-login launchd agents to display UI using AppKit and HIToolbox.
Process Management 2007-10-26
Process (HTML) (DMG) (ZIP)
A simple demonstration of the Process Manager API.
Process Management 2003-10-30
PThreadSorts (HTML) (DMG) (ZIP)
Applies various sorting algorithms to pictures using POSIX threads (pthreads) on Mac OS X.
Process Management 2003-01-14
SignatureToApp (HTML) (DMG) (ZIP)
Deprecated - Takes a signature (creator code) and finds the corresponding application, running or on disk.
Process Management 2003-01-14
BackgroundExporter (HTML) (DMG) (ZIP)
Demonstrates techniques which can be used to export QuickTime movies in a separate export process.
QuickTime 2005-07-22
BrideOfMungGrab (HTML) (DMG) (ZIP)
Demonstrates the use of overlay windows and CG to draw text on captured video.
QuickTime 2005-08-12
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
QuickTime 2003-07-07
DropDraw (HTML) (DMG) (ZIP)
Demonstrates automatic ColorSync color-matching when drawing with QuickTime graphics importers in Panther
QuickTime 2005-08-01
HackTV Carbon (HTML) (DMG) (ZIP)
HackTV Carbon shows how to use the sequence grabber to preview and record QuickTime movie files.
QuickTime 2007-11-16
QTCarbonCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render QuickTime Movies using Core Image filters and the new video pipeline.
QuickTime 2006-02-14
QTCarbonShell (HTML) (DMG) (ZIP)
A skeleton of a modern Carbon QuickTime application demonstrating how to incorporate QuickTime support into a Carbon application.
QuickTime 2009-03-19
QTMetaData (HTML) (DMG) (ZIP)
Demonstrates the QuickTime 7 MetaData APIs in a Carbon application.
QuickTime 2009-03-16
qtshell (HTML) (DMG) (ZIP)
Simple QuickTime and QuickTime VR viewer framework.
QuickTime 2003-10-27
qtshellCEvents (HTML) (DMG) (ZIP)
A Carbon event based movie viewer framework which demonstrates how to incorporate movie support into an application.
QuickTime 2003-01-14
QuickTimeMovieControl (HTML) (DMG) (ZIP)
Demonstrates how to easily add QuickTime media playback to an application
QuickTime 2005-08-10
SillyFrequencyLevels (HTML) (DMG) (ZIP)
Demonstrates how to obtain audio frequency levels from a Movie using SetMovieAudioFrequencyMeteringNumBands and GetMovieAudioFrequencyLevels APIs.
QuickTime 2006-01-25
SimpleHIMovieViewPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use HIMovieView to play QuickTime Movies.
QuickTime 2005-07-15
SimpleVideoOut (HTML) (DMG) (ZIP)
Demonstrates how QuickTime Video Output Components can be used to play video out to hardware.
QuickTime 2005-08-10
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
QuickTime 2008-05-09
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Resource Management 2006-10-09
CPUGestalt (HTML) (DMG) (ZIP)
Deprecated - Shows how to determine the processor type of the Macintosh you're running on.
Resource Management 2003-10-27
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
Resource Management 2003-01-30
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Resource Management 2003-11-19
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Resource Management 2003-10-27
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Resource Management 2003-01-14
SampleCMPlugIn (HTML) (DMG) (ZIP)
A contextual menu plugIn for Mac OS X.
Resource Management 2006-10-09
SetIndString (HTML) (DMG) (ZIP)
Implements SetIndString(), which sets a particular STR# string to the passed in string. Similar to GetIndString()
Resource Management 2003-01-30
BasicPlugIn (HTML) (DMG) (ZIP)
Uses the CFPlugin to locate, load, execute plugin. Derived from the SillyBalls sample.
Runtime Architecture 2003-07-28
CallMachOFramework (HTML) (DMG) (ZIP)
Shows two ways of calling a Mach-O framework from a CFM application on Mac OS X.
Runtime Architecture 2003-07-17
CFM_MachO_CFM (HTML) (DMG) (ZIP)
CFM application calls Mach-O routine, passing in a fixed up CFM function pointer as a callback parameter.
Runtime Architecture 2003-07-17
CheckExecutableArchitecture (HTML) (DMG) (ZIP)
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Runtime Architecture 2006-02-07
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Runtime Architecture 2005-10-04
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
Runtime Architecture 2003-01-30
LocalServer (HTML) (DMG) (ZIP)
Deprecated - Sample demonstrates how a Classic process can communicate with a Mac OS X process using IP networking protocols.
Runtime Architecture 2003-01-30
MemoryBasedBundle (HTML) (DMG) (ZIP)
Shows how to execute Mach-O code from memory, much like GetMemFragment in CFM.
Runtime Architecture 2005-08-10
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Runtime Architecture 2003-10-27
SDKExample (HTML) (DMG) (ZIP)
Shows how to weak-link against the Carbon framework in various SDKs to adopt new OS features in a single executable.
Runtime Architecture 2005-06-06
SpellingChecker CarbonCocoa Bundled (HTML) (DMG) (ZIP)
How to load and call a Cocoa bundle from a Carbon CFM or Mach-O application
Runtime Architecture 2004-08-17
SpellingChecker-CarbonCocoa (HTML) (DMG) (ZIP)
Implements procedural C wrapper around the Cocoa NSSpellChecker, exports it as a Mach-O bundle called "SpellCheck.bundle"
Runtime Architecture 2003-01-14
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Runtime Architecture 2005-08-10
SampleCMPlugIn (HTML) (DMG) (ZIP)
A contextual menu plugIn for Mac OS X.
Scripting & Automation 2006-10-09
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Security 2003-06-12
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Security 2003-02-06
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Security 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Security 2005-10-27
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Security 2003-10-27
SSLSample (HTML) (DMG) (ZIP)
Contains examples showing how to use SecureTransport.
Security 2003-01-14
SeeMyFriends (HTML) (DMG) (ZIP)
Illustrates how to use SyncServices API in a Carbon (HLTB) based application
Syncing 2006-10-16
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Syncing 2006-08-08
ATSUICurveAccessDemo (HTML) (DMG) (ZIP)
Demonstrates low-level ATSUI APIs which allow access to raw glyph curve data.
Text & Fonts 2003-01-14
ATSUIDirectAccessDemo (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the ATSUI DirectAccess api.
Text & Fonts 2003-01-14
BasicInputMethod (HTML) (DMG) (ZIP)
An input method implemented as a text service component for Mac OS X.
Text & Fonts 2003-01-14
CoreTextArc (HTML) (DMG) (ZIP)
Illustrates the use of fonts, lines, and runs in a CoreText text drawing Carbon application.
Text & Fonts 2007-06-04