2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 01:20:02 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# 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/.
|
|
|
|
|
2017-04-14 12:54:36 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Widget: Gtk")
|
|
|
|
|
2017-05-30 05:29:22 +03:00
|
|
|
with Files("*CompositorWidget*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Graphics")
|
|
|
|
|
|
|
|
with Files("*WindowSurface*"):
|
|
|
|
BUG_COMPONENT = ("Core", "Graphics")
|
|
|
|
|
2019-08-21 15:25:42 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
|
2014-05-01 15:36:05 +04:00
|
|
|
DIRS += ['mozgtk']
|
|
|
|
|
2017-10-18 15:34:27 +03:00
|
|
|
if CONFIG['MOZ_WAYLAND']:
|
2018-11-17 00:19:51 +03:00
|
|
|
DIRS += ['wayland', 'mozwayland']
|
2017-10-18 15:34:27 +03:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2020-05-13 16:11:49 +03:00
|
|
|
'MozContainer.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsGTKToolkit.h',
|
|
|
|
'nsIImageToPixbuf.h',
|
|
|
|
]
|
|
|
|
|
2015-04-29 23:29:34 +03:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'WidgetUtilsGtk.h'
|
|
|
|
]
|
|
|
|
|
2013-12-04 05:06:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2015-07-27 02:23:04 +03:00
|
|
|
'IMContextWrapper.cpp',
|
2020-05-13 16:11:49 +03:00
|
|
|
'MozContainer.cpp',
|
2020-02-12 16:10:50 +03:00
|
|
|
'MPRISServiceHandler.cpp',
|
2014-03-14 17:13:32 +04:00
|
|
|
'NativeKeyBindings.cpp',
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsAppShell.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsBidiKeyboard.cpp',
|
2013-06-22 17:39:43 +04:00
|
|
|
'nsColorPicker.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsFilePicker.cpp',
|
2015-07-27 02:23:04 +03:00
|
|
|
'nsGtkKeyUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsImageToPixbuf.cpp',
|
|
|
|
'nsLookAndFeel.cpp',
|
2020-07-30 20:02:02 +03:00
|
|
|
'nsNativeBasicThemeGTK.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsNativeThemeGTK.cpp',
|
|
|
|
'nsSound.cpp',
|
|
|
|
'nsToolkit.cpp',
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsWidgetFactory.cpp',
|
2019-02-23 21:07:59 +03:00
|
|
|
'ProcInfo.cpp',
|
2017-03-09 14:29:44 +03:00
|
|
|
'ScreenHelperGTK.cpp',
|
2018-03-08 19:43:00 +03:00
|
|
|
'TaskbarProgress.cpp',
|
2014-06-18 08:11:00 +04:00
|
|
|
'WakeLockListener.cpp',
|
2013-12-04 05:06:16 +04:00
|
|
|
'WidgetTraceEvent.cpp',
|
2015-04-29 23:29:34 +03:00
|
|
|
'WidgetUtilsGtk.cpp',
|
2013-12-04 05:06:16 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
SOURCES += [
|
2019-12-06 23:55:26 +03:00
|
|
|
'MediaKeysEventSourceFactory.cpp',
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsWindow.cpp', # conflicts with X11 headers
|
2019-11-27 03:21:33 +03:00
|
|
|
'WaylandVsyncSource.cpp', # conflicts with X11 headers
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2013-12-04 05:06:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2016-07-22 20:23:07 +03:00
|
|
|
'CompositorWidgetChild.cpp',
|
|
|
|
'CompositorWidgetParent.cpp',
|
2017-12-18 22:20:02 +03:00
|
|
|
'GtkCompositorWidget.cpp',
|
|
|
|
'InProcessGtkCompositorWidget.cpp',
|
2020-07-20 19:06:59 +03:00
|
|
|
'nsUserIdleServiceGTK.cpp',
|
2016-07-22 20:23:07 +03:00
|
|
|
]
|
|
|
|
EXPORTS.mozilla.widget += [
|
|
|
|
'CompositorWidgetChild.h',
|
|
|
|
'CompositorWidgetParent.h',
|
2017-12-18 22:20:02 +03:00
|
|
|
'GtkCompositorWidget.h',
|
|
|
|
'InProcessGtkCompositorWidget.h',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['NS_PRINTING']:
|
2013-12-04 05:06:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsDeviceContextSpecG.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsPrintDialogGTK.cpp',
|
|
|
|
'nsPrintSettingsGTK.cpp',
|
2017-12-19 13:06:39 +03:00
|
|
|
'nsPrintSettingsServiceGTK.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2013-12-04 05:06:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-12-04 12:23:15 +04:00
|
|
|
'nsClipboard.cpp',
|
2017-11-16 16:00:00 +03:00
|
|
|
'nsClipboardX11.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsDragService.cpp',
|
2016-07-22 20:23:07 +03:00
|
|
|
'WindowSurfaceProvider.cpp',
|
2016-07-11 23:08:43 +03:00
|
|
|
'WindowSurfaceX11.cpp',
|
|
|
|
'WindowSurfaceX11Image.cpp',
|
|
|
|
'WindowSurfaceXRender.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
2016-07-22 20:23:07 +03:00
|
|
|
EXPORTS.mozilla.widget += [
|
|
|
|
'WindowSurfaceProvider.h',
|
|
|
|
]
|
2013-08-22 10:55:59 +04:00
|
|
|
|
2017-10-26 21:19:36 +03:00
|
|
|
if CONFIG['MOZ_WAYLAND']:
|
|
|
|
UNIFIED_SOURCES += [
|
2020-06-23 09:27:09 +03:00
|
|
|
'DMABufLibWrapper.cpp',
|
2020-06-21 16:59:24 +03:00
|
|
|
'DMABufSurface.cpp',
|
2020-05-13 16:11:49 +03:00
|
|
|
'MozContainerWayland.cpp',
|
2018-01-16 12:08:25 +03:00
|
|
|
'nsClipboardWayland.cpp',
|
2018-11-23 10:04:16 +03:00
|
|
|
'nsWaylandDisplay.cpp',
|
2017-10-26 21:19:36 +03:00
|
|
|
'WindowSurfaceWayland.cpp',
|
|
|
|
]
|
2019-04-30 12:37:37 +03:00
|
|
|
EXPORTS.mozilla.widget += [
|
2020-06-23 09:27:09 +03:00
|
|
|
'DMABufLibWrapper.h',
|
2020-06-21 16:59:24 +03:00
|
|
|
'DMABufSurface.h',
|
2020-05-13 16:11:49 +03:00
|
|
|
'MozContainerWayland.h',
|
2019-05-29 15:50:18 +03:00
|
|
|
'nsWaylandDisplay.h',
|
2019-06-04 14:11:28 +03:00
|
|
|
]
|
|
|
|
|
2013-09-21 01:37:36 +04:00
|
|
|
if CONFIG['ACCESSIBILITY']:
|
2013-12-04 05:06:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-21 01:37:36 +04:00
|
|
|
'maiRedundantObjectFactory.c',
|
|
|
|
]
|
|
|
|
|
2018-10-18 03:16:39 +03:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'gtk3drawing.cpp',
|
|
|
|
'nsApplicationChooser.cpp',
|
|
|
|
'WidgetStyleCache.cpp',
|
|
|
|
]
|
2013-10-03 11:11:13 +04:00
|
|
|
|
2019-01-25 04:27:24 +03:00
|
|
|
XPCOM_MANIFESTS += [
|
|
|
|
'components.conf',
|
|
|
|
]
|
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2013-11-28 18:17:25 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2018-06-29 21:23:03 +03:00
|
|
|
'/layout/base',
|
2020-07-30 20:02:02 +03:00
|
|
|
'/layout/forms',
|
2013-11-28 18:17:25 +04:00
|
|
|
'/layout/generic',
|
2013-12-04 05:06:16 +04:00
|
|
|
'/layout/xul',
|
2013-11-28 18:17:25 +04:00
|
|
|
'/other-licenses/atk-1.0',
|
2020-07-22 02:39:42 +03:00
|
|
|
'/third_party/cups/include',
|
2014-10-23 21:16:45 +04:00
|
|
|
'/widget',
|
2017-04-04 17:22:00 +03:00
|
|
|
'/widget/headless',
|
2013-11-28 18:17:25 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
|
|
|
LOCAL_INCLUDES += [
|
2014-10-23 21:16:47 +04:00
|
|
|
'/widget/x11',
|
2013-11-28 18:17:25 +04:00
|
|
|
]
|
|
|
|
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['CAIRO_GFX'] = True
|
|
|
|
|
|
|
|
DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
|
2014-07-24 19:55:33 +04:00
|
|
|
|
2015-05-08 00:08:20 +03:00
|
|
|
# When building with GTK3, the widget code always needs to use
|
|
|
|
# system Cairo headers, regardless of whether we are also linked
|
|
|
|
# against and using in-tree Cairo. By not using in-tree Cairo
|
|
|
|
# headers, we avoid picking up our renamed symbols, and instead
|
|
|
|
# use only system Cairo symbols that GTK3 uses. This allows that
|
|
|
|
# any Cairo objects created can be freely passed back and forth
|
|
|
|
# between the widget code and GTK3.
|
2019-08-21 15:25:42 +03:00
|
|
|
if not (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk' and CONFIG['MOZ_TREE_CAIRO']):
|
2015-05-08 00:08:20 +03:00
|
|
|
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
|
2014-07-24 19:55:33 +04:00
|
|
|
CFLAGS += CONFIG['TK_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['TK_CFLAGS']
|
|
|
|
|
2019-06-21 00:52:42 +03:00
|
|
|
if CONFIG['MOZ_WAYLAND']:
|
|
|
|
CFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
|
|
|
|
|
2014-07-24 19:55:33 +04:00
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
2016-05-11 10:00:01 +03:00
|
|
|
|
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|