michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIPrintSettings.idl" michael@0: michael@0: %{ C++ michael@0: struct nsFont; michael@0: %} michael@0: michael@0: interface nsIStringEnumerator; michael@0: michael@0: /** michael@0: * Native types michael@0: */ michael@0: [ref] native nsNativeFontRef(nsFont); michael@0: michael@0: /** michael@0: * Print options interface michael@0: * michael@0: * Do not attempt to freeze this API - it still needs lots of work. Consult michael@0: * John Keiser and Roland Mainz michael@0: * for futher details. michael@0: */ michael@0: [scriptable, uuid(92597c2b-109b-40bb-8f93-9b9acfa31de8)] michael@0: michael@0: interface nsIPrintOptions : nsISupports michael@0: { michael@0: /** michael@0: * Show Native Print Options dialog, this may not be supported on all platforms michael@0: */ michael@0: void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings); michael@0: michael@0: /** michael@0: * Creates a new PrintSettnigs Object michael@0: * and initializes it from prefs michael@0: */ michael@0: nsIPrintSettings CreatePrintSettings(); michael@0: michael@0: /** michael@0: * Get a prefixed integer pref michael@0: */ michael@0: int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring michael@0: aPrefName); michael@0: michael@0: /** michael@0: * display Printer Job Properties dialog michael@0: */ michael@0: void displayJobProperties (in wstring aPrinter, in nsIPrintSettings michael@0: aPrintSettings, out boolean aDisplayed); michael@0: michael@0: /** michael@0: * Native data constants michael@0: */ michael@0: const short kNativeDataPrintRecord = 0; michael@0: michael@0: [noscript] voidPtr GetNativeData(in short aDataType); michael@0: }; michael@0: michael@0: [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)] michael@0: michael@0: interface nsIPrinterEnumerator : nsISupports michael@0: { michael@0: /** michael@0: * The name of the system default printer. This name should also be michael@0: * present in printerNameList below. This is not necessarily gecko's michael@0: * default printer; see nsIPrintSettingsService.defaultPrinterName michael@0: * for that. michael@0: */ michael@0: readonly attribute wstring defaultPrinterName; michael@0: michael@0: /** michael@0: * Initializes certain settings from the native printer into the PrintSettings michael@0: * These settings include, but are not limited to: michael@0: * Page Orientation michael@0: * Page Size michael@0: * Number of Copies michael@0: */ michael@0: void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings); michael@0: michael@0: /** michael@0: * The list of printer names michael@0: */ michael@0: readonly attribute nsIStringEnumerator printerNameList; michael@0: michael@0: /* takes printer selected and will display job properties dlg for that printer michael@0: * returns true if dialog displays michael@0: */ michael@0: void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings); michael@0: michael@0: }; michael@0: