// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{ffi, DBusConnection, MenuModel};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "GDBusMenuModel")]
    pub struct DBusMenuModel(Object<ffi::GDBusMenuModel>) @extends MenuModel;

    match fn {
        type_ => || ffi::g_dbus_menu_model_get_type(),
    }
}

impl DBusMenuModel {
    #[doc(alias = "g_dbus_menu_model_get")]
    pub fn get(
        connection: &DBusConnection,
        bus_name: Option<&str>,
        object_path: &str,
    ) -> DBusMenuModel {
        unsafe {
            from_glib_full(ffi::g_dbus_menu_model_get(
                connection.to_glib_none().0,
                bus_name.to_glib_none().0,
                object_path.to_glib_none().0,
            ))
        }
    }
}
