On 15 Apr., 05:48, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > The documentation of nsIWindowWatcher says to the parameter parent:
> > parent: parent window, if any. Null if no parent. If it is impossible
> > to get to an nsIWebBrowserChrome from parent, this method will
> > effectively act as if parent were null.
> > and i am passing null as the parent. so i guess the answer is no.
> > was is that what you mean? If not, how do i find out.
>
> I was more interested in the exact feature string you pass to openWindow and
> in
> whether you implement your own nsIWindowCreator or use the "standard" XUL one.
>
> -Boris
The featurestring i am currently using is just like
"width=800,height=600,left=0,top=0",
so nothing fancy here.
as window creator i tried two ways:
//using the window creator supplied by nsIAppStartup
nsCOMPtr<nsIAppStartup> app = do_CreateInstance("@mozilla.org/
toolkit/app-startup;1");
window_watcher = do_GetService("@mozilla.org/embedcomp/window-
watcher;1");
window_creator = do_QueryInterface(app);
window_watcher->SetWindowCreator(window_creator);
and:
//using my own window creator
nsCOMPtr<nsIAppStartup> app = do_CreateInstance("@mozilla.org/
toolkit/app-startup;1");
window_watcher = do_GetService("@mozilla.org/embedcomp/window-
watcher;1");
nsCOMPtr<nsIWindowCreator> window_creator(new WindowCreator());
_window_watcher->SetWindowCreator(window_creator);
with the second version (using my own window creator) i am creating
objects of type WebBrowserChrome
that have an nsIWebBrowser as a member. I also overload GetInterface
to return mWebBrowser->GetContentDOMWindow()
when ever a nsIDOMWindow Interface is requested. (like in the win32
embedding example).
But as far as my understanding goes i do not really need to implement
WebBrowserChrome, because i am fetching the
rendered content directly from the thebes surface that belongs to the
nsIWindow that i do implement.
for the exact details, you can have a look at the source at
http://svn.betabugs.de/websvn/listing.php?repname=bbmozlib.
But due to the last changes it is a little bit messed up right now.
the interesting part is in src/MozEmbed.cpp (install_window, init_app,
create_window).
is the aFeatures parameter of openwindow somewhere documented in
greater detail?
thanks
Benjamin
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding