winit/examples
Mads Marquart dbcdb6f1b4
Add safe area and document coordinate systems (#3890)
Added `Window::safe_area`, which describes the area of the surface that
is unobstructed by notches, bezels etc. The drawing code in the examples
have been updated to draw a star inside the safe area, and the plain
background outside of it.

Also renamed `Window::inner_position` to `Window::surface_position`, and
changed it to from screen coordinates to window coordinates, to better
align how these coordinate systems work together.

Finally, added some SVG images and documentation to describe how all of
this works.

This is fully implemented on macOS and iOS, and partially on the web.

Co-authored-by: daxpedda <daxpedda@gmail.com>
2024-11-21 17:37:03 +01:00
..
data Deprecate window creation with stale event loop 2024-02-21 14:44:29 +04:00
util chore: always pull raw-window-handle 2024-11-03 00:39:01 +03:00
child_window.rs api: overhaul pointer API 2024-10-08 15:19:00 +03:00
control_flow.rs api: convert Window to dyn Window 2024-08-23 23:40:27 +03:00
pump_events.rs api: convert Window to dyn Window 2024-08-23 23:40:27 +03:00
run_on_demand.rs Rename "inner size" to "surface size" (#3889) 2024-09-04 15:04:48 +02:00
window.rs Add safe area and document coordinate systems (#3890) 2024-11-21 17:37:03 +01:00
x11_embed.rs Rename "inner size" to "surface size" (#3889) 2024-09-04 15:04:48 +02:00