Carbon (Apple)

from Wikipedia, the free encyclopedia

Carbon is a collection of application programming interfaces (APIs) from Apple , the parts of the of the Macintosh system software contained Macintosh Toolbox ( English Macintosh Toolbox ) provides. It was intended from the start as a bridging technology to make it as easy as possible for program developers at the time to prepare their Mac OS applications for the later Mac OS X. At the time of its introduction, Mac OS 8 was Apple's current operating system, Mac OS 9 and its successor and the new Mac OS X generation of operating systems were in development.

Mac OS X was renamed to OS X in 2012 without “Mac” in its name, and finally to macOS in 2016 . Carbon has not been further developed since 2007 and was therefore limited to 32-bit , but is part of the operating system until macOS Mojave (10.14, 2018). As of macOS 10.15 Catalina from 2019, carbon is completely missing, also because only 64-bit applications are generally supported.

Macintosh Toolbox

The Macintosh Toolbox , also known as the Macintosh construction kit, is that part of the function calls of the original Macintosh system (1984) that were stored in the ROM and thus permanently connected to the respective Macintosh computer. For a long time Apple had represented it in such a way that only an Apple computer could provide the graphical functions in this way.

The toolbox enables programmers to use the functions provided by the system software in order to easily create windows , menus , check boxes and dialog boxes created by the system (and thus also look uniform) and to control events . Functions of the Finder , which is not itself part of the Toolbox ROM, can also be used with the same type of function calls.

In the course of the development of the Macintosh system software , the programming interface (API) was continuously expanded, for example with QuickDraw and QuickTime . However, undocumented functions have also been removed. With System 7 (1991), the API previously programmed in Pascal was re-implemented in C , which made it easier to port the operating system from the m68k to the PowerPC architecture. In the course of the “Star Trek” project, work was also carried out on porting System 7 and thus also the programming interface it contained to x86 PCs, but this was not completed. Since many Macintosh user programs used undocumented functions for System 6 , the developers had to adapt them for System 7.

From 1997 onwards, Apple tried to switch to a completely new programming interface: the OpenStep API taken over by NeXT , which was further developed with the operating system project Rhapsody as Yellow Box and with Mac OS X as Cocoa . However, all existing Macintosh programs would have had to be completely rewritten. The manufacturers of application software that are indispensable for Apple indicated after WWDC 1997 that they would not accept this porting effort, whereupon Apple had to develop a largely source-code-compatible replacement for the Macintosh construction kit. This replacement is Carbon, which was introduced with Mac OS X and is also available for the classic Mac OS as CarbonLib. This meant that only minor adjustments to the source code were necessary so that an existing Macintosh program could be recompiled for the Carbon API , which can then run on both operating systems (Mac OS and Mac OS X).

Carbon

Carbon is based on the programming interfaces of the Macintosh toolbox ( English Macintosh Toolbox ) of the classic Macintosh system software (1984, from 1996 Mac OS ), minus those that have grown over time and are redundant, and those that have typical Mac OS X functions such as preemptive Multitasking and memory protection stood in the way. Out of around 8,000 functions on the classic Mac OS, around 2,000 functions were not taken over in Carbon. If a Mac OS program was written to use the Carbon library , it could run natively on both Mac OS and Mac OS X. The prerequisite, however, was that no Motorola 68k code was used, as Carbon was only available on the PowerPC architecture under Mac OS .

By using the carbon library, the developers had the advantage of being able to continue to use existing source code in large parts. The porting effort was therefore manageable, because for the more modern Cocoa API , which has its origin in the NeXT operating system NeXTStep , a very large proportion of the source code of the existing programs would have had to be rewritten. Many well-known programs were carbon programs for a long time, for example Adobe Photoshop up to version CS4 (end of 2008). Apple itself used carbon for some components of Mac OS X that already existed under Mac OS - for example, the Finder in Cocoa was only rewritten for Mac OS X Snow Leopard (10.6, 2009) . The front ends of iTunes and QuickTime Player for Mac OS 9, Mac OS X and Windows were also based on Carbon for a long time. Newly developed Apple programs such as The Safari browser for Mac OS X and Windows, for example, was based on the more modern Cocoa from the start.

The carbon library has been part of the operating system in Mac OS X since the first version ( public beta , 2000). Under Mac OS 8.1 to 9.2.2, the library, which was distributed for free download, has to be installed manually. In the opinion of a developer, however, Carbon can only be considered finished as of the version integrated in Mac OS X 10.2 (“Jaguar,” 2002). The last version of the CarbonLib is 1.6 and requires at least Mac OS 8.6 . CarbonLib 1.6.1 is included in the Classic environment and is automatically installed in the virtualized Mac OS 9.1 or newer.

Programs that used the carbon library and that could run on Mac OS and Mac OS X were mostly called carbonized applications (translated as “carbonized programs”). The term was not applied to later pure Mac OS X programs that used the carbon library.

64-bit console programs could already be executed in Mac OS X Tiger (10.4, 2005); with Mac OS X Leopard (10.5, 2007) Cocoa was 64-bit compatible. Since Mac OS X Snow Leopard (10.6, 2009) either a 32-bit or a 64-bit kernel could be started. As of OS X Mountain Lion (10.8, 2012), the operating system has been fully converted to 64-bit. Plans to make Carbon 64-bit compatible were dropped by Apple in 2007. While Mac OS X gradually transformed into a pure 64-bit operating system, the further development of Carbon has now been finally stopped, and old programs that still needed Carbon were limited to 32-bit. For this reason, among other things, Adobe Photoshop CS4 was already available as a 64-bit program under Windows, but was still a 32-bit program under Mac OS X. A dedicated development team was used to port Photoshop to Cocoa (C2C: Carbon to Cocoa). At the end of April 2010, Adobe finally released Photoshop CS5 as a 32- and 64-bit Cocoa application.

Carbon is not available on iOS , which has been available since 2007 . With the general loss of 32-bit support in macOS from version 10.15 (2019), Carbon, which does not support 64-bit, has been permanently removed.

literature

Web links

Individual evidence

  1. Ben Schwan: macOS 10.15: Dashboard gone, Aperture killed, Carbon and QuickTime dead. In: Heise online . 2nd May 2019 . Retrieved May 2, 2019 .; Quote: “32-bit apps and plugins are, that was already known, passé. MacOS 10.15 will also be unsightly for developers who still use the old classic API Carbon. Corresponding apps will no longer run. ".
  2. Inside Macintosh: Macintosh Toolbox Essentials (English, PDF, 6.2 MB), 1992, Apple Computer Inc .; accessed on March 8, 2016
  3. ^ MacOS X Files (English), Brian Kelley, transcript of Steve Jobs' keynote at WWDC 1998 on May 11, 1998; accessed on September 27, 2016.
  4. Rhapsody Timeline , accessed October 18, 2015.

    “Carbon is based on the application environment designed for Copland after developers had let it be known that they did not want to completely rewrite their apps for Copland (the same thing they would later say about Rhapsody). Carbon, though impressive in how it worked at WWDC 98, was far from being as ready as Apple had thought (many people didn't consider it usable until the release of Mac OS X v10.2 in August of 2002). "

  5. Macworld: Photoshop CS4 to be 64-bit for Windows, but not Mac (English) April 2, 2008, Jim Dalrymple, accessed March 26, 2015
  6. Blog: Getting Photoshop CS5 to 64-bit on Macintosh , March 14, 2011, Jeff Tranberry's blog, accessed on March 26, 2015