// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/iface.DBusInterface.html).
pub type DBusInterface
///|
pub(open) trait IDBusInterface {
fn as_dbus_interface(Self) -> DBusInterface
fn dup_object(Self) -> DBusObject? = _
fn set_object(Self, &IDBusObject?) -> Unit = _
}
///|
pub impl IDBusInterface for DBusInterface with fn as_dbus_interface(self) {
self
}
///|
/// Implementation contract for DBusInterface.set_object. Self is the retained MoonBit state; the second parameter is the invoked DBusInterface object.
pub(open) trait VDBusInterfaceSetObject {
fn set_object(Self, DBusInterface, &IDBusObject?) -> Unit
}
///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_interface_dup_object(
self_ : DBusInterface,
) -> @glib.Nullable[DBusObject] = "moonbit_g_dbus_interface_dup_object"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusInterface.dup_object.html).
pub fn DBusInterface::dup_object(self : DBusInterface) -> DBusObject? {
let raw_result = moonbit_g_dbus_interface_dup_object(self)
raw_result.to_option()
}
///|
#borrow(self_, object)
extern "c" fn moonbit_g_dbus_interface_set_object(
self_ : DBusInterface,
object : @glib.Nullable[DBusObject],
) = "moonbit_g_dbus_interface_set_object"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusInterface.set_object.html).
pub fn DBusInterface::set_object(
self : DBusInterface,
object : &IDBusObject?,
) -> Unit {
moonbit_g_dbus_interface_set_object(
self,
match object {
Some(v) => @glib.Nullable::some(v.as_dbus_object())
None => @glib.Nullable::null()
},
)
}
///|
impl IDBusInterface with fn dup_object(self) -> DBusObject? {
self.as_dbus_interface().dup_object()
}
///|
impl IDBusInterface with fn set_object(self, object) -> Unit {
self.as_dbus_interface().set_object(object)
}