gtk plugin for firefox
- From: Cyril Giraudon <cyril giraudon free fr>
- To: gtk-list gnome org
- Subject: gtk plugin for firefox
- Date: Sun, 15 Jan 2006 15:25:17 +0100
Hello,
I think I have a good (not so bad) idea but I'm not a GTK/mozilla geek.
Let me explain my mind.
On one side, there is gecko/mozilla/firefox. It runs on Windows/Linux/Mac.
I think it's the most known open source cross platform application
(perhaps with openoffice.org and the Gimp).
Gecko is based upon XPCOM and interpretes the XUL language to show the GUI.
pyXPCOM, plXPCOM, rbXPCOM and in a near future php XPCOM (it would'nt be
surprising) are some bindings for XPCOM.
All these languages are portable, cross platform on Windows/Linux/Mac.
I don't forget your XPCOM for mono bindings.
On Linux, Gecko compiles with GTK.
On Windows, Gecko uses the native widgets.
On the other side there is GTK with all its bindings : pyGTK, GTK#,
php-GTK, perl GTK, ruby GTK. GTK runs on Windows/Linux and in a near
future natively on Mac.
Since the 2.8.2 version, GTK socket/plug is complete for windows (I think).
The idea is the following : would it be interesting to have a cross
platform plugin which would do one thing (or two :-) ), plugging a
GTKplug XPCOM object ?
You know, it's not easy to write firefox plugins and they are platform
dependant.
So imagine you have written a good mono GTK application, an ogg player
for example, called "monog".
You would like to use monog as a firefox plugin. You could hack
mozplugger on linux but this solution is not portable.
So you decide to write a xpcom object which would implements an idl
interface 'GTKComponent' and some functions :
XID createGTKPlug()
These function would initialize 'monog' and create an XID plug the main
'monog' container.
void destroyGTKPlug()
These function would destroy the 'monog' XID plug.
...
'monog' could implement more interfaces or more functions.
Then, you write the plugin platform dependent : GTKSocketPlugin.
(On windows, this plugin coul even install GTK, Glib ..., why not ?)
This plugin would :
- Instanciate a GTK container (a window, it depends on the platform I
think)
- Instanciate a socket for this container.
- Instanciate an XPCOM service (written in C++, javascript : a good
choice, python...) 'GTKPlugService'.
This XPCOM component would implement some functions :
XID loadGTKPlug(string type-mime).
destroyGTKPlug(XID)
As mozplugger does, GTKPlugService knows the GTKComponent to instanciate
with the mime-type.
- the container would use the XID to show de monog window.
I think, I would even be possible to control 'monog' from the
XUL/javascript side (thanks to GTKPlugService), in fact to control the
XPCOM GTKComponent instance.
Perhaps, there are some access right problems for a web application, but
certainly not for a desktop application
I think, one of the main problems is the way to embed the main GTK
(container) window in win32 firefox.
I would be happy to know how to do that (even if the plugin idea is fool).
I suppose there are a lot of problems I haven't seen. But the idea is here.
The number of cross platform GTK based applications (written with script
languages, or not) increases, but windows users don't know them, except
Gimp and some others.
Firefox could be a guenuine bridge between the linux/GTK world and
windows users.
And the number of Firefox plugins for Linux users could increase too.
The same think with other toolkits could be imagined.
It looks like a very simplified cross platform bonobo-mozilla extension.
What do you think about all this stuff ?
Thanks a lot,
Cyril.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]