[sugar] [pyxpcom] PyXPCOM viability and OLPC

Marco Pesenti Gritti mpg
Tue May 8 14:31:44 EDT 2007


On Tue, 2007-05-08 at 14:12 -0400, edward baafi wrote:
> Hi Marco,
> 
> > What we need to do for pyxpcom to be actually useful is to bridge it to
> > gtkmozembed. In particular we need to be able to access nsIWebBrowser,
> > which gtkmozembed exposes, as a python object. Someone in the epiphany
> > team might be able to give some guidance on this too.
> 
> I guess I don't understand what the constraints are here..   Ian says
> that the current web browser "activity" uses pygtkmozembed which is
> lacking in terms of allowing you to customize the experience and thus
> was looking for other options..
> 
> One option discussed was to build a custom Xulrunner based browser
> application, which would give you access to nsiWebBrowser..  The
> Democracy Player is one application that uses Xul + PyXpcom and
> apparently uses the nsiWebBrowser interface:
> https://develop.participatoryculture.org/trac/democracy/browser/trunk/dtv-binary-kit/idlinclude/nsIWebBrowser.idl?rev=4572
> 

But it's a XUL application right? Not an embedding application.

> You can also build a standalone PyXPCOM as discussed in this somewhat
> outdated document: http://kb.mozillazine.org/Standalone_PyXPCOM but
> this wouldn't get you access to nsiWebBrowser by default..
> 
> My main question is whether you are open to a xulrunner based
> application with xul widgets and either javascript or python front end
> code as well as your choice of python, c, c++, and java components or
> if you're locked into gtk widgets..

We are locked into gtk widgets, yeah. So I think there are two
possibilities:

1 Write an embedding widget from scratch in Pyxpcom. It has been done
for JavaXPCOM I think, so it's possible in theory.

2 Use gtkmozembed (written in C) but give access to the gtkmozembed
nsIWebBrowser as a PyXPCOM object so that we can access the DOM document
from python. It should be possible but I never investigated it much.

Does this clarify?

Thanks,
Marco




More information about the Sugar-devel mailing list