开发者

For Windows there is Win32 API, what about for Mac?

开发者 https://www.devze.com 2023-02-19 19:49 出处:网络
For Windows there is Win32 API, what about for Mac?On Wikipedia http://en.wikipedia.org/wiki/Cocoa_(API)

For Windows there is Win32 API, what about for Mac? On Wikipedia

http://en.wikipedia.org/wiki/Cocoa_(API)

it is said that Cocoa 开发者_StackOverflow社区is "one of" the API... what about the full story?


At what level? The low level API is largely but not entirely FreeBSD, and below that there is still a Mach API (some things still use Mach ports for IPC, I believe; at least, launchd supports them). At the upper level are two APIs: Cocoa and Carbon. Cocoa is the native API; Carbon is intended for programs ported from older MacOS. (Which includes parts of OSX itself; for a long time Finder was a Carbon app.)

The Windows situation isn't all that different, actually; there was for a long time a Win16 emulation API present in 32-bit Windows, and in the early days of Windows NT it had both POSIX and 16-bit OS/2 APIs.


That pretty much is the full story. Mac OS X does support other APIs, but they're either deprecated (Carbon), or intended primarily to support "foreign" software (Java, X11, POSIX). The native API is Cocoa.


Mac OS X is Unix underneath. That's the "other" API.

0

精彩评论

暂无评论...
验证码 换一张
取 消