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
ImageMapView (HTML) (DMG) (ZIP)
Demonstrates how to add Accessibility to a complex custom HIView and the related parts of an application.
Accessibility 2005-10-17
iTunesController (HTML) (DMG) (ZIP)
iTunesController allows you to control iTunes without having to bring it to the foreground.
Accessibility 2006-02-23
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Accessibility 2003-03-26
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Apple Applications 2006-08-04
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Apple Applications 2003-06-12
LocalServer (HTML) (DMG) (ZIP)
Deprecated - Sample demonstrates how a Classic process can communicate with a Mac OS X process using IP networking protocols.
Apple Applications 2003-01-30
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Apple Applications 2006-08-08
AudioDeviceNotify (HTML) (DMG) (ZIP)
Demonstrates how to enumerate audio devices attached to the system and how to handle device notifications
Audio 2006-04-21
AudioQueueTest (HTML) (DMG) (ZIP)
Demonstrates AudioQueue, an audio playback API introduced in Mac OS X 10.5
Audio 2006-08-01
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Audio 2003-10-27
RecordAudioToFile (HTML) (DMG) (ZIP)
Demonstrates recording audio to an AAC file using Core Audio
Audio 2007-02-27
SimplePlayThru (HTML) (DMG) (ZIP)
Use the HAL's Audio Output Unit (AUHAL) for device input and output on a single device (play-thru)
Audio 2006-10-25
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Audio 2003-03-26
TremoloUnit (HTML) (DMG) (ZIP)
Audio unit sample demonstrating how to build an effect unit with a generic view.
Audio 2006-10-26
AlbumToSlideshow (HTML) (DMG) (ZIP)
Demonstrates using CF and NSXML to create Final Cut Pro XML.
Core Foundation 2008-05-15
BasicPlugIn (HTML) (DMG) (ZIP)
Uses the CFPlugin to locate, load, execute plugin. Derived from the SillyBalls sample.
Core Foundation 2003-07-28
CFPreferences (HTML) (DMG) (ZIP)
Shows how to use the CFPreferences APIs to access user preferences.
Core Foundation 2003-01-14
CFPrefsDumper (HTML) (DMG) (ZIP)
Shows how to use the CFPreferences APIs to access information about the current user preferences.
Core Foundation 2003-01-14
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Core Foundation 2006-10-09
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Core Foundation 2003-10-27
ProfileSystem (HTML) (DMG) (ZIP)
Shows how to obtain the same information that System Profiler displays.
Core Foundation 2005-05-05
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Data Management 2006-10-09
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
Data Management 2003-01-30
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Data Management 2003-01-14
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Data Management 2003-10-27
SetIndString (HTML) (DMG) (ZIP)
Implements SetIndString(), which sets a particular STR# string to the passed in string. Similar to GetIndString()
Data Management 2003-01-30
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Design Guidelines 2006-10-09
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Design Guidelines 2005-10-04
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Design Guidelines 2007-05-31
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
Design Guidelines 2003-01-30
HIView-NSView (HTML) (DMG) (ZIP)
Demonstrates how to embed an NSView within an HIView in a Carbon window.
Design Guidelines 2007-05-29
SampleCMPlugIn (HTML) (DMG) (ZIP)
A contextual menu plugIn for Mac OS X.
Design Guidelines 2006-10-09
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Design Guidelines 2005-08-10
TE Over Background (HTML) (DMG) (ZIP)
Deprecated - A textEdit that shows old text editing over a colored background
Design Guidelines 2003-07-22
TubeTest (HTML) (DMG) (ZIP)
Deprecated - The program is a simple demonstration of how to use the Palette Manager in a color program.
Design Guidelines 2003-03-12
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Events & Other Input 2003-06-12
CarbonCocoaTempConverter (HTML) (DMG) (ZIP)
Demonstrates how to integrate Carbon and Cocoa user interfaces in the same Cocoa application.
Events & Other Input 2008-03-10
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Events & Other Input 2003-03-26
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Events & Other Input 2007-05-31
DragAndDrop Shell (HTML) (DMG) (ZIP)
A Drag and Drop shell for producing QuickTime drag and drop tools.
Events & Other Input 2003-01-14
EventMonitorTest (HTML) (DMG) (ZIP)
Receive notification of all keyboard, mouse, and tablet events passed to other processes.
Events & Other Input 2005-11-09
FinderDragPro (HTML) (DMG) (ZIP)
Sample file illustrating drag and drop techniques for use with file system objects.
Events & Other Input 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.
Events & Other Input 2003-01-30
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Events & Other Input 2003-10-27
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Events & Other Input 2006-11-28
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
Events & Other Input 2006-08-04
AddNibToNav (HTML) (DMG) (ZIP)
Shows how to create a custom area, instantiated from a nib file, in a Navigation Services dialog.
File Management 2004-01-22
AsyncPB (HTML) (DMG) (ZIP)
Deprecated - Describes how to chain File System calls from an interrupt handler like a Time Manager task.
File Management 2003-10-27
audioburntest (HTML) (DMG) (ZIP)
Uses the DRTrackCallbackProc and track properties to create a RedBook audio CD from AIFF files.
File Management 2003-01-14
bulkerase (HTML) (DMG) (ZIP)
Demonstrates how to erase media using the DiscRecording framework.
File Management 2003-01-14
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
File Management 2006-10-09
databurntest (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolderRef and burn it to disc.
File Management 2003-01-14
DisplayURL (HTML) (DMG) (ZIP)
Parses a passed in path URL into its various components displaying server information.
File Management 2005-10-04
DRDataBurnCarbonUI (HTML) (DMG) (ZIP)
DRDataBurnCarbonUI shows how to use the standard DiscRecording burn setup and progress panel from Carbon.
File Management 2004-04-09
DREraseCarbonUI (HTML) (DMG) (ZIP)
DREraseCarbonUI shows how to use the DiscRecording erase setup and progress panel from Carbon.
File Management 2004-04-09
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management 2006-01-10
FinderDragPro (HTML) (DMG) (ZIP)
Sample file illustrating drag and drop techniques for use with file system objects.
File Management 2003-01-14
FinderLaunch (HTML) (DMG) (ZIP)
Shows how to open documents by sending Apple Events to the Finder.
File Management 2003-10-14
Folder Watching (HTML) (DMG) (ZIP)
Demonstrates how a background only application can use Apple events to pass work to another application.
File Management 2003-01-14
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
File Management 2003-01-30
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management 2004-03-19
FSCreateFileAndOpenForkUnicode (HTML) (DMG) (ZIP)
Demonstartes the use of FSCreateFileAndOpenForkUnicode to create a file with restricted access on disk and a read/write access path.
File Management 2005-06-01
FSFileOperation (HTML) (DMG) (ZIP)
This sample shows how to use the FSFileOperation API which supports copying and moving filesystem objects.
File Management 2005-06-06
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management 2008-02-25
FSRemoveInheritedACEs (HTML) (DMG) (ZIP)
Demonstrates manipulating access control lists of existing file system objects using the File Manager.
File Management 2005-06-01
FSReplaceObject (HTML) (DMG) (ZIP)
FSReplaceObject is an example command line tool showing how to exercise the FSReplaceObject and FSPathReplaceObject related APIs.
File Management 2007-02-14
GrabBag (HTML) (DMG) (ZIP)
Demonstrates variety of techniques and features of Carbon. DataBrowser , PBCatalogSearchAsync, Overlay windows, Tab controls, more...
File Management 2003-07-29
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
File Management 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
File Management 2005-05-13
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
File 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.
File Management 2003-01-14
PutAwayVolumes (HTML) (DMG) (ZIP)
Deprecated - Demonstrates several ways to unmount a volume and which contexts might require which techniques.
File Management 2003-01-14
resolveRelativeAlias (HTML) (DMG) (ZIP)
Demonstrates the steps involved in creating and resolving a relative alias.
File Management 2003-01-14
SignatureToApp (HTML) (DMG) (ZIP)
Deprecated - Takes a signature (creator code) and finds the corresponding application, running or on disk.
File Management 2003-01-14
SpotlightFortunes (HTML) (DMG) (ZIP)
Demonstrates how to provision a Spotlight importer plug-in for a custom UTI, and how to use a NSMetadataQuery with bindings to display live query results in a table view.
File Management 2008-06-06
VolumeToBSDNode (HTML) (DMG) (ZIP)
Shows how to iterate across all mounted volumes and retrieve their BSD node names.
File Management 2006-10-16
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management 2006-08-04
aglClipBufferRect (HTML) (DMG) (ZIP)
Shows the use of clip regions and buffer rects in AGL.
Games 2003-01-14
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Games 2003-07-07
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Games 2003-07-07
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Games 2006-10-09
DrawSprocketTestOld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates basic implementations of DrawSprocket Functions.
Games 2003-10-14
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Games 2003-10-14
HID Config Save (HTML) (DMG) (ZIP)
Human Interface Device Manager Configuration sample
Games 2008-05-07
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Games 2003-03-12
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Games 2003-07-22
aglClipBufferRect (HTML) (DMG) (ZIP)
Shows the use of clip regions and buffer rects in AGL.
Graphics & Imaging 2003-01-14
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Graphics & Imaging 2003-07-07
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Graphics & Imaging 2003-07-07
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Graphics & Imaging 2006-10-02
CarbonQuartzDrawingWPrinting (HTML) (DMG) (ZIP)
Deprecated - Demonstrates mixing QuickDraw and Quartz 2D drawing both on screen and during printing.
Graphics & Imaging 2003-01-14
CarbonSketch (HTML) (DMG) (ZIP)
Core Graphics only example of a Sketch application implemented with HIToolbox. Shows 1x1-CGBitmapContext for hit-testing, printing.
Graphics & Imaging 2005-03-23
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Graphics & Imaging 2008-04-24
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Graphics & Imaging 2003-01-14
ColorSyncDevices (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Support APIs introduced with Mac OS X.
Graphics & Imaging 2003-01-14
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Graphics & Imaging 2003-01-14
ComboBoxPrefs (HTML) (DMG) (ZIP)
Use CFPrefs to store URLs to images for use in a browser style combo box.
Graphics & Imaging 2005-10-04
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Graphics & Imaging 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Graphics & Imaging 2003-01-14