wrap ui setup dialog

This commit is contained in:
Erica Z 2024-10-31 08:24:28 +01:00
parent d49c348781
commit f07641622e
2 changed files with 32 additions and 0 deletions

View file

@ -3,3 +3,6 @@ pub use window::Window;
mod playbar; mod playbar;
pub use playbar::Playbar; pub use playbar::Playbar;
mod setup;
pub use setup::Setup;

29
src/ui/setup.rs Normal file
View file

@ -0,0 +1,29 @@
mod ffi {
use gtk::glib;
#[repr(C)]
pub struct AudreyUiSetup {
parent_instance: adw::ffi::AdwPreferencesDialog,
}
#[repr(C)]
pub struct AudreyUiSetupClass {
parent_class: adw::ffi::AdwPreferencesDialogClass,
}
extern "C" {
pub fn audrey_ui_setup_get_type() -> glib::ffi::GType;
}
}
use gtk::glib;
glib::wrapper! {
pub struct Setup(Object<ffi::AudreyUiSetup, ffi::AudreyUiSetupClass>)
@extends adw::PreferencesDialog, adw::Dialog, gtk::Widget,
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
match fn {
type_ => || ffi::audrey_ui_setup_get_type(),
}
}