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
Sort by
Topic
Sorted by
Date
DockBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetServices to take advantage of Bonjour service discovery and name resolution.
Performance 2005-02-08
MLTE_CustomScrolling (HTML) (DMG) (ZIP)
Shows how to implement MLTE's custom scrolling functionality
Human Interface Toolbox, Text & Fonts 2004-10-15
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
CFHostSample (HTML) (DMG) (ZIP)
Uses the CFHost API to do DNS hostname lookups and to determine host reachability.
Networking 2004-04-20
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
GLCarbon1ContextPbuffer (HTML) (DMG) (ZIP)
Demostrates using OpenGL pixel buffers with a single shared context.
Graphics & Imaging 2004-03-26
GLCarbonSharedPbuffer (HTML) (DMG) (ZIP)
Demostrates sharing a single OpenGL pixel buffer with multiple other contexts.
Graphics & Imaging 2004-03-26
GLUTSurfaceTexture (HTML) (DMG) (ZIP)
Example of using the new glutSurfaceTexture.
Graphics & Imaging 2004-03-26
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management 2004-03-19
AddNibToNav (HTML) (DMG) (ZIP)
Shows how to create a custom area, instantiated from a nib file, in a Navigation Services dialog.
File Management, Human Interface Toolbox 2004-01-22
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Resource Management 2003-11-19
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
User Experience 2003-11-18
HIEmbedder (HTML) (DMG) (ZIP)
Shows how to write a custom embedding HIView which can scroll if set in an HIScrollView.
Human Interface Toolbox 2003-11-13
HIScrollingTextBox (HTML) (DMG) (ZIP)
Offers replacement custom HIViews for the Scrolling TextBox control which does not work in compositing windows.
Human Interface Toolbox 2003-11-06
HITextViewShowcase (HTML) (DMG) (ZIP)
Shows how to create a HITextView using Interface Builder and using programming functions only.
Human Interface Toolbox, Text & Fonts 2003-10-30
Process (HTML) (DMG) (ZIP)
A simple demonstration of the Process Manager API.
Process Management 2003-10-30
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
CPUGestalt (HTML) (DMG) (ZIP)
Deprecated - Shows how to determine the processor type of the Macintosh you're running on.
Resource Management 2003-10-27
HIDoubleSlider (HTML) (DMG) (ZIP)
Illustrates how to create a double slider using the Appearance and HIView functions introduced in Mac OS X 10.2.
Human Interface Toolbox 2003-10-27
HITextShowcase (HTML) (DMG) (ZIP)
Illustrates some of the different text-related controls, non-controls, and HIViews that are available in Mac OS X 10.3.
Human Interface Toolbox, Text & Fonts 2003-10-27
InkSample (HTML) (DMG) (ZIP)
Demonstrates some usage scenarios for the Ink.Framework APIs.
Text & Fonts 2003-10-27
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Audio, Core Foundation, Data Management, Events & Other Input, File Management, Graphics & Imaging, Human Interface Toolbox, Interapplication Communication, Internationalization, Networking, Porting, Process Management, Resource Management, Runtime Architecture, Security, Text & Fonts, User Experience 2003-10-27
qtshell (HTML) (DMG) (ZIP)
Simple QuickTime and QuickTime VR viewer framework.
QuickTime 2003-10-27
TextNameTool (HTML) (DMG) (ZIP)
A command line tool sample illustrating how to use various graphical facilities and services without a login.
Graphics & Imaging 2003-10-27
YASTControl (HTML) (DMG) (ZIP)
An application illustrating how to use a user pane control to define MLTE based text fields.
User Experience 2003-10-27
FloatingWindow (HTML) (DMG) (ZIP)
Demonstrates that floating windows are very easy to implement on Mac OS X using Nib files.
Human Interface Toolbox 2003-10-24
MenuViews (HTML) (DMG) (ZIP)
Demonstrates a variety of interesting uses of HIView-based menus in Mac OS X 10.3.
Human Interface Toolbox 2003-10-24
Sheets (HTML) (DMG) (ZIP)
Demonstrates how to create a sheet both in code and through the use of a Nib file.
Human Interface Toolbox 2003-10-24
Tiler (HTML) (DMG) (ZIP)
Modify your applications tile icon within the Mac OS X dock by using both QuickDraw and Quartz
Human Interface Toolbox, User Experience 2003-10-24
DrawSprocketTestOld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates basic implementations of DrawSprocket Functions.
Games 2003-10-14
FinderLaunch (HTML) (DMG) (ZIP)
Shows how to open documents by sending Apple Events to the Finder.
File Management, Interapplication Communication, User Experience 2003-10-14
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Games, Graphics & Imaging 2003-10-14
Palette and GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of palette and color tables with GWorlds.
Graphics & Imaging 2003-10-10
EmbededAppleScripts (HTML) (DMG) (ZIP)
Extending the functionality of your application by adding precompiled AppleScripts.
Interapplication Communication 2003-09-04
OTEndpointInfo (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to query an endpoint for its 'vital statistic' using OTGetEndpointInfo.
Networking 2003-08-20
GrabBag (HTML) (DMG) (ZIP)
Demonstrates variety of techniques and features of Carbon. DataBrowser , PBCatalogSearchAsync, Overlay windows, Tab controls, more...
File Management, Human Interface Toolbox, User Experience 2003-07-29
BasicPlugIn (HTML) (DMG) (ZIP)
Uses the CFPlugin to locate, load, execute plugin. Derived from the SillyBalls sample.
Core Foundation, Runtime Architecture 2003-07-28
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
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
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Games, Graphics & Imaging, User Experience 2003-07-22
TE Over Background (HTML) (DMG) (ZIP)
Deprecated - A textEdit that shows old text editing over a colored background
Design Guidelines, Graphics & Imaging 2003-07-22
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
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Games, Graphics & Imaging 2003-07-07
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Games, Graphics & Imaging, QuickTime 2003-07-07
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Apple Applications, Events & Other Input, Networking, Performance, Security 2003-06-12
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Human Interface Toolbox, Networking 2003-05-15
BasicDataBrowser (HTML) (DMG) (ZIP)
Shows how to create a basic, functional data browser.
Human Interface Toolbox, User Experience 2003-05-08
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Events & Other Input 2003-03-26
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Accessibility, Audio, User Experience 2003-03-26
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Games, Graphics & Imaging 2003-03-12
TubeTest (HTML) (DMG) (ZIP)
Deprecated - The program is a simple demonstration of how to use the Palette Manager in a color program.
Design Guidelines, Graphics & Imaging, User Experience 2003-03-12
SimpleTabControl (HTML) (DMG) (ZIP)
Demonstrates how to use a simple tabbed pane window. This control is often used in preferences.
Human Interface Toolbox, User Experience 2003-02-20
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Security 2003-02-06
HICustomLeftRightSwitch (HTML) (DMG) (ZIP)
Illustrates how to create a custom left/right switch using the HIView functions introduced in Mac OS X 10.2.
Human Interface Toolbox 2003-02-06
HIFramework (HTML) (DMG) (ZIP)
Contains C++ classes which are used by other HIToolbox sample code releases.
Human Interface Toolbox 2003-02-06
Calculator (HTML) (DMG) (ZIP)
Implements a simple "four-banger" calculator.
User Experience 2003-01-30
CalendarView (HTML) (DMG) (ZIP)
Shows how to subclass HIView using C, as well as drawing and hit testing.
Human Interface Toolbox 2003-01-30
CarbonCustomList (HTML) (DMG) (ZIP)
How to implement a custom list using Carbon using CreateCustomList.
User Experience 2003-01-30
CarbonMDEF (HTML) (DMG) (ZIP)
A Mac OS X-compatible, Appearance-savvy sample menu definition function (MDEF).
Human Interface Toolbox, User Experience 2003-01-30
ClockView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework to implement a scalable analog clock.
Human Interface Toolbox 2003-01-30
ColoredCheckBox (HTML) (DMG) (ZIP)
Demonstrates how to create a colored check box on a gray window backgrounds.
Human Interface Toolbox, User Experience 2003-01-30
ColorSwatchView (HTML) (DMG) (ZIP)
Implements a color well control as an HIView using HIFramework C++ Carbon Event wrapper classes.
Human Interface Toolbox 2003-01-30
ControlBackground (HTML) (DMG) (ZIP)
Shows how to affect the background color of a control when drawing it.
Human Interface Toolbox, User Experience 2003-01-30
CustomWindow (HTML) (DMG) (ZIP)
Demonstrates how to create a custom window in Mac OS X.
Human Interface Toolbox, User Experience 2003-01-30
CustomWindowWidget (HTML) (DMG) (ZIP)
Demonstrates two ways of adding a custom window widget to the window frame of a standard document window.
Human Interface Toolbox 2003-01-30
Fragment Tool (HTML) (DMG) (ZIP)
Demonstrates manipulation of code fragments; combining and separating; viewing and editing information associated with each.
Data Management, Design Guidelines, File Management, Resource Management, Runtime Architecture, Tools, User Experience 2003-01-30
GetDragHiliteColor (HTML) (DMG) (ZIP)
Shows how to obtain the color that Drag Manager uses to hilite regions when calling ShowDragHilite.
Human Interface Toolbox, User Experience 2003-01-30
HandyScrollingSample (HTML) (DMG) (ZIP)
Shows some ways of implementing scrolling.
User Experience 2003-01-30
HexEditorView (HTML) (DMG) (ZIP)
HIView subclass which implements a hex editor similar to those found in resource editors.
Human Interface Toolbox 2003-01-30
HideMenuBar (HTML) (DMG) (ZIP)
Shows how to hide the menu bar.
Human Interface Toolbox, User Experience 2003-01-30
HIViewTest (HTML) (DMG) (ZIP)
An HIView with rudimentary drawing and hit testing.
Human Interface Toolbox 2003-01-30
HTMLSample (HTML) (DMG) (ZIP)
Deprecated - Illustrates one way to use the HTMLRenderingLib Library.
User Experience 2003-01-30
HTMLUserPane (HTML) (DMG) (ZIP)
Deprecated - Shows how to display a HTMLRenderingLib object inside of a user pane control.
User Experience 2003-01-30
icon cache demo (HTML) (DMG) (ZIP)
Demonstrates the use of an icon cache to limit the search for icon resource to one resource file.
Human Interface Toolbox, Performance, User Experience 2003-01-30
Icon Play (HTML) (DMG) (ZIP)
Demonstrates the use of icon utilities and popup control cdef in a program using modal dialogs.
Human Interface Toolbox, User Experience 2003-01-30
IconUtilCheck (HTML) (DMG) (ZIP)
Shows how to determine whether the Icon Utilities are available.
Human Interface Toolbox, User Experience 2003-01-30
ictbSample (HTML) (DMG) (ZIP)
Deprecated - Shows an example of ictb resource.
User Experience 2003-01-30
kcapApp (HTML) (DMG) (ZIP)
Demonstrates drawing the key caps, given a set of modifiers and KCHR and KCAP resource IDs.
User Experience 2003-01-30
KeyMapTest (HTML) (DMG) (ZIP)
Uses Pascal to display a KeyMap representation whenever keys are pressed.
User Experience 2003-01-30
Live Scroll (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implementing live scrolling during the tracking of scroll bar thumbs.
User Experience 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.
Apple Applications, Events & Other Input, Networking, Runtime Architecture 2003-01-30
NoSound (HTML) (DMG) (ZIP)
Illustrates how to install a procedure to be executed when the user restarts or shuts down.
User Experience 2003-01-30
Password (HTML) (DMG) (ZIP)
Deprecated - Illustrates three different ways to implement password fields in dialogs.
Human Interface Toolbox, User Experience 2003-01-30
PopUpMenuWithCurFont (HTML) (DMG) (ZIP)
Deprecated - Demonstrates what must be done to control the font used by MDEF 0 during PopUpMenuSelect.
Human Interface Toolbox, User Experience 2003-01-30
ReadLocation (HTML) (DMG) (ZIP)
Retrieves the Map control panel settings for longitude and latitude and the time offset from GMT.
User Experience 2003-01-30
ReKeyTrans (HTML) (DMG) (ZIP)
Shows how to patch KeyTrans to ignore dead-key processing so you type fancy accented characters.
User Experience 2003-01-30
ROMResourceDump (HTML) (DMG) (ZIP)
Deprecated - Illustrates how to copy all resources in the Macintosh's ROM into a file.
User Experience 2003-01-30
Scrap Parsing (HTML) (DMG) (ZIP)
Deprecated - Shows how to parse the in-memory scrap.
User Experience 2003-01-30
SetIndString (HTML) (DMG) (ZIP)
Implements SetIndString(), which sets a particular STR# string to the passed in string. Similar to GetIndString()
Data Management, Resource Management, User Experience 2003-01-30
SetWindBackColor (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set the background color of a window without flicker without the Appearance Manager.
Human Interface Toolbox, User Experience 2003-01-30
SICN LDEF (HTML) (DMG) (ZIP)
Implements an LDEF that displays small icons to the left of text in a list.
User Experience 2003-01-30
SimpleList (HTML) (DMG) (ZIP)
A simple illustration of a ListBox Control implementation and its pitfall
User Experience 2003-01-30
Splasher (HTML) (DMG) (ZIP)
Closes a modal window, such as a splash screen, with a mouse click or key press.
User Experience 2003-01-30
SplitView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework and implements a scalable split view.
Human Interface Toolbox 2003-01-30
stdFilterHacking (HTML) (DMG) (ZIP)
Demonstrates problems and workarounds for/with the Standard Dialog Filter.
User Experience 2003-01-30
TickerView (HTML) (DMG) (ZIP)
HIView subclass which implements a scrolling, live stock ticker.
Human Interface Toolbox 2003-01-30
URLTextView (HTML) (DMG) (ZIP)
An HIView subclass which uses LaunchServices to open the URL attached to the view.
Human Interface Toolbox 2003-01-30