Bumping manifests a=b2g-bump
[gecko.git] / widget / moz.build
blobf29a71ef69b27d2af8d29030002415f6421cd624
1 # -*- Mode: python; c-basic-offset: 4; 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 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
9 if toolkit in ('cocoa', 'qt', 'android', 'gonk'):
10     DIRS += [toolkit]
11 if toolkit in ('qt', 'android', 'gonk', 'gtk2', 'gtk3'):
12     EXPORTS += ['nsIPrintDialogService.h']
14 if toolkit == 'windows':
15     DIRS += ['windows']
17     XPIDL_SOURCES += [
18         'nsIGfxInfo2.idl',
19         'nsIJumpListBuilder.idl',
20         'nsIJumpListItem.idl',
21         'nsIPrintSettingsWin.idl',
22         'nsITaskbarOverlayIconController.idl',
23         'nsITaskbarPreview.idl',
24         'nsITaskbarPreviewButton.idl',
25         'nsITaskbarPreviewController.idl',
26         'nsITaskbarProgress.idl',
27         'nsITaskbarTabPreview.idl',
28         'nsITaskbarWindowPreview.idl',
29         'nsIWinTaskbar.idl',
30     ]
31 elif toolkit == 'cocoa':
32     XPIDL_SOURCES += [
33         'nsIGfxInfo2.idl',
34         'nsIMacDockSupport.idl',
35         'nsIMacWebAppUtils.idl',
36         'nsIStandaloneNativeMenu.idl',
37         'nsISystemStatusBar.idl',
38         'nsITaskbarProgress.idl',
39     ]
40     EXPORTS += [
41         'nsINativeMenuService.h',
42         'nsIPrintDialogService.h',
43     ]
45 TEST_DIRS += ['tests']
47 # Don't build the DSO under the 'build' directory as windows does.
49 # The DSOs get built in the toolkit dir itself.  Do this so that
50 # multiple implementations of widget can be built on the same
51 # source tree.
53 if CONFIG['MOZ_ENABLE_GTK']:
54     DIRS += ['gtk']
56     if CONFIG['MOZ_X11']:
57         DIRS += ['gtkxtbin']
59 XPIDL_SOURCES += [
60     'nsIAppShell.idl',
61     'nsIBaseWindow.idl',
62     'nsIBidiKeyboard.idl',
63     'nsIClipboard.idl',
64     'nsIClipboardDragDropHookList.idl',
65     'nsIClipboardDragDropHooks.idl',
66     'nsIClipboardHelper.idl',
67     'nsIClipboardOwner.idl',
68     'nsIColorPicker.idl',
69     'nsIDragService.idl',
70     'nsIDragSession.idl',
71     'nsIFilePicker.idl',
72     'nsIFormatConverter.idl',
73     'nsIGfxInfo.idl',
74     'nsIGfxInfoDebug.idl',
75     'nsIIdleService.idl',
76     'nsIIdleServiceInternal.idl',
77     'nsIIMEPicker.idl',
78     'nsIPrintOptions.idl',
79     'nsIPrintSession.idl',
80     'nsIPrintSettings.idl',
81     'nsIPrintSettingsService.idl',
82     'nsIScreen.idl',
83     'nsIScreenManager.idl',
84     'nsISound.idl',
85     'nsITransferable.idl',
88 if CONFIG['MOZ_METRO']:
89     XPIDL_SOURCES += [
90         'MetroUIUtils.idl',
91         'nsIWinMetroUtils.idl',
92     ]
94 XPIDL_MODULE = 'widget'
96 EXPORTS += [
97     'ContentHelper.h',
98     'GfxDriverInfo.h',
99     'GfxInfoBase.h',
100     'GfxInfoCollector.h',
101     'InputData.h',
102     'nsBaseScreen.h',
103     'nsBaseWidget.h',
104     'nsIDeviceContextSpec.h',
105     'nsIPluginWidget.h',
106     'nsIRollupListener.h',
107     'nsIWidget.h',
108     'nsIWidgetListener.h',
109     'nsWidgetInitData.h',
110     'nsWidgetsCID.h',
111     'PluginWidgetProxy.h',
112     'PuppetWidget.h',
115 EXPORTS.mozilla += [
116     'BasicEvents.h',
117     'CommandList.h',
118     'ContentEvents.h',
119     'EventClassList.h',
120     'EventForwards.h',
121     'LookAndFeel.h',
122     'MiscEvents.h',
123     'MouseEvents.h',
124     'TextEvents.h',
125     'TextRange.h',
126     'TouchEvents.h',
127     'VsyncDispatcher.h',
128     'WidgetUtils.h',
131 UNIFIED_SOURCES += [
132     'ContentHelper.cpp',
133     'GfxDriverInfo.cpp',
134     'GfxInfoBase.cpp',
135     'GfxInfoCollector.cpp',
136     'GfxInfoWebGL.cpp',
137     'InputData.cpp',
138     'nsBaseAppShell.cpp',
139     'nsBaseDragService.cpp',
140     'nsBaseScreen.cpp',
141     'nsClipboardHelper.cpp',
142     'nsClipboardProxy.cpp',
143     'nsColorPickerProxy.cpp',
144     'nsContentProcessWidgetFactory.cpp',
145     'nsFilePickerProxy.cpp',
146     'nsHTMLFormatConverter.cpp',
147     'nsIdleService.cpp',
148     'nsIWidgetListener.cpp',
149     'nsPrimitiveHelpers.cpp',
150     'nsPrintSession.cpp',
151     'nsPrintSettingsImpl.cpp',
152     'nsScreenManagerProxy.cpp',
153     'nsShmImage.cpp',
154     'nsTransferable.cpp',
155     'nsXPLookAndFeel.cpp',
156     'PluginWidgetProxy.cpp',
157     'PuppetWidget.cpp',
158     'ScreenProxy.cpp',
159     'SharedWidgetUtils.cpp',
160     'VsyncDispatcher.cpp',
161     'WidgetEventImpl.cpp',
162     'WidgetUtils.cpp',
165 if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
166     EXPORTS += [
167         'nsPrintOptionsImpl.h',
168     ]
169     UNIFIED_SOURCES += [
170         'nsPrintOptionsImpl.cpp',
171     ]
173 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
174 SOURCES += [
175     'nsBaseWidget.cpp',
178 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
179     EXPORTS.mozilla += [
180         'WidgetTraceEvent.h',
181     ]
183 EXPORTS.ipc = ['nsGUIEventIPC.h']
185 if CONFIG['MOZ_X11']:
186     DIRS += ['x11']
187     UNIFIED_SOURCES += [
188         'GfxInfoX11.cpp'
189     ]
191 if toolkit in ('cocoa', 'windows'):
192     UNIFIED_SOURCES += [
193         'nsBaseClipboard.cpp',
194     ]
196 if toolkit in ('qt', 'gtk2', 'gtk3', 'cocoa', 'windows',
197                                     'android', 'gonk'):
198     UNIFIED_SOURCES += [
199         'nsBaseFilePicker.cpp',
200     ]
202 if toolkit in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'):
203     UNIFIED_SOURCES += [
204         'nsNativeTheme.cpp',
205     ]
207 if not CONFIG['MOZ_B2G']:
208     DEFINES['MOZ_CROSS_PROCESS_IME'] = True
210 FAIL_ON_WARNINGS = True
212 MSVC_ENABLE_PGO = True
214 include('/ipc/chromium/chromium-config.mozbuild')
216 LOCAL_INCLUDES += [
217     '/layout/base',
218     '/layout/forms',
219     '/layout/generic',
220     '/layout/xul',
221     '/view',
222     '/widget',
225 widget_dir = toolkit
226 if widget_dir in ('gtk3', 'gtk2'):
227     # gtk3 shares includes with gtk2
228     widget_dir = 'gtk'
230 LOCAL_INCLUDES += [
231     '/widget/%s' % widget_dir,
233 FINAL_LIBRARY = 'xul'
235 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
236     DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
238 CXXFLAGS += CONFIG['TK_CFLAGS']