diff --git a/src/ui.rs b/src/ui.rs index 1a5b32a..25d76ad 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -1,2 +1,5 @@ mod window; pub use window::Window; + +mod playbar; +pub use playbar::Playbar; diff --git a/src/ui/playbar.rs b/src/ui/playbar.rs new file mode 100644 index 0000000..8de4eb7 --- /dev/null +++ b/src/ui/playbar.rs @@ -0,0 +1,29 @@ +mod ffi { + use gtk::glib; + + #[repr(C)] + pub struct AudreyUiPlaybar { + parent_instance: adw::ffi::AdwBin, + } + + #[repr(C)] + pub struct AudreyUiPlaybarClass { + parent_class: adw::ffi::AdwBinClass, + } + + extern "C" { + pub fn audrey_ui_playbar_get_type() -> glib::ffi::GType; + } +} + +use gtk::glib; + +glib::wrapper! { + pub struct Playbar(Object) + @extends adw::Bin, gtk::Widget, + @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget; + + match fn { + type_ => || ffi::audrey_ui_playbar_get_type(), + } +}