= CCL and Cocoa =
Cocoa is Apple's collection of frameworks, APIs, and accompanying runtimes that make up the development layer of Mac OS X. The Cocoa frameworks are primarily written in Objective-C, and support both 32-bit and 64-bit applications as well as Objective-C 2.0's garbage collection.
CCL includes an Objective-C bridge that provides Lisp programs with complete access to the Cocoa frameworks. On Intel Macintoshes, only 64-bit access is supported. CCL will support 32-bit access when our port to Intel-32 is complete. On Power PC Macintoshes, both 32-bit and 64-bit applications are supported.
== Sample CCL Code ==
CocoaBridge contains an example of how to create a window and draw into it.
[wiki:SimpleOpenGL] demonstrates trivial use of OpenGL from Cocoa.
GradientWindow builds on the red view example, and demonstrates the non-trivial use of CCL's foreign-function interface.
The main Cocoa framework contains Foundation, Application Kit (!AppKit), and Core Data. Other frameworks (such as Address Book and Web Kit) can be easily loaded into CCL as well. AddressBook presents some sample code that loads the Address Book framework and performs a simple search.
AppleCurrencyConverter shows how to use CCL to create a double-clickable application that is functionally identical to [http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/index.html Apple's own Currency Converter example].
See also: NoteAboutCocoaVersions, which explains that CCL Cocoa applications should survive Cocoa version changes pretty well.
== Cocoa Resources ==
Cocoa is a large application framework. The following resources can help you learn your way around Cocoa while programming it from CCL.
* [http://developer.apple.com/cocoa/index.html Apple's Cocoa Page] is the starting point for all the Cocoa resources produced by Apple.
* [http://cocoadevcentral.com/ Cocoa Dev Central] provides good step-by-step introductions to Objective C, Cocoa programming, and a number of specific Cocoa frameworks.
* Aaron Hillegass's [http://www.amazon.com/dp/0321503619 Cocoa Programming for Mac OS X] is the book everyone recommends for learning Cocoa. The newly released 3rd edition covers Objective C 2.0 (including garbage collection) and Cocoa frameworks that were introduced with Leopard, such as Core Animation.
* [http://homepage.mac.com/aglee/downloads/appkido.html AppKiDo] is a free easy-to-use structured documentation browser for Cocoa classes, methods, and frameworks.