зеркало из https://github.com/mozilla/pjs.git
remove unused widget interfaces and the dead remains of their implementations. b=396657 r=cbarrett sr=roc
This commit is contained in:
Родитель
5331bc3fe6
Коммит
3b50413f0d
|
@ -48,9 +48,6 @@ GRE_MODULE = 1
|
|||
|
||||
EXPORTS = \
|
||||
widgetCore.h \
|
||||
nsIMenuBar.h \
|
||||
nsIMenu.h \
|
||||
nsIMenuItem.h \
|
||||
nsStringUtil.h \
|
||||
nsIWidget.h \
|
||||
nsIKBStateControl.h \
|
||||
|
@ -66,10 +63,11 @@ EXPORTS = \
|
|||
nsIDeviceContextSpec.h \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
EXPORTS += \
|
||||
nsIDragSessionMac.h \
|
||||
nsIPrintingContext.h
|
||||
nsIMenuBar.h \
|
||||
nsIMenu.h \
|
||||
nsIMenuItem.h
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||
|
@ -116,7 +114,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
|||
XPIDLSRCS += nsIPrintSettingsWin.idl
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
XPIDLSRCS += nsIEventSink.idl \
|
||||
nsIPrintSettingsX.idl \
|
||||
nsIPrintSessionX.idl
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDragSessionMac_h__
|
||||
#define nsIDragSessionMac_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include <Drag.h>
|
||||
|
||||
|
||||
#define NS_IDRAGSESSIONMAC_IID \
|
||||
{ 0x36c4c380, 0x09e2, 0x11d3, { 0xb0, 0x33, 0xa4, 0x20, 0xf4, 0x2c, 0xfd, 0x7c } };
|
||||
|
||||
|
||||
class nsIDragSessionMac : public nsISupports {
|
||||
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONMAC_IID)
|
||||
|
||||
/**
|
||||
* Since the drag may originate in an external application, we need some way of
|
||||
* communicating the DragManager's DragRef to the session so it can use it
|
||||
* when filling in data requests.
|
||||
*
|
||||
* @param aDragRef the MacOS DragManager's ref number for the current drag
|
||||
*/
|
||||
|
||||
NS_IMETHOD SetDragReference ( DragReference aDragRef ) = 0;
|
||||
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDragSessionMac, NS_IDRAGSESSIONMAC_IID)
|
||||
|
||||
#endif
|
|
@ -1,94 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Patrick C. Beard <beard@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIPrintingContextMac_h___
|
||||
#define nsIPrintingContextMac_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIPrintSettings;
|
||||
|
||||
// 3d5917da-1dd2-11b2-bc7b-aa83823362e0
|
||||
#define NS_IPRINTING_CONTEXT_IID \
|
||||
{ 0xD9853908, 0xA34D, 0x4D8B, \
|
||||
{ 0xB4, 0xD6, 0x5D, 0xC3, 0x6E, 0x21, 0x1B, 0xDD } }
|
||||
|
||||
class nsIPrintingContext : public nsISupports {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRINTING_CONTEXT_IID)
|
||||
/**
|
||||
* Initialize the printing context for use.
|
||||
* @param aIsPrintPreview TRUE if doing print preview, FALSE if normal printing.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aIsPrintPreview) = 0;
|
||||
|
||||
/**
|
||||
* This will tell if the printmanager is currently open
|
||||
* @update dc 12/03/98
|
||||
* @param aIsOpen True or False depending if the printmanager is open
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD PrintManagerOpen(PRBool* aIsOpen) = 0;
|
||||
|
||||
/**
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 12/03/98
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD ClosePrintManager() = 0;
|
||||
|
||||
NS_IMETHOD BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
PRInt32 aEndPage) = 0;
|
||||
|
||||
NS_IMETHOD EndDocument() = 0;
|
||||
|
||||
NS_IMETHOD BeginPage() = 0;
|
||||
|
||||
NS_IMETHOD EndPage() = 0;
|
||||
|
||||
NS_IMETHOD GetPrinterResolution(double* aResolution) = 0;
|
||||
|
||||
NS_IMETHOD GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight) = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrintingContext, NS_IPRINTING_CONTEXT_IID)
|
||||
|
||||
#endif /* nsIPrintingContextMac_h___ */
|
|
@ -40,7 +40,6 @@
|
|||
#define nsDeviceContextSpecX_h_
|
||||
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIPrintingContext.h"
|
||||
|
||||
#include <PMApplication.h>
|
||||
|
||||
|
@ -70,31 +69,11 @@ public:
|
|||
* @param aPS Settings for this print job
|
||||
* @param aIsPrintPreview TRUE if doing print preview, FALSE if normal printing.
|
||||
* @return error status
|
||||
*
|
||||
* The three-argument form of this function is defined by
|
||||
* nsIDeviceContextSpec. The two-argument form is from nsIPrintingContext.
|
||||
*/
|
||||
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, PRBool aIsPrintPreview);
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aIsPrintPreview);
|
||||
|
||||
/**
|
||||
* This will tell if the printmanager is currently open
|
||||
* @update dc 12/03/98
|
||||
* @param aIsOpen True or False depending if the printmanager is open
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD PrintManagerOpen(PRBool* aIsOpen);
|
||||
|
||||
/**
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 12/03/98
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD ClosePrintManager();
|
||||
|
||||
NS_IMETHOD GetPrinterResolution(double* aResolution);
|
||||
|
||||
NS_IMETHOD GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
|
||||
void GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Destructor for nsDeviceContextSpecX, this will release the printrecord
|
||||
|
@ -107,7 +86,6 @@ protected:
|
|||
PMPrintSession mPrintSession; // printing context.
|
||||
PMPageFormat mPageFormat; // page format.
|
||||
PMPrintSettings mPrintSettings; // print settings.
|
||||
PRBool mBeganPrinting;
|
||||
};
|
||||
|
||||
#endif //nsDeviceContextSpecX_h_
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
#include "nsIPrintOptions.h"
|
||||
#include "nsIPrintSettingsX.h"
|
||||
|
||||
#include "nsToolkit.h"
|
||||
|
||||
#include "gfxQuartzSurface.h"
|
||||
#include "gfxImageSurface.h"
|
||||
|
||||
|
@ -63,7 +61,6 @@ nsDeviceContextSpecX::nsDeviceContextSpecX()
|
|||
: mPrintSession(NULL)
|
||||
, mPageFormat(kPMNoPageFormat)
|
||||
, mPrintSettings(kPMNoPrintSettings)
|
||||
, mBeganPrinting(PR_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -75,7 +72,6 @@ nsDeviceContextSpecX::~nsDeviceContextSpecX()
|
|||
{
|
||||
if (mPrintSession)
|
||||
::PMRelease(mPrintSession);
|
||||
ClosePrintManager();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecX, nsIDeviceContextSpec)
|
||||
|
@ -88,47 +84,28 @@ NS_IMETHODIMP nsDeviceContextSpecX::Init(nsIWidget *aWidget,
|
|||
nsIPrintSettings* aPS,
|
||||
PRBool aIsPrintPreview)
|
||||
{
|
||||
return Init(aPS, aIsPrintPreview);
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIPrintSettingsX> printSettingsX(do_QueryInterface(aPS));
|
||||
if (!printSettingsX)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
||||
rv = printSettingsX->GetNativePrintSession(&mPrintSession);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
::PMRetain(mPrintSession);
|
||||
|
||||
rv = printSettingsX->GetPMPageFormat(&mPageFormat);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = printSettingsX->GetPMPrintSettings(&mPrintSettings);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::Init(nsIPrintSettings* aPS, PRBool aIsPrintPreview)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIPrintSettingsX> printSettingsX(do_QueryInterface(aPS));
|
||||
if (!printSettingsX)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
||||
rv = printSettingsX->GetNativePrintSession(&mPrintSession);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
::PMRetain(mPrintSession);
|
||||
|
||||
rv = printSettingsX->GetPMPageFormat(&mPageFormat);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
rv = printSettingsX->GetPMPrintSettings(&mPrintSettings);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::PrintManagerOpen(PRBool* aIsOpen)
|
||||
{
|
||||
*aIsOpen = mBeganPrinting;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 12/03/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::ClosePrintManager()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
|
@ -183,29 +160,12 @@ NS_IMETHODIMP nsDeviceContextSpecX::EndPage()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::GetPrinterResolution(double* aResolution)
|
||||
{
|
||||
PMPrinter printer;
|
||||
OSStatus status = ::PMSessionGetCurrentPrinter(mPrintSession, &printer);
|
||||
if (status != noErr)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PMResolution defaultResolution;
|
||||
status = ::PMPrinterGetPrinterResolution(printer, kPMDefaultResolution, &defaultResolution);
|
||||
if (status != noErr)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aResolution = defaultResolution.hRes;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight)
|
||||
void nsDeviceContextSpecX::GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight)
|
||||
{
|
||||
PMRect pageRect;
|
||||
::PMGetAdjustedPageRect(mPageFormat, &pageRect);
|
||||
*aTop = pageRect.top, *aLeft = pageRect.left;
|
||||
*aBottom = pageRect.bottom, *aRight = pageRect.right;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::GetSurfaceForPrinter(gfxASurface **surface)
|
||||
|
|
Загрузка…
Ссылка в новой задаче