widget/nsIPrintOptions.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 4; 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 #include "nsISupports.idl"
     7 #include "nsIPrintSettings.idl"
     9 %{ C++
    10 struct nsFont;
    11 %}
    13 interface nsIStringEnumerator;
    15 /**
    16  * Native types
    17  */
    18 [ref] native nsNativeFontRef(nsFont);
    20 /**
    21  * Print options interface
    22  *
    23  * Do not attempt to freeze this API - it still needs lots of work. Consult
    24  * John Keiser <jkeiser@netscape.com> and Roland Mainz
    25  * <roland.mainz@informatik.med.uni-giessen.de> for futher details.
    26  */
    27 [scriptable, uuid(92597c2b-109b-40bb-8f93-9b9acfa31de8)]
    29 interface nsIPrintOptions : nsISupports
    30 {
    31   /**
    32    * Show Native Print Options dialog, this may not be supported on all platforms
    33    */
    34   void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
    36   /**
    37    * Creates a new PrintSettnigs Object
    38    * and initializes it from prefs
    39    */
    40   nsIPrintSettings CreatePrintSettings();
    42   /**
    43    * Get a prefixed integer pref 
    44    */
    45   int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring
    46                             aPrefName);
    48   /**
    49    * display Printer Job Properties dialog
    50    */
    51   void displayJobProperties (in wstring aPrinter, in nsIPrintSettings
    52                              aPrintSettings, out boolean aDisplayed);
    54   /**
    55    * Native data constants
    56    */
    57   const short kNativeDataPrintRecord        = 0;
    59   [noscript] voidPtr GetNativeData(in short aDataType);
    60 };
    62 [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)]
    64 interface nsIPrinterEnumerator : nsISupports
    65 {
    66   /**
    67    * The name of the system default printer. This name should also be
    68    * present in printerNameList below. This is not necessarily gecko's
    69    * default printer; see nsIPrintSettingsService.defaultPrinterName
    70    * for that.
    71    */
    72   readonly attribute wstring defaultPrinterName;
    74   /**
    75    * Initializes certain settings from the native printer into the PrintSettings
    76    * These settings include, but are not limited to:
    77    *   Page Orientation
    78    *   Page Size
    79    *   Number of Copies
    80    */
    81   void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
    83   /**
    84    * The list of printer names
    85    */
    86   readonly attribute nsIStringEnumerator printerNameList;
    88   /*  takes printer selected and will display job properties dlg for that printer
    89    *  returns true if dialog displays
    90    */
    91   void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
    93 };

mercurial