Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Carbon (API)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Cocoa and Carbon=== In order to offer a real and well supported upgrade path for existing Mac OS code bases, Apple introduced the Carbon system. Carbon consists of many libraries and functions that offer a Mac-like API, but running on top of the underlying Unix-like OS, rather than a copy of the Mac OS running in emulation. The Carbon libraries are extensively cleaned up, modernized and better "protected". While the Mac OS was filled with APIs that shared memory to pass data, under Carbon all such access was re-implemented using [[mutator method|accessor]] [[subroutine]]s on [[opaque data type]]s. This allowed Carbon to support true [[Computer multitasking|multitasking]] and [[memory protection]], features Mac developers had been requesting for a decade. Other changes from the pre-existing API removed features which were conceptually incompatible with Mac OS X, or simply obsolete. For example, applications could no longer install [[interrupt handler]]s or [[device driver]]s. In order to support Carbon, the entire Rhapsody model changed. Whereas Rhapsody would effectively be OpenStep with an emulator, under the new system both the OpenStep and Carbon API would, where possible, share common code. To do this, many of the useful bits of code from the lower-levels of the OpenStep system, written in Objective-C and known as Foundation, were re-implemented in pure C. This code became known as [[Core Foundation]], or CF for short. A version of the Yellow Box ported to call CF became the new [[Cocoa (API)|Cocoa]] API, and the Mac-like calls of Carbon also called the same functions. Under the new system, Carbon and Cocoa were peers. This conversion would normally have slowed the performance of Cocoa as the object methods called into the underlying C libraries, but Apple used a technique they called ''toll-free [[Bridging (programming)|bridging]]'' to reduce this impact.<ref>{{cite web |title=Concepts in Objective-C Programming: Toll-Free Bridging |date=2012 |url=https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html |website=developer.apple.com |access-date=2017-05-08}}</ref> As part of this conversion, Apple wrote a new window server and [[2D computer graphics|graphics engine]] from scratch to replace the licence-encumbered [[Display PostScript]]: the [[Quartz (graphics layer)|Quartz]] (which has been called "Display PDF").<ref>{{cite web |last=Siracusa |first=John |date=2000 |url=http://archive.arstechnica.com/reviews/1q00/macos-x-gui/macos-x-gui-4.html |title=Mac OS X Update: Quartz & Aqua |website=archive.arstechnica.com |access-date=2017-05-08}}</ref> Quartz provided C API calls that could be used from either Carbon or Cocoa. The underlying operating system itself was further isolated and released as [[Darwin (operating system)|Darwin]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Carbon (API)
(section)
Add topic