开发者

Adding XUL to a Plugin?

I am working on a Firefox Add-on that view TIFF Files. I'm having trouble figuring out how to do the UI, buttons, scrollers etc. I'm on a mac, so the program is being written in either C or Objective-C, in case that makes a difference.

I'm thinking that XUL might be a way to do the UI. If I could wrap my plugin in some sort of XUL wrapper, and then have the wrapper send messages to the compiled code, that might solve my problem.

However, I'm not sure that this is how XUL works. All of the examples I've seen have basically been HTML, made slightly more complicated...

Alternatively, I could write the开发者_如何学编程 plugin in Java, if it's easier to embed a JAR file into XUL. Actually that might be the best because then It would (probably) be platform independent...


You can write C++ plugins for XULRunner using the XPCOM technology. See here for a good tutorial. Documentation is scarce though, be warned!

You can create an interface to your C/C++ code to be accessed from JavaScript using the XPIDL interface language.

I don't think you can embed Java code in XUL though. You are probably referring to JAR Manifests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜