mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 534644 - implement Qt ipc/chromium backend, first part. r=benjamin, r=jones.chris.g
This commit is contained in:
parent
6836e30944
commit
9a4397fa5b
@ -123,4 +123,6 @@ endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
|
||||
DEFINES += -DFORCE_PR_LOG
|
||||
|
@ -42,6 +42,11 @@
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
# include <gdk/gdkx.h>
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
// X11/X.h has #define CursorShape 0, but Qt's qnamespace.h defines
|
||||
// enum CursorShape { ... }. Good times!
|
||||
# undef CursorShape
|
||||
# include <QX11Info>
|
||||
#else
|
||||
# error Implement me for your toolkit
|
||||
#endif
|
||||
@ -114,18 +119,24 @@ private:
|
||||
{
|
||||
// TODO: get Display* from Window in |ev|
|
||||
|
||||
// FIXME: do this using Xlib, don't use Gdk
|
||||
|
||||
// FIXME: do this using Xlib
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
return GDK_DISPLAY();
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
return QX11Info::display();
|
||||
#endif
|
||||
}
|
||||
|
||||
static Display* GetXDisplay(const XErrorEvent& ev)
|
||||
{
|
||||
// TODO: get Display* from Window in |ev|
|
||||
|
||||
// FIXME: do this using Xlib, don't use Gdk
|
||||
|
||||
// FIXME: do this using Xlib
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
return GDK_DISPLAY();
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
return QX11Info::display();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SetXDisplay(XEvent& ev)
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "mozilla/plugins/PluginModuleChild.h"
|
||||
|
||||
#ifdef OS_LINUX
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
@ -234,7 +234,7 @@ bool
|
||||
PluginModuleChild::InitGraphics()
|
||||
{
|
||||
// FIXME/cjones: is this the place for this?
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
gtk_init(0, 0);
|
||||
|
||||
// GtkPlug is a static class so will leak anyway but this ref makes sure.
|
||||
|
@ -246,14 +246,8 @@ CPPSRCS += \
|
||||
file_util_linux.cc \
|
||||
file_version_info_linux.cc \
|
||||
idle_timer_none.cc \
|
||||
message_pump_glib.cc \
|
||||
process_util_linux.cc \
|
||||
time_posix.cc \
|
||||
chrome_paths_linux.cc \
|
||||
owned_widget_gtk.cc \
|
||||
platform_util_linux.cc \
|
||||
transport_dib_linux.cc \
|
||||
x11_util.cc \
|
||||
$(NULL)
|
||||
|
||||
endif # } OS_LINUX
|
||||
|
@ -19,7 +19,7 @@
|
||||
#if defined(OS_POSIX)
|
||||
#include "base/message_pump_libevent.h"
|
||||
#endif
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(OS_LINUX) && !defined(CHROMIUM_MOZILLA_BUILD)
|
||||
#include "base/message_pump_glib.h"
|
||||
#endif
|
||||
|
||||
@ -112,7 +112,7 @@ MessageLoop::MessageLoop(Type type)
|
||||
if (type_ == TYPE_UI) {
|
||||
#if defined(OS_MACOSX)
|
||||
pump_ = base::MessagePumpMac::Create();
|
||||
#elif defined(OS_LINUX)
|
||||
#elif defined(OS_LINUX) && !defined(CHROMIUM_MOZILLA_BUILD)
|
||||
pump_ = new base::MessagePumpForUI();
|
||||
#endif // OS_LINUX
|
||||
} else if (type_ == TYPE_IO) {
|
||||
|
@ -32,6 +32,7 @@ bool GetGearsPluginPathFromCommandLine(FilePath* path) {
|
||||
}
|
||||
|
||||
bool PathProvider(int key, FilePath* result) {
|
||||
#ifndef CHROMIUM_MOZILLA_BUILD
|
||||
// Some keys are just aliases...
|
||||
switch (key) {
|
||||
case chrome::DIR_APP:
|
||||
@ -211,6 +212,7 @@ bool PathProvider(int key, FilePath* result) {
|
||||
return false;
|
||||
|
||||
*result = cur;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -100,3 +100,7 @@ export:: $(ALL_IPDLSRCS)
|
||||
--outcpp-dir=. \
|
||||
$(IPDLDIRS:%=-I$(topsrcdir)/%) \
|
||||
$^
|
||||
|
||||
# We #include some things in the dom/plugins/ directory that rely on
|
||||
# toolkit libraries.
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
|
@ -211,15 +211,10 @@ EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) \
|
||||
-lXrender \
|
||||
$(NULL)
|
||||
endif
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
|
||||
ifdef MOZ_ENABLE_QT
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_QT_LIBS) \
|
||||
$(NULL)
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
EXTRA_DSO_LDOPTS += -lXrender
|
||||
endif
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
@ -125,8 +125,14 @@ DEFINES += -DGENERIC_MOTIF_REDEFINES
|
||||
OS_CXXFLAGS += -Wc,warn=disa=NOSIMPINT
|
||||
endif
|
||||
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
CFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin $(XLDFLAGS) $(XT_LIBS) $(MOZ_GTK2_LIBS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin $(XLDFLAGS) $(XT_LIBS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS)
|
||||
endif #MOZ_ENABLE_GTK2
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
|
||||
EXTRA_DSO_LDOPTS += $(XEXT_LIBS) $(XCOMPOSITE_LIBS)
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user