зеркало из https://github.com/mozilla/gecko-dev.git
Moved widgetry out of xpcom
This commit is contained in:
Родитель
818691e714
Коммит
5a9665a03c
|
@ -24,6 +24,10 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_UI
|
DEFINES += -D_IMPL_NS_UI
|
||||||
|
|
||||||
|
XPIDLSRCS = \
|
||||||
|
nsIFileSpecWithUI.idl \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
nsIFontSizeIterator.h \
|
nsIFontSizeIterator.h \
|
||||||
nsIFontNameIterator.h \
|
nsIFontNameIterator.h \
|
||||||
|
@ -34,6 +38,7 @@ EXPORTS = \
|
||||||
nsIMenuItem.h \
|
nsIMenuItem.h \
|
||||||
nsIImageButton.h \
|
nsIImageButton.h \
|
||||||
nsIPopUpMenu.h \
|
nsIPopUpMenu.h \
|
||||||
|
nsIFileWidget.h \
|
||||||
nsIMenuButton.h \
|
nsIMenuButton.h \
|
||||||
nsIImageButtonListener.h \
|
nsIImageButtonListener.h \
|
||||||
nsStringUtil.h \
|
nsStringUtil.h \
|
||||||
|
|
|
@ -21,6 +21,10 @@ IGNORE_MANIFEST=1
|
||||||
DEFINES=-D_IMPL_NS_UI
|
DEFINES=-D_IMPL_NS_UI
|
||||||
MODULE=raptor
|
MODULE=raptor
|
||||||
|
|
||||||
|
XPIDLSRCS = \
|
||||||
|
.\nsIFileSpecWithUI.idl \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS=nsui.h \
|
EXPORTS=nsui.h \
|
||||||
nsIFontSizeIterator.h \
|
nsIFontSizeIterator.h \
|
||||||
nsIFontNameIterator.h \
|
nsIFontNameIterator.h \
|
||||||
|
@ -29,6 +33,7 @@ EXPORTS=nsui.h \
|
||||||
nsIFormatConverter.h \
|
nsIFormatConverter.h \
|
||||||
nsIClipboardOwner.h \
|
nsIClipboardOwner.h \
|
||||||
nsIClipboard.h \
|
nsIClipboard.h \
|
||||||
|
nsIFileWidget.h \
|
||||||
nsITransferable.h \
|
nsITransferable.h \
|
||||||
nsIGenericTransferable.h \
|
nsIGenericTransferable.h \
|
||||||
nsIDragService.h \
|
nsIDragService.h \
|
||||||
|
|
|
@ -51,12 +51,12 @@ CPPSRCS = \
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
nsEscape.h \
|
nsEscape.h \
|
||||||
nsFileSpec.h \
|
nsFileSpec.h \
|
||||||
|
nsFileSpecImpl.h \
|
||||||
nsFileSpecStreaming.h \
|
nsFileSpecStreaming.h \
|
||||||
nsFileStream.h \
|
nsFileStream.h \
|
||||||
nsIBaseStream.h \
|
nsIBaseStream.h \
|
||||||
nsIByteBufferInputStream.h \
|
nsIByteBufferInputStream.h \
|
||||||
nsIFileStream.h \
|
nsIFileStream.h \
|
||||||
nsIFileWidget.h \
|
|
||||||
nsIInputStream.h \
|
nsIInputStream.h \
|
||||||
nsIOutputStream.h \
|
nsIOutputStream.h \
|
||||||
nsIStringStream.h \
|
nsIStringStream.h \
|
||||||
|
|
|
@ -26,12 +26,12 @@ MODULE = xpcom
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
nsEscape.h \
|
nsEscape.h \
|
||||||
nsFileSpec.h \
|
nsFileSpec.h \
|
||||||
|
nsFileSpecImpl.h \
|
||||||
nsFileSpecStreaming.h \
|
nsFileSpecStreaming.h \
|
||||||
nsFileStream.h \
|
nsFileStream.h \
|
||||||
nsIBaseStream.h \
|
nsIBaseStream.h \
|
||||||
nsIByteBufferInputStream.h \
|
nsIByteBufferInputStream.h \
|
||||||
nsIFileStream.h \
|
nsIFileStream.h \
|
||||||
nsIFileWidget.h \
|
|
||||||
nsIInputStream.h \
|
nsIInputStream.h \
|
||||||
nsIOutputStream.h \
|
nsIOutputStream.h \
|
||||||
nsIStringStream.h \
|
nsIStringStream.h \
|
||||||
|
|
|
@ -153,6 +153,12 @@ class NS_COM nsFileSpecImpl
|
||||||
/* void endline (); */
|
/* void endline (); */
|
||||||
NS_IMETHOD endline();
|
NS_IMETHOD endline();
|
||||||
|
|
||||||
|
//----------------------
|
||||||
|
// COM Cruft
|
||||||
|
//----------------------
|
||||||
|
|
||||||
|
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||||
|
|
||||||
//----------------------
|
//----------------------
|
||||||
// Implementation
|
// Implementation
|
||||||
//----------------------
|
//----------------------
|
||||||
|
@ -161,7 +167,7 @@ class NS_COM nsFileSpecImpl
|
||||||
nsFileSpecImpl(const nsFileSpec& inSpec);
|
nsFileSpecImpl(const nsFileSpec& inSpec);
|
||||||
virtual ~nsFileSpecImpl();
|
virtual ~nsFileSpecImpl();
|
||||||
static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec);
|
static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec);
|
||||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
|
||||||
//----------------------
|
//----------------------
|
||||||
// Data
|
// Data
|
||||||
//----------------------
|
//----------------------
|
||||||
|
@ -170,15 +176,6 @@ class NS_COM nsFileSpecImpl
|
||||||
nsIInputStream* mInputStream;
|
nsIInputStream* mInputStream;
|
||||||
nsIOutputStream* mOutputStream;
|
nsIOutputStream* mOutputStream;
|
||||||
|
|
||||||
// These will go away
|
|
||||||
NS_IMETHOD chooseOutputFile(const char *windowTitle, const char *suggestedLeafName);
|
|
||||||
|
|
||||||
NS_IMETHOD chooseInputFile(const char *title,
|
|
||||||
nsIFileSpec::StandardFilterMask standardFilterMask,
|
|
||||||
const char *extraFilterTitle, const char *extraFilter);
|
|
||||||
|
|
||||||
NS_IMETHOD chooseDirectory(const char *title);
|
|
||||||
|
|
||||||
}; // class nsFileSpecImpl
|
}; // class nsFileSpecImpl
|
||||||
|
|
||||||
#endif // _FILESPECIMPL_H_
|
#endif // _FILESPECIMPL_H_
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
#include "nsAppCoresCIDs.h"
|
#include "nsAppCoresCIDs.h"
|
||||||
#include "nsIDOMAppCoresManager.h"
|
#include "nsIDOMAppCoresManager.h"
|
||||||
|
|
||||||
#define FILE_WIDGET_DEPENDENCY
|
#include "nsIFileSpecWithUI.h"
|
||||||
#include "nsIFileSpec.h"
|
|
||||||
|
|
||||||
#include "nsIScriptContext.h"
|
#include "nsIScriptContext.h"
|
||||||
#include "nsIScriptContextOwner.h"
|
#include "nsIScriptContextOwner.h"
|
||||||
|
@ -1144,13 +1143,13 @@ static void BuildFileURL(const char * aFileName, nsString & aFileURL)
|
||||||
NS_IMETHODIMP nsBrowserAppCore::OpenWindow()
|
NS_IMETHODIMP nsBrowserAppCore::OpenWindow()
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIFileSpec> fileSpec;
|
nsCOMPtr<nsIFileSpecWithUI> fileSpec;
|
||||||
nsresult rv = NS_NewFileSpec(getter_AddRefs(fileSpec));
|
nsresult rv = NS_NewFileSpecWithUI(getter_AddRefs(fileSpec));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
rv = fileSpec->chooseInputFile(
|
rv = fileSpec->chooseInputFile(
|
||||||
"Open File", nsIFileSpec::eAllStandardFilters, nsnull, nsnull);
|
"Open File", nsIFileSpecWithUI::eAllStandardFilters, nsnull, nsnull);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче