// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.Overlay.html).
pub type Overlay
///|
pub(open) trait IOverlay {
fn as_overlay(Self) -> Overlay
fn add_overlay(Self, &IWidget) -> Unit = _
fn get_child(Self) -> Widget? = _
fn get_clip_overlay(Self, &IWidget) -> Bool = _
fn get_measure_overlay(Self, &IWidget) -> Bool = _
fn remove_overlay(Self, &IWidget) -> Unit = _
fn set_child(Self, &IWidget?) -> Unit = _
fn set_clip_overlay(Self, &IWidget, Bool) -> Unit = _
fn set_measure_overlay(Self, &IWidget, Bool) -> Unit = _
fn connect_get_child_position(Self, (Overlay, Widget, @gdk.Rectangle) -> Bool) -> UInt64 = _
}
///|
pub impl IOverlay for Overlay with fn as_overlay(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.Overlay.new.html).
pub extern "c" fn Overlay::new() -> Overlay = "moonbit_gtk_overlay_new"
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_add_overlay(self_ : Overlay, widget : Widget) = "moonbit_gtk_overlay_add_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.add_overlay.html).
pub fn Overlay::add_overlay(self : Overlay, widget : &IWidget) -> Unit {
moonbit_gtk_overlay_add_overlay(self, widget.as_widget())
}
///|
#borrow(self_)
extern "c" fn moonbit_gtk_overlay_get_child(
self_ : Overlay,
) -> @glib.Nullable[Widget] = "moonbit_gtk_overlay_get_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.get_child.html).
pub fn Overlay::get_child(self : Overlay) -> Widget? {
let raw_result = moonbit_gtk_overlay_get_child(self)
raw_result.to_option()
}
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_get_clip_overlay(
self_ : Overlay,
widget : Widget,
) -> Bool = "moonbit_gtk_overlay_get_clip_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.get_clip_overlay.html).
pub fn Overlay::get_clip_overlay(self : Overlay, widget : &IWidget) -> Bool {
moonbit_gtk_overlay_get_clip_overlay(self, widget.as_widget())
}
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_get_measure_overlay(
self_ : Overlay,
widget : Widget,
) -> Bool = "moonbit_gtk_overlay_get_measure_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.get_measure_overlay.html).
pub fn Overlay::get_measure_overlay(self : Overlay, widget : &IWidget) -> Bool {
moonbit_gtk_overlay_get_measure_overlay(self, widget.as_widget())
}
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_remove_overlay(
self_ : Overlay,
widget : Widget,
) = "moonbit_gtk_overlay_remove_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.remove_overlay.html).
pub fn Overlay::remove_overlay(self : Overlay, widget : &IWidget) -> Unit {
moonbit_gtk_overlay_remove_overlay(self, widget.as_widget())
}
///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_overlay_set_child(
self_ : Overlay,
child : @glib.Nullable[Widget],
) = "moonbit_gtk_overlay_set_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.set_child.html).
pub fn Overlay::set_child(self : Overlay, child : &IWidget?) -> Unit {
moonbit_gtk_overlay_set_child(
self,
match child {
Some(v) => @glib.Nullable::some(v.as_widget())
None => @glib.Nullable::null()
},
)
}
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_set_clip_overlay(
self_ : Overlay,
widget : Widget,
clip_overlay : Bool,
) = "moonbit_gtk_overlay_set_clip_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.set_clip_overlay.html).
pub fn Overlay::set_clip_overlay(
self : Overlay,
widget : &IWidget,
clip_overlay : Bool,
) -> Unit {
moonbit_gtk_overlay_set_clip_overlay(self, widget.as_widget(), clip_overlay)
}
///|
#borrow(self_, widget)
extern "c" fn moonbit_gtk_overlay_set_measure_overlay(
self_ : Overlay,
widget : Widget,
measure : Bool,
) = "moonbit_gtk_overlay_set_measure_overlay"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Overlay.set_measure_overlay.html).
pub fn Overlay::set_measure_overlay(
self : Overlay,
widget : &IWidget,
measure : Bool,
) -> Unit {
moonbit_gtk_overlay_set_measure_overlay(self, widget.as_widget(), measure)
}
///|
#borrow(instance)
extern "c" fn gtk_overlay_connect_get_child_position(
instance : Overlay,
function : FuncRef[
(Overlay, Widget, @gdk.Rectangle, (Overlay, Widget, @gdk.Rectangle) -> Bool) -> Bool,
],
closure : (Overlay, Widget, @gdk.Rectangle) -> Bool,
) -> UInt64 = "moonbit_gtk_overlay_connect_get_child_position"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.Overlay.get-child-position.html).
pub fn Overlay::connect_get_child_position(
self : Overlay,
f : (Overlay, Widget, @gdk.Rectangle) -> Bool,
) -> UInt64 {
gtk_overlay_connect_get_child_position(
self,
fn(instance_, widget, allocation, f) { f(instance_, widget, allocation) },
f,
)
}
///|
impl IOverlay with fn add_overlay(self, widget) -> Unit {
self.as_overlay().add_overlay(widget)
}
///|
impl IOverlay with fn get_child(self) -> Widget? {
self.as_overlay().get_child()
}
///|
impl IOverlay with fn get_clip_overlay(self, widget) -> Bool {
self.as_overlay().get_clip_overlay(widget)
}
///|
impl IOverlay with fn get_measure_overlay(self, widget) -> Bool {
self.as_overlay().get_measure_overlay(widget)
}
///|
impl IOverlay with fn remove_overlay(self, widget) -> Unit {
self.as_overlay().remove_overlay(widget)
}
///|
impl IOverlay with fn set_child(self, child) -> Unit {
self.as_overlay().set_child(child)
}
///|
impl IOverlay with fn set_clip_overlay(self, widget, clip_overlay) -> Unit {
self.as_overlay().set_clip_overlay(widget, clip_overlay)
}
///|
impl IOverlay with fn set_measure_overlay(self, widget, measure) -> Unit {
self.as_overlay().set_measure_overlay(widget, measure)
}
///|
impl IOverlay with fn connect_get_child_position(self, f) -> UInt64 {
self.as_overlay().connect_get_child_position(f)
}
///|
pub fn Overlay::as_widget(self : Overlay) -> Widget = "%identity"
///|
pub impl IWidget for Overlay with fn as_widget(self) {
self.as_widget()
}
///|
pub fn Overlay::as_gobject_object(self : Overlay) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for Overlay with fn as_object(self) {
self.as_gobject_object()
}