C++ Firefox extensions
3 posts
• Page 1 of 1
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.
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 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.
3 posts
• Page 1 of 1
Return to Extension Development Who is onlineUsers browsing this forum: No registered users and 0 guests |
![]() |