Source code directories overview

  • Revision slug: Source_code_directories_overview
  • Revision title: Source code directories overview
  • Revision id: 67782
  • Created:
  • Creator: Swaroopch
  • Is current revision? No
  • Comment

Revision Content

This document is a guide for developers to the directory structure of the Mozilla source code tree. It gives a bird's eye view of the source code so a developer can get a good idea what is in Mozilla and where to find things. It is a good document for a new Mozilla developer to start learning about the Mozilla code base.

This document contains material for SeaMonkey, Firefox, and Toolkit.

It is a living document which is (supposed to be) updated monthly according to changes in the Mozilla source tree.

See also similar information on the Mozilla Developer Center, Mozilla Source Code Directory Structure.

Introduction: Common Subdirectories

A common naming scheme is used throughout the Mozilla source trees. At the top level is the name of the product (e.g. seamonkey). At the second level is the name of the module (e.g. the editor directory in seamonkey). The third level is where the common naming scheme usually takes over. Many third level directories contain the base, the public and the idl directories. Although not required, these common names are typically used for a common purpose. If files can be grouped into submodules, they are usually put in their own third level directory and given a unique name (e.g. txmgr in the editor directory in seamonkey). Beneath this third level directory, there may be fourth level base, public and idl directories. Thus, the scheme is recursive; it can apply to submodules, sub-submodules and so on.

  • base contains the basic (core) functionality for the module. Base contains all the source code that cannot be categorized into a submodule.
  • build contains any special makefiles for building the particular module.
  • doc contains any documentation associated with this module.
  • idl contains the XPIDL (Cross Platform Interface Definition Language) interface files. Interfaces are used so functionality can be available to both Javascript scripts and C code with as little effort as possible. XPIDL files have their own mini-language and processing tools.
  • public contains source code that will be exported to the dist/include directory. They are not all necessarily public in the general sense; some are only meant for internal use in a certain module. As more code is written with or converted to XPIDL interfaces, the value of the public directory diminishes.
  • src contains the bulk of the source code.
  • tests contains C harnesses, HTML or XUL that exercise this module.
  • tools contains scripts for automatically generating certain source code and other special tools for building this module.

There are also platform dependent subdirectories which contain source code for specific platforms.

  • windows contains source code for Windows 95, Windows 98 and Windows NT 4.0.
  • mac contains source code for MacOS: both the PowerPC and 68000 versions.
  • gtk contains source code for GTK (a.k.a. the GIMP Toolkit) which runs on X-Windows on Unix.
  • motif contains source code for Motif, a toolkit which runs on X-Windows on Unix.
  • os2 contains source code for OS/2 Warp.
  • rhapsody contains source code for Mac OS X Server (which is based on NeXTStep which is based on X-Windows on Unix) using Yellow Box (Cocoa).
  • beos contains source code for BeOS.
  • qt contains source code for the QT toolkit, a C class library which runs on X-Windows on Unix, Windows 95, Windows 98 and Window NT 4.0.
  • photon contains source code for Photon, a microkernel windowing system used in several real-time operating systems from QNX Software Systems Ltd.

SeaMonkey

SeaMonkey is the development name for the Mozilla browser suite.

  • accessible contains code to support Microsoft Active Accessibility and Sun's ATK accessibility API for Linux.
  • browser contains the code for Firefox. This will be covered below.
  • build contains scripts (usually Perl) and programs used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of the dist directory.
  • calendar contains the code for the various Mozilla calendar apps and extensions.
  • caps contains C interfaces and code for determining the capabilities of content based on the security settings and certificates (e.g. Verisign).
  • chrome contains the toolkit chrome registry.
  • config contains scripts and programs used by Mozilla developers to manipulate the code base and to perform special actions inside makefiles. These programs are used for code level things instead of build level things (which are a stored in the build directory).
  • content was split off from layout and contains objects as they are exposed to the DOM.
  • db contains C code for the mdb/Mork database which is a low-level, general-purpose and cross-platform file library. It is used to store mail box data, news data and global history data. It has not been updated to support XPCOM yet. This code originated in the Mozilla Classic code base.
  • dbm contains C code for managing, reading and writing hash tables. It is used for the auto-completion feature on the URL edit box (stored in netscape.hst in Mozilla Classic) and for the cached pages index (stored in fat.db in Mozilla Classic). This code originated at UC Berkeley.
  • directory contains the LDAP SDK.
  • docshell contains C interfaces and code for loading and displaying a single web page (e.g. scroll). The {{mediawiki.external('#seamonkey-embedding embedding')}} code wraps this code with higher level browser functions like forward, back and history.
  • dom contains C interfaces and code for implementing and tracking DOM (Document Object Model) objects in Javascript. It forms the C substructure which creates, destroys and manipulates built-in and user-defined objects according to the Javascript script. For example, if the Javascript script adds a user-defined attribute to the document (e.g. document.goofy = 1), this code will create the "goofy" node, put it on the "document" node and manipulate it according to any later Javascript commands.
  • editor contains C interfaces, C code and XUL for the embeddable editor component which can edit both plain text and HTML. It is used for the HTML editor (i.e. Composer in Mozilla Classic), for plain text and HTML mail composition and for text fields and text areas throughout the product. The editor is designed like a "browser window with editing features" with extra classes for editing text and managing undo/redo.
  • embedding contains C interfaces and code for generic high-level browser functions (e.g. forward, back, history). The {{mediawiki.external('#seamonkey-webshell webshell')}} code wraps these interfaces according to the particular platform and way (e.g. ActiveX) that is being supported.
  • extensions contains C interfaces, C code, XUL and Javascript code for various add-ins that are related to browsing. These include: cookies, IRC, wallet, DOM Inspector, P3P, schema validation, spellchecker, transformiix, typeaheadfind, JavaScipt debugger, XForms, etc.
  • gc contains C code for the Boehm garbage collector. It is not used in the final product: it is used to find memory leaks and track memory usage during development. This code originated from code written by Hans-J. Boehm with support from National Science Foundation, DARPA, Xerox and SGI (at various times).
  • gfx contains C interfaces and code for platform independent drawing and imaging. It can be used to draw rectangles, lines, images, etc. Essentially, it is a a set of interfaces for a platform-independent device (drawing) context. It does not handle widgets or specific drawing routines; it just provides the primitive operations for drawing.
  • intl contains C interfaces and code for supporting localization. It contains code for various character sets, locale formats (e.g. the format of the date and time for different cultures) and other localization facilities.
  • ipc contains
  • jpeg contains C code for reading/writing JPEG images. This code originated as the reference implementation for the JPEG specification from the Independent JPEG Group.
  • js contains C code for tokenizing, parsing, interpretting and executing Javascript scripts. This code originated in Mozilla Classic.
  • l10n contains code for building localizations.
  • layout contains the C interfaces and code for the layout engine. The layout engine decides how to divide up the "window real estate" among all the pieces of content. It resizes and aligns pieces of content according to the CSS1 and CSS2 (cascading style sheets), alignment styles and the content itself. It does not actually render the content; it just assigns different pieces of the window to various content items. This is known as "reflowing" the content. This code is also known by the names, "NGLayout" and "Gecko."
  • lib contains C code used for reference by developers in programming the Mac. It is not used. It shows how to embed the Mozilla browser in a Mac application as well as some sample file-handling code from Apple.
  • mailnews contains C interfaces and code for the mail and news component (i.e. Messenger in Mozilla Classic). It includes all the code for managing mail, reading newsgroup messages, importing other mail formats, composing new messages and so on.
  • modules contains C code for various different browsing related features that are built into Mozilla. It contains code for handling various image formats (e.g. .PNG, .GIF), allowing drop-in Java virtual machines (called OJI, for "Open Java Interface"), supporting plug-ins and reading various compression formats (e.g. JAR, ZIP, ZLIB). This code originated from Mozilla as well as various different companies and individual people.
  • netwerk contains C interfaces and code for low-level access to the network (using sockets and file and memory caches) as well as higher-level access (using various protocols such as http, ftp, gopher, castanet). This code is also known by the names, "netlib" and "Necko."
  • nsprpub contains C code for the cross platform "C" Runtime Library. The "C" Runtime Library contains basic non-visual C functions to allocate and deallocate memory, get the time and date, read and write files, handle threads and handling and compare strings across all platforms. This code is also known by the name, "nspr" and "Netscape Portable Runtime". This code originated in Mozilla Classic.
  • other-licenses contains code that does not fall under the MPL, including branding, libical and stubs for 7zip.
  • parser contains the HTML parser and the XML parser (expat.).
  • plugin contains code for the MRJ plugin on Mac.
  • profile contains C interfaces, C code, XUL and Javascript scripts for creating new user profiles, managing existing user profiles, migrating profiles from Mozilla Classic and using default profiles for popular ISPs (e.g. Earthlink and Concentric Networks).
  • rdf contains C interfaces and code for accessing various data and organizing their relationships according to RDF. RDF stands for "Resource Description Framework" which is an open standard. This code reads and writes data from and to the local file system, databases, the Internet or any other source using a URL-like syntax.
  • security contains the security modules including NSS and PSM.
  • storage contains an implementation of sqLite3.
  • suite will contain files specific to the Mozilla suite.
  • sun-java contains C code so Mozilla can communicate with the Sun JVM (Java Virtual Machine). It does not include the code for the virtual machine itself, though.
  • themes contains the default themes for Mozilla, modern and classic.
  • toolkit contains the code for the toolkit used for Firefox, Thunderbird and other standalone applications. This will be covered below.
  • tools contains C code for the Linux-only Leaky tool. Leaky can help detect memory leaks and XPCOM reference counting problems.
  • uriloader contains C interfaces and code for invoking the correct viewer for the content contained at a certain URL. For example, if this code determines that the content is a mail message, it looks up the appropriate listener (probably Netscape Messenger) and passes the mail message to it for display. It is generic and can hand the content off to internal components (like Messenger), to plug-ins or helper apps.
  • view contains C interfaces and code for different types of views (e.g. scrolling view). A view contains content but does not contain the title bar, borders or other decorations (which are contained by frames). This code serves to manipulate the individual content that it contains. For example, a scrolling view will find out the scroll bar positions and tell its content where to draw according the scroll bar thumbs.
  • webshell contains C interfaces, C code, Linux shell scripts and other files for embedding Mozilla in other programs on various different platforms in various different ways (e.g. as plug-in, as ActiveX component, as XPCOM classes).
  • widget contains C interfaces and code for platform independent controls (widgets), such as scroll bars, radio buttons and list boxes.
  • xpcom contains the low-level C interfaces, C code, C code, a bit of assembly code and command line tools for implementing the basic machinery of XPCOM components (which stands for "Cross Platform Component Object Model"). XPCOM is the mechanism that allows Mozilla to export interfaces and have them automatically available to Javascript scripts, to Microsoft COM and to regular Mozilla C code. Some low-level XPCOM classes and interfaces are also defined here (e.g. the event loop for all platforms). XPCOM is compatible and very similar to Microsoft COM (although XPCOM is cross-platform).
  • xpfe contains the C interfaces, C code and XUL for implementing the "Cross Platform Front End." Essentially, this is where the Mozilla program starts and manages other components to accomplish tasks. This code contains very little platform dependent code; it relies on other components to provide platform independent interfaces to platform specific functionality.
  • xpinstall contains the C interfaces and code for implementing the SmartUpdate feature from Mozilla Classic. XPInstall provides code for downloading files, uncompressing them and installing them in a platform independent way.
  • xulrunner contains code for XUL Runner.

Firefox

Firefox is contained in the browser directory

  • app contains contains code to build the firefox executable.
  • base contains the XUL and branding code.
  • components contains Firefox specific components like history, bookmarks, preferences, migration, sidebar..
  • configcontains build scripts for Firefox.
  • extensions contains code for making certain extensions work.
  • installer contains the Firefox installer code.
  • locales contains the files that are translated for Firefox.
  • themes contains Firefox themes.

Toolkit

Toolkit is used by the standalone products.

  • components contains the alerts, autocomplete, command line interface, console, cookies, download manager, filepicker, history, password manager, typeaheadfind, view source, etc.
  • content contains XUL specific to the toolkit.
  • library contains libXUL work.
  • localescontains files that are translated.
  • mozappscontains shared application stuff.
  • obsoletecontains obsolete stuff.
  • profilecontains the profile manager
  • themescontains themes as they relate to toolkit things.
  • xreis the XUL runtime engine. This directory contains the code for initializing the toolkit.


Original Document Information

  • Author(s): Daniel Howard
  • Other Contributors: Heikki Toivonen (11-Nov-1999), Hervé Renault (for the French translation) (16-Nov-1999)
  • Last Updated Date: Michael Kaply 2-June-2005
  • Copyright Information: Portions of this content are © 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details.
  • Further History: Document History.

Revision Source

<p>
</p><p>This document is a guide for developers to the directory structure of the Mozilla source code tree. It gives a bird's eye view of the source code so a developer can get a good idea what is in Mozilla and where to find things. It is a good document for a new Mozilla developer to start learning about the Mozilla code base.
</p><p>This document contains material for SeaMonkey, Firefox, and Toolkit.
</p><p>It is a living document which is (supposed to be) updated monthly according to changes in the Mozilla source tree.
</p><p>See also similar information on the Mozilla Developer Center, <a href="en/Mozilla_Source_Code_Directory_Structure">Mozilla Source Code Directory Structure</a>.
</p>
<h3 name="Introduction:_Common_Subdirectories"> Introduction: Common Subdirectories </h3>
<p>A common naming scheme is used throughout the Mozilla source trees. At the top level is the name of the product (e.g. <a class="external" href="http://lxr.mozilla.org/seamonkey/source/">seamonkey</a>). At the second level is the name of the module (e.g. the <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/">editor</a> directory in seamonkey). The third level is where the common naming scheme usually takes over. Many third level directories contain the <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/base/">base</a>, the <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/public/">public</a> and the <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/idl/">idl</a> directories. Although not required, these common names are typically used for a common purpose. If files can be grouped into submodules, they are usually put in their own third level directory and given a unique name (e.g. <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/txmgr/">txmgr</a> in the editor directory in seamonkey). Beneath this third level directory, there may be fourth level base, public and idl directories. Thus, the scheme is recursive; it can apply to submodules, sub-submodules and so on.
</p>
<ul><li> base contains the basic (core) functionality for the module. Base contains all the source code that cannot be categorized into a submodule.
</li><li> build contains any special makefiles for building the particular module.
</li><li> doc contains any documentation associated with this module.
</li><li> idl contains the XPIDL (Cross Platform Interface Definition Language) interface files. Interfaces are used so functionality can be available to both Javascript scripts and C code with as little effort as possible. XPIDL files have their own mini-language and processing tools.
</li><li> public contains source code that will be exported to the dist/include directory. They are not all necessarily public in the general sense; some are only meant for internal use in a certain module. As more code is written with or converted to XPIDL interfaces, the value of the public directory diminishes.
</li><li> src contains the bulk of the source code.
</li><li> tests contains C harnesses, HTML or XUL that exercise this module.
</li><li> tools contains scripts for automatically generating certain source code and other special tools for building this module.
</li></ul>
<p>There are also platform dependent subdirectories which contain source code for specific platforms.
</p>
<ul><li> windows contains source code for Windows 95, Windows 98 and Windows NT 4.0.
</li><li> mac contains source code for MacOS: both the PowerPC and 68000 versions.
</li><li> gtk contains source code for <a class="external" href="http://www.gtk.org">GTK </a> (a.k.a. the GIMP Toolkit) which runs on X-Windows on Unix.
</li><li> motif contains source code for Motif, a toolkit which runs on X-Windows on Unix.
</li><li> os2 contains source code for OS/2 Warp.
</li><li> rhapsody contains source code for Mac OS X Server (which is based on NeXTStep which is based on X-Windows on Unix) using Yellow Box (Cocoa).
</li><li> beos contains source code for <a class="external" href="http://www.be.com/">BeOS</a>.
</li><li> qt contains source code for the <a class="external" href="http://www.troll.no/products/qt.html">QT toolkit</a>, a C class library which runs on X-Windows on Unix, Windows 95, Windows 98 and Window NT 4.0.
</li><li> photon contains source code for <a class="external" href="http://www.qnx.com/products/photon/index.html">Photon</a>, a microkernel windowing system used in several real-time operating systems from QNX Software Systems Ltd.
</li></ul>
<h3 name="SeaMonkey"> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/">SeaMonkey</a> </h3>
<p>SeaMonkey is the development name for the Mozilla browser suite.
</p>
<ul><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/accessible/">accessible</a> contains code to support Microsoft Active Accessibility and Sun's ATK accessibility API for Linux.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/">browser</a> contains the code for Firefox. This will be covered below.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/build/">build</a> contains scripts (usually Perl) and programs used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of the dist directory.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/calendar/">calendar</a> <span>contains the code for the various Mozilla calendar apps and extensions.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/caps/">caps</a> contains C interfaces and code for determining the capabilities of content based on the security settings and certificates (e.g. Verisign).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/chrome/">chrome</a> contains the toolkit chrome registry.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/config/">config</a> contains scripts and programs used by Mozilla developers to manipulate the code base and to perform special actions inside makefiles. These programs are used for code level things instead of build level things (which are a stored in the build directory).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/content/">content</a> was split off from layout and contains objects as they are exposed to the DOM.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/db/">db</a> contains C code for the mdb/Mork database which is a low-level, general-purpose and cross-platform file library. It is used to store mail box data, news data and global history data. It has not been updated to support XPCOM yet. This code originated in the Mozilla Classic code base.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/dbm/">dbm</a> contains C code for managing, reading and writing hash tables. It is used for the auto-completion feature on the URL edit box (stored in netscape.hst in Mozilla Classic) and for the cached pages index (stored in fat.db in Mozilla Classic). This code originated at UC Berkeley.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/directory/">directory</a> contains the LDAP SDK.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/docshell/">docshell</a> contains C interfaces and code for loading and displaying a single web page (e.g. scroll). The {{mediawiki.external('#seamonkey-embedding embedding')}} code wraps this code with higher level browser functions like forward, back and history.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/dom/">dom</a> contains C interfaces and code for implementing and tracking DOM (Document Object Model) objects in Javascript. It forms the C substructure which creates, destroys and manipulates built-in and user-defined objects according to the Javascript script. For example, if the Javascript script adds a user-defined attribute to the document (e.g. document.goofy = 1), this code will create the "goofy" node, put it on the "document" node and manipulate it according to any later Javascript commands.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/editor/">editor</a> contains C interfaces, C code and XUL for the embeddable editor component which can edit both plain text and HTML. It is used for the HTML editor (i.e. Composer in Mozilla Classic), for plain text and HTML mail composition and for text fields and text areas throughout the product. The editor is designed like a "browser window with editing features" with extra classes for editing text and managing undo/redo.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/embedding/">embedding</a> contains C interfaces and code for generic high-level browser functions (e.g. forward, back, history). The {{mediawiki.external('#seamonkey-webshell webshell')}} code wraps these interfaces according to the particular platform and way (e.g. ActiveX) that is being supported.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/extensions/">extensions</a> contains C interfaces, C code, XUL and Javascript code for various add-ins that are related to browsing. These include: cookies, IRC, wallet, DOM Inspector, P3P, schema validation, spellchecker, transformiix, typeaheadfind, JavaScipt debugger, XForms, etc.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/gc/">gc</a> contains C code for the Boehm garbage collector. It is not used in the final product: it is used to find memory leaks and track memory usage during development. This code originated from code written by Hans-J. Boehm with support from National Science Foundation, DARPA, Xerox and SGI (at various times).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/gfx/">gfx</a> contains C interfaces and code for platform independent drawing and imaging. It can be used to draw rectangles, lines, images, etc. Essentially, it is a a set of interfaces for a platform-independent device (drawing) context. It does not handle widgets or specific drawing routines; it just provides the primitive operations for drawing.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/intl/">intl</a> contains C interfaces and code for supporting localization. It contains code for various character sets, locale formats (e.g. the format of the date and time for different cultures) and other localization facilities.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/ipc/">ipc</a> contains
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/jpeg/">jpeg</a> contains C code for reading/writing JPEG images. This code originated as the reference implementation for the JPEG specification from the Independent JPEG Group.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/js/">js</a> contains C code for tokenizing, parsing, interpretting and executing Javascript scripts. This code originated in Mozilla Classic.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/l10n/">l10n</a> contains code for building localizations.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/layout/">layout</a> contains the C interfaces and code for the layout engine. The layout engine decides how to divide up the "window real estate" among all the pieces of content. It resizes and aligns pieces of content according to the CSS1 and CSS2 (cascading style sheets), alignment styles and the content itself. It does not actually render the content; it just assigns different pieces of the window to various content items. This is known as "reflowing" the content. This code is also known by the names, "NGLayout" and "Gecko."
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/lib/">lib</a> contains C code used for reference by developers in programming the Mac. It is not used. It shows how to embed the Mozilla browser in a Mac application as well as some sample file-handling code from Apple.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/mailnews/">mailnews</a> contains C interfaces and code for the mail and news component (i.e. Messenger in Mozilla Classic). It includes all the code for managing mail, reading newsgroup messages, importing other mail formats, composing new messages and so on.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/modules/">modules</a> contains C code for various different browsing related features that are built into Mozilla. It contains code for handling various image formats (e.g. .PNG, .GIF), allowing drop-in Java virtual machines (called OJI, for "Open Java Interface"), supporting plug-ins and reading various compression formats (e.g. JAR, ZIP, ZLIB). This code originated from Mozilla as well as various different companies and individual people.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/netwerk/">netwerk</a> contains C interfaces and code for low-level access to the network (using sockets and file and memory caches) as well as higher-level access (using various protocols such as http, ftp, gopher, castanet). This code is also known by the names, "netlib" and "Necko."
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/nsprpub/">nsprpub</a> contains C code for the cross platform "C" Runtime Library. The "C" Runtime Library contains basic non-visual C functions to allocate and deallocate memory, get the time and date, read and write files, handle threads and handling and compare strings across all platforms. This code is also known by the name, "nspr" and "Netscape Portable Runtime". This code originated in Mozilla Classic.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/other-licenses/">other-licenses</a> contains code that does not fall under the MPL, including branding, libical and stubs for 7zip.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/parser/">parser</a> contains the HTML parser and the XML parser (expat.).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/plugin/">plugin</a> contains code for the MRJ plugin on Mac.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/profile/">profile</a> contains C interfaces, C code, XUL and Javascript scripts for creating new user profiles, managing existing user profiles, migrating profiles from Mozilla Classic and using default profiles for popular ISPs (e.g. Earthlink and Concentric Networks).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/rdf/">rdf</a> contains C interfaces and code for accessing various data and organizing their relationships according to RDF. RDF stands for "Resource Description Framework" which is an open standard. This code reads and writes data from and to the local file system, databases, the Internet or any other source using a URL-like syntax.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/security/">security</a> contains the security modules including NSS and PSM.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/storage/">storage</a> contains an implementation of sqLite3.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/suite/">suite</a> will contain files specific to the Mozilla suite.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/sun-java/">sun-java</a> contains C code so Mozilla can communicate with the Sun JVM (Java Virtual Machine). It does not include the code for the virtual machine itself, though.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/themes/">themes</a> contains the default themes for Mozilla, modern and classic.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/">toolkit</a> contains the code for the toolkit used for Firefox, Thunderbird and other standalone applications. This will be covered below.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/tools/">tools</a> contains C code for the Linux-only Leaky tool. Leaky can help detect memory leaks and XPCOM reference counting problems.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/uriloader/">uriloader</a> contains C interfaces and code for invoking the correct viewer for the content contained at a certain URL. For example, if this code determines that the content is a mail message, it looks up the appropriate listener (probably Netscape Messenger) and passes the mail message to it for display. It is generic and can hand the content off to internal components (like Messenger), to plug-ins or helper apps.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/view/">view</a> contains C interfaces and code for different types of views (e.g. scrolling view). A view contains content but does not contain the title bar, borders or other decorations (which are contained by frames). This code serves to manipulate the individual content that it contains. For example, a scrolling view will find out the scroll bar positions and tell its content where to draw according the scroll bar thumbs.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/webshell/">webshell</a> contains C interfaces, C code, Linux shell scripts and other files for embedding Mozilla in other programs on various different platforms in various different ways (e.g. as plug-in, as ActiveX component, as XPCOM classes).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/widget/">widget</a> contains C interfaces and code for platform independent controls (widgets), such as scroll bars, radio buttons and list boxes.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/xpcom/">xpcom</a> contains the low-level C interfaces, C code, C code, a bit of assembly code and command line tools for implementing the basic machinery of XPCOM components (which stands for "Cross Platform Component Object Model"). XPCOM is the mechanism that allows Mozilla to export interfaces and have them automatically available to Javascript scripts, to Microsoft COM and to regular Mozilla C code. Some low-level XPCOM classes and interfaces are also defined here (e.g. the event loop for all platforms). XPCOM is compatible and very similar to Microsoft COM (although XPCOM is cross-platform).
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/xpfe/">xpfe</a> contains the C interfaces, C code and XUL for implementing the "Cross Platform Front End." Essentially, this is where the Mozilla program starts and manages other components to accomplish tasks. This code contains very little platform dependent code; it relies on other components to provide platform independent interfaces to platform specific functionality.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/xpinstall/">xpinstall</a> contains the C interfaces and code for implementing the SmartUpdate feature from Mozilla Classic. XPInstall provides code for downloading files, uncompressing them and installing them in a platform independent way.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/xulrunner/">xulrunner</a> contains code for XUL Runner.
</li></ul>
<h3 name="Firefox"> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/">Firefox</a> </h3>
<p>Firefox is contained in the browser directory
</p>
<ul><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/app/">app</a> contains contains code to build the firefox executable.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/base/">base</a> contains the XUL and branding code.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/components/">components</a> contains Firefox specific components like history, bookmarks, preferences, migration, sidebar..
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/config/">config</a><span>contains build scripts for Firefox.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/extensions/">extensions</a> contains code for making certain extensions work.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/installer/">installer</a> contains the Firefox installer code.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/locales/">locales</a> contains the files that are translated for Firefox.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/browser/themes/">themes</a> contains Firefox themes.
</li></ul>
<h3 name="Toolkit"> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/">Toolkit</a> </h3>
<p>Toolkit is used by the standalone products.
</p>
<ul><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/components/">components</a> contains the alerts, autocomplete, command line interface, console, cookies, download manager, filepicker, history, password manager, typeaheadfind, view source, etc.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/content/">content</a> contains XUL specific to the toolkit.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/library/">library</a> contains libXUL work.
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/locales/">locales</a><span>contains files that are translated.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/mozapps/">mozapps</a><span>contains shared application stuff.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/obsolete/">obsolete</a><span>contains obsolete stuff.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/profile/">profile</a><span>contains the profile manager</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/themes/">themes</a><span>contains themes as they relate to toolkit things.</span>
</li><li> <a class="external" href="http://lxr.mozilla.org/seamonkey/source/toolkit/xre/">xre</a><span>is the XUL runtime engine. This directory contains the code for initializing the toolkit.</span>
</li></ul>
<hr>
<p><br>
</p>
<div class="originaldocinfo">
<h2 name="Original_Document_Information"> Original Document Information </h2>
<ul><li> Author(s): <a class="external" href="mailto:dhoward@mountbromo.com">Daniel Howard</a>
</li><li> Other Contributors: <a class="external" href="mailto:heikki@citec.fi">Heikki Toivonen</a> (11-Nov-1999), <a class="external" href="mailto:mozillazine@mozillazine-fr.org">Hervé Renault</a> (for the <a class="external" href="http://mozillazine-fr.org/tech/source_directories_overview-fr.html">French</a> translation) (16-Nov-1999)
</li><li> Last Updated Date: Michael Kaply 2-June-2005
</li><li> Copyright Information: Portions of this content are © 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Details</a>.
</li><li> Further History: <a class="external" href="http://bonsai-www.mozilla.org/cvslog.cgi?file=mozilla-org/html/docs/source-directories-overview.html&amp;rev=&amp;root=/www/">Document History</a>.
</li></ul>
</div>
Revert to this revision