Version 1 (modified by rme, 14 years ago) (diff)


CCL and Cocoa

Cocoa is Apple's name for the 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, although there are a few components written in other languages such as C for performance or compatibility reasons, such as Core Foundation. ![...]


CCL includes an Objective-C bridge that provides Lisp programs with complete access to the Cocoa frameworks.

Sample Code

CocoaBridge contains an example of how to create a window and draw into it.

GradientWindow builds on that 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 Apple's own Currency Converter example.