diff --git a/src/ui.rs b/src/ui.rs index 25d76ad..7241dcf 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -3,3 +3,6 @@ pub use window::Window; mod playbar; pub use playbar::Playbar; + +mod setup; +pub use setup::Setup; diff --git a/src/ui/setup.rs b/src/ui/setup.rs new file mode 100644 index 0000000..3513e1e --- /dev/null +++ b/src/ui/setup.rs @@ -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) + @extends adw::PreferencesDialog, adw::Dialog, gtk::Widget, + @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget; + + match fn { + type_ => || ffi::audrey_ui_setup_get_type(), + } +}