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",
135 "nsIPrintDialogService.h",
136 "nsIRollupListener.h",
138 "nsIWidgetListener.h",
140 "nsPrinterListBase.h",
141 "nsUserIdleService.h",
142 "nsWidgetInitData.h",
154 "EventMessageList.h",
159 "TextEventDispatcher.h",
160 "TextEventDispatcherListener.h",
168 EXPORTS.mozilla.widget += [
169 "CompositorWidget.h",
172 "InProcessCompositorWidget.h",
173 "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 in ("cocoa", "windows"):
278 "nsBaseClipboard.cpp",
281 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
283 "nsBaseFilePicker.cpp",
286 if toolkit in ("gtk", "windows", "cocoa", "android"):
292 "nsIApplicationChooser.idl",
295 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
297 include("/ipc/chromium/chromium-config.mozbuild")
314 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
316 LOCAL_INCLUDES += ["/third_party/cups/include"]
318 if toolkit == "windows":
320 "headless/HeadlessWidgetTypes.ipdlh",
321 "windows/PCompositorWidget.ipdl",
322 "windows/PlatformWidgetTypes.ipdlh",
324 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
326 "gtk/PCompositorWidget.ipdl",
327 "gtk/PlatformWidgetTypes.ipdlh",
328 "headless/HeadlessWidgetTypes.ipdlh",
332 "generic/PCompositorWidget.ipdl",
333 "generic/PlatformWidgetTypes.ipdlh",
334 "headless/HeadlessWidgetTypes.ipdlh",
337 PREPROCESSED_IPDL_SOURCES += [
338 "LookAndFeelTypes.ipdlh",
342 "/widget/%s" % toolkit,
344 FINAL_LIBRARY = "xul"
346 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
347 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
349 CXXFLAGS += CONFIG["TK_CFLAGS"]
350 if CONFIG["MOZ_WAYLAND"]:
351 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]