150 references to IFont
System.Windows.Forms (16)
System\Windows\Forms\ActiveX\AxHost.cs (7)
3652
IFont
* ifont = GetIFontPointerFromFont(font);
3669
private protected static
IFont
* GetIFontPointerFromFont(Font? font)
3685
HRESULT hr = PInvoke.OleCreateFontIndirect(in fontDesc, in IID.GetRef<
IFont
>(), out void* lplpvObj);
3688
return (
IFont
*)lplpvObj;
3706
IFont
.Interface oleFont = (
IFont
.Interface)font;
3756
if (font is
IFont
.Interface ifont)
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (2)
51
in IID.GetRef<
IFont
>(),
60
using var nativeFont = ComScope<
IFont
>.TryQueryFrom((IUnknown*)pObj, out HRESULT hr);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
211
using var font = ComScope<
IFont
>.TryQueryFrom(value.data.punkVal, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2DataTypeToManagedDataTypeConverter.cs (2)
31
/// properties of an <see cref="
IFont
"/> without actually changing the <see cref="
IFont
"/> instance.
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (3)
31
using var iFont = ComScope<
IFont
>.TryQueryFrom((IUnknown*)nativeValue, out HRESULT hr);
86
using var font = ComScope<
IFont
>.TryQueryFrom((IUnknown*)nativeValue, out HRESULT hr);
106
private static void ApplyFontSettings(Font source,
IFont
* target, out bool targetChanged)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
114
else if (guid.Equals(IID.GetRef<IFontDisp>()) || guid.Equals(IID.GetRef<
IFont
>()))
System.Windows.Forms.Primitives (120)
Windows.Win32.IFont.g.cs (117)
26
:IVTable<
IFont
,
IFont
.Vtbl>,IComIID {
42
return ((delegate *unmanaged [Stdcall]<
IFont
*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((
IFont
*)Unsafe.AsPointer(ref this), riid, ppvObject);
47
return ((delegate *unmanaged [Stdcall]<
IFont
*,uint>)lpVtbl[1])((
IFont
*)Unsafe.AsPointer(ref this));
52
return ((delegate *unmanaged [Stdcall]<
IFont
*,uint>)lpVtbl[2])((
IFont
*)Unsafe.AsPointer(ref this));
58
private static winmdroot.Foundation.HRESULT get_Name(
IFont
* pThis, winmdroot.Foundation.BSTR* pName)
89
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
94
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
101
private static winmdroot.Foundation.HRESULT put_Name(
IFont
* pThis, winmdroot.Foundation.BSTR name)
122
private static winmdroot.Foundation.HRESULT get_Size(
IFont
* pThis, winmdroot.System.Com.CY* pSize)
153
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Com.CY* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
158
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Com.CY ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
165
private static winmdroot.Foundation.HRESULT put_Size(
IFont
* pThis, winmdroot.System.Com.CY size)
186
private static winmdroot.Foundation.HRESULT get_Bold(
IFont
* pThis, winmdroot.Foundation.BOOL* pBold)
217
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
222
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
229
private static winmdroot.Foundation.HRESULT put_Bold(
IFont
* pThis, winmdroot.Foundation.BOOL bold)
250
private static winmdroot.Foundation.HRESULT get_Italic(
IFont
* pThis, winmdroot.Foundation.BOOL* pItalic)
281
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
286
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
293
private static winmdroot.Foundation.HRESULT put_Italic(
IFont
* pThis, winmdroot.Foundation.BOOL italic)
314
private static winmdroot.Foundation.HRESULT get_Underline(
IFont
* pThis, winmdroot.Foundation.BOOL* pUnderline)
345
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
350
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
357
private static winmdroot.Foundation.HRESULT put_Underline(
IFont
* pThis, winmdroot.Foundation.BOOL underline)
378
private static winmdroot.Foundation.HRESULT get_Strikethrough(
IFont
* pThis, winmdroot.Foundation.BOOL* pStrikethrough)
409
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
414
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
421
private static winmdroot.Foundation.HRESULT put_Strikethrough(
IFont
* pThis, winmdroot.Foundation.BOOL strikethrough)
442
private static winmdroot.Foundation.HRESULT get_Weight(
IFont
* pThis, short* pWeight)
473
((delegate *unmanaged [Stdcall]<
IFont
*,short* ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
478
((delegate *unmanaged [Stdcall]<
IFont
*,short ,winmdroot.Foundation.HRESULT>)lpVtbl[16])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
485
private static winmdroot.Foundation.HRESULT put_Weight(
IFont
* pThis, short weight)
506
private static winmdroot.Foundation.HRESULT get_Charset(
IFont
* pThis, short* pCharset)
537
((delegate *unmanaged [Stdcall]<
IFont
*,short* ,winmdroot.Foundation.HRESULT>)lpVtbl[17])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
542
((delegate *unmanaged [Stdcall]<
IFont
*,short ,winmdroot.Foundation.HRESULT>)lpVtbl[18])((
IFont
*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
549
private static winmdroot.Foundation.HRESULT put_Charset(
IFont
* pThis, short charset)
570
private static winmdroot.Foundation.HRESULT get_hFont(
IFont
* pThis, winmdroot.Graphics.Gdi.HFONT* phFont)
602
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT>)lpVtbl[19])((
IFont
*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
610
private static winmdroot.Foundation.HRESULT Clone(
IFont
* pThis, winmdroot.System.Ole.
IFont
** ppFont)
640
public unsafe void Clone(winmdroot.System.Ole.
IFont
** ppFont)
642
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Ole.
IFont
** ,winmdroot.Foundation.HRESULT>)lpVtbl[20])((
IFont
*)Unsafe.AsPointer(ref this), ppFont).ThrowOnFailure();
648
private static winmdroot.Foundation.HRESULT IsEqual(
IFont
* pThis, winmdroot.System.Ole.
IFont
* pFontOther)
674
public unsafe void IsEqual(winmdroot.System.Ole.
IFont
* pFontOther)
676
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Ole.
IFont
* ,winmdroot.Foundation.HRESULT>)lpVtbl[21])((
IFont
*)Unsafe.AsPointer(ref this), pFontOther).ThrowOnFailure();
682
private static winmdroot.Foundation.HRESULT SetRatio(
IFont
* pThis, int cyLogical, int cyHimetric)
708
((delegate *unmanaged [Stdcall]<
IFont
*,int ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[22])((
IFont
*)Unsafe.AsPointer(ref this), cyLogical, cyHimetric).ThrowOnFailure();
723
private static winmdroot.Foundation.HRESULT QueryTextMetrics(
IFont
* pThis, winmdroot.Graphics.Gdi.TEXTMETRICW* pTM)
755
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.TEXTMETRICW* ,winmdroot.Foundation.HRESULT>)lpVtbl[23])((
IFont
*)Unsafe.AsPointer(ref this), pTM).ThrowOnFailure();
761
private static winmdroot.Foundation.HRESULT AddRefHfont(
IFont
* pThis, winmdroot.Graphics.Gdi.HFONT hFont)
789
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[24])((
IFont
*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure();
795
private static winmdroot.Foundation.HRESULT ReleaseHfont(
IFont
* pThis, winmdroot.Graphics.Gdi.HFONT hFont)
826
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[25])((
IFont
*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure();
832
private static winmdroot.Foundation.HRESULT SetHdc(
IFont
* pThis, winmdroot.Graphics.Gdi.HDC hDC)
861
((delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT>)lpVtbl[26])((
IFont
*)Unsafe.AsPointer(ref this), hDC).ThrowOnFailure();
885
internal delegate *unmanaged [Stdcall]<
IFont
*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
887
internal delegate *unmanaged [Stdcall]<
IFont
*,uint> AddRef_2;
889
internal delegate *unmanaged [Stdcall]<
IFont
*,uint> Release_3;
891
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> get_Name_4;
893
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT> put_Name_5;
895
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Com.CY* ,winmdroot.Foundation.HRESULT> get_Size_6;
897
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Com.CY ,winmdroot.Foundation.HRESULT> put_Size_7;
899
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Bold_8;
901
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Bold_9;
903
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Italic_10;
905
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Italic_11;
907
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Underline_12;
909
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Underline_13;
911
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Strikethrough_14;
913
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Strikethrough_15;
915
internal delegate *unmanaged [Stdcall]<
IFont
*,short* ,winmdroot.Foundation.HRESULT> get_Weight_16;
917
internal delegate *unmanaged [Stdcall]<
IFont
*,short ,winmdroot.Foundation.HRESULT> put_Weight_17;
919
internal delegate *unmanaged [Stdcall]<
IFont
*,short* ,winmdroot.Foundation.HRESULT> get_Charset_18;
921
internal delegate *unmanaged [Stdcall]<
IFont
*,short ,winmdroot.Foundation.HRESULT> put_Charset_19;
923
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT> get_hFont_20;
925
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Ole.
IFont
** ,winmdroot.Foundation.HRESULT> Clone_21;
927
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.System.Ole.
IFont
* ,winmdroot.Foundation.HRESULT> IsEqual_22;
929
internal delegate *unmanaged [Stdcall]<
IFont
*,int ,int ,winmdroot.Foundation.HRESULT> SetRatio_23;
931
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.TEXTMETRICW* ,winmdroot.Foundation.HRESULT> QueryTextMetrics_24;
933
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> AddRefHfont_25;
935
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> ReleaseHfont_26;
937
internal delegate *unmanaged [Stdcall]<
IFont
*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT> SetHdc_27;
1040
unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.System.Ole.
IFont
** ppFont);
1043
unsafe winmdroot.Foundation.HRESULT IsEqual(winmdroot.System.Ole.
IFont
* pFontOther);
Windows.Win32.QACONTAINER.g.cs (1)
51
internal unsafe winmdroot.System.Ole.
IFont
* pFont;
Windows.Win32.System_Ole_IFont_Extensions.g.cs (2)
23
/// <inheritdoc cref="winmdroot.System.Ole.
IFont
.Interface.QueryTextMetrics(winmdroot.Graphics.Gdi.TEXTMETRICW*)"/>
24
internal static unsafe winmdroot.Foundation.HRESULT QueryTextMetrics(this winmdroot.System.Ole.
IFont
.Interface @this, out winmdroot.Graphics.Gdi.TEXTMETRICW pTM)
System.Windows.Forms.Tests (14)
System\Windows\Forms\AxHostTests.cs (8)
1450
IFont
.Interface iFont = (
IFont
.Interface)disp;
1480
IFont
.Interface iFont = (
IFont
.Interface)disp;
1525
IFont
.Interface iFont = (
IFont
.Interface)SubAxHost.GetIFontFromFont(font);
1547
IFont
.Interface iFont = (
IFont
.Interface)SubAxHost.GetIFontFromFont(font);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (4)
36
using ComScope<
IFont
> iFont = new(null);
37
PInvoke.OleCreateFontIndirect(&fontDesc, IID.Get<
IFont
>(), iFont).ThrowOnFailure();
68
using ComScope<
IFont
> iFont = new(null);
69
PInvoke.OleCreateFontIndirect(&fontDesc, IID.Get<
IFont
>(), iFont).ThrowOnFailure();
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (2)
23
using ComScope<
IFont
> iFont = new((
IFont
*)native);