[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-qt
Subject:    Re: Encapsulating Gecko in Qt Apps
From:       "John C. Griggs" <jcgriggs () sympatico ! ca>
Date:       2001-07-07 14:03:56
[Download RAW message or body]

No, nsQWidget is hardly significant and only overrides a few Qt API methods,
most of the real work is done in nsQBaseWidget, which provides an interface
between the Mozilla Widget classes (nsWidget, nsWindow) and the nsQWidget for
events and API services (move, resize, etc.) by acting as an event filter for
nsQWidget and providing an API that delegates to the nsQWidget methods.  The
design is complicated a bit by the fact that Mozilla wants a common base class
for all widget types (only nsWidget, nsWindow, ChildWindow and nsScrollBar are
relevant to Qt Mozilla), and Qt doesn't allow more than one Q_OBJECT in the
inheritance tree for a class.  This requires some fiddling to make nsScrollBar
work (BTW, nsScrollBar is required for HTML widgets, all XUL/XBL widgets are
built on nsWindow - or ChildWindow).

I think you'll find that most of the work in duplicating GtkMozEmbed is wrapping
classes that access the Application Object Model (the XUL and XBL stuff) and DOM
with native Qt classes - things like Listeners.  It is also possible that you
may have to alter nsQApplication so that it can use an existing QApplication
instance rather than creating its own - I'd bve happy to help with this if you
can clarify the requirements for me.

Finally, I really hope you decide to take this on!  There aren't many people
actively working on Qt Mozilla right now (I've only had code submitted by one
other person outside my own team - which is currently just me - since I took
over the module), so more hands and eyes on the code an only be a Good Thing
(TM).  Please don't hesitate to ask any questions you have - I know the Qt parts
of Mozilla pretty well, and I'll do my best to help with any questions about the
rest of the Mozilla code.

Regards,
    John Griggs

Norbert Stoop wrote:

> So, creating a child gecko widget in a Qt app is not yet possible? I
> just thought that, if the basic browser stuff is ported to Qt, it should
> be possible to use  nsQWidget etc. in other apps.
> I think I'll have a look at the GtkMozEmbed to see, what they've done
> and how we could do that for Qt.
>
> Regards
>
> Norbert Stoop
>
> "John C. Griggs" schrieb:
> >
> > A Qt equivalent to the GtkMozEmbed stuff is still just an item on my list
> > of things to do.  I'm guessing that this is what you are after.
> > Unfortunately, it'll be a while before I work my way down to this item on
> > my "to-dos", but if you (or anyone else) want to strike out on your own
> > with this, I'd be glad to be of whatever assistance I can to help you grok
> > the existing Qt Mozilla code and integrating your work into the Qt Mozilla
> > code base.
> >
> > Regards,
> >     John Griggs
> >
>
> --
> norbert@stoop.net
> norbert@ini.phys.ethz.ch

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic