1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 BUG_COMPONENT = ("Core", "Widget: Gtk")
10 with Files("*CompositorWidget*"):
11 BUG_COMPONENT = ("Core", "Graphics")
13 with Files("*WindowSurface*"):
14 BUG_COMPONENT = ("Core", "Graphics")
16 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
19 if CONFIG['MOZ_WAYLAND']:
20 DIRS += ['wayland', 'mozwayland']
33 'IMContextWrapper.cpp',
35 'MPRISServiceHandler.cpp',
36 'NativeKeyBindings.cpp',
42 'nsImageToPixbuf.cpp',
44 'nsNativeBasicThemeGTK.cpp',
45 'nsNativeThemeGTK.cpp',
48 'nsWidgetFactory.cpp',
50 'ScreenHelperGTK.cpp',
51 'TaskbarProgress.cpp',
52 'WakeLockListener.cpp',
53 'WidgetTraceEvent.cpp',
58 'MediaKeysEventSourceFactory.cpp',
59 'nsWindow.cpp', # conflicts with X11 headers
60 'WaylandVsyncSource.cpp', # conflicts with X11 headers
65 'CompositorWidgetChild.cpp',
66 'CompositorWidgetParent.cpp',
67 'GtkCompositorWidget.cpp',
68 'InProcessGtkCompositorWidget.cpp',
69 'nsUserIdleServiceGTK.cpp',
71 EXPORTS.mozilla.widget += [
72 'CompositorWidgetChild.h',
73 'CompositorWidgetParent.h',
74 'GtkCompositorWidget.h',
75 'InProcessGtkCompositorWidget.h',
78 if CONFIG['NS_PRINTING']:
80 'nsDeviceContextSpecG.cpp',
81 'nsPrintDialogGTK.cpp',
82 'nsPrintSettingsGTK.cpp',
83 'nsPrintSettingsServiceGTK.cpp',
92 'WindowSurfaceProvider.cpp',
93 'WindowSurfaceX11.cpp',
94 'WindowSurfaceX11Image.cpp',
95 'WindowSurfaceXRender.cpp',
97 EXPORTS.mozilla.widget += [
98 'WindowSurfaceProvider.h',
101 if CONFIG['MOZ_WAYLAND']:
103 'DMABufLibWrapper.cpp',
105 'MozContainerWayland.cpp',
106 'nsClipboardWayland.cpp',
107 'nsWaylandDisplay.cpp',
108 'WindowSurfaceWayland.cpp',
110 EXPORTS.mozilla.widget += [
111 'DMABufLibWrapper.h',
113 'MozContainerWayland.h',
114 'nsWaylandDisplay.h',
117 if CONFIG['ACCESSIBILITY']:
119 'maiRedundantObjectFactory.c',
124 'nsApplicationChooser.cpp',
125 'WidgetStyleCache.cpp',
132 include('/ipc/chromium/chromium-config.mozbuild')
134 FINAL_LIBRARY = 'xul'
141 '/other-licenses/atk-1.0',
142 '/third_party/cups/include',
147 if CONFIG['MOZ_X11']:
152 DEFINES['CAIRO_GFX'] = True
154 DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
156 # When building with GTK3, the widget code always needs to use
157 # system Cairo headers, regardless of whether we are also linked
158 # against and using in-tree Cairo. By not using in-tree Cairo
159 # headers, we avoid picking up our renamed symbols, and instead
160 # use only system Cairo symbols that GTK3 uses. This allows that
161 # any Cairo objects created can be freely passed back and forth
162 # between the widget code and GTK3.
163 if not (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk' and CONFIG['MOZ_TREE_CAIRO']):
164 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
166 CFLAGS += CONFIG['TK_CFLAGS']
167 CXXFLAGS += CONFIG['TK_CFLAGS']
169 if CONFIG['MOZ_WAYLAND']:
170 CFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
171 CXXFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
173 if CONFIG['MOZ_ENABLE_DBUS']:
174 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
176 CXXFLAGS += ['-Wno-error=shadow']