Skip to content

Commit 84569fd

Browse files
committed
gdiplus.go: add syscall stubs for moving HICONs in and out of GDI+
We need this so that we don't lose icon transparency information when converting between data types. Updates tailscale/corp#10373 Signed-off-by: Aaron Klotz <[email protected]>
1 parent 877ee12 commit 84569fd

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

gdiplus.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,13 @@ func GdipCreateFont(fontFamily *GpFontFamily, emSize float32, style FontStyle, u
344344
//sys GdipCreateBitmapFromFile(filename *uint16, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromFile
345345
//sys GdipCreateBitmapFromGraphics(width int32, height int32, graphics *GpGraphics, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromGraphics
346346
//sys GdipCreateBitmapFromHBITMAP(hbm HBITMAP, hpal HPALETTE, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromHBITMAP
347+
//sys GdipCreateBitmapFromHICON(hicon HICON, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromHICON
347348
//sys GdipCreateBitmapFromScan0(width int32, height int32, stride int32, format PixelFormat, scan0 *byte, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromScan0
348349
//sys GdipCreateBitmapFromStream(stream *com.IStreamABI, bitmap **GpBitmap) (ret GpStatus) = gdiplus.GdipCreateBitmapFromStream
349350
//sys GdipCreateFontFamilyFromName(name *uint16, collection *GpFontCollection, family **GpFontFamily) (ret GpStatus) = gdiplus.GdipCreateFontFamilyFromName
350351
//sys GdipCreateFromHDC(hdc HDC, graphics **GpGraphics) (ret GpStatus) = gdiplus.GdipCreateFromHDC
351352
//sys GdipCreateHBITMAPFromBitmap(bitmap *GpBitmap, hbmReturn *HBITMAP, background ARGB) (ret GpStatus) = gdiplus.GdipCreateHBITMAPFromBitmap
353+
//sys GdipCreateHICONFromBitmap(bitmap *GpBitmap, hbmReturn *HICON) (ret GpStatus) = gdiplus.GdipCreateHICONFromBitmap
352354
//sys GdipCreatePath(fillMode FillMode, path **GpPath) (ret GpStatus) = gdiplus.GdipCreatePath
353355
//sys GdipCreateSolidFill(color ARGB, brush **GpSolidFill) (ret GpStatus) = gdiplus.GdipCreateSolidFill
354356
//sys GdipCreateStringFormat(flags StringFormatFlags, language LANGID, format **GpStringFormat) (ret GpStatus) = gdiplus.GdipCreateStringFormat

zsyscall_windows.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)