You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is
highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If
there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.

CHBrowserView

Goals:

Provide a Cocoa NSView for embeddors - this is done with
CHBrowserView.

Native widgets - a native Cocoa app is going to want native
widgetry

Buildable from ProjectBuilder - we will provide a Cocoa
framework for Gecko

Topics:

Building

Embedding

Building

To build the standalone mozilla with the Cocoa widget library:

1. Follow the instructions on the FizzillaMach build page
for setup, pulling and building.

2. Create a file called .mozconfig in your mozilla
directory. In it, put the following line

ac_add_options --enable-default-toolkit=cocoa

3. Configure, and build again. This will replace the
Carbon widget implementation with Cocoa.

% ./configure
% make -f client.mk build

Once you've done that, things get more interesting. We next move
to building the embedded test app for Cocoa.

1. Build embed.jar

% cd embedding/config

% make

2. Build the mozilla framework for embedding with
ProjectBuilder. Note that this is a ProjectBuilder 2.0
project and may not work in ProjectBuilder 1.x on OSX
10.1.5

Double-click
mozilla/embedding/browser/cocoa/src/NSBrowserView.pbproj

Click the build button

3. Enjoy!

Embedding

<More to come on how this actually works>

There are three parts to the Cocoa effort:

Widget/GFX impemented in Cocoa

An CHBrowserView that subclasses NSView and wraps all of
Gecko

The Cocoa-based embedding application

Currently, only the widget library has been ported to Cocoa, and
not yet all of it. It works pretty well for embedded applications (like Camino). If you'd like to work on it,
the code lives in mozilla/widget/src/cocoa.