Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / widget / moz.build
blobfb9d0ab5884a8a9f85a42e81a461eb28863b5b3d
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         'nsIMacSharingService.idl',
63         'nsIMacWebAppUtils.idl',
64         'nsIStandaloneNativeMenu.idl',
65         'nsISystemStatusBar.idl',
66         'nsITaskbarProgress.idl',
67         'nsITouchBarHelper.idl',
68         'nsITouchBarInput.idl',
69         'nsITouchBarUpdater.idl',
70     ]
71     EXPORTS += [
72         'nsINativeMenuService.h',
73     ]
75 TEST_DIRS += ['tests']
77 DIRS += ['headless']
79 # Don't build the DSO under the 'build' directory as windows does.
81 # The DSOs get built in the toolkit dir itself.  Do this so that
82 # multiple implementations of widget can be built on the same
83 # source tree.
85 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
86     DIRS += ['gtk']
88     if CONFIG['MOZ_X11']:
89         DIRS += ['gtkxtbin']
91     XPIDL_SOURCES += [
92         'nsIGtkTaskbarProgress.idl',
93         'nsITaskbarProgress.idl',
94     ]
96 XPIDL_SOURCES += [
97     'nsIAppShell.idl',
98     'nsIBaseWindow.idl',
99     'nsIBidiKeyboard.idl',
100     'nsIClipboard.idl',
101     'nsIClipboardHelper.idl',
102     'nsIClipboardOwner.idl',
103     'nsIColorPicker.idl',
104     'nsIDisplayInfo.idl',
105     'nsIDragService.idl',
106     'nsIDragSession.idl',
107     'nsIFilePicker.idl',
108     'nsIFormatConverter.idl',
109     'nsIGfxInfo.idl',
110     'nsIGfxInfoDebug.idl',
111     'nsIIdleService.idl',
112     'nsIIdleServiceInternal.idl',
113     'nsIPrinterEnumerator.idl',
114     'nsIPrintSession.idl',
115     'nsIPrintSettings.idl',
116     'nsIPrintSettingsService.idl',
117     'nsIScreen.idl',
118     'nsIScreenManager.idl',
119     'nsISound.idl',
120     'nsITransferable.idl',
123 XPIDL_MODULE = 'widget'
125 EXPORTS += [
126     'GfxDriverInfo.h',
127     'GfxInfoBase.h',
128     'GfxInfoCollector.h',
129     'InputData.h',
130     'nsBaseAppShell.h',
131     'nsBaseDragService.h',
132     'nsBaseFilePicker.h',
133     'nsBaseScreen.h',
134     'nsBaseWidget.h',
135     'nsIDeviceContextSpec.h',
136     'nsIdleService.h',
137     'nsIKeyEventInPluginCallback.h',
138     'nsIPluginWidget.h',
139     'nsIPrintDialogService.h',
140     'nsIRollupListener.h',
141     'nsIWidget.h',
142     'nsIWidgetListener.h',
143     'nsWidgetInitData.h',
144     'nsWidgetsCID.h',
145     'PuppetWidget.h',
148 EXPORTS.mozilla += [
149     'BasicEvents.h',
150     'CommandList.h',
151     'ContentCache.h',
152     'ContentEvents.h',
153     'EventClassList.h',
154     'EventForwards.h',
155     'EventMessageList.h',
156     'FontRange.h',
157     'LookAndFeel.h',
158     'MiscEvents.h',
159     'MouseEvents.h',
160     'ProcInfo.h',
161     'TextEventDispatcher.h',
162     'TextEventDispatcherListener.h',
163     'TextEvents.h',
164     'TextRange.h',
165     'TouchEvents.h',
166     'VsyncDispatcher.h',
167     'WidgetUtils.h',
170 EXPORTS.mozilla.widget += [
171     'CompositorWidget.h',
172     'IMEData.h',
173     'InProcessCompositorWidget.h',
174     'nsAutoRollup.h',
175     'PuppetBidiKeyboard.h',
176     'Screen.h',
177     'ScreenManager.h',
178     'WidgetMessageUtils.h',
179     'WindowSurface.h'
182 UNIFIED_SOURCES += [
183     'CompositorWidget.cpp',
184     'ContentCache.cpp',
185     'GfxDriverInfo.cpp',
186     'GfxInfoBase.cpp',
187     'GfxInfoCollector.cpp',
188     'InProcessCompositorWidget.cpp',
189     'InputData.cpp',
190     'nsAutoRollup.cpp',
191     'nsBaseAppShell.cpp',
192     'nsBaseScreen.cpp',
193     'nsClipboardHelper.cpp',
194     'nsClipboardProxy.cpp',
195     'nsColorPickerProxy.cpp',
196     'nsContentProcessWidgetFactory.cpp',
197     'nsDragServiceProxy.cpp',
198     'nsFilePickerProxy.cpp',
199     'nsHTMLFormatConverter.cpp',
200     'nsIdleService.cpp',
201     'nsIWidgetListener.cpp',
202     'nsPrimitiveHelpers.cpp',
203     'nsPrintSettingsImpl.cpp',
204     'nsSoundProxy.cpp',
205     'nsTransferable.cpp',
206     'nsXPLookAndFeel.cpp',
207     'PuppetBidiKeyboard.cpp',
208     'PuppetWidget.cpp',
209     'Screen.cpp',
210     'ScreenManager.cpp',
211     'SharedWidgetUtils.cpp',
212     'TextEventDispatcher.cpp',
213     'VsyncDispatcher.cpp',
214     'WidgetEventImpl.cpp',
215     'WidgetUtils.cpp',
218 if CONFIG['OS_ARCH'] == 'Linux':
219     EXPORTS.mozilla.widget += [
220         'LSBUtils.h'
221     ]
222     SOURCES += [
223         'LSBUtils.cpp'
224     ]
226 if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
227     EXPORTS += [
228         'nsDeviceContextSpecProxy.h',
229         'nsPrintSettingsService.h',
230     ]
231     UNIFIED_SOURCES += [
232         'nsDeviceContextSpecProxy.cpp',
233         'nsPrintSession.cpp',
234         'nsPrintSettingsService.cpp',
235     ]
237 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
238 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
239 SOURCES += [
240     'nsBaseDragService.cpp',
241     'nsBaseWidget.cpp',
244 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
245     EXPORTS.mozilla += [
246         'WidgetTraceEvent.h',
247     ]
249 EXPORTS.ipc = ['nsGUIEventIPC.h']
251 if CONFIG['MOZ_X11']:
252     DIRS += ['x11']
253     SOURCES += [
254         'GfxInfoX11.cpp',
255         'nsShmImage.cpp',
256         'WindowSurfaceX11SHM.cpp',
257     ]
259 if toolkit == 'windows':
260     EXPORTS += [
261         'PluginWidgetProxy.h',
262     ]
263     SOURCES += [
264         'PluginWidgetProxy.cpp',
265     ]
267 if toolkit in ('cocoa', 'windows'):
268     UNIFIED_SOURCES += [
269         'nsBaseClipboard.cpp',
270     ]
272 if toolkit in {'gtk3', 'cocoa', 'windows',
273                'android', 'uikit'}:
274     UNIFIED_SOURCES += [
275         'nsBaseFilePicker.cpp',
276     ]
278 if toolkit in ('gtk3', 'windows', 'cocoa', 'android'):
279     UNIFIED_SOURCES += [
280         'nsNativeTheme.cpp',
281     ]
282 if toolkit == 'gtk3':
283     XPIDL_SOURCES += [
284         'nsIApplicationChooser.idl',
285     ]
287 DEFINES['MOZ_CROSS_PROCESS_IME'] = True
289 include('/ipc/chromium/chromium-config.mozbuild')
291 LOCAL_INCLUDES += [
292     '/dom/base',
293     '/dom/ipc',
294     '/layout/base',
295     '/layout/forms',
296     '/layout/generic',
297     '/layout/painting',
298     '/layout/xul',
299     '/layout/xul/tree/',
300     '/view',
301     '/widget',
302     '/widget/headless',
305 if toolkit == 'windows':
306     IPDL_SOURCES = [
307         'headless/HeadlessWidgetTypes.ipdlh',
308         'windows/PCompositorWidget.ipdl',
309         'windows/PlatformWidgetTypes.ipdlh',
310     ]
311 elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT'] and CONFIG['MOZ_X11']:
312     IPDL_SOURCES = [
313         'gtk/PCompositorWidget.ipdl',
314         'gtk/PlatformWidgetTypes.ipdlh',
315         'headless/HeadlessWidgetTypes.ipdlh',
316     ]
317 else:
318     IPDL_SOURCES = [
319         'headless/HeadlessWidgetTypes.ipdlh',
320         'PCompositorWidget.ipdl',
321         'PlatformWidgetTypes.ipdlh',
322     ]
324 widget_dir = toolkit
325 if widget_dir == 'gtk3':
326     widget_dir = 'gtk'
328 LOCAL_INCLUDES += [
329     '/widget/%s' % widget_dir,
331 FINAL_LIBRARY = 'xul'
333 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
334     DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
336 CXXFLAGS += CONFIG['TK_CFLAGS']