// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.SpinButton.html).
pub type SpinButton
///|
pub(open) trait ISpinButton {
fn as_spin_button(Self) -> SpinButton
fn configure(Self, &IAdjustment?, Double, UInt) -> Unit = _
fn get_activates_default(Self) -> Bool = _
fn get_adjustment(Self) -> Adjustment = _
fn get_climb_rate(Self) -> Double = _
fn get_digits(Self) -> UInt = _
fn get_increments(Self) -> (Double, Double) = _
fn get_numeric(Self) -> Bool = _
fn get_range(Self) -> (Double, Double) = _
fn get_snap_to_ticks(Self) -> Bool = _
fn get_update_policy(Self) -> SpinButtonUpdatePolicy = _
fn get_value(Self) -> Double = _
fn get_value_as_int(Self) -> Int = _
fn get_wrap(Self) -> Bool = _
fn set_activates_default(Self, Bool) -> Unit = _
fn set_adjustment(Self, &IAdjustment) -> Unit = _
fn set_climb_rate(Self, Double) -> Unit = _
fn set_digits(Self, UInt) -> Unit = _
fn set_increments(Self, Double, Double) -> Unit = _
fn set_numeric(Self, Bool) -> Unit = _
fn set_range(Self, Double, Double) -> Unit = _
fn set_snap_to_ticks(Self, Bool) -> Unit = _
fn set_update_policy(Self, SpinButtonUpdatePolicy) -> Unit = _
fn set_value(Self, Double) -> Unit = _
fn set_wrap(Self, Bool) -> Unit = _
fn spin(Self, SpinType, Double) -> Unit = _
fn update(Self) -> Unit = _
fn connect_activate(Self, (SpinButton) -> Unit) -> UInt64 = _
fn connect_change_value(Self, (SpinButton, ScrollType) -> Unit) -> UInt64 = _
fn connect_output(Self, (SpinButton) -> Bool) -> UInt64 = _
fn connect_value_changed(Self, (SpinButton) -> Unit) -> UInt64 = _
fn connect_wrapped(Self, (SpinButton) -> Unit) -> UInt64 = _
}
///|
pub impl ISpinButton for SpinButton with fn as_spin_button(self) {
self
}
///|
#borrow(adjustment)
extern "c" fn moonbit_gtk_spin_button_new(
adjustment : @glib.Nullable[Adjustment],
climb_rate : Double,
digits : UInt,
) -> SpinButton = "moonbit_gtk_spin_button_new"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.SpinButton.new.html).
pub fn SpinButton::new(
adjustment : &IAdjustment?,
climb_rate : Double,
digits : UInt,
) -> SpinButton {
moonbit_gtk_spin_button_new(
match adjustment {
Some(v) => @glib.Nullable::some(v.as_adjustment())
None => @glib.Nullable::null()
},
climb_rate,
digits,
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.SpinButton.new_with_range.html).
pub extern "c" fn SpinButton::new_with_range(
min : Double,
max : Double,
step : Double,
) -> SpinButton = "moonbit_gtk_spin_button_new_with_range"
///|
#borrow(self_, adjustment)
extern "c" fn moonbit_gtk_spin_button_configure(
self_ : SpinButton,
adjustment : @glib.Nullable[Adjustment],
climb_rate : Double,
digits : UInt,
) = "moonbit_gtk_spin_button_configure"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.configure.html).
pub fn SpinButton::configure(
self : SpinButton,
adjustment : &IAdjustment?,
climb_rate : Double,
digits : UInt,
) -> Unit {
moonbit_gtk_spin_button_configure(
self,
match adjustment {
Some(v) => @glib.Nullable::some(v.as_adjustment())
None => @glib.Nullable::null()
},
climb_rate,
digits,
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_activates_default.html).
#borrow(self)
pub extern "c" fn SpinButton::get_activates_default(self : SpinButton) -> Bool = "moonbit_gtk_spin_button_get_activates_default"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_adjustment.html).
#borrow(self)
pub extern "c" fn SpinButton::get_adjustment(self : SpinButton) -> Adjustment = "moonbit_gtk_spin_button_get_adjustment"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_climb_rate.html).
#borrow(self)
pub extern "c" fn SpinButton::get_climb_rate(self : SpinButton) -> Double = "moonbit_gtk_spin_button_get_climb_rate"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_digits.html).
#borrow(self)
pub extern "c" fn SpinButton::get_digits(self : SpinButton) -> UInt = "moonbit_gtk_spin_button_get_digits"
///|
#borrow(self_, step, page)
extern "c" fn moonbit_gtk_spin_button_get_increments(
self_ : SpinButton,
step : Ref[Double],
page : Ref[Double],
) = "moonbit_gtk_spin_button_get_increments"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_increments.html).
pub fn SpinButton::get_increments(self : SpinButton) -> (Double, Double) {
let step = Ref(0.0)
let page = Ref(0.0)
moonbit_gtk_spin_button_get_increments(self, step, page)
(step.val, page.val)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_numeric.html).
#borrow(self)
pub extern "c" fn SpinButton::get_numeric(self : SpinButton) -> Bool = "moonbit_gtk_spin_button_get_numeric"
///|
#borrow(self_, min, max)
extern "c" fn moonbit_gtk_spin_button_get_range(
self_ : SpinButton,
min : Ref[Double],
max : Ref[Double],
) = "moonbit_gtk_spin_button_get_range"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_range.html).
pub fn SpinButton::get_range(self : SpinButton) -> (Double, Double) {
let min = Ref(0.0)
let max = Ref(0.0)
moonbit_gtk_spin_button_get_range(self, min, max)
(min.val, max.val)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_snap_to_ticks.html).
#borrow(self)
pub extern "c" fn SpinButton::get_snap_to_ticks(self : SpinButton) -> Bool = "moonbit_gtk_spin_button_get_snap_to_ticks"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_update_policy.html).
#borrow(self)
pub extern "c" fn SpinButton::get_update_policy(
self : SpinButton,
) -> SpinButtonUpdatePolicy = "moonbit_gtk_spin_button_get_update_policy"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_value.html).
#borrow(self)
pub extern "c" fn SpinButton::get_value(self : SpinButton) -> Double = "moonbit_gtk_spin_button_get_value"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_value_as_int.html).
#borrow(self)
pub extern "c" fn SpinButton::get_value_as_int(self : SpinButton) -> Int = "moonbit_gtk_spin_button_get_value_as_int"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.get_wrap.html).
#borrow(self)
pub extern "c" fn SpinButton::get_wrap(self : SpinButton) -> Bool = "moonbit_gtk_spin_button_get_wrap"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_activates_default.html).
#borrow(self)
pub extern "c" fn SpinButton::set_activates_default(
self : SpinButton,
activates_default : Bool,
) = "moonbit_gtk_spin_button_set_activates_default"
///|
#borrow(self_, adjustment)
extern "c" fn moonbit_gtk_spin_button_set_adjustment(
self_ : SpinButton,
adjustment : Adjustment,
) = "moonbit_gtk_spin_button_set_adjustment"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_adjustment.html).
pub fn SpinButton::set_adjustment(
self : SpinButton,
adjustment : &IAdjustment,
) -> Unit {
moonbit_gtk_spin_button_set_adjustment(self, adjustment.as_adjustment())
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_climb_rate.html).
#borrow(self)
pub extern "c" fn SpinButton::set_climb_rate(
self : SpinButton,
climb_rate : Double,
) = "moonbit_gtk_spin_button_set_climb_rate"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_digits.html).
#borrow(self)
pub extern "c" fn SpinButton::set_digits(self : SpinButton, digits : UInt) = "moonbit_gtk_spin_button_set_digits"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_increments.html).
#borrow(self)
pub extern "c" fn SpinButton::set_increments(
self : SpinButton,
step : Double,
page : Double,
) = "moonbit_gtk_spin_button_set_increments"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_numeric.html).
#borrow(self)
pub extern "c" fn SpinButton::set_numeric(self : SpinButton, numeric : Bool) = "moonbit_gtk_spin_button_set_numeric"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_range.html).
#borrow(self)
pub extern "c" fn SpinButton::set_range(
self : SpinButton,
min : Double,
max : Double,
) = "moonbit_gtk_spin_button_set_range"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_snap_to_ticks.html).
#borrow(self)
pub extern "c" fn SpinButton::set_snap_to_ticks(
self : SpinButton,
snap_to_ticks : Bool,
) = "moonbit_gtk_spin_button_set_snap_to_ticks"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_update_policy.html).
#borrow(self)
pub extern "c" fn SpinButton::set_update_policy(
self : SpinButton,
policy : SpinButtonUpdatePolicy,
) = "moonbit_gtk_spin_button_set_update_policy"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_value.html).
#borrow(self)
pub extern "c" fn SpinButton::set_value(self : SpinButton, value : Double) = "moonbit_gtk_spin_button_set_value"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.set_wrap.html).
#borrow(self)
pub extern "c" fn SpinButton::set_wrap(self : SpinButton, wrap : Bool) = "moonbit_gtk_spin_button_set_wrap"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.spin.html).
#borrow(self)
pub extern "c" fn SpinButton::spin(
self : SpinButton,
direction : SpinType,
increment : Double,
) = "moonbit_gtk_spin_button_spin"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SpinButton.update.html).
#borrow(self)
pub extern "c" fn SpinButton::update(self : SpinButton) = "moonbit_gtk_spin_button_update"
///|
#borrow(instance)
extern "c" fn gtk_spin_button_connect_activate(
instance : SpinButton,
function : FuncRef[(SpinButton, (SpinButton) -> Unit) -> Unit],
closure : (SpinButton) -> Unit,
) -> UInt64 = "moonbit_gtk_spin_button_connect_activate"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.SpinButton.activate.html).
pub fn SpinButton::connect_activate(
self : SpinButton,
f : (SpinButton) -> Unit,
) -> UInt64 {
gtk_spin_button_connect_activate(self, fn(instance_, f) { f(instance_) }, f)
}
///|
#borrow(instance)
extern "c" fn gtk_spin_button_connect_change_value(
instance : SpinButton,
function : FuncRef[
(SpinButton, ScrollType, (SpinButton, ScrollType) -> Unit) -> Unit,
],
closure : (SpinButton, ScrollType) -> Unit,
) -> UInt64 = "moonbit_gtk_spin_button_connect_change_value"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.SpinButton.change-value.html).
pub fn SpinButton::connect_change_value(
self : SpinButton,
f : (SpinButton, ScrollType) -> Unit,
) -> UInt64 {
gtk_spin_button_connect_change_value(
self,
fn(instance_, scroll, f) { f(instance_, scroll) },
f,
)
}
///|
#borrow(instance)
extern "c" fn gtk_spin_button_connect_output(
instance : SpinButton,
function : FuncRef[(SpinButton, (SpinButton) -> Bool) -> Bool],
closure : (SpinButton) -> Bool,
) -> UInt64 = "moonbit_gtk_spin_button_connect_output"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.SpinButton.output.html).
pub fn SpinButton::connect_output(
self : SpinButton,
f : (SpinButton) -> Bool,
) -> UInt64 {
gtk_spin_button_connect_output(self, fn(instance_, f) { f(instance_) }, f)
}
///|
#borrow(instance)
extern "c" fn gtk_spin_button_connect_value_changed(
instance : SpinButton,
function : FuncRef[(SpinButton, (SpinButton) -> Unit) -> Unit],
closure : (SpinButton) -> Unit,
) -> UInt64 = "moonbit_gtk_spin_button_connect_value_changed"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.SpinButton.value-changed.html).
pub fn SpinButton::connect_value_changed(
self : SpinButton,
f : (SpinButton) -> Unit,
) -> UInt64 {
gtk_spin_button_connect_value_changed(
self,
fn(instance_, f) { f(instance_) },
f,
)
}
///|
#borrow(instance)
extern "c" fn gtk_spin_button_connect_wrapped(
instance : SpinButton,
function : FuncRef[(SpinButton, (SpinButton) -> Unit) -> Unit],
closure : (SpinButton) -> Unit,
) -> UInt64 = "moonbit_gtk_spin_button_connect_wrapped"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.SpinButton.wrapped.html).
pub fn SpinButton::connect_wrapped(
self : SpinButton,
f : (SpinButton) -> Unit,
) -> UInt64 {
gtk_spin_button_connect_wrapped(self, fn(instance_, f) { f(instance_) }, f)
}
///|
impl ISpinButton with fn configure(self, adjustment, climb_rate, digits) -> Unit {
self.as_spin_button().configure(adjustment, climb_rate, digits)
}
///|
impl ISpinButton with fn get_activates_default(self) -> Bool {
self.as_spin_button().get_activates_default()
}
///|
impl ISpinButton with fn get_adjustment(self) -> Adjustment {
self.as_spin_button().get_adjustment()
}
///|
impl ISpinButton with fn get_climb_rate(self) -> Double {
self.as_spin_button().get_climb_rate()
}
///|
impl ISpinButton with fn get_digits(self) -> UInt {
self.as_spin_button().get_digits()
}
///|
impl ISpinButton with fn get_increments(self) -> (Double, Double) {
self.as_spin_button().get_increments()
}
///|
impl ISpinButton with fn get_numeric(self) -> Bool {
self.as_spin_button().get_numeric()
}
///|
impl ISpinButton with fn get_range(self) -> (Double, Double) {
self.as_spin_button().get_range()
}
///|
impl ISpinButton with fn get_snap_to_ticks(self) -> Bool {
self.as_spin_button().get_snap_to_ticks()
}
///|
impl ISpinButton with fn get_update_policy(self) -> SpinButtonUpdatePolicy {
self.as_spin_button().get_update_policy()
}
///|
impl ISpinButton with fn get_value(self) -> Double {
self.as_spin_button().get_value()
}
///|
impl ISpinButton with fn get_value_as_int(self) -> Int {
self.as_spin_button().get_value_as_int()
}
///|
impl ISpinButton with fn get_wrap(self) -> Bool {
self.as_spin_button().get_wrap()
}
///|
impl ISpinButton with fn set_activates_default(self, activates_default) -> Unit {
self.as_spin_button().set_activates_default(activates_default)
}
///|
impl ISpinButton with fn set_adjustment(self, adjustment) -> Unit {
self.as_spin_button().set_adjustment(adjustment)
}
///|
impl ISpinButton with fn set_climb_rate(self, climb_rate) -> Unit {
self.as_spin_button().set_climb_rate(climb_rate)
}
///|
impl ISpinButton with fn set_digits(self, digits) -> Unit {
self.as_spin_button().set_digits(digits)
}
///|
impl ISpinButton with fn set_increments(self, step, page) -> Unit {
self.as_spin_button().set_increments(step, page)
}
///|
impl ISpinButton with fn set_numeric(self, numeric) -> Unit {
self.as_spin_button().set_numeric(numeric)
}
///|
impl ISpinButton with fn set_range(self, min, max) -> Unit {
self.as_spin_button().set_range(min, max)
}
///|
impl ISpinButton with fn set_snap_to_ticks(self, snap_to_ticks) -> Unit {
self.as_spin_button().set_snap_to_ticks(snap_to_ticks)
}
///|
impl ISpinButton with fn set_update_policy(self, policy) -> Unit {
self.as_spin_button().set_update_policy(policy)
}
///|
impl ISpinButton with fn set_value(self, value) -> Unit {
self.as_spin_button().set_value(value)
}
///|
impl ISpinButton with fn set_wrap(self, wrap) -> Unit {
self.as_spin_button().set_wrap(wrap)
}
///|
impl ISpinButton with fn spin(self, direction, increment) -> Unit {
self.as_spin_button().spin(direction, increment)
}
///|
impl ISpinButton with fn update(self) -> Unit {
self.as_spin_button().update()
}
///|
impl ISpinButton with fn connect_activate(self, f) -> UInt64 {
self.as_spin_button().connect_activate(f)
}
///|
impl ISpinButton with fn connect_change_value(self, f) -> UInt64 {
self.as_spin_button().connect_change_value(f)
}
///|
impl ISpinButton with fn connect_output(self, f) -> UInt64 {
self.as_spin_button().connect_output(f)
}
///|
impl ISpinButton with fn connect_value_changed(self, f) -> UInt64 {
self.as_spin_button().connect_value_changed(f)
}
///|
impl ISpinButton with fn connect_wrapped(self, f) -> UInt64 {
self.as_spin_button().connect_wrapped(f)
}
///|
pub fn SpinButton::as_widget(self : SpinButton) -> Widget = "%identity"
///|
pub impl IWidget for SpinButton with fn as_widget(self) {
self.as_widget()
}
///|
pub fn SpinButton::as_gobject_object(self : SpinButton) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for SpinButton with fn as_object(self) {
self.as_gobject_object()
}
///|
pub fn SpinButton::as_editable(self : SpinButton) -> Editable = "%identity"
///|
pub impl IEditable for SpinButton with fn as_editable(self) {
self.as_editable()
}
///|
pub fn SpinButton::as_orientable(self : SpinButton) -> Orientable = "%identity"
///|
pub impl IOrientable for SpinButton with fn as_orientable(self) {
self.as_orientable()
}