1998-04-13 20:24:54 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* 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.
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1998-04-13 20:24:54 +00:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:40:37 +00:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
2000-05-15 03:36:34 +00:00
|
|
|
* Steve Clark (buster@netscape.com)
|
|
|
|
*
|
|
|
|
* IBM Corporation
|
|
|
|
*
|
|
|
|
* This Original Code has been modified by IBM Corporation.
|
|
|
|
* Modifications made by IBM described herein are
|
|
|
|
* Copyright (c) International Business Machines
|
|
|
|
* Corporation, 2000
|
|
|
|
*
|
|
|
|
* Modifications to Mozilla code or documentation
|
|
|
|
* identified per MPL Section 3.3
|
|
|
|
*
|
|
|
|
* Date Modified by Description of modification
|
|
|
|
* 05/03/2000 IBM Corp. Observer related defines for reflow
|
1998-04-13 20:24:54 +00:00
|
|
|
*/
|
|
|
|
#ifndef nsIPresShell_h___
|
|
|
|
#define nsIPresShell_h___
|
|
|
|
|
|
|
|
#include "nslayout.h"
|
1998-06-03 15:41:39 +00:00
|
|
|
#include "nsISupports.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
#include "nsCoord.h"
|
1999-07-18 02:59:09 +00:00
|
|
|
#include "nsIDOMSelection.h"
|
2000-01-12 08:28:24 +00:00
|
|
|
#include "nsIReflowCommand.h"
|
2000-04-24 04:41:27 +00:00
|
|
|
#include "nsGUIEvent.h"
|
1999-02-13 04:45:44 +00:00
|
|
|
|
2000-04-27 07:37:12 +00:00
|
|
|
#include "nsISelectionController.h" //for the selection enums.
|
|
|
|
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIContent;
|
2000-03-23 00:34:54 +00:00
|
|
|
class nsIContentIterator;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIDocument;
|
1998-06-03 15:41:39 +00:00
|
|
|
class nsIDocumentObserver;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIFrame;
|
|
|
|
class nsIPresContext;
|
|
|
|
class nsIStyleSet;
|
|
|
|
class nsIViewManager;
|
1998-06-25 04:24:45 +00:00
|
|
|
class nsIDeviceContext;
|
1998-10-02 01:12:39 +00:00
|
|
|
class nsIRenderingContext;
|
1998-12-07 03:43:02 +00:00
|
|
|
class nsIPageSequenceFrame;
|
1999-01-23 07:00:39 +00:00
|
|
|
class nsString;
|
|
|
|
class nsStringArray;
|
1999-02-13 04:45:44 +00:00
|
|
|
class nsICaret;
|
1999-02-25 19:55:06 +00:00
|
|
|
class nsIStyleContext;
|
1999-07-18 02:27:19 +00:00
|
|
|
class nsIFrameSelection;
|
1999-08-04 04:02:40 +00:00
|
|
|
class nsIFrameManager;
|
1999-08-30 22:38:58 +00:00
|
|
|
class nsILayoutHistoryState;
|
1999-12-04 23:49:50 +00:00
|
|
|
class nsIArena;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
#define NS_IPRESSHELL_IID \
|
|
|
|
{ 0x76e79c60, 0x944e, 0x11d1, \
|
|
|
|
{0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
|
|
|
|
|
1999-07-19 18:38:02 +00:00
|
|
|
// Constants uses for ScrollFrameIntoView() function
|
|
|
|
#define NS_PRESSHELL_SCROLL_TOP 0
|
|
|
|
#define NS_PRESSHELL_SCROLL_BOTTOM 100
|
|
|
|
#define NS_PRESSHELL_SCROLL_LEFT 0
|
|
|
|
#define NS_PRESSHELL_SCROLL_RIGHT 100
|
|
|
|
#define NS_PRESSHELL_SCROLL_CENTER 50
|
|
|
|
#define NS_PRESSHELL_SCROLL_ANYWHERE -1
|
2000-01-25 14:31:41 +00:00
|
|
|
#define NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE -2
|
1999-02-18 22:51:46 +00:00
|
|
|
|
2000-05-15 03:36:34 +00:00
|
|
|
// Observer related defines
|
|
|
|
#define NS_PRESSHELL_REFLOW_TOPIC "REFLOW" // Observer Topic
|
|
|
|
#define NS_PRESSHELL_INITIAL_REFLOW "INITIAL REFLOW" // Observer Data
|
|
|
|
#define NS_PRESSHELL_RESIZE_REFLOW "RESIZE REFLOW" // Observer Data
|
|
|
|
#define NS_PRESSHELL_STYLE_CHANGE_REFLOW "STYLE CHANGE REFLOW" // Observer Data
|
1999-07-21 00:12:23 +00:00
|
|
|
|
2000-03-22 23:19:10 +00:00
|
|
|
// debug VerifyReflow flags
|
|
|
|
#define VERIFY_REFLOW_ON 0x01
|
|
|
|
#define VERIFY_REFLOW_NOISY 0x02
|
|
|
|
#define VERIFY_REFLOW_ALL 0x04
|
|
|
|
#define VERIFY_REFLOW_DUMP_COMMANDS 0x08
|
|
|
|
#define VERIFY_REFLOW_NOISY_RC 0x10
|
|
|
|
#define VERIFY_REFLOW_REALLY_NOISY_RC 0x20
|
|
|
|
#define VERIFY_REFLOW_INCLUDE_SPACE_MANAGER 0x40
|
|
|
|
#define VERIFY_REFLOW_DURING_RESIZE_REFLOW 0x80
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Presentation shell interface. Presentation shells are the
|
|
|
|
* controlling point for managing the presentation of a document. The
|
|
|
|
* presentation shell holds a live reference to the document, the
|
|
|
|
* presentation context, the style manager, the style set and the root
|
|
|
|
* frame. <p>
|
|
|
|
*
|
|
|
|
* When this object is Release'd, it will release the document, the
|
|
|
|
* presentation context, the style manager, the style set and the root
|
|
|
|
* frame.
|
|
|
|
*/
|
1998-06-03 15:41:39 +00:00
|
|
|
class nsIPresShell : public nsISupports {
|
1998-04-13 20:24:54 +00:00
|
|
|
public:
|
1999-03-03 19:48:57 +00:00
|
|
|
static const nsIID& GetIID() { static nsIID iid = NS_IPRESSHELL_IID; return iid; }
|
1999-03-03 01:51:21 +00:00
|
|
|
|
1998-06-03 15:41:39 +00:00
|
|
|
NS_IMETHOD Init(nsIDocument* aDocument,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIViewManager* aViewManager,
|
|
|
|
nsIStyleSet* aStyleSet) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-12-04 23:49:50 +00:00
|
|
|
// All frames owned by the shell are allocated from an arena. They are also recycled
|
|
|
|
// using free lists (separate free lists being maintained for each size_t).
|
|
|
|
// Methods for recycling frames.
|
|
|
|
NS_IMETHOD AllocateFrame(size_t aSize, void** aResult) = 0;
|
|
|
|
NS_IMETHOD FreeFrame(size_t aSize, void* aFreeChunk) = 0;
|
2000-03-31 07:02:06 +00:00
|
|
|
|
|
|
|
// Dynamic stack memory allocation
|
|
|
|
NS_IMETHOD PushStackMemory() = 0;
|
|
|
|
NS_IMETHOD PopStackMemory() = 0;
|
|
|
|
NS_IMETHOD AllocateStackMemory(size_t aSize, void** aResult) = 0;
|
1999-12-04 23:49:50 +00:00
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetDocument(nsIDocument** aResult) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetPresContext(nsIPresContext** aResult) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetViewManager(nsIViewManager** aResult) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetStyleSet(nsIStyleSet** aResult) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-01-23 07:00:39 +00:00
|
|
|
NS_IMETHOD GetActiveAlternateStyleSheet(nsString& aSheetTitle) = 0;
|
1999-02-12 17:45:58 +00:00
|
|
|
|
1999-01-23 07:00:39 +00:00
|
|
|
NS_IMETHOD SelectAlternateStyleSheet(const nsString& aSheetTitle) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gather titles of all selectable (alternate and preferred) style sheets
|
|
|
|
* fills void array with nsString* caller must free strings
|
|
|
|
*/
|
|
|
|
NS_IMETHOD ListAlternateStyleSheets(nsStringArray& aTitleList) = 0;
|
|
|
|
|
1999-07-18 02:27:19 +00:00
|
|
|
/**
|
|
|
|
* GetFrameSelection will return the Frame based selection API you
|
|
|
|
* cannot go back and forth anymore with QI with nsIDOM sel and nsIFrame sel.
|
|
|
|
*/
|
2000-04-17 07:13:57 +00:00
|
|
|
NS_IMETHOD GetFrameSelection(nsIFrameSelection** aSelection) = 0;
|
1998-05-09 03:21:34 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
// Make shell be a document observer
|
1998-12-29 04:56:31 +00:00
|
|
|
NS_IMETHOD BeginObservingDocument() = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
// Make shell stop being a document observer
|
1998-12-29 04:56:31 +00:00
|
|
|
NS_IMETHOD EndObservingDocument() = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-09-10 19:32:14 +00:00
|
|
|
/**
|
|
|
|
* Perform the initial reflow. Constructs the frame for the root content
|
|
|
|
* object and then reflows the frame model into the specified width and
|
|
|
|
* height.
|
|
|
|
*
|
|
|
|
* The coordinates for aWidth and aHeight must be in standard nscoord's.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight) = 0;
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Reflow the frame model into a new width and height. The
|
|
|
|
* coordinates for aWidth and aHeight must be in standard nscoord's.
|
|
|
|
*/
|
1998-08-28 02:49:49 +00:00
|
|
|
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-11-06 16:16:01 +00:00
|
|
|
/**
|
|
|
|
* Reflow the frame model with a reflow reason of eReflowReason_StyleChange
|
|
|
|
*/
|
|
|
|
NS_IMETHOD StyleChangeReflow() = 0;
|
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetRootFrame(nsIFrame** aFrame) const = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-12-07 03:43:02 +00:00
|
|
|
/**
|
|
|
|
* Returns the page sequence frame associated with the frame hierarchy.
|
|
|
|
* Returns NULL if not a paginated view.
|
|
|
|
*/
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const = 0;
|
1998-12-07 03:43:02 +00:00
|
|
|
|
1998-12-29 04:45:18 +00:00
|
|
|
/**
|
1999-08-05 03:09:22 +00:00
|
|
|
* Gets the primary frame associated with the content object. This is a
|
|
|
|
* helper function that just forwards the request to the frame manager.
|
1998-12-29 04:45:18 +00:00
|
|
|
*
|
|
|
|
* The primary frame is the frame that is most closely associated with the
|
|
|
|
* content. A frame is more closely associated with the content that another
|
|
|
|
* frame if the one frame contains directly or indirectly the other frame (e.g.,
|
|
|
|
* when a frame is scrolled there is a scroll frame that contains the frame
|
|
|
|
* being scrolled). The primary frame is always the first-in-flow.
|
|
|
|
*
|
|
|
|
* In the case of absolutely positioned elements and floated elements,
|
|
|
|
* the primary frame is the frame that is out of the flow and not the
|
|
|
|
* placeholder frame.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
|
1999-02-12 17:45:58 +00:00
|
|
|
nsIFrame** aPrimaryFrame) const = 0;
|
1999-02-10 23:21:22 +00:00
|
|
|
|
1999-02-25 19:55:06 +00:00
|
|
|
/** Returns the style context associated with the frame.
|
|
|
|
* Used by code outside of layout that can't use nsIFrame methods to get
|
|
|
|
* the style context directly.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetStyleContextFor(nsIFrame* aFrame,
|
|
|
|
nsIStyleContext** aStyleContext) const = 0;
|
|
|
|
|
1999-02-10 23:21:22 +00:00
|
|
|
/**
|
|
|
|
* Returns a layout object associated with the primary frame for the content object.
|
|
|
|
*
|
|
|
|
* @param aContent the content object for which we seek a layout object
|
|
|
|
* @param aResult the resulting layout object as an nsISupports, if found. Refcounted.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetLayoutObjectFor(nsIContent* aContent,
|
|
|
|
nsISupports** aResult) const = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2000-03-03 23:15:29 +00:00
|
|
|
/**
|
|
|
|
* Returns the object that acts as a subshell for aContent.
|
|
|
|
* For example, for an html frame aResult will be an nsIDocShell.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetSubShellFor(nsIContent* aContent,
|
|
|
|
nsISupports** aResult) const = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Establish a relationship between aContent and aSubShell.
|
|
|
|
* aSubShell will be returned from GetSubShellFor(aContent, ...);
|
|
|
|
*/
|
|
|
|
NS_IMETHOD SetSubShellFor(nsIContent* aContent,
|
|
|
|
nsISupports* aSubShell) = 0;
|
|
|
|
|
1998-12-29 03:38:16 +00:00
|
|
|
/**
|
1999-08-05 03:09:22 +00:00
|
|
|
* Gets the placeholder frame associated with the specified frame. This is
|
|
|
|
* a helper frame that forwards the request to the frame manager.
|
1998-12-29 03:38:16 +00:00
|
|
|
*/
|
|
|
|
NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame,
|
1999-02-12 17:45:58 +00:00
|
|
|
nsIFrame** aPlaceholderFrame) const = 0;
|
1998-12-29 03:38:16 +00:00
|
|
|
|
1999-07-16 23:25:15 +00:00
|
|
|
/**
|
|
|
|
* Reflow commands
|
|
|
|
*/
|
1998-12-29 04:56:31 +00:00
|
|
|
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
|
2000-01-12 08:28:24 +00:00
|
|
|
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType) = 0;
|
2000-04-17 07:13:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Flush all pending notifications such that the presentation is
|
|
|
|
* in sync with the content.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD FlushPendingNotifications() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reflow batching
|
|
|
|
*/
|
|
|
|
NS_IMETHOD BeginReflowBatching() = 0;
|
|
|
|
NS_IMETHOD EndReflowBatching(PRBool aFlushPendingReflows) = 0;
|
|
|
|
NS_IMETHOD GetReflowBatchingStatus(PRBool* aIsBatching) = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD ClearFrameRefs(nsIFrame* aFrame) = 0;
|
|
|
|
|
1998-10-02 01:12:39 +00:00
|
|
|
/**
|
1999-07-16 23:25:15 +00:00
|
|
|
* Given a frame, create a rendering context suitable for use with
|
1998-10-02 01:12:39 +00:00
|
|
|
* the frame.
|
|
|
|
*/
|
1999-02-12 17:45:58 +00:00
|
|
|
NS_IMETHOD CreateRenderingContext(nsIFrame *aFrame,
|
|
|
|
nsIRenderingContext** aContext) = 0;
|
1998-10-02 01:12:39 +00:00
|
|
|
|
1999-07-16 23:25:15 +00:00
|
|
|
/**
|
|
|
|
* Notification that we were unable to render a replaced element.
|
|
|
|
* Called when the replaced element can not be rendered, and we should
|
|
|
|
* instead render the element's contents.
|
|
|
|
* The content object associated with aFrame should either be a IMG
|
|
|
|
* element, an OBJECT element, or an APPLET element
|
|
|
|
*/
|
1999-02-05 18:25:29 +00:00
|
|
|
NS_IMETHOD CantRenderReplacedElement(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame) = 0;
|
|
|
|
|
1999-02-13 04:45:44 +00:00
|
|
|
|
1999-02-12 05:39:33 +00:00
|
|
|
/**
|
|
|
|
* Scrolls the view of the document so that the anchor with the specified
|
|
|
|
* name is displayed at the top of the window
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GoToAnchor(const nsString& aAnchorName) const = 0;
|
|
|
|
|
1999-02-18 22:51:46 +00:00
|
|
|
/**
|
|
|
|
* Scrolls the view of the document so that the frame is displayed at the
|
|
|
|
* top of the window.
|
1999-07-19 18:38:02 +00:00
|
|
|
*
|
|
|
|
* @param aFrame The frame to scroll into view
|
|
|
|
* @param aVPercent How to align the frame vertically. A value of 0
|
|
|
|
* (NS_PRESSHELL_SCROLL_TOP) means the frame's upper edge is
|
|
|
|
* aligned with the top edge of the visible area. A value of
|
|
|
|
* 100 (NS_PRESSHELL_SCROLL_BOTTOM) means the frame's bottom
|
|
|
|
* edge is aligned with the bottom edge of the visible area.
|
|
|
|
* For values in between, the point "aVPercent" down the frame
|
|
|
|
* is placed at the point "aVPercent" down the visible area. A
|
|
|
|
* value of 50 (NS_PRESSHELL_SCROLL_CENTER) centers the frame
|
|
|
|
* vertically. A value of NS_PRESSHELL_SCROLL_ANYWHERE means move
|
|
|
|
* the frame the minimum amount necessary in order for the entire
|
|
|
|
* frame to be visible vertically (if possible)
|
|
|
|
* @param aHPercent How to align the frame horizontally. A value of 0
|
|
|
|
* (NS_PRESSHELL_SCROLL_LEFT) means the frame's left edge is
|
|
|
|
* aligned with the left edge of the visible area. A value of
|
|
|
|
* 100 (NS_PRESSHELL_SCROLL_RIGHT) means the frame's right
|
|
|
|
* edge is aligned with the right edge of the visible area.
|
|
|
|
* For values in between, the point "aVPercent" across the frame
|
|
|
|
* is placed at the point "aVPercent" across the visible area.
|
|
|
|
* A value of 50 (NS_PRESSHELL_SCROLL_CENTER) centers the frame
|
|
|
|
* horizontally . A value of NS_PRESSHELL_SCROLL_ANYWHERE means move
|
|
|
|
* the frame the minimum amount necessary in order for the entire
|
|
|
|
* frame to be visible horizontally (if possible)
|
1999-02-18 22:51:46 +00:00
|
|
|
*/
|
|
|
|
NS_IMETHOD ScrollFrameIntoView(nsIFrame *aFrame,
|
1999-07-19 18:38:02 +00:00
|
|
|
PRIntn aVPercent,
|
|
|
|
PRIntn aHPercent) const = 0;
|
1999-02-18 22:51:46 +00:00
|
|
|
|
1999-07-16 23:25:15 +00:00
|
|
|
/**
|
|
|
|
* Notification sent by a frame informing the pres shell that it is about to
|
|
|
|
* be destroyed.
|
|
|
|
* This allows any outstanding references to the frame to be cleaned up
|
|
|
|
*/
|
|
|
|
NS_IMETHOD NotifyDestroyingFrame(nsIFrame* aFrame) = 0;
|
|
|
|
|
1999-08-04 04:02:40 +00:00
|
|
|
/**
|
|
|
|
* Returns the frame manager object
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetFrameManager(nsIFrameManager** aFrameManager) const = 0;
|
|
|
|
|
1999-03-01 19:21:01 +00:00
|
|
|
/**
|
1999-04-22 07:03:14 +00:00
|
|
|
* Notify the Clipboard that we have something to copy.
|
1999-03-01 19:21:01 +00:00
|
|
|
*/
|
1999-04-07 03:56:07 +00:00
|
|
|
NS_IMETHOD DoCopy() = 0;
|
1999-03-01 19:21:01 +00:00
|
|
|
|
1999-02-13 04:45:44 +00:00
|
|
|
/**
|
|
|
|
* Get the caret, if it exists. AddRefs it.
|
|
|
|
*/
|
1999-08-04 20:46:16 +00:00
|
|
|
NS_IMETHOD GetCaret(nsICaret **aOutCaret) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should the images have borders etc. Actual visual effects are determined
|
|
|
|
* by the frames. Visual effects may not effect layout, only display.
|
|
|
|
* Takes effect on next repaint, does not force a repaint itself.
|
|
|
|
*
|
|
|
|
* @param aEnabled if PR_TRUE, visual selection effects are enabled
|
|
|
|
* if PR_FALSE visual selection effects are disabled
|
|
|
|
* @return always NS_OK
|
|
|
|
*/
|
|
|
|
NS_IMETHOD SetDisplayNonTextSelection(PRBool aInEnable) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the current state of non text selection effects
|
|
|
|
* @param aEnabled [OUT] set to the current state of non text selection,
|
|
|
|
* as set by SetDisplayNonTextSelection
|
|
|
|
* @return if aOutEnabled==null, returns NS_ERROR_INVALID_ARG
|
|
|
|
* else NS_OK
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetDisplayNonTextSelection(PRBool *aOutEnabled) = 0;
|
1999-05-17 00:21:18 +00:00
|
|
|
|
2000-04-24 04:41:27 +00:00
|
|
|
/**
|
|
|
|
* Interface to dispatch events via the presshell
|
|
|
|
*/
|
|
|
|
NS_IMETHOD HandleEventWithTarget(nsEvent* aEvent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsEventStatus* aStatus) = 0;
|
|
|
|
|
1999-08-30 22:38:58 +00:00
|
|
|
/**
|
1999-08-31 14:35:50 +00:00
|
|
|
* Get and set the history state for the current document
|
1999-08-30 22:38:58 +00:00
|
|
|
*/
|
1999-12-06 07:44:18 +00:00
|
|
|
|
2000-03-24 03:36:58 +00:00
|
|
|
NS_IMETHOD CaptureHistoryState(nsILayoutHistoryState** aLayoutHistoryState) = 0;
|
1999-08-30 22:38:58 +00:00
|
|
|
NS_IMETHOD GetHistoryState(nsILayoutHistoryState** aLayoutHistoryState) = 0;
|
1999-08-31 14:35:50 +00:00
|
|
|
NS_IMETHOD SetHistoryState(nsILayoutHistoryState* aLayoutHistoryState) = 0;
|
1998-07-13 19:49:20 +00:00
|
|
|
|
2000-02-09 15:48:01 +00:00
|
|
|
/**
|
|
|
|
* Determine if reflow is currently locked
|
|
|
|
* @param aIsReflowLocked returns PR_TRUE if reflow is locked, PR_FALSE otherwise
|
|
|
|
*/
|
|
|
|
NS_IMETHOD IsReflowLocked(PRBool* aIsLocked) = 0;
|
|
|
|
|
2000-03-23 00:34:54 +00:00
|
|
|
/**
|
|
|
|
* Returns a content iterator to iterate the generated content nodes.
|
|
|
|
* You must specify whether you want to iterate the "before" generated
|
|
|
|
* content or the "after" generated content. If there is no generated
|
|
|
|
* content of the specified type for the promary frame associated with
|
|
|
|
* with the content object then NULL is returned
|
|
|
|
*/
|
|
|
|
enum GeneratedContentType {Before, After};
|
|
|
|
NS_IMETHOD GetGeneratedContentIterator(nsIContent* aContent,
|
|
|
|
GeneratedContentType aType,
|
|
|
|
nsIContentIterator** aIterator) const = 0;
|
|
|
|
|
1998-07-13 19:49:20 +00:00
|
|
|
/**
|
|
|
|
* See if reflow verification is enabled. To enable reflow verification add
|
|
|
|
* "verifyreflow:1" to your NSPR_LOG_MODULES environment variable
|
|
|
|
* (any non-zero debug level will work). Or, call SetVerifyReflowEnable
|
|
|
|
* with PR_TRUE.
|
|
|
|
*/
|
|
|
|
static NS_LAYOUT PRBool GetVerifyReflowEnable();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the verify-reflow enable flag.
|
|
|
|
*/
|
|
|
|
static NS_LAYOUT void SetVerifyReflowEnable(PRBool aEnabled);
|
1999-08-30 22:38:58 +00:00
|
|
|
|
2000-03-22 23:19:10 +00:00
|
|
|
/**
|
|
|
|
* Get the flags associated with the VerifyReflow debug tool
|
|
|
|
*/
|
|
|
|
static NS_LAYOUT PRInt32 GetVerifyReflowFlags();
|
2000-04-21 14:59:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef MOZ_REFLOW_PERF
|
2000-04-28 23:31:13 +00:00
|
|
|
NS_IMETHOD ClearTotals() = 0;
|
|
|
|
NS_IMETHOD DumpReflows() = 0;
|
2000-04-21 14:59:47 +00:00
|
|
|
NS_IMETHOD CountReflows(const char * aName, PRUint32 aType) = 0;
|
|
|
|
#endif
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new empty presentation shell. Upon success, call Init
|
|
|
|
* before attempting to use the shell.
|
|
|
|
*/
|
|
|
|
extern NS_LAYOUT nsresult
|
|
|
|
NS_NewPresShell(nsIPresShell** aInstancePtrResult);
|
|
|
|
|
|
|
|
#endif /* nsIPresShell_h___ */
|