зеркало из 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
|
||||
nsIScreenManager.idl
|
||||
nsIPrintOptions.idl
|
||||
nsIPrintSettings.idl
|
||||
|
|
|
@ -37,7 +37,6 @@ XPIDLSRCS = \
|
|||
nsIScreen.idl \
|
||||
nsIScreenManager.idl \
|
||||
nsIPrintOptions.idl \
|
||||
nsIPrintSettings.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -32,7 +32,6 @@ XPIDLSRCS = \
|
|||
.\nsIScreen.idl \
|
||||
.\nsIScreenManager.idl \
|
||||
.\nsIPrintOptions.idl \
|
||||
.\nsIPrintSettings.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS= \
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIPrintSettings.idl"
|
||||
|
||||
%{ C++
|
||||
#include "nsMargin.h"
|
||||
|
@ -134,6 +133,7 @@ interface nsIPrintOptions : nsISupports
|
|||
*/
|
||||
void WritePrefs();
|
||||
|
||||
|
||||
/**
|
||||
* Data Members
|
||||
*/
|
||||
|
@ -163,7 +163,6 @@ interface nsIPrintOptions : nsISupports
|
|||
attribute boolean isCancelled;
|
||||
attribute boolean PrintSilent; /* print without putting up the dialog */
|
||||
|
||||
attribute nsIPrintSettings printSettings;
|
||||
|
||||
/* Additional XP Related */
|
||||
attribute boolean printReversed;
|
||||
|
|
|
@ -39,6 +39,18 @@
|
|||
|
||||
#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.
|
||||
*
|
||||
|
@ -51,9 +63,14 @@
|
|||
interface nsIPrintSettings : nsISupports
|
||||
{
|
||||
/* Print Option Flags for Bit Field*/
|
||||
const long kOptPrintOddPages = 0x00000001;
|
||||
const long kOptPrintEvenPages = 0x00000002;
|
||||
const long kPrintOptionsEnableSelectionRB = 0x00000004;
|
||||
const long kOptPrintOddPages = 0x00000001;
|
||||
const long kOptPrintEvenPages = 0x00000002;
|
||||
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 */
|
||||
const long kRangeAllPages = 0;
|
||||
|
@ -75,19 +92,13 @@ interface nsIPrintSettings : nsISupports
|
|||
const short kA4PaperSize = 3;
|
||||
const short kA3PaperSize = 4;
|
||||
|
||||
/**
|
||||
* Orientation Constants
|
||||
*/
|
||||
const short kPortraitOrientation = 0;
|
||||
const short kLandscapeOrientation = 1;
|
||||
|
||||
/**
|
||||
* Print Frame Constants
|
||||
*/
|
||||
const short kNoFrames = 0;
|
||||
const short kFramesAsIs = 1;
|
||||
const short kSelectedFrame = 2;
|
||||
const short kEachFrameSep = 3;
|
||||
const short kFramesAsIs = 0;
|
||||
const short kSelectedFrame = 1;
|
||||
const short kEachFrameSep = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Set PrintOptions
|
||||
|
@ -104,42 +115,44 @@ interface nsIPrintSettings : nsISupports
|
|||
*/
|
||||
PRInt32 GetPrintOptionsBits();
|
||||
|
||||
|
||||
/**
|
||||
* Data Members
|
||||
*/
|
||||
attribute long startPageRange;
|
||||
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 marginLeft;
|
||||
attribute double marginBottom;
|
||||
attribute double marginRight;
|
||||
|
||||
attribute short printRange;
|
||||
|
||||
attribute long printRange;
|
||||
attribute long pageNumJust;
|
||||
attribute wstring title;
|
||||
attribute wstring docURL;
|
||||
|
||||
attribute wstring headerStrLeft;
|
||||
attribute wstring headerStrCenter;
|
||||
attribute wstring headerStrRight;
|
||||
attribute boolean isPrintFrame;
|
||||
attribute long printFrameType;
|
||||
|
||||
attribute wstring footerStrLeft;
|
||||
attribute wstring footerStrCenter;
|
||||
attribute wstring footerStrRight;
|
||||
/* No Script Methods */
|
||||
|
||||
attribute short printFrameType;
|
||||
attribute boolean PrintSilent; /* print without putting up the dialog */
|
||||
[noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize);
|
||||
|
||||
/* Additional XP Related */
|
||||
attribute boolean printReversed;
|
||||
attribute boolean printInColor; /* a false means grayscale */
|
||||
attribute long paperSize; /* see page size consts */
|
||||
attribute long orientation; /* see orientation consts */
|
||||
attribute wstring printCommand;
|
||||
attribute boolean printToFile;
|
||||
attribute wstring toFileName;
|
||||
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
/* Purposely made this an "in" arg */
|
||||
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
|
||||
[noscript] void SetDefaultFont(in nsNativeFontRef aMargin);
|
||||
/* Purposely made this an "in" arg */
|
||||
[noscript] void GetDefaultFont(in nsNativeFontRef aMargin);
|
||||
|
||||
attribute long printPageDelay; /* in milliseconds */
|
||||
|
||||
};
|
||||
|
|
|
@ -723,95 +723,6 @@ NS_IMETHODIMP nsPrintOptions::GetNativeData(PRInt16 aDataType, void * *_retval)
|
|||
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
|
||||
//-----------------------------------------------------
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nsIPrintOptions.h"
|
||||
|
||||
class nsIPref;
|
||||
class nsIPrintSettings;
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsPrintOptions
|
||||
|
|
Загрузка…
Ссылка в новой задаче