http://www.mozilla.org/projects/xpcom/interface-rules.htmlRegarding the last point, isn't it considered incorrect to use |interface| to refer to something that isn't in IDL? (I might be wrong here.)Isn't: %{ C++ class nsIDeviceContext; %} [ptr] native nsIDeviceContextPtr(nsIDeviceContext);
Actually, I disagree.. (I don't think any standard way of doing this has been decided)
Personally I think if its really an interface then it should say "interface" - because one interface shouldn't hardcode the non-scriptability of another interface... what happens if nsIDeviceContext becomes scriptable at some point. Do we have to tweak nsIContentViewer.idl now?
by declaring something "interface nsIFoo;" you let XPConnect determine at runtime if the (possibly now scriptable) interface is available.
Also, it might be good to mention something about minimizing #include dependencies (good for compile time), especially when the #include is something that many consumers are not likely to need
Agreed. I'll add something to that effect.
Alec
