docshell/base/nsIMarkupDocumentViewer.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:60a4b4231a7a
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/. */
6
7 /**
8 * The nsIMarkupDocumentViewer
9 * This interface describes the properties of a content viewer
10 * for a markup document - HTML or XML
11 */
12
13 #include "nsISupports.idl"
14
15 interface nsIDOMNode;
16
17 %{C++
18 template<class T> class nsCOMPtr;
19 template<class T> class nsTArray;
20 %}
21
22 interface nsIMarkupDocumentViewer;
23
24 [ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
25
26 [scriptable, uuid(7aea9561-5346-401c-b40e-418688da2d0d)]
27 interface nsIMarkupDocumentViewer : nsISupports
28 {
29
30 /*
31 Scrolls to a given DOM content node.
32 */
33 void scrollToNode(in nsIDOMNode node);
34
35 /** The amount by which to scale all text. Default is 1.0. */
36 attribute float textZoom;
37
38 /** The amount by which to scale all lengths. Default is 1.0. */
39 attribute float fullZoom;
40
41 /** Disable entire author style level (including HTML presentation hints) */
42 attribute boolean authorStyleDisabled;
43
44 /**
45 * XXX comm-central only: bug 829543. Not the Character Encoding menu in
46 * browser!
47 */
48 attribute ACString forceCharacterSet;
49
50 /**
51 * XXX comm-central only: bug 829543.
52 */
53 attribute ACString hintCharacterSet;
54
55 /**
56 * XXX comm-central only: bug 829543.
57 */
58 attribute int32_t hintCharacterSetSource;
59
60 //void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource);
61
62 /**
63 * Requests the size of the content to the container.
64 */
65 void getContentSize(out long width, out long height);
66
67 /** The minimum font size */
68 attribute long minFontSize;
69
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);
75
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);
84
85 /**
86 * Instruct the refresh driver to discontinue painting until further
87 * notice.
88 */
89 void pausePainting();
90
91 /**
92 * Instruct the refresh driver to resume painting after a previous call to
93 * pausePainting().
94 */
95 void resumePainting();
96
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);
104
105 /*
106 * Restore the viewer's natural media type
107 */
108 void stopEmulatingMedium();
109 };

mercurial