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 "nsIMacUserActivityUpdater.idl",
45 "nsIMacWebAppUtils.idl",
46 "nsIStandaloneNativeMenu.idl",
47 "nsITaskbarProgress.idl",
48 "nsITouchBarHelper.idl",
49 "nsITouchBarInput.idl",
50 "nsITouchBarUpdater.idl",
52 elif toolkit == "gtk":
54 "nsIApplicationChooser.idl",
55 "nsIGtkTaskbarProgress.idl",
56 "nsITaskbarProgress.idl",
58 elif toolkit == "windows":
60 "nsIJumpListBuilder.idl",
61 "nsIJumpListItem.idl",
62 "nsIPrintSettingsWin.idl",
63 "nsITaskbarOverlayIconController.idl",
64 "nsITaskbarPreview.idl",
65 "nsITaskbarPreviewButton.idl",
66 "nsITaskbarPreviewController.idl",
67 "nsITaskbarProgress.idl",
68 "nsITaskbarTabPreview.idl",
69 "nsITaskbarWindowPreview.idl",
70 "nsIWindowsUIUtils.idl",
74 TEST_DIRS += ["tests", "tests/gtest"]
78 # Don't build the DSO under the 'build' directory as windows does.
80 # The DSOs get built in the toolkit dir itself. Do this so that
81 # multiple implementations of widget can be built on the same
88 "nsIBidiKeyboard.idl",
90 "nsIClipboardHelper.idl",
91 "nsIClipboardOwner.idl",
97 "nsIFormatConverter.idl",
99 "nsIGfxInfoDebug.idl",
101 "nsIPaperMargin.idl",
103 "nsIPrinterList.idl",
104 "nsIPrintSession.idl",
105 "nsIPrintSettings.idl",
106 "nsIPrintSettingsService.idl",
108 "nsIScreenManager.idl",
109 "nsISharePicker.idl",
111 "nsISystemStatusBar.idl",
112 "nsITransferable.idl",
113 "nsIUserIdleService.idl",
114 "nsIUserIdleServiceInternal.idl",
117 XPIDL_MODULE = "widget"
122 "GfxInfoCollector.h",
125 "nsBaseDragService.h",
126 "nsBaseFilePicker.h",
129 "nsIDeviceContextSpec.h",
130 "nsIPrintDialogService.h",
131 "nsIRollupListener.h",
133 "nsIWidgetListener.h",
135 "nsPrinterListBase.h",
136 "nsUserIdleService.h",
137 "nsWidgetInitData.h",
150 "EventMessageList.h",
155 "TextEventDispatcher.h",
156 "TextEventDispatcherListener.h",
164 EXPORTS.mozilla.widget += [
165 "CompositorWidget.h",
168 "InProcessCompositorWidget.h",
169 "MediaKeysEventSourceFactory.h",
173 "PuppetBidiKeyboard.h",
174 "RemoteLookAndFeel.h",
178 "WidgetMessageUtils.h",
179 "WindowOcclusionState.h",
183 "CompositorWidget.cpp",
187 "GfxInfoCollector.cpp",
190 "InProcessCompositorWidget.cpp",
193 "nsBaseAppShell.cpp",
195 "nsClipboardHelper.cpp",
196 "nsClipboardProxy.cpp",
197 "nsColorPickerProxy.cpp",
198 "nsContentProcessWidgetFactory.cpp",
199 "nsDragServiceProxy.cpp",
200 "nsFilePickerProxy.cpp",
201 "nsHTMLFormatConverter.cpp",
202 "nsIWidgetListener.cpp",
203 "nsNativeBasicTheme.cpp",
204 "nsNativeBasicThemeCocoa.cpp",
205 "nsPrimitiveHelpers.cpp",
206 "nsPrintSettingsImpl.cpp",
208 "nsTransferable.cpp",
209 "nsUserIdleService.cpp",
210 "nsXPLookAndFeel.cpp",
211 "PuppetBidiKeyboard.cpp",
213 "RemoteLookAndFeel.cpp",
215 "ScrollbarDrawing.cpp",
216 "ScrollbarDrawingAndroid.cpp",
217 "ScrollbarDrawingCocoa.cpp",
218 "ScrollbarDrawingGTK.cpp",
219 "ScrollbarDrawingWin.cpp",
220 "ScrollbarDrawingWin11.cpp",
221 "SharedWidgetUtils.cpp",
222 "TextEventDispatcher.cpp",
225 "TouchResampler.cpp",
226 "VsyncDispatcher.cpp",
227 "WidgetEventImpl.cpp",
231 if CONFIG["OS_ARCH"] == "Linux":
232 EXPORTS.mozilla.widget += ["LSBUtils.h"]
233 SOURCES += ["LSBUtils.cpp"]
235 if CONFIG["NS_PRINTING"]:
237 "nsDeviceContextSpecProxy.h",
238 "nsPrintSettingsService.h",
241 "nsDeviceContextSpecProxy.cpp",
245 "nsPrinterListBase.cpp",
246 "nsPrintSession.cpp",
247 "nsPrintSettingsService.cpp",
250 if toolkit in ("cocoa", "gtk"):
254 "nsPrinterListCUPS.cpp",
257 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
258 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
260 "nsBaseDragService.cpp",
265 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
267 "WidgetTraceEvent.h",
270 EXPORTS.ipc = ["nsGUIEventIPC.h"]
272 if CONFIG["MOZ_X11"]:
275 if toolkit in ("cocoa", "windows"):
277 "nsBaseClipboard.cpp",
280 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
282 "nsBaseFilePicker.cpp",
285 if toolkit in ("gtk", "windows", "cocoa", "android"):
290 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
292 include("/ipc/chromium/chromium-config.mozbuild")
309 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
311 LOCAL_INCLUDES += ["/third_party/cups/include"]
313 if toolkit == "windows":
315 "headless/HeadlessWidgetTypes.ipdlh",
316 "windows/PCompositorWidget.ipdl",
317 "windows/PlatformWidgetTypes.ipdlh",
319 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
321 "gtk/PCompositorWidget.ipdl",
322 "gtk/PlatformWidgetTypes.ipdlh",
323 "headless/HeadlessWidgetTypes.ipdlh",
325 elif toolkit == "android":
327 "android/PCompositorWidget.ipdl",
328 "android/PlatformWidgetTypes.ipdlh",
329 "headless/HeadlessWidgetTypes.ipdlh",
333 "generic/PCompositorWidget.ipdl",
334 "generic/PlatformWidgetTypes.ipdlh",
335 "headless/HeadlessWidgetTypes.ipdlh",
338 PREPROCESSED_IPDL_SOURCES += [
339 "LookAndFeelTypes.ipdlh",
343 "/widget/%s" % toolkit,
345 FINAL_LIBRARY = "xul"
347 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
348 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
350 CXXFLAGS += CONFIG["TK_CFLAGS"]
351 if CONFIG["MOZ_WAYLAND"]:
352 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
354 REQUIRES_UNIFIED_BUILD = True