Struct xpcom::interfaces::nsIPrintingPromptService
[−]
[src]
#[repr(C)]pub struct nsIPrintingPromptService { /* fields omitted */ }
interface nsIPrintingPromptService : nsISupports
Methods
impl nsIPrintingPromptService
[src]
pub fn coerce<T: nsIPrintingPromptServiceCoerce>(&self) -> &T
[src]
Cast this nsIPrintingPromptService
to one of its base interfaces.
impl nsIPrintingPromptService
[src]
pub unsafe fn ShowPrintDialog(
&self,
parent: *const mozIDOMWindowProxy,
webBrowserPrint: *const nsIWebBrowserPrint,
printSettings: *const nsIPrintSettings
) -> nsresult
[src]
&self,
parent: *const mozIDOMWindowProxy,
webBrowserPrint: *const nsIWebBrowserPrint,
printSettings: *const nsIPrintSettings
) -> nsresult
/**
* This service enables embedders to implement their own Print and Progress Dialogs.
* Each platform has a "base" or "basckstop" implementation of the service. The
* service is automatically registered at start up.
*
* Historically, platform toolkits with native dialogs have implemented them in the GFX layer
* Usually they were displayed when a new DeviceContextSpec specific to that platform
* was created.
*
* Windows: The GFX layer no longers supports default toolkit behavior for displaying the
* native Print Dialog.
* If an embedder implemented service returns any error code (other than NS_ERROR_ABORT)
* printing will terminate.
*
* Returning NS_OK assumes that the PrintSettings object was correctly filled in and
* if it does not have valid fields for printer name, etc. it may also terminate.
*
* Defaults for platform service:
* showPrintDialog - displays a native dialog
* showPageSetup - displays a XUL dialog
* showProgress - displays a XUL dialog
*
* Summary for Windows Embedders:
* Stated once again: There is no "fallback" native platform support in GFX for the
* displaying of the native print dialog. The current default implementation for Windows
* display a native print dialog but a XUL-based progress dialog.
* If you wish to have a native progress dialog on Windows you will have to create and
* register your own service.
*
* Note: The Windows version Mozilla implements this service which is
* automatically built and registered for you. You can use it as an example.
* It is located at "widget/windows/nsPrintDialogService.cpp". That service
* is capable of displaying a native print dialog and a XUL progress dialog.
*
* To fly your own dialog you may:
*
* 1) Implement this service to display at least the Print Dialog and a Print Progress Dialog
* or you may implement just one of the dialogs and pass back NS_ERROR_NOT_IMPLEMENTED
* for any of the others.
*
* 2) For the Print Dialog:
* You may stub out this service by having all the methods return NS_ERROR_NOT_IMPLEMENTED.
* You can then fly you own dialog and then properly fill in the PrintSettings object
* before calling nsIWebBrowserPrint's Print method. If you stub out this service
* you MUST set "printSilent" to true, if you do not, Printing will terminate and an
* error dialog will be displayed.
*
* Mac: The GFX layer still supports default toolkit behavior for displaying the Print Dialog.
* If an embedder implemented service returns NS_ERROR_NOT_IMPLEMENTED for "showPrintDialog"
* The toolkit will display the native print dialog.
*
* Defaults for platform service:
* Mac OS9: showPrintDialog - displays a native dialog
* showPageSetup - displays a native dialog
* showProgress - displays a XUL dialog
*
* Mac OSX: showPrintDialog - displays a native dialog
* showPageSetup - displays a native dialog
* showProgress - not implemented (provided by OS)
*
* GTK: There are no native dialog for GTK.
*
* Defaults for platform service:
* showPrintDialog - displays a native dialog
* showPageSetup - displays a native dialog
* showProgress - displays a XUL dialog
*
*/
/**
* Show the Print Dialog
*
* @param parent - a DOM windows the dialog will be parented to (required)
* @param webBrowserPrint - represents the document to be printed (required)
* @param printSettings - PrintSettings for print "job" (required)
*
*/
void showPrintDialog (in mozIDOMWindowProxy parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings);
pub unsafe fn ShowProgress(
&self,
parent: *const mozIDOMWindowProxy,
webBrowserPrint: *const nsIWebBrowserPrint,
printSettings: *const nsIPrintSettings,
openDialogObserver: *const nsIObserver,
isForPrinting: bool,
webProgressListener: *mut *const nsIWebProgressListener,
printProgressParams: *mut *const nsIPrintProgressParams,
notifyOnOpen: *mut bool
) -> nsresult
[src]
&self,
parent: *const mozIDOMWindowProxy,
webBrowserPrint: *const nsIWebBrowserPrint,
printSettings: *const nsIPrintSettings,
openDialogObserver: *const nsIObserver,
isForPrinting: bool,
webProgressListener: *mut *const nsIWebProgressListener,
printProgressParams: *mut *const nsIPrintProgressParams,
notifyOnOpen: *mut bool
) -> nsresult
/**
* Shows the print progress dialog
*
* @param parent - a DOM windows the dialog will be parented to
* @param webBrowserPrint - represents the document to be printed
* @param printSettings - PrintSettings for print "job"
* @param openDialogObserver - an observer that will be notifed when the dialog is opened
* @param isForPrinting - true - for printing, false for print preview
* @param webProgressListener - additional listener can be registered for progress notifications
* @param printProgressParams - parameter object for passing progress state
* @param notifyOnOpen - this indicates that the observer will be notified when the progress
* dialog has been opened. If false is returned it means the observer
* (usually the caller) shouldn't wait
* For Print Preview Progress there is intermediate progress
*/
void showProgress (in mozIDOMWindowProxy parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen);
pub unsafe fn ShowPageSetup(
&self,
parent: *const mozIDOMWindowProxy,
printSettings: *const nsIPrintSettings,
aObs: *const nsIObserver
) -> nsresult
[src]
&self,
parent: *const mozIDOMWindowProxy,
printSettings: *const nsIPrintSettings,
aObs: *const nsIObserver
) -> nsresult
/**
* Shows the print progress dialog
*
* @param parent - a DOM windows the dialog will be parented to (required)
* @param printSettings - PrintSettings for page setup (required)
* @param aObs - An observer to know if the contents of the Print Settings
* object has changed while the dialog is being shown.
* For example, some platforms may implement an "Apply" button (not required)
*/
void showPageSetup (in mozIDOMWindowProxy parent, in nsIPrintSettings printSettings, in nsIObserver aObs);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIPrintingPromptService
[src]
const IID: nsIID
IID: nsIID = nsID(1912630534, 41637, 16976, [174, 146, 4, 178, 240, 226, 171, 141])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIPrintingPromptService
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIPrintingPromptService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.