diff --git a/src/ui.rs b/src/ui.rs index de3ec65..ca23d3a 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -1,10 +1,11 @@ -mod window; +pub mod window; pub use window::Window; -mod playbar; +pub mod playbar; pub use playbar::Playbar; -mod setup; +pub mod setup; pub use setup::Setup; pub mod play_queue; +pub use play_queue::PlayQueue; diff --git a/src/ui/play_queue.rs b/src/ui/play_queue.rs index e3ebdf1..7817c03 100644 --- a/src/ui/play_queue.rs +++ b/src/ui/play_queue.rs @@ -1,2 +1,32 @@ -mod song; +pub mod song; pub use song::Song; + +mod ffi { + use gtk::glib; + + #[repr(C)] + pub struct AudreyUiPlayQueue { + _data: [u8; 0], + } + + #[repr(C)] + pub struct AudreyUiPlayQueueClass { + _data: [u8; 0], + } + + extern "C" { + pub fn audrey_ui_play_queue_get_type() -> glib::ffi::GType; + } +} + +use gtk::glib; + +glib::wrapper! { + pub struct PlayQueue(Object) + @extends adw::Bin, gtk::Widget, + @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget; + + match fn { + type_ => || ffi::audrey_ui_play_queue_get_type(), + } +}