794 lines
20 KiB
C++
794 lines
20 KiB
C++
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* The contents of this file are subject to the Mozilla Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/MPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is the Mozilla browser.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications, Inc. Portions created by Netscape are
|
|
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
* Travis Bogard <travis@netscape.com>
|
|
*/
|
|
|
|
//#include "nsIComponentManager.h"
|
|
|
|
#include "nsHTMLDocShell.h"
|
|
|
|
//*****************************************************************************
|
|
//*** nsHTMLDocShell: Object Management
|
|
//*****************************************************************************
|
|
|
|
nsHTMLDocShell::nsHTMLDocShell()
|
|
{
|
|
NS_INIT_REFCNT();
|
|
}
|
|
|
|
nsHTMLDocShell::~nsHTMLDocShell()
|
|
{
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Create(nsISupports* aOuter, const nsIID& aIID,
|
|
void** ppv)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(ppv);
|
|
NS_ENSURE_NO_AGGREGATION(aOuter);
|
|
|
|
nsHTMLDocShell* docShell = new nsHTMLDocShell();
|
|
NS_ENSURE(docShell, NS_ERROR_OUT_OF_MEMORY);
|
|
|
|
NS_ADDREF(docShell);
|
|
nsresult rv = docShell->QueryInterface(aIID, ppv);
|
|
NS_RELEASE(docShell);
|
|
return rv;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsISupports
|
|
//*****************************************************************************
|
|
|
|
NS_IMPL_ISUPPORTS7(nsHTMLDocShell, nsIDocShell, nsIHTMLDocShell,
|
|
nsIDocShellEdit, nsIDocShellFile, nsIGenericWindow, nsIScrollable,
|
|
nsITextScroll)
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIDocShell
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::LoadURI(const PRUnichar* uri)
|
|
{
|
|
NS_ENSURE_ARG(uri);
|
|
//XXX First Check
|
|
/*
|
|
Loads a given URI. This will give priority to loading the requested URI
|
|
in the object implementing this interface. If it can't be loaded here
|
|
however, the URL dispatcher will go through its normal process of content
|
|
loading.
|
|
|
|
@param uri - The URI to load.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::LoadURIVia(const PRUnichar* uri,
|
|
PRUint32 adapterBinding)
|
|
{
|
|
NS_ENSURE_ARG(uri);
|
|
//XXX First Check
|
|
/*
|
|
Loads a given URI through the specified adapter. This will give priority
|
|
to loading the requested URI in the object implementing this interface.
|
|
If it can't be loaded here however, the URL dispatcher will go through its
|
|
normal process of content loading.
|
|
|
|
@param uri - The URI to load.
|
|
@param adapterBinding - The local IP address of the adapter to bind to.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetDocument(nsIDOMDocument** document)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(document);
|
|
//XXX First Check
|
|
/*
|
|
The current document that is loaded in the DocShell. When setting this it
|
|
will will simulate the normal load process.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetDocument(nsIDOMDocument* document)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
The current document that is loaded in the DocShell. When setting this it
|
|
will will simulate the normal load process.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetName(PRUnichar** name)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(name);
|
|
//XXX First Check
|
|
/*
|
|
name of the DocShell
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetName(const PRUnichar* name)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
name of the DocShell
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetPresContext(nsIPresContext** presContext)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(presContext);
|
|
//XXX First Check
|
|
/*
|
|
Presentation context
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetPresContext(nsIPresContext* presContext)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Presentation context
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetParent(nsIDocShell** parent)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(parent);
|
|
//XXX First Check
|
|
/*
|
|
Parent DocShell
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetParent(nsIDocShell* parent)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Parent DocShell
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetPrefs(nsIPref** prefs)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(prefs);
|
|
//XXX First Check
|
|
/*
|
|
Prefs to use for the DocShell.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetPrefs(nsIPref* prefs)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Prefs to use for the DocShell.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetRootDocShell(nsIDocShell** rootDocShell)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(rootDocShell);
|
|
//XXX First Check
|
|
/*
|
|
Returns the root DocShell instance. Since DocShells can be nested
|
|
(when frames are present for example) this instance represents the
|
|
outermost DocShell.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIHTMLDocShell
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::ScrollToNode(nsIDOMNode* node)
|
|
{
|
|
NS_ENSURE_ARG(node);
|
|
//XXX First Check
|
|
/*
|
|
Scrolls to a given DOM content node.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetAllowPlugins(PRBool* allowPlugins)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(allowPlugins);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetAllowPlugins(PRBool allowPlugins)
|
|
{
|
|
//XXX First Check
|
|
/** if true, plugins are allowed within the doc shell. default = true */
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetMarginWidth(PRInt32* marginWidth)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(marginWidth);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetMarginWidth(PRInt32 marginWidth)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetMarginHeight(PRInt32* marginHeight)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(marginHeight);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetMarginHeight(PRInt32 marginHeight)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetIsFrame(PRBool* isFrame)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(isFrame);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetIsFrame(PRBool isFrame)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetDefaultCharacterSet(PRUnichar** defaultCharacterSet)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(defaultCharacterSet);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetDefaultCharacterSet(const PRUnichar* defaultCharacterSet)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetForceCharacterSet(PRUnichar** forceCharacterSet)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(forceCharacterSet);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetForceCharacterSet(const PRUnichar* forceCharacterSet)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIDocShellEdit
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Search()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetSearchable(PRBool* searchable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(searchable);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::ClearSelection()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SelectAll()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::CopySelection()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetCopyable(PRBool* copyable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(copyable);
|
|
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::CutSelection()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetCutable(PRBool* cutable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(cutable);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Paste()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetPasteable(PRBool* pasteable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(pasteable);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIDocShellFile
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Save()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetSaveable(PRBool* saveable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(saveable);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Print()
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetPrintable(PRBool* printable)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(printable);
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIGenericWindow
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::InitWindow(nativeWindow parentNativeWindow,
|
|
nsIWidget* parentWidget, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Allows a client to initialize an object implementing this interface with
|
|
the usually required window setup information.
|
|
|
|
@param parentNativeWindow - This allows a system to pass in the parenting
|
|
window as a native reference rather than relying on the calling
|
|
application to have created the parent window as an nsIWidget. This
|
|
value will be ignored (should be nsnull) if an nsIWidget is passed in to
|
|
the parentWidget parameter. One of the two parameters however must be
|
|
passed.
|
|
|
|
@param parentWidget - This allows a system to pass in the parenting widget.
|
|
This allows some objects to optimize themselves and rely on the view
|
|
system for event flow rather than creating numerous native windows. If
|
|
one of these is not available, nsnull should be passed and a
|
|
valid native window should be passed to the parentNativeWindow parameter.
|
|
|
|
@param x - This is the x co-ordinate relative to the parent to place the
|
|
window.
|
|
|
|
@param y - This is the y co-ordinate relative to the parent to place the
|
|
window.
|
|
|
|
@param cx - This is the width for the window to be.
|
|
|
|
@param cy - This is the height for the window to be.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Create()
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Tells the window that intialization and setup is complete. When this is
|
|
called the window can actually create itself based on the setup
|
|
information handed to it.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Destroy()
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Tell the window that it can destroy itself. This allows re-using the same
|
|
object without re-doing a lot of setup. This is not a required call
|
|
before a release.
|
|
|
|
@return NS_OK - Everything destroyed properly.
|
|
NS_ERROR_NOT_IMPLEMENTED - State preservation is not supported.
|
|
Release the interface and create a new object.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetPosition(PRInt32 x, PRInt32 y)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Sets the current x and y coordinates of the control. This is relative to
|
|
the parent window.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetPosition(PRInt32* x, PRInt32* y)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(x && y);
|
|
//XXX First Check
|
|
/*
|
|
Gets the current x and y coordinates of the control. This is relatie to the
|
|
parent window.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Sets the width and height of the control.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetSize(PRInt32* cx, PRInt32* cy)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(cx && cy);
|
|
|
|
//XXX First Check
|
|
/*
|
|
Gets the width and height of the control.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx,
|
|
PRInt32 cy, PRBool fRepaint)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Convenience function combining the SetPosition and SetSize into one call.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SizeToContent()
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Tell the window to shrink-to-fit its contents
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::Repaint(PRBool fForce)
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Tell the window to repaint itself
|
|
* @param aForce - if true, repaint immediately
|
|
* if false, the window may defer repainting as it sees fit.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetParentWidget(nsIWidget** parentWidget)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(parentWidget);
|
|
|
|
//XXX First Check
|
|
/*
|
|
This is the parenting widget for the control. This may be null if only the
|
|
native window was handed in for the parent during initialization. If this
|
|
is returned, it should refer to the same object as parentNativeWindow.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetParentWidget(nsIWidget* parentWidget)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
This is the parenting widget for the control. This may be null if only the
|
|
native window was handed in for the parent during initialization. If this
|
|
is returned, it should refer to the same object as parentNativeWindow.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetParentNativeWindow(nativeWindow* parentNativeWindow)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(parentNativeWindow);
|
|
//XXX First Check
|
|
/*
|
|
This is the native window parent of the control.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetParentNativeWindow(nativeWindow parentNativeWindow)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
This is the native window parent of the control.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetVisibility(PRBool* visibility)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(visibility);
|
|
|
|
//XXX First Check
|
|
/*
|
|
Attribute controls the visibility of the object behind this interface.
|
|
Setting this attribute to false will hide the control. Setting it to
|
|
true will show it.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetVisibility(PRBool visibility)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Attribute controls the visibility of the object behind this interface.
|
|
Setting this attribute to false will hide the control. Setting it to
|
|
true will show it.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetMainWidget(nsIWidget** mainWidget)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(mainWidget);
|
|
//XXX First Check
|
|
/*
|
|
Allows you to find out what the widget is of a given object. Depending
|
|
on the object, this may return the parent widget in which this object
|
|
lives if it has not had to create it's own widget.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetFocus()
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Give the window focus.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::RemoveFocus()
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Remove focus from the window
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetTitle(PRUnichar** title)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(title);
|
|
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetTitle(const PRUnichar* title)
|
|
{
|
|
//XXX First Check
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetZoom(float* zoom)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(zoom);
|
|
|
|
//XXX First Check
|
|
/**
|
|
* Set/Get the document scale factor
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetZoom(float zoom)
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Set/Get the document scale factor
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsIScrollable
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetCurScrollPos(PRInt32 scrollOrientation,
|
|
PRInt32* curPos)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(curPos);
|
|
|
|
//XXX First Check
|
|
/*
|
|
Retrieves or Sets the current thumb position to the curPos passed in for the
|
|
scrolling orientation passed in. curPos should be between minPos and maxPos.
|
|
|
|
@return NS_OK - Setting or Getting completed successfully.
|
|
NS_ERROR_INVALID_ARG - returned when curPos is not within the
|
|
minPos and maxPos.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetCurScrollPos(PRInt32 scrollOrientation,
|
|
PRInt32 curPos)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Retrieves or Sets the current thumb position to the curPos passed in for the
|
|
scrolling orientation passed in. curPos should be between minPos and maxPos.
|
|
|
|
@return NS_OK - Setting or Getting completed successfully.
|
|
NS_ERROR_INVALID_ARG - returned when curPos is not within the
|
|
minPos and maxPos.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetScrollRange(PRInt32 scrollOrientation,
|
|
PRInt32* minPos, PRInt32* maxPos)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(minPos && maxPos);
|
|
//XXX First Check
|
|
/*
|
|
Retrieves or Sets the valid ranges for the thumb. When maxPos is set to
|
|
something less than the current thumb position, curPos is set = to maxPos.
|
|
|
|
@return NS_OK - Setting or Getting completed successfully.
|
|
NS_ERROR_INVALID_ARG - returned when curPos is not within the
|
|
minPos and maxPos.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetScrollRange(PRInt32 scrollOrientation,
|
|
PRInt32 minPos, PRInt32 maxPos)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Retrieves or Sets the valid ranges for the thumb. When maxPos is set to
|
|
something less than the current thumb position, curPos is set = to maxPos.
|
|
|
|
@return NS_OK - Setting or Getting completed successfully.
|
|
NS_ERROR_INVALID_ARG - returned when curPos is not within the
|
|
minPos and maxPos.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetScrollbarPreferences(PRInt32 scrollOrientation,
|
|
PRInt32* scrollbarPref)
|
|
{
|
|
NS_ENSURE_ARG_POINTER(scrollbarPref);
|
|
//XXX First Check
|
|
/*
|
|
Retrieves of Set the preferences for the scroll bar.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::SetScrollbarPreferences(PRInt32 scrollOrientation,
|
|
PRInt32 scrollbarPref)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Retrieves of Set the preferences for the scroll bar.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::GetScrollbarVisibility(PRBool* verticalVisible,
|
|
PRBool* horizontalVisible)
|
|
{
|
|
//XXX First Check
|
|
/*
|
|
Get information about whether the vertical and horizontal scrollbars are
|
|
currently visible.
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
//*****************************************************************************
|
|
// nsHTMLDocShell::nsITextScroll
|
|
//*****************************************************************************
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::ScrollByLines(PRInt32 numLines)
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Scroll the view up or down by aNumLines lines. positive
|
|
* values move down in the view. Prevents scrolling off the
|
|
* end of the view.
|
|
* @param numLines number of lines to scroll the view by
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
NS_IMETHODIMP nsHTMLDocShell::ScrollByPages(PRInt32 numPages)
|
|
{
|
|
//XXX First Check
|
|
/**
|
|
* Scroll the view up or down by numPages pages. a page
|
|
* is considered to be the amount displayed by the clip view.
|
|
* positive values move down in the view. Prevents scrolling
|
|
* off the end of the view.
|
|
* @param numPages number of pages to scroll the view by
|
|
*/
|
|
return NS_ERROR_FAILURE;
|
|
} |