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'):
11 if toolkit in ('qt', 'android', 'gonk', 'gtk2', 'gtk3'):
12 EXPORTS += ['nsIPrintDialogService.h']
14 if toolkit == 'windows':
18 'nsIJumpListBuilder.idl',
19 'nsIJumpListItem.idl',
20 'nsIPrintSettingsWin.idl',
21 'nsITaskbarOverlayIconController.idl',
22 'nsITaskbarPreview.idl',
23 'nsITaskbarPreviewButton.idl',
24 'nsITaskbarPreviewController.idl',
25 'nsITaskbarProgress.idl',
26 'nsITaskbarTabPreview.idl',
27 'nsITaskbarWindowPreview.idl',
30 elif toolkit == 'cocoa':
32 'nsIMacDockSupport.idl',
33 'nsIMacWebAppUtils.idl',
34 'nsIStandaloneNativeMenu.idl',
35 'nsISystemStatusBar.idl',
36 'nsITaskbarProgress.idl',
39 'nsINativeMenuService.h',
40 'nsIPrintDialogService.h',
43 TEST_DIRS += ['tests']
45 # Don't build the DSO under the 'build' directory as windows does.
47 # The DSOs get built in the toolkit dir itself. Do this so that
48 # multiple implementations of widget can be built on the same
51 if CONFIG['MOZ_ENABLE_GTK']:
60 'nsIBidiKeyboard.idl',
62 'nsIClipboardDragDropHookList.idl',
63 'nsIClipboardDragDropHooks.idl',
64 'nsIClipboardHelper.idl',
65 'nsIClipboardOwner.idl',
70 'nsIFormatConverter.idl',
72 'nsIGfxInfoDebug.idl',
74 'nsIIdleServiceInternal.idl',
76 'nsIPrintOptions.idl',
77 'nsIPrintSession.idl',
78 'nsIPrintSettings.idl',
79 'nsIPrintSettingsService.idl',
81 'nsIScreenManager.idl',
83 'nsITransferable.idl',
86 if CONFIG['MOZ_METRO']:
89 'nsIWinMetroUtils.idl',
92 XPIDL_MODULE = 'widget'
102 'nsIDeviceContextSpec.h',
104 'nsIRollupListener.h',
106 'nsIWidgetListener.h',
107 'nsPrintOptionsImpl.h',
108 'nsWidgetInitData.h',
110 'PluginWidgetProxy.h',
134 'GfxInfoCollector.cpp',
137 'nsBaseAppShell.cpp',
138 'nsBaseDragService.cpp',
140 'nsClipboardHelper.cpp',
141 'nsClipboardProxy.cpp',
142 'nsColorPickerProxy.cpp',
143 'nsContentProcessWidgetFactory.cpp',
144 'nsFilePickerProxy.cpp',
145 'nsHTMLFormatConverter.cpp',
147 'nsIWidgetListener.cpp',
148 'nsPrimitiveHelpers.cpp',
149 'nsPrintOptionsImpl.cpp',
150 'nsPrintSession.cpp',
151 'nsPrintSettingsImpl.cpp',
152 'nsScreenManagerProxy.cpp',
154 'nsTransferable.cpp',
155 'nsXPLookAndFeel.cpp',
156 'PluginWidgetProxy.cpp',
159 'SharedWidgetUtils.cpp',
160 'VsyncDispatcher.cpp',
161 'WidgetEventImpl.cpp',
165 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
170 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
172 'WidgetTraceEvent.h',
175 EXPORTS.ipc = ['nsGUIEventIPC.h']
177 if CONFIG['MOZ_X11']:
183 if toolkit in ('cocoa', 'windows'):
185 'nsBaseClipboard.cpp',
188 if toolkit in ('qt', 'gtk2', 'gtk3', 'cocoa', 'windows',
191 'nsBaseFilePicker.cpp',
194 if toolkit in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'):
199 if not CONFIG['MOZ_B2G']:
200 DEFINES['MOZ_CROSS_PROCESS_IME'] = True
202 FAIL_ON_WARNINGS = True
204 MSVC_ENABLE_PGO = True
206 include('/ipc/chromium/chromium-config.mozbuild')
218 if widget_dir in ('gtk3', 'gtk2'):
219 # gtk3 shares includes with gtk2
223 '/widget/%s' % widget_dir,
225 FINAL_LIBRARY = 'xul'
227 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
228 DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
230 CXXFLAGS += CONFIG['TK_CFLAGS']