diff --git a/mozilla/docshell/base/makefile.win b/mozilla/docshell/base/makefile.win new file mode 100644 index 00000000000..f592aab3c4c --- /dev/null +++ b/mozilla/docshell/base/makefile.win @@ -0,0 +1,34 @@ +#!nmake +# +# 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 + +DEPTH=..\.. +MODULE=docshell_base + +XPIDLSRCS= \ + .\nsIDocShell.idl \ + .\nsIDocShellFile.idl \ + .\nsIDocShellEdit.idl \ + .\nsIGenericWindow.idl \ + .\nsIScrollable.idl \ + $(NULL) + +include <$(DEPTH)\config\rules.mak> +include <$(DEPTH)\config\config.mak> diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl new file mode 100644 index 00000000000..210c52107d1 --- /dev/null +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -0,0 +1,50 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" +#include "domstubs.idl" + +/** + * The nsIDocShell + */ + + /* + {69E5DE00-7B8B-11d3-AF61-00A024FFC08C} - + {69E5DE99-7B8B-11d3-AF61-00A024FFC08C} have been reserved for DocShell + Interfaces. + + Currently Used: + {69E5DE00-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShell + {69E5DE01-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShellFile + {69E5DE02-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShellEdit + {69E5DE03-7B8B-11d3-AF61-00A024FFC08C} - nsIHTMLDocShell + + */ + +[scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)] +interface nsIDocShell : nsISupports +{ + void LoadDocument(in wstring url); + void LoadDocumentVia(in wstring url, in unsigned long adapterBinding); + + attribute nsIDOMDocument document; +}; diff --git a/mozilla/docshell/base/nsIDocShellEdit.idl b/mozilla/docshell/base/nsIDocShellEdit.idl new file mode 100644 index 00000000000..3dcf8fae9b8 --- /dev/null +++ b/mozilla/docshell/base/nsIDocShellEdit.idl @@ -0,0 +1,46 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" + +/** + * The nsIDocShellFile + */ + +[scriptable, uuid(69E5DE02-7B8B-11d3-AF61-00A024FFC08C)] +interface nsIDocShellEdit : nsISupports +{ + void Search(); + readonly attribute boolean searchable; + + void ClearSelection(); + void SelectAll(); + + void CopySelection(); + readonly attribute boolean copyable; + + void CutSelection(); + readonly attribute boolean cutable; + + void Paste(); + readonly attribute boolean pasteable; +}; \ No newline at end of file diff --git a/mozilla/docshell/base/nsIDocShellFile.idl b/mozilla/docshell/base/nsIDocShellFile.idl new file mode 100644 index 00000000000..e4fdedd0798 --- /dev/null +++ b/mozilla/docshell/base/nsIDocShellFile.idl @@ -0,0 +1,38 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" + +/** + * The nsIDocShellFile + */ + +[scriptable, uuid(69E5DE01-7B8B-11d3-AF61-00A024FFC08C)] +interface nsIDocShellFile : nsISupports +{ + void Save(); + readonly attribute boolean saveable; + + void Print(); + readonly attribute boolean printable; +}; + diff --git a/mozilla/docshell/base/nsIGenericWindow.idl b/mozilla/docshell/base/nsIGenericWindow.idl new file mode 100644 index 00000000000..5695b0a1385 --- /dev/null +++ b/mozilla/docshell/base/nsIGenericWindow.idl @@ -0,0 +1,141 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" +/*#include "nsIWidget.idl" Boy this would be nice.*/ + +[ptr] native nsIWidget(nsIWidget); +%{ C++ +#include "nsIWidget.h" +%} + +/** + * The nsIGenericWindow describes a generic window and basic operations that + * can be performed on it. This is not to be a complete windowing interface + * but rather a common set that nearly all windowed objects support. + */ + +[scriptable, uuid(046BC8A0-8015-11d3-AF70-00A024FFC08C)] +interface nsIGenericWindow : nsISupports +{ + /* + Allows a client to initialize an object implementing this interface with + the usually required 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. + */ + [noscript]void InitWindow(in long parentNativeWindow, in nsIWidget parentWidget, + in long x, in long y, in long cx, in long cy); + + /* + 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. + */ + void Create(); + + /* + 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. + */ + void Destroy(); + + /* + Sets the current x and y coordinates of the control. This is relative to + the parent window. + */ + void SetPosition(in long x, in long y); + + /* + Gets the current x and y coordinates of the control. This is relatie to the + parent window. + */ + void GetPosition(out long x, out long y); + + /* + Sets the width and height of the control. + */ + void SetSize(in long cx, in long cy, in boolean fRepaint); + + /* + Gets the width and height of the control. + */ + void GetSize(out long cx, out long cy); + + /* + Convenience function combining the SetPosition and SetSize into one call. + */ + void SetPositionAndSize(in long x, in long y, in long cx, in long cy, + in boolean fRepaint); + + /* + 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. + */ + attribute nsIWidget parentNativeWidget; + + /* + This is the native window parent of the control. + */ + attribute long parentNativeWindow; + + /* + 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. + */ + attribute boolean visible; + + /* + 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. + */ + readonly attribute nsIWidget mainWidget; +}; \ No newline at end of file diff --git a/mozilla/docshell/base/nsIScrollable.idl b/mozilla/docshell/base/nsIScrollable.idl new file mode 100644 index 00000000000..734a87d73d7 --- /dev/null +++ b/mozilla/docshell/base/nsIScrollable.idl @@ -0,0 +1,70 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" + +/** + * The nsIScrollable is an interface that can be implemented by a control that + * supports scrolling. This is a generic interface without concern for the + * type of content that may be inside. It simply deals blindly with scroll + * position as a composite of the lowest possible scroll position, the highest + * possible position and the current position lying somewhere between the + * min and the max. + */ + +[scriptable, uuid(61792520-82C2-11d3-AF76-00A024FFC08C)] +interface nsIScrollable : nsISupports +{ + /* + Constants declaring the two scroll orientations a scroll bar can be in. + vertScroll - Vertical scrolling. When passing this in to a scroll position + method you are requesting or setting the positions for the vertical + scroll bar. + horizScroll - Horizontal scrolling. When passing this in to a scroll + position you are requesting or setting the positions for the horizontal + scroll bar. + */ + const long vertScroll = 1; + const long horizScroll = 2; + + /* + 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. + */ + void getCurScrollPos(in long scrollOrientation, out long curPos); + void setCurScrollPos(in long scrollOrientation, in long curPos); + + /* + 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. + */ + void getScrollRange(in long scrollOrientation, out long minPos, out long maxPos); + void setScrollRange(in long scrollOrientation, in long minPos, in long maxPos); +}; \ No newline at end of file diff --git a/mozilla/docshell/html/makefile.win b/mozilla/docshell/html/makefile.win new file mode 100644 index 00000000000..6077b734250 --- /dev/null +++ b/mozilla/docshell/html/makefile.win @@ -0,0 +1,47 @@ +#!nmake +# +# 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 + +DEPTH=..\.. +MODULE=docshell_html + +MAKE_OBJ_TYPE=DLL +DLLNAME=htmldshl +DLL=.\$(OBJDIR)\$(DLLNAME).dll + +XPIDLSRCS= \ + .\nsIHTMLDocShell.idl \ + $(NULL) + +#CPP_OBJS= \ +# .\$(OBJDIR)\nsCNativeAppImpl.obj \ +# .\$(OBJDIR)\nsCNativeAppModule.obj \ +# $(NULL) + +#LLIBS= \ +# $(DIST)\lib\xpcom.lib \ +# $(LIBNSPR) + +include <$(DEPTH)\config\rules.mak> +include <$(DEPTH)\config\config.mak> + +#install:: $(DLL) +# $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components +# $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib diff --git a/mozilla/docshell/html/nsIHTMLDocShell.idl b/mozilla/docshell/html/nsIHTMLDocShell.idl new file mode 100644 index 00000000000..1d01fb85528 --- /dev/null +++ b/mozilla/docshell/html/nsIHTMLDocShell.idl @@ -0,0 +1,37 @@ +/* -*- 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 + */ + +#include "nsISupports.idl" +#include "domstubs.idl" + +/** + * The nsIHTMLDocShell + */ + +[scriptable, uuid(69E5DE03-7B8B-11d3-AF61-00A024FFC08C)] +interface nsIHTMLDocShell : nsISupports +{ + /* + Scrolls to a given DOM content node. + */ + void ScrollToNode(in nsIDOMNode node); +}; diff --git a/mozilla/docshell/makefile.win b/mozilla/docshell/makefile.win new file mode 100644 index 00000000000..043e761c7df --- /dev/null +++ b/mozilla/docshell/makefile.win @@ -0,0 +1,26 @@ +#!nmake +# +# 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 + +DEPTH=.. + +DIRS=base html + +include <$(DEPTH)\config\rules.mak>