[OS/2] Bug 333235: Get Thebes to work on OS/2. Required build additions and easy widget changes. r=mkaply
This commit is contained in:
Родитель
543bef283c
Коммит
db1b25f6fd
|
@ -4518,6 +4518,7 @@ MOZ_ARG_HEADER(Toolkit Options)
|
|||
-o "$_DEFAULT_TOOLKIT" = "cairo-windows" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-beos" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-os2" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-mac" \
|
||||
-o "$_DEFAULT_TOOLKIT" = "cairo-cocoa"
|
||||
|
@ -4626,6 +4627,14 @@ cairo-beos)
|
|||
TK_LIBS='$(MOZ_CAIRO_LIBS)'
|
||||
;;
|
||||
|
||||
cairo-os2)
|
||||
MOZ_WIDGET_TOOLKIT=os2
|
||||
MOZ_GFX_TOOLKIT=cairo
|
||||
MOZ_ENABLE_CAIRO_GFX=1
|
||||
TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_CAIRO_LIBS)'
|
||||
;;
|
||||
|
||||
cairo-xlib)
|
||||
MOZ_WIDGET_TOOLKIT=xlib
|
||||
MOZ_GFX_TOOLKIT=cairo
|
||||
|
|
|
@ -44,6 +44,9 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
MODULE = gfx
|
||||
LIBRARY_NAME = gkgfxthebes
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
SHORT_LIBNAME = gkgfxthb
|
||||
endif
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsGfxModule
|
||||
|
@ -112,6 +115,11 @@ OS_LIBS += opengl32.lib
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||
CPPSRCS += nsSystemFontsOS2.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
|
||||
CPPSRCS += nsSystemFontsBeOS.cpp
|
||||
endif
|
||||
|
|
|
@ -75,6 +75,9 @@ static nsSystemFontsGTK2 *gSystemFonts = nsnull;
|
|||
#include "gfxWindowsSurface.h"
|
||||
static nsSystemFontsWin *gSystemFonts = nsnull;
|
||||
#include <usp10.h>
|
||||
#elif defined(XP_OS2)
|
||||
#include "nsSystemFontsOS2.h"
|
||||
static nsSystemFontsOS2 *gSystemFonts = nsnull;
|
||||
#elif defined(XP_BEOS)
|
||||
#include "nsSystemFontsBeOS.h"
|
||||
static nsSystemFontsBeOS *gSystemFonts = nsnull;
|
||||
|
@ -362,6 +365,8 @@ nsThebesDeviceContext::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
|
|||
gSystemFonts = new nsSystemFontsGTK2();
|
||||
#elif XP_WIN
|
||||
gSystemFonts = new nsSystemFontsWin();
|
||||
#elif XP_OS2
|
||||
gSystemFonts = new nsSystemFontsOS2();
|
||||
#elif defined(XP_BEOS)
|
||||
gSystemFonts = new nsSystemFontsBeOS();
|
||||
#elif XP_MACOSX
|
||||
|
|
|
@ -54,6 +54,8 @@ NS_IMPL_ISUPPORTS1(nsThebesFontMetrics, nsIFontMetrics)
|
|||
#include "gfxPangoFonts.h"
|
||||
#elif defined(XP_MACOSX)
|
||||
#include "gfxAtsuiFonts.h"
|
||||
#elif defined(XP_OS2)
|
||||
#include "gfxOS2Fonts.h"
|
||||
#endif
|
||||
|
||||
nsThebesFontMetrics::nsThebesFontMetrics()
|
||||
|
@ -102,6 +104,8 @@ nsThebesFontMetrics::Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
|||
mFontGroup = new gfxPangoFontGroup(aFont.name, mFontStyle);
|
||||
#elif defined(XP_MACOSX)
|
||||
mFontGroup = new gfxAtsuiFontGroup(aFont.name, mFontStyle);
|
||||
#elif defined(XP_OS2)
|
||||
mFontGroup = new gfxOS2FontGroup(aFont.name, mFontStyle);
|
||||
#else
|
||||
#error implement me
|
||||
#endif
|
||||
|
|
|
@ -54,6 +54,13 @@ REQUIRES += glitzglx
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_GFX_TOOLKIT),os2)
|
||||
EXPORTS += gfxOS2Surface.h \
|
||||
gfxOS2Platform.h \
|
||||
gfxOS2Fonts.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_GFX_TOOLKIT),beos)
|
||||
EXPORTS += gfxBeOSSurface.h gfxBeOSPlatform.h
|
||||
EXPORTS += gfxPangoFonts.h
|
||||
|
|
|
@ -81,7 +81,8 @@ public:
|
|||
SurfaceTypeBeOS,
|
||||
SurfaceTypeDirectFB,
|
||||
SurfaceTypeSVG,
|
||||
SurfaceTypeQuartz2
|
||||
SurfaceTypeQuartz2,
|
||||
SurfaceTypeOS2
|
||||
} gfxSurfaceType;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -68,6 +68,16 @@ OS_LIBS += $(call EXPAND_LIBNAME,$(_OS_LIBS))
|
|||
ACDEFINES += -UWIN32_LEAN_AND_MEAN
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_GFX_TOOLKIT),os2)
|
||||
CPPSRCS += gfxOS2Fonts.cpp \
|
||||
gfxOS2Platform.cpp \
|
||||
gfxOS2Surface.cpp \
|
||||
nsUnicodeRange.cpp \
|
||||
$(NULL)
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_CAIRO_LIBS)
|
||||
REQUIRES += uconv
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_GFX_TOOLKIT),gtk2)
|
||||
CPPSRCS += gfxXlibSurface.cpp gfxPlatformGtk.cpp gfxXlibNativeRenderer.cpp
|
||||
CPPSRCS += gfxPangoFonts.cpp
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
#include "gfxPlatformGtk.h"
|
||||
#elif defined(XP_BEOS)
|
||||
#include "gfxBeOSPlatform.h"
|
||||
#elif defined(XP_OS2)
|
||||
#include "gfxOS2Platform.h"
|
||||
#endif
|
||||
|
||||
#include "gfxContext.h"
|
||||
|
@ -72,6 +74,8 @@ gfxPlatform::GetPlatform()
|
|||
gPlatform = new gfxPlatformGtk;
|
||||
#elif defined(XP_BEOS)
|
||||
gPlatform = new gfxBeOSPlatform;
|
||||
#elif defined(XP_OS2)
|
||||
gPlatform = new gfxOS2Platform;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,10 @@ ifdef BUILD_STATIC_LIBS
|
|||
EXPORTS = wdgtos2rc.h
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_CAIRO_GFX
|
||||
REQUIRES += cairo thebes
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
nsAppShell.cpp \
|
||||
nsBidiKeyboard.cpp \
|
||||
|
@ -104,6 +108,10 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_CAIRO_GFX
|
||||
EXTRA_DSO_LDOPTS += -lthebes
|
||||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
HAS_EXTRAEXPORTS = 1
|
||||
endif
|
||||
|
|
|
@ -398,6 +398,26 @@ nsresult nsDeviceContextSpecOS2::GetPRTQUEUE( PRTQUEUE *&p)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
NS_IMETHODIMP nsDeviceContextSpecOS2::GetSurfaceForPrinter(gfxASurface **nativeSurface)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecOS2::BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
PRInt32 aEndPage)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecOS2::EndDocument()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Printer Enumerator
|
||||
nsPrinterEnumeratorOS2::nsPrinterEnumeratorOS2()
|
||||
{
|
||||
|
|
|
@ -102,6 +102,13 @@ public:
|
|||
|
||||
NS_IMETHOD GetPRTQUEUE(PRTQUEUE *&p);
|
||||
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface);
|
||||
NS_IMETHOD BeginDocument(PRUnichar* aTitle, PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage, PRInt32 aEndPage);
|
||||
NS_IMETHOD EndDocument();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Destructor for nsDeviceContextSpecOS2, this will release the printrecord
|
||||
* @update dc 2/16/98
|
||||
|
|
Загрузка…
Ссылка в новой задаче