// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
pub type Rectangle
///|
pub(open) trait IRectangle {
fn as_rectangle(Self) -> Rectangle
fn contains_point(Self, Int, Int) -> Bool = _
fn equal(Self, Rectangle) -> Bool = _
fn intersect(Self, Rectangle) -> (Rectangle, Bool) = _
fn union(Self, Rectangle) -> Rectangle = _
}
///|
pub impl IRectangle for Rectangle with fn as_rectangle(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Rectangle.contains_point.html).
#borrow(self)
pub extern "c" fn Rectangle::contains_point(
self : Rectangle,
x : Int,
y : Int,
) -> Bool = "moonbit_gdk_rectangle_contains_point"
///|
#borrow(self_, rect2)
extern "c" fn moonbit_gdk_rectangle_equal(
self_ : Rectangle,
rect2 : Rectangle,
) -> Bool = "moonbit_gdk_rectangle_equal"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Rectangle.equal.html).
pub fn Rectangle::equal(self : Rectangle, rect2 : Rectangle) -> Bool {
moonbit_gdk_rectangle_equal(self, rect2)
}
///|
#borrow(self_, src2, native_result)
extern "c" fn moonbit_gdk_rectangle_intersect(
self_ : Rectangle,
src2 : Rectangle,
native_result : Ref[Int],
) -> Rectangle = "moonbit_gdk_rectangle_intersect"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Rectangle.intersect.html).
pub fn Rectangle::intersect(
self : Rectangle,
src2 : Rectangle,
) -> (Rectangle, Bool) {
let native_result = Ref(0)
let __result = moonbit_gdk_rectangle_intersect(self, src2, native_result)
(__result, native_result.val != 0)
}
///|
#borrow(self_, src2)
extern "c" fn moonbit_gdk_rectangle_union(
self_ : Rectangle,
src2 : Rectangle,
) -> Rectangle = "moonbit_gdk_rectangle_union"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Rectangle.union.html).
pub fn Rectangle::union(self : Rectangle, src2 : Rectangle) -> Rectangle {
let __result = moonbit_gdk_rectangle_union(self, src2)
__result
}
///|
impl IRectangle with fn contains_point(self, x, y) -> Bool {
self.as_rectangle().contains_point(x, y)
}
///|
impl IRectangle with fn equal(self, rect2) -> Bool {
self.as_rectangle().equal(rect2)
}
///|
impl IRectangle with fn intersect(self, src2) -> (Rectangle, Bool) {
self.as_rectangle().intersect(src2)
}
///|
impl IRectangle with fn union(self, src2) -> Rectangle {
self.as_rectangle().union(src2)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::get_x(self_ : Rectangle) -> Int = "moonbit_gdk_rectangle_x_get"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::set_x(self_ : Rectangle, value : Int) = "moonbit_gdk_rectangle_x_set"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::get_y(self_ : Rectangle) -> Int = "moonbit_gdk_rectangle_y_get"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::set_y(self_ : Rectangle, value : Int) = "moonbit_gdk_rectangle_y_set"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::get_width(self_ : Rectangle) -> Int = "moonbit_gdk_rectangle_width_get"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::set_width(self_ : Rectangle, value : Int) = "moonbit_gdk_rectangle_width_set"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::get_height(self_ : Rectangle) -> Int = "moonbit_gdk_rectangle_height_get"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/struct.Rectangle.html).
#borrow(self_)
pub extern "c" fn Rectangle::set_height(self_ : Rectangle, value : Int) = "moonbit_gdk_rectangle_height_set"
///|
pub extern "c" fn Rectangle::_zero() -> Rectangle = "moonbit_gdk_rectangle__zero"