docshell/base/nsIMarkupDocumentViewer.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /**
     8  * The nsIMarkupDocumentViewer
     9  * This interface describes the properties of a content viewer 
    10  * for a markup document - HTML or XML
    11  */
    13 #include "nsISupports.idl"
    15 interface nsIDOMNode;
    17 %{C++
    18 template<class T> class nsCOMPtr;
    19 template<class T> class nsTArray;
    20 %}
    22 interface nsIMarkupDocumentViewer;
    24 [ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
    26 [scriptable, uuid(7aea9561-5346-401c-b40e-418688da2d0d)]
    27 interface nsIMarkupDocumentViewer : nsISupports
    28 {
    30 	/*
    31 	Scrolls to a given DOM content node. 
    32 	*/
    33 	void scrollToNode(in nsIDOMNode node);
    35 	/** The amount by which to scale all text. Default is 1.0. */
    36 	attribute float textZoom;
    38 	/** The amount by which to scale all lengths. Default is 1.0. */
    39 	attribute float fullZoom;
    41 	/** Disable entire author style level (including HTML presentation hints) */
    42 	attribute boolean authorStyleDisabled;
    44 	/**
    45 	 * XXX comm-central only: bug 829543. Not the Character Encoding menu in 
    46      * browser!
    47 	 */
    48 	attribute ACString forceCharacterSet;
    50 	/**
    51 	 * XXX comm-central only: bug 829543.
    52 	 */
    53 	attribute ACString hintCharacterSet;
    55 	/**
    56 	 * XXX comm-central only: bug 829543.
    57 	 */
    58 	attribute int32_t hintCharacterSetSource;
    60 	//void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource);
    62   /**
    63    * Requests the size of the content to the container.
    64    */
    65   void getContentSize(out long width, out long height);
    67   /** The minimum font size  */
    68   attribute long minFontSize;
    70   /**
    71    * Append |this| and all of its descendants to the given array,
    72    * in depth-first pre-order traversal.
    73    */
    74   [noscript] void appendSubtree(in nsIMarkupDocumentViewerTArray array);
    76   /**
    77    * Set the maximum line width for the document.
    78    * NOTE: This will generate a reflow!
    79    *
    80    * @param maxLineWidth The maximum width of any line boxes on the page,
    81    *        in CSS pixels.
    82    */
    83   void changeMaxLineBoxWidth(in int32_t maxLineBoxWidth);
    85   /**
    86    * Instruct the refresh driver to discontinue painting until further
    87    * notice.
    88    */
    89   void pausePainting();
    91   /**
    92    * Instruct the refresh driver to resume painting after a previous call to
    93    * pausePainting().
    94    */
    95   void resumePainting();
    97   /*
    98    * Render the document as if being viewed on a device with the specified
    99    * media type. This will cause a reflow.
   100    *
   101    * @param mediaType The media type to be emulated
   102    */
   103   void emulateMedium(in AString aMediaType);
   105   /*
   106    * Restore the viewer's natural media type
   107    */
   108   void stopEmulatingMedium();
   109 };

mercurial