// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Clamp.html).
pub type Clamp
///|
pub(open) trait IClamp {
fn as_clamp(Self) -> Clamp
fn get_child(Self) -> @gtk.Widget? = _
fn get_maximum_size(Self) -> Int = _
fn get_tightening_threshold(Self) -> Int = _
fn get_unit(Self) -> LengthUnit = _
fn set_child(Self, &@gtk.IWidget?) -> Unit = _
fn set_maximum_size(Self, Int) -> Unit = _
fn set_tightening_threshold(Self, Int) -> Unit = _
fn set_unit(Self, LengthUnit) -> Unit = _
}
///|
pub impl IClamp for Clamp with fn as_clamp(self) {
self
}
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ctor.Clamp.new.html).
pub extern "c" fn Clamp::new() -> Clamp = "moonbit_adw_clamp_new"
///|
#borrow(self_)
extern "c" fn moonbit_adw_clamp_get_child(
self_ : Clamp,
) -> @glib.Nullable[@gtk.Widget] = "moonbit_adw_clamp_get_child"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.get_child.html).
pub fn Clamp::get_child(self : Clamp) -> @gtk.Widget? {
let raw_result = moonbit_adw_clamp_get_child(self)
raw_result.to_option()
}
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.get_maximum_size.html).
#borrow(self)
pub extern "c" fn Clamp::get_maximum_size(self : Clamp) -> Int = "moonbit_adw_clamp_get_maximum_size"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.get_tightening_threshold.html).
#borrow(self)
pub extern "c" fn Clamp::get_tightening_threshold(self : Clamp) -> Int = "moonbit_adw_clamp_get_tightening_threshold"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.get_unit.html).
#borrow(self)
pub extern "c" fn Clamp::get_unit(self : Clamp) -> LengthUnit = "moonbit_adw_clamp_get_unit"
///|
#borrow(self_, child)
extern "c" fn moonbit_adw_clamp_set_child(
self_ : Clamp,
child : @glib.Nullable[@gtk.Widget],
) = "moonbit_adw_clamp_set_child"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.set_child.html).
pub fn Clamp::set_child(self : Clamp, child : &@gtk.IWidget?) -> Unit {
moonbit_adw_clamp_set_child(
self,
match child {
Some(v) => @glib.Nullable::some(v.as_widget())
None => @glib.Nullable::null()
},
)
}
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.set_maximum_size.html).
#borrow(self)
pub extern "c" fn Clamp::set_maximum_size(self : Clamp, maximum_size : Int) = "moonbit_adw_clamp_set_maximum_size"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.set_tightening_threshold.html).
#borrow(self)
pub extern "c" fn Clamp::set_tightening_threshold(
self : Clamp,
tightening_threshold : Int,
) = "moonbit_adw_clamp_set_tightening_threshold"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.Clamp.set_unit.html).
#borrow(self)
pub extern "c" fn Clamp::set_unit(self : Clamp, unit : LengthUnit) = "moonbit_adw_clamp_set_unit"
///|
impl IClamp with fn get_child(self) -> @gtk.Widget? {
self.as_clamp().get_child()
}
///|
impl IClamp with fn get_maximum_size(self) -> Int {
self.as_clamp().get_maximum_size()
}
///|
impl IClamp with fn get_tightening_threshold(self) -> Int {
self.as_clamp().get_tightening_threshold()
}
///|
impl IClamp with fn get_unit(self) -> LengthUnit {
self.as_clamp().get_unit()
}
///|
impl IClamp with fn set_child(self, child) -> Unit {
self.as_clamp().set_child(child)
}
///|
impl IClamp with fn set_maximum_size(self, maximum_size) -> Unit {
self.as_clamp().set_maximum_size(maximum_size)
}
///|
impl IClamp with fn set_tightening_threshold(self, tightening_threshold) -> Unit {
self.as_clamp().set_tightening_threshold(tightening_threshold)
}
///|
impl IClamp with fn set_unit(self, unit) -> Unit {
self.as_clamp().set_unit(unit)
}
///|
pub fn Clamp::as_gtk_widget(self : Clamp) -> @gtk.Widget = "%identity"
///|
pub impl @gtk.IWidget for Clamp with fn as_widget(self) {
self.as_gtk_widget()
}
///|
pub fn Clamp::as_gobject_object(self : Clamp) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for Clamp with fn as_object(self) {
self.as_gobject_object()
}