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 "nsIJumpListItem.idl",
84 "nsIPrintSettingsWin.idl",
85 "nsITaskbarOverlayIconController.idl",
86 "nsITaskbarPreview.idl",
87 "nsITaskbarPreviewButton.idl",
88 "nsITaskbarPreviewController.idl",
89 "nsITaskbarProgress.idl",
90 "nsITaskbarTabPreview.idl",
91 "nsITaskbarWindowPreview.idl",
92 "nsIWindowsUIUtils.idl",
96 if CONFIG["NS_PRINTING"]:
97 # Needs to go before the XPIDL_MODULE line.
99 "nsIPrintDialogService.idl",
102 TEST_DIRS += ["tests", "tests/gtest"]
106 # Don't build the DSO under the 'build' directory as windows does.
108 # The DSOs get built in the toolkit dir itself. Do this so that
109 # multiple implementations of widget can be built on the same
116 "nsIBidiKeyboard.idl",
118 "nsIClipboardHelper.idl",
119 "nsIClipboardOwner.idl",
120 "nsIColorPicker.idl",
121 "nsIDisplayInfo.idl",
122 "nsIDragService.idl",
123 "nsIDragSession.idl",
125 "nsIFormatConverter.idl",
127 "nsIGfxInfoDebug.idl",
129 "nsIPaperMargin.idl",
131 "nsIPrinterList.idl",
132 "nsIPrintSettings.idl",
133 "nsIPrintSettingsService.idl",
135 "nsIScreenManager.idl",
136 "nsISharePicker.idl",
138 "nsISystemStatusBar.idl",
139 "nsITransferable.idl",
140 "nsIUserIdleService.idl",
141 "nsIUserIdleServiceInternal.idl",
144 XPIDL_MODULE = "widget"
149 "GfxInfoCollector.h",
152 "nsBaseDragService.h",
153 "nsBaseFilePicker.h",
155 "nsIDeviceContextSpec.h",
156 "nsIRollupListener.h",
158 "nsIWidgetListener.h",
160 "nsPrinterListBase.h",
161 "nsUserIdleService.h",
173 "DimensionRequest.h",
176 "EventMessageList.h",
181 "NativeKeyBindingsType.h",
183 "TextEventDispatcher.h",
184 "TextEventDispatcherListener.h",
190 "WindowButtonType.h",
193 EXPORTS.mozilla.widget += [
194 "CompositorWidget.h",
198 "InProcessCompositorWidget.h",
199 "MediaKeysEventSourceFactory.h",
201 "NativeMenuSupport.h",
204 "PuppetBidiKeyboard.h",
205 "RemoteLookAndFeel.h",
210 "WidgetMessageUtils.h",
211 "WindowOcclusionState.h",
215 "CompositorWidget.cpp",
218 "DimensionRequest.cpp",
221 "GfxInfoCollector.cpp",
224 "InProcessCompositorWidget.cpp",
227 "nsBaseAppShell.cpp",
228 "nsClipboardHelper.cpp",
229 "nsClipboardProxy.cpp",
230 "nsColorPickerProxy.cpp",
231 "nsDragServiceProxy.cpp",
232 "nsFilePickerProxy.cpp",
233 "nsHTMLFormatConverter.cpp",
235 "nsIDeviceContextSpec.cpp",
236 "nsIWidgetListener.cpp",
237 "nsPrimitiveHelpers.cpp",
238 "nsPrintSettingsImpl.cpp",
240 "nsTransferable.cpp",
241 "nsUserIdleService.cpp",
242 "nsXPLookAndFeel.cpp",
243 "PuppetBidiKeyboard.cpp",
245 "RemoteLookAndFeel.cpp",
247 "ScrollbarDrawing.cpp",
248 "ScrollbarDrawingAndroid.cpp",
249 "ScrollbarDrawingCocoa.cpp",
250 "ScrollbarDrawingGTK.cpp",
251 "ScrollbarDrawingWin.cpp",
252 "ScrollbarDrawingWin11.cpp",
253 "SharedWidgetUtils.cpp",
255 "TextEventDispatcher.cpp",
256 "TextRecognition.cpp",
261 "TouchResampler.cpp",
262 "VsyncDispatcher.cpp",
263 "WidgetEventImpl.cpp",
267 if CONFIG["OS_ARCH"] == "Linux":
268 EXPORTS.mozilla.widget += ["LSBUtils.h"]
269 SOURCES += ["LSBUtils.cpp"]
271 if CONFIG["NS_PRINTING"]:
273 "nsDeviceContextSpecProxy.h",
274 "nsPrintSettingsService.h",
277 "nsDeviceContextSpecProxy.cpp",
281 "nsPrinterListBase.cpp",
282 "nsPrintSettingsService.cpp",
285 if toolkit in ("cocoa", "gtk"):
289 "nsPrinterListCUPS.cpp",
292 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
293 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
295 "nsBaseDragService.cpp",
300 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
302 "WidgetTraceEvent.h",
309 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
312 if toolkit in ("cocoa", "windows"):
314 "nsBaseClipboard.cpp",
317 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
319 "nsBaseFilePicker.cpp",
322 if toolkit in ("gtk", "windows", "cocoa", "android"):
327 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
329 include("/ipc/chromium/chromium-config.mozbuild")
346 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
348 LOCAL_INCLUDES += ["/third_party/cups/include"]
350 if toolkit == "windows":
352 "headless/HeadlessWidgetTypes.ipdlh",
353 "windows/PCompositorWidget.ipdl",
354 "windows/PlatformWidgetTypes.ipdlh",
356 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
358 "gtk/PCompositorWidget.ipdl",
359 "gtk/PlatformWidgetTypes.ipdlh",
360 "headless/HeadlessWidgetTypes.ipdlh",
362 elif toolkit == "android":
364 "android/PCompositorWidget.ipdl",
365 "android/PlatformWidgetTypes.ipdlh",
366 "headless/HeadlessWidgetTypes.ipdlh",
370 "generic/PCompositorWidget.ipdl",
371 "generic/PlatformWidgetTypes.ipdlh",
372 "headless/HeadlessWidgetTypes.ipdlh",
375 PREPROCESSED_IPDL_SOURCES += [
376 "LookAndFeelTypes.ipdlh",
380 "/widget/%s" % toolkit,
382 FINAL_LIBRARY = "xul"
384 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
385 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
387 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
388 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
389 if CONFIG["MOZ_WAYLAND"]:
390 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
392 REQUIRES_UNIFIED_BUILD = True