From 037abd6d71fa972b07f79f6781f2fb2dfb7eb380 Mon Sep 17 00:00:00 2001 From: "akkana%netscape.com" Date: Thu, 25 Feb 1999 06:54:50 +0000 Subject: [PATCH] Backing out my changes git-svn-id: svn://10.0.0.236/trunk@21877 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/public/nsIAppShell.h | 7 ----- mozilla/widget/src/gtk/nsAppShell.cpp | 18 ------------- mozilla/widget/src/gtk/nsAppShell.h | 2 -- mozilla/widget/src/gtk/nsWindow.cpp | 4 --- mozilla/widget/src/mac/nsAppShell.cpp | 31 ----------------------- mozilla/widget/src/mac/nsAppShell.h | 3 --- mozilla/widget/src/windows/nsAppShell.cpp | 18 ------------- mozilla/widget/src/windows/nsAppShell.h | 2 -- 8 files changed, 85 deletions(-) diff --git a/mozilla/widget/public/nsIAppShell.h b/mozilla/widget/public/nsIAppShell.h index 772f4e9ff06..9cfa0328261 100644 --- a/mozilla/widget/public/nsIAppShell.h +++ b/mozilla/widget/public/nsIAppShell.h @@ -43,7 +43,6 @@ class nsDispatchListener { }; class nsIWidget; -class nsISelectionMgr; /** * Application shell used for Test applications @@ -97,12 +96,6 @@ public: virtual void* GetNativeData(PRUint32 aDataType) = 0; - /** - * Get the selection manager. - */ - - virtual nsresult GetSelectionMgr(nsISelectionMgr** aSelectionMgr) = 0; - }; diff --git a/mozilla/widget/src/gtk/nsAppShell.cpp b/mozilla/widget/src/gtk/nsAppShell.cpp index c8312b72ef5..fef7bbf9a31 100644 --- a/mozilla/widget/src/gtk/nsAppShell.cpp +++ b/mozilla/widget/src/gtk/nsAppShell.cpp @@ -21,7 +21,6 @@ #include "plevent.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsSelectionMgr.h" #include "nsXPComCIID.h" #include @@ -38,7 +37,6 @@ nsAppShell::nsAppShell() { mRefCnt = 0; mDispatchListener = 0; - mSelectionMgr = 0; } //------------------------------------------------------------------------- @@ -48,7 +46,6 @@ nsAppShell::nsAppShell() //------------------------------------------------------------------------- nsAppShell::~nsAppShell() { - NS_IF_RELEASE(mSelectionMgr); } //------------------------------------------------------------------------- @@ -97,10 +94,6 @@ NS_METHOD nsAppShell::Create(int* argc, char ** argv) // gtk_rc_init(); - // Create the selection manager - if (!mSelectionMgr) - NS_NewSelectionMgr(&mSelectionMgr); - return NS_OK; } @@ -194,14 +187,3 @@ nsresult nsAppShell::DispatchNativeEvent(void * aEvent) { return NS_ERROR_FAILURE; } - -NS_METHOD -nsAppShell::GetSelectionMgr(nsISelectionMgr** aSelectionMgr) -{ - *aSelectionMgr = mSelectionMgr; - NS_IF_ADDREF(mSelectionMgr); - if (!mSelectionMgr) - return NS_ERROR_NOT_INITIALIZED; - return NS_OK; -} - diff --git a/mozilla/widget/src/gtk/nsAppShell.h b/mozilla/widget/src/gtk/nsAppShell.h index 998f20c6c2b..cd5653be3e1 100644 --- a/mozilla/widget/src/gtk/nsAppShell.h +++ b/mozilla/widget/src/gtk/nsAppShell.h @@ -43,7 +43,6 @@ class nsAppShell : public nsIAppShell NS_IMETHOD Exit(); NS_IMETHOD SetDispatchListener(nsDispatchListener* aDispatchListener); virtual void* GetNativeData(PRUint32 aDataType); - NS_IMETHOD GetSelectionMgr(nsISelectionMgr** aSelectionMgr); // XXX temporary for Dialog investigation NS_IMETHOD GetNativeEvent(void *& aEvent, nsIWidget* aWidget, PRBool &aIsInWindow, PRBool &aIsMouseEvent); @@ -51,7 +50,6 @@ class nsAppShell : public nsIAppShell private: nsDispatchListener *mDispatchListener; - nsISelectionMgr *mSelectionMgr; protected: nsIEventQueueService * mEventQService; diff --git a/mozilla/widget/src/gtk/nsWindow.cpp b/mozilla/widget/src/gtk/nsWindow.cpp index 2aa90214b61..9f7050fcc35 100644 --- a/mozilla/widget/src/gtk/nsWindow.cpp +++ b/mozilla/widget/src/gtk/nsWindow.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include "nsWindow.h" #include "nsIFontMetrics.h" @@ -35,8 +34,6 @@ #include "nsGtkEventHandler.h" #include "nsAppShell.h" -#include "nsSelectionMgr.h" - #include "stdio.h" //#define DBG 0 @@ -232,7 +229,6 @@ NS_METHOD nsWindow::CreateNative(GtkWidget *parentWidget) GTK_SIGNAL_FUNC(handle_delete_event), this); - nsSelectionMgr::SetTopLevelWidget(mShell); } // Force cursor to default setting diff --git a/mozilla/widget/src/mac/nsAppShell.cpp b/mozilla/widget/src/mac/nsAppShell.cpp index 32adb30d41d..753b081aaae 100644 --- a/mozilla/widget/src/mac/nsAppShell.cpp +++ b/mozilla/widget/src/mac/nsAppShell.cpp @@ -28,13 +28,8 @@ #include "nsAppShell.h" #include "nsIAppShell.h" -#undef USE_SELECTION_MGR // toggle this when nsSelectionMgr.cpp is added to the Mac build - #include "nsMacMessageSink.h" #include "nsMacMessagePump.h" -#ifdef USE_SELECTION_MGR -#include "nsSelectionMgr.h" -#endif /* USE_SELECTION_MGR */ #include "nsToolKit.h" #include #include @@ -74,13 +69,6 @@ NS_IMETHODIMP nsAppShell::SetDispatchListener(nsDispatchListener* aDispatchListe NS_IMETHODIMP nsAppShell::Create(int* argc, char ** argv) { mToolKit = auto_ptr( new nsToolkit() ); - -#ifdef USE_SELECTION_MGR - // Create the selection manager - if (!mSelectionMgr) - NS_NewSelectionMgr(&mSelectionMgr); -#endif /* USE_SELECTION_MGR */ - return NS_OK; } @@ -144,7 +132,6 @@ nsAppShell::nsAppShell() } mRefCnt = 0; mExitCalled = PR_FALSE; - mSelectionMgr = 0; } //------------------------------------------------------------------------- @@ -154,9 +141,6 @@ nsAppShell::nsAppShell() //------------------------------------------------------------------------- nsAppShell::~nsAppShell() { -#ifdef USE_SELECTION_MGR - NS_IF_RELEASE(mSelectionMgr); -#endif /* USE_SELECTION_MGR */ } //------------------------------------------------------------------------- @@ -187,18 +171,3 @@ nsresult nsAppShell::DispatchNativeEvent(void * aEvent) { return NS_ERROR_FAILURE; } - -NS_METHOD -nsAppShell::GetSelectionMgr(nsISelectionMgr** aSelectionMgr) -{ -#ifdef USE_SELECTION_MGR - *aSelectionMgr = mSelectionMgr; - NS_IF_ADDREF(mSelectionMgr); - if (!mSelectionMgr) - return NS_ERROR_NOT_INITIALIZED; - return NS_OK; -#else /* USE_SELECTION_MGR */ - return NS_ERROR_NOT_IMPLEMENTED; -#endif /* USE_SELECTION_MGR */ -} - diff --git a/mozilla/widget/src/mac/nsAppShell.h b/mozilla/widget/src/mac/nsAppShell.h index a21bd392360..e112d51b381 100644 --- a/mozilla/widget/src/mac/nsAppShell.h +++ b/mozilla/widget/src/mac/nsAppShell.h @@ -41,7 +41,6 @@ class nsAppShell : public nsIAppShell { private: nsDispatchListener *mDispatchListener; // note: we don't own this, but it can be NULL - nsISelectionMgr *mSelectionMgr; auto_ptr mToolKit; auto_ptr mMacPump; nsMacMessageSink *mMacSink; //еее this will be COM, so use scc's COM_auto_ptr @@ -67,8 +66,6 @@ class nsAppShell : public nsIAppShell virtual void* GetNativeData(PRUint32 aDataType); - NS_IMETHOD GetSelectionMgr(nsISelectionMgr** aSelectionMgr); - // XXX temporary for Dialog investigation NS_IMETHOD GetNativeEvent(void *& aEvent, nsIWidget* aWidget, PRBool &aIsInWindow, PRBool &aIsMouseEvent); NS_IMETHOD DispatchNativeEvent(void * aEvent); diff --git a/mozilla/widget/src/windows/nsAppShell.cpp b/mozilla/widget/src/windows/nsAppShell.cpp index b448fe6729a..b59ef4f7ca8 100644 --- a/mozilla/widget/src/windows/nsAppShell.cpp +++ b/mozilla/widget/src/windows/nsAppShell.cpp @@ -18,7 +18,6 @@ #include "nsAppShell.h" #include "nsIWidget.h" -#include "nsSelectionMgr.h" #include NS_IMPL_ISUPPORTS(nsAppShell, NS_IAPPSHELL_IID) @@ -32,7 +31,6 @@ nsAppShell::nsAppShell() { NS_INIT_REFCNT(); mDispatchListener = 0; - mSelectionMgr = 0; } @@ -45,10 +43,6 @@ nsAppShell::nsAppShell() NS_METHOD nsAppShell::Create(int* argc, char ** argv) { - // Create the selection manager - if (!mSelectionMgr) - NS_NewSelectionMgr(&mSelectionMgr); - return NS_OK; } @@ -173,7 +167,6 @@ NS_METHOD nsAppShell::Exit() //------------------------------------------------------------------------- nsAppShell::~nsAppShell() { - NS_IF_RELEASE(mSelectionMgr); } //------------------------------------------------------------------------- @@ -188,14 +181,3 @@ 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; -} - diff --git a/mozilla/widget/src/windows/nsAppShell.h b/mozilla/widget/src/windows/nsAppShell.h index 54c8c81d8fc..b92855caf64 100644 --- a/mozilla/widget/src/windows/nsAppShell.h +++ b/mozilla/widget/src/windows/nsAppShell.h @@ -43,7 +43,6 @@ class nsAppShell : public nsIAppShell NS_IMETHOD SetDispatchListener(nsDispatchListener* aDispatchListener); NS_IMETHOD Exit(); virtual void* GetNativeData(PRUint32 aDataType); - NS_IMETHOD GetSelectionMgr(nsISelectionMgr** aSelectionMgr); // XXX temporary for Dialog investigation NS_IMETHOD GetNativeEvent(void *& aEvent, nsIWidget* aWidget, PRBool &aIsInWindow, PRBool &aIsMouseEvent); @@ -52,7 +51,6 @@ class nsAppShell : public nsIAppShell private: nsDispatchListener* mDispatchListener; - nsISelectionMgr *mSelectionMgr; }; #endif // nsAppShell_h__