Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Core Foundation

From Wikipedia, the free encyclopedia
C application programming interface in Mac OS X

Core Foundation
DeveloperApple Inc.
Repositorygithub.com/apple/swift-corelibs-foundation
Written inSwift,Objective-C,C
Operating system
TypeSystemlibrary
LicenseAPSL 2.0
Websitedeveloper.apple.com

Core Foundation (also calledCF) is aCapplication programming interface (API) written byApple Inc. for itsoperating systems, and is a mix of low-level routines andwrapper functions. Most Core Foundation routines follow a certain naming convention that deal with opaque objects, for example CFDictionaryRef for functions whose names begin with CFDictionary, and these objects are oftenreference counted (manually) throughCFRetain andCFRelease. Internally, Core Foundation forms the base of the types in theObjective-C standard library and theCarbon API.[1]

The most prevalent use of Core Foundation is for passing its own primitive types for data, including rawbytes,Unicodestrings,numbers,calendar dates, andUUIDs, as well as collections such asarrays,sets, anddictionaries, to numerous macOSC routines, primarily those that areGUI-related. At the operating system level Core Foundation also provides standardized application preferences management throughCFPropertyList,bundle handling,run loops,interprocess communication throughCFMachPort andCFNotificationCenter, and a basicgraphical user interface message dialog throughCFUserNotification.

Other parts of the API include utility routines and wrappers around existing APIs for ease of use. Utility routines perform such actions asfile system andnetworkI/O throughCFReadStream,CFWriteStream, andCFURL andendianness translation (Byte Order Utilities). Some examples of wrapper routines include those for Core Foundation's wrapper routines for Unix sockets, the CFSocket API.

Some types in Core Foundation are "toll-free bridged", or interchangeable with a simple cast, with those of theirFoundation Kit counterparts. For example, one could create aCFDictionaryRef Core Foundation type, and then later simply use a standard C cast to convert it to its Objective-C counterpart,NSDictionary *, and then use the desired Objective-C methods on that object as one normally would.

Core Foundation has a plug-in model (CFPlugin) that is based on theMicrosoftComponent Object Model.[2]

Open source availability

[edit]

Apple used to release most of CF as anopen-source project called CFLite that can be used to write cross-platform applications for macOS,Linux, andWindows.[3]

A third-party open-source implementation called OpenCFLite extends the Apple CFLite for building on 32-bitWindows andLinux environments. It is maintained by one of theWebKit developers, but was stalled by 2015.[4] The karaoke platform KJams maintains a fork since 2017. This version, by its programmer David M. Cotter, supports 64-bit systems and has a CFNetwork implementation withLibreSSL-based TLS.[5] A fork of OpenCFLite was created by Grant Erickson (an original collaborator with Brent Fulgham on the SourceForge version) in 2021[6] with a companion port of theCFHost portion of CFNetwork, as OpenCFNetwork.[7]

The Swift Corelib Foundation, a fallback version of theFoundation Kit for the Swift programming language for non-Apple platforms, contains a near-full version of the Core Foundation released underApache License 2.0.[8]

GNUstep includes a version of the Core Foundation called "libs-corebase".[9]

See also

[edit]

References

[edit]
  1. ^ridiculous_fish (2006)."Bridge".
  2. ^"Plug-ins and Microsoft's COM".Mac Developer Library. Apple Inc. Archived fromthe original on September 1, 2014. RetrievedMarch 25, 2015.
  3. ^"Source Browser".
  4. ^OpenCFLite project on SourceForge.
  5. ^"CFLite".KJams. RetrievedFebruary 19, 2020.
  6. ^"OpenCFLite project on GitHub".GitHub. RetrievedNovember 30, 2021.
  7. ^"OpenCFNetwork project on GitHub".GitHub. RetrievedNovember 30, 2021.
  8. ^"swift-corelibs-foundation".GitHub. October 14, 2021.
  9. ^"gnustep/libs-corebase: The GNUstep CoreBase Library is a library of general-purpose, non-graphical C objects".GitHub. GNUstep. November 19, 2019.

External links

[edit]
Products
Hardware
Mac
iPod
iPhone
iPad
Other
Software
Operating
systems
Services
Financial
Media
Communication
Retail
Support
Other
Companies
Subsidiaries
Acquisitions
Partnerships
Design andmarketing
Legal issues and
labour relations
Related
People
CEOs
Board chairs
Other
executives
Current
Former
Founders
  • Italics indicate discontinued products, services, or defunct companies.
  • Category
Versions
Mac OS X
OS X
macOS
Predecessors
Applications
Core
applications
Developer
Tools
Xcode
Former
Former
Utilities
Discontinued
Technologies,
user interface
Deprecated
Discontinued
  • Italics denote upcoming products.
  •  Category
Retrieved from "https://en.wikipedia.org/w/index.php?title=Core_Foundation&oldid=1305043813"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp