Skip to content

Commit

Permalink
First landing.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbogard%aol.net committed Oct 15, 1999
1 parent 1a126be commit 575e116
Show file tree
Hide file tree
Showing 9 changed files with 489 additions and 0 deletions.
34 changes: 34 additions & 0 deletions 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 <travis@netscape.com>

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>
50 changes: 50 additions & 0 deletions 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 <travis@netscape.com>
*/

#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;
};
46 changes: 46 additions & 0 deletions 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 <travis@netscape.com>
*/

#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;
};
38 changes: 38 additions & 0 deletions 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 <travis@netscape.com>
*/

#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;
};

141 changes: 141 additions & 0 deletions 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 <travis@netscape.com>
*/

#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;
};
70 changes: 70 additions & 0 deletions 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 <travis@netscape.com>
*/

#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);
};

0 comments on commit 575e116

Please sign in to comment.