more entrypoint macros

This commit is contained in:
facile pop culture reference 2026-07-25 15:13:05 +03:00
parent 4cfe8d087c
commit 66ac2bcbb6
18 changed files with 696 additions and 663 deletions

View file

@ -7,13 +7,22 @@ use crate::*;
/// struct TestOut { w: u16, h: u16 };
/// impl Wide<u16> for TestOut {}
/// impl Tall<u16> for TestOut {}
/// impl Xy<u16> for TestOut { fn x (&self) -> u16 { 0 } fn y (&self) -> u16 { 0 } }
/// impl Xy<u16> for TestOut {
/// fn x (&self) -> u16 { 0 }
/// fn y (&self) -> u16 { 0 }
/// }
/// impl Screen for TestOut {
/// type Unit = u16;
/// fn show <D: Draw<Self>> (&mut self, _: D) -> Drawn<u16> {
/// println!("placed");
/// Ok(None)
/// }
/// fn show (&mut self, _: impl Draw<Self>) -> Perhaps<XYWH<u16>>
/// { println!("placed"); Ok(None) }
/// fn area (&self) -> XYWH<Self::Unit>
/// { Default::default() }
/// fn clip <T> (
/// &mut self,
/// area: impl Into<Option<XYWH<u16>>>,
/// draw: impl FnOnce(&mut Self)->T
/// ) -> T
/// { draw(self) }
/// }
///
/// impl_draw!(|self: String, to: TestOut|{