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
FullScreen (HTML) (DMG) (ZIP)
Shows how to use BeginFullScreen and EndFullScreen to enter and exit full-screen mode.
Graphics & Imaging 2003-01-14
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
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Graphics & Imaging 2003-10-14
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Graphics & Imaging 2007-09-27
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Graphics & Imaging 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Graphics & Imaging 2003-01-14
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Graphics & Imaging 2003-10-27
MouseTracking (HTML) (DMG) (ZIP)
Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Graphics & Imaging 2005-06-01
NewCCursor (HTML) (DMG) (ZIP)
Deprecated - Shows how to create a black and white 'CURS' and a color 'crsr' cursor resource by hand.
Graphics & Imaging 2003-01-14
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Graphics & Imaging 2003-03-12
Palette and GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of palette and color tables with GWorlds.
Graphics & Imaging 2003-10-10
Play Video Sample (HTML) (DMG) (ZIP)
Deprecated - The sample makes use of the RequestVideo sample code API.
Graphics & Imaging 2003-01-14
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Graphics & Imaging 2007-08-31
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Graphics & Imaging 2007-06-21
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Graphics & Imaging 2006-09-11
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Graphics & Imaging 2005-06-01
QuartzShapes (HTML) (DMG) (ZIP)
Example Quartz functions that implement equivalents to the QuickDraw PaintArc, FrameArc, PaintOval, FrameOval, PaintRect, and FrameRect
Graphics & Imaging 2005-03-08
SampleScannerApp (HTML) (DMG) (ZIP)
This project implements a simple client accessing an ICA scanning device.
Graphics & Imaging 2008-05-07
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Graphics & Imaging 2003-07-22
Son of Grab (HTML) (DMG) (ZIP)
Shows how to use the new CGWindow to get window images from the Window Server.
Graphics & Imaging 2007-11-01
TE Over Background (HTML) (DMG) (ZIP)
Deprecated - A textEdit that shows old text editing over a colored background
Graphics & Imaging 2003-07-22
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
TubeTest (HTML) (DMG) (ZIP)
Deprecated - The program is a simple demonstration of how to use the Palette Manager in a color program.
Graphics & Imaging 2003-03-12
AddNibToNav (HTML) (DMG) (ZIP)
Shows how to create a custom area, instantiated from a nib file, in a Navigation Services dialog.
Human Interface Toolbox 2004-01-22
BasicDataBrowser (HTML) (DMG) (ZIP)
Shows how to create a basic, functional data browser.
Human Interface Toolbox 2003-05-08
CalendarView (HTML) (DMG) (ZIP)
Shows how to subclass HIView using C, as well as drawing and hit testing.
Human Interface Toolbox 2003-01-30
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
Human Interface Toolbox 2007-01-12
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Human Interface Toolbox 2006-07-25
CarbonMDEF (HTML) (DMG) (ZIP)
A Mac OS X-compatible, Appearance-savvy sample menu definition function (MDEF).
Human Interface Toolbox 2003-01-30
CarbonTransparentWindow (HTML) (DMG) (ZIP)
Shows how to handle window transparency for compositing, non-compositing, and custom HIView-based Carbon windows.
Human Interface Toolbox 2005-08-10
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 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
ComboBoxPrefs (HTML) (DMG) (ZIP)
Use CFPrefs to store URLs to images for use in a browser style combo box.
Human Interface Toolbox 2005-10-04
ControlBackground (HTML) (DMG) (ZIP)
Shows how to affect the background color of a control when drawing it.
Human Interface Toolbox 2003-01-30
Custom_HIView_Tutorial (HTML) (DMG) (ZIP)
Tutorial presenting a step-by-step custom HIView development. All steps are documented and provided as standalone projects.
Human Interface Toolbox 2005-06-01
CustomWindow (HTML) (DMG) (ZIP)
Demonstrates how to create a custom window in Mac OS X.
Human Interface Toolbox 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
DialogsToHIViews (HTML) (DMG) (ZIP)
Shows how to convert from an old-style resource-based dialog to a modern nib-based window with HIViews.
Human Interface Toolbox 2005-08-24
DTSCarbonShell (HTML) (DMG) (ZIP)
Provides a modern Mac OS X Carbon Application Skeleton
Human Interface Toolbox 2007-09-20
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
GetDragHiliteColor (HTML) (DMG) (ZIP)
Shows how to obtain the color that Drag Manager uses to hilite regions when calling ShowDragHilite.
Human Interface Toolbox 2003-01-30
GrabBag (HTML) (DMG) (ZIP)
Demonstrates variety of techniques and features of Carbon. DataBrowser , PBCatalogSearchAsync, Overlay windows, Tab controls, more...
Human Interface Toolbox 2003-07-29
HexEditorView (HTML) (DMG) (ZIP)
HIView subclass which implements a hex editor similar to those found in resource editors.
Human Interface Toolbox 2003-01-30
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
HICustomPushButton (HTML) (DMG) (ZIP)
Illustrates how to create a simple custom push button using the HIView functions introduced in Mac OS X 10.2.
Human Interface Toolbox 2005-10-17
HideMenuBar (HTML) (DMG) (ZIP)
Shows how to hide the menu bar.
Human Interface Toolbox 2003-01-30
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
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
HIFleetingControls (HTML) (DMG) (ZIP)
Implements fleeting controls such as seen in QuickTime Player full screen mode or iPhoto slideshow
Human Interface Toolbox 2007-05-08
HIFramework (HTML) (DMG) (ZIP)
Contains C++ classes which are used by other HIToolbox sample code releases.
Human Interface Toolbox 2003-02-06
HIObjectThreadController (HTML) (DMG) (ZIP)
Shows how threads can interact with the User Interface handled by the main thread of the application.
Human Interface Toolbox 2005-08-10
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
HISimpleList (HTML) (DMG) (ZIP)
Illustrates how to create a simple list using the HIView APIs introduced in Mac OS X 10.2.
Human Interface Toolbox 2006-03-03
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 2003-10-27
HITextViewDemo (HTML) (DMG) (ZIP)
Overview of basic HITextView functionality, including Tiger's new font & spelling panel support.
Human Interface Toolbox 2005-06-01
HITextViewShowcase (HTML) (DMG) (ZIP)
Shows how to create a HITextView using Interface Builder and using programming functions only.
Human Interface Toolbox 2003-10-30
HIToolboxSOU-Delegates (HTML) (DMG) (ZIP)
Shows how to use the HIObject Delegate API.
Human Interface Toolbox 2006-08-04
HIToolboxSOU-MenuItemViews (HTML) (DMG) (ZIP)
Shows how to use the Menu Item View API.
Human Interface Toolbox 2006-08-04
HIView-NSView (HTML) (DMG) (ZIP)
Demonstrates how to embed an NSView within an HIView in a Carbon window.
Human Interface Toolbox 2007-05-29
HIViewTest (HTML) (DMG) (ZIP)
An HIView with rudimentary drawing and hit testing.
Human Interface Toolbox 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 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 2003-01-30
IconUtilCheck (HTML) (DMG) (ZIP)
Shows how to determine whether the Icon Utilities are available.
Human Interface Toolbox 2003-01-30
ImageBrowserView (HTML) (DMG) (ZIP)
Implementing a simple HIView subclass
Human Interface Toolbox 2005-06-01
ImageMapView (HTML) (DMG) (ZIP)
Demonstrates how to add Accessibility to a complex custom HIView and the related parts of an application.
Human Interface Toolbox 2005-10-17
LittleArrowsShowcase (HTML) (DMG) (ZIP)
How to increment and decrement the LittleArrows value when the user clicks on the up and down buttons.
Human Interface Toolbox 2006-11-09
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
MLTE_CustomScrolling (HTML) (DMG) (ZIP)
Shows how to implement MLTE's custom scrolling functionality
Human Interface Toolbox 2004-10-15
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Human Interface Toolbox 2003-10-27
Password (HTML) (DMG) (ZIP)
Deprecated - Illustrates three different ways to implement password fields in dialogs.
Human Interface Toolbox 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 2003-01-30
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Human Interface Toolbox 2003-05-15
RecentItems (HTML) (DMG) (ZIP)
Implements "Recent items" menu(s)
Human Interface Toolbox 2006-10-09
SampleCMPlugIn (HTML) (DMG) (ZIP)
A contextual menu plugIn for Mac OS X.
Human Interface Toolbox 2006-10-09
ScrollAndZoom (HTML) (DMG) (ZIP)
An illustration of the use of the Context Transformation Matrix (CTM) for zooming and scrolling a HIView.
Human Interface Toolbox 2005-08-10
SetWindBackColor (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set the background color of a window without flicker without the Appearance Manager.
Human Interface Toolbox 2003-01-30
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
SimpleTabControl (HTML) (DMG) (ZIP)
Demonstrates how to use a simple tabbed pane window. This control is often used in preferences.
Human Interface Toolbox 2003-02-20
SplitView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework and implements a scalable split view.
Human Interface Toolbox 2003-01-30
StarMenu (HTML) (DMG) (ZIP)
Shows how to create a Custom Star Shape menu using the new HIMenuView class.
Human Interface Toolbox 2007-05-24
TabsShowcase (HTML) (DMG) (ZIP)
Shows how to instantiate and use the Tab control both programmatically and from a nib file.
Human Interface Toolbox 2005-10-28
TickerView (HTML) (DMG) (ZIP)
HIView subclass which implements a scrolling, live stock ticker.
Human Interface Toolbox 2003-01-30
Tiler (HTML) (DMG) (ZIP)
Modify your applications tile icon within the Mac OS X dock by using both QuickDraw and Quartz
Human Interface Toolbox 2003-10-24
TypeServicesForUnicode (HTML) (DMG) (ZIP)
Shows how to use various ATSUI functions and features going from simple to very complex.
Human Interface Toolbox 2005-08-10
URLTextView (HTML) (DMG) (ZIP)
An HIView subclass which uses LaunchServices to open the URL attached to the view.
Human Interface Toolbox 2003-01-30
WindowFun (HTML) (DMG) (ZIP)
Create window layers and groups. Drawing transparent lines. How to display the "Poof" the toolbar uses.
Human Interface Toolbox 2005-08-24
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Interapplication Communication 2006-08-04
AddressBookCarbon (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the Mac OS X 10.2.x (and beyond) Address Book API.
Interapplication Communication 2003-01-14
AddressBookCocoa (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the Mac OS X 10.2.x (and beyond) Address Book API.
Interapplication Communication 2003-01-14
AESendThreadSafe (HTML) (DMG) (ZIP)
Demonstrates how to send Apple events from threads other than the main thread.
Interapplication Communication 2007-03-09
BasicInputMethod (HTML) (DMG) (ZIP)
An input method implemented as a text service component for Mac OS X.
Interapplication Communication 2003-01-14
EmbededAppleScripts (HTML) (DMG) (ZIP)
Extending the functionality of your application by adding precompiled AppleScripts.
Interapplication Communication 2003-09-04
FinderDragPro (HTML) (DMG) (ZIP)
Sample file illustrating drag and drop techniques for use with file system objects.
Interapplication Communication 2003-01-14
FinderLaunch (HTML) (DMG) (ZIP)
Shows how to open documents by sending Apple Events to the Finder.
Interapplication Communication 2003-10-14
Folder Watching (HTML) (DMG) (ZIP)
Demonstrates how a background only application can use Apple events to pass work to another application.
Interapplication Communication 2003-01-14
LoginItemsAE (HTML) (DMG) (ZIP)
Uses Apple events to manipulate the list of login items (items launched when you log in).
Interapplication Communication 2005-10-17
MoreAppleEvents (HTML) (DMG) (ZIP)
Provides routines that assist with the creation and sending of Apple events and object descriptors.
Interapplication Communication 2003-01-14