// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.SearchBar.html).
pub type SearchBar
///|
pub(open) trait ISearchBar {
fn as_search_bar(Self) -> SearchBar
fn connect_entry(Self, &IEditable) -> Unit = _
fn get_child(Self) -> Widget? = _
fn get_key_capture_widget(Self) -> Widget? = _
fn get_search_mode(Self) -> Bool = _
fn get_show_close_button(Self) -> Bool = _
fn set_child(Self, &IWidget?) -> Unit = _
fn set_key_capture_widget(Self, &IWidget?) -> Unit = _
fn set_search_mode(Self, Bool) -> Unit = _
fn set_show_close_button(Self, Bool) -> Unit = _
}
///|
pub impl ISearchBar for SearchBar with fn as_search_bar(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.SearchBar.new.html).
pub extern "c" fn SearchBar::new() -> SearchBar = "moonbit_gtk_search_bar_new"
///|
#borrow(self_, entry)
extern "c" fn moonbit_gtk_search_bar_connect_entry(
self_ : SearchBar,
entry : Editable,
) = "moonbit_gtk_search_bar_connect_entry"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.connect_entry.html).
pub fn SearchBar::connect_entry(self : SearchBar, entry : &IEditable) -> Unit {
moonbit_gtk_search_bar_connect_entry(self, entry.as_editable())
}
///|
#borrow(self_)
extern "c" fn moonbit_gtk_search_bar_get_child(
self_ : SearchBar,
) -> @glib.Nullable[Widget] = "moonbit_gtk_search_bar_get_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.get_child.html).
pub fn SearchBar::get_child(self : SearchBar) -> Widget? {
let raw_result = moonbit_gtk_search_bar_get_child(self)
raw_result.to_option()
}
///|
#borrow(self_)
extern "c" fn moonbit_gtk_search_bar_get_key_capture_widget(
self_ : SearchBar,
) -> @glib.Nullable[Widget] = "moonbit_gtk_search_bar_get_key_capture_widget"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.get_key_capture_widget.html).
pub fn SearchBar::get_key_capture_widget(self : SearchBar) -> Widget? {
let raw_result = moonbit_gtk_search_bar_get_key_capture_widget(self)
raw_result.to_option()
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.get_search_mode.html).
#borrow(self)
pub extern "c" fn SearchBar::get_search_mode(self : SearchBar) -> Bool = "moonbit_gtk_search_bar_get_search_mode"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.get_show_close_button.html).
#borrow(self)
pub extern "c" fn SearchBar::get_show_close_button(self : SearchBar) -> Bool = "moonbit_gtk_search_bar_get_show_close_button"
///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_search_bar_set_child(
self_ : SearchBar,
child : @glib.Nullable[Widget],
) = "moonbit_gtk_search_bar_set_child"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.set_child.html).
pub fn SearchBar::set_child(self : SearchBar, child : &IWidget?) -> Unit {
moonbit_gtk_search_bar_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_search_bar_set_key_capture_widget(
self_ : SearchBar,
widget : @glib.Nullable[Widget],
) = "moonbit_gtk_search_bar_set_key_capture_widget"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.set_key_capture_widget.html).
pub fn SearchBar::set_key_capture_widget(
self : SearchBar,
widget : &IWidget?,
) -> Unit {
moonbit_gtk_search_bar_set_key_capture_widget(
self,
match widget {
Some(v) => @glib.Nullable::some(v.as_widget())
None => @glib.Nullable::null()
},
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.set_search_mode.html).
#borrow(self)
pub extern "c" fn SearchBar::set_search_mode(
self : SearchBar,
search_mode : Bool,
) = "moonbit_gtk_search_bar_set_search_mode"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.SearchBar.set_show_close_button.html).
#borrow(self)
pub extern "c" fn SearchBar::set_show_close_button(
self : SearchBar,
visible : Bool,
) = "moonbit_gtk_search_bar_set_show_close_button"
///|
impl ISearchBar with fn connect_entry(self, entry) -> Unit {
self.as_search_bar().connect_entry(entry)
}
///|
impl ISearchBar with fn get_child(self) -> Widget? {
self.as_search_bar().get_child()
}
///|
impl ISearchBar with fn get_key_capture_widget(self) -> Widget? {
self.as_search_bar().get_key_capture_widget()
}
///|
impl ISearchBar with fn get_search_mode(self) -> Bool {
self.as_search_bar().get_search_mode()
}
///|
impl ISearchBar with fn get_show_close_button(self) -> Bool {
self.as_search_bar().get_show_close_button()
}
///|
impl ISearchBar with fn set_child(self, child) -> Unit {
self.as_search_bar().set_child(child)
}
///|
impl ISearchBar with fn set_key_capture_widget(self, widget) -> Unit {
self.as_search_bar().set_key_capture_widget(widget)
}
///|
impl ISearchBar with fn set_search_mode(self, search_mode) -> Unit {
self.as_search_bar().set_search_mode(search_mode)
}
///|
impl ISearchBar with fn set_show_close_button(self, visible) -> Unit {
self.as_search_bar().set_show_close_button(visible)
}
///|
pub fn SearchBar::as_widget(self : SearchBar) -> Widget = "%identity"
///|
pub impl IWidget for SearchBar with fn as_widget(self) {
self.as_widget()
}
///|
pub fn SearchBar::as_gobject_object(self : SearchBar) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for SearchBar with fn as_object(self) {
self.as_gobject_object()
}