зеркало из https://github.com/mozilla/gecko-dev.git
Backing out checkin, I can't believe you have to edit a mcp to checkin
an IDL file
This commit is contained in:
Родитель
d604be4b8e
Коммит
857e035af3
|
@ -8,4 +8,3 @@ nsIScriptableRegion.idl
|
||||||
nsIScreen.idl
|
nsIScreen.idl
|
||||||
nsIScreenManager.idl
|
nsIScreenManager.idl
|
||||||
nsIPrintOptions.idl
|
nsIPrintOptions.idl
|
||||||
nsIPrintSettings.idl
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ XPIDLSRCS = \
|
||||||
nsIScreen.idl \
|
nsIScreen.idl \
|
||||||
nsIScreenManager.idl \
|
nsIScreenManager.idl \
|
||||||
nsIPrintOptions.idl \
|
nsIPrintOptions.idl \
|
||||||
nsIPrintSettings.idl \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
|
@ -32,7 +32,6 @@ XPIDLSRCS = \
|
||||||
.\nsIScreen.idl \
|
.\nsIScreen.idl \
|
||||||
.\nsIScreenManager.idl \
|
.\nsIScreenManager.idl \
|
||||||
.\nsIPrintOptions.idl \
|
.\nsIPrintOptions.idl \
|
||||||
.\nsIPrintSettings.idl \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS= \
|
EXPORTS= \
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "nsISupports.idl"
|
#include "nsISupports.idl"
|
||||||
#include "nsIPrintSettings.idl"
|
|
||||||
|
|
||||||
%{ C++
|
%{ C++
|
||||||
#include "nsMargin.h"
|
#include "nsMargin.h"
|
||||||
|
@ -134,6 +133,7 @@ interface nsIPrintOptions : nsISupports
|
||||||
*/
|
*/
|
||||||
void WritePrefs();
|
void WritePrefs();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data Members
|
* Data Members
|
||||||
*/
|
*/
|
||||||
|
@ -163,7 +163,6 @@ interface nsIPrintOptions : nsISupports
|
||||||
attribute boolean isCancelled;
|
attribute boolean isCancelled;
|
||||||
attribute boolean PrintSilent; /* print without putting up the dialog */
|
attribute boolean PrintSilent; /* print without putting up the dialog */
|
||||||
|
|
||||||
attribute nsIPrintSettings printSettings;
|
|
||||||
|
|
||||||
/* Additional XP Related */
|
/* Additional XP Related */
|
||||||
attribute boolean printReversed;
|
attribute boolean printReversed;
|
||||||
|
|
|
@ -39,6 +39,18 @@
|
||||||
|
|
||||||
#include "nsISupports.idl"
|
#include "nsISupports.idl"
|
||||||
|
|
||||||
|
%{ C++
|
||||||
|
#include "nsMargin.h"
|
||||||
|
#include "nsFont.h"
|
||||||
|
%}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Native types
|
||||||
|
*/
|
||||||
|
[ref] native nsNativeMarginRef(nsMargin);
|
||||||
|
[ref] native nsNativeFontRef(nsFont);
|
||||||
|
[ref] native nsNativeStringRef(nsString);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simplified graphics interface for JS rendering.
|
* Simplified graphics interface for JS rendering.
|
||||||
*
|
*
|
||||||
|
@ -51,9 +63,14 @@
|
||||||
interface nsIPrintSettings : nsISupports
|
interface nsIPrintSettings : nsISupports
|
||||||
{
|
{
|
||||||
/* Print Option Flags for Bit Field*/
|
/* Print Option Flags for Bit Field*/
|
||||||
const long kOptPrintOddPages = 0x00000001;
|
const long kOptPrintOddPages = 0x00000001;
|
||||||
const long kOptPrintEvenPages = 0x00000002;
|
const long kOptPrintEvenPages = 0x00000002;
|
||||||
const long kPrintOptionsEnableSelectionRB = 0x00000004;
|
const long kOptPrintDocTitle = 0x00000004;
|
||||||
|
const long kOptPrintDocLoc = 0x00000008;
|
||||||
|
const long kOptPrintPageNums = 0x00000010;
|
||||||
|
const long kOptPrintPageTotal = 0x00000020;
|
||||||
|
const long kOptPrintDatePrinted = 0x00000040;
|
||||||
|
const long kPrintOptionsEnableSelectionRB = 0x00000080;
|
||||||
|
|
||||||
/* Print Range Enums */
|
/* Print Range Enums */
|
||||||
const long kRangeAllPages = 0;
|
const long kRangeAllPages = 0;
|
||||||
|
@ -75,19 +92,13 @@ interface nsIPrintSettings : nsISupports
|
||||||
const short kA4PaperSize = 3;
|
const short kA4PaperSize = 3;
|
||||||
const short kA3PaperSize = 4;
|
const short kA3PaperSize = 4;
|
||||||
|
|
||||||
/**
|
|
||||||
* Orientation Constants
|
|
||||||
*/
|
|
||||||
const short kPortraitOrientation = 0;
|
|
||||||
const short kLandscapeOrientation = 1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print Frame Constants
|
* Print Frame Constants
|
||||||
*/
|
*/
|
||||||
const short kNoFrames = 0;
|
const short kFramesAsIs = 0;
|
||||||
const short kFramesAsIs = 1;
|
const short kSelectedFrame = 1;
|
||||||
const short kSelectedFrame = 2;
|
const short kEachFrameSep = 2;
|
||||||
const short kEachFrameSep = 3;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set PrintOptions
|
* Set PrintOptions
|
||||||
|
@ -104,42 +115,44 @@ interface nsIPrintSettings : nsISupports
|
||||||
*/
|
*/
|
||||||
PRInt32 GetPrintOptionsBits();
|
PRInt32 GetPrintOptionsBits();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data Members
|
* Data Members
|
||||||
*/
|
*/
|
||||||
attribute long startPageRange;
|
attribute long startPageRange;
|
||||||
attribute long endPageRange;
|
attribute long endPageRange;
|
||||||
|
|
||||||
|
attribute boolean printReversed;
|
||||||
|
attribute boolean printInColor; /* a false means grayscale */
|
||||||
|
attribute long paperSize; /* see page size consts */
|
||||||
|
attribute wstring printCommand;
|
||||||
|
attribute boolean printToFile;
|
||||||
|
attribute wstring toFileName;
|
||||||
|
|
||||||
attribute double marginTop; /* these are in inches */
|
attribute double marginTop; /* these are in inches */
|
||||||
attribute double marginLeft;
|
attribute double marginLeft;
|
||||||
attribute double marginBottom;
|
attribute double marginBottom;
|
||||||
attribute double marginRight;
|
attribute double marginRight;
|
||||||
|
|
||||||
attribute short printRange;
|
attribute long printRange;
|
||||||
|
attribute long pageNumJust;
|
||||||
attribute wstring title;
|
attribute wstring title;
|
||||||
attribute wstring docURL;
|
attribute wstring docURL;
|
||||||
|
|
||||||
attribute wstring headerStrLeft;
|
attribute boolean isPrintFrame;
|
||||||
attribute wstring headerStrCenter;
|
attribute long printFrameType;
|
||||||
attribute wstring headerStrRight;
|
|
||||||
|
|
||||||
attribute wstring footerStrLeft;
|
/* No Script Methods */
|
||||||
attribute wstring footerStrCenter;
|
|
||||||
attribute wstring footerStrRight;
|
|
||||||
|
|
||||||
attribute short printFrameType;
|
[noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize);
|
||||||
attribute boolean PrintSilent; /* print without putting up the dialog */
|
|
||||||
|
|
||||||
/* Additional XP Related */
|
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||||
attribute boolean printReversed;
|
/* Purposely made this an "in" arg */
|
||||||
attribute boolean printInColor; /* a false means grayscale */
|
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||||
attribute long paperSize; /* see page size consts */
|
|
||||||
attribute long orientation; /* see orientation consts */
|
[noscript] void SetDefaultFont(in nsNativeFontRef aMargin);
|
||||||
attribute wstring printCommand;
|
/* Purposely made this an "in" arg */
|
||||||
attribute boolean printToFile;
|
[noscript] void GetDefaultFont(in nsNativeFontRef aMargin);
|
||||||
attribute wstring toFileName;
|
|
||||||
|
|
||||||
attribute long printPageDelay; /* in milliseconds */
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -723,95 +723,6 @@ NS_IMETHODIMP nsPrintOptions::GetNativeData(PRInt16 aDataType, void * *_retval)
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attribute nsIPrintSettings printSettings; */
|
|
||||||
NS_IMETHODIMP nsPrintOptions::GetPrintSettings(nsIPrintSettings * *aPrintSettings)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG_POINTER(aPrintSettings);
|
|
||||||
*aPrintSettings = nsnull;
|
|
||||||
|
|
||||||
/* This may need to be implemented in the future */
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsPrintOptions::SetPrintSettings(nsIPrintSettings * aPrintSettings)
|
|
||||||
{
|
|
||||||
|
|
||||||
NS_ENSURE_ARG_POINTER(aPrintSettings);
|
|
||||||
|
|
||||||
aPrintSettings->GetStartPageRange(&mStartPageNum);
|
|
||||||
aPrintSettings->GetEndPageRange(&mEndPageNum);
|
|
||||||
|
|
||||||
double dblVal;
|
|
||||||
aPrintSettings->GetMarginTop(&dblVal);
|
|
||||||
SetMarginTop(dblVal);
|
|
||||||
|
|
||||||
aPrintSettings->GetMarginLeft(&dblVal);
|
|
||||||
SetMarginLeft(dblVal);
|
|
||||||
|
|
||||||
aPrintSettings->GetMarginBottom(&dblVal);
|
|
||||||
SetMarginBottom(dblVal);
|
|
||||||
|
|
||||||
aPrintSettings->GetMarginRight(&dblVal);
|
|
||||||
SetMarginRight(dblVal);
|
|
||||||
|
|
||||||
aPrintSettings->GetPrintRange(&mPrintRange);
|
|
||||||
|
|
||||||
PRUnichar* uniChar;
|
|
||||||
aPrintSettings->GetTitle(&uniChar);
|
|
||||||
SetTitle(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetDocURL(&uniChar);
|
|
||||||
SetDocURL(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetHeaderStrLeft(&uniChar);
|
|
||||||
SetHeaderStrLeft(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetHeaderStrCenter(&uniChar);
|
|
||||||
SetHeaderStrCenter(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetHeaderStrRight(&uniChar);
|
|
||||||
SetHeaderStrRight(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetFooterStrLeft(&uniChar);
|
|
||||||
SetFooterStrLeft(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetFooterStrCenter(&uniChar);
|
|
||||||
SetFooterStrCenter(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetFooterStrRight(&uniChar);
|
|
||||||
SetFooterStrRight(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetPrintFrameType(&mPrintFrameType);
|
|
||||||
aPrintSettings->GetPrintSilent(&mPrintSilent);
|
|
||||||
aPrintSettings->GetPrintReversed(&mPrintReversed);
|
|
||||||
aPrintSettings->GetPrintInColor(&mPrintInColor);
|
|
||||||
aPrintSettings->GetPaperSize(&mPaperSize);
|
|
||||||
aPrintSettings->GetOrientation(&mOrientation);
|
|
||||||
|
|
||||||
aPrintSettings->GetPrintCommand(&uniChar);
|
|
||||||
SetPrintCommand(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetPrintToFile(&mPrintToFile);
|
|
||||||
|
|
||||||
aPrintSettings->GetToFileName(&uniChar);
|
|
||||||
SetToFileName(uniChar);
|
|
||||||
if (uniChar != nsnull) nsMemory::Free(uniChar);
|
|
||||||
|
|
||||||
aPrintSettings->GetPrintPageDelay(&mPrintPageDelay);
|
|
||||||
SetPrintPageDelay(mPrintPageDelay);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
//-- Protected Methods
|
//-- Protected Methods
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "nsIPrintOptions.h"
|
#include "nsIPrintOptions.h"
|
||||||
|
|
||||||
class nsIPref;
|
class nsIPref;
|
||||||
class nsIPrintSettings;
|
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
//*** nsPrintOptions
|
//*** nsPrintOptions
|
||||||
|
|
Загрузка…
Ссылка в новой задаче