Skip to content

Update WinSDK module for latest changes #36213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 16, 2021
82 changes: 82 additions & 0 deletions stdlib/public/Platform/winsdk.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ module WinSDK [system] {
}
}

module ActiveX {
header "OCIdl.h"
export *
}

module Controls {
module CommCtrl {
header "CommCtrl.h"
Expand All @@ -153,6 +158,67 @@ module WinSDK [system] {
}
}

explicit module DirectX {
module Direct3D11 {
header "d3d11.h"
header "d3d11_1.h"
header "d3d11_2.h"
header "d3d11_3.h"
header "d3d11_4.h"
export *

link "d3d11.lib"
link "dxgi.lib"
}

module Direct3D12 {
header "d3d12.h"
export *

link "d3d12.lib"
link "dxgi.lib"
}

// FIXME(compnerd) DXGI is part of the Direct3D interfaces currently; we
// should split it out, but because it is part of the D3D11 interfaces, this
// separate module is meant to augment the uncovered portions only.
module _DXGI {
header "../shared/dxgi1_6.h"
header "dxgidebug.h"
export *

link "dxgi.lib"
}

module D3DCompiler {
header "d3dcompiler.h"
export *

link "d3dcompiler.lib"
}

module XAudio29 {
header "xaudio2.h"
header "xaudio2fx.h"
export *

link "xaudio2.lib"

requires cplusplus
}

// XInput 1.4 (Windows 10, XBox) is newer than the XInput 9.1.0 which was
// part of Vista.
module XInput14 {
header "Xinput.h"
export *

link "xinput.lib"
}

link "dxguid.lib"
}

// FIXME(compnerd) this is a hack for the HWND typedef for DbgHelp
module __DirectX {
header "directmanipulation.h"
Expand Down Expand Up @@ -343,6 +409,15 @@ module WinSDK [system] {
link "sensorsapi.lib"
}

module UI {
module XAML {
module Hosting {
header "windows.ui.xaml.hosting.desktopwindowxamlsource.h"
export *
}
}
}

module User {
header "WinUser.h"
export *
Expand Down Expand Up @@ -401,6 +476,13 @@ module WinSDK [system] {
link "AdvAPI32.Lib"
}

module WinSafer {
header "winsafer.h"
export *

link "AdvAPI32.Lib"
}

// TODO(compnerd) does it make sense to implicitly export this API surface?
// It seems to be meant for device drivers.
module WLANAPI {
Expand Down