2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIMarkupDocumentViewer
|
|
|
|
* This interface describes the properties of a content viewer
|
|
|
|
* for a markup document - HTML or XML
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIDOMNode;
|
|
|
|
|
2012-05-05 06:25:45 -07:00
|
|
|
%{C++
|
2013-09-22 16:25:21 -07:00
|
|
|
template<class T> class nsCOMPtr;
|
|
|
|
template<class T> class nsTArray;
|
2012-05-05 06:25:45 -07:00
|
|
|
%}
|
|
|
|
|
|
|
|
interface nsIMarkupDocumentViewer;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-05-05 06:25:45 -07:00
|
|
|
[ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
|
|
|
|
|
2013-10-01 12:52:13 -07:00
|
|
|
[scriptable, uuid(7aea9561-5346-401c-b40e-418688da2d0d)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIMarkupDocumentViewer : nsISupports
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
Scrolls to a given DOM content node.
|
|
|
|
*/
|
|
|
|
void scrollToNode(in nsIDOMNode node);
|
|
|
|
|
|
|
|
/** The amount by which to scale all text. Default is 1.0. */
|
|
|
|
attribute float textZoom;
|
|
|
|
|
2007-07-25 20:34:16 -07:00
|
|
|
/** The amount by which to scale all lengths. Default is 1.0. */
|
|
|
|
attribute float fullZoom;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/** Disable entire author style level (including HTML presentation hints) */
|
|
|
|
attribute boolean authorStyleDisabled;
|
|
|
|
|
2013-01-18 06:27:03 -08:00
|
|
|
/**
|
|
|
|
* XXX comm-central only: bug 829543. Not the Character Encoding menu in
|
|
|
|
* browser!
|
|
|
|
*/
|
2007-03-22 10:30:00 -07:00
|
|
|
attribute ACString forceCharacterSet;
|
|
|
|
|
2013-01-18 06:27:03 -08:00
|
|
|
/**
|
|
|
|
* XXX comm-central only: bug 829543.
|
|
|
|
*/
|
2007-03-22 10:30:00 -07:00
|
|
|
attribute ACString hintCharacterSet;
|
|
|
|
|
2013-01-18 06:27:03 -08:00
|
|
|
/**
|
|
|
|
* XXX comm-central only: bug 829543.
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
attribute int32_t hintCharacterSetSource;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
//void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-11-19 15:18:21 -08:00
|
|
|
/**
|
|
|
|
* Requests the size of the content to the container.
|
|
|
|
*/
|
|
|
|
void getContentSize(out long width, out long height);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-05-05 06:25:45 -07:00
|
|
|
/** The minimum font size */
|
|
|
|
attribute long minFontSize;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Append |this| and all of its descendants to the given array,
|
|
|
|
* in depth-first pre-order traversal.
|
|
|
|
*/
|
|
|
|
[noscript] void appendSubtree(in nsIMarkupDocumentViewerTArray array);
|
2011-03-10 20:33:43 -08:00
|
|
|
|
2012-09-05 14:39:34 -07:00
|
|
|
/**
|
|
|
|
* Set the maximum line width for the document.
|
|
|
|
* NOTE: This will generate a reflow!
|
|
|
|
*
|
|
|
|
* @param maxLineWidth The maximum width of any line boxes on the page,
|
|
|
|
* in CSS pixels.
|
|
|
|
*/
|
|
|
|
void changeMaxLineBoxWidth(in int32_t maxLineBoxWidth);
|
2013-07-17 08:39:19 -07:00
|
|
|
|
2013-10-01 12:52:13 -07:00
|
|
|
/**
|
|
|
|
* Instruct the refresh driver to discontinue painting until further
|
|
|
|
* notice.
|
|
|
|
*/
|
|
|
|
void pausePainting();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instruct the refresh driver to resume painting after a previous call to
|
|
|
|
* pausePainting().
|
|
|
|
*/
|
|
|
|
void resumePainting();
|
|
|
|
|
2013-07-17 08:39:19 -07:00
|
|
|
/*
|
|
|
|
* Render the document as if being viewed on a device with the specified
|
|
|
|
* media type. This will cause a reflow.
|
|
|
|
*
|
|
|
|
* @param mediaType The media type to be emulated
|
|
|
|
*/
|
|
|
|
void emulateMedium(in AString aMediaType);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Restore the viewer's natural media type
|
|
|
|
*/
|
|
|
|
void stopEmulatingMedium();
|
2011-03-10 20:33:43 -08:00
|
|
|
};
|