Bug 1719855 - Add a mochitest that preventDefault() in touchmove prevents scrolling...
[gecko.git] / widget / nsIPrintDialogService.idl
blob1c79ddd76b97f316ac5fdc4bc73cf199746f7598
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* Doc interface here */
8 #include "nsISupports.idl"
9 #include "nsIWebProgressListener.idl"
10 #include "nsIPrintSettings.idl"
11 #include "nsIObserver.idl"
13 interface mozIDOMWindowProxy;
15 /**
16 * Service for opening native print dialogs provided by the operating system.
17 * (The widget code may customize the dialog.)
19 [scriptable, uuid(88af6712-a9fd-4393-9af3-3ffbb1f2caaf)]
20 interface nsIPrintDialogService : nsISupports
22 /**
23 * Initialize the service.
25 void init();
27 /**
28 * Show the print dialog.
29 * @param aParent A DOM window the dialog will be parented to.
30 * @param aHaveSelection A boolean indicating whether the document to be
31 * printed has some selected text, which is used to
32 * determine whether the "Print selection only" radio
33 * button is enabled in the print settings dialog.
34 * @param aSettings On entry, this contains initial settings for the
35 * print dialog. On return, if the print operation should
36 * proceed, then this has been updated with the settings
37 * that the user selected in the dialog.
38 * @return NS_OK if the print operation should proceed
39 * @return NS_ERROR_ABORT if the user indicated not to proceed
40 * @return a suitable error for failures to show the print dialog.
42 void showPrintDialog(in mozIDOMWindowProxy aParent,
43 in boolean aHaveSelection,
44 in nsIPrintSettings aPrintSettings);
46 /**
47 * Show the page setup dialog. Note that there is no way to tell whether the
48 * user clicked OK or Cancel on the dialog.
49 * @param aParent A DOM window the dialog will be parented to.
50 * @param aSettings On entry, this contains initial settings for the
51 * page setup dialog. On return, if the dialog wasn't
52 * cancelled, then this has been updated with the settings
53 * that the user selected in the dialog.
55 void showPageSetupDialog(in mozIDOMWindowProxy aParent,
56 in nsIPrintSettings aPrintSettings);
60 %{C++
61 #define NS_PRINTDIALOGSERVICE_IID \
62 {0x88af6712, 0xa9fd, 0x4393, { 0x9a, 0xf3, 0x3f, 0xfb, 0xb1, 0xf2, 0xca, 0xaf}}
64 #define NS_PRINTDIALOGSERVICE_CONTRACTID \
65 ("@mozilla.org/widget/printdialog-service;1")