mshtml: Set default scrollbar preferences.
This commit is contained in:
parent
77be7f7b1c
commit
bd5d6f753c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2005-2006 Jacek Caban for CodeWeavers
|
* Copyright 2005-2007 Jacek Caban for CodeWeavers
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -1526,6 +1526,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
|
||||||
{
|
{
|
||||||
nsIDOMWindow *dom_window;
|
nsIDOMWindow *dom_window;
|
||||||
nsIWebBrowserSetup *wbsetup;
|
nsIWebBrowserSetup *wbsetup;
|
||||||
|
nsIScrollable *scrollable;
|
||||||
NSContainer *ret;
|
NSContainer *ret;
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
|
@ -1642,6 +1643,23 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
|
||||||
ERR("GetContentDOMWindow failed: %08x\n", nsres);
|
ERR("GetContentDOMWindow failed: %08x\n", nsres);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsres = nsIWebBrowser_QueryInterface(ret->webbrowser, &IID_nsIScrollable, (void**)&scrollable);
|
||||||
|
if(NS_SUCCEEDED(nsres)) {
|
||||||
|
nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable,
|
||||||
|
ScrollOrientation_Y, Scrollbar_Always);
|
||||||
|
if(NS_FAILED(nsres))
|
||||||
|
ERR("Could not set default Y scrollbar prefs: %08x\n", nsres);
|
||||||
|
|
||||||
|
nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable,
|
||||||
|
ScrollOrientation_X, Scrollbar_Auto);
|
||||||
|
if(NS_FAILED(nsres))
|
||||||
|
ERR("Could not set default X scrollbar prefs: %08x\n", nsres);
|
||||||
|
|
||||||
|
nsIScrollable_Release(scrollable);
|
||||||
|
}else {
|
||||||
|
ERR("Could not get nsIScrollable: %08x\n", nsres);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2005-2006 Jacek Caban for CodeWeavers
|
* Copyright 2005-2007 Jacek Caban for CodeWeavers
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -1149,6 +1149,35 @@ interface nsIWebBrowserPrint : nsISupports
|
||||||
nsresult ExitPrintPreview();
|
nsresult ExitPrintPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8)
|
||||||
|
]
|
||||||
|
interface nsIScrollable : nsISupports
|
||||||
|
{
|
||||||
|
enum {
|
||||||
|
ScrollOrientation_X = 1,
|
||||||
|
ScrollOrientation_Y = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
Scrollbar_Auto = 1,
|
||||||
|
Scrollbar_Never = 2,
|
||||||
|
Scrollbar_Always = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
nsresult GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *curPos);
|
||||||
|
nsresult SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos);
|
||||||
|
nsresult SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos);
|
||||||
|
nsresult GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos);
|
||||||
|
nsresult SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos);
|
||||||
|
nsresult SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos,
|
||||||
|
PRInt32 minVerticalPos, PRInt32 maxVerticalPos);
|
||||||
|
nsresult GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *scrollbarPref);
|
||||||
|
nsresult SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref);
|
||||||
|
nsresult GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible);
|
||||||
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
object,
|
object,
|
||||||
uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
|
uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
|
||||||
|
|
Loading…
Reference in New Issue