DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (31ec81b5d7bb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * 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/. */

/**
 * The nsIMarkupDocumentViewer
 * This interface describes the properties of a content viewer 
 * for a markup document - HTML or XML
 */

#include "nsISupports.idl"

interface nsIDOMNode;

%{C++
template<class T> class nsCOMPtr;
template<class T> class nsTArray;
%}

interface nsIMarkupDocumentViewer;

[ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);

[scriptable, uuid(6acfadef-22ee-4924-be6c-776e8def6e1b)]
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;

	/** The amount by which to scale all lengths. Default is 1.0. */
	attribute float fullZoom;

	/** Disable entire author style level (including HTML presentation hints) */
	attribute boolean authorStyleDisabled;

	/**
	 * XXX comm-central only: bug 829543. Not the Character Encoding menu in 
     * browser!
	 */
	attribute ACString forceCharacterSet;

	/**
	 * XXX comm-central only: bug 829543.
	 */
	attribute ACString hintCharacterSet;

	/**
	 * XXX comm-central only: bug 829543.
	 */
	attribute int32_t hintCharacterSetSource;

	//void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource);

  /**
   * Requests the size of the content to the container.
   */
  void getContentSize(out long width, out long height);

  /**
   * Options for Bidi presentation.
   *
   * Use these attributes to access the individual Bidi options.
   */

  /**
   * bidiTextDirection: the default direction for the layout of bidirectional text.
   *                    1 - left to right
   *                    2 - right to left
   */
  attribute octet bidiTextDirection;
  
  /**
   * bidiTextType: the ordering of bidirectional text. This may be either "logical"
   * or "visual". Logical text will be reordered for presentation using the Unicode
   * Bidi Algorithm. Visual text will be displayed without reordering. 
   *               1 - the default order for the charset
   *               2 - logical order
   *               3 - visual order
   */
  attribute octet bidiTextType;

  /**
   * bidiNumeral: the type of numerals to display. 
   *              1 - depending on context, default is Arabic numerals
   *              2 - depending on context, default is Hindi numerals
   *              3 - Arabic numerals
   *              4 - Hindi numerals
   */
  attribute octet bidiNumeral;

  /**
   * bidiSupport: whether to use platform bidi support or Mozilla's bidi support
   *              1 - Use Mozilla's bidi support
   *              2 - Use the platform bidi support
   *              3 - Disable bidi support
   */
  attribute octet bidiSupport;

  /**
   * Use this attribute to access all the Bidi options in one operation
   */
  attribute uint32_t bidiOptions;

  /** 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);

  /**
   * 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);

  /*
   * 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();
};