Skip to content

Commit

Permalink
Adding WIC
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Sep 22, 2023
1 parent 647e73d commit 8cf1aac
Show file tree
Hide file tree
Showing 296 changed files with 172,965 additions and 2,551 deletions.
Binary file added build/cache/wic.json.gz
Binary file not shown.
Binary file modified build/cache/win32extras.json.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions build/include/silk.net.windowscodecs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
typedef unsigned int UINT32;
typedef float FLOAT;

#include <Windows.h>
#include <dcommon.h>
#include <wincodec.h>
#include <wincodecsdk.h>
117 changes: 114 additions & 3 deletions generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@
"$windowsSdkDir/Include/$windowsSdkVersion/um/handleapi.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/fileapi.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/objidlbase.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/objidl.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/Documenttarget.h",
"$windowsSdkDir/Include/$windowsSdkVersion/shared/evntprov.h"
],
Expand All @@ -1028,7 +1029,11 @@
}
},
"exclude": [
"_SECURITY_ATTRIBUTES"
"_SECURITY_ATTRIBUTES",
"_STGMEDIUM_UNION",
"_GDI_OBJECT",
"__MIDL_IAdviseSink_0002",
"__MIDL_IAdviseSink_0003"
],
"rename": {
"ETW_COMPRESSION_RESUMPTION_MODE": "EtwCompressionResumptionMode",
Expand Down Expand Up @@ -1073,7 +1078,10 @@
"tagCY": "CY",
"tagDEC": "TagDecimal",
"tagSAFEARRAYBOUND": "SafeArrayBound",
"PfnTagEXCEPINFOvI": "PfnExceptionInfovI"
"PfnTagEXCEPINFOvI": "PfnExceptionInfovI",
"HICON__": "void",
"HBITMAP__": "void",
"HTASK__": "void"
},
{
"$include.dxTypemap": "build/dx_typemap.json",
Expand Down Expand Up @@ -1531,6 +1539,109 @@
}
]
},
{
"profileName": "WindowsCodecs",
"sources": [
"build/include/silk.net.windowscodecs.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/wincodec.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/wincodecsdk.h"
],
"mode": "Clang",
"cacheDir": "build/cache",
"cacheKey": "wic",
"controlDescriptors": [
"convert-windows-only",
"typemap-native",
"no-pre-2.17-obsolete-enums",
"no-csproj",
"no-extra-dir"
],
"converter": {},
"prefix": "WIC_",
"clang": {
"args": [
"--language=c++",
"--std=c++17",
"-m32",
"-Wno-expansion-to-defined",
"-Wno-ignored-attributes",
"-Wno-ignored-pragma-intrinsic",
"-Wno-nonportable-include-path",
"-Wno-pragma-pack",
"-I$windowsSdkIncludes",
"-Ibuild/include"
],
"traverse": [
"$windowsSdkDir/Include/$windowsSdkVersion/um/wincodec.h",
"$windowsSdkDir/Include/$windowsSdkVersion/um/wincodecsdk.h"
],
"classes": {
"silk.net.windowscodecs.h": "[Core]WindowsCodecs",
"wincodec.h": "[Core]WindowsCodecs",
"wincodecsdk.h": "[Core]WindowsCodecs",
"wincodec_proxy.h": "[Core]WindowsCodecs"
}
},
"exclude": [
"ID2D1Device",
"ID2D1Image"
],
"rename": {},
"bakery": {
"profileNames": [
"silk.net.windowscodecs",
"windowscodecs"
]
},
"output": {
"mode": "Default",
"path": "src/Microsoft/Silk.NET.Direct2D",
"innerPath": "WindowsCodecs",
"licenseFile": "build/LICENSE_HEADER.txt",
"props": "build/props/bindings.props"
},
"namespace": "Silk.NET.WindowsCodecs",
"extensionsNamespace": "Silk.NET.WindowsCodecs.Extensions",
"nameContainer": {
"linux-x64": "libwindowscodecs.so",
"win-x64": "windowscodecs.dll",
"win-x86": "windowscodecs.dll",
"osx-x64": "libwindowscodecs.dylib",
"android": "libwindowscodecs.so",
"iOS": "__Internal",
"className": "WICLibraryNameContainer"
},
"typeMaps": [
{
"ID2D1Device": "Silk.NET.Direct2D.ID2D1Device",
"ID2D1Image": "Silk.NET.Direct2D.ID2D1Image",
"D2D1_PIXEL_FORMAT": "Silk.NET.Direct2D.PixelFormat",
"DXGI_JPEG_QUANTIZATION_TABLE": "Silk.NET.DXGI.JpegQuantizationTable",
"DXGI_JPEG_AC_HUFFMAN_TABLE": "Silk.NET.DXGI.JpegACHuffmanTable",
"DXGI_JPEG_DC_HUFFMAN_TABLE": "Silk.NET.DXGI.JpegDCHuffmanTable",
"DXGI_FORMAT": "Silk.NET.DXGI.Format",
"_RPC_MESSAGE": "Silk.NET.Core.Win32Extras.RPCMessage",
"IRpcStubBuffer": "Silk.NET.Core.Win32Extras.IRpcStubBuffer",
"IRpcChannelBuffer": "Silk.NET.Core.Win32Extras.IRpcChannelBuffer",
"ISequentialStream": "Silk.NET.Core.Win32Extras.ISequentialStream",
"IPersist": "Silk.NET.Core.Win32Extras.IPersist",
"IPersistStream": "Silk.NET.Core.Win32Extras.IPersistStream",
"IPropertyBag2": "Silk.NET.Core.Native.IUnknown",
"IEnumUnknown": "Silk.NET.Core.Win32Extras.IEnumUnknown",
"IEnumString": "Silk.NET.Core.Win32Extras.IEnumString",
"tagSAFEARRAY": "Silk.NET.Core.Win32Extras.SafeArray",
"tagSTATSTG": "Silk.NET.Core.Win32Extras.STATSTG",
"tagPROPVARIANT": "void",
"tagPROPBAG2": "void",
"HPALETTE__": "void",
"HBITMAP__": "void",
"HICON__": "void"
},
{
"$include.commonTypeMap": "build/csharp_typemap.json"
}
]
},
{
"profileName": "D3D11",
"sources": [
Expand Down Expand Up @@ -2757,4 +2868,4 @@
]
}
]
}
}
54 changes: 54 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagADVF.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[Flags]
[NativeName("Name", "tagADVF")]
public enum TagADVF : int
{
[NativeName("Name", "")]
None = 0,
[Obsolete("Deprecated in favour of \"Nodata\"")]
[NativeName("Name", "ADVF_NODATA")]
AdvfNodata = 0x1,
[Obsolete("Deprecated in favour of \"Primefirst\"")]
[NativeName("Name", "ADVF_PRIMEFIRST")]
AdvfPrimefirst = 0x2,
[Obsolete("Deprecated in favour of \"Onlyonce\"")]
[NativeName("Name", "ADVF_ONLYONCE")]
AdvfOnlyonce = 0x4,
[Obsolete("Deprecated in favour of \"Dataonstop\"")]
[NativeName("Name", "ADVF_DATAONSTOP")]
AdvfDataonstop = 0x40,
[Obsolete("Deprecated in favour of \"AcheNohandler\"")]
[NativeName("Name", "ADVFCACHE_NOHANDLER")]
AdvfcacheNohandler = 0x8,
[Obsolete("Deprecated in favour of \"AcheForcebuiltin\"")]
[NativeName("Name", "ADVFCACHE_FORCEBUILTIN")]
AdvfcacheForcebuiltin = 0x10,
[Obsolete("Deprecated in favour of \"AcheOnsave\"")]
[NativeName("Name", "ADVFCACHE_ONSAVE")]
AdvfcacheOnsave = 0x20,
[NativeName("Name", "ADVF_NODATA")]
Nodata = 0x1,
[NativeName("Name", "ADVF_PRIMEFIRST")]
Primefirst = 0x2,
[NativeName("Name", "ADVF_ONLYONCE")]
Onlyonce = 0x4,
[NativeName("Name", "ADVF_DATAONSTOP")]
Dataonstop = 0x40,
[NativeName("Name", "ADVFCACHE_NOHANDLER")]
AcheNohandler = 0x8,
[NativeName("Name", "ADVFCACHE_FORCEBUILTIN")]
AcheForcebuiltin = 0x10,
[NativeName("Name", "ADVFCACHE_ONSAVE")]
AcheOnsave = 0x20,
}
}
20 changes: 20 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagApplicationType.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[NativeName("Name", "tagApplicationType")]
public enum TagApplicationType : int
{
[NativeName("Name", "ServerApplication")]
ServerApplication = 0x0,
[NativeName("Name", "LibraryApplication")]
LibraryApplication = 0x1,
}
}
26 changes: 26 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagBINDFLAGS.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[NativeName("Name", "tagBIND_FLAGS")]
public enum TagBINDFLAGS : int
{
[Obsolete("Deprecated in favour of \"Maybotheruser\"")]
[NativeName("Name", "BIND_MAYBOTHERUSER")]
BindMaybotheruser = 0x1,
[Obsolete("Deprecated in favour of \"Justtestexistence\"")]
[NativeName("Name", "BIND_JUSTTESTEXISTENCE")]
BindJusttestexistence = 0x2,
[NativeName("Name", "BIND_MAYBOTHERUSER")]
Maybotheruser = 0x1,
[NativeName("Name", "BIND_JUSTTESTEXISTENCE")]
Justtestexistence = 0x2,
}
}
41 changes: 41 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagCALLTYPE.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[NativeName("Name", "tagCALLTYPE")]
public enum TagCALLTYPE : int
{
[Obsolete("Deprecated in favour of \"Toplevel\"")]
[NativeName("Name", "CALLTYPE_TOPLEVEL")]
CalltypeToplevel = 0x1,
[Obsolete("Deprecated in favour of \"Nested\"")]
[NativeName("Name", "CALLTYPE_NESTED")]
CalltypeNested = 0x2,
[Obsolete("Deprecated in favour of \"Async\"")]
[NativeName("Name", "CALLTYPE_ASYNC")]
CalltypeAsync = 0x3,
[Obsolete("Deprecated in favour of \"ToplevelCallpending\"")]
[NativeName("Name", "CALLTYPE_TOPLEVEL_CALLPENDING")]
CalltypeToplevelCallpending = 0x4,
[Obsolete("Deprecated in favour of \"AsyncCallpending\"")]
[NativeName("Name", "CALLTYPE_ASYNC_CALLPENDING")]
CalltypeAsyncCallpending = 0x5,
[NativeName("Name", "CALLTYPE_TOPLEVEL")]
Toplevel = 0x1,
[NativeName("Name", "CALLTYPE_NESTED")]
Nested = 0x2,
[NativeName("Name", "CALLTYPE_ASYNC")]
Async = 0x3,
[NativeName("Name", "CALLTYPE_TOPLEVEL_CALLPENDING")]
ToplevelCallpending = 0x4,
[NativeName("Name", "CALLTYPE_ASYNC_CALLPENDING")]
AsyncCallpending = 0x5,
}
}
26 changes: 26 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagDATADIR.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[NativeName("Name", "tagDATADIR")]
public enum TagDATADIR : int
{
[Obsolete("Deprecated in favour of \"Get\"")]
[NativeName("Name", "DATADIR_GET")]
DatadirGet = 0x1,
[Obsolete("Deprecated in favour of \"Set\"")]
[NativeName("Name", "DATADIR_SET")]
DatadirSet = 0x2,
[NativeName("Name", "DATADIR_GET")]
Get = 0x1,
[NativeName("Name", "DATADIR_SET")]
Set = 0x2,
}
}
37 changes: 37 additions & 0 deletions src/Core/Silk.NET.Core.Win32Extras/Enums/TagMKREDUCE.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
[Flags]
[NativeName("Name", "tagMKREDUCE")]
public enum TagMKREDUCE : int
{
[Obsolete("Deprecated in favour of \"One\"")]
[NativeName("Name", "MKRREDUCE_ONE")]
MkrreduceOne = 0x30000,
[Obsolete("Deprecated in favour of \"Touser\"")]
[NativeName("Name", "MKRREDUCE_TOUSER")]
MkrreduceTouser = 0x20000,
[Obsolete("Deprecated in favour of \"Throughuser\"")]
[NativeName("Name", "MKRREDUCE_THROUGHUSER")]
MkrreduceThroughuser = 0x10000,
[Obsolete("Deprecated in favour of \"All\"")]
[NativeName("Name", "MKRREDUCE_ALL")]
MkrreduceAll = 0x0,
[NativeName("Name", "MKRREDUCE_ONE")]
One = 0x30000,
[NativeName("Name", "MKRREDUCE_TOUSER")]
Touser = 0x20000,
[NativeName("Name", "MKRREDUCE_THROUGHUSER")]
Throughuser = 0x10000,
[NativeName("Name", "MKRREDUCE_ALL")]
All = 0x0,
}
}
Loading

0 comments on commit 8cf1aac

Please sign in to comment.