pub trait ObjectApplication {
// Required methods
fn info(&self) -> AppInfo;
fn build_object(&mut self, width: u32, height: u32) -> ObjectNode;
// Provided methods
fn after_object_event(
&mut self,
_root: &Rc<RefCell<ObjectNode>>,
_event: &Event,
) { ... }
fn tick_object(&mut self, _root: &Rc<RefCell<ObjectNode>>) { ... }
fn destroy(&mut self) { ... }
}Expand description
Trait implemented by applications that natively build an ObjectNode tree.
This is the forward runtime carrier for LPAR phases. The legacy
Application trait remains source-compatible; runtimes that need object
metadata, invalidation, bubbling, focus, or scroll semantics should prefer
this trait when available.
Required Methods§
Sourcefn build_object(&mut self, width: u32, height: u32) -> ObjectNode
fn build_object(&mut self, width: u32, height: u32) -> ObjectNode
Construct the initial object tree for the given display dimensions.
Provided Methods§
Sourcefn after_object_event(
&mut self,
_root: &Rc<RefCell<ObjectNode>>,
_event: &Event,
)
fn after_object_event( &mut self, _root: &Rc<RefCell<ObjectNode>>, _event: &Event, )
Called after each event has been dispatched through the object tree.
Sourcefn tick_object(&mut self, _root: &Rc<RefCell<ObjectNode>>)
fn tick_object(&mut self, _root: &Rc<RefCell<ObjectNode>>)
Called once per frame for animations or deferred work.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".