// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.TlsPassword.html).
pub type TlsPassword
///|
pub(open) trait ITlsPassword {
fn as_tls_password(Self) -> TlsPassword
fn get_description(Self) -> String = _
fn get_flags(Self) -> TlsPasswordFlags = _
fn get_warning(Self) -> String = _
fn set_description(Self, String) -> Unit = _
fn set_flags(Self, TlsPasswordFlags) -> Unit = _
fn set_warning(Self, String) -> Unit = _
}
///|
pub impl ITlsPassword for TlsPassword with fn as_tls_password(self) {
self
}
///|
#borrow(description)
extern "c" fn moonbit_g_tls_password_new(
flags : Int,
description : Bytes,
) -> TlsPassword = "moonbit_g_tls_password_new"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.TlsPassword.new.html).
pub fn TlsPassword::new(
flags : TlsPasswordFlags,
description : String,
) -> TlsPassword {
moonbit_g_tls_password_new(flags.to_int(), @encoding/utf8.encode(description))
}
///|
#borrow(self_)
extern "c" fn moonbit_g_tls_password_get_description(
self_ : TlsPassword,
) -> Bytes = "moonbit_g_tls_password_get_description"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.get_description.html).
pub fn TlsPassword::get_description(self : TlsPassword) -> String {
@encoding/utf8.decode_lossy(moonbit_g_tls_password_get_description(self))
}
///|
#borrow(self_)
extern "c" fn moonbit_g_tls_password_get_flags(self_ : TlsPassword) -> Int = "moonbit_g_tls_password_get_flags"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.get_flags.html).
pub fn TlsPassword::get_flags(self : TlsPassword) -> TlsPasswordFlags {
TlsPasswordFlags::from_int(moonbit_g_tls_password_get_flags(self))
}
///|
#borrow(self_)
extern "c" fn moonbit_g_tls_password_get_warning(self_ : TlsPassword) -> Bytes = "moonbit_g_tls_password_get_warning"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.get_warning.html).
pub fn TlsPassword::get_warning(self : TlsPassword) -> String {
@encoding/utf8.decode_lossy(moonbit_g_tls_password_get_warning(self))
}
///|
#borrow(self_, description)
extern "c" fn moonbit_g_tls_password_set_description(
self_ : TlsPassword,
description : Bytes,
) = "moonbit_g_tls_password_set_description"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.set_description.html).
pub fn TlsPassword::set_description(
self : TlsPassword,
description : String,
) -> Unit {
moonbit_g_tls_password_set_description(
self,
@encoding/utf8.encode(description),
)
}
///|
#borrow(self_)
extern "c" fn moonbit_g_tls_password_set_flags(
self_ : TlsPassword,
flags : Int,
) = "moonbit_g_tls_password_set_flags"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.set_flags.html).
pub fn TlsPassword::set_flags(
self : TlsPassword,
flags : TlsPasswordFlags,
) -> Unit {
moonbit_g_tls_password_set_flags(self, flags.to_int())
}
///|
#borrow(self_, warning)
extern "c" fn moonbit_g_tls_password_set_warning(
self_ : TlsPassword,
warning : Bytes,
) = "moonbit_g_tls_password_set_warning"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TlsPassword.set_warning.html).
pub fn TlsPassword::set_warning(self : TlsPassword, warning : String) -> Unit {
moonbit_g_tls_password_set_warning(self, @encoding/utf8.encode(warning))
}
///|
impl ITlsPassword with fn get_description(self) -> String {
self.as_tls_password().get_description()
}
///|
impl ITlsPassword with fn get_flags(self) -> TlsPasswordFlags {
self.as_tls_password().get_flags()
}
///|
impl ITlsPassword with fn get_warning(self) -> String {
self.as_tls_password().get_warning()
}
///|
impl ITlsPassword with fn set_description(self, description) -> Unit {
self.as_tls_password().set_description(description)
}
///|
impl ITlsPassword with fn set_flags(self, flags) -> Unit {
self.as_tls_password().set_flags(flags)
}
///|
impl ITlsPassword with fn set_warning(self, warning) -> Unit {
self.as_tls_password().set_warning(warning)
}
///|
pub fn TlsPassword::as_gobject_object(self : TlsPassword) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for TlsPassword with fn as_object(self) {
self.as_gobject_object()
}