Bug 1700051: part 51) Const-qualify `mozInlineSpellStatus::mCreatedRange`. r=smaug
[gecko.git] / widget / moz.build
blobeb70e4d84330b018eeb9133b00e810d179579a94
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/.
7 with Files("**"):
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("*Gfx*"):
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"):
40     DIRS += [toolkit]
42 if toolkit == "windows":
43     DIRS += ["windows"]
45     XPIDL_SOURCES += [
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",
57         "nsIWinTaskbar.idl",
58     ]
59 elif toolkit == "cocoa":
60     XPIDL_SOURCES += [
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",
70     ]
72 TEST_DIRS += ["tests", "tests/gtest"]
74 DIRS += ["headless"]
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
80 # source tree.
82 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
83     DIRS += ["gtk"]
85     XPIDL_SOURCES += [
86         "nsIGtkTaskbarProgress.idl",
87         "nsITaskbarProgress.idl",
88     ]
90 XPIDL_SOURCES += [
91     "nsIAppShell.idl",
92     "nsIBaseWindow.idl",
93     "nsIBidiKeyboard.idl",
94     "nsIClipboard.idl",
95     "nsIClipboardHelper.idl",
96     "nsIClipboardOwner.idl",
97     "nsIColorPicker.idl",
98     "nsIDisplayInfo.idl",
99     "nsIDragService.idl",
100     "nsIDragSession.idl",
101     "nsIFilePicker.idl",
102     "nsIFormatConverter.idl",
103     "nsIGfxInfo.idl",
104     "nsIGfxInfoDebug.idl",
105     "nsIPaper.idl",
106     "nsIPaperMargin.idl",
107     "nsIPrinter.idl",
108     "nsIPrinterList.idl",
109     "nsIPrintSession.idl",
110     "nsIPrintSettings.idl",
111     "nsIPrintSettingsService.idl",
112     "nsIScreen.idl",
113     "nsIScreenManager.idl",
114     "nsISharePicker.idl",
115     "nsISound.idl",
116     "nsISystemStatusBar.idl",
117     "nsITransferable.idl",
118     "nsIUserIdleService.idl",
119     "nsIUserIdleServiceInternal.idl",
122 XPIDL_MODULE = "widget"
124 EXPORTS += [
125     "GfxDriverInfo.h",
126     "GfxInfoBase.h",
127     "GfxInfoCollector.h",
128     "InputData.h",
129     "nsBaseAppShell.h",
130     "nsBaseDragService.h",
131     "nsBaseFilePicker.h",
132     "nsBaseScreen.h",
133     "nsBaseWidget.h",
134     "nsIDeviceContextSpec.h",
135     "nsIPrintDialogService.h",
136     "nsIRollupListener.h",
137     "nsIWidget.h",
138     "nsIWidgetListener.h",
139     "nsPaper.h",
140     "nsPrinterListBase.h",
141     "nsUserIdleService.h",
142     "nsWidgetInitData.h",
143     "nsWidgetsCID.h",
144     "PuppetWidget.h",
147 EXPORTS.mozilla += [
148     "BasicEvents.h",
149     "CommandList.h",
150     "ContentCache.h",
151     "ContentEvents.h",
152     "EventClassList.h",
153     "EventForwards.h",
154     "EventMessageList.h",
155     "FontRange.h",
156     "LookAndFeel.h",
157     "MiscEvents.h",
158     "MouseEvents.h",
159     "TextEventDispatcher.h",
160     "TextEventDispatcherListener.h",
161     "TextEvents.h",
162     "TextRange.h",
163     "TouchEvents.h",
164     "VsyncDispatcher.h",
165     "WidgetUtils.h",
168 EXPORTS.mozilla.widget += [
169     "CompositorWidget.h",
170     "IconLoader.h",
171     "IMEData.h",
172     "InProcessCompositorWidget.h",
173     "MediaKeysEventSourceFactory.h",
174     "NativeMenu.h",
175     "nsAutoRollup.h",
176     "nsXPLookAndFeel.h",
177     "PuppetBidiKeyboard.h",
178     "RemoteLookAndFeel.h",
179     "Screen.h",
180     "ScreenManager.h",
181     "ThemeChangeKind.h",
182     "WidgetMessageUtils.h",
183     "WindowSurface.h",
186 UNIFIED_SOURCES += [
187     "CompositorWidget.cpp",
188     "ContentCache.cpp",
189     "GfxDriverInfo.cpp",
190     "GfxInfoBase.cpp",
191     "GfxInfoCollector.cpp",
192     "IconLoader.cpp",
193     "IMEData.cpp",
194     "InProcessCompositorWidget.cpp",
195     "InputData.cpp",
196     "nsAutoRollup.cpp",
197     "nsBaseAppShell.cpp",
198     "nsBaseScreen.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",
210     "nsSoundProxy.cpp",
211     "nsTransferable.cpp",
212     "nsUserIdleService.cpp",
213     "nsXPLookAndFeel.cpp",
214     "PuppetBidiKeyboard.cpp",
215     "PuppetWidget.cpp",
216     "RemoteLookAndFeel.cpp",
217     "Screen.cpp",
218     "ScrollbarDrawingMac.cpp",
219     "SharedWidgetUtils.cpp",
220     "TextEventDispatcher.cpp",
221     "TouchResampler.cpp",
222     "VsyncDispatcher.cpp",
223     "WidgetEventImpl.cpp",
224     "WidgetUtils.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"]:
232     EXPORTS += [
233         "nsDeviceContextSpecProxy.h",
234         "nsPrintSettingsService.h",
235     ]
236     UNIFIED_SOURCES += [
237         "nsDeviceContextSpecProxy.cpp",
238         "nsPaper.cpp",
239         "nsPaperMargin.cpp",
240         "nsPrinterBase.cpp",
241         "nsPrinterListBase.cpp",
242         "nsPrintSession.cpp",
243         "nsPrintSettingsService.cpp",
244     ]
246     if toolkit in ("cocoa", "gtk"):
247         UNIFIED_SOURCES += [
248             "nsCUPSShim.cpp",
249             "nsPrinterCUPS.cpp",
250             "nsPrinterListCUPS.cpp",
251         ]
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
255 SOURCES += [
256     "nsBaseDragService.cpp",
257     "nsBaseWidget.cpp",
258     "ScreenManager.cpp",
261 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
262     EXPORTS.mozilla += [
263         "WidgetTraceEvent.h",
264     ]
266 EXPORTS.ipc = ["nsGUIEventIPC.h"]
268 if CONFIG["MOZ_X11"]:
269     DIRS += ["x11"]
270     SOURCES += [
271         "GfxInfoX11.cpp",
272         "nsShmImage.cpp",
273         "WindowSurfaceX11SHM.cpp",
274     ]
276 if toolkit in ("cocoa", "windows"):
277     UNIFIED_SOURCES += [
278         "nsBaseClipboard.cpp",
279     ]
281 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
282     UNIFIED_SOURCES += [
283         "nsBaseFilePicker.cpp",
284     ]
286 if toolkit in ("gtk", "windows", "cocoa", "android"):
287     UNIFIED_SOURCES += [
288         "nsNativeTheme.cpp",
289     ]
290 if toolkit == "gtk":
291     XPIDL_SOURCES += [
292         "nsIApplicationChooser.idl",
293     ]
295 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
297 include("/ipc/chromium/chromium-config.mozbuild")
299 LOCAL_INCLUDES += [
300     "/dom/base",
301     "/dom/ipc",
302     "/gfx/2d",
303     "/layout/base",
304     "/layout/forms",
305     "/layout/generic",
306     "/layout/painting",
307     "/layout/xul",
308     "/layout/xul/tree/",
309     "/view",
310     "/widget",
311     "/widget/headless",
314 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
315 if toolkit == "gtk":
316     LOCAL_INCLUDES += ["/third_party/cups/include"]
318 if toolkit == "windows":
319     IPDL_SOURCES = [
320         "headless/HeadlessWidgetTypes.ipdlh",
321         "windows/PCompositorWidget.ipdl",
322         "windows/PlatformWidgetTypes.ipdlh",
323     ]
324 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
325     IPDL_SOURCES = [
326         "gtk/PCompositorWidget.ipdl",
327         "gtk/PlatformWidgetTypes.ipdlh",
328         "headless/HeadlessWidgetTypes.ipdlh",
329     ]
330 else:
331     IPDL_SOURCES = [
332         "generic/PCompositorWidget.ipdl",
333         "generic/PlatformWidgetTypes.ipdlh",
334         "headless/HeadlessWidgetTypes.ipdlh",
335     ]
337 PREPROCESSED_IPDL_SOURCES += [
338     "LookAndFeelTypes.ipdlh",
341 LOCAL_INCLUDES += [
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"]