MSHTML: Beginning implementation of Gecko focus handling
Jacek Caban
jack at itma.pwr.wroc.pl
Thu Aug 25 18:27:05 CDT 2005
Changelog:
Beginning implementation of Gecko focus handling
-------------- next part --------------
Index: dlls/mshtml/mshtml_private.h
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/mshtml_private.h,v
retrieving revision 1.26
diff -u -p -r1.26 mshtml_private.h
--- dlls/mshtml/mshtml_private.h 25 Aug 2005 19:24:58 -0000 1.26
+++ dlls/mshtml/mshtml_private.h 25 Aug 2005 21:21:48 -0000
@@ -82,6 +82,7 @@ struct NSContainer {
nsIWebNavigation *navigation;
nsIBaseWindow *window;
nsIWebBrowserStream *stream;
+ nsIWebBrowserFocus *focus;
HTMLDocument *doc;
Index: dlls/mshtml/nsembed.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/nsembed.c,v
retrieving revision 1.8
diff -u -p -r1.8 nsembed.c
--- dlls/mshtml/nsembed.c 25 Aug 2005 19:24:58 -0000 1.8
+++ dlls/mshtml/nsembed.c 25 Aug 2005 21:21:48 -0000
@@ -599,6 +599,11 @@ void HTMLDocument_NSContainer_Init(HTMLD
if(NS_FAILED(nsres))
ERR("Could not get nsIWebNavigation interface: %08lx\n", nsres);
+ nsres = nsIWebBrowserFocus_QueryInterface(This->nscontainer->webbrowser, &IID_nsIWebBrowserFocus,
+ (void**)&This->nscontainer->focus);
+ if(NS_FAILED(nsres))
+ ERR("Could not get nsIWebBrowserFocus interface: %08lx\n", nsres);
+
#if 0
nsres = nsIWebBrowserStream_QueryInterface(This->nscontainer->webbrowser, &IID_nsIWebBrowserStream,
(void**)&This->nscontainer->stream);
Index: dlls/mshtml/nsiface.idl
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/nsiface.idl,v
retrieving revision 1.3
diff -u -p -r1.3 nsiface.idl
--- dlls/mshtml/nsiface.idl 25 Aug 2005 19:24:58 -0000 1.3
+++ dlls/mshtml/nsiface.idl 25 Aug 2005 21:21:49 -0000
@@ -313,6 +313,22 @@ interface nsIIOService : nsISupports
[
object,
+ uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)
+]
+interface nsIWebBrowserFocus : nsISupports
+{
+ nsresult Activate();
+ nsresult Deactivate();
+ nsresult SetFocusAtFirstElement();
+ nsresult SetFocusAtLastElement();
+ nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
+ nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
+ nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
+ nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
+}
+
+[
+ object,
uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
]
interface nsIWebBrowserChrome : nsISupports
Index: dlls/mshtml/view.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/view.c,v
retrieving revision 1.15
diff -u -p -r1.15 view.c
--- dlls/mshtml/view.c 18 Aug 2005 10:50:06 -0000 1.15
+++ dlls/mshtml/view.c 25 Aug 2005 21:21:49 -0000
@@ -74,6 +74,7 @@ static void activate_gecko(HTMLDocument
nsIBaseWindow_SetVisibility(This->nscontainer->window, TRUE);
nsIBaseWindow_SetEnabled(This->nscontainer->window, TRUE);
+ nsIWebBrowserFocus_Activate(This->nscontainer->focus);
}
static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
More information about the wine-patches
mailing list