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