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("*WindowSurface*"):
32 BUG_COMPONENT = ("Core", "Graphics")
34 with Files("*FontRange*"):
35 BUG_COMPONENT = ("Core", "Widget: Cocoa")
37 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
39 if toolkit in ("cocoa", "android", "uikit"):
42 if toolkit == "windows":
46 "nsIJumpListBuilder.idl",
47 "nsIJumpListItem.idl",
48 "nsIPrintSettingsWin.idl",
49 "nsITaskbarOverlayIconController.idl",
50 "nsITaskbarPreview.idl",
51 "nsITaskbarPreviewButton.idl",
52 "nsITaskbarPreviewController.idl",
53 "nsITaskbarProgress.idl",
54 "nsITaskbarTabPreview.idl",
55 "nsITaskbarWindowPreview.idl",
56 "nsIWindowsUIUtils.idl",
59 elif toolkit == "cocoa":
61 "nsIMacDockSupport.idl",
62 "nsIMacFinderProgress.idl",
63 "nsIMacSharingService.idl",
64 "nsIMacWebAppUtils.idl",
65 "nsIStandaloneNativeMenu.idl",
66 "nsITaskbarProgress.idl",
67 "nsITouchBarHelper.idl",
68 "nsITouchBarInput.idl",
69 "nsITouchBarUpdater.idl",
72 TEST_DIRS += ["tests", "tests/gtest"]
76 # Don't build the DSO under the 'build' directory as windows does.
78 # The DSOs get built in the toolkit dir itself. Do this so that
79 # multiple implementations of widget can be built on the same
82 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
86 "nsIGtkTaskbarProgress.idl",
87 "nsITaskbarProgress.idl",
93 "nsIBidiKeyboard.idl",
95 "nsIClipboardHelper.idl",
96 "nsIClipboardOwner.idl",
100 "nsIDragSession.idl",
102 "nsIFormatConverter.idl",
104 "nsIGfxInfoDebug.idl",
106 "nsIPaperMargin.idl",
108 "nsIPrinterList.idl",
109 "nsIPrintSession.idl",
110 "nsIPrintSettings.idl",
111 "nsIPrintSettingsService.idl",
113 "nsIScreenManager.idl",
114 "nsISharePicker.idl",
116 "nsISystemStatusBar.idl",
117 "nsITransferable.idl",
118 "nsIUserIdleService.idl",
119 "nsIUserIdleServiceInternal.idl",
122 XPIDL_MODULE = "widget"
127 "GfxInfoCollector.h",
130 "nsBaseDragService.h",
131 "nsBaseFilePicker.h",
134 "nsIDeviceContextSpec.h",
136 "nsIPrintDialogService.h",
137 "nsIRollupListener.h",
139 "nsIWidgetListener.h",
141 "nsPrinterListBase.h",
142 "nsUserIdleService.h",
143 "nsWidgetInitData.h",
155 "EventMessageList.h",
160 "TextEventDispatcher.h",
161 "TextEventDispatcherListener.h",
169 EXPORTS.mozilla.widget += [
170 "CompositorWidget.h",
173 "InProcessCompositorWidget.h",
174 "MediaKeysEventSourceFactory.h",
177 "PuppetBidiKeyboard.h",
178 "RemoteLookAndFeel.h",
182 "WidgetMessageUtils.h",
187 "CompositorWidget.cpp",
191 "GfxInfoCollector.cpp",
194 "InProcessCompositorWidget.cpp",
197 "nsBaseAppShell.cpp",
199 "nsClipboardHelper.cpp",
200 "nsClipboardProxy.cpp",
201 "nsColorPickerProxy.cpp",
202 "nsContentProcessWidgetFactory.cpp",
203 "nsDragServiceProxy.cpp",
204 "nsFilePickerProxy.cpp",
205 "nsHTMLFormatConverter.cpp",
206 "nsIWidgetListener.cpp",
207 "nsNativeBasicTheme.cpp",
208 "nsPrimitiveHelpers.cpp",
209 "nsPrintSettingsImpl.cpp",
211 "nsTransferable.cpp",
212 "nsUserIdleService.cpp",
213 "nsXPLookAndFeel.cpp",
214 "PuppetBidiKeyboard.cpp",
216 "RemoteLookAndFeel.cpp",
218 "ScrollbarDrawingMac.cpp",
219 "SharedWidgetUtils.cpp",
220 "TextEventDispatcher.cpp",
221 "TouchResampler.cpp",
222 "VsyncDispatcher.cpp",
223 "WidgetEventImpl.cpp",
227 if CONFIG["OS_ARCH"] == "Linux":
228 EXPORTS.mozilla.widget += ["LSBUtils.h"]
229 SOURCES += ["LSBUtils.cpp"]
231 if CONFIG["MOZ_XUL"] and CONFIG["NS_PRINTING"]:
233 "nsDeviceContextSpecProxy.h",
234 "nsPrintSettingsService.h",
237 "nsDeviceContextSpecProxy.cpp",
241 "nsPrinterListBase.cpp",
242 "nsPrintSession.cpp",
243 "nsPrintSettingsService.cpp",
246 if toolkit in ("cocoa", "gtk"):
250 "nsPrinterListCUPS.cpp",
253 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
254 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
256 "nsBaseDragService.cpp",
261 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
263 "WidgetTraceEvent.h",
266 EXPORTS.ipc = ["nsGUIEventIPC.h"]
268 if CONFIG["MOZ_X11"]:
273 "WindowSurfaceX11SHM.cpp",
276 if toolkit == "windows":
278 "PluginWidgetProxy.h",
281 "PluginWidgetProxy.cpp",
284 if toolkit in ("cocoa", "windows"):
286 "nsBaseClipboard.cpp",
289 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
291 "nsBaseFilePicker.cpp",
294 if toolkit in ("gtk", "windows", "cocoa", "android"):
300 "nsIApplicationChooser.idl",
303 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
305 include("/ipc/chromium/chromium-config.mozbuild")
322 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
324 LOCAL_INCLUDES += ["/third_party/cups/include"]
326 if toolkit == "windows":
328 "headless/HeadlessWidgetTypes.ipdlh",
329 "windows/PCompositorWidget.ipdl",
330 "windows/PlatformWidgetTypes.ipdlh",
332 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
334 "gtk/PCompositorWidget.ipdl",
335 "gtk/PlatformWidgetTypes.ipdlh",
336 "headless/HeadlessWidgetTypes.ipdlh",
340 "generic/PCompositorWidget.ipdl",
341 "generic/PlatformWidgetTypes.ipdlh",
342 "headless/HeadlessWidgetTypes.ipdlh",
345 PREPROCESSED_IPDL_SOURCES += [
346 "LookAndFeelTypes.ipdlh",
350 "/widget/%s" % toolkit,
352 FINAL_LIBRARY = "xul"
354 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
355 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
357 CXXFLAGS += CONFIG["TK_CFLAGS"]
358 if CONFIG["MOZ_WAYLAND"]:
359 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]