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")
28 with Files("*ContentCache*"):
29 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
31 with Files("*ContentData*"):
32 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
34 with Files("*Events.h"):
35 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
37 with Files("*FontRange*"):
38 BUG_COMPONENT = ("Core", "Widget: Cocoa")
41 BUG_COMPONENT = ("Core", "Graphics")
43 with Files("*IMEData*"):
44 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
46 with Files("*TextEventDispatcher*"):
47 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
49 with Files("*NativeKeyBindings*"):
50 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
52 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
58 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
61 if toolkit == "cocoa":
63 "nsIMacDockSupport.idl",
64 "nsIMacFinderProgress.idl",
65 "nsIMacSharingService.idl",
66 "nsIMacUserActivityUpdater.idl",
67 "nsIMacWebAppUtils.idl",
68 "nsIStandaloneNativeMenu.idl",
69 "nsITaskbarProgress.idl",
70 "nsITouchBarHelper.idl",
71 "nsITouchBarInput.idl",
72 "nsITouchBarUpdater.idl",
74 elif toolkit == "gtk":
76 "nsIApplicationChooser.idl",
77 "nsIGtkTaskbarProgress.idl",
78 "nsITaskbarProgress.idl",
80 elif toolkit == "windows":
82 "nsIJumpListBuilder.idl",
83 "nsIPrintSettingsWin.idl",
84 "nsITaskbarOverlayIconController.idl",
85 "nsITaskbarPreview.idl",
86 "nsITaskbarPreviewButton.idl",
87 "nsITaskbarPreviewController.idl",
88 "nsITaskbarProgress.idl",
89 "nsITaskbarTabPreview.idl",
90 "nsITaskbarWindowPreview.idl",
91 "nsIWindowsUIUtils.idl",
94 elif toolkit in ("android", "uikit"):
96 "nsIGeckoViewBridge.idl",
99 if CONFIG["NS_PRINTING"]:
100 # Needs to go before the XPIDL_MODULE line.
102 "nsIPrintDialogService.idl",
105 TEST_DIRS += ["tests", "tests/gtest"]
109 # Don't build the DSO under the 'build' directory as windows does.
111 # The DSOs get built in the toolkit dir itself. Do this so that
112 # multiple implementations of widget can be built on the same
119 "nsIBidiKeyboard.idl",
121 "nsIClipboardHelper.idl",
122 "nsIClipboardOwner.idl",
123 "nsIColorPicker.idl",
124 "nsIDisplayInfo.idl",
125 "nsIDragService.idl",
126 "nsIDragSession.idl",
128 "nsIFormatConverter.idl",
130 "nsIGfxInfoDebug.idl",
131 "nsIMockDragServiceController.idl",
133 "nsIPaperMargin.idl",
135 "nsIPrinterList.idl",
136 "nsIPrintSettings.idl",
137 "nsIPrintSettingsService.idl",
139 "nsIScreenManager.idl",
140 "nsISharePicker.idl",
142 "nsISystemStatusBar.idl",
143 "nsITransferable.idl",
144 "nsIUserIdleService.idl",
145 "nsIUserIdleServiceInternal.idl",
148 XPIDL_MODULE = "widget"
153 "GfxInfoCollector.h",
157 "nsBaseColorPicker.h",
158 "nsBaseDragService.h",
159 "nsBaseFilePicker.h",
161 "nsDragServiceProxy.h",
162 "nsIDeviceContextSpec.h",
163 "nsIRollupListener.h",
165 "nsIWidgetListener.h",
167 "nsPrinterListBase.h",
168 "nsUserIdleService.h",
175 "ClipboardContentAnalysisChild.h",
176 "ClipboardContentAnalysisParent.h",
177 "ClipboardReadRequestChild.h",
178 "ClipboardReadRequestParent.h",
179 "ClipboardWriteRequestChild.h",
180 "ClipboardWriteRequestParent.h",
186 "DimensionRequest.h",
189 "EventMessageList.h",
194 "NativeKeyBindingsType.h",
196 "TextEventDispatcher.h",
197 "TextEventDispatcherListener.h",
203 "WindowButtonType.h",
206 EXPORTS.mozilla.widget += [
207 "CompositorWidget.h",
208 "GfxInfoDeviceVendorDefs.h",
209 "GfxInfoDriverVendorDefs.h",
210 "GfxInfoDriverVersionCmpDefs.h",
211 "GfxInfoFeatureDefs.h",
212 "GfxInfoFeatureStatusDefs.h",
213 "GfxInfoOperatingSystemDefs.h",
214 "GfxInfoWindowProtocolDefs.h",
218 "InProcessCompositorWidget.h",
219 "MediaKeysEventSourceFactory.h",
221 "NativeMenuSupport.h",
224 "PuppetBidiKeyboard.h",
225 "RemoteLookAndFeel.h",
230 "WidgetMessageUtils.h",
231 "WindowOcclusionState.h",
235 "ClipboardContentAnalysisChild.cpp",
236 "ClipboardContentAnalysisParent.cpp",
237 "ClipboardReadRequestParent.cpp",
238 "ClipboardWriteRequestChild.cpp",
239 "ClipboardWriteRequestParent.cpp",
240 "CompositorWidget.cpp",
243 "DimensionRequest.cpp",
246 "GfxInfoCollector.cpp",
249 "InProcessCompositorWidget.cpp",
252 "nsBaseAppShell.cpp",
253 "nsBaseClipboard.cpp",
254 "nsClipboardHelper.cpp",
255 "nsClipboardProxy.cpp",
256 "nsColorPickerProxy.cpp",
257 "nsDragServiceProxy.cpp",
258 "nsFilePickerProxy.cpp",
259 "nsHTMLFormatConverter.cpp",
261 "nsIDeviceContextSpec.cpp",
262 "nsPrimitiveHelpers.cpp",
263 "nsPrintSettingsImpl.cpp",
264 "nsTransferable.cpp",
265 "nsUserIdleService.cpp",
266 "nsXPLookAndFeel.cpp",
267 "PuppetBidiKeyboard.cpp",
269 "RemoteLookAndFeel.cpp",
271 "ScrollbarDrawing.cpp",
272 "ScrollbarDrawingAndroid.cpp",
273 "ScrollbarDrawingCocoa.cpp",
274 "ScrollbarDrawingGTK.cpp",
275 "ScrollbarDrawingWin.cpp",
276 "ScrollbarDrawingWin11.cpp",
277 "SharedWidgetUtils.cpp",
279 "TextEventDispatcher.cpp",
280 "TextRecognition.cpp",
285 "TouchResampler.cpp",
286 "VsyncDispatcher.cpp",
287 "WidgetEventImpl.cpp",
291 if CONFIG["OS_ARCH"] == "Linux":
292 EXPORTS.mozilla.widget += ["LSBUtils.h"]
293 SOURCES += ["LSBUtils.cpp"]
295 if CONFIG["NS_PRINTING"]:
297 "nsDeviceContextSpecProxy.h",
298 "nsPrintSettingsService.h",
301 "nsDeviceContextSpecProxy.cpp",
305 "nsPrinterListBase.cpp",
306 "nsPrintSettingsService.cpp",
309 if toolkit in ("cocoa", "gtk"):
313 "nsPrinterListCUPS.cpp",
316 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
317 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
319 "nsBaseDragService.cpp",
328 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
331 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
333 "nsBaseFilePicker.cpp",
336 if toolkit in {"gtk", "cocoa", "windows"}:
338 "nsBaseColorPicker.cpp",
341 if toolkit in ("gtk", "windows", "cocoa", "uikit", "android"):
346 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
348 include("/ipc/chromium/chromium-config.mozbuild")
365 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
367 LOCAL_INCLUDES += ["/third_party/cups/include"]
369 if toolkit == "windows":
371 "headless/HeadlessWidgetTypes.ipdlh",
372 "windows/PCompositorWidget.ipdl",
373 "windows/PlatformWidgetTypes.ipdlh",
375 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
377 "gtk/PCompositorWidget.ipdl",
378 "gtk/PlatformWidgetTypes.ipdlh",
379 "headless/HeadlessWidgetTypes.ipdlh",
381 elif toolkit == "android":
383 "android/PCompositorWidget.ipdl",
384 "android/PlatformWidgetTypes.ipdlh",
385 "headless/HeadlessWidgetTypes.ipdlh",
389 "generic/PCompositorWidget.ipdl",
390 "generic/PlatformWidgetTypes.ipdlh",
391 "headless/HeadlessWidgetTypes.ipdlh",
395 "LookAndFeelTypes.ipdlh",
396 "PClipboardContentAnalysis.ipdl",
397 "PClipboardReadRequest.ipdl",
398 "PClipboardWriteRequest.ipdl",
402 "/widget/%s" % toolkit,
405 if CONFIG["ENABLE_TESTS"]:
407 "MockDragServiceController.cpp",
410 FINAL_LIBRARY = "xul"
412 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
413 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
414 if CONFIG["MOZ_WAYLAND"]:
415 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]