moz.build 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
  6. if toolkit in ('gtk2', 'gtk3'):
  7. EXPORTS += ['nsIPrintDialogService.h']
  8. if toolkit == 'windows':
  9. DIRS += ['windows']
  10. XPIDL_SOURCES += [
  11. 'nsIJumpListBuilder.idl',
  12. 'nsIJumpListItem.idl',
  13. 'nsIPrintSettingsWin.idl',
  14. 'nsITaskbarOverlayIconController.idl',
  15. 'nsITaskbarPreview.idl',
  16. 'nsITaskbarPreviewButton.idl',
  17. 'nsITaskbarPreviewController.idl',
  18. 'nsITaskbarProgress.idl',
  19. 'nsITaskbarTabPreview.idl',
  20. 'nsITaskbarWindowPreview.idl',
  21. 'nsIWindowsUIUtils.idl',
  22. 'nsIWinTaskbar.idl',
  23. ]
  24. if toolkit in ('gtk2', 'gtk3'):
  25. EXPORTS += ['nsINativeMenuService.h']
  26. # Don't build the DSO under the 'build' directory as windows does.
  27. #
  28. # The DSOs get built in the toolkit dir itself. Do this so that
  29. # multiple implementations of widget can be built on the same
  30. # source tree.
  31. #
  32. if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
  33. DIRS += ['gtk']
  34. if CONFIG['MOZ_X11']:
  35. DIRS += ['gtkxtbin']
  36. XPIDL_SOURCES += [
  37. 'nsIAppShell.idl',
  38. 'nsIBaseWindow.idl',
  39. 'nsIBidiKeyboard.idl',
  40. 'nsIClipboard.idl',
  41. 'nsIClipboardDragDropHookList.idl',
  42. 'nsIClipboardDragDropHooks.idl',
  43. 'nsIClipboardHelper.idl',
  44. 'nsIClipboardOwner.idl',
  45. 'nsIColorPicker.idl',
  46. 'nsIDisplayInfo.idl',
  47. 'nsIDragService.idl',
  48. 'nsIDragSession.idl',
  49. 'nsIFilePicker.idl',
  50. 'nsIFormatConverter.idl',
  51. 'nsIGfxInfo.idl',
  52. 'nsIGfxInfoDebug.idl',
  53. 'nsIIdleService.idl',
  54. 'nsIIdleServiceInternal.idl',
  55. 'nsIPrinterEnumerator.idl',
  56. 'nsIPrintSession.idl',
  57. 'nsIPrintSettings.idl',
  58. 'nsIPrintSettingsService.idl',
  59. 'nsIScreen.idl',
  60. 'nsIScreenManager.idl',
  61. 'nsISound.idl',
  62. 'nsITransferable.idl',
  63. ]
  64. XPIDL_MODULE = 'widget'
  65. EXPORTS += [
  66. 'GfxDriverInfo.h',
  67. 'GfxInfoBase.h',
  68. 'GfxInfoCollector.h',
  69. 'InputData.h',
  70. 'nsBaseScreen.h',
  71. 'nsBaseWidget.h',
  72. 'nsIDeviceContextSpec.h',
  73. 'nsIKeyEventInPluginCallback.h',
  74. 'nsIPluginWidget.h',
  75. 'nsIRollupListener.h',
  76. 'nsIWidget.h',
  77. 'nsIWidgetListener.h',
  78. 'nsWidgetInitData.h',
  79. 'nsWidgetsCID.h',
  80. 'PluginWidgetProxy.h',
  81. 'PuppetWidget.h',
  82. ]
  83. EXPORTS.mozilla += [
  84. 'BasicEvents.h',
  85. 'CommandList.h',
  86. 'ContentCache.h',
  87. 'ContentEvents.h',
  88. 'EventClassList.h',
  89. 'EventForwards.h',
  90. 'EventMessageList.h',
  91. 'FontRange.h',
  92. 'LookAndFeel.h',
  93. 'MiscEvents.h',
  94. 'MouseEvents.h',
  95. 'TextEventDispatcher.h',
  96. 'TextEventDispatcherListener.h',
  97. 'TextEvents.h',
  98. 'TextRange.h',
  99. 'TouchEvents.h',
  100. 'VsyncDispatcher.h',
  101. 'WidgetUtils.h',
  102. ]
  103. EXPORTS.mozilla.widget += [
  104. 'CompositorWidget.h',
  105. 'IMEData.h',
  106. 'InProcessCompositorWidget.h',
  107. 'PuppetBidiKeyboard.h',
  108. 'WidgetMessageUtils.h',
  109. 'WindowSurface.h'
  110. ]
  111. UNIFIED_SOURCES += [
  112. 'CompositorWidget.cpp',
  113. 'ContentCache.cpp',
  114. 'GfxDriverInfo.cpp',
  115. 'GfxInfoBase.cpp',
  116. 'GfxInfoCollector.cpp',
  117. 'GfxInfoWebGL.cpp',
  118. 'InProcessCompositorWidget.cpp',
  119. 'InputData.cpp',
  120. 'nsBaseAppShell.cpp',
  121. 'nsBaseScreen.cpp',
  122. 'nsClipboardHelper.cpp',
  123. 'nsClipboardProxy.cpp',
  124. 'nsColorPickerProxy.cpp',
  125. 'nsContentProcessWidgetFactory.cpp',
  126. 'nsDragServiceProxy.cpp',
  127. 'nsFilePickerProxy.cpp',
  128. 'nsHTMLFormatConverter.cpp',
  129. 'nsIdleService.cpp',
  130. 'nsIWidgetListener.cpp',
  131. 'nsPrimitiveHelpers.cpp',
  132. 'nsPrintSettingsImpl.cpp',
  133. 'nsScreenManagerProxy.cpp',
  134. 'nsTransferable.cpp',
  135. 'nsXPLookAndFeel.cpp',
  136. 'PuppetBidiKeyboard.cpp',
  137. 'PuppetWidget.cpp',
  138. 'ScreenProxy.cpp',
  139. 'SharedWidgetUtils.cpp',
  140. 'TextEventDispatcher.cpp',
  141. 'VsyncDispatcher.cpp',
  142. 'WidgetEventImpl.cpp',
  143. 'WidgetUtils.cpp',
  144. ]
  145. if CONFIG['OS_ARCH'] == 'Linux':
  146. EXPORTS.mozilla.widget += [
  147. 'LSBUtils.h'
  148. ]
  149. SOURCES += [
  150. 'LSBUtils.cpp'
  151. ]
  152. if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
  153. EXPORTS += [
  154. 'nsDeviceContextSpecProxy.h',
  155. 'nsPrintOptionsImpl.h',
  156. ]
  157. UNIFIED_SOURCES += [
  158. 'nsDeviceContextSpecProxy.cpp',
  159. 'nsPrintOptionsImpl.cpp',
  160. 'nsPrintSession.cpp',
  161. ]
  162. # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
  163. # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
  164. # PluginWidgetProxy includes MacOS system headers which define a Point struct
  165. # that conflicts with mozilla::gfx::Point
  166. SOURCES += [
  167. 'nsBaseDragService.cpp',
  168. 'nsBaseWidget.cpp',
  169. 'PluginWidgetProxy.cpp',
  170. ]
  171. if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
  172. EXPORTS.mozilla += [
  173. 'WidgetTraceEvent.h',
  174. ]
  175. EXPORTS.ipc = ['nsGUIEventIPC.h']
  176. if CONFIG['MOZ_X11']:
  177. DIRS += ['x11']
  178. UNIFIED_SOURCES += [
  179. 'GfxInfoX11.cpp'
  180. ]
  181. SOURCES += [
  182. 'nsShmImage.cpp',
  183. 'WindowSurfaceX11SHM.cpp',
  184. ]
  185. if toolkit in ('windows'):
  186. UNIFIED_SOURCES += [
  187. 'nsBaseClipboard.cpp',
  188. ]
  189. if toolkit in {'gtk2', 'gtk3', 'windows', 'uikit'}:
  190. UNIFIED_SOURCES += ['nsBaseFilePicker.cpp']
  191. if toolkit in ('gtk2', 'gtk3', 'windows'):
  192. UNIFIED_SOURCES += ['nsNativeTheme.cpp']
  193. if toolkit == 'gtk3':
  194. XPIDL_SOURCES += ['nsIApplicationChooser.idl']
  195. DEFINES['MOZ_CROSS_PROCESS_IME'] = True
  196. include('/ipc/chromium/chromium-config.mozbuild')
  197. LOCAL_INCLUDES += [
  198. '/dom/base',
  199. '/dom/ipc',
  200. '/layout/base',
  201. '/layout/forms',
  202. '/layout/generic',
  203. '/layout/xul',
  204. '/view',
  205. '/widget',
  206. ]
  207. if toolkit == 'windows':
  208. IPDL_SOURCES = [
  209. 'windows/PCompositorWidget.ipdl',
  210. 'windows/PlatformWidgetTypes.ipdlh',
  211. ]
  212. elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT'] and CONFIG['MOZ_X11']:
  213. IPDL_SOURCES = [
  214. 'gtk/PCompositorWidget.ipdl',
  215. 'gtk/PlatformWidgetTypes.ipdlh',
  216. ]
  217. else:
  218. IPDL_SOURCES = [
  219. 'PCompositorWidget.ipdl',
  220. 'PlatformWidgetTypes.ipdlh',
  221. ]
  222. widget_dir = toolkit
  223. if widget_dir in ('gtk3', 'gtk2'):
  224. # gtk3 shares includes with gtk2
  225. widget_dir = 'gtk'
  226. LOCAL_INCLUDES += [
  227. '/widget/%s' % widget_dir,
  228. ]
  229. FINAL_LIBRARY = 'xul'
  230. if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
  231. DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
  232. CXXFLAGS += CONFIG['TK_CFLAGS']