no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / widget / moz.build
blob0f8f75a178312413692c684ae011e59ba2ba244c
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("*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")
40 with Files("*Gfx*"):
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 XPCOM_MANIFESTS += [
55     "components.conf",
58 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
59     DIRS += [toolkit]
61 if toolkit == "cocoa":
62     XPIDL_SOURCES += [
63         "nsIMacDockSupport.idl",
64         "nsIMacFinderProgress.idl",
65         "nsIMacSharingService.idl",
66         "nsIMacUserActivityUpdater.idl",
67         "nsIMacWebAppUtils.idl",
68         "nsIStandaloneNativeMenu.idl",
69         "nsITaskbarProgress.idl",
70         "nsITouchBarHelper.idl",
71         "nsITouchBarInput.idl",
72         "nsITouchBarUpdater.idl",
73     ]
74 elif toolkit == "gtk":
75     XPIDL_SOURCES += [
76         "nsIApplicationChooser.idl",
77         "nsIGtkTaskbarProgress.idl",
78         "nsITaskbarProgress.idl",
79     ]
80 elif toolkit == "windows":
81     XPIDL_SOURCES += [
82         "nsIJumpListBuilder.idl",
83         "nsIPrintSettingsWin.idl",
84         "nsITaskbarOverlayIconController.idl",
85         "nsITaskbarPreview.idl",
86         "nsITaskbarPreviewButton.idl",
87         "nsITaskbarPreviewController.idl",
88         "nsITaskbarProgress.idl",
89         "nsITaskbarTabPreview.idl",
90         "nsITaskbarWindowPreview.idl",
91         "nsIWindowsUIUtils.idl",
92         "nsIWinTaskbar.idl",
93     ]
94 elif toolkit in ("android", "uikit"):
95     XPIDL_SOURCES += [
96         "nsIGeckoViewBridge.idl",
97     ]
99 if CONFIG["NS_PRINTING"]:
100     # Needs to go before the XPIDL_MODULE line.
101     XPIDL_SOURCES += [
102         "nsIPrintDialogService.idl",
103     ]
105 TEST_DIRS += ["tests", "tests/gtest"]
107 DIRS += ["headless"]
109 # Don't build the DSO under the 'build' directory as windows does.
111 # The DSOs get built in the toolkit dir itself.  Do this so that
112 # multiple implementations of widget can be built on the same
113 # source tree.
116 XPIDL_SOURCES += [
117     "nsIAppShell.idl",
118     "nsIBaseWindow.idl",
119     "nsIBidiKeyboard.idl",
120     "nsIClipboard.idl",
121     "nsIClipboardHelper.idl",
122     "nsIClipboardOwner.idl",
123     "nsIColorPicker.idl",
124     "nsIDisplayInfo.idl",
125     "nsIDragService.idl",
126     "nsIDragSession.idl",
127     "nsIFilePicker.idl",
128     "nsIFormatConverter.idl",
129     "nsIGfxInfo.idl",
130     "nsIGfxInfoDebug.idl",
131     "nsIMockDragServiceController.idl",
132     "nsIPaper.idl",
133     "nsIPaperMargin.idl",
134     "nsIPrinter.idl",
135     "nsIPrinterList.idl",
136     "nsIPrintSettings.idl",
137     "nsIPrintSettingsService.idl",
138     "nsIScreen.idl",
139     "nsIScreenManager.idl",
140     "nsISharePicker.idl",
141     "nsISound.idl",
142     "nsISystemStatusBar.idl",
143     "nsITransferable.idl",
144     "nsIUserIdleService.idl",
145     "nsIUserIdleServiceInternal.idl",
148 XPIDL_MODULE = "widget"
150 EXPORTS += [
151     "GfxDriverInfo.h",
152     "GfxInfoBase.h",
153     "GfxInfoCollector.h",
154     "InputData.h",
155     "nsBaseAppShell.h",
156     "nsBaseClipboard.h",
157     "nsBaseDragService.h",
158     "nsBaseFilePicker.h",
159     "nsBaseWidget.h",
160     "nsDragServiceProxy.h",
161     "nsIDeviceContextSpec.h",
162     "nsIRollupListener.h",
163     "nsIWidget.h",
164     "nsIWidgetListener.h",
165     "nsPaper.h",
166     "nsPrinterListBase.h",
167     "nsUserIdleService.h",
168     "nsWidgetsCID.h",
169     "PuppetWidget.h",
172 EXPORTS.mozilla += [
173     "BasicEvents.h",
174     "ClipboardContentAnalysisChild.h",
175     "ClipboardContentAnalysisParent.h",
176     "ClipboardReadRequestChild.h",
177     "ClipboardReadRequestParent.h",
178     "ClipboardWriteRequestChild.h",
179     "ClipboardWriteRequestParent.h",
180     "ColorScheme.h",
181     "CommandList.h",
182     "ContentCache.h",
183     "ContentData.h",
184     "ContentEvents.h",
185     "DimensionRequest.h",
186     "EventClassList.h",
187     "EventForwards.h",
188     "EventMessageList.h",
189     "FontRange.h",
190     "LookAndFeel.h",
191     "MiscEvents.h",
192     "MouseEvents.h",
193     "NativeKeyBindingsType.h",
194     "SwipeTracker.h",
195     "TextEventDispatcher.h",
196     "TextEventDispatcherListener.h",
197     "TextEvents.h",
198     "TextRange.h",
199     "TouchEvents.h",
200     "VsyncDispatcher.h",
201     "WidgetUtils.h",
202     "WindowButtonType.h",
205 EXPORTS.mozilla.widget += [
206     "CompositorWidget.h",
207     "GfxInfoDeviceVendorDefs.h",
208     "GfxInfoDriverVendorDefs.h",
209     "GfxInfoDriverVersionCmpDefs.h",
210     "GfxInfoFeatureDefs.h",
211     "GfxInfoFeatureStatusDefs.h",
212     "GfxInfoOperatingSystemDefs.h",
213     "GfxInfoWindowProtocolDefs.h",
214     "IconLoader.h",
215     "IMEData.h",
216     "InitData.h",
217     "InProcessCompositorWidget.h",
218     "MediaKeysEventSourceFactory.h",
219     "NativeMenu.h",
220     "NativeMenuSupport.h",
221     "nsAutoRollup.h",
222     "nsXPLookAndFeel.h",
223     "PuppetBidiKeyboard.h",
224     "RemoteLookAndFeel.h",
225     "Screen.h",
226     "ScreenManager.h",
227     "TextRecognition.h",
228     "ThemeChangeKind.h",
229     "WidgetMessageUtils.h",
230     "WindowOcclusionState.h",
233 UNIFIED_SOURCES += [
234     "ClipboardContentAnalysisChild.cpp",
235     "ClipboardContentAnalysisParent.cpp",
236     "ClipboardReadRequestParent.cpp",
237     "ClipboardWriteRequestChild.cpp",
238     "ClipboardWriteRequestParent.cpp",
239     "CompositorWidget.cpp",
240     "ContentCache.cpp",
241     "ContentData.cpp",
242     "DimensionRequest.cpp",
243     "GfxDriverInfo.cpp",
244     "GfxInfoBase.cpp",
245     "GfxInfoCollector.cpp",
246     "IconLoader.cpp",
247     "IMEData.cpp",
248     "InProcessCompositorWidget.cpp",
249     "InputData.cpp",
250     "nsAutoRollup.cpp",
251     "nsBaseAppShell.cpp",
252     "nsBaseClipboard.cpp",
253     "nsClipboardHelper.cpp",
254     "nsClipboardProxy.cpp",
255     "nsColorPickerProxy.cpp",
256     "nsDragServiceProxy.cpp",
257     "nsFilePickerProxy.cpp",
258     "nsHTMLFormatConverter.cpp",
259     "nsIBaseWindow.cpp",
260     "nsIDeviceContextSpec.cpp",
261     "nsIWidgetListener.cpp",
262     "nsPrimitiveHelpers.cpp",
263     "nsPrintSettingsImpl.cpp",
264     "nsTransferable.cpp",
265     "nsUserIdleService.cpp",
266     "nsXPLookAndFeel.cpp",
267     "PuppetBidiKeyboard.cpp",
268     "PuppetWidget.cpp",
269     "RemoteLookAndFeel.cpp",
270     "Screen.cpp",
271     "ScrollbarDrawing.cpp",
272     "ScrollbarDrawingAndroid.cpp",
273     "ScrollbarDrawingCocoa.cpp",
274     "ScrollbarDrawingGTK.cpp",
275     "ScrollbarDrawingWin.cpp",
276     "ScrollbarDrawingWin11.cpp",
277     "SharedWidgetUtils.cpp",
278     "SwipeTracker.cpp",
279     "TextEventDispatcher.cpp",
280     "TextRecognition.cpp",
281     "Theme.cpp",
282     "ThemeCocoa.cpp",
283     "ThemeColors.cpp",
284     "ThemeDrawing.cpp",
285     "TouchResampler.cpp",
286     "VsyncDispatcher.cpp",
287     "WidgetEventImpl.cpp",
288     "WidgetUtils.cpp",
291 if CONFIG["OS_ARCH"] == "Linux":
292     EXPORTS.mozilla.widget += ["LSBUtils.h"]
293     SOURCES += ["LSBUtils.cpp"]
295 if CONFIG["NS_PRINTING"]:
296     EXPORTS += [
297         "nsDeviceContextSpecProxy.h",
298         "nsPrintSettingsService.h",
299     ]
300     UNIFIED_SOURCES += [
301         "nsDeviceContextSpecProxy.cpp",
302         "nsPaper.cpp",
303         "nsPaperMargin.cpp",
304         "nsPrinterBase.cpp",
305         "nsPrinterListBase.cpp",
306         "nsPrintSettingsService.cpp",
307     ]
309     if toolkit in ("cocoa", "gtk"):
310         UNIFIED_SOURCES += [
311             "nsCUPSShim.cpp",
312             "nsPrinterCUPS.cpp",
313             "nsPrinterListCUPS.cpp",
314         ]
316 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
317 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
318 SOURCES += [
319     "nsBaseDragService.cpp",
320     "nsBaseWidget.cpp",
321     "ScreenManager.cpp",
324 EXPORTS.ipc = [
325     "nsGUIEventIPC.h",
328 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
329     DIRS += ["x11"]
331 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
332     UNIFIED_SOURCES += [
333         "nsBaseFilePicker.cpp",
334     ]
336 if toolkit in ("gtk", "windows", "cocoa", "uikit", "android"):
337     UNIFIED_SOURCES += [
338         "nsNativeTheme.cpp",
339     ]
341 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
343 include("/ipc/chromium/chromium-config.mozbuild")
345 LOCAL_INCLUDES += [
346     "/dom/base",
347     "/dom/ipc",
348     "/gfx/2d",
349     "/layout/base",
350     "/layout/forms",
351     "/layout/generic",
352     "/layout/painting",
353     "/layout/xul",
354     "/layout/xul/tree/",
355     "/view",
356     "/widget",
357     "/widget/headless",
360 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
361 if toolkit == "gtk":
362     LOCAL_INCLUDES += ["/third_party/cups/include"]
364 if toolkit == "windows":
365     IPDL_SOURCES = [
366         "headless/HeadlessWidgetTypes.ipdlh",
367         "windows/PCompositorWidget.ipdl",
368         "windows/PlatformWidgetTypes.ipdlh",
369     ]
370 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
371     IPDL_SOURCES = [
372         "gtk/PCompositorWidget.ipdl",
373         "gtk/PlatformWidgetTypes.ipdlh",
374         "headless/HeadlessWidgetTypes.ipdlh",
375     ]
376 elif toolkit == "android":
377     IPDL_SOURCES = [
378         "android/PCompositorWidget.ipdl",
379         "android/PlatformWidgetTypes.ipdlh",
380         "headless/HeadlessWidgetTypes.ipdlh",
381     ]
382 else:
383     IPDL_SOURCES = [
384         "generic/PCompositorWidget.ipdl",
385         "generic/PlatformWidgetTypes.ipdlh",
386         "headless/HeadlessWidgetTypes.ipdlh",
387     ]
389 IPDL_SOURCES += [
390     "LookAndFeelTypes.ipdlh",
391     "PClipboardContentAnalysis.ipdl",
392     "PClipboardReadRequest.ipdl",
393     "PClipboardWriteRequest.ipdl",
396 LOCAL_INCLUDES += [
397     "/widget/%s" % toolkit,
400 if CONFIG["ENABLE_TESTS"]:
401     UNIFIED_SOURCES += [
402         "MockDragServiceController.cpp",
403     ]
405 FINAL_LIBRARY = "xul"
407 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
408     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
409 if CONFIG["MOZ_WAYLAND"]:
410     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]