#[rustfmt::skip] // This file has been automatically generated by `jnim` from `ViewTreeObserverOnGlobalLayoutListener.class`. // DO NOT EDIT use jnim::*; pub trait ViewTreeObserverOnGlobalLayoutListener: AsRef { fn view_tree_observer_on_global_layout_listener_class(env: Option<&JEnv>) -> Option { const NAME: &'static [u8] = b"android/view/ViewTreeObserver$OnGlobalLayoutListener\0"; static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(NAME)) } fn on_global_layout<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::view_tree_observer_on_global_layout_listener_class(Some(env))?.method(env, b"onGlobalLayout\0", b"()V\0"))? .call(env, self.as_ref(), ()) } } pub struct ViewTreeObserverOnGlobalLayoutListenerObject { __object: JObject, } impl ViewTreeObserverOnGlobalLayoutListener for ViewTreeObserverOnGlobalLayoutListenerObject {} impl JNameMaker for ViewTreeObserverOnGlobalLayoutListenerObject { const JAVA_PATH: &'static [u8] = b"android/view/ViewTreeObserver$OnGlobalLayoutListener\0"; } impl JPlainMarker for ViewTreeObserverOnGlobalLayoutListenerObject { fn class(env: Option<&JEnv>) -> Option { static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(Self::JAVA_PATH)) } } impl core::ops::Deref for ViewTreeObserverOnGlobalLayoutListenerObject { type Target = JObject; fn deref(&self) -> &Self::Target { &self.__object } } impl AsRef for ViewTreeObserverOnGlobalLayoutListenerObject { fn as_ref(&self) -> &JObject { &self.__object } } #[test] fn test_type_zero() { assert_eq!(0, std::mem::size_of::()); }