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
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
MyCustomColorPicker (HTML) (DMG) (ZIP)
Shows how to write a custom color picker using Cocoa.
Graphics & Imaging 2006-10-09
MyMovieFilter (HTML) (DMG) (ZIP)
How to play a movie into a layer-backed QTMovieView and apply a Core Image filter while the movie plays.
Graphics & Imaging 2008-06-02
MyPhoto (HTML) (DMG) (ZIP)
Demonstrates preferred techniques for working with the Image Capture APIs
Graphics & Imaging 2005-06-01
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Graphics & Imaging 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.
Graphics & Imaging 2003-01-14
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Graphics & Imaging 2004-12-01
NSOpenGL Fullscreen (HTML) (DMG) (ZIP)
Demonstrates how to create and switch between windowed and fullscreen OpenGL contexts using NSOpenGL.
Graphics & Imaging 2004-02-11
NURBSSurfaceVertexProg (HTML) (DMG) (ZIP)
Uses a vertex program to compute the vertex position for a NURB surface.
Graphics & Imaging 2003-07-07
OpenGL Filter Basics Cocoa (HTML) (DMG) (ZIP)
How to use Objective-C and MVC design patterns in installing and utilizing filters in an OpenGL rendering pipeline
Graphics & Imaging 2008-02-06
OpenGL Screensaver (HTML) (DMG) (ZIP)
Demonstrates how to integrate OpenGL drawing into a standard Cocoa screen saver on Mac OS X.
Graphics & Imaging 2003-12-10
OpenGLCaptureToMovie (HTML) (DMG) (ZIP)
How to capture the screen on Mac OS X using OpenGL and save to a QuickTime movie.
Graphics & Imaging 2007-08-30
OpenGLCompositorLab (HTML) (DMG) (ZIP)
Demonstrates using OpenGL to composite multiple sources in hardware. Requires NVIDIA GeForce 4 Ti hardware.
Graphics & Imaging 2003-04-21
OpenGLScreenSnapshot (HTML) (DMG) (ZIP)
Demonstrates how to get the screen pixels using OpenGL and save them to an image file.
Graphics & Imaging 2008-08-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
PBORenderToVertexArray (HTML) (DMG) (ZIP)
This sample demonstrates render-to-vertex-array using FBO, PBO, and VBO.
Graphics & Imaging 2006-10-02
PDEProject (HTML) (DMG) (ZIP)
Deprecated - Demonstrates an application-hosted printing dialog extension (PDE) that displays a custom pane in the Print dialog.
Graphics & Imaging 2003-01-14
PDF Annotation Editor (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to examine, edit, and create PDF annotations.
Graphics & Imaging 2006-07-31
PDF Calendar (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to create PDF content.
Graphics & Imaging 2006-07-31
PDFKitLinker2 (HTML) (DMG) (ZIP)
Demonstrates many aspects of PDFKit including navigation, display modes, searching, and PDFView subclassing.
Graphics & Imaging 2005-08-10
PictureTaker (HTML) (DMG) (ZIP)
Demonstrates the PictureTaker in a basic Cocoa application
Graphics & Imaging 2007-04-02
PinBallHighScores (HTML) (DMG) (ZIP)
Demonstrates use of Quartz Composer for displaying data within an application
Graphics & Imaging 2007-06-11
Play Video Sample (HTML) (DMG) (ZIP)
Deprecated - The sample makes use of the RequestVideo sample code API.
Graphics & Imaging 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.
Graphics & Imaging 2006-07-18
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Graphics & Imaging 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Graphics & Imaging 2006-08-07
QTCarbonCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render QuickTime Movies using Core Image filters and the new video pipeline.
Graphics & Imaging 2006-02-14
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
Graphics & Imaging 2005-07-19
QTCoreVideo101 (HTML) (DMG) (ZIP)
Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.
Graphics & Imaging 2008-04-24
QTCoreVideo102 (HTML) (DMG) (ZIP)
An application demonstrating the use of QTKit, CoreVdeo, and OpenGL.
Graphics & Imaging 2008-06-06
QTCoreVideo103 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.
Graphics & Imaging 2008-06-06
QTCoreVideo201 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.
Graphics & Imaging 2008-06-06
QTCoreVideo202 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL PBO and the Core Video pixel buffer pipeline.
Graphics & Imaging 2009-04-07
QTCoreVideo301 (HTML) (DMG) (ZIP)
Demonstrates adding of effects & filters to QuickTime Movies in realtime using GLSL shaders and the Core Video texture pipeline.
Graphics & Imaging 2009-04-07
QTPixelBufferVCToCGImage (HTML) (DMG) (ZIP)
Demonstrates using QTPixelBufferContextCreate with NewMovieFromProperties to output pixel buffers from a movie and draw them.
Graphics & Imaging 2006-07-07
QTQuartzPlayer (HTML) (DMG) (ZIP)
QTQuartzPlayer demonstrates how to render QuickTime Movies and live video with OpenGL and CoreVideo.
Graphics & Imaging 2005-10-04
qtshell (HTML) (DMG) (ZIP)
Simple QuickTime and QuickTime VR viewer framework.
Graphics & Imaging 2003-10-27
QTtoCG (HTML) (DMG) (ZIP)
Shows how to create a CGImageRef with the proper ColorSync profile from a QuickTime image on disk.
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
Quartz Composer Live DV (HTML) (DMG) (ZIP)
Shows how to export a Quartz Composer composition as a real-time DV stream on the FireWire port.
Graphics & Imaging 2005-06-01
Quartz Composer Matrix (HTML) (DMG) (ZIP)
Shows how to use Quartz Composer to display a QuickTime movie as a series of frames in a 3D world.
Graphics & Imaging 2005-06-01
Quartz Composer Offline Rendering (HTML) (DMG) (ZIP)
Shows how to render a Quartz Composer composition as a series of images using an OpenGL pBuffer.
Graphics & Imaging 2005-06-01
Quartz Composer QCTV (HTML) (DMG) (ZIP)
Shows how to build a fake TV system using Quartz Composer as the foundation motion graphics.
Graphics & Imaging 2005-07-06
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 TextEdit (HTML) (DMG) (ZIP)
Demonstrate how to modify TextEdit's about dialog to display a Quartz Composer composition.
Graphics & Imaging 2005-06-01
Quartz EB (HTML) (DMG) (ZIP)
WWDC 2001 Early Bird Quartz 2D tutorial of vector drawing and PDF import/export.
Graphics & Imaging 2003-01-14
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Graphics & Imaging 2006-09-11
QuartzCache (HTML) (DMG) (ZIP)
Demonstrates several caching techniques using CGBitmapContext, CGImageRef re-use, CGLayerRefs, CGImageSource.
Graphics & Imaging 2005-06-01
QuartzComposerSamplePatches (HTML) (DMG) (ZIP)
A short list of new patches in Quartz Composer Mac OS X 10.5
Graphics & Imaging 2007-06-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
Reducer (HTML) (DMG) (ZIP)
Simple utility for rescaling bitmapped images. Demonstrates use of Core Image, NSAnimation, view drawing redirection.
Graphics & Imaging 2005-06-06
RGB ValueTransformers (HTML) (DMG) (ZIP)
Supersedes the "RGB Image sample". Sample now uses bindings. Color separation now done in an NSValueTransformer subclass.
Graphics & Imaging 2003-11-18
SampleScannerApp (HTML) (DMG) (ZIP)
This project implements a simple client accessing an ICA scanning device.
Graphics & Imaging 2008-05-07
SetCustomIcon (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set a custom icon for a file, folder, or disk.
Graphics & Imaging 2006-08-01
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
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Graphics & Imaging 2008-08-29
StillMotion (HTML) (DMG) (ZIP)
Demonstrates how to use the QTKit Capture APIs to build a simple application that creates stop motion animations.
Graphics & Imaging 2007-11-14
StyleFlatteningSample (HTML) (DMG) (ZIP)
Shows how to use the ATSUFlatten and ATSUUnflatten APIs.
Graphics & Imaging 2003-01-14
SurfaceVertexProgram (HTML) (DMG) (ZIP)
Vertex program that demonstrates the use of a UV mesh to draw an implicit surface.
Graphics & Imaging 2003-07-07
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
TexturePerformanceDemo (HTML) (DMG) (ZIP)
OpenGL texture optimization demo for WWDC Session 214
Graphics & Imaging 2005-06-01
TextureRange (HTML) (DMG) (ZIP)
Shows the fundamental techniques required to fast texture upload performance.
Graphics & Imaging 2003-07-16
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
UnsharpMask (HTML) (DMG) (ZIP)
Demonstrates how to build Automator actions using Cocoa frameworks.
Graphics & Imaging 2005-06-06
VBL (HTML) (DMG) (ZIP)
A simple example of how to create an OpenGLView in AppKit.
Graphics & Imaging 2003-07-07
Vertex Optimization (HTML) (DMG) (ZIP)
Shows examples of optimized vertex throughput.
Graphics & Imaging 2003-07-07
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Graphics & Imaging 2005-06-01
VertexPerformanceTest (HTML) (DMG) (ZIP)
A tool that measures triangle throughput and allows comparison of different methods.
Graphics & Imaging 2003-01-14
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Graphics & Imaging 2007-05-14
VideoViewer (HTML) (DMG) (ZIP)
Simple example of video rendering using QuickTime visual contexts, OpenGL, Core Video and Core Image.
Graphics & Imaging 2005-08-01
WebKitCIPlugIn (HTML) (DMG) (ZIP)
This sample WebKit plugin for Safari demonstrate how to use CoreImage in a HTML page.
Graphics & Imaging 2005-11-28
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
Graphics & Imaging 2008-05-09
Worm (HTML) (DMG) (ZIP)
NSView performance demonstration. Uses a periodic timer to get best performance with Coalesced Update feature.
Graphics & Imaging 2005-06-01
AppleFWAudio Vendor Specific Override Driver (HTML) (DMG) (ZIP)
This KEXT allows third-party vendors to customize AppleFWAudio with their own device-specific information.
Hardware & Drivers 2007-06-01
AudioCDSample (HTML) (DMG) (ZIP)
Demonstrates how to discover audio CDs and access the TOC information presented by the CD-DA filesystem.
Hardware & Drivers 2005-10-04
BlitVBL (HTML) (DMG) (ZIP)
Shows how to have Mac OS X try its best to sync to the VBL for you.
Hardware & Drivers 2003-01-14
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Hardware & Drivers 2003-06-12
CD-ROM Detection (HTML) (DMG) (ZIP)
Shows how to determine whether a drive is a CD-ROM drive.
Hardware & Drivers 2003-01-14
CDROMSample (HTML) (DMG) (ZIP)
Demonstrates how to find CD-ROM media and read sectors from that media on Mac OS X.
Hardware & Drivers 2006-01-31
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Hardware & Drivers 2007-10-22
CPUGestalt (HTML) (DMG) (ZIP)
Deprecated - Shows how to determine the processor type of the Macintosh you're running on.
Hardware & Drivers 2003-10-27
CustomMediaIcons (HTML) (DMG) (ZIP)
Providing custom media icons for storage
Hardware & Drivers 2007-07-10
dist_fft (HTML) (DMG) (ZIP)
Gigaelement FFTs on Apple G5 clusters
Hardware & Drivers 2004-08-23
enetlognke (HTML) (DMG) (ZIP)
Interface filter based on supported Kernel Programming Interfaces for Tiger.
Hardware & Drivers 2005-08-10
GetHWEthernetAddr (HTML) (DMG) (ZIP)
Deprecated - Shows how to obtain the hardware Ethernet address of a machine.
Hardware & Drivers 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.
Hardware & Drivers 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.
Hardware & Drivers 2005-10-27
GetSetOptions (HTML) (DMG) (ZIP)
Demonstrates a variety of uses of Open Transport's option management routines.
Hardware & Drivers 2003-01-14
GridCalendar (HTML) (DMG) (ZIP)
Demonstrates how to add a custom job submission UI to the GridSample project.
Hardware & Drivers 2005-06-01
HID Config Save (HTML) (DMG) (ZIP)
Human Interface Device Manager Configuration sample
Hardware & Drivers 2008-05-07
HID Manager Basics (HTML) (DMG) (ZIP)
Shows basic use of HID Manager for Mac OS X: including device discovery, queues and polling elements.
Hardware & Drivers 2003-07-10
HID Utilities Source (HTML) (DMG) (ZIP)
Shows a high level abstract library for the HID manager.
Hardware & Drivers 2003-10-06
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Hardware & Drivers 2003-01-14