Skip to content

Commit

Permalink
Move all PREFIX_* constants that have more than 50 members to their…
Browse files Browse the repository at this point in the history
… own class named PREFIX
  • Loading branch information
tannergooding committed Nov 14, 2021
1 parent 3592c49 commit 96956f8
Show file tree
Hide file tree
Showing 161 changed files with 10,905 additions and 9,666 deletions.
49 changes: 49 additions & 0 deletions generation/remap-classes.rsp
Original file line number Diff line number Diff line change
@@ -1,52 +1,101 @@
--with-class
ALG_*=ALG
APPCOMMAND_*=APPCOMMAND
CALG_*=CALG
CERTSRV_*=CERTSRV
CERT_*=CERT
CFSTR_*=CFSTR
CLSID_*=CLSID
CMSG_*=CMSG
COMADMIN_*=COMADMIN
CONTEXT_*=CONTEXT
CO_*=CO
CRED_*=CRED
CRYPTNET_*=CRYPTNET
CRYPT_*=CRYPT
CSIDL_*=CSIDL
DISPID_*=DISPID
DI_*=DI
DMPAPER_*=DMPAPER
DNS_*=DNS
DOMAIN_*=DOMAIN
EM_*=EM
ERROR_*=ERROR
EVENT_*=EVENT
E_*=E
FACILITY_*=FACILITY
FAST_*=FAST
FILE_*=FILE
FLG_*=FLG
FSCTL_*=FSCTL
FVE_*=FVE
FWP_*=FWP
HID_*=HID
HRESULT_FROM_WIN32=Windows
HTTP_*=HTTP
IF_*=IF
IID_*=IID
IMAGE_*=IMAGE
IME_*=IME
INET_*=INET
IOCTL_*=IOCTL
IO_*=IO
IPROPNAME_*=IPROPNAME
IP_*=IP
JIFMK_*=JIFMK
JOB_*=JOB
LANG_*=LANG
LVM_*=LVM
LVS_*=LVS
MAX_*=MAX
META_*=META
MF_*=MF
MIXERCONTROL_*=MIXERCONTROL
MM_*=MM
NERR_*=NERR
NTE_*=NTE
PAN_*=PAN
PEER_*=PEER
PID_*=PID
PROCESSOR_*=PROCESSOR
PROCESS_*=PROCESS
PRODUCT_*=PRODUCT
REG_*=REG
RPC_*=RPC
SB_*=SB
SCARD_*=SCARD
SECURITY_*=SECURITY
SEC_*=SEC
SE_*=SE
SHTDN_*=SHTDN
SM_*=SM
SPAPI_*=SPAPI
SPI_*=SPI
SP_*=SP
SQLITE_*=SQLITE
STATUS_*=STATUS
STG_*=STG
STORAGE_*=STORAGE
SUBLANG_*=SUBLANG
TAPE_*=TAPE
TBS_*=TBS
TB_*=TB
TF_*=TF
TMT_*=TMT
TPM_*=TPM
TRANSACTION_*=TRANSACTION
TS_*=TS
TTM_*=TTM
TVM_*=TVM
TXFS_*=TXFS
URLACTION_*=URLACTION
UTC_*=UTC
VK_*=VK
VSCLASS_*=VSCLASS
WAVE_*=WAVE
WINCODEC_*=WINCODEC
WINHTTP_*=WINHTTP
WININET_*=WININET
WM_*=WM
WS_*=WS
XACT_*=XACT
59 changes: 54 additions & 5 deletions generation/remap-namespaces.rsp
Original file line number Diff line number Diff line change
@@ -1,91 +1,140 @@
--with-namespace
ALG=TerraFX.Interop.Windows
APPCOMMAND=TerraFX.Interop.Windows
AUDIO_STREAM_CATEGORY=TerraFX.Interop.Windows
BOOL=TerraFX.Interop.Windows
BitmapDescription=TerraFX.Interop.WinRT
BOOL=TerraFX.Interop.Windows
CALG=TerraFX.Interop.Windows
CERT=TerraFX.Interop.Windows
CERTSRV=TerraFX.Interop.Windows
CFSTR=TerraFX.Interop.Windows
CLSID=TerraFX.Interop.Windows
CMSG=TerraFX.Interop.Windows
CO=TerraFX.Interop.Windows
COMADMIN=TerraFX.Interop.Windows
CONTEXT=TerraFX.Interop.Windows
CRED=TerraFX.Interop.Windows
CRYPT=TerraFX.Interop.Windows
CRYPTNET=TerraFX.Interop.Windows
CSIDL=TerraFX.Interop.Windows
D2D1_PIXEL_FORMAT=TerraFX.Interop.DirectX
D3D12_RESOURCE_DESC=TerraFX.Interop.DirectX
DDCAPS_DX7=TerraFX.Interop.DirectX
DDCOLORKEY=TerraFX.Interop.DirectX
DDPIXELFORMAT=TerraFX.Interop.DirectX
DI=TerraFX.Interop.Windows
DISPID=TerraFX.Interop.Windows
DMPAPER=TerraFX.Interop.Windows
DNS=TerraFX.Interop.Windows
DOMAIN=TerraFX.Interop.Windows
DXGI_FORMAT=TerraFX.Interop.DirectX
DXGI_JPEG_QUANTIZATION_TABLE=TerraFX.Interop.DirectX
DXGI_RGBA=TerraFX.Interop.DirectX
E=TerraFX.Interop.Windows
EM=TerraFX.Interop.Windows
ERROR=TerraFX.Interop.Windows
EVENT=TerraFX.Interop.Windows
FACILITY=TerraFX.Interop.Windows
FAST=TerraFX.Interop.Windows
FILE=TerraFX.Interop.Windows
FLG=TerraFX.Interop.Windows
FSCTL=TerraFX.Interop.Windows
FVE=TerraFX.Interop.Windows
FWP=TerraFX.Interop.Windows
HANDLE=TerraFX.Interop.Windows
HID=TerraFX.Interop.Windows
HRESULT=TerraFX.Interop.Windows
HSTRING=TerraFX.Interop.WinRT
HSTRING_BUFFER=TerraFX.Interop.WinRT
HTTP=TerraFX.Interop.Windows
HWND=TerraFX.Interop.Windows
ID2D1Device=TerraFX.Interop.DirectX
ID2D1DeviceContext=TerraFX.Interop.DirectX
ID2D1Image=TerraFX.Interop.DirectX
ID3D12CommandQueue=TerraFX.Interop.DirectX
ID3D12Resource=TerraFX.Interop.DirectX
IDCompositionAnimation=TerraFX.Interop.DirectX
IDXGIDevice=TerraFX.Interop.DirectX
IDXGISwapChain=TerraFX.Interop.DirectX
IDirectDraw7=TerraFX.Interop.DirectX
IDirectDraw=TerraFX.Interop.DirectX
IDirectDrawSurface7=TerraFX.Interop.DirectX
IDXGIDevice=TerraFX.Interop.DirectX
IDXGISwapChain=TerraFX.Interop.DirectX
IF=TerraFX.Interop.Windows
IID=TerraFX.Interop.Windows
IInspectable=TerraFX.Interop.WinRT
IMAGE=TerraFX.Interop.Windows
IME=TerraFX.Interop.Windows
INET=TerraFX.Interop.Windows
InstanceHandle=TerraFX.Interop.WinRT
IO=TerraFX.Interop.Windows
IOCTL=TerraFX.Interop.Windows
IP=TerraFX.Interop.Windows
IPROPNAME=TerraFX.Interop.Windows
IUnknown=TerraFX.Interop.Windows
InstanceHandle=TerraFX.Interop.WinRT
JIFMK=TerraFX.Interop.Windows
JOB=TerraFX.Interop.Windows
LANG=TerraFX.Interop.Windows
LARGE_INTEGER=TerraFX.Interop.Windows
LUID=TerraFX.Interop.Windows
LVM=TerraFX.Interop.Windows
LVS=TerraFX.Interop.Windows
MAX=TerraFX.Interop.Windows
META=TerraFX.Interop.Windows
MF=TerraFX.Interop.Windows
MIXERCONTROL=TerraFX.Interop.Windows
MM=TerraFX.Interop.Windows
NERR=TerraFX.Interop.Windows
NativeInheritanceAttribute=TerraFX.Interop
NativeTypeNameAttribute=TerraFX.Interop
NERR=TerraFX.Interop.Windows
NTE=TerraFX.Interop.Windows
PAN=TerraFX.Interop.Windows
PEER=TerraFX.Interop.Windows
PID=TerraFX.Interop.Windows
POINT=TerraFX.Interop.Windows
PROCESS=TerraFX.Interop.Windows
PROCESSOR=TerraFX.Interop.Windows
PRODUCT=TerraFX.Interop.Windows
RECT=TerraFX.Interop.Windows
REG=TerraFX.Interop.Windows
RPC=TerraFX.Interop.Windows
SAFEARRAY=TerraFX.Interop.Windows
SB=TerraFX.Interop.Windows
SCARD=TerraFX.Interop.Windows
SE=TerraFX.Interop.Windows
SEC=TerraFX.Interop.Windows
SECURITY=TerraFX.Interop.Windows
SHTDN=TerraFX.Interop.Windows
SM=TerraFX.Interop.Windows
SP=TerraFX.Interop.Windows
SPAPI=TerraFX.Interop.Windows
SPI=TerraFX.Interop.Windows
SQLITE=TerraFX.Interop.Windows
STATUS=TerraFX.Interop.Windows
STG=TerraFX.Interop.Windows
STORAGE=TerraFX.Interop.Windows
SUBLANG=TerraFX.Interop.Windows
TAPE=TerraFX.Interop.Windows
TB=TerraFX.Interop.Windows
TBS=TerraFX.Interop.Windows
TF=TerraFX.Interop.Windows
TMT=TerraFX.Interop.Windows
TPM=TerraFX.Interop.Windows
TRANSACTION=TerraFX.Interop.Windows
TS=TerraFX.Interop.Windows
TTM=TerraFX.Interop.Windows
TVM=TerraFX.Interop.Windows
TXFS=TerraFX.Interop.Windows
URLACTION=TerraFX.Interop.Windows
UTC=TerraFX.Interop.Windows
VK=TerraFX.Interop.Windows
VSCLASS=TerraFX.Interop.Windows
VtblIndexAttribute=TerraFX.Interop
WAVE=TerraFX.Interop.Windows
WAVEFORMATEX=TerraFX.Interop.Windows
WINCODEC=TerraFX.Interop.Windows
Windows=TerraFX.Interop.Windows
WINHTTP=TerraFX.Interop.Windows
WININET=TerraFX.Interop.Windows
WM=TerraFX.Interop.Windows
WS=TerraFX.Interop.Windows
XACT=TerraFX.Interop.DirectX
3 changes: 0 additions & 3 deletions sources/Interop/Windows/DirectX/um/ddraw/DirectX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ public static unsafe partial class DirectX
[NativeTypeName("#define DD_ROP_SPACE (256/32)")]
public const int DD_ROP_SPACE = (256 / 32);

[NativeTypeName("#define MAX_DDDEVICEID_STRING 512")]
public const int MAX_DDDEVICEID_STRING = 512;

[NativeTypeName("#define DDGDI_GETHOSTIDENTIFIER 0x00000001L")]
public const int DDGDI_GETHOSTIDENTIFIER = 0x00000001;

Expand Down
15 changes: 15 additions & 0 deletions sources/Interop/Windows/DirectX/um/ddraw/MAX.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/ddraw.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

using TerraFX.Interop.DirectX;

namespace TerraFX.Interop.Windows
{
public static partial class MAX
{
[NativeTypeName("#define MAX_DDDEVICEID_STRING 512")]
public const int MAX_DDDEVICEID_STRING = 512;
}
}
15 changes: 15 additions & 0 deletions sources/Interop/Windows/WinRT/winrt/DocumentSource/JOB.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

using TerraFX.Interop.WinRT;

namespace TerraFX.Interop.Windows
{
public static partial class JOB
{
[NativeTypeName("#define JOB_PAGE_APPLICATION_DEFINED ( ( UINT32 )-1 )")]
public const uint JOB_PAGE_APPLICATION_DEFINED = unchecked((uint)(-1));
}
}
15 changes: 15 additions & 0 deletions sources/Interop/Windows/WinRT/winrt/roerrorapi/MAX.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from winrt/roerrorapi.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

using TerraFX.Interop.WinRT;

namespace TerraFX.Interop.Windows
{
public static partial class MAX
{
[NativeTypeName("#define MAX_ERROR_MESSAGE_CHARS 512")]
public const int MAX_ERROR_MESSAGE_CHARS = 512;
}
}
3 changes: 0 additions & 3 deletions sources/Interop/Windows/WinRT/winrt/roerrorapi/WinRT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ public static BOOL TransformError(HRESULT oldError, HRESULT newError, HSTRING me
[DllImport("combase", ExactSpelling = true)]
public static extern BOOL IsErrorPropagationEnabled();

[NativeTypeName("#define MAX_ERROR_MESSAGE_CHARS 512")]
public const int MAX_ERROR_MESSAGE_CHARS = 512;

[NativeTypeName("#define EXCEPTION_RO_ORIGINATEERROR ((DWORD)((0x1 << 30) | (FACILITY_WINDOWS << 16) | 0x201))")]
public const uint EXCEPTION_RO_ORIGINATEERROR = ((uint)((0x1 << 30) | (8 << 16) | 0x201));

Expand Down
16 changes: 16 additions & 0 deletions sources/Interop/Windows/Windows/shared/Iprtrmib/MAX.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from shared/Iprtrmib.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop.Windows
{
public static partial class MAX
{
[NativeTypeName("#define MAX_SCOPE_NAME_LEN 255")]
public const int MAX_SCOPE_NAME_LEN = 255;

[NativeTypeName("#define MAX_MIB_OFFSET 8")]
public const int MAX_MIB_OFFSET = 8;
}
}
6 changes: 0 additions & 6 deletions sources/Interop/Windows/Windows/shared/Iprtrmib/Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,5 @@ public static partial class Windows

[NativeTypeName("#define NUMBER_OF_EXPORTED_VARIABLES (TCP6_STATS + 1)")]
public const int NUMBER_OF_EXPORTED_VARIABLES = (((((((((((((((((((((((((((((((((((((((0 + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1);

[NativeTypeName("#define MAX_SCOPE_NAME_LEN 255")]
public const int MAX_SCOPE_NAME_LEN = 255;

[NativeTypeName("#define MAX_MIB_OFFSET 8")]
public const int MAX_MIB_OFFSET = 8;
}
}
16 changes: 16 additions & 0 deletions sources/Interop/Windows/Windows/shared/devpropdef/MAX.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from shared/devpropdef.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop.Windows
{
public static partial class MAX
{
[NativeTypeName("#define MAX_DEVPROP_TYPE 0x00000019")]
public const int MAX_DEVPROP_TYPE = 0x00000019;

[NativeTypeName("#define MAX_DEVPROP_TYPEMOD 0x00002000")]
public const int MAX_DEVPROP_TYPEMOD = 0x00002000;
}
}
6 changes: 0 additions & 6 deletions sources/Interop/Windows/Windows/shared/devpropdef/Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ public static partial class Windows
[NativeTypeName("#define DEVPROP_TYPE_STRING_INDIRECT 0x00000019")]
public const int DEVPROP_TYPE_STRING_INDIRECT = 0x00000019;

[NativeTypeName("#define MAX_DEVPROP_TYPE 0x00000019")]
public const int MAX_DEVPROP_TYPE = 0x00000019;

[NativeTypeName("#define MAX_DEVPROP_TYPEMOD 0x00002000")]
public const int MAX_DEVPROP_TYPEMOD = 0x00002000;

[NativeTypeName("#define DEVPROP_MASK_TYPE 0x00000FFF")]
public const int DEVPROP_MASK_TYPE = 0x00000FFF;

Expand Down
13 changes: 13 additions & 0 deletions sources/Interop/Windows/Windows/shared/ifmib/MAX.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from shared/ifmib.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop.Windows
{
public static partial class MAX
{
[NativeTypeName("#define MAX_INTERFACE_NAME_LEN 256")]
public const int MAX_INTERFACE_NAME_LEN = 256;
}
}
3 changes: 0 additions & 3 deletions sources/Interop/Windows/Windows/shared/ifmib/Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ public static partial class Windows

[NativeTypeName("#define MAXLEN_IFDESCR 256")]
public const int MAXLEN_IFDESCR = 256;

[NativeTypeName("#define MAX_INTERFACE_NAME_LEN 256")]
public const int MAX_INTERFACE_NAME_LEN = 256;
}
}
Loading

0 comments on commit 96956f8

Please sign in to comment.