docshell/base/nsIMarkupDocumentViewer.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/base/nsIMarkupDocumentViewer.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,109 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +/**
    1.11 + * The nsIMarkupDocumentViewer
    1.12 + * This interface describes the properties of a content viewer 
    1.13 + * for a markup document - HTML or XML
    1.14 + */
    1.15 +
    1.16 +#include "nsISupports.idl"
    1.17 +
    1.18 +interface nsIDOMNode;
    1.19 +
    1.20 +%{C++
    1.21 +template<class T> class nsCOMPtr;
    1.22 +template<class T> class nsTArray;
    1.23 +%}
    1.24 +
    1.25 +interface nsIMarkupDocumentViewer;
    1.26 +
    1.27 +[ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
    1.28 +
    1.29 +[scriptable, uuid(7aea9561-5346-401c-b40e-418688da2d0d)]
    1.30 +interface nsIMarkupDocumentViewer : nsISupports
    1.31 +{
    1.32 +
    1.33 +	/*
    1.34 +	Scrolls to a given DOM content node. 
    1.35 +	*/
    1.36 +	void scrollToNode(in nsIDOMNode node);
    1.37 +
    1.38 +	/** The amount by which to scale all text. Default is 1.0. */
    1.39 +	attribute float textZoom;
    1.40 +
    1.41 +	/** The amount by which to scale all lengths. Default is 1.0. */
    1.42 +	attribute float fullZoom;
    1.43 +
    1.44 +	/** Disable entire author style level (including HTML presentation hints) */
    1.45 +	attribute boolean authorStyleDisabled;
    1.46 +
    1.47 +	/**
    1.48 +	 * XXX comm-central only: bug 829543. Not the Character Encoding menu in 
    1.49 +     * browser!
    1.50 +	 */
    1.51 +	attribute ACString forceCharacterSet;
    1.52 +
    1.53 +	/**
    1.54 +	 * XXX comm-central only: bug 829543.
    1.55 +	 */
    1.56 +	attribute ACString hintCharacterSet;
    1.57 +
    1.58 +	/**
    1.59 +	 * XXX comm-central only: bug 829543.
    1.60 +	 */
    1.61 +	attribute int32_t hintCharacterSetSource;
    1.62 +
    1.63 +	//void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource);
    1.64 +
    1.65 +  /**
    1.66 +   * Requests the size of the content to the container.
    1.67 +   */
    1.68 +  void getContentSize(out long width, out long height);
    1.69 +
    1.70 +  /** The minimum font size  */
    1.71 +  attribute long minFontSize;
    1.72 +
    1.73 +  /**
    1.74 +   * Append |this| and all of its descendants to the given array,
    1.75 +   * in depth-first pre-order traversal.
    1.76 +   */
    1.77 +  [noscript] void appendSubtree(in nsIMarkupDocumentViewerTArray array);
    1.78 +
    1.79 +  /**
    1.80 +   * Set the maximum line width for the document.
    1.81 +   * NOTE: This will generate a reflow!
    1.82 +   *
    1.83 +   * @param maxLineWidth The maximum width of any line boxes on the page,
    1.84 +   *        in CSS pixels.
    1.85 +   */
    1.86 +  void changeMaxLineBoxWidth(in int32_t maxLineBoxWidth);
    1.87 +
    1.88 +  /**
    1.89 +   * Instruct the refresh driver to discontinue painting until further
    1.90 +   * notice.
    1.91 +   */
    1.92 +  void pausePainting();
    1.93 +
    1.94 +  /**
    1.95 +   * Instruct the refresh driver to resume painting after a previous call to
    1.96 +   * pausePainting().
    1.97 +   */
    1.98 +  void resumePainting();
    1.99 +
   1.100 +  /*
   1.101 +   * Render the document as if being viewed on a device with the specified
   1.102 +   * media type. This will cause a reflow.
   1.103 +   *
   1.104 +   * @param mediaType The media type to be emulated
   1.105 +   */
   1.106 +  void emulateMedium(in AString aMediaType);
   1.107 +
   1.108 +  /*
   1.109 +   * Restore the viewer's natural media type
   1.110 +   */
   1.111 +  void stopEmulatingMedium();
   1.112 +};

mercurial