Commit bd5d6f75 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Set default scrollbar preferences.

parent 77be7f7b
/*
* 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
* 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;
nsIWebBrowserSetup *wbsetup;
nsIScrollable *scrollable;
NSContainer *ret;
nsresult nsres;
......@@ -1642,6 +1643,23 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
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;
}
......
/*
* 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
* modify it under the terms of the GNU Lesser General Public
......@@ -1151,6 +1151,35 @@ interface nsIWebBrowserPrint : nsISupports
[
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,
uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
/* FROZEN */
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment