These articles provide tutorials and usage documentation for XPCOM, including how to use it in your own projects and how to build XPCOM components for your Firefox add-ons and the like.
- Creating XPCOM components
- This guide is about Gecko, and about creating XPCOM components for Gecko-based applications.
- Inheriting from implementation classes
- Given that IDL interfaces map to abstract classes in C++, a common problem when dealing with IDL is when you have an IDL inheritance hierarchy, and a corresponding C++ implementation hierarchy, you run into multiple inheritance. That's not inherently multiple inheritance, though, because you only mix in interfaces (i.e. the problem would not exist with Java's
- Making cross-thread calls using runnables
- Mozilla internal string guide
- Most of the Mozilla code uses a C++ class hierarchy to pass string data, rather than using raw pointers. This guide documents the string classes which are visible to code within the Mozilla codebase (code which is linked into libxul).
servicesC++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect XPCOM approach:
CallGetService(), etc methods are expensive and should be avoided when possible.