TwUI: Twitter’s Hardware Accelerated UI Toolkit

[Twitter open sources the Mac toolkit]( that they used to build the [Twitter Mac app]( (formerly known as Tweetie):

> Until now, there was not a simple and effective way to design interactive, hardware-accelerated interfaces on the Mac. Core Animation can create hardware-accelerated drawings, but doesn’t provide interaction mechanisms. AppKit and NSView have excellent interaction mechanisms, but the drawings operations are CPU-bound, which makes fluid scrolling, animations, and other effects difficult — if not impossible — to accomplish.

> UIKit on Apple’s iOS platform has offered developers a fresh start. While UIKit borrows many ideas from AppKit regarding interaction, it can offload compositing to the GPU because it is built on top of Core Animation. This architecture has enabled developers to create many applications that were, until this time, impossible to build.

[TwUI]( brings this idea back to the desktop:

> It is built on top of Core Animation, and it borrows interaction ideas from AppKit. It allows for all the things Mac users expect, including drag & drop, mouse events, tooltips, Mac-like text selection, and so on. And, since TwUI isn’t bound by the constraints of an existing API, developers can experiment with new features like block-based drawRect and layout.


Screen Shot Example Cell

This raises the question: why has Apple not yet hardware accelerated its AppKit?