C++ Firefox extensions
-
- Posts: 1
- Joined: November 16th, 2004, 5:41 am
C++ Firefox extensions
Id like to write a firefox extension in c++, is this possible? I cant find any info regarding this, please let me know of any samples or documents describing this.. thanks.
- Giorgio Maone
- Posts: 3516
- Joined: September 21st, 2004, 12:05 am
- Location: Palermo - Italy
- Contact:
The GUI and integration part of an extension (let's call it the "glue") is always written in JavaScript/XUL. But your JavaScript code can <b>execute external applications</b> written in C++ using <b>nsIProcess</b> API (that's what my <a href="http://www.informaction.com/mozilla/flashgot" target="_blank">FlashGot extension</a> does, for instance).
An harder but more extensible approach is packaging your C++ code as a <b>XPCOM component</b>, which is an object whose methods are directly callable by JavaScript (do you remember VBScript/MS COM?): take a look to http://www.mozilla.org/projects/xpcom/book/cxc/
Hope it helps
An harder but more extensible approach is packaging your C++ code as a <b>XPCOM component</b>, which is an object whose methods are directly callable by JavaScript (do you remember VBScript/MS COM?): take a look to http://www.mozilla.org/projects/xpcom/book/cxc/
Hope it helps
- iosart
- Posts: 87
- Joined: July 29th, 2004, 2:34 am
- Contact:
I've written a detailed tutorial about creating a C++ XPCOM component a while back:
http://www.iosart.com/firefox/xpcom/
The tutorial comes with source code that can be compiled and run both on Windows and Linux.
http://www.iosart.com/firefox/xpcom/
The tutorial comes with source code that can be compiled and run both on Windows and Linux.