зеркало из https://github.com/mozilla/pjs.git
create the screen manager service when asked.
This commit is contained in:
Родитель
72f8e15c93
Коммит
b4c36b28b8
|
@ -35,6 +35,7 @@
|
|||
#include "nsDeviceContextSpecFactoryG.h"
|
||||
#include "nsIDeviceContextSpecPS.h"
|
||||
#include "nsIImageManager.h"
|
||||
#include "nsScreenManagerGtk.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче