84 references to IntUnsafeNativeMethods
System.Windows.Forms (84)
misc\GDI\DeviceContext.cs (23)
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); 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 218IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, handleToDelete)); 257this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.hDC) ); 279IntPtr hdc = IntUnsafeNativeMethods.CreateDC(driverName, deviceName, fileName, devMode); 292IntPtr hdc = IntUnsafeNativeMethods.CreateIC(driverName, deviceName, fileName, devMode); 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 386IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.hDC)); 398IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.hDC)); 437this.hDC = IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd)); 459IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.hDC)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 516IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.hDC), -1); 568int state = IntUnsafeNativeMethods.SaveDC(hdc); 608IntUnsafeNativeMethods.SelectClipRgn(hdc, hRegion); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn );
misc\GDI\DeviceContext2.cs (21)
66return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetBkColor( new HandleRef( this, this.Hdc ))); 81return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new HandleRef( this, this.Hdc ), ColorTranslator.ToWin32(newColor))); 91return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.GetBkMode( new HandleRef( this, this.Hdc ) ); 106return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.SetBkMode(new HandleRef(this, this.Hdc), (int) newMode); 117return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.GetROP2( new HandleRef( this, this.Hdc ) ); 135return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.SetROP2(new HandleRef(this, this.Hdc), (int) rasterOperation); 239IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 242IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont)); 313IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont )); 323return IntUnsafeNativeMethods.GetDeviceCaps( new HandleRef( this, this.Hdc ), (int) capabilityIndex ); 333return (DeviceContextMapMode) IntUnsafeNativeMethods.GetMapMode( new HandleRef( this, this.Hdc ) ); 363return (DeviceContextMapMode) IntUnsafeNativeMethods.SetMapMode( new HandleRef(this, this.Hdc), (int) newMode ); 383return IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hObj)); 393return (DeviceContextTextAlignment) IntUnsafeNativeMethods.GetTextAlign( new HandleRef( this, this.Hdc ) ); 408return (DeviceContextTextAlignment) IntUnsafeNativeMethods.SetTextAlign(new HandleRef(this, this.Hdc), (int) newAligment ); 419return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetTextColor( new HandleRef( this, this.Hdc ) )); 434return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new HandleRef( this, this.Hdc), ColorTranslator.ToWin32(newColor))); 445IntUnsafeNativeMethods.GetViewportExtEx( new HandleRef( this, this.Hdc ), size ); 462IntUnsafeNativeMethods.SetViewportExtEx( new HandleRef( this, this.Hdc ), newExtent.Width, newExtent.Height, oldExtent ); 475IntUnsafeNativeMethods.GetViewportOrgEx( new HandleRef( this, this.Hdc ), point ); 491IntUnsafeNativeMethods.SetViewportOrgEx( new HandleRef( this, this.Hdc ), newOrigin.X, newOrigin.Y, oldOrigin );
misc\GDI\UnsafeNativeMethods.cs (8)
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 ); 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); 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); 603retVal = IntUnsafeNativeMethods.GetTextMetricsA(hDC, ref lptmA); 629retVal = IntUnsafeNativeMethods.GetTextMetricsW(hDC, ref lptm);
misc\GDI\WindowsFont.cs (6)
73this.hFont = IntUnsafeNativeMethods.CreateFontIndirect(this.logFont); 83this.hFont = IntUnsafeNativeMethods.CreateFontIndirect(this.logFont); 93IntUnsafeNativeMethods.GetObject(new HandleRef(this, this.hFont), this.logFont); 255IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(null, hdc), IntNativeMethods.OBJ_FONT); 282IntUnsafeNativeMethods.GetObject(new HandleRef(null, hFont), lf); 317IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.hFont));
misc\GDI\WindowsGraphics2.cs (23)
83IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 94IntUnsafeNativeMethods.BeginPath(hdc); 95IntUnsafeNativeMethods.MoveToEx(hdc, p.X, p.Y, null); 96IntUnsafeNativeMethods.AngleArc(hdc, p.X, p.Y, radius, startAngle, sweepAngle); 97IntUnsafeNativeMethods.LineTo(hdc, p.X, p.Y); 98IntUnsafeNativeMethods.EndPath(hdc); 99IntUnsafeNativeMethods.StrokePath(hdc); 113IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 118IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(brush, brush.HBrush)); 122IntUnsafeNativeMethods.Ellipse(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); 261IntUnsafeNativeMethods.DrawTextEx(hdc, text, ref rect, (int) flags, dtparams); 299int colorResult = IntUnsafeNativeMethods.GetNearestColor(hdc, ColorTranslator.ToWin32(color)); 392IntUnsafeNativeMethods.GetTextExtentPoint32(hdc, text, size); 512IntUnsafeNativeMethods.DrawTextEx(hdc, text, ref rect, (int)flags, dtparams); 553int textHeight = IntUnsafeNativeMethods.DrawTextEx(hdc, text, ref rect, (int) flags, dtparams); 602IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(null, IntUnsafeNativeMethods.GetStockObject(IntNativeMethods.HOLLOW_BRUSH))); 605IntUnsafeNativeMethods.Rectangle(hdc, x, y, x + width , y + height ); 638IntUnsafeNativeMethods.FillRect(hdc, ref rect, new HandleRef(brush, hBrush)); 680IntUnsafeNativeMethods.MoveToEx(hdc, x1, y1, oldPoint); 681IntUnsafeNativeMethods.LineTo(hdc, x2, y2); 693IntUnsafeNativeMethods.MoveToEx(hdc, oldPoint.x, oldPoint.y, null); 724IntUnsafeNativeMethods.GetTextMetrics(hdc, ref tm);
misc\GDI\WindowsRegion.cs (3)
126return IntUnsafeNativeMethods.CombineRgn(new HandleRef(this, this.HRegion), new HandleRef(region1, region1.HRegion), new HandleRef(region2, region2.HRegion), mode); 152IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.nativeHandle)); 195IntUnsafeNativeMethods.GetRgnBox(new HandleRef(this, this.nativeHandle), ref rect);