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")
10 with Files("crashtests/*1128214*"):
11 BUG_COMPONENT = ("Core", "Layout")
13 with Files("crashtests/*303901*"):
14 BUG_COMPONENT = ("Core", "Graphics")
16 with Files("crashtests/*380359*"):
17 BUG_COMPONENT = ("Core", "Widget")
19 with Files("reftests/**"):
20 BUG_COMPONENT = ("Core", "Widget: Cocoa")
22 with Files("reftests/*fallback*"):
23 BUG_COMPONENT = ("Core", "Layout: Form Controls")
25 with Files("*CompositorWidget*"):
26 BUG_COMPONENT = ("Core", "Graphics")
29 BUG_COMPONENT = ("Core", "Graphics")
31 with Files("*FontRange*"):
32 BUG_COMPONENT = ("Core", "Widget: Cocoa")
34 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
36 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
39 if toolkit == "cocoa":
41 "nsIMacDockSupport.idl",
42 "nsIMacFinderProgress.idl",
43 "nsIMacSharingService.idl",
44 "nsIMacWebAppUtils.idl",
45 "nsIStandaloneNativeMenu.idl",
46 "nsITaskbarProgress.idl",
47 "nsITouchBarHelper.idl",
48 "nsITouchBarInput.idl",
49 "nsITouchBarUpdater.idl",
51 elif toolkit == "gtk":
53 "nsIApplicationChooser.idl",
54 "nsIGtkTaskbarProgress.idl",
55 "nsITaskbarProgress.idl",
57 elif toolkit == "windows":
59 "nsIJumpListBuilder.idl",
60 "nsIJumpListItem.idl",
61 "nsIPrintSettingsWin.idl",
62 "nsITaskbarOverlayIconController.idl",
63 "nsITaskbarPreview.idl",
64 "nsITaskbarPreviewButton.idl",
65 "nsITaskbarPreviewController.idl",
66 "nsITaskbarProgress.idl",
67 "nsITaskbarTabPreview.idl",
68 "nsITaskbarWindowPreview.idl",
69 "nsIWindowsUIUtils.idl",
73 TEST_DIRS += ["tests", "tests/gtest"]
77 # Don't build the DSO under the 'build' directory as windows does.
79 # The DSOs get built in the toolkit dir itself. Do this so that
80 # multiple implementations of widget can be built on the same
87 "nsIBidiKeyboard.idl",
89 "nsIClipboardHelper.idl",
90 "nsIClipboardOwner.idl",
96 "nsIFormatConverter.idl",
98 "nsIGfxInfoDebug.idl",
100 "nsIPaperMargin.idl",
102 "nsIPrinterList.idl",
103 "nsIPrintSession.idl",
104 "nsIPrintSettings.idl",
105 "nsIPrintSettingsService.idl",
107 "nsIScreenManager.idl",
108 "nsISharePicker.idl",
110 "nsISystemStatusBar.idl",
111 "nsITransferable.idl",
112 "nsIUserIdleService.idl",
113 "nsIUserIdleServiceInternal.idl",
116 XPIDL_MODULE = "widget"
121 "GfxInfoCollector.h",
124 "nsBaseDragService.h",
125 "nsBaseFilePicker.h",
128 "nsIDeviceContextSpec.h",
129 "nsIPrintDialogService.h",
130 "nsIRollupListener.h",
132 "nsIWidgetListener.h",
134 "nsPrinterListBase.h",
135 "nsUserIdleService.h",
136 "nsWidgetInitData.h",
148 "EventMessageList.h",
153 "TextEventDispatcher.h",
154 "TextEventDispatcherListener.h",
162 EXPORTS.mozilla.widget += [
163 "CompositorWidget.h",
166 "InProcessCompositorWidget.h",
167 "MediaKeysEventSourceFactory.h",
171 "PuppetBidiKeyboard.h",
172 "RemoteLookAndFeel.h",
176 "WidgetMessageUtils.h",
177 "WindowOcclusionState.h",
181 "CompositorWidget.cpp",
185 "GfxInfoCollector.cpp",
188 "InProcessCompositorWidget.cpp",
191 "nsBaseAppShell.cpp",
193 "nsClipboardHelper.cpp",
194 "nsClipboardProxy.cpp",
195 "nsColorPickerProxy.cpp",
196 "nsContentProcessWidgetFactory.cpp",
197 "nsDragServiceProxy.cpp",
198 "nsFilePickerProxy.cpp",
199 "nsHTMLFormatConverter.cpp",
200 "nsIWidgetListener.cpp",
201 "nsNativeBasicTheme.cpp",
202 # Android non-native theme is built on all platforms for RDM.
203 "nsNativeBasicThemeAndroid.cpp",
204 "nsPrimitiveHelpers.cpp",
205 "nsPrintSettingsImpl.cpp",
207 "nsTransferable.cpp",
208 "nsUserIdleService.cpp",
209 "nsXPLookAndFeel.cpp",
210 "PuppetBidiKeyboard.cpp",
212 "RemoteLookAndFeel.cpp",
214 "ScrollbarDrawingMac.cpp",
215 "SharedWidgetUtils.cpp",
216 "TextEventDispatcher.cpp",
217 "TouchResampler.cpp",
218 "VsyncDispatcher.cpp",
219 "WidgetEventImpl.cpp",
223 if CONFIG["OS_ARCH"] == "Linux":
224 EXPORTS.mozilla.widget += ["LSBUtils.h"]
225 SOURCES += ["LSBUtils.cpp"]
227 if CONFIG["MOZ_XUL"] and CONFIG["NS_PRINTING"]:
229 "nsDeviceContextSpecProxy.h",
230 "nsPrintSettingsService.h",
233 "nsDeviceContextSpecProxy.cpp",
237 "nsPrinterListBase.cpp",
238 "nsPrintSession.cpp",
239 "nsPrintSettingsService.cpp",
242 if toolkit in ("cocoa", "gtk"):
246 "nsPrinterListCUPS.cpp",
249 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
250 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
252 "nsBaseDragService.cpp",
257 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
259 "WidgetTraceEvent.h",
262 EXPORTS.ipc = ["nsGUIEventIPC.h"]
264 if CONFIG["MOZ_X11"]:
267 if toolkit in ("cocoa", "windows"):
269 "nsBaseClipboard.cpp",
272 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
274 "nsBaseFilePicker.cpp",
277 if toolkit in ("gtk", "windows", "cocoa", "android"):
282 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
284 include("/ipc/chromium/chromium-config.mozbuild")
301 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
303 LOCAL_INCLUDES += ["/third_party/cups/include"]
305 if toolkit == "windows":
307 "headless/HeadlessWidgetTypes.ipdlh",
308 "windows/PCompositorWidget.ipdl",
309 "windows/PlatformWidgetTypes.ipdlh",
311 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
313 "gtk/PCompositorWidget.ipdl",
314 "gtk/PlatformWidgetTypes.ipdlh",
315 "headless/HeadlessWidgetTypes.ipdlh",
319 "generic/PCompositorWidget.ipdl",
320 "generic/PlatformWidgetTypes.ipdlh",
321 "headless/HeadlessWidgetTypes.ipdlh",
324 PREPROCESSED_IPDL_SOURCES += [
325 "LookAndFeelTypes.ipdlh",
329 "/widget/%s" % toolkit,
331 FINAL_LIBRARY = "xul"
333 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
334 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
336 CXXFLAGS += CONFIG["TK_CFLAGS"]
337 if CONFIG["MOZ_WAYLAND"]:
338 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
340 REQUIRES_UNIFIED_BUILD = True