views:

31

answers:

1

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...

A: 

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.

StackedCrooked
I don't actually want XUL Runner... I want a plugin that I can use inside FireFox...
Brian Postow
@Brian it's the same technology. You can create an XPCOM plugin for Firefox then.
StackedCrooked