From b4c36b28b87bebc2d061863b6e4621c5401abae2 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Thu, 16 Mar 2000 04:57:05 +0000 Subject: [PATCH] create the screen manager service when asked. --- gfx/src/gtk/nsGfxFactoryGTK.cpp | 5 +++++ gfx/src/mac/nsGfxFactoryMac.cpp | 5 +++++ gfx/src/windows/nsGfxFactoryWin.cpp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/gfx/src/gtk/nsGfxFactoryGTK.cpp b/gfx/src/gtk/nsGfxFactoryGTK.cpp index 2270b5560e8..1338f8ac5f1 100644 --- a/gfx/src/gtk/nsGfxFactoryGTK.cpp +++ b/gfx/src/gtk/nsGfxFactoryGTK.cpp @@ -35,6 +35,7 @@ #include "nsDeviceContextSpecFactoryG.h" #include "nsIDeviceContextSpecPS.h" #include "nsIImageManager.h" +#include "nsScreenManagerGtk.h" #include static NS_DEFINE_IID(kCFontMetrics, NS_FONT_METRICS_CID); @@ -53,6 +54,7 @@ static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); static NS_DEFINE_IID(kCDeviceContextSpec, NS_DEVICE_CONTEXT_SPEC_CID); static NS_DEFINE_IID(kCDeviceContextSpecFactory, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID); static NS_DEFINE_IID(kImageManagerImpl, NS_IMAGEMANAGER_CID); +static NS_DEFINE_IID(kCScreenManager, NS_SCREENMANAGER_CID); @@ -174,6 +176,9 @@ nsresult nsGfxFactoryGTK::CreateInstance(nsISupports *aOuter, NS_NEWXPCOM(fe, nsFontEnumeratorGTK); inst = (nsISupports *)fe; } + else if (mClassID.Equals(kCScreenManager)) { + NS_NEWXPCOM(inst, nsScreenManagerGtk); + } if (inst == NULL) { return NS_ERROR_OUT_OF_MEMORY; diff --git a/gfx/src/mac/nsGfxFactoryMac.cpp b/gfx/src/mac/nsGfxFactoryMac.cpp index b78915ab842..04d7d6a2a9c 100644 --- a/gfx/src/mac/nsGfxFactoryMac.cpp +++ b/gfx/src/mac/nsGfxFactoryMac.cpp @@ -33,6 +33,7 @@ #include "nsIImageManager.h" #include "nsDeviceContextSpecMac.h" #include "nsDeviceContextSpecFactoryM.h" +#include "nsScreenManagerMac.h" #include "nsBlender.h" #include "nsCOMPtr.h" @@ -47,6 +48,7 @@ static NS_DEFINE_IID(kCDeviceContextSpec, NS_DEVICE_CONTEXT_SPEC_CID); static NS_DEFINE_IID(kCDeviceContextSpecFactory, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID); static NS_DEFINE_IID(kImageManagerImpl, NS_IMAGEMANAGER_CID); static NS_DEFINE_IID(kCBlender, NS_BLENDER_CID); +static NS_DEFINE_IID(kCScreenManager, NS_SCREENMANAGER_CID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); @@ -138,6 +140,9 @@ nsresult nsGfxFactoryMac::CreateInstance(nsISupports *aOuter, NS_NEWXPCOM(fe, nsFontEnumeratorMac); inst = (nsISupports *)fe; } + else if (mClassID.Equals(kCScreenManager)) { + NS_NEWXPCOM(inst, nsScreenManagerMac); + } if (inst == NULL) { diff --git a/gfx/src/windows/nsGfxFactoryWin.cpp b/gfx/src/windows/nsGfxFactoryWin.cpp index 87ef29b103f..c0752c2e846 100644 --- a/gfx/src/windows/nsGfxFactoryWin.cpp +++ b/gfx/src/windows/nsGfxFactoryWin.cpp @@ -34,6 +34,7 @@ #include "nsDeviceContextSpecFactoryW.h" #include "nsScriptableRegion.h" #include "nsIImageManager.h" +#include "nsScreenManagerWin.h" static NS_DEFINE_IID(kCFontMetrics, NS_FONT_METRICS_CID); static NS_DEFINE_IID(kCFontEnumerator, NS_FONT_ENUMERATOR_CID); @@ -46,6 +47,7 @@ static NS_DEFINE_IID(kCDeviceContextSpec, NS_DEVICE_CONTEXT_SPEC_CID); static NS_DEFINE_IID(kCDeviceContextSpecFactory, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID); static NS_DEFINE_IID(kCDrawingSurface, NS_DRAWING_SURFACE_CID); static NS_DEFINE_IID(kImageManagerImpl, NS_IMAGEMANAGER_CID); +static NS_DEFINE_IID(kCScreenManager, NS_SCREENMANAGER_CID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); @@ -208,6 +210,9 @@ nsresult nsGfxFactoryWin::CreateInstance(nsISupports *aOuter, NS_NEWXPCOM(fe, nsFontEnumeratorWin); inst = (nsISupports *)fe; } + else if (mClassID.Equals(kCScreenManager)) { + NS_NEWXPCOM(inst, nsScreenManagerWin); + } if (inst == NULL) {