diff --git a/accessible/src/atk/Makefile.in b/accessible/src/atk/Makefile.in index 71ce0db24eb..d02379d297a 100644 --- a/accessible/src/atk/Makefile.in +++ b/accessible/src/atk/Makefile.in @@ -18,8 +18,10 @@ FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk -CFLAGS += $(MOZ_GTK2_CFLAGS) -CXXFLAGS += $(MOZ_GTK2_CFLAGS) +ifdef MOZ_ENABLE_GTK +CFLAGS += $(TK_CFLAGS) +CXXFLAGS += $(TK_CFLAGS) +endif ifdef MOZ_ENABLE_DBUS CXXFLAGS += $(MOZ_DBUS_CFLAGS) diff --git a/accessible/src/base/Makefile.in b/accessible/src/base/Makefile.in index 39f108a3dae..4faa8fcfdc7 100644 --- a/accessible/src/base/Makefile.in +++ b/accessible/src/base/Makefile.in @@ -28,9 +28,11 @@ LOCAL_INCLUDES += \ -I$(srcdir)/../../../layout/svg \ -I$(srcdir)/../../../layout/xul/base/src \ -I$(srcdir)/../../../layout/xul/tree/ \ + -I$(srcdir)/../../../ipc/chromium/src \ $(NULL) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_ENABLE_GTK +CXXFLAGS += $(MOZ_CAIRO_CFLAGS) LOCAL_INCLUDES += \ -I$(srcdir)/../atk \ $(NULL) diff --git a/accessible/src/generic/Makefile.in b/accessible/src/generic/Makefile.in index 34021a5bbf9..1eb54477968 100644 --- a/accessible/src/generic/Makefile.in +++ b/accessible/src/generic/Makefile.in @@ -28,7 +28,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../../../layout/xul/base/src \ $(NULL) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_ENABLE_GTK LOCAL_INCLUDES += \ -I$(srcdir)/../atk \ $(NULL) diff --git a/accessible/src/html/Makefile.in b/accessible/src/html/Makefile.in index b7fe6b81f81..afecab7be94 100644 --- a/accessible/src/html/Makefile.in +++ b/accessible/src/html/Makefile.in @@ -29,7 +29,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../../../layout/xul/base/src \ $(NULL) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_ENABLE_GTK LOCAL_INCLUDES += \ -I$(srcdir)/../atk \ $(NULL) diff --git a/accessible/src/moz.build b/accessible/src/moz.build index 458d11b129f..6e5f4d51d3a 100644 --- a/accessible/src/moz.build +++ b/accessible/src/moz.build @@ -6,7 +6,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] -if toolkit == 'gtk2': +if CONFIG['MOZ_ENABLE_GTK']: DIRS += ['atk'] elif toolkit == 'windows': DIRS += ['windows'] diff --git a/accessible/src/xpcom/Makefile.in b/accessible/src/xpcom/Makefile.in index 06f1310f602..f8d9979d652 100644 --- a/accessible/src/xpcom/Makefile.in +++ b/accessible/src/xpcom/Makefile.in @@ -25,7 +25,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../generic \ $(NULL) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_ENABLE_GTK LOCAL_INCLUDES += \ -I$(srcdir)/../atk \ $(NULL) diff --git a/accessible/src/xul/Makefile.in b/accessible/src/xul/Makefile.in index 4487545195b..507f5c4f698 100644 --- a/accessible/src/xul/Makefile.in +++ b/accessible/src/xul/Makefile.in @@ -29,7 +29,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../../../layout/xul/tree// \ $(NULL) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_ENABLE_GTK LOCAL_INCLUDES += \ -I$(srcdir)/../atk \ $(NULL) diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build index 2d28df54ef9..d99e9ea7ef1 100644 --- a/toolkit/components/remote/moz.build +++ b/toolkit/components/remote/moz.build @@ -16,7 +16,7 @@ CPP_SOURCES += [ 'nsXRemoteService.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2': +if CONFIG['MOZ_ENABLE_GTK']: CPP_SOURCES += [ 'nsGTKRemoteService.cpp', ] diff --git a/toolkit/crashreporter/client/Makefile.in b/toolkit/crashreporter/client/Makefile.in index 802c0b6bcb8..06716e0446f 100644 --- a/toolkit/crashreporter/client/Makefile.in +++ b/toolkit/crashreporter/client/Makefile.in @@ -49,7 +49,7 @@ LIBS += \ LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../google-breakpad/src/common/mac/ endif -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK ifdef MOZ_PLATFORM_MAEMO # Maemo's libcurl doesn't ship with a set of CA certificates, @@ -64,8 +64,8 @@ LIBS += \ $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ $(NULL) LOCAL_INCLUDES += -I$(srcdir) -OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS) -OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS) +OS_CXXFLAGS += $(TK_CFLAGS) $(MOZ_GTHREAD_CFLAGS) +OS_LIBS += $(TK_LIBS) $(MOZ_GTHREAD_LIBS) endif ifeq ($(OS_ARCH),SunOS) diff --git a/toolkit/crashreporter/client/moz.build b/toolkit/crashreporter/client/moz.build index 5c6ab1ca17e..cff50bd77f9 100644 --- a/toolkit/crashreporter/client/moz.build +++ b/toolkit/crashreporter/client/moz.build @@ -9,7 +9,7 @@ MODULE = 'crashreporter' if CONFIG['OS_TARGET'] != 'Android': PROGRAM = 'crashreporter' # The xpcshell test case here verifies that the CA certificate list -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2' and CONFIG['MOZ_PLATFORM_MAEMO']: +if CONFIG['MOZ_ENABLE_GTK'] and CONFIG['MOZ_PLATFORM_MAEMO']: XPCSHELL_TESTS_MANIFESTS += ['maemo-unit/xpcshell.ini'] CPP_SOURCES += [ @@ -30,7 +30,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS': 'crashreporter_unix.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2': +if CONFIG['MOZ_ENABLE_GTK']: CPP_SOURCES += [ 'crashreporter_gtk_common.cpp', 'crashreporter_unix_common.cpp', diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index faf5478f44c..49d85ff5e54 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -186,7 +186,7 @@ COMPONENT_LIBS += \ $(NULL) ifdef MOZ_XUL -ifdef MOZ_ENABLE_GTK2 +ifdef MOZ_ENABLE_GTK COMPONENT_LIBS += \ unixproxy \ $(NULL) @@ -269,6 +269,10 @@ COMPONENT_LIBS += \ $(NULL) endif +ifdef MOZ_ENABLE_GTK3 +COMPONENT_LIBS += widget_gtk3 +endif + ifdef MOZ_ENABLE_GTK2 COMPONENT_LIBS += widget_gtk2 endif @@ -280,7 +284,7 @@ endif endif # Platform-specific icon channel stuff - supported mostly-everywhere -ifneq (,$(filter windows os2 mac cocoa gtk2 qt android,$(MOZ_WIDGET_TOOLKIT))) +ifneq (,$(filter windows os2 mac cocoa gtk2 gtk3 qt android,$(MOZ_WIDGET_TOOLKIT))) DEFINES += -DICON_DECODER COMPONENT_LIBS += imgicon endif @@ -530,8 +534,9 @@ ifdef MOZ_ENABLE_DBUS EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS) endif -ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) -EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 +ifdef MOZ_WIDGET_GTK +EXTRA_DSO_LDOPTS += $(TK_LIBS) +EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(XT_LIBS) -lgthread-2.0 EXTRA_DSO_LDOPTS += $(FT2_LIBS) endif diff --git a/toolkit/moz.build b/toolkit/moz.build index 21231e44bfe..5847ff914e7 100644 --- a/toolkit/moz.build +++ b/toolkit/moz.build @@ -30,7 +30,7 @@ if CONFIG['MOZ_MAINTENANCE_SERVICE']: DIRS += ['xre'] -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'qt'): +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'): PARALLEL_DIRS += ['system/unixproxy'] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': PARALLEL_DIRS += ['system/osxproxy'] diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index a63a39e7a75..97f797db68a 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -16,7 +16,7 @@ else ifeq (,$(filter-out SunOS, $(OS_ARCH))) MOZ_PKG_FORMAT = BZ2 else - ifeq (,$(filter-out gtk2 qt, $(MOZ_WIDGET_TOOLKIT))) + ifeq (,$(filter-out gtk2 gtk3 qt, $(MOZ_WIDGET_TOOLKIT))) MOZ_PKG_FORMAT = BZ2 else ifeq (android,$(MOZ_WIDGET_TOOLKIT)) diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in index 406b0d69756..669c964bd99 100644 --- a/toolkit/mozapps/update/updater/Makefile.in +++ b/toolkit/mozapps/update/updater/Makefile.in @@ -38,7 +38,7 @@ endif endif -ifneq ($(MOZ_ENABLE_GTK2),) +ifdef MOZ_WIDGET_GTK OS_CXXFLAGS += $(TK_CFLAGS) OS_LIBS += $(TK_LIBS) endif @@ -75,7 +75,7 @@ WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup WIN32_EXE_LDFLAGS += -DELAYLOAD:wsock32.dll -DELAYLOAD:crypt32.dll endif -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK libs:: updater.png $(NSINSTALL) -D $(DIST)/bin/icons $(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons @@ -111,4 +111,3 @@ ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak,$(MOZ_ RCFLAGS += -DMAR_SIGNING_AURORA_NIGHTLY=1 endif endif - diff --git a/toolkit/mozapps/update/updater/moz.build b/toolkit/mozapps/update/updater/moz.build index eb6f72d4588..0a695de48f4 100644 --- a/toolkit/mozapps/update/updater/moz.build +++ b/toolkit/mozapps/update/updater/moz.build @@ -21,7 +21,7 @@ if CONFIG['OS_ARCH'] == 'WINNT': 'win_dirent.cpp', ] -if CONFIG['MOZ_ENABLE_GTK2']: +if CONFIG['MOZ_ENABLE_GTK']: have_progressui = 1 CPP_SOURCES += [ 'progressui_gtk.cpp', diff --git a/toolkit/system/gnome/Makefile.in b/toolkit/system/gnome/Makefile.in index d30c4426c85..c1f84a02825 100644 --- a/toolkit/system/gnome/Makefile.in +++ b/toolkit/system/gnome/Makefile.in @@ -33,5 +33,10 @@ CXXFLAGS += \ $(MOZ_GNOMEVFS_CFLAGS) \ $(MOZ_GIO_CFLAGS) \ $(GLIB_CFLAGS) \ - $(MOZ_GTK2_CFLAGS) \ $(NULL) + +ifdef MOZ_ENABLE_GTK +CXXFLAGS += \ + $(TK_CFLAGS) \ + $(NULL) +endif diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index 42f06974ad4..28621dc7e52 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -146,7 +146,7 @@ LOCAL_INCLUDES += \ CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK CXXFLAGS += $(MOZ_PANGO_CFLAGS) endif diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index 9d0abb34df8..01df06809dc 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -42,7 +42,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2': CPP_SOURCES += [ 'nsNativeAppSupportOS2.cpp', ] -elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2': +elif CONFIG['MOZ_ENABLE_GTK']: CPP_SOURCES += [ 'nsNativeAppSupportUnix.cpp', ] diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in index 5a0cdc2c37c..870a4cda48d 100644 --- a/widget/gtk2/Makefile.in +++ b/widget/gtk2/Makefile.in @@ -10,10 +10,16 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +ifdef MOZ_ENABLE_GTK2 +MODULE_NAME = nsWidgetGtk2Module LIBRARY_NAME = widget_gtk2 +else +MODULE_NAME = nsWidgetGtk3Module +LIBRARY_NAME = widget_gtk3 +endif + EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = nsWidgetGtk2Module LIBXUL_LIBRARY = 1 NATIVE_THEME_SUPPORT = 1 @@ -32,7 +38,11 @@ endif SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a ifdef NATIVE_THEME_SUPPORT +ifdef MOZ_ENABLE_GTK2 CSRCS += gtk2drawing.c +else +CSRCS += gtk3drawing.c +endif DEFINES += -DNATIVE_THEME_SUPPORT endif @@ -40,9 +50,12 @@ include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk include $(topsrcdir)/config/rules.mk -CFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) +CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS) CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \ - $(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) + $(MOZ_STARTUP_NOTIFICATION_CFLAGS) + +CFLAGS += $(TK_CFLAGS) +CXXFLAGS += $(TK_CFLAGS) ifdef MOZ_PLATFORM_MAEMO ifdef MOZ_ENABLE_GCONF diff --git a/widget/moz.build b/widget/moz.build index e0abb6c7871..e7f1a9f9cbb 100644 --- a/widget/moz.build +++ b/widget/moz.build @@ -10,7 +10,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] if toolkit in ('os2', 'cocoa', 'qt', 'android', 'gonk'): DIRS += [toolkit] -if toolkit in ('qt', 'android', 'gonk', 'gtk2'): +if toolkit in ('qt', 'android', 'gonk', 'gtk2', 'gtk3'): EXPORTS += ['nsIPrintDialogService.h'] if toolkit == 'windows': @@ -54,7 +54,7 @@ TEST_TOOL_DIRS += ['tests'] # multiple implementations of widget can be built on the same # source tree. # -if CONFIG['MOZ_ENABLE_GTK2']: +if CONFIG['MOZ_ENABLE_GTK']: DIRS += ['gtk2'] if CONFIG['MOZ_X11']: diff --git a/widget/xpwidgets/Makefile.in b/widget/xpwidgets/Makefile.in index 0c8065c4fa4..e149a004f66 100644 --- a/widget/xpwidgets/Makefile.in +++ b/widget/xpwidgets/Makefile.in @@ -27,8 +27,18 @@ ifdef MOZ_ENABLE_D3D10_LAYER DEFINES += -DMOZ_ENABLE_D3D10_LAYER endif +ifneq (,$(filter gtk3,$(MOZ_WIDGET_TOOLKIT))) +# gtk3 shares includes with gtk2 +LOCAL_INCLUDES += \ + -I$(srcdir)/../gtk2 \ + $(NULL) +else +LOCAL_INCLUDES += \ + -I$(srcdir)/../$(MOZ_WIDGET_TOOLKIT) \ + $(NULL) +endif + LOCAL_INCLUDES += \ - -I$(srcdir)/../$(MOZ_WIDGET_TOOLKIT) \ -I$(srcdir)/../shared \ -I$(topsrcdir)/layout/base \ -I$(topsrcdir)/layout/forms \ diff --git a/widget/xpwidgets/moz.build b/widget/xpwidgets/moz.build index 85ac69b6698..8a7e0b667c1 100644 --- a/widget/xpwidgets/moz.build +++ b/widget/xpwidgets/moz.build @@ -44,13 +44,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('os2', 'cocoa', 'windows'): 'nsBaseClipboard.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'os2', 'cocoa', 'windows', +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3', 'os2', 'cocoa', 'windows', 'android', 'gonk'): CPP_SOURCES += [ 'nsBaseFilePicker.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'windows', 'cocoa'): +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'): CPP_SOURCES += [ 'nsNativeTheme.cpp', ] diff --git a/xpcom/base/Makefile.in b/xpcom/base/Makefile.in index 3a12f9751bf..8a9f5ebe6fe 100644 --- a/xpcom/base/Makefile.in +++ b/xpcom/base/Makefile.in @@ -60,8 +60,8 @@ include $(topsrcdir)/config/rules.mk DEFINES += -D_IMPL_NS_COM -ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) -CXXFLAGS += $(MOZ_GTK2_CFLAGS) +ifdef MOZ_WIDGET_GTK +CXXFLAGS += $(TK_CFLAGS) endif LOCAL_INCLUDES += \ diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 127d234b960..62a1def86ec 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -116,7 +116,7 @@ nsSystemInfo::Init() } #endif -#ifdef MOZ_WIDGET_GTK2 +#if defined(MOZ_WIDGET_GTK) // This must be done here because NSPR can only separate OS's when compiled, not libraries. char* gtkver = PR_smprintf("GTK %u.%u.%u", gtk_major_version, gtk_minor_version, gtk_micro_version); if (gtkver) { diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in index c76be43b50c..cb056faf4f2 100644 --- a/xpcom/components/Makefile.in +++ b/xpcom/components/Makefile.in @@ -32,6 +32,6 @@ include $(topsrcdir)/config/rules.mk DEFINES += -D_IMPL_NS_COM -ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) -CXXFLAGS += $(MOZ_GTK2_CFLAGS) +ifdef MOZ_WIDGET_GTK +CXXFLAGS += $(TK_CFLAGS) endif diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index 1dc41ea7588..1710292f006 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -464,7 +464,7 @@ ParseManifest(NSLocationType type, FileLocation &file, char* buf, bool aChromeOn majorVersion, minorVersion); } -#elif defined(MOZ_WIDGET_GTK2) +#elif defined(MOZ_WIDGET_GTK) nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), gtk_major_version, gtk_minor_version); diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index 261c59b8797..da90000e636 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -102,7 +102,7 @@ LDFLAGS += /HEAP:0x40000 endif endif -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK libs:: $(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default $(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default @@ -120,7 +120,7 @@ ifeq ($(OS_ARCH),WINNT) cp $(srcdir)/xulrunner.ico $(DIST)/branding/app.ico cp $(srcdir)/document.ico $(DIST)/branding/document.ico endif -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK cp $(srcdir)/default16.png $(DIST)/branding/default16.png cp $(srcdir)/default32.png $(DIST)/branding/default32.png cp $(srcdir)/default48.png $(DIST)/branding/default48.png