wrap playbar

This commit is contained in:
Erica Z 2024-10-30 11:42:03 +01:00
parent 07163eb4f3
commit b94d41542f
2 changed files with 32 additions and 0 deletions

View file

@ -1,2 +1,5 @@
mod window;
pub use window::Window;
mod playbar;
pub use playbar::Playbar;

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

@ -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<ffi::AudreyUiPlaybar, ffi::AudreyUiPlaybarClass>)
@extends adw::Bin, gtk::Widget,
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
match fn {
type_ => || ffi::audrey_ui_playbar_get_type(),
}
}