// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.ListBoxRow.html).
pub type ListBoxRow
///|
pub(open) trait IListBoxRow {
fn as_list_box_row(Self) -> ListBoxRow
fn changed(Self) -> Unit = _
fn get_activatable(Self) -> Bool = _
fn get_child(Self) -> Widget? = _
fn get_header(Self) -> Widget? = _
fn get_index(Self) -> Int = _
fn get_selectable(Self) -> Bool = _
fn is_selected(Self) -> Bool = _
fn set_activatable(Self, Bool) -> Unit = _
fn set_child(Self, &IWidget?) -> Unit = _
fn set_header(Self, &IWidget?) -> Unit = _
fn set_selectable(Self, Bool) -> Unit = _
fn connect_activate(Self, (ListBoxRow) -> Unit) -> UInt64 = _
}
///|
pub impl IListBoxRow for ListBoxRow with fn as_list_box_row(self) {
self
}
///|
/// Implementation contract for ListBoxRow.activate. Self is the retained MoonBit state; the second parameter is the invoked ListBoxRow object.
pub(open) trait VListBoxRowActivate {
fn activate(Self, ListBoxRow) -> Unit
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.ListBoxRow.new.html).
pub extern "c" fn ListBoxRow::new() -> ListBoxRow = "moonbit_gtk_list_box_row_new"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.changed.html).
#borrow(self)
pub extern "c" fn ListBoxRow::changed(self : ListBoxRow) = "moonbit_gtk_list_box_row_changed"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.get_activatable.html).
#borrow(self)
pub extern "c" fn ListBoxRow::get_activatable(self : ListBoxRow) -> Bool = "moonbit_gtk_list_box_row_get_activatable"
///|
#borrow(self_)
extern "c" fn moonbit_gtk_list_box_row_get_child(
self_ : ListBoxRow,
) -> @glib.Nullable[Widget] = "moonbit_gtk_list_box_row_get_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.get_child.html).
pub fn ListBoxRow::get_child(self : ListBoxRow) -> Widget? {
let raw_result = moonbit_gtk_list_box_row_get_child(self)
raw_result.to_option()
}
///|
#borrow(self_)
extern "c" fn moonbit_gtk_list_box_row_get_header(
self_ : ListBoxRow,
) -> @glib.Nullable[Widget] = "moonbit_gtk_list_box_row_get_header"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.get_header.html).
pub fn ListBoxRow::get_header(self : ListBoxRow) -> Widget? {
let raw_result = moonbit_gtk_list_box_row_get_header(self)
raw_result.to_option()
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.get_index.html).
#borrow(self)
pub extern "c" fn ListBoxRow::get_index(self : ListBoxRow) -> Int = "moonbit_gtk_list_box_row_get_index"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.get_selectable.html).
#borrow(self)
pub extern "c" fn ListBoxRow::get_selectable(self : ListBoxRow) -> Bool = "moonbit_gtk_list_box_row_get_selectable"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.is_selected.html).
#borrow(self)
pub extern "c" fn ListBoxRow::is_selected(self : ListBoxRow) -> Bool = "moonbit_gtk_list_box_row_is_selected"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.set_activatable.html).
#borrow(self)
pub extern "c" fn ListBoxRow::set_activatable(
self : ListBoxRow,
activatable : Bool,
) = "moonbit_gtk_list_box_row_set_activatable"
///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_list_box_row_set_child(
self_ : ListBoxRow,
child : @glib.Nullable[Widget],
) = "moonbit_gtk_list_box_row_set_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.set_child.html).
pub fn ListBoxRow::set_child(self : ListBoxRow, child : &IWidget?) -> Unit {
moonbit_gtk_list_box_row_set_child(
self,
match child {
Some(v) => @glib.Nullable::some(v.as_widget())
None => @glib.Nullable::null()
},
)
}
///|
#borrow(self_, header)
extern "c" fn moonbit_gtk_list_box_row_set_header(
self_ : ListBoxRow,
header : @glib.Nullable[Widget],
) = "moonbit_gtk_list_box_row_set_header"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.set_header.html).
pub fn ListBoxRow::set_header(self : ListBoxRow, header : &IWidget?) -> Unit {
moonbit_gtk_list_box_row_set_header(
self,
match header {
Some(v) => @glib.Nullable::some(v.as_widget())
None => @glib.Nullable::null()
},
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.ListBoxRow.set_selectable.html).
#borrow(self)
pub extern "c" fn ListBoxRow::set_selectable(
self : ListBoxRow,
selectable : Bool,
) = "moonbit_gtk_list_box_row_set_selectable"
///|
#borrow(instance)
extern "c" fn gtk_list_box_row_connect_activate(
instance : ListBoxRow,
function : FuncRef[(ListBoxRow, (ListBoxRow) -> Unit) -> Unit],
closure : (ListBoxRow) -> Unit,
) -> UInt64 = "moonbit_gtk_list_box_row_connect_activate"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/signal.ListBoxRow.activate.html).
pub fn ListBoxRow::connect_activate(
self : ListBoxRow,
f : (ListBoxRow) -> Unit,
) -> UInt64 {
gtk_list_box_row_connect_activate(self, fn(instance_, f) { f(instance_) }, f)
}
///|
impl IListBoxRow with fn changed(self) -> Unit {
self.as_list_box_row().changed()
}
///|
impl IListBoxRow with fn get_activatable(self) -> Bool {
self.as_list_box_row().get_activatable()
}
///|
impl IListBoxRow with fn get_child(self) -> Widget? {
self.as_list_box_row().get_child()
}
///|
impl IListBoxRow with fn get_header(self) -> Widget? {
self.as_list_box_row().get_header()
}
///|
impl IListBoxRow with fn get_index(self) -> Int {
self.as_list_box_row().get_index()
}
///|
impl IListBoxRow with fn get_selectable(self) -> Bool {
self.as_list_box_row().get_selectable()
}
///|
impl IListBoxRow with fn is_selected(self) -> Bool {
self.as_list_box_row().is_selected()
}
///|
impl IListBoxRow with fn set_activatable(self, activatable) -> Unit {
self.as_list_box_row().set_activatable(activatable)
}
///|
impl IListBoxRow with fn set_child(self, child) -> Unit {
self.as_list_box_row().set_child(child)
}
///|
impl IListBoxRow with fn set_header(self, header) -> Unit {
self.as_list_box_row().set_header(header)
}
///|
impl IListBoxRow with fn set_selectable(self, selectable) -> Unit {
self.as_list_box_row().set_selectable(selectable)
}
///|
impl IListBoxRow with fn connect_activate(self, f) -> UInt64 {
self.as_list_box_row().connect_activate(f)
}
///|
pub fn ListBoxRow::as_widget(self : ListBoxRow) -> Widget = "%identity"
///|
pub impl IWidget for ListBoxRow with fn as_widget(self) {
self.as_widget()
}
///|
pub fn ListBoxRow::as_gobject_object(self : ListBoxRow) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for ListBoxRow with fn as_object(self) {
self.as_gobject_object()
}