mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877626 - Port GTK2 to GTK3 - build config, rest of the tree. r=karlt
This commit is contained in:
parent
fd09aab977
commit
f672df1462
@ -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 += \
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <windows.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
|
@ -47,7 +47,7 @@ class RenderFrameParent;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
typedef struct _GtkWidget GtkWidget;
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_QT
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
ifndef MOZ_WIDGET_GTK
|
||||
MOCHITEST_FILES += \
|
||||
test_texteditor_keyevent_handling.html \
|
||||
$(NULL)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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']
|
||||
|
@ -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)
|
||||
|
@ -12,7 +12,7 @@ CPP_SOURCES += [
|
||||
'nsSemanticUnitScanner.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
|
||||
if CONFIG['MOZ_WIDGET_GTK']:
|
||||
CPP_SOURCES += [
|
||||
'nsPangoBreaker.cpp',
|
||||
]
|
||||
|
@ -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',
|
||||
]
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
@ -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,
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
<hbox>
|
||||
<vbox>
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
<image src="moz-icon://stock/gtk-dialog-warning?size=dialog"/>
|
||||
#else
|
||||
<image src="chrome://global/skin/icons/warning-large.png"/>
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<hbox>
|
||||
<vbox>
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
<image src="moz-icon://stock/gtk-dialog-warning?size=dialog"/>
|
||||
#else
|
||||
<image src="chrome://global/skin/icons/warning-large.png"/>
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user