Skip to content

Commit

Permalink
Initial support for GDI+ (#1679)
Browse files Browse the repository at this point in the history
* Initial support for GDI+

* GDI+ 1.1

* GDI+ startup/shutdown APIs
  • Loading branch information
riverar authored Aug 15, 2023
1 parent 284e875 commit 0c63f94
Show file tree
Hide file tree
Showing 5 changed files with 1,978 additions and 1 deletion.
20 changes: 20 additions & 0 deletions generation/WinSDK/Partitions/GdiPlus/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "intrinfix.h"
#include "windows.fixed.h"
#include <sdkddkver.h>

#include <ddraw.h>

#define GDIPVER 0x0110

#include <gdiplus.h>
#include <gdiplusinit.h>
#include <gdiplusenums.h>
#include <gdiplustypes.h>
#include <gdiplusmetaheader.h>
#include <gdipluspixelformats.h>
#include <gdipluscolor.h>
#include <gdipluscolormatrix.h>
#include <gdiplusimaging.h>
#include <gdiplusgpstubs.h>
#include <gdipluseffects.h>
#include <gdiplusflat.h>
16 changes: 16 additions & 0 deletions generation/WinSDK/Partitions/GdiPlus/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--traverse
<IncludeRoot>/um/gdiplusinit.h
<IncludeRoot>/um/gdipluscolor.h
<IncludeRoot>/um/gdipluscolormatrix.h
<IncludeRoot>/um/gdiplusenums.h
<IncludeRoot>/um/gdiplusgpstubs.h
<IncludeRoot>/um/gdiplusimaging.h
<IncludeRoot>/um/gdiplusmetaheader.h
<IncludeRoot>/um/gdipluspixelformats.h
<IncludeRoot>/um/gdiplustypes.h
<IncludeRoot>/um/gdipluseffects.h
<IncludeRoot>/um/gdiplusflat.h
--namespace
Windows.Win32.Graphics.GdiPlus
--exclude
PathData
2 changes: 1 addition & 1 deletion generation/WinSDK/Windows.Win32.proj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<ShowEmitWinmdOutputDetails>true</ShowEmitWinmdOutputDetails>

<!-- To regenerate this list; remove the property and the build will indicate what names can safely go here as a build optimization -->
<ExcludeFromCrossarch>ActiveDirectory;AllJoyn;Antimalware;ApplicationVerifier;Audio.Apo;Audio.DirectMusic;Audio.DirectSound;Audio.Endpoints;Authorization;Authorization.UI;Base;Bits;Bluetooth;Buses;CEIP;Certificates;Cloudapi;ClrHosting;ClrProfiling;CmpApi;Com;Com.CallObj;Com.ChannelCreds;Com.Events;Com.StructuredStorage;Com.Urlmon;Communication;ComOle;CompositionSwapchain;Console;Cos;Credentials;DataXchg;Debug.ActiveScript;Debug.Extensions;Debug.WebApp;Dedup;DeviceAccess;DeviceQuery;Devices.Properties;DevLic;Dhcp;Direct2D;Direct2D.Common;Direct3D;Direct3D10;Direct3D11;Direct3D11on12;Direct3D12;Direct3D9on12;Direct3DDxc;Direct3DFxc;DirectComp;DirectDraw;DirectManipulation;DirectML;DirectWrite;Dlna;DTC;Dwm;DXCore;Dxgi;Dxgi.Common;Eap;EapHost;Edp;Enstor;Environment;Etw;Fax;FileHistory;Foundation;Fs;Fsrm;FunctionDiscovery;GameMode;GamingDvcInfo;Gdi;Gpmc;HostComputeNetwork;HostComputeSystem;HtmlHelp;HttpServer;Hypervisor;Identity;IdentityProvider;Ifsk;Iis;ImagingDevice;IMapi;IndexSrv;Input_Ink;Input_IntContext;Input.Ime;InputRadial;InternetConnectionWizard;InternetExplorer;Intl;IO;Isolation;JobObjects;Kernel;KeyboardAndMouseInput;Ldap;LibraryLoader;Lwef;MachineLearning;MadCap;MagApi;Mapi;Mbn;MdmReg;Media;Media.DShow;Media.DShow.Xml;Media.DxMediaObjects;Memory;MessageQueuing;Mi;MixedReality;MixedRealityInterop;Mmc;Monitor;MsChap;MsCs;MsHtml;MsTv;MsXml;Multimedia;Ndf;Ndis;NetMgmt;NetShell;NetworkAccessProtection;Nla;Nps;NWifi;Of;Opc;OpenGL;P2p;Parcon;PicAcq;Pipes;Pla;Policy;Power;PrintTicket;Proc_Snap;ProjFs;Properties;PsApi1;PsApi2;PWM;Qos;Rdc;Rdp;RealTimeCommunications;Registry;RemoteAssist;Rm;Rpc;RstMgr;SecBitomet;Security;Security.AppLocker;Security.ConfigurationSnapin;Security.Cryptography;Security.Cryptography.Catalog;Security.Cryptography.Sip;Security.Cryptography.UI;Security.DiagnosticDataQuery;Security.DirectoryServices;Security.LicenseProtection;Security.Tpm;Security.WinTrust;Security.WinWlx;SecurityCenter;Sens;SerPorts;Services;Setup;Shell.Common;Shutdown;SideShow;Smi;Speech;Sr;Storage.Nvme;SwDevice;SystemInformation;Tablet;Tapi3;TaskSchd;Tbs;Tcui;TermServ;Threading;Time;ToolHelp;TransactionServer;Tsf;Ual;UiAnimation;UpdateAssessment;Upnp;Variant;Vhd;VirtualDiskService;VSS;Wab;Wcm;Wcn;Wcs;Wds;WebDav;WebServicesOnDevices;WebSock;Wec;Wer;Wes;Wia;Wibe;Wic;Win32_Tile_Badge_Notif;WinAuto;WinContacts;WindowsConnectionManager;WindowsFilteringPlatform;WindowsFirewall;WindowsRibbon;WindowsSetupAndMigration;WinInet;WinLocation;WinRm;WinRT;WinRT.AllJoyn;WinRT.Composition;WinRT.CoreInputView;WinRT.Direct2D;WinRT.Direct3D11;WinRT.Display;WinRT.Graphics.Capture;WinRT.Graphics.Imaging;WinRT.Holographic;WinRT.Isolation;WinRT.Media;WinRT.ML;WinRT.Pdf;WinRT.Printing;WinRT.Storage;WinRT.Xaml;WinSat;WinSensors;WinSync;WinTouch;Wmdm;WmFormat;Wmi;Wmlss;Wmp;Wnet;wnv;WpdSdk;Wsb;Wsl;Wsw;Wua;Xaml_Diagnostics;Xaudio2;Xblidp;Xinput;XmlLite;Xps;XpsPrinting</ExcludeFromCrossarch>
<ExcludeFromCrossarch>ActiveDirectory;AllJoyn;Antimalware;ApplicationVerifier;Audio.Apo;Audio.DirectMusic;Audio.DirectSound;Audio.Endpoints;Authorization;Authorization.UI;Base;Bits;Bluetooth;Buses;CEIP;Certificates;Cloudapi;ClrHosting;ClrProfiling;CmpApi;Com;Com.CallObj;Com.ChannelCreds;Com.Events;Com.StructuredStorage;Com.Urlmon;Communication;ComOle;CompositionSwapchain;Console;Cos;Credentials;DataXchg;Debug.ActiveScript;Debug.Extensions;Debug.WebApp;Dedup;DeviceAccess;DeviceQuery;Devices.Properties;DevLic;Dhcp;Direct2D;Direct2D.Common;Direct3D;Direct3D10;Direct3D11;Direct3D11on12;Direct3D12;Direct3D9on12;Direct3DDxc;Direct3DFxc;DirectComp;DirectDraw;DirectManipulation;DirectML;DirectWrite;Dlna;DTC;Dwm;DXCore;Dxgi;Dxgi.Common;Eap;EapHost;Edp;Enstor;Environment;Etw;Fax;FileHistory;Foundation;Fs;Fsrm;FunctionDiscovery;GameMode;GamingDvcInfo;Gdi;Gdiplus;Gpmc;HostComputeNetwork;HostComputeSystem;HtmlHelp;HttpServer;Hypervisor;Identity;IdentityProvider;Ifsk;Iis;ImagingDevice;IMapi;IndexSrv;Input_Ink;Input_IntContext;Input.Ime;InputRadial;InternetConnectionWizard;InternetExplorer;Intl;IO;Isolation;JobObjects;Kernel;KeyboardAndMouseInput;Ldap;LibraryLoader;Lwef;MachineLearning;MadCap;MagApi;Mapi;Mbn;MdmReg;Media;Media.DShow;Media.DShow.Xml;Media.DxMediaObjects;Memory;MessageQueuing;Mi;MixedReality;MixedRealityInterop;Mmc;Monitor;MsChap;MsCs;MsHtml;MsTv;MsXml;Multimedia;Ndf;Ndis;NetMgmt;NetShell;NetworkAccessProtection;Nla;Nps;NWifi;Of;Opc;OpenGL;P2p;Parcon;PicAcq;Pipes;Pla;Policy;Power;PrintTicket;Proc_Snap;ProjFs;Properties;PsApi1;PsApi2;PWM;Qos;Rdc;Rdp;RealTimeCommunications;Registry;RemoteAssist;Rm;Rpc;RstMgr;SecBitomet;Security;Security.AppLocker;Security.ConfigurationSnapin;Security.Cryptography;Security.Cryptography.Catalog;Security.Cryptography.Sip;Security.Cryptography.UI;Security.DiagnosticDataQuery;Security.DirectoryServices;Security.LicenseProtection;Security.Tpm;Security.WinTrust;Security.WinWlx;SecurityCenter;Sens;SerPorts;Services;Setup;Shell.Common;Shutdown;SideShow;Smi;Speech;Sr;Storage.Nvme;SwDevice;SystemInformation;Tablet;Tapi3;TaskSchd;Tbs;Tcui;TermServ;Threading;Time;ToolHelp;TransactionServer;Tsf;Ual;UiAnimation;UpdateAssessment;Upnp;Variant;Vhd;VirtualDiskService;VSS;Wab;Wcm;Wcn;Wcs;Wds;WebDav;WebServicesOnDevices;WebSock;Wec;Wer;Wes;Wia;Wibe;Wic;Win32_Tile_Badge_Notif;WinAuto;WinContacts;WindowsConnectionManager;WindowsFilteringPlatform;WindowsFirewall;WindowsRibbon;WindowsSetupAndMigration;WinInet;WinLocation;WinRm;WinRT;WinRT.AllJoyn;WinRT.Composition;WinRT.CoreInputView;WinRT.Direct2D;WinRT.Direct3D11;WinRT.Display;WinRT.Graphics.Capture;WinRT.Graphics.Imaging;WinRT.Holographic;WinRT.Isolation;WinRT.Media;WinRT.ML;WinRT.Pdf;WinRT.Printing;WinRT.Storage;WinRT.Xaml;WinSat;WinSensors;WinSync;WinTouch;Wmdm;WmFormat;Wmi;Wmlss;Wmp;Wnet;wnv;WpdSdk;Wsb;Wsl;Wsw;Wua;Xaml_Diagnostics;Xaudio2;Xblidp;Xinput;XmlLite;Xps;XpsPrinting</ExcludeFromCrossarch>

<!-- Set to false because the WinSDK assets are already in this project -->
<UseWinSDKAssets>false</UseWinSDKAssets>
Expand Down
169 changes: 169 additions & 0 deletions generation/WinSDK/manual/GdiPlus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
using System;
using System.Runtime.InteropServices;

using Windows.Win32.Foundation.Metadata;

namespace Windows.Win32.Graphics.GdiPlus
{
[NativeTypedef]
public unsafe partial struct PathData
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpGraphics
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpBrush
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpTexture
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpSolidFill
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpLineGradient
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpPathGradient
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpHatch
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpPen
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpCustomLineCap
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpAdjustableArrowCap
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpImage
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpBitmap
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpMetafile
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpImageAttributes
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpPath
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpRegion
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpPathIterator
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpFontFamily
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpFont
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpStringFormat
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpFontCollection
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpInstalledFontCollection
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpPrivateFontCollection
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct GpCachedBitmap
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct CGpEffect
{
public IntPtr Value;
}

[NativeTypedef]
public unsafe partial struct Matrix
{
public IntPtr Value;
}
}
Loading

0 comments on commit 0c63f94

Please sign in to comment.