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