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: Cocoa") 9 SCHEDULES.exclusive = ["macosx"] 10 11with Files("*TextInput*"): 12 BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling") 13 14XPIDL_SOURCES += [ 15 "nsPIWidgetCocoa.idl", 16] 17 18XPIDL_MODULE = "widget_cocoa" 19 20EXPORTS += [ 21 "CFTypeRefPtr.h", 22 "DesktopBackgroundImage.h", 23 "MediaHardwareKeysEventSourceMac.h", 24 "MediaHardwareKeysEventSourceMacMediaCenter.h", 25 "mozView.h", 26 "nsBidiKeyboard.h", 27 "nsChangeObserver.h", 28 "nsCocoaFeatures.h", 29 "nsCocoaUtils.h", 30] 31 32EXPORTS.mozilla.widget += [ 33 "NativeMenuSupport.h", 34] 35 36UNIFIED_SOURCES += [ 37 "AppearanceOverride.mm", 38 "GfxInfo.mm", 39 "MOZIconHelper.mm", 40 "MOZMenuOpeningCoordinator.mm", 41 "NativeKeyBindings.mm", 42 "NativeMenuMac.mm", 43 "NativeMenuSupport.mm", 44 "nsAppShell.mm", 45 "nsBidiKeyboard.mm", 46 "nsCocoaFeatures.mm", 47 "nsCocoaUtils.mm", 48 "nsCocoaWindow.mm", 49 "nsColorPicker.mm", 50 "nsCursorManager.mm", 51 "nsDeviceContextSpecX.mm", 52 "nsFilePicker.mm", 53 "nsLookAndFeel.mm", 54 "nsMacCursor.mm", 55 "nsMacDockSupport.mm", 56 "nsMacFinderProgress.mm", 57 "nsMacSharingService.mm", 58 "nsMacWebAppUtils.mm", 59 "nsMenuBarX.mm", 60 "nsMenuGroupOwnerX.mm", 61 "nsMenuItemIconX.mm", 62 "nsMenuItemX.mm", 63 "nsMenuUtilsX.mm", 64 "nsMenuX.mm", 65 "nsNativeBasicThemeCocoa.cpp", 66 "nsPrintDialogX.mm", 67 "nsPrintSettingsServiceX.mm", 68 "nsPrintSettingsX.mm", 69 "nsSound.mm", 70 "nsStandaloneNativeMenu.mm", 71 "nsSystemStatusBarCocoa.mm", 72 "nsToolkit.mm", 73 "nsTouchBar.mm", 74 "nsTouchBarInput.mm", 75 "nsTouchBarInputIcon.mm", 76 "nsTouchBarUpdater.mm", 77 "nsUserIdleServiceX.mm", 78 "nsWidgetFactory.mm", 79 "nsWindowMap.mm", 80 "OSXNotificationCenter.mm", 81 "ScreenHelperCocoa.mm", 82 "SwipeTracker.mm", 83 "TextInputHandler.mm", 84 "VibrancyManager.mm", 85 "ViewRegion.mm", 86 "WidgetTraceEvent.mm", 87] 88 89# These files cannot be built in unified mode because they cause symbol conflicts 90SOURCES += [ 91 "DesktopBackgroundImage.mm", 92 "MediaHardwareKeysEventSourceMac.mm", 93 "MediaHardwareKeysEventSourceMacMediaCenter.mm", 94 "MediaKeysEventSourceFactory.cpp", 95 "nsChildView.mm", 96 "nsClipboard.mm", 97 "nsDragService.mm", 98 "nsNativeThemeCocoa.mm", 99] 100 101if not CONFIG["RELEASE_OR_BETA"] or CONFIG["MOZ_DEBUG"]: 102 SOURCES += [ 103 "nsSandboxViolationSink.mm", 104 ] 105 106XPCOM_MANIFESTS += [ 107 "components.conf", 108] 109 110include("/ipc/chromium/chromium-config.mozbuild") 111 112FINAL_LIBRARY = "xul" 113LOCAL_INCLUDES += [ 114 "/dom/media/platforms/apple", 115 "/layout/base", 116 "/layout/forms", 117 "/layout/generic", 118 "/layout/style", 119 "/layout/xul", 120 "/widget", 121 "/widget/headless", 122] 123 124if CONFIG["MOZ_ENABLE_SKIA_PDF"]: 125 # Skia includes because widget code includes PrintTargetSkPDF.h, and that 126 # includes skia headers. 127 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] 128 129RESOURCE_FILES.cursors += [ 130 "cursors/arrowN.png", 131 "cursors/arrowN@2x.png", 132 "cursors/arrowS.png", 133 "cursors/arrowS@2x.png", 134 "cursors/cell.png", 135 "cursors/cell@2x.png", 136 "cursors/colResize.png", 137 "cursors/colResize@2x.png", 138 "cursors/help.png", 139 "cursors/help@2x.png", 140 "cursors/move.png", 141 "cursors/move@2x.png", 142 "cursors/rowResize.png", 143 "cursors/rowResize@2x.png", 144 "cursors/sizeNE.png", 145 "cursors/sizeNE@2x.png", 146 "cursors/sizeNESW.png", 147 "cursors/sizeNESW@2x.png", 148 "cursors/sizeNS.png", 149 "cursors/sizeNS@2x.png", 150 "cursors/sizeNW.png", 151 "cursors/sizeNW@2x.png", 152 "cursors/sizeNWSE.png", 153 "cursors/sizeNWSE@2x.png", 154 "cursors/sizeSE.png", 155 "cursors/sizeSE@2x.png", 156 "cursors/sizeSW.png", 157 "cursors/sizeSW@2x.png", 158 "cursors/vtIBeam.png", 159 "cursors/vtIBeam@2x.png", 160 "cursors/zoomIn.png", 161 "cursors/zoomIn@2x.png", 162 "cursors/zoomOut.png", 163 "cursors/zoomOut@2x.png", 164] 165 166# These resources go in $(DIST)/bin/res/MainMenu.nib, but we can't use a magic 167# RESOURCE_FILES.MainMenu.nib attribute, since that would put the files in 168# $(DIST)/bin/res/MainMenu/nib. Instead, we call __setattr__ directly to create 169# an attribute with the correct name. 170RESOURCE_FILES.__setattr__( 171 "MainMenu.nib", 172 [ 173 "resources/MainMenu.nib/classes.nib", 174 "resources/MainMenu.nib/info.nib", 175 "resources/MainMenu.nib/keyedobjects.nib", 176 ], 177) 178 179CXXFLAGS += CONFIG["TK_CFLAGS"] 180 181OS_LIBS += [ 182 "-framework IOSurface", 183] 184 185SPHINX_TREES["/widget/cocoa"] = "docs" 186