internal protected virtual bool GetScreenInfo(CefBrowser browser, ref CefScreenInfo screenInfo) { if (WebView.GetCefScreenInfo(ref screenInfo)) { return(true); } if (!PlatformInfo.IsWindows) { return(false); } float devicePixelRatio = WebView.GetDevicePixelRatio(); IntPtr hMonitor = NativeMethods.MonitorFromWindow(IntPtr.Zero, MonitorFlag.MONITOR_DEFAULTTOPRIMARY); var monitorInfo = new MONITORINFO(); monitorInfo.Size = Marshal.SizeOf(typeof(MONITORINFO)); NativeMethods.GetMonitorInfo(hMonitor, ref monitorInfo); screenInfo.Depth = 24; screenInfo.DepthPerComponent = 24; screenInfo.DeviceScaleFactor = devicePixelRatio; CefRect rect; rect = monitorInfo.Monitor.ToCefRect(); rect.Scale(1.0f / devicePixelRatio); screenInfo.Rect = rect; rect = monitorInfo.Work.ToCefRect(); rect.Scale(1.0f / devicePixelRatio); screenInfo.AvailableRect = rect; return(true); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { screenInfo.Depth = 32; screenInfo.DepthPerComponent = 8; screenInfo.AvailableRectangle = new CefRectangle(0, 0, _width, _height); screenInfo.Rectangle = new CefRectangle(0, 0, _width, _height); return(false); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { if (screenInfo != null) { return(false); } return(false); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { var rect = screenInfo.Rectangle; this.GetRootScreenRect(browser, ref rect); screenInfo.Depth = 32; screenInfo.IsMonochrome = false; return(true); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { GetViewRect(browser, out var viewRect); screenInfo.DeviceScaleFactor = renderer.ScaleFactor; screenInfo.Rectangle = viewRect; screenInfo.AvailableRectangle = viewRect; return(true); }
protected virtual bool GetCefScreenInfo(ref CefScreenInfo screenInfo) { VirtualDevice device = Device; if (device == null) { return(false); } screenInfo = device.ScreenInfo; return(true); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { var handle = _owner.HostWindowHandle; var screen = Screen.FromHandle(handle); screenInfo.DeviceScaleFactor = DpiHelper.GetScaleFactorForCurrentWindow(handle); GetViewRect(browser, out var rectView); screenInfo.Rectangle = rectView; screenInfo.AvailableRectangle = rectView;//new CefRectangle(screen.WorkingArea.X, screen.WorkingArea.Y, screen.WorkingArea.Width, screen.WorkingArea.Height); return(true); }
} // End Sub GetViewRect protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { System.Console.WriteLine("GetScreenInfo"); return(false); } // End Function GetScreenInfo
protected internal unsafe override bool GetScreenInfo(CefBrowser browser, ref CefScreenInfo screenInfo) { return(_implementation.GetScreenInfo(browser, ref screenInfo)); }
protected override Boolean GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { Log.Trace("RenderHandler.GetScreenInfo( browser: {0} )", browser.Identifier); return(false); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { return false; }
bool IChromiumWebViewPrivate.GetCefScreenInfo(ref CefScreenInfo screenInfo) { return(GetCefScreenInfo(ref screenInfo)); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { //throw new NotImplementedException(); return(true); }
public override bool GetScreenInfo(CefBrowser browser, ref CefScreenInfo screenInfo) { return(_implementation.GetScreenInfo(browser, ref screenInfo)); }
protected override bool GetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) { return(true); }