Skip to content

Commit

Permalink
Mega namespace refactor (#718)
Browse files Browse the repository at this point in the history
* Another big round of namespace refactorings to reduce dependencies

* Missing namespace that broke the DWriteCore sample
  • Loading branch information
sotteson1 authored Nov 2, 2021
1 parent 2a3b75b commit 0c086ac
Show file tree
Hide file tree
Showing 88 changed files with 1,431 additions and 509 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,3 @@ MigrationBackup/
!/tests/MetadataUtils.Tests/assets/x64
!/tests/MetadataUtils.Tests/assets/x86
!/tests/MetadataUtils.Tests/assets/arm64

6 changes: 3 additions & 3 deletions generation/WinSDK/ConstantsScraper.header.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Windows.Win32.System.PropertiesSystem; // For PROPERTYKEY
using Windows.Win32.UI.Shell.PropertiesSystem; // For PROPERTYKEY
using Windows.Win32.System.SystemServices;
using static Windows.Win32.Foundation.Apis; // Various constants
using static Windows.Win32.Foundation.WIN32_ERROR;
using static Windows.Win32.System.SystemServices.Apis; // Various constants
using static Windows.Win32.Media.Apis; // Various constants
using static Windows.Win32.Media.Multimedia.Apis; // Various constants
using static Windows.Win32.Media.Audio.Apis; // Various constants
using static Windows.Win32.Media.DirectShow.Apis; // Various constants
using static Windows.Win32.Media.KernelStreaming.Apis; // Various constants
using static Windows.Win32.Graphics.DirectShow.Apis; // Various constants
using static Windows.Win32.Media.Multimedia.Apis; // Various constants
using static Windows.Win32.UI.WindowsAndMessaging.Apis; // For WM_USER
using static Windows.Win32.Storage.FileSystem.FILE_ACCESS_FLAGS; // For FILE_* constants
using static Windows.Win32.System.Diagnostics.Debug.FACILITY_CODE; // For MAKE_HRESULT constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ IKsPropertySet
--traverse
<IncludeRoot>/um/dmusicc.h
<IncludeRoot>/shared/dmusbuff.h
<IncludeRoot>/um/dsound.h
<IncludeRoot>/shared/dmdls.h
<IncludeRoot>/shared/dls1.h
<IncludeRoot>/shared/dls2.h
Expand Down
10 changes: 10 additions & 0 deletions generation/WinSDK/Partitions/Audio.DirectSound/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#define SECURITY_WIN32 // For sspi.h

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <mmsystem.h>

#include <dsound.h>
10 changes: 10 additions & 0 deletions generation/WinSDK/Partitions/Audio.DirectSound/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--with-librarypath
GetDeviceID=DSOUND
--exclude
_D3DVECTOR
IReferenceClock
IKsPropertySet
--traverse
<IncludeRoot>/um/dsound.h
--namespace
Windows.Win32.Media.Audio.DirectSound
15 changes: 15 additions & 0 deletions generation/WinSDK/Partitions/Authorization.UI/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <accctrl.h>
#include <adtgen.h>
#include <authz.h>
#include <azroles.h>
#include <aclui.h>
#include <aclapi.h>
#include <sddl.h>
10 changes: 10 additions & 0 deletions generation/WinSDK/Partitions/Authorization.UI/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--with-type
_tagSLDATATYPE=uint
SLDATATYPE=uint
--exclude
_CYPHER_BLOCK
_LM_OWF_PASSWORD
--traverse
<IncludeRoot>/um/AclUI.h
--namespace
Windows.Win32.Security.Authorization.UI
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Authorization/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _LM_OWF_PASSWORD
<IncludeRoot>/shared/sddl.h
<IncludeRoot>/um/accctrl.h
<IncludeRoot>/um/AclAPI.h
<IncludeRoot>/um/AclUI.h
<IncludeRoot>/um/adtgen.h
<IncludeRoot>/um/AuthZ.h
<IncludeRoot>/um/azroles.h
Expand Down
4 changes: 0 additions & 4 deletions generation/WinSDK/Partitions/Base/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#include <winbase.h>
#include <winnt.h>

#define USERMODE_DRIVER
#include <winddi.h>
#undef USERMODE_DRIVER

#include <winuser.h>

#include <utilapiset.h>
Expand Down
3 changes: 0 additions & 3 deletions generation/WinSDK/Partitions/Base/remap.rsp

This file was deleted.

5 changes: 0 additions & 5 deletions generation/WinSDK/Partitions/Base/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,16 @@ _D3DTEXTURETRANSFORMFLAGS
PENCLAVE_ROUTINE
LPENCLAVE_ROUTINE
--traverse
<IncludeRoot>/shared/apdevpkey.h
<IncludeRoot>/shared/devpkey.h
<IncludeRoot>/um/dbt.h
<IncludeRoot>/shared/devpropdef.h
<IncludeRoot>/shared/ioevent.h
<IncludeRoot>/um/d3dnthal.h
<IncludeRoot>/um/d3dcaps.h
<IncludeRoot>/um/d3dtypes.h
<IncludeRoot>/um/winddi.h
<IncludeRoot>/shared/wtypes.h
<IncludeRoot>/um/rpcnsip.h
<IncludeRoot>/um/minwinbase.h
<IncludeRoot>/um/storprop.h
<IncludeRoot>/um/atlthunk.h
<IncludeRoot>/um/devpropdef.h
<IncludeRoot>/shared/ntiologc.h
<IncludeRoot>/um/dlnadeviceinterfaceids.h
<IncludeRoot>/um/dlnametadataproviderproperties.h
Expand Down
11 changes: 11 additions & 0 deletions generation/WinSDK/Partitions/Devices.Properties/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#define SECURITY_WIN32 // For sspi.h

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <mmsystem.h>

#include <devpkey.h>
#include <apdevpkey.h>
6 changes: 6 additions & 0 deletions generation/WinSDK/Partitions/Devices.Properties/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--traverse
<IncludeRoot>/shared/apdevpkey.h
<IncludeRoot>/shared/devpkey.h
<IncludeRoot>/shared/devpropdef.h
--namespace
Windows.Win32.Devices.Properties
11 changes: 11 additions & 0 deletions generation/WinSDK/Partitions/Direct2D.Common/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

//#define D2D_USE_C_DEFINITIONS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <dcommon.h>
9 changes: 9 additions & 0 deletions generation/WinSDK/Partitions/Direct2D.Common/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--exclude
IWICBitmapSource
IWICBitmap
DWRITE_GLYPH_RUN
DWRITE_GLYPH_RUN_DESCRIPTION
--traverse
<IncludeRoot>/um/dcommon.h
--namespace
Windows.Win32.Graphics.Direct2D.Common
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Direct2D/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ DWRITE_GLYPH_RUN_DESCRIPTION
<IncludeRoot>/um/d2d1_3helper.h
<IncludeRoot>/um/d2d1_1helper.h
<IncludeRoot>/um/dciddi.h
<IncludeRoot>/um/dcommon.h
<IncludeRoot>/um/d2dbasetypes.h
<IncludeRoot>/um/d2d1.h
<IncludeRoot>/um/d2d1_1.h
Expand Down
4 changes: 4 additions & 0 deletions generation/WinSDK/Partitions/Display/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
#include <winddi.h>
#include <devpropdef.h>
#include <ntddvdeo.h>

#define USERMODE_DRIVER
#include <winddi.h>
#undef USERMODE_DRIVER
1 change: 1 addition & 0 deletions generation/WinSDK/Partitions/Display/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<IncludeRoot>/shared/ntddvdeo.h
<IncludeRoot>/um/dxcore_interface.h
<IncludeRoot>/um/dxcore.h
<IncludeRoot>/um/winddi.h
--namespace
Windows.Win32.Devices.Display
9 changes: 9 additions & 0 deletions generation/WinSDK/Partitions/Dxgi.Common/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--exclude
DXGI_ADAPTER_FLAG_FORCE_DWORD
_D3DCOLORVALUE
--traverse
<IncludeRoot>/shared/dxgitype.h
<IncludeRoot>/shared/dxgiformat.h
<IncludeRoot>/shared/dxgicommon.h
--namespace
Windows.Win32.Graphics.Dxgi.Common
22 changes: 22 additions & 0 deletions generation/WinSDK/Partitions/Dxgi/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <winnt.h>
#include <winerror.h>
#include <dxgi.h>
#include <dxgi1_2.h>
#include <dxgi1_3.h>
#include <dxgi1_4.h>
#include <dxgi1_5.h>
#include <dxgi1_6.h>
#include <dxgidebug.h>
#include <dxgitype.h>
#include <dxgicommon.h>
#include <dxgiformat.h>
#include <dxgimessages.h>
#include <dxprogrammablecapture.h>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
DXGI_ADAPTER_FLAG_FORCE_DWORD
_D3DCOLORVALUE
--traverse
<IncludeRoot>/shared/dxgitype.h
<IncludeRoot>/shared/dxgiformat.h
<IncludeRoot>/shared/dxgicommon.h
<IncludeRoot>/shared/dxgi.h
<IncludeRoot>/shared/dxgi1_2.h
<IncludeRoot>/shared/dxgi1_4.h
Expand Down
10 changes: 10 additions & 0 deletions generation/WinSDK/Partitions/Media.DShow.Xml/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <amstream.h>
#include <amxmlgraphbuilder.h>
6 changes: 6 additions & 0 deletions generation/WinSDK/Partitions/Media.DShow.Xml/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--exclude
IKsPropertySet
--traverse
<IncludeRoot>/um/amxmlgraphbuilder.h
--namespace
Windows.Win32.Media.DirectShow.Xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "windows.fixed.h"
#include <sdkddkver.h>

#include <uuids.h>
//#include <uuids.h>
#include <ks.h>
#include <ksmedia.h>
//#include <ksuuids.h>
Expand Down Expand Up @@ -62,10 +62,6 @@
#include <codecapi.h>
#include <mediaobj.h>
#include <medparam.h>
#include <dmoreg.h>
#include <dmort.h>
#include <mediaerr.h>
#include <dmoimpl.h>
#include <wmp.h>
#include <austream.h>
#include <ddstream.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ IKsPropertySet
<IncludeRoot>/um/vmr9.h
<IncludeRoot>/um/vpconfig.h
<IncludeRoot>/um/vpnotify.h
<IncludeRoot>/um/amxmlgraphbuilder.h
<IncludeRoot>/um/errors.h
<IncludeRoot>/um/medparam.h
<IncludeRoot>/um/dmoreg.h
<IncludeRoot>/um/dmort.h
<IncludeRoot>/um/dmoimpl.h
<IncludeRoot>/um/austream.h
<IncludeRoot>/um/ddstream.h
<IncludeRoot>/um/mmstream.h
Expand All @@ -45,10 +41,9 @@ IKsPropertySet
<IncludeRoot>/um/dxva.h
<IncludeRoot>/um/dxva2swdev.h
<IncludeRoot>/um/dxva2trace.h
<IncludeRoot>/um/mediaerr.h
<IncludeRoot>/um/mpeg2error.h
<IncludeRoot>/um/pbdaerrors.h
<IncludeRoot>/um/playlist.h
<IncludeRoot>/um/xprtdefs.h
--namespace
Windows.Win32.Graphics.DirectShow
Windows.Win32.Media.DirectShow
14 changes: 14 additions & 0 deletions generation/WinSDK/Partitions/Media.DxMediaObjects/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"

#include <sdkddkver.h>
#include <dmoreg.h>
#include <dmort.h>
#include <mediaobj.h>
#include <mediaerr.h>

//#include <dmoimpl.h> -- C++ classes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--traverse
<IncludeRoot>/um/mediaobj.h
<IncludeRoot>/um/mediaerr.h
<IncludeRoot>/um/dmoreg.h
<IncludeRoot>/um/dmort.h
<IncludeRoot>/um/dmoimpl.h
--namespace
Windows.Win32.Media.DxMediaObjects
1 change: 1 addition & 0 deletions generation/WinSDK/Partitions/Media/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
#include <timeapi.h>
#include <mmsyscom.h>
#include <mmiscapi2.h>
#include <uuids.h>
1 change: 1 addition & 0 deletions generation/WinSDK/Partitions/Media/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ AVIPALCHANGE
<IncludeRoot>/um/timeapi.h
<IncludeRoot>/um/mmsyscom.h
<IncludeRoot>/um/mmiscapi2.h
<IncludeRoot>/shared/uuids.h
--namespace
Windows.Win32.Media
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Mf/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ tagMPEG2VIDEOINFO
<IncludeRoot>/um/evr.h
<IncludeRoot>/um/evr9.h
<IncludeRoot>/um/icodecapi.h
<IncludeRoot>/um/mediaobj.h
<IncludeRoot>/um/mfapi.h
<IncludeRoot>/um/mfcaptureengine.h
<IncludeRoot>/um/mfcontentdecryptionmodule.h
Expand Down
2 changes: 1 addition & 1 deletion generation/WinSDK/Partitions/MsTv/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ _SetAllocator=_SetAllocator2
<IncludeRoot>/um/tune.h
<IncludeRoot>/um/tvratings_enum.h
--namespace
Windows.Win32.Graphics.DirectShow
Windows.Win32.Media.DirectShow
2 changes: 1 addition & 1 deletion generation/WinSDK/Partitions/Properties/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<IncludeRoot>/um/propsys.h
<IncludeRoot>/um/propvarutil.h
--namespace
Windows.Win32.System.PropertiesSystem
Windows.Win32.UI.Shell.PropertiesSystem
31 changes: 31 additions & 0 deletions generation/WinSDK/Partitions/Security.Cryptography.UI/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <winternl.h>

// Usually brought in by windows.h
typedef NTSTATUS* PNTSTATUS;

#define _NTDEF_
#define SECURITY_WIN32
#include <NTSecAPI.h>
#include <sspi.h>
#include <wincred.h>
#include <NTSecPKG.h>
#include <schannel.h>
#include <bcrypt.h>
#include <ncryptprotect.h>
#include <ncrypt.h>
#include <wincrypt.h>
#include <cryptxml.h>
#include <cryptdlg.h>
#include <cryptuiapi.h>
#include <i_cryptasn1tls.h>
#include <infocard.h>
#include <dpapi.h>
#include <casetup.h>
11 changes: 11 additions & 0 deletions generation/WinSDK/Partitions/Security.Cryptography.UI/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--with-type
_tagSLDATATYPE=uint
SLDATATYPE=uint
--exclude
_CYPHER_BLOCK
_LM_OWF_PASSWORD
--traverse
<IncludeRoot>/um/cryptdlg.h
<IncludeRoot>/um/cryptuiapi.h
--namespace
Windows.Win32.Security.Cryptography.UI
Loading

0 comments on commit 0c086ac

Please sign in to comment.