diff --git a/chrome/src/Makefile.in b/chrome/src/Makefile.in index c31e622428c..2f8a78c0811 100644 --- a/chrome/src/Makefile.in +++ b/chrome/src/Makefile.in @@ -24,8 +24,8 @@ LOCAL_INCLUDES += \ -I$(topsrcdir)/netwerk/base/src \ $(NULL) -ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) -CXXFLAGS += $(MOZ_GTK2_CFLAGS) +ifdef MOZ_ENABLE_GTK +CXXFLAGS += $(TK_CFLAGS) endif LOCAL_INCLUDES += \ diff --git a/chrome/src/nsChromeRegistryChrome.cpp b/chrome/src/nsChromeRegistryChrome.cpp index 8031eef70f1..047e8d2904d 100644 --- a/chrome/src/nsChromeRegistryChrome.cpp +++ b/chrome/src/nsChromeRegistryChrome.cpp @@ -13,7 +13,7 @@ #include #elif defined(XP_MACOSX) #include -#elif defined(MOZ_WIDGET_GTK2) +#elif defined(MOZ_WIDGET_GTK) #include #endif diff --git a/content/base/src/nsFrameLoader.h b/content/base/src/nsFrameLoader.h index 1e3bb7e6654..669631edf87 100644 --- a/content/base/src/nsFrameLoader.h +++ b/content/base/src/nsFrameLoader.h @@ -47,7 +47,7 @@ class RenderFrameParent; } } -#ifdef MOZ_WIDGET_GTK2 +#if defined(MOZ_WIDGET_GTK) typedef struct _GtkWidget GtkWidget; #endif #ifdef MOZ_WIDGET_QT diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 002b8875d0e..9437ecdca16 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -649,7 +649,7 @@ MOCHITEST_CHROME_FILES = \ $(NULL) # This test fails on the Mac for some reason -ifneq (,$(filter gtk2 windows,$(MOZ_WIDGET_TOOLKIT))) +ifneq (,$(filter gtk2 gtk3 windows,$(MOZ_WIDGET_TOOLKIT))) MOCHITEST_FILES_C += \ test_copyimage.html \ $(NULL) diff --git a/editor/libeditor/text/tests/Makefile.in b/editor/libeditor/text/tests/Makefile.in index f34fc120641..c0f272f98c9 100644 --- a/editor/libeditor/text/tests/Makefile.in +++ b/editor/libeditor/text/tests/Makefile.in @@ -37,9 +37,9 @@ MOCHITEST_FILES = \ test_dom_input_event_on_texteditor.html \ $(NULL) -# disables the key handling test on gtk2 because gtk2 overrides some key events +# disables the key handling test on gtk because gtk overrides some key events # on our editor, and the combinations depend on the system. -ifneq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK MOCHITEST_FILES += \ test_texteditor_keyevent_handling.html \ $(NULL) diff --git a/image/decoders/icon/Makefile.in b/image/decoders/icon/Makefile.in index 02a822867ba..fc81a0aeff8 100644 --- a/image/decoders/icon/Makefile.in +++ b/image/decoders/icon/Makefile.in @@ -17,7 +17,7 @@ LIBXUL_LIBRARY = 1 EXPORT_LIBRARY = 1 FAIL_ON_WARNINGS = 1 -ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) +ifdef MOZ_WIDGET_GTK PLATFORM = gtk endif diff --git a/image/decoders/icon/gtk/Makefile.in b/image/decoders/icon/gtk/Makefile.in index cfe0f7488a0..7d7374d3030 100644 --- a/image/decoders/icon/gtk/Makefile.in +++ b/image/decoders/icon/gtk/Makefile.in @@ -17,7 +17,7 @@ FAIL_ON_WARNINGS = 1 ifdef MOZ_ENABLE_GNOMEUI LOCAL_INCLUDES += $(MOZ_GNOMEUI_CFLAGS) else -LOCAL_INCLUDES += $(MOZ_GTK2_CFLAGS) +LOCAL_INCLUDES += $(TK_CFLAGS) endif # we don't want the shared lib, but we want to force the creation of a static lib. diff --git a/image/decoders/moz.build b/image/decoders/moz.build index ff225c66279..3e1dfbd0fc6 100644 --- a/image/decoders/moz.build +++ b/image/decoders/moz.build @@ -8,7 +8,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] # The Icon Channel stuff really shouldn't live in decoders/icon, but we'll # fix that another time. -if toolkit == 'gtk2': +if CONFIG['MOZ_WIDGET_GTK']: DIRS += ['icon/gtk', 'icon'] elif toolkit == 'qt': DIRS += ['icon/qt', 'icon'] diff --git a/intl/lwbrk/src/Makefile.in b/intl/lwbrk/src/Makefile.in index df58ab3519c..738ff26f622 100644 --- a/intl/lwbrk/src/Makefile.in +++ b/intl/lwbrk/src/Makefile.in @@ -18,6 +18,8 @@ LIBXUL_LIBRARY = 1 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) else +ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3) +else ifeq ($(MOZ_WIDGET_TOOLKIT),windows) else ifeq ($(MOZ_WIDGET_TOOLKIT), cocoa) @@ -26,10 +28,11 @@ CSRCS = rulebrk.c endif endif endif +endif include $(topsrcdir)/config/rules.mk -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK CXXFLAGS += \ $(MOZ_PANGO_CFLAGS) \ $(NULL) diff --git a/intl/lwbrk/src/moz.build b/intl/lwbrk/src/moz.build index f540f96f125..ebdb82d1e1c 100644 --- a/intl/lwbrk/src/moz.build +++ b/intl/lwbrk/src/moz.build @@ -12,7 +12,7 @@ CPP_SOURCES += [ 'nsSemanticUnitScanner.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2': +if CONFIG['MOZ_WIDGET_GTK']: CPP_SOURCES += [ 'nsPangoBreaker.cpp', ] diff --git a/ipc/chromium/moz.build b/ipc/chromium/moz.build index d8affcbde3d..d1935b29e1a 100644 --- a/ipc/chromium/moz.build +++ b/ipc/chromium/moz.build @@ -177,7 +177,7 @@ if os_linux: 'process_util_linux.cc', 'time_posix.cc', ] - if CONFIG['MOZ_ENABLE_GTK2']: + if CONFIG['MOZ_WIDGET_GTK']: CPP_SOURCES += [ 'message_pump_glib.cc', ] @@ -193,7 +193,7 @@ if os_bsd: 'process_util_bsd.cc', 'time_posix.cc', ] - if CONFIG['MOZ_ENABLE_GTK2']: + if CONFIG['MOZ_WIDGET_GTK']: CPP_SOURCES += [ 'message_pump_glib.cc', ] diff --git a/ipc/chromium/src/base/message_loop.cc b/ipc/chromium/src/base/message_loop.cc index 5c3d202f556..a5ffb6c62ea 100644 --- a/ipc/chromium/src/base/message_loop.cc +++ b/ipc/chromium/src/base/message_loop.cc @@ -20,7 +20,7 @@ #include "base/message_pump_libevent.h" #endif #if defined(OS_LINUX) || defined(OS_BSD) -#ifdef MOZ_WIDGET_GTK2 +#if defined(MOZ_WIDGET_GTK) #include "base/message_pump_glib.h" #endif #ifdef MOZ_WIDGET_QT diff --git a/ipc/chromium/src/chrome/common/x11_util.h b/ipc/chromium/src/chrome/common/x11_util.h index 989ac3da86f..60b90a8f6e4 100644 --- a/ipc/chromium/src/chrome/common/x11_util.h +++ b/ipc/chromium/src/chrome/common/x11_util.h @@ -11,7 +11,11 @@ // we use a void* for Visual*). The Xlib headers are highly polluting so we try // hard to limit their spread into the rest of the code. +#if (MOZ_WIDGET_GTK == 2) typedef struct _GdkDrawable GdkWindow; +#else +typedef struct _GdkWindow GdkWindow; +#endif typedef struct _GtkWidget GtkWidget; typedef unsigned long XID; typedef struct _XDisplay Display; diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index 78b8ea5f86e..165e1f35c4a 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -87,7 +87,7 @@ SHARED_LIBRARY_LIBS = \ $(DEPTH)/content/mathml/content/src/$(LIB_PREFIX)gkcontentmathml_s.$(LIB_SUFFIX) \ $(NULL) -ifneq (,$(filter qt gtk2,$(MOZ_WIDGET_TOOLKIT))) +ifneq (,$(filter qt gtk2 gtk3,$(MOZ_WIDGET_TOOLKIT))) SHARED_LIBRARY_LIBS += \ $(DEPTH)/dom/system/unix/$(LIB_PREFIX)domsystemunix_s.$(LIB_SUFFIX) \ $(NULL) diff --git a/layout/generic/Makefile.in b/layout/generic/Makefile.in index edf7c03e193..61fc801c1ae 100644 --- a/layout/generic/Makefile.in +++ b/layout/generic/Makefile.in @@ -49,8 +49,8 @@ LOCAL_INCLUDES += \ $(MOZ_PIXMAN_CFLAGS) \ $(NULL) -ifdef MOZ_ENABLE_GTK2 -CXXFLAGS += $(MOZ_GTK2_CFLAGS) +ifdef MOZ_WIDGET_GTK +CXXFLAGS += $(TK_CFLAGS) endif ifdef MOZ_ENABLE_QT diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 4d7d94c0b08..c0a4a300cf0 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -120,7 +120,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); #include "mozilla/gfx/QuartzSupport.h" #endif -#ifdef MOZ_WIDGET_GTK2 +#if defined(MOZ_WIDGET_GTK) #include #include #include @@ -524,7 +524,7 @@ nsObjectFrame::GetDesiredSize(nsPresContext* aPresContext, aReflowState.mComputedMaxHeight); } -#if defined (MOZ_WIDGET_GTK2) +#if defined(MOZ_WIDGET_GTK) // We need to make sure that the size of the object frame does not // exceed the maximum size of X coordinates. See bug #225357 for // more information. In theory Gtk2 can handle large coordinates, diff --git a/security/manager/pki/resources/content/certerror.xul b/security/manager/pki/resources/content/certerror.xul index a360a8a8167..8faf873fce8 100644 --- a/security/manager/pki/resources/content/certerror.xul +++ b/security/manager/pki/resources/content/certerror.xul @@ -27,7 +27,7 @@ -#ifdef MOZ_WIDGET_GTK2 +#ifdef MOZ_WIDGET_GTK #else diff --git a/security/manager/pki/resources/content/exceptionDialog.xul b/security/manager/pki/resources/content/exceptionDialog.xul index 3506708c872..61f3148911b 100644 --- a/security/manager/pki/resources/content/exceptionDialog.xul +++ b/security/manager/pki/resources/content/exceptionDialog.xul @@ -31,7 +31,7 @@ -#ifdef MOZ_WIDGET_GTK2 +#ifdef MOZ_WIDGET_GTK #else diff --git a/testing/tools/screenshot/Makefile.in b/testing/tools/screenshot/Makefile.in index 83fcfc02788..eb276a919ce 100644 --- a/testing/tools/screenshot/Makefile.in +++ b/testing/tools/screenshot/Makefile.in @@ -9,14 +9,14 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +ifdef MOZ_WIDGET_GTK ifdef MOZ_X11 -LOCAL_INCLUDES = $(MOZ_GTK2_CFLAGS) -OS_LIBS = $(MOZ_GTK2_LIBS) $(XSS_LIBS) +LOCAL_INCLUDES = $(TK_CFLAGS) +OS_LIBS = $(TK_LIBS) $(XSS_LIBS) endif # X11 -endif # GTK2 +endif # GTK ifeq ($(MOZ_WIDGET_TOOLKIT),windows) diff --git a/testing/tools/screenshot/gdk-screenshot.cpp b/testing/tools/screenshot/gdk-screenshot.cpp index 1054082aa84..c5eb56994a5 100644 --- a/testing/tools/screenshot/gdk-screenshot.cpp +++ b/testing/tools/screenshot/gdk-screenshot.cpp @@ -58,7 +58,8 @@ int main(int argc, char** argv) { gdk_init(&argc, &argv); -#ifdef HAVE_LIBXSS +// TODO GTK3 +#if defined(HAVE_LIBXSS) && defined(MOZ_WIDGET_GTK2) int event_base, error_base; Bool have_xscreensaver = XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base); @@ -124,11 +125,14 @@ int main(int argc, char** argv) #endif GdkWindow* window = gdk_get_default_root_window(); - GdkPixbuf* screenshot = gdk_pixbuf_get_from_drawable(NULL, window, NULL, - 0, 0, 0, 0, - gdk_screen_width(), - gdk_screen_height()); - + GdkPixbuf* screenshot = NULL; +// TODO GTK3 +#if defined(MOZ_WIDGET_GTK2) + screenshot = gdk_pixbuf_get_from_drawable(NULL, window, NULL, + 0, 0, 0, 0, + gdk_screen_width(), + gdk_screen_height()); +#endif if (!screenshot) { fprintf(stderr, "%s: failed to create screenshot GdkPixbuf\n", argv[0]); return 1; diff --git a/testing/tools/screenshot/moz.build b/testing/tools/screenshot/moz.build index 955023838a4..fbb05044977 100644 --- a/testing/tools/screenshot/moz.build +++ b/testing/tools/screenshot/moz.build @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2' and CONFIG['MOZ_X11']: +if CONFIG['MOZ_WIDGET_GTK'] and CONFIG['MOZ_X11']: PROGRAM = 'screentopng' CPP_SOURCES += [ 'gdk-screenshot.cpp',