// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.TextChildAnchor.html).
pub type TextChildAnchor
///|
pub(open) trait ITextChildAnchor {
fn as_text_child_anchor(Self) -> TextChildAnchor
fn get_deleted(Self) -> Bool = _
fn get_widgets(Self) -> Array[Widget] = _
}
///|
pub impl ITextChildAnchor for TextChildAnchor with fn as_text_child_anchor(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.TextChildAnchor.new.html).
pub extern "c" fn TextChildAnchor::new() -> TextChildAnchor = "moonbit_gtk_text_child_anchor_new"
///|
#borrow(character)
extern "c" fn moonbit_gtk_text_child_anchor_new_with_replacement(
character : Bytes,
) -> TextChildAnchor = "moonbit_gtk_text_child_anchor_new_with_replacement"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.TextChildAnchor.new_with_replacement.html).
pub fn TextChildAnchor::new_with_replacement(
character : String,
) -> TextChildAnchor {
moonbit_gtk_text_child_anchor_new_with_replacement(
@encoding/utf8.encode(character),
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.TextChildAnchor.get_deleted.html).
#borrow(self)
pub extern "c" fn TextChildAnchor::get_deleted(self : TextChildAnchor) -> Bool = "moonbit_gtk_text_child_anchor_get_deleted"
///|
#borrow(self_, result)
extern "c" fn moonbit_gtk_text_child_anchor_get_widgets(
self_ : TextChildAnchor,
result : Ref[FixedArray[Widget]],
) = "moonbit_gtk_text_child_anchor_get_widgets"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.TextChildAnchor.get_widgets.html).
pub fn TextChildAnchor::get_widgets(self : TextChildAnchor) -> Array[Widget] {
let result_ref : Ref[FixedArray[Widget]] = Ref([])
moonbit_gtk_text_child_anchor_get_widgets(self, result_ref)
let values : Array[Widget] = Array::new(capacity=result_ref.val.length())
for i in 0.. Bool {
self.as_text_child_anchor().get_deleted()
}
///|
impl ITextChildAnchor with fn get_widgets(self) -> Array[Widget] {
self.as_text_child_anchor().get_widgets()
}
///|
pub fn TextChildAnchor::as_gobject_object(
self : TextChildAnchor,
) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for TextChildAnchor with fn as_object(self) {
self.as_gobject_object()
}