widget/nsIPrintOptions.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/nsIPrintOptions.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,94 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +#include "nsIPrintSettings.idl"
    1.11 +
    1.12 +%{ C++
    1.13 +struct nsFont;
    1.14 +%}
    1.15 +
    1.16 +interface nsIStringEnumerator;
    1.17 +
    1.18 +/**
    1.19 + * Native types
    1.20 + */
    1.21 +[ref] native nsNativeFontRef(nsFont);
    1.22 +
    1.23 +/**
    1.24 + * Print options interface
    1.25 + *
    1.26 + * Do not attempt to freeze this API - it still needs lots of work. Consult
    1.27 + * John Keiser <jkeiser@netscape.com> and Roland Mainz
    1.28 + * <roland.mainz@informatik.med.uni-giessen.de> for futher details.
    1.29 + */
    1.30 +[scriptable, uuid(92597c2b-109b-40bb-8f93-9b9acfa31de8)]
    1.31 +
    1.32 +interface nsIPrintOptions : nsISupports
    1.33 +{
    1.34 +  /**
    1.35 +   * Show Native Print Options dialog, this may not be supported on all platforms
    1.36 +   */
    1.37 +  void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
    1.38 +
    1.39 +  /**
    1.40 +   * Creates a new PrintSettnigs Object
    1.41 +   * and initializes it from prefs
    1.42 +   */
    1.43 +  nsIPrintSettings CreatePrintSettings();
    1.44 +
    1.45 +  /**
    1.46 +   * Get a prefixed integer pref 
    1.47 +   */
    1.48 +  int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring
    1.49 +                            aPrefName);
    1.50 +
    1.51 +  /**
    1.52 +   * display Printer Job Properties dialog
    1.53 +   */
    1.54 +  void displayJobProperties (in wstring aPrinter, in nsIPrintSettings
    1.55 +                             aPrintSettings, out boolean aDisplayed);
    1.56 +
    1.57 +  /**
    1.58 +   * Native data constants
    1.59 +   */
    1.60 +  const short kNativeDataPrintRecord        = 0;
    1.61 +
    1.62 +  [noscript] voidPtr GetNativeData(in short aDataType);
    1.63 +};
    1.64 +
    1.65 +[scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)]
    1.66 +
    1.67 +interface nsIPrinterEnumerator : nsISupports
    1.68 +{
    1.69 +  /**
    1.70 +   * The name of the system default printer. This name should also be
    1.71 +   * present in printerNameList below. This is not necessarily gecko's
    1.72 +   * default printer; see nsIPrintSettingsService.defaultPrinterName
    1.73 +   * for that.
    1.74 +   */
    1.75 +  readonly attribute wstring defaultPrinterName;
    1.76 +
    1.77 +  /**
    1.78 +   * Initializes certain settings from the native printer into the PrintSettings
    1.79 +   * These settings include, but are not limited to:
    1.80 +   *   Page Orientation
    1.81 +   *   Page Size
    1.82 +   *   Number of Copies
    1.83 +   */
    1.84 +  void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
    1.85 +
    1.86 +  /**
    1.87 +   * The list of printer names
    1.88 +   */
    1.89 +  readonly attribute nsIStringEnumerator printerNameList;
    1.90 +
    1.91 +  /*  takes printer selected and will display job properties dlg for that printer
    1.92 +   *  returns true if dialog displays
    1.93 +   */
    1.94 +  void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
    1.95 +
    1.96 +};
    1.97 +

mercurial