Jump To:
Each Sample Code project is buildable and executable source example of how to accomplish a task for a specific Apple technology. They show the correct sequence of calls and parameter data types to provide a generalized method for API use that developers can modify for their specific needs.

Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
HIEmbedder (HTML) (DMG) (ZIP)
Shows how to write a custom embedding HIView which can scroll if set in an HIScrollView.
Carbon 2003-11-13
HIFleetingControls (HTML) (DMG) (ZIP)
Implements fleeting controls such as seen in QuickTime Player full screen mode or iPhoto slideshow
Carbon 2007-05-08
HIFramework (HTML) (DMG) (ZIP)
Contains C++ classes which are used by other HIToolbox sample code releases.
Carbon 2003-02-06
HIObjectThreadController (HTML) (DMG) (ZIP)
Shows how threads can interact with the User Interface handled by the main thread of the application.
Carbon 2005-08-10
HIScrollingTextBox (HTML) (DMG) (ZIP)
Offers replacement custom HIViews for the Scrolling TextBox control which does not work in compositing windows.
Carbon 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.
Carbon 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.
Carbon 2003-10-27
HITextViewDemo (HTML) (DMG) (ZIP)
Overview of basic HITextView functionality, including Tiger's new font & spelling panel support.
Carbon 2005-06-01
HITextViewShowcase (HTML) (DMG) (ZIP)
Shows how to create a HITextView using Interface Builder and using programming functions only.
Carbon 2003-10-30
HIToolboxSOU-Delegates (HTML) (DMG) (ZIP)
Shows how to use the HIObject Delegate API.
Carbon 2006-08-04
HIToolboxSOU-MenuItemViews (HTML) (DMG) (ZIP)
Shows how to use the Menu Item View API.
Carbon 2006-08-04
HIView-NSView (HTML) (DMG) (ZIP)
Demonstrates how to embed an NSView within an HIView in a Carbon window.
Carbon 2007-05-29
HIViewTest (HTML) (DMG) (ZIP)
An HIView with rudimentary drawing and hit testing.
Carbon 2003-01-30
HTMLSample (HTML) (DMG) (ZIP)
Deprecated - Illustrates one way to use the HTMLRenderingLib Library.
Carbon 2003-01-30
HTMLUserPane (HTML) (DMG) (ZIP)
Deprecated - Shows how to display a HTMLRenderingLib object inside of a user pane control.
Carbon 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.
Carbon 2003-01-30
Icon Play (HTML) (DMG) (ZIP)
Demonstrates the use of icon utilities and popup control cdef in a program using modal dialogs.
Carbon 2003-01-30
IconUtilCheck (HTML) (DMG) (ZIP)
Shows how to determine whether the Icon Utilities are available.
Carbon 2003-01-30
ictbSample (HTML) (DMG) (ZIP)
Deprecated - Shows an example of ictb resource.
Carbon 2003-01-30
ImageBrowserView (HTML) (DMG) (ZIP)
Implementing a simple HIView subclass
Carbon 2005-06-01
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Carbon 2005-06-01
ImageMapView (HTML) (DMG) (ZIP)
Demonstrates how to add Accessibility to a complex custom HIView and the related parts of an application.
Carbon 2005-10-17
InkSample (HTML) (DMG) (ZIP)
Demonstrates some usage scenarios for the Ink.Framework APIs.
Carbon 2003-10-27
iTunesController (HTML) (DMG) (ZIP)
iTunesController allows you to control iTunes without having to bring it to the foreground.
Carbon 2006-02-23
kcapApp (HTML) (DMG) (ZIP)
Demonstrates drawing the key caps, given a set of modifiers and KCHR and KCAP resource IDs.
Carbon 2003-01-30
KeyMapTest (HTML) (DMG) (ZIP)
Uses Pascal to display a KeyMap representation whenever keys are pressed.
Carbon 2003-01-30
KillEveryOneButMe (HTML) (DMG) (ZIP)
Demonstrates how to terminate all other processes.
Carbon 2005-08-24
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Carbon 2003-01-14
LittleArrowsShowcase (HTML) (DMG) (ZIP)
How to increment and decrement the LittleArrows value when the user clicks on the up and down buttons.
Carbon 2006-11-09
Live Scroll (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implementing live scrolling during the tracking of scroll bar thumbs.
Carbon 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.
Carbon 2003-01-30
LoginItemsAE (HTML) (DMG) (ZIP)
Uses Apple events to manipulate the list of login items (items launched when you log in).
Carbon 2005-10-17
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Carbon 2003-11-19
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Carbon 2007-09-27
MemoryBasedBundle (HTML) (DMG) (ZIP)
Shows how to execute Mach-O code from memory, much like GetMemFragment in CFM.
Carbon 2005-08-10
MenuViews (HTML) (DMG) (ZIP)
Demonstrates a variety of interesting uses of HIView-based menus in Mac OS X 10.3.
Carbon 2003-10-24
MLTE_CustomScrolling (HTML) (DMG) (ZIP)
Shows how to implement MLTE's custom scrolling functionality
Carbon 2004-10-15
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Carbon 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Carbon 2003-01-14
MoreAppleEvents (HTML) (DMG) (ZIP)
Provides routines that assist with the creation and sending of Apple events and object descriptors.
Carbon 2003-01-14
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
Carbon 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
Carbon 2005-05-13
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Carbon 2003-10-27
MoreOSL (HTML) (DMG) (ZIP)
C library for implementing AppleScript support within your application.
Carbon 2003-01-14
MouseTracking (HTML) (DMG) (ZIP)
Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Carbon 2005-06-01
MPFileCopy (HTML) (DMG) (ZIP)
Demonstrates how to copy a folder and its contents using the HFS Plus APIs from an MP task.
Carbon 2003-01-14
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
Carbon 2003-11-18
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Carbon 2003-01-14
NewCCursor (HTML) (DMG) (ZIP)
Deprecated - Shows how to create a black and white 'CURS' and a color 'crsr' cursor resource by hand.
Carbon 2003-01-14
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Carbon 2003-01-14
NoSound (HTML) (DMG) (ZIP)
Illustrates how to install a procedure to be executed when the user restarts or shuts down.
Carbon 2003-01-30
NSLMiniBrowser (HTML) (DMG) (ZIP)
Deprecated - Uses the NSL API to find network services using SLP, NBP, and Directory Services.
Carbon 2003-01-14
ODOC (HTML) (DMG) (ZIP)
Illustrates how to send an open document ('odoc') Apple event to another application process.
Carbon 2003-01-14
OT Virtual Server (HTML) (DMG) (ZIP)
Deprecated - Sample code which uses Open Transport and demonstrates real world issues.
Carbon 2003-01-14
OTEndpointInfo (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to query an endpoint for its 'vital statistic' using OTGetEndpointInfo.
Carbon 2003-08-20
OTLookupNameTest (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to lookup NBP entities on an AppleTalk network using Open Transport.
Carbon 2003-01-14
OTMP (HTML) (DMG) (ZIP)
Deprecated - A library for calling Open Transport synchronously from preemptively scheduled tasks (MP tasks).
Carbon 2003-07-22
OTPingSample (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implement ping on top of the Open Transport API.
Carbon 2003-07-22
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Carbon 2003-03-12
Palette and GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of palette and color tables with GWorlds.
Carbon 2003-10-10
Password (HTML) (DMG) (ZIP)
Deprecated - Illustrates three different ways to implement password fields in dialogs.
Carbon 2003-01-30
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Carbon 2005-08-10
PDEProject (HTML) (DMG) (ZIP)
Deprecated - Demonstrates an application-hosted printing dialog extension (PDE) that displays a custom pane in the Print dialog.
Carbon 2003-01-14
Play Video Sample (HTML) (DMG) (ZIP)
Deprecated - The sample makes use of the RequestVideo sample code API.
Carbon 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.
Carbon 2006-07-18
PMPrinterTest (HTML) (DMG) (ZIP)
Demonstrates using the PMPrinter APIs to obtain information about the connected printers.
Carbon 2009-02-13
PopUpMenuWithCurFont (HTML) (DMG) (ZIP)
Deprecated - Demonstrates what must be done to control the font used by MDEF 0 during PopUpMenuSelect.
Carbon 2003-01-30
PreLoginAgents (HTML) (DMG) (ZIP)
Pre-login launchd agents to display UI using AppKit and HIToolbox.
Carbon 2007-10-26
Process (HTML) (DMG) (ZIP)
A simple demonstration of the Process Manager API.
Carbon 2003-10-30
ProfileSystem (HTML) (DMG) (ZIP)
Shows how to obtain the same information that System Profiler displays.
Carbon 2005-05-05
PThreadSorts (HTML) (DMG) (ZIP)
Applies various sorting algorithms to pictures using POSIX threads (pthreads) on Mac OS X.
Carbon 2003-01-14
PutAwayVolumes (HTML) (DMG) (ZIP)
Deprecated - Demonstrates several ways to unmount a volume and which contexts might require which techniques.
Carbon 2003-01-14
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Carbon 2003-05-15
QTCarbonCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render QuickTime Movies using Core Image filters and the new video pipeline.
Carbon 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.
Carbon 2009-03-19
QTMetaData (HTML) (DMG) (ZIP)
Demonstrates the QuickTime 7 MetaData APIs in a Carbon application.
Carbon 2009-03-16
qtshell (HTML) (DMG) (ZIP)
Simple QuickTime and QuickTime VR viewer framework.
Carbon 2003-10-27
qtshellCEvents (HTML) (DMG) (ZIP)
A Carbon event based movie viewer framework which demonstrates how to incorporate movie support into an application.
Carbon 2003-01-14
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Carbon 2007-08-31
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Carbon 2007-06-21
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Carbon 2006-09-11
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Carbon 2005-06-01
QuartzShapes (HTML) (DMG) (ZIP)
Example Quartz functions that implement equivalents to the QuickDraw PaintArc, FrameArc, PaintOval, FrameOval, PaintRect, and FrameRect
Carbon 2005-03-08
QuickTimeMovieControl (HTML) (DMG) (ZIP)
Demonstrates how to easily add QuickTime media playback to an application
Carbon 2005-08-10
ReadLocation (HTML) (DMG) (ZIP)
Retrieves the Map control panel settings for longitude and latitude and the time offset from GMT.
Carbon 2003-01-30
RecentItems (HTML) (DMG) (ZIP)
Implements "Recent items" menu(s)
Carbon 2006-10-09
RecordAudioToFile (HTML) (DMG) (ZIP)
Demonstrates recording audio to an AAC file using Core Audio
Carbon 2007-02-27
ReKeyTrans (HTML) (DMG) (ZIP)
Shows how to patch KeyTrans to ignore dead-key processing so you type fancy accented characters.
Carbon 2003-01-30
resolveRelativeAlias (HTML) (DMG) (ZIP)
Demonstrates the steps involved in creating and resolving a relative alias.
Carbon 2003-01-14
ROMResourceDump (HTML) (DMG) (ZIP)
Deprecated - Illustrates how to copy all resources in the Macintosh's ROM into a file.
Carbon 2003-01-30
SampleCMPlugIn (HTML) (DMG) (ZIP)
A contextual menu plugIn for Mac OS X.
Carbon 2006-10-09
SampleScannerApp (HTML) (DMG) (ZIP)
This project implements a simple client accessing an ICA scanning device.
Carbon 2008-05-07
Scrap Parsing (HTML) (DMG) (ZIP)
Deprecated - Shows how to parse the in-memory scrap.
Carbon 2003-01-30
ScrollAndZoom (HTML) (DMG) (ZIP)
An illustration of the use of the Context Transformation Matrix (CTM) for zooming and scrolling a HIView.
Carbon 2005-08-10
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.
Carbon 2005-06-06
SeeMyFriends (HTML) (DMG) (ZIP)
Illustrates how to use SyncServices API in a Carbon (HLTB) based application
Carbon 2006-10-16
SetCustomIcon (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set a custom icon for a file, folder, or disk.
Carbon 2006-08-01
SetIndString (HTML) (DMG) (ZIP)
Implements SetIndString(), which sets a particular STR# string to the passed in string. Similar to GetIndString()
Carbon 2003-01-30
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Carbon 2006-11-28
SetWindBackColor (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set the background color of a window without flicker without the Appearance Manager.
Carbon 2003-01-30