126 references to IntNativeMethods
System.Windows.Forms (126)
misc\GDI\DeviceContext.cs (6)
181
hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC),
IntNativeMethods
.OBJ_PEN);
182
hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC),
IntNativeMethods
.OBJ_BRUSH);
183
hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC),
IntNativeMethods
.OBJ_BITMAP);
184
hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC),
IntNativeMethods
.OBJ_FONT);
648
IntNativeMethods
.POINT orgn = new
IntNativeMethods
.POINT();
misc\GDI\DeviceContext2.cs (9)
239
IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC),
IntNativeMethods
.OBJ_FONT);
444
IntNativeMethods
.SIZE size = new
IntNativeMethods
.SIZE();
460
IntNativeMethods
.SIZE oldExtent = new
IntNativeMethods
.SIZE();
474
IntNativeMethods
.POINT point = new
IntNativeMethods
.POINT();
490
IntNativeMethods
.POINT oldOrigin = new
IntNativeMethods
.POINT();
misc\GDI\MeasurementDCInfo.cs (4)
63
internal static
IntNativeMethods
.DRAWTEXTPARAMS GetTextMargins(WindowsGraphics wg, WindowsFont font) {
71
return new
IntNativeMethods
.DRAWTEXTPARAMS(currentCachedInfo.LeftTextMargin,currentCachedInfo.RightTextMargin);
78
IntNativeMethods
.DRAWTEXTPARAMS drawTextParams = wg.GetTextMargins(font);
83
return new
IntNativeMethods
.DRAWTEXTPARAMS(currentCachedInfo.LeftTextMargin,currentCachedInfo.RightTextMargin);
misc\GDI\SafeNativeMethods.cs (2)
86
private static extern IntPtr IntExtCreatePen(int fnStyle, int dwWidth,
IntNativeMethods
.LOGBRUSH lplb, int dwStyleCount, [MarshalAs(UnmanagedType.LPArray)] int[] lpStyle);
89
public static IntPtr ExtCreatePen(int fnStyle, int dwWidth,
IntNativeMethods
.LOGBRUSH lplb, int dwStyleCount, int[] lpStyle)
misc\GDI\UnsafeNativeMethods.cs (60)
155
public static extern bool IntOffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out]
IntNativeMethods
.POINT point);
156
public static bool OffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out]
IntNativeMethods
.POINT point)
189
public static extern
IntNativeMethods
.RegionFlags IntCombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode);
190
public static
IntNativeMethods
.RegionFlags CombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode) {
196
return
IntNativeMethods
.RegionFlags.ERROR;
214
public static extern
IntNativeMethods
.RegionFlags IntSelectClipRgn(HandleRef hDC, HandleRef hRgn);
215
public static
IntNativeMethods
.RegionFlags SelectClipRgn(HandleRef hDC, HandleRef hRgn)
217
IntNativeMethods
.RegionFlags result = IntSelectClipRgn(hDC, hRgn);
218
DbgUtil.AssertWin32(result !=
IntNativeMethods
.RegionFlags.ERROR, "SelectClipRgn([hdc=0x{0:X8}], [hRegion=0x{1:X8}]) failed.", hDC.Handle, hRgn.Handle);
224
public static extern
IntNativeMethods
.RegionFlags IntGetRgnBox(HandleRef hRgn, [In, Out] ref
IntNativeMethods
.RECT clipRect);
225
public static
IntNativeMethods
.RegionFlags GetRgnBox(HandleRef hRgn, [In, Out] ref
IntNativeMethods
.RECT clipRect)
227
IntNativeMethods
.RegionFlags result = IntGetRgnBox(hRgn, ref clipRect);
228
DbgUtil.AssertWin32(result !=
IntNativeMethods
.RegionFlags.ERROR, "GetRgnBox([hRegion=0x{0:X8}], [out rect]) failed.", hRgn.Handle);
261
public static extern int IntGetObject(HandleRef hBrush, int nSize, [In, Out]
IntNativeMethods
.LOGBRUSH lb);
262
public static int GetObject(HandleRef hBrush,
IntNativeMethods
.LOGBRUSH lb)
264
int retVal = IntGetObject(hBrush, System.Runtime.InteropServices.Marshal.SizeOf(typeof(
IntNativeMethods
.LOGBRUSH)), lb);
272
public static extern int IntGetObject(HandleRef hFont, int nSize, [In, Out]
IntNativeMethods
.LOGFONT lf);
273
public static int GetObject(HandleRef hFont,
IntNativeMethods
.LOGFONT lp)
275
int retVal = IntGetObject(hFont, System.Runtime.InteropServices.Marshal.SizeOf(typeof(
IntNativeMethods
.LOGFONT)), lp);
367
public static extern int DrawTextW(HandleRef hDC, string lpszString, int nCount, ref
IntNativeMethods
.RECT lpRect, int nFormat);
371
public static extern int DrawTextA(HandleRef hDC, byte[] lpszString, int byteCount, ref
IntNativeMethods
.RECT lpRect, int nFormat);
373
public static int DrawText( HandleRef hDC, string text, ref
IntNativeMethods
.RECT lpRect, int nFormat )
387
int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero );
389
IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero );
392
byteCount = Math.Min( byteCount,
IntNativeMethods
.MaxTextLengthInWin9x );
406
public static extern int DrawTextExW(HandleRef hDC, string lpszString, int nCount, ref
IntNativeMethods
.RECT lpRect, int nFormat, [In, Out]
IntNativeMethods
.DRAWTEXTPARAMS lpDTParams);
410
public static extern int DrawTextExA(HandleRef hDC, byte[] lpszString, int byteCount, ref
IntNativeMethods
.RECT lpRect, int nFormat, [In, Out]
IntNativeMethods
.DRAWTEXTPARAMS lpDTParams);
412
public static int DrawTextEx(HandleRef hDC, string text, ref
IntNativeMethods
.RECT lpRect, int nFormat, [In, Out]
IntNativeMethods
.DRAWTEXTPARAMS lpDTParams)
426
int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero);
428
IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero);
431
byteCount = Math.Min( byteCount,
IntNativeMethods
.MaxTextLengthInWin9x);
446
public static extern int GetTextExtentPoint32W(HandleRef hDC, string text, int len, [In, Out]
IntNativeMethods
.SIZE size);
451
public static extern int GetTextExtentPoint32A(HandleRef hDC, byte[] lpszString, int byteCount, [In, Out]
IntNativeMethods
.SIZE size);
453
public static int GetTextExtentPoint32(HandleRef hDC, string text, [In, Out]
IntNativeMethods
.SIZE size)
461
byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero);
463
IntUnsafeNativeMethods.WideCharToMultiByte(
IntNativeMethods
.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero);
466
byteCount = Math.Min( text.Length,
IntNativeMethods
.MaxTextLengthInWin9x);
484
internal static extern bool ExtTextOut(HandleRef hdc, int x, int y, int options, ref
IntNativeMethods
.RECT rect, string str, int length, int[] spacing);
498
public static extern bool IntMoveToEx(HandleRef hdc, int x, int y,
IntNativeMethods
.POINT pt);
499
public static bool MoveToEx(HandleRef hdc, int x, int y,
IntNativeMethods
.POINT pt)
518
public static extern bool IntFillRect(HandleRef hdc, [In] ref
IntNativeMethods
.RECT rect, HandleRef hbrush);
519
public static bool FillRect(HandleRef hDC, [In] ref
IntNativeMethods
.RECT rect, HandleRef hbrush)
548
public static extern bool IntGetViewportExtEx(HandleRef hdc, [In, Out]
IntNativeMethods
.SIZE lpSize);
549
public static bool GetViewportExtEx( HandleRef hdc, [In, Out]
IntNativeMethods
.SIZE lpSize )
558
public static extern bool IntGetViewportOrgEx(HandleRef hdc, [In, Out]
IntNativeMethods
.POINT lpPoint);
559
public static bool GetViewportOrgEx( HandleRef hdc, [In, Out]
IntNativeMethods
.POINT lpPoint )
568
public static extern bool IntSetViewportExtEx(HandleRef hDC, int x, int y, [In, Out]
IntNativeMethods
.SIZE size);
569
public static bool SetViewportExtEx(HandleRef hDC, int x, int y, [In, Out]
IntNativeMethods
.SIZE size)
577
public static extern bool IntSetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out]
IntNativeMethods
.POINT point);
578
public static bool SetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out]
IntNativeMethods
.POINT point)
589
public static extern int GetTextMetricsW(HandleRef hDC, [In, Out] ref
IntNativeMethods
.TEXTMETRIC lptm);
593
public static extern int GetTextMetricsA(HandleRef hDC, [In, Out] ref
IntNativeMethods
.TEXTMETRICA lptm);
595
public static int GetTextMetrics(HandleRef hDC, ref
IntNativeMethods
.TEXTMETRIC lptm)
602
IntNativeMethods
.TEXTMETRICA lptmA = new
IntNativeMethods
.TEXTMETRICA();
misc\GDI\WindowsFont.cs (18)
50
private
IntNativeMethods
.LOGFONT logFont;
81
this.logFont.lfOutPrecision =
IntNativeMethods
.OUT_TT_ONLY_PRECIS; // True Type only.
107
this(faceName, defaultFontSize, FontStyle.Regular,
IntNativeMethods
.DEFAULT_CHARSET, WindowsFontQuality.Default)
118
this(faceName, size, FontStyle.Regular,
IntNativeMethods
.DEFAULT_CHARSET, WindowsFontQuality.Default)
128
this(faceName, size, style,
IntNativeMethods
.DEFAULT_CHARSET, WindowsFontQuality.Default)
143
this.logFont = new
IntNativeMethods
.LOGFONT();
160
this.logFont.lfOutPrecision =
IntNativeMethods
.OUT_TT_PRECIS;
162
this.logFont.lfWeight = (style & FontStyle.Bold) == FontStyle.Bold ?
IntNativeMethods
.FW_BOLD :
IntNativeMethods
.FW_NORMAL;
181
private WindowsFont(
IntNativeMethods
.LOGFONT lf, bool createHandle )
193
if (lf.lfWeight ==
IntNativeMethods
.FW_BOLD)
255
IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(null, hdc),
IntNativeMethods
.OBJ_FONT);
281
IntNativeMethods
.LOGFONT lf = new
IntNativeMethods
.LOGFONT();
473
IntNativeMethods
.TEXTMETRIC tm = (
IntNativeMethods
.TEXTMETRIC) wg.GetTextMetrics();
532
IntNativeMethods
.TEXTMETRIC tm = (
IntNativeMethods
.TEXTMETRIC) wg.GetTextMetrics();
misc\GDI\WindowsGraphics2.cs (21)
245
IntNativeMethods
.DRAWTEXTPARAMS dtparams = GetTextMargins(font);
259
IntNativeMethods
.RECT rect = new
IntNativeMethods
.RECT(bounds);
333
public
IntNativeMethods
.DRAWTEXTPARAMS GetTextMargins(WindowsFont font)
364
return new
IntNativeMethods
.DRAWTEXTPARAMS(leftMargin, rightMargin);
383
IntNativeMethods
.SIZE size = new
IntNativeMethods
.SIZE();
456
IntNativeMethods
.DRAWTEXTPARAMS dtparams = null;
485
IntNativeMethods
.RECT rect =
IntNativeMethods
.RECT.FromXYWH(0, 0, proposedSize.Width, proposedSize.Height);
538
public static Rectangle AdjustForVerticalAlignment(HandleRef hdc, string text, Rectangle bounds, IntTextFormatFlags flags,
IntNativeMethods
.DRAWTEXTPARAMS dtparams)
549
IntNativeMethods
.RECT rect = new
IntNativeMethods
.RECT(bounds);
602
IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(null, IntUnsafeNativeMethods.GetStockObject(
IntNativeMethods
.HOLLOW_BRUSH)));
628
IntNativeMethods
.RECT rect = new
IntNativeMethods
.RECT(x, y, x + width, y + height );
678
IntNativeMethods
.POINT oldPoint = new
IntNativeMethods
.POINT();
700
public
IntNativeMethods
.TEXTMETRIC GetTextMetrics()
702
IntNativeMethods
.TEXTMETRIC tm = new
IntNativeMethods
.TEXTMETRIC();
misc\GDI\WindowsPen.cs (3)
125
IntNativeMethods
.LOGBRUSH lb = new
IntNativeMethods
.LOGBRUSH();
128
lb.lbStyle =
IntNativeMethods
.BS_SOLID;
misc\GDI\WindowsRegion.cs (3)
125
public
IntNativeMethods
.RegionFlags CombineRegion(WindowsRegion region1, WindowsRegion region2, RegionCombineMode mode) {
194
IntNativeMethods
.RECT rect = new
IntNativeMethods
.RECT();