From 96067675d40ea564cfa9447737aaef6f087176b3 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Thu, 31 Oct 2024 11:24:58 +0100 Subject: [PATCH] empty wrapper for play queue ui --- src/ui.rs | 7 ++++--- src/ui/play_queue.rs | 32 +++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 4 deletions(-) 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(), + } +}