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':
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',
31 elif toolkit == 'cocoa':
34 'nsIMacDockSupport.idl',
35 'nsIMacWebAppUtils.idl',
36 'nsIStandaloneNativeMenu.idl',
37 'nsISystemStatusBar.idl',
38 'nsITaskbarProgress.idl',
41 'nsINativeMenuService.h',
42 'nsIPrintDialogService.h',
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
53 if CONFIG['MOZ_ENABLE_GTK']:
62 'nsIBidiKeyboard.idl',
64 'nsIClipboardDragDropHookList.idl',
65 'nsIClipboardDragDropHooks.idl',
66 'nsIClipboardHelper.idl',
67 'nsIClipboardOwner.idl',
72 'nsIFormatConverter.idl',
74 'nsIGfxInfoDebug.idl',
76 'nsIIdleServiceInternal.idl',
78 'nsIPrintOptions.idl',
79 'nsIPrintSession.idl',
80 'nsIPrintSettings.idl',
81 'nsIPrintSettingsService.idl',
83 'nsIScreenManager.idl',
85 'nsITransferable.idl',
88 if CONFIG['MOZ_METRO']:
91 'nsIWinMetroUtils.idl',
94 XPIDL_MODULE = 'widget'
100 'GfxInfoCollector.h',
104 'nsIDeviceContextSpec.h',
106 'nsIRollupListener.h',
108 'nsIWidgetListener.h',
109 'nsWidgetInitData.h',
111 'PluginWidgetProxy.h',
135 'GfxInfoCollector.cpp',
138 'nsBaseAppShell.cpp',
139 'nsBaseDragService.cpp',
141 'nsClipboardHelper.cpp',
142 'nsClipboardProxy.cpp',
143 'nsColorPickerProxy.cpp',
144 'nsContentProcessWidgetFactory.cpp',
145 'nsFilePickerProxy.cpp',
146 'nsHTMLFormatConverter.cpp',
148 'nsIWidgetListener.cpp',
149 'nsPrimitiveHelpers.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 if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
167 'nsPrintOptionsImpl.h',
170 'nsPrintOptionsImpl.cpp',
173 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
178 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
180 'WidgetTraceEvent.h',
183 EXPORTS.ipc = ['nsGUIEventIPC.h']
185 if CONFIG['MOZ_X11']:
191 if toolkit in ('cocoa', 'windows'):
193 'nsBaseClipboard.cpp',
196 if toolkit in ('qt', 'gtk2', 'gtk3', 'cocoa', 'windows',
199 'nsBaseFilePicker.cpp',
202 if toolkit in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'):
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')
226 if widget_dir in ('gtk3', 'gtk2'):
227 # gtk3 shares includes with gtk2
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']