// Copyright (C) 2016-2018 Sebastian Dröge // 2016 Luis de Bethencourt // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))] #[macro_use] pub mod error; #[macro_use] pub mod plugin; pub mod bin; pub mod child_proxy; pub mod element; pub mod pad; pub mod pipeline; pub mod uri_handler; pub mod prelude { pub use super::bin::BinImpl; pub use super::child_proxy::ChildProxyImpl; pub use super::element::{ElementClassSubclassExt, ElementImpl, ElementImplExt}; pub use super::pad::PadImpl; pub use super::pipeline::PipelineImpl; pub use super::uri_handler::URIHandlerImpl; pub use super::PanicPoison; pub use glib::subclass::prelude::*; } use self::prelude::*; use glib; use std::sync::atomic::AtomicBool; #[repr(C)] pub struct ElementInstanceStruct { parent: ::GlibType, panicked: AtomicBool, } unsafe impl InstanceStruct for ElementInstanceStruct { type Type = T; } pub trait PanicPoison { fn panicked(&self) -> &AtomicBool; } impl PanicPoison for ElementInstanceStruct { fn panicked(&self) -> &AtomicBool { &self.panicked } }