// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.ThemedIcon.html).
pub type ThemedIcon
///|
pub(open) trait IThemedIcon {
fn as_themed_icon(Self) -> ThemedIcon
fn append_name(Self, String) -> Unit = _
fn prepend_name(Self, String) -> Unit = _
}
///|
pub impl IThemedIcon for ThemedIcon with fn as_themed_icon(self) {
self
}
///|
#borrow(iconname)
extern "c" fn moonbit_g_themed_icon_new(iconname : Bytes) -> ThemedIcon = "moonbit_g_themed_icon_new"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.ThemedIcon.new.html).
pub fn ThemedIcon::new(iconname : String) -> ThemedIcon {
moonbit_g_themed_icon_new(@encoding/utf8.encode(iconname))
}
///|
#borrow(__sa_iconnames)
extern "c" fn moonbit_g_themed_icon_new_from_names(
__sa_iconnames : FixedArray[Bytes],
len : Int,
) -> ThemedIcon = "moonbit_g_themed_icon_new_from_names"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.ThemedIcon.new_from_names.html).
pub fn ThemedIcon::new_from_names(
iconnames : Array[String],
len : Int,
) -> ThemedIcon {
moonbit_g_themed_icon_new_from_names(
FixedArray::from_array(iconnames.map(fn(s) { @encoding/utf8.encode(s) })),
len,
)
}
///|
#borrow(iconname)
extern "c" fn moonbit_g_themed_icon_new_with_default_fallbacks(
iconname : Bytes,
) -> ThemedIcon = "moonbit_g_themed_icon_new_with_default_fallbacks"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.ThemedIcon.new_with_default_fallbacks.html).
pub fn ThemedIcon::new_with_default_fallbacks(iconname : String) -> ThemedIcon {
moonbit_g_themed_icon_new_with_default_fallbacks(
@encoding/utf8.encode(iconname),
)
}
///|
#borrow(self_, iconname)
extern "c" fn moonbit_g_themed_icon_append_name(
self_ : ThemedIcon,
iconname : Bytes,
) = "moonbit_g_themed_icon_append_name"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ThemedIcon.append_name.html).
pub fn ThemedIcon::append_name(self : ThemedIcon, iconname : String) -> Unit {
moonbit_g_themed_icon_append_name(self, @encoding/utf8.encode(iconname))
}
///|
#borrow(self_, iconname)
extern "c" fn moonbit_g_themed_icon_prepend_name(
self_ : ThemedIcon,
iconname : Bytes,
) = "moonbit_g_themed_icon_prepend_name"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ThemedIcon.prepend_name.html).
pub fn ThemedIcon::prepend_name(self : ThemedIcon, iconname : String) -> Unit {
moonbit_g_themed_icon_prepend_name(self, @encoding/utf8.encode(iconname))
}
///|
#borrow(self_)
extern "c" fn moonbit_g_themed_icon_get_use_default_fallbacks(
self_ : ThemedIcon,
) -> Int = "moonbit_g_themed_icon_get_use_default_fallbacks"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/property.ThemedIcon.use-default-fallbacks.html).
pub fn ThemedIcon::get_use_default_fallbacks(self : ThemedIcon) -> Bool {
moonbit_g_themed_icon_get_use_default_fallbacks(self) != 0
}
///|
impl IThemedIcon with fn append_name(self, iconname) -> Unit {
self.as_themed_icon().append_name(iconname)
}
///|
impl IThemedIcon with fn prepend_name(self, iconname) -> Unit {
self.as_themed_icon().prepend_name(iconname)
}
///|
pub fn ThemedIcon::as_gobject_object(self : ThemedIcon) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for ThemedIcon with fn as_object(self) {
self.as_gobject_object()
}
///|
pub fn ThemedIcon::as_icon(self : ThemedIcon) -> Icon = "%identity"
///|
pub impl IIcon for ThemedIcon with fn as_icon(self) {
self.as_icon()
}