Turn on nsSelectionMgr for windows

git-svn-id: svn://10.0.0.236/trunk@22181 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
1999-02-26 19:01:15 +00:00
parent 59eb4ba094
commit ee25e1ce6d
5 changed files with 116 additions and 21 deletions

View File

@@ -18,6 +18,7 @@
#include "nsAppShell.h"
#include "nsIWidget.h"
#include "nsSelectionMgr.h"
#include <windows.h>
NS_IMPL_ISUPPORTS(nsAppShell, NS_IAPPSHELL_IID)
@@ -31,6 +32,7 @@ nsAppShell::nsAppShell()
{
NS_INIT_REFCNT();
mDispatchListener = 0;
mSelectionMgr = 0;
}
@@ -43,6 +45,10 @@ nsAppShell::nsAppShell()
NS_METHOD nsAppShell::Create(int* argc, char ** argv)
{
// Create the selection manager
if (!mSelectionMgr)
NS_NewSelectionMgr(&mSelectionMgr);
return NS_OK;
}
@@ -167,6 +173,7 @@ NS_METHOD nsAppShell::Exit()
//-------------------------------------------------------------------------
nsAppShell::~nsAppShell()
{
NS_IF_RELEASE(mSelectionMgr);
}
//-------------------------------------------------------------------------
@@ -181,3 +188,14 @@ void* nsAppShell::GetNativeData(PRUint32 aDataType)
}
return nsnull;
}
NS_METHOD
nsAppShell::GetSelectionMgr(nsISelectionMgr** aSelectionMgr)
{
*aSelectionMgr = mSelectionMgr;
NS_IF_ADDREF(mSelectionMgr);
if (!mSelectionMgr)
return NS_ERROR_NOT_INITIALIZED;
return NS_OK;
}