embedding/browser/webBrowser/nsIWebBrowserPrint.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIDOMWindow;
michael@0 10 interface nsIPrintSettings;
michael@0 11 interface nsIWebProgressListener;
michael@0 12
michael@0 13 /**
michael@0 14 * nsIWebBrowserPrint corresponds to the main interface
michael@0 15 * for printing an embedded Gecko web browser window/document
michael@0 16 */
michael@0 17 [scriptable, uuid(9A7CA4B0-FBBA-11d4-A869-00105A183419)]
michael@0 18 interface nsIWebBrowserPrint : nsISupports
michael@0 19 {
michael@0 20 /**
michael@0 21 * PrintPreview Navigation Constants
michael@0 22 */
michael@0 23 const short PRINTPREVIEW_GOTO_PAGENUM = 0;
michael@0 24 const short PRINTPREVIEW_PREV_PAGE = 1;
michael@0 25 const short PRINTPREVIEW_NEXT_PAGE = 2;
michael@0 26 const short PRINTPREVIEW_HOME = 3;
michael@0 27 const short PRINTPREVIEW_END = 4;
michael@0 28
michael@0 29 /**
michael@0 30 * Returns a "global" PrintSettings object
michael@0 31 * Creates a new the first time, if one doesn't exist.
michael@0 32 *
michael@0 33 * Then returns the same object each time after that.
michael@0 34 *
michael@0 35 * Initializes the globalPrintSettings from the default printer
michael@0 36 */
michael@0 37 readonly attribute nsIPrintSettings globalPrintSettings;
michael@0 38
michael@0 39 /**
michael@0 40 * Returns a pointer to the PrintSettings object that
michael@0 41 * that was passed into either "print" or "print preview"
michael@0 42 *
michael@0 43 * This enables any consumers of the interface to have access
michael@0 44 * to the "current" PrintSetting at later points in the execution
michael@0 45 */
michael@0 46 readonly attribute nsIPrintSettings currentPrintSettings;
michael@0 47
michael@0 48 /**
michael@0 49 * Returns a pointer to the current child DOMWindow
michael@0 50 * that is being print previewed. (FrameSet Frames)
michael@0 51 *
michael@0 52 * Returns null if parent document is not a frameset or the entire FrameSet
michael@0 53 * document is being print previewed
michael@0 54 *
michael@0 55 * This enables any consumers of the interface to have access
michael@0 56 * to the "current" child DOMWindow at later points in the execution
michael@0 57 */
michael@0 58 readonly attribute nsIDOMWindow currentChildDOMWindow;
michael@0 59
michael@0 60 /**
michael@0 61 * Returns whether it is in Print mode
michael@0 62 */
michael@0 63 readonly attribute boolean doingPrint;
michael@0 64
michael@0 65 /**
michael@0 66 * Returns whether it is in Print Preview mode
michael@0 67 */
michael@0 68 readonly attribute boolean doingPrintPreview;
michael@0 69
michael@0 70 /**
michael@0 71 * This returns whether the current document is a frameset document
michael@0 72 */
michael@0 73 readonly attribute boolean isFramesetDocument;
michael@0 74
michael@0 75 /**
michael@0 76 * This returns whether the current document is a frameset document
michael@0 77 */
michael@0 78 readonly attribute boolean isFramesetFrameSelected;
michael@0 79
michael@0 80 /**
michael@0 81 * This returns whether there is an IFrame selected
michael@0 82 */
michael@0 83 readonly attribute boolean isIFrameSelected;
michael@0 84
michael@0 85 /**
michael@0 86 * This returns whether there is a "range" selection
michael@0 87 */
michael@0 88 readonly attribute boolean isRangeSelection;
michael@0 89
michael@0 90 /**
michael@0 91 * This returns the total number of pages for the Print Preview
michael@0 92 */
michael@0 93 readonly attribute long printPreviewNumPages;
michael@0 94
michael@0 95 /**
michael@0 96 * Print the specified DOM window
michael@0 97 *
michael@0 98 * @param aThePrintSettings - Printer Settings for the print job, if aThePrintSettings is null
michael@0 99 * then the global PS will be used.
michael@0 100 * @param aWPListener - is updated during the print
michael@0 101 * @return void
michael@0 102 */
michael@0 103 void print(in nsIPrintSettings aThePrintSettings,
michael@0 104 in nsIWebProgressListener aWPListener);
michael@0 105
michael@0 106 /**
michael@0 107 * Print Preview the specified DOM window
michael@0 108 *
michael@0 109 * @param aThePrintSettings - Printer Settings for the print preview, if aThePrintSettings is null
michael@0 110 * then the global PS will be used.
michael@0 111 * @param aChildDOMWin - DOM Window to be print previewed.
michael@0 112 * @param aWPListener - is updated during the printpreview
michael@0 113 * @return void
michael@0 114 */
michael@0 115 void printPreview(in nsIPrintSettings aThePrintSettings,
michael@0 116 in nsIDOMWindow aChildDOMWin,
michael@0 117 in nsIWebProgressListener aWPListener);
michael@0 118
michael@0 119 /**
michael@0 120 * Print Preview - Navigates within the window
michael@0 121 *
michael@0 122 * @param aNavType - navigation enum
michael@0 123 * @param aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum
michael@0 124 * @return void
michael@0 125 */
michael@0 126 void printPreviewNavigate(in short aNavType, in long aPageNum);
michael@0 127
michael@0 128 /**
michael@0 129 * Cancels the current print
michael@0 130 * @return void
michael@0 131 */
michael@0 132 void cancel();
michael@0 133
michael@0 134 /**
michael@0 135 * Returns an array of the names of all documents names (Title or URL)
michael@0 136 * and sub-documents. This will return a single item if the attr "isFramesetDocument" is false
michael@0 137 * and may return any number of items is "isFramesetDocument" is true
michael@0 138 *
michael@0 139 * @param aCount - returns number of printers returned
michael@0 140 * @param aResult - returns array of names
michael@0 141 * @return void
michael@0 142 */
michael@0 143 void enumerateDocumentNames(out uint32_t aCount,[retval, array, size_is(aCount)] out wstring aResult);
michael@0 144
michael@0 145 /**
michael@0 146 * This exists PrintPreview mode and returns browser window to galley mode
michael@0 147 * @return void
michael@0 148 */
michael@0 149 void exitPrintPreview();
michael@0 150
michael@0 151 };
michael@0 152

mercurial