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"]
54 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
57 if toolkit == "cocoa":
59 "nsIMacDockSupport.idl",
60 "nsIMacFinderProgress.idl",
61 "nsIMacSharingService.idl",
62 "nsIMacUserActivityUpdater.idl",
63 "nsIMacWebAppUtils.idl",
64 "nsIStandaloneNativeMenu.idl",
65 "nsITaskbarProgress.idl",
66 "nsITouchBarHelper.idl",
67 "nsITouchBarInput.idl",
68 "nsITouchBarUpdater.idl",
70 elif toolkit == "gtk":
72 "nsIApplicationChooser.idl",
73 "nsIGtkTaskbarProgress.idl",
74 "nsITaskbarProgress.idl",
76 elif toolkit == "windows":
78 "nsIJumpListBuilder.idl",
79 "nsIJumpListItem.idl",
80 "nsIPrintSettingsWin.idl",
81 "nsITaskbarOverlayIconController.idl",
82 "nsITaskbarPreview.idl",
83 "nsITaskbarPreviewButton.idl",
84 "nsITaskbarPreviewController.idl",
85 "nsITaskbarProgress.idl",
86 "nsITaskbarTabPreview.idl",
87 "nsITaskbarWindowPreview.idl",
88 "nsIWindowsUIUtils.idl",
92 TEST_DIRS += ["tests", "tests/gtest"]
96 # Don't build the DSO under the 'build' directory as windows does.
98 # The DSOs get built in the toolkit dir itself. Do this so that
99 # multiple implementations of widget can be built on the same
106 "nsIBidiKeyboard.idl",
108 "nsIClipboardHelper.idl",
109 "nsIClipboardOwner.idl",
110 "nsIColorPicker.idl",
111 "nsIDisplayInfo.idl",
112 "nsIDragService.idl",
113 "nsIDragSession.idl",
115 "nsIFormatConverter.idl",
117 "nsIGfxInfoDebug.idl",
119 "nsIPaperMargin.idl",
121 "nsIPrinterList.idl",
122 "nsIPrintSession.idl",
123 "nsIPrintSettings.idl",
124 "nsIPrintSettingsService.idl",
126 "nsIScreenManager.idl",
127 "nsISharePicker.idl",
129 "nsISystemStatusBar.idl",
130 "nsITransferable.idl",
131 "nsIUserIdleService.idl",
132 "nsIUserIdleServiceInternal.idl",
135 XPIDL_MODULE = "widget"
140 "GfxInfoCollector.h",
143 "nsBaseDragService.h",
144 "nsBaseFilePicker.h",
147 "nsIDeviceContextSpec.h",
148 "nsIPrintDialogService.h",
149 "nsIRollupListener.h",
151 "nsIWidgetListener.h",
153 "nsPrinterListBase.h",
154 "nsUserIdleService.h",
155 "nsWidgetInitData.h",
169 "EventMessageList.h",
174 "NativeKeyBindingsType.h",
176 "TextEventDispatcher.h",
177 "TextEventDispatcherListener.h",
185 EXPORTS.mozilla.widget += [
186 "CompositorWidget.h",
189 "InProcessCompositorWidget.h",
190 "MediaKeysEventSourceFactory.h",
192 "NativeMenuSupport.h",
195 "PuppetBidiKeyboard.h",
196 "RemoteLookAndFeel.h",
201 "WidgetMessageUtils.h",
202 "WindowOcclusionState.h",
206 "CompositorWidget.cpp",
211 "GfxInfoCollector.cpp",
214 "InProcessCompositorWidget.cpp",
217 "nsBaseAppShell.cpp",
219 "nsClipboardHelper.cpp",
220 "nsClipboardProxy.cpp",
221 "nsColorPickerProxy.cpp",
222 "nsContentProcessWidgetFactory.cpp",
223 "nsDragServiceProxy.cpp",
224 "nsFilePickerProxy.cpp",
225 "nsHTMLFormatConverter.cpp",
226 "nsIWidgetListener.cpp",
227 "nsPrimitiveHelpers.cpp",
228 "nsPrintSettingsImpl.cpp",
230 "nsTransferable.cpp",
231 "nsUserIdleService.cpp",
232 "nsXPLookAndFeel.cpp",
233 "PuppetBidiKeyboard.cpp",
235 "RemoteLookAndFeel.cpp",
237 "ScrollbarDrawing.cpp",
238 "ScrollbarDrawingAndroid.cpp",
239 "ScrollbarDrawingCocoa.cpp",
240 "ScrollbarDrawingGTK.cpp",
241 "ScrollbarDrawingWin.cpp",
242 "ScrollbarDrawingWin11.cpp",
243 "SharedWidgetUtils.cpp",
245 "TextEventDispatcher.cpp",
246 "TextRecognition.cpp",
251 "TouchResampler.cpp",
252 "VsyncDispatcher.cpp",
253 "WidgetEventImpl.cpp",
257 if CONFIG["OS_ARCH"] == "Linux":
258 EXPORTS.mozilla.widget += ["LSBUtils.h"]
259 SOURCES += ["LSBUtils.cpp"]
261 if CONFIG["NS_PRINTING"]:
263 "nsDeviceContextSpecProxy.h",
264 "nsPrintSettingsService.h",
267 "nsDeviceContextSpecProxy.cpp",
271 "nsPrinterListBase.cpp",
272 "nsPrintSession.cpp",
273 "nsPrintSettingsService.cpp",
276 if toolkit in ("cocoa", "gtk"):
280 "nsPrinterListCUPS.cpp",
283 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
284 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
286 "nsBaseDragService.cpp",
291 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
293 "WidgetTraceEvent.h",
296 EXPORTS.ipc = ["nsGUIEventIPC.h"]
298 if CONFIG["MOZ_X11"]:
301 if toolkit in ("cocoa", "windows"):
303 "nsBaseClipboard.cpp",
306 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
308 "nsBaseFilePicker.cpp",
311 if toolkit in ("gtk", "windows", "cocoa", "android"):
316 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
318 include("/ipc/chromium/chromium-config.mozbuild")
335 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
337 LOCAL_INCLUDES += ["/third_party/cups/include"]
339 if toolkit == "windows":
341 "headless/HeadlessWidgetTypes.ipdlh",
342 "windows/PCompositorWidget.ipdl",
343 "windows/PlatformWidgetTypes.ipdlh",
345 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
347 "gtk/PCompositorWidget.ipdl",
348 "gtk/PlatformWidgetTypes.ipdlh",
349 "headless/HeadlessWidgetTypes.ipdlh",
351 elif toolkit == "android":
353 "android/PCompositorWidget.ipdl",
354 "android/PlatformWidgetTypes.ipdlh",
355 "headless/HeadlessWidgetTypes.ipdlh",
359 "generic/PCompositorWidget.ipdl",
360 "generic/PlatformWidgetTypes.ipdlh",
361 "headless/HeadlessWidgetTypes.ipdlh",
364 PREPROCESSED_IPDL_SOURCES += [
365 "LookAndFeelTypes.ipdlh",
369 "/widget/%s" % toolkit,
371 FINAL_LIBRARY = "xul"
373 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
374 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
376 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
377 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
378 if CONFIG["MOZ_WAYLAND"]:
379 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
381 REQUIRES_UNIFIED_BUILD = True