views:

645

answers:

1

I have an ActiveX control that works fine in Internet Explorer and the ActiveX Control Test Container program. The actual behavior of the control is split in two parts, where one part is the ATL gunk that interfaces with the OLE host, and the other part is the real meat, which just receives callbacks for window attach, sizing, drawing and mouse/keyboard events.

Now, I want to write the equivalent of the ATL gunk, for a Firefox plug-in (ideally in the same binary, so I don't need to link two binaries, but I can be flexible here). I have downloaded and used the Gecko SDK to build an XPCOM component, and that seems to work, but I can't figure out which interfaces to implement to make the component available as an embedded native UI component in Firefox. This is similar in needs to the Flash player plug-in, PDF Viewer plug-in, QuickTime player plug-in, etc -- javascript and XUL won't be enough.

I've looked for examples on the web, but the only examples I can find are based on the seemingly ancient NS_PluginInitialize() / NS_NewPluginInstance() interface, which is not XPCOM (but has some other name?).

Is there a way to achieve the same thing through XPCOM? If so, how? And does there exist any overview documentation at all (not just interface member listings) about how to go about doing this?

+1  A: 

Aaaand the answer just popped up on another web search. Well, at least the beginning of some piece of string that, when pulled for long enough, will probably answer the question.

https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-in_Basics#Windowed_and_Windowless_Plug-ins