internal CefRectangle(cef_rect_t rect) { _x = rect.x; _y = rect.y; _width = rect.width; _height = rect.height; }
internal cef_draggable_region_t *ToNative() { var ptr = cef_draggable_region_t.Alloc(); ptr->bounds = new cef_rect_t(Bounds.X, Bounds.Y, Bounds.Width, Bounds.Height); ptr->draggable = Draggable ? 1 : 0; return(ptr); }
/// <summary> /// Set the printer printable area in device units. /// Some platforms already provide flipped area. Set |landscape_needs_flip| /// to false on those platforms to avoid double flipping. /// </summary> public void SetPrinterPrintableArea(CefSize physicalSizeDeviceUnits, CefRectangle printableAreaDeviceUnits, bool landscapeNeedsFlip) { var n_physicalSizeDeviceUnits = new cef_size_t( physicalSizeDeviceUnits.Width, physicalSizeDeviceUnits.Height ); var n_printableAreaDeviceUnits = new cef_rect_t( printableAreaDeviceUnits.X, printableAreaDeviceUnits.Y, printableAreaDeviceUnits.Width, printableAreaDeviceUnits.Height ); cef_print_settings_t.set_printer_printable_area( _self, &n_physicalSizeDeviceUnits, &n_printableAreaDeviceUnits, landscapeNeedsFlip ? 1 : 0 ); }
/// <summary> /// Invalidate the |dirtyRect| region of the view. The browser will call /// CefRenderHandler::OnPaint asynchronously with the updated regions. This /// method is only used when window rendering is disabled. /// </summary> public void Invalidate(CefRectangle dirtyRect, CefPaintElementType type) { var n_dirtyRect = new cef_rect_t(dirtyRect.X, dirtyRect.Y, dirtyRect.Width, dirtyRect.Height); cef_browser_host_t.invalidate(_self, &n_dirtyRect, type); }
/// <summary> /// Initializes a new instance of the <see cref="CefRect"/> class with the specified location and size. /// </summary> /// <param name="x">The x-coordinate of the upper-left corner of the rectangle.</param> /// <param name="y">The y-coordinate of the upper-left corner of the rectangle.</param> /// <param name="width">The width of the rectangle.</param> /// <param name="height">The height of the rectangle.</param> public CefRect(int x, int y, int width, int height) { _instance = new cef_rect_t { x = x, y = y, width = width, height = height }; }