mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
Fixes to make the mac build; jfrancis will follow with the project file
This commit is contained in:
parent
9a9aae17fd
commit
fca17ef807
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user