Beginning implementation of Gecko focus handling.
This commit is contained in:
parent
b0b4777422
commit
eb52044ee8
|
@ -82,6 +82,7 @@ struct NSContainer {
|
||||||
nsIWebNavigation *navigation;
|
nsIWebNavigation *navigation;
|
||||||
nsIBaseWindow *window;
|
nsIBaseWindow *window;
|
||||||
nsIWebBrowserStream *stream;
|
nsIWebBrowserStream *stream;
|
||||||
|
nsIWebBrowserFocus *focus;
|
||||||
|
|
||||||
HTMLDocument *doc;
|
HTMLDocument *doc;
|
||||||
|
|
||||||
|
|
|
@ -599,6 +599,11 @@ void HTMLDocument_NSContainer_Init(HTMLDocument *This)
|
||||||
if(NS_FAILED(nsres))
|
if(NS_FAILED(nsres))
|
||||||
ERR("Could not get nsIWebNavigation interface: %08lx\n", 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
|
#if 0
|
||||||
nsres = nsIWebBrowserStream_QueryInterface(This->nscontainer->webbrowser, &IID_nsIWebBrowserStream,
|
nsres = nsIWebBrowserStream_QueryInterface(This->nscontainer->webbrowser, &IID_nsIWebBrowserStream,
|
||||||
(void**)&This->nscontainer->stream);
|
(void**)&This->nscontainer->stream);
|
||||||
|
|
|
@ -311,6 +311,22 @@ interface nsIIOService : nsISupports
|
||||||
nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
|
nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
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,
|
object,
|
||||||
uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
|
uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
|
||||||
|
|
|
@ -74,6 +74,7 @@ static void activate_gecko(HTMLDocument *This)
|
||||||
|
|
||||||
nsIBaseWindow_SetVisibility(This->nscontainer->window, TRUE);
|
nsIBaseWindow_SetVisibility(This->nscontainer->window, TRUE);
|
||||||
nsIBaseWindow_SetEnabled(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)
|
static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
Loading…
Reference in New Issue