// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/iface.SelectionModel.html).
pub type SelectionModel
///|
pub(open) trait ISelectionModel {
fn as_selection_model(Self) -> SelectionModel
fn get_selection(Self) -> Bitset = _
fn get_selection_in_range(Self, UInt, UInt) -> Bitset = _
fn is_selected(Self, UInt) -> Bool = _
fn select_all(Self) -> Bool = _
fn select_item(Self, UInt, Bool) -> Bool = _
fn select_range(Self, UInt, UInt, Bool) -> Bool = _
fn selection_changed(Self, UInt, UInt) -> Unit = _
fn set_selection(Self, Bitset, Bitset) -> Bool = _
fn unselect_all(Self) -> Bool = _
fn unselect_item(Self, UInt) -> Bool = _
fn unselect_range(Self, UInt, UInt) -> Bool = _
}
///|
pub impl ISelectionModel for SelectionModel with fn as_selection_model(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.get_selection.html).
#borrow(self)
pub extern "c" fn SelectionModel::get_selection(
self : SelectionModel,
) -> Bitset = "moonbit_gtk_selection_model_get_selection"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.get_selection_in_range.html).
#borrow(self)
pub extern "c" fn SelectionModel::get_selection_in_range(
self : SelectionModel,
position : UInt,
n_items : UInt,
) -> Bitset = "moonbit_gtk_selection_model_get_selection_in_range"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.is_selected.html).
#borrow(self)
pub extern "c" fn SelectionModel::is_selected(
self : SelectionModel,
position : UInt,
) -> Bool = "moonbit_gtk_selection_model_is_selected"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.select_all.html).
#borrow(self)
pub extern "c" fn SelectionModel::select_all(self : SelectionModel) -> Bool = "moonbit_gtk_selection_model_select_all"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.select_item.html).
#borrow(self)
pub extern "c" fn SelectionModel::select_item(
self : SelectionModel,
position : UInt,
unselect_rest : Bool,
) -> Bool = "moonbit_gtk_selection_model_select_item"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.select_range.html).
#borrow(self)
pub extern "c" fn SelectionModel::select_range(
self : SelectionModel,
position : UInt,
n_items : UInt,
unselect_rest : Bool,
) -> Bool = "moonbit_gtk_selection_model_select_range"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.selection_changed.html).
#borrow(self)
pub extern "c" fn SelectionModel::selection_changed(
self : SelectionModel,
position : UInt,
n_items : UInt,
) = "moonbit_gtk_selection_model_selection_changed"
///|
#borrow(self_, selected, mask)
extern "c" fn moonbit_gtk_selection_model_set_selection(
self_ : SelectionModel,
selected : Bitset,
mask : Bitset,
) -> Bool = "moonbit_gtk_selection_model_set_selection"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.set_selection.html).
pub fn SelectionModel::set_selection(
self : SelectionModel,
selected : Bitset,
mask : Bitset,
) -> Bool {
moonbit_gtk_selection_model_set_selection(self, selected, mask)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.unselect_all.html).
#borrow(self)
pub extern "c" fn SelectionModel::unselect_all(self : SelectionModel) -> Bool = "moonbit_gtk_selection_model_unselect_all"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.unselect_item.html).
#borrow(self)
pub extern "c" fn SelectionModel::unselect_item(
self : SelectionModel,
position : UInt,
) -> Bool = "moonbit_gtk_selection_model_unselect_item"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SelectionModel.unselect_range.html).
#borrow(self)
pub extern "c" fn SelectionModel::unselect_range(
self : SelectionModel,
position : UInt,
n_items : UInt,
) -> Bool = "moonbit_gtk_selection_model_unselect_range"
///|
impl ISelectionModel with fn get_selection(self) -> Bitset {
self.as_selection_model().get_selection()
}
///|
impl ISelectionModel with fn get_selection_in_range(self, position, n_items) -> Bitset {
self.as_selection_model().get_selection_in_range(position, n_items)
}
///|
impl ISelectionModel with fn is_selected(self, position) -> Bool {
self.as_selection_model().is_selected(position)
}
///|
impl ISelectionModel with fn select_all(self) -> Bool {
self.as_selection_model().select_all()
}
///|
impl ISelectionModel with fn select_item(self, position, unselect_rest) -> Bool {
self.as_selection_model().select_item(position, unselect_rest)
}
///|
impl ISelectionModel with fn select_range(
self,
position,
n_items,
unselect_rest,
) -> Bool {
self.as_selection_model().select_range(position, n_items, unselect_rest)
}
///|
impl ISelectionModel with fn selection_changed(self, position, n_items) -> Unit {
self.as_selection_model().selection_changed(position, n_items)
}
///|
impl ISelectionModel with fn set_selection(self, selected, mask) -> Bool {
self.as_selection_model().set_selection(selected, mask)
}
///|
impl ISelectionModel with fn unselect_all(self) -> Bool {
self.as_selection_model().unselect_all()
}
///|
impl ISelectionModel with fn unselect_item(self, position) -> Bool {
self.as_selection_model().unselect_item(position)
}
///|
impl ISelectionModel with fn unselect_range(self, position, n_items) -> Bool {
self.as_selection_model().unselect_range(position, n_items)
}
///|
pub fn SelectionModel::as_gio_list_model(
self : SelectionModel,
) -> @gio.ListModel = "%identity"
///|
pub impl @gio.IListModel for SelectionModel with fn as_list_model(self) {
self.as_gio_list_model()
}