The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Search
Feedback


XPIDL

Last modified: Tue Nov 24 23:35:25 EST 1998

XPIDL and generating XPCOM interfaces

XPIDL is the interface description language used by the xpidl tool to generate interfaces, documentation and scriptability glue for XPCOM interfaces. It closely resembles OMG IDL in syntax, with some extensions to handle IID specification, variable-argument syntax and some additional types. Examples of a preliminary syntax are in the dom/public/idl directory of the Mozilla tree.

What we're generating

From the XPIDL input, we hope to generate a number of useful outputs:
  • XPCOM interfaces. We will generate nsIFoo.h from nsIFoo.idl, and use that generated header for C++ code. Given historical troubles with generated code (Mac sometimes doesn't like to do it, autoconf gets confused when it has a generate rule for a file that exists, etc.) we will probably check the generated headers in rather than generate them at build-time.
  • Scriptability glue. More information on how the scriptable stuff works is coming, but we will generate type information and invoke glue for use by JS and other languages.
  • Documentation. We want to use the javadoc-esque doc comments that are currently in the nsIFoo.h header files to generate documentation for the interfaces. We'll have to move the doc comments to the IDL files, of course.

How we're generating all that stuff

The current plan is to use the libIDL code from GNOME's ORBit package to parse the IDL, and then generate whatever code/docs/data we need. The esteemed authors of libIDL have agreed to help us with additional syntax, and that was just too good an offer to refuse. The libIDL that comes with RH5.2 isn't quite up-to-scratch, so I'll post a pointer here for newer libIDL RPMs and tarballs. Top Men are working on making sure it all builds on Win32 and Mac as well, so we should have happy news to report on that front shortly.

Update: (Tue Nov 24 23:32:36 EST 1998) The xpidl tool has landed in xpcom/tools/xpidl and generates real output.

Comments and flames to shaver@netscape.com.



Copyright © 1998 The Mozilla Organization.