Jacek Caban : mshtml: Set default scrollbar preferences.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 11 08:46:40 CDT 2007
Module: wine
Branch: master
Commit: bd5d6f753c355311670f41be5a53259e6c5b645c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bd5d6f753c355311670f41be5a53259e6c5b645c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Jun 10 11:52:53 2007 +0200
mshtml: Set default scrollbar preferences.
---
dlls/mshtml/nsembed.c | 20 +++++++++++++++++++-
dlls/mshtml/nsiface.idl | 31 ++++++++++++++++++++++++++++++-
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index f8944e9..df6bcf3 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -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
* 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;
}
diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl
index 9643e61..347fd49 100644
--- a/dlls/mshtml/nsiface.idl
+++ b/dlls/mshtml/nsiface.idl
@@ -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
* 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 */
]
More information about the wine-cvs
mailing list