add active list to dock object
This commit is contained in:
parent
5cda4046a6
commit
6a479899ad
20 changed files with 250 additions and 601 deletions
19
examples/appinfo/main.rs
Normal file
19
examples/appinfo/main.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use gio::DesktopAppInfo;
|
||||
use glib::prelude::*;
|
||||
use glib::subclass;
|
||||
use glib::subclass::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, glib::GBoxed)]
|
||||
#[gboxed(type_name = "MyBoxed")]
|
||||
struct MyBoxed(DesktopAppInfo);
|
||||
|
||||
pub fn main() {
|
||||
let appinfo = DesktopAppInfo::new("firefox.desktop").expect("failed to get app info");
|
||||
assert!(MyBoxed::static_type().is_valid());
|
||||
|
||||
let b = MyBoxed(appinfo);
|
||||
let v = b.to_value();
|
||||
let b2 = v.get::<&MyBoxed>().unwrap();
|
||||
assert_eq!(&b, b2);
|
||||
dbg!(&b2.0.filename());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue