Contents

Introduction to Carbon-Cocoa Integration Guide

Explains how to use both Carbon and Cocoa in developing an application.

Who Should Read This Document?

This document assumes you are programming for Cocoa in Objective-C and does not discuss Java integration issues. To get the full benefit of this document, you should have experience programming in either the Cocoa or Carbon environment and you should also have some basic knowledge of the other environment. The See Also section contains a list of documents to help you gain this knowledge.

Organization of This Document

You should be familiar with a few fundamental concepts before you begin to integrate Cocoa and Carbon in the same application. These concepts are covered in the following articles:

Carbon and Cocoa User Interface Communication discusses how Mac OS X communicates user events between Carbon and Cocoa application environments.

Preprocessing Mixed-Language Code lists filename extensions you can use when you mix programming languages in a project.

Interchangeable Data Types provides information on Foundation (Cocoa) and Core Foundation (Carbon) data types you can use interchangeably.

Using Carbon and Cocoa in the Same Application provides a brief overview of how to combine Carbon and Cocoa code in an application. Includes a discussion of C-callable wrapper functions.

The concepts discussed in the preceding articles are put into practice in the sample code provided in these articles:

Using Cocoa Functionality in a Carbon Application describes how to use Cocoa functionality unrelated to the user interface in a Carbon application.

Using Carbon Functionality in a Cocoa Application describes how to use Carbon functionality unrelated to the user interface in a Cocoa application.

Using a Cocoa User Interface in a Carbon Application describes tasks you must perform to enable a Cocoa user interface to work properly in Carbon.

Using a Carbon User Interface in a Cocoa Application describes tasks you must perform to enable a Carbon user interface to work properly in Cocoa.

HICocoaView: Using Cocoa Views in Carbon Windows describes how HICocoaView, introduced in Mac OS X v10.5, makes it possible to use Cocoa views in a Carbon window.

Using Cocoa in a Navigation Services Dialog describes how Carbon applications using Navigation Services in Mac OS X v10.5 can directly access features in the Cocoa classes NSOpenPanel and NSSavePanel .

See Also

For additional information on developing for Mac OS X, especially in Cocoa and Carbon, see the following documents:

Tools & Languages Starting Point provides a guided introduction and learning path for developers new to Apple’s integrated development environment (IDE).

Mac Technology Overview provides an orientation to the technologies available in Mac OS X, with links to relevant documentation. Appendix A, “Mac OS X Frameworks,” lists the frameworks available to Mac OS X developers.

Advanced Memory Management Programming Guide addresses the object-ownership policy and related techniques for creating, copying, retaining, and disposing of objects.

Next

Copyright © 2002, 2007 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2007-10-31