diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk index 4a9c7057634..a39aff83047 100644 --- a/toolkit/library/libxul-config.mk +++ b/toolkit/library/libxul-config.mk @@ -182,27 +182,26 @@ DEFINES += -DICON_DECODER COMPONENT_LIBS += imgicon endif endif -ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) -COMPONENT_LIBS += gkgfxwin gkwidget -endif -ifeq (beos,$(MOZ_WIDGET_TOOLKIT)) -COMPONENT_LIBS += gfx_beos widget_beos -endif -ifeq (os2,$(MOZ_WIDGET_TOOLKIT)) -COMPONENT_LIBS += gfx_os2 wdgtos2 -endif -ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) -COMPONENT_LIBS += gfx_mac widget_mac -endif -ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) -COMPONENT_LIBS += widget_qt -endif ifdef MOZ_ENABLE_CAIRO_GFX -DEFINES += -DMOZ_ENABLE_CAIRO_GFX -COMPONENT_LIBS += gkgfxcairo -else - ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2)) +COMPONENT_LIBS += gkgfxthebes +else # Platform-specific GFX layer + ifeq (windows,$(MOZ_GFX_TOOLKIT)) + COMPONENT_LIBS += gkgfxwin + endif + ifeq (beos,$(MOZ_GFX_TOOLKIT)) + COMPONENT_LIBS += gfx_beos + endif + ifeq (os2,$(MOZ_GFX_TOOLKIT)) + COMPONENT_LIBS += gfx_os2 + endif + ifneq (,$(filter mac cocoa,$(MOZ_GFX_TOOLKIT))) + COMPONENT_LIBS += gfx_mac + endif + ifeq (qt,$(MOZ_GFX_TOOLKIT)) + COMPONENT_LIBS += widget_qt + endif + ifneq (,$(filter gtk gtk2,$(MOZ_GFX_TOOLKIT))) COMPONENT_LIBS += gfx_gtk endif ifdef MOZ_ENABLE_QT @@ -216,6 +215,22 @@ else endif endif +ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) +COMPONENT_LIBS += gkwidget +endif +ifeq (beos,$(MOZ_WIDGET_TOOLKIT)) +COMPONENT_LIBS += widget_beos +endif +ifeq (os2,$(MOZ_WIDGET_TOOLKIT)) +COMPONENT_LIBS += wdgtos2 +endif +ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) +COMPONENT_LIBS += widget_mac +endif +ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) +COMPONENT_LIBS += widget_qt +endif + ifdef MOZ_ENABLE_XLIB COMPONENT_LIBS += widget_xlib endif diff --git a/toolkit/library/libxul-rules.mk b/toolkit/library/libxul-rules.mk index ca9f294b8a5..46aff39d0d0 100644 --- a/toolkit/library/libxul-rules.mk +++ b/toolkit/library/libxul-rules.mk @@ -70,6 +70,17 @@ DEFINES += \ -D_IMPL_NS_WIDGET \ $(NULL) +ifdef MOZ_ENABLE_CAIRO_GFX +ifeq ($(MOZ_WIDGET_TOOLKIT),windows) +OS_LIBS += usp10.lib +endif +ifneq (,$(filter $(MOZ_GFX_TOOLKIT),mac cocoa)) +ifdef MOZ_ENABLE_GLITZ +EXTRA_DSO_LDOPTS += -lmozglitzagl -framework OpenGL -framework AGL +endif +endif +endif # MOZ_ENABLE_CAIRO_GFX + ifdef MOZ_SVG_RENDERER_GDIPLUS OS_LIBS += Gdiplus.lib endif diff --git a/toolkit/library/nsStaticXULComponents.cpp b/toolkit/library/nsStaticXULComponents.cpp index 2565ec03bdf..e5d6d377696 100644 --- a/toolkit/library/nsStaticXULComponents.cpp +++ b/toolkit/library/nsStaticXULComponents.cpp @@ -71,56 +71,58 @@ #define POSTSCRIPT_MODULES #endif -#ifdef XP_WIN +#ifdef MOZ_CAIRO_GFX # define GFX_MODULES MODULE(nsGfxModule) -# define WIDGET_MODULES MODULE(nsWidgetModule) -#elif defined(XP_MACOSX) -# define GFX_MODULES MODULE(nsGfxMacModule) -# define WIDGET_MODULES MODULE(nsWidgetMacModule) -#elif defined(XP_BEOS) -# define GFX_MODULES MODULE(nsGfxBeOSModule) -# define WIDGET_MODULES MODULE(nsWidgetBeOSModule) -#elif defined(XP_OS2) -# define GFX_MODULES MODULE(nsGfxOS2Module) -# define WIDGET_MODULES MODULE(nsWidgetOS2Module) -#endif - -#ifdef MOZ_ENABLE_CAIRO_GFX -#define GFX_MODULES MODULE(nsGfxModule) #else # if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2) -# define GFX_MODULES MODULE(nsGfxGTKModule) +# define GFX_MODULES MODULE(nsGfxGTKModule) # elif defined(MOZ_WIDGET_QT) -# define GFX_MODULES MODULE(nsGfxQtModule) +# define GFX_MODULES MODULE(nsGfxQtModule) # elif defined(MOZ_WIDGET_XLIB) -# define GFX_MODULES MODULE(nsGfxXlibModule) +# define GFX_MODULES MODULE(nsGfxXlibModule) # elif defined(MOZ_WIDGET_PHOTON) -# define GFX_MODULES MODULE(nsGfxPhModule) +# define GFX_MODULES MODULE(nsGfxPhModule) +# elif defined(XP_WIN) +# define GFX_MODULES MODULE(nsGfxModule) +# elif defined(XP_MACOSX) +# define GFX_MODULES MODULE(nsGfxMacModule) +# elif defined(XP_BEOS) +# define GFX_MODULES MODULE(nsGfxBeOSModule) +# elif defined(XP_OS2) +# define GFX_MODULES MODULE(nsGfxOS2Module) +# else +# error Unknown GFX module. # endif #endif +#ifdef XP_WIN +# define WIDGET_MODULES MODULE(nsWidgetModule) +#elif defined(XP_MACOSX) +# define WIDGET_MODULES MODULE(nsWidgetMacModule) +#elif defined(XP_BEOS) +# define WIDGET_MODULES MODULE(nsWidgetBeOSModule) +#elif defined(XP_OS2) +# define WIDGET_MODULES MODULE(nsWidgetOS2Module) +#elif defined(MOZ_WIDGET_GTK) +# define WIDGET_MODULES MODULE(nsWidgetGTKModule) +#elif defined(MOZ_WIDGET_GTK2) +# define WIDGET_MODULES MODULE(nsWidgetGtk2Module) +#elif defined(MOZ_WIDGET_XLIB) +# define WIDGET_MODULES MODULE(nsWidgetXLIBModule) +#elif defined(MOZ_WIDGET_PHOTON) +# define WIDGET_MODULES MODULE(nsWidgetPhModule) +#elif defined(MOZ_WIDGET_QT) +# define WIDGET_MODULES MODULE(nsWidgetQtModule) +#else +# error Unknown widget module. +#endif + #ifdef ICON_DECODER #define ICON_MODULE MODULE(nsIconDecoderModule) #else #define ICON_MODULE #endif -#ifdef MOZ_WIDGET_GTK -#define WIDGET_MODULES MODULE(nsWidgetGTKModule) -#endif -#ifdef MOZ_WIDGET_GTK2 -#define WIDGET_MODULES MODULE(nsWidgetGtk2Module) -#endif -#ifdef MOZ_WIDGET_XLIB -#define WIDGET_MODULES MODULE(nsWidgetXLIBModule) -#endif -#ifdef MOZ_WIDGET_PHOTON -#define WIDGET_MODULES MODULE(nsWidgetPhModule) -#endif -#ifdef MOZ_WIDGET_QT -#define WIDGET_MODULES MODULE(nsWidgetQtModule) -#endif - #ifdef MOZ_ENABLE_XPRINT #define XPRINT_MODULES MODULE(nsGfxXprintModule) #else