Fixes to make the mac build; jfrancis will follow with the project file

This commit is contained in:
akkana%netscape.com 1999-02-26 01:59:49 +00:00
parent 9a9aae17fd
commit fca17ef807
2 changed files with 29 additions and 5 deletions

View File

@ -22,9 +22,10 @@
#include <string>
#include <Scrap.h>
#include <TextEdit.h>
#include "nscore.h"
NS_IMPL_ADDREF(nsDialog)
NS_IMPL_RELEASE(nsDialog)
NS_IMPL_ADDREF(nsSelectionMgr)
NS_IMPL_RELEASE(nsSelectionMgr)
nsSelectionMgr::nsSelectionMgr()
{
@ -37,6 +38,29 @@ nsSelectionMgr::~nsSelectionMgr()
{
}
nsresult nsSelectionMgr::QueryInterface(const nsIID& aIID,
void** aInstancePtrResult)
{
NS_PRECONDITION(aInstancePtrResult, "null pointer");
if (!aInstancePtrResult)
{
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsISupports::IID()))
{
*aInstancePtrResult = (void*)(nsISupports*)this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsISelectionMgr::IID()))
{
*aInstancePtrResult = (void*)(nsISelectionMgr*)this;
NS_ADDREF_THIS();
return NS_OK;
}
return !NS_OK;
}
nsresult nsSelectionMgr::GetCopyOStream(ostream** aStream)
{
if (mCopyStream)

View File

@ -18,14 +18,14 @@
#include "nsISelectionMgr.h"
class stringstream;
#include <strstream.h>
/**
* Selection Manager for the Mac.
* Owns the copied text, listens for selection request events.
*/
class nsSelectionMgr : nsISelectionMgr
class nsSelectionMgr : public nsISelectionMgr
{
public:
nsSelectionMgr();
@ -39,6 +39,6 @@ public:
private:
stringstream* mCopyStream;
}
};
nsresult NS_NewSelectionMgr(nsISelectionMgr** aInstancePtrResult);