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/. 6 7with Files("**"): 8 BUG_COMPONENT = ("Core", "Widget: Win32") 9 10with Files("*CompositorWidget*"): 11 BUG_COMPONENT = ("Core", "Graphics") 12 13TEST_DIRS += ['tests'] 14 15EXPORTS += [ 16 'nsdefs.h', 17 'WindowHook.h', 18 'WinUtils.h', 19] 20 21EXPORTS.mozilla.widget += [ 22 'AudioSession.h', 23 'CompositorWidgetChild.h', 24 'CompositorWidgetParent.h', 25 'InProcessWinCompositorWidget.h', 26 'PDFiumChild.h', 27 'PDFiumEngineShim.h', 28 'PDFiumParent.h', 29 'PDFiumProcessChild.h', 30 'PDFiumProcessParent.h', 31 'PDFViaEMFPrintHelper.h', 32 'WinCompositorWidget.h', 33 'WindowsEMF.h', 34 'WinMessages.h', 35 'WinModifierKeyState.h', 36 'WinNativeEventData.h', 37] 38 39UNIFIED_SOURCES += [ 40 'AudioSession.cpp', 41 'CompositorWidgetChild.cpp', 42 'CompositorWidgetParent.cpp', 43 'GfxInfo.cpp', 44 'IEnumFE.cpp', 45 'IMMHandler.cpp', 46 'InkCollector.cpp', 47 'InProcessWinCompositorWidget.cpp', 48 'JumpListItem.cpp', 49 'KeyboardLayout.cpp', 50 'LSPAnnotator.cpp', 51 'nsAppShell.cpp', 52 'nsClipboard.cpp', 53 'nsColorPicker.cpp', 54 'nsDataObj.cpp', 55 'nsDataObjCollection.cpp', 56 'nsDragService.cpp', 57 'nsIdleServiceWin.cpp', 58 'nsImageClipboard.cpp', 59 'nsLookAndFeel.cpp', 60 'nsNativeDragSource.cpp', 61 'nsNativeDragTarget.cpp', 62 'nsNativeThemeWin.cpp', 63 'nsSound.cpp', 64 'nsToolkit.cpp', 65 'nsUXThemeData.cpp', 66 'nsWindow.cpp', 67 'nsWindowBase.cpp', 68 'nsWindowDbg.cpp', 69 'nsWindowGfx.cpp', 70 'nsWinGesture.cpp', 71 'ScreenHelperWin.cpp', 72 'TaskbarPreview.cpp', 73 'TaskbarPreviewButton.cpp', 74 'TaskbarTabPreview.cpp', 75 'TaskbarWindowPreview.cpp', 76 'WidgetTraceEvent.cpp', 77 'WindowHook.cpp', 78 'WinIMEHandler.cpp', 79 'WinPointerEvents.cpp', 80 'WinTaskbar.cpp', 81 'WinTextEventDispatcherListener.cpp', 82 'WinUtils.cpp', 83] 84 85# The following files cannot be built in unified mode because of name clashes. 86SOURCES += [ 87 'JumpListBuilder.cpp', 88 'nsBidiKeyboard.cpp', 89 'nsFilePicker.cpp', 90 'nsWidgetFactory.cpp', 91 'WinCompositorWidget.cpp', 92 'WindowsUIUtils.cpp', 93 'WinMouseScrollHandler.cpp', 94] 95 96if CONFIG['NS_PRINTING']: 97 UNIFIED_SOURCES += [ 98 'nsDeviceContextSpecWin.cpp', 99 'nsPrintDialogUtil.cpp', 100 'nsPrintDialogWin.cpp', 101 'nsPrintSettingsServiceWin.cpp', 102 'nsPrintSettingsWin.cpp', 103 ] 104 105if CONFIG['MOZ_ENABLE_SKIA_PDF']: 106 DIRS += ['/modules/pdfium'] 107 IPDL_SOURCES += [ 108 'PPDFium.ipdl', 109 ] 110 UNIFIED_SOURCES += [ 111 'PDFiumChild.cpp', 112 'PDFiumEngineShim.cpp', 113 'PDFiumParent.cpp', 114 'PDFiumProcessChild.cpp', 115 'PDFiumProcessParent.cpp', 116 'PDFViaEMFPrintHelper.cpp', 117 'WindowsEMF.cpp', 118 ] 119 120if CONFIG['NS_ENABLE_TSF']: 121 SOURCES += [ 122 'TSFTextStore.cpp', 123 ] 124 125include('/ipc/chromium/chromium-config.mozbuild') 126 127FINAL_LIBRARY = 'xul' 128 129if CONFIG['MOZ_ENABLE_SKIA_PDF']: 130 LOCAL_INCLUDES += [ 131 '/gfx/skia/skia/include/config', 132 '/gfx/skia/skia/include/core', 133 '/modules/pdfium/pdfium/public', 134 ] 135 TEST_DIRS += ['gtest'] 136 137LOCAL_INCLUDES += [ 138 '/layout/generic', 139 '/layout/xul', 140 '/toolkit/xre', 141 '/widget', 142 '/widget/headless', 143 '/xpcom/base', 144] 145 146DEFINES['MOZ_UNICODE'] = True 147 148for var in ('MOZ_ENABLE_D3D10_LAYER'): 149 if CONFIG[var]: 150 DEFINES[var] = True 151 152RESFILE = 'widget.res' 153 154CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] 155 156OS_LIBS += [ 157 'rpcrt4', 158] 159 160if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): 161 # C5038: Suppress initializer list order warnings from wrl.h 162 SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038'] 163