Expand description
Where a window’s platform views are made: the handle the Renderer reports for each
window that holds a NativeView.
A platform view (a web view, a video surface, a map) is made by the application, or by a
crate it uses, against the window it will sit in: an NSView is made for the window’s
content view, a child HWND for the top-level window. Only the Renderer knows those, so
it reports one NativeViewParent per window once a NativeView is in it, again when the
handle or the backing scale changes, and with a zero handle when the window closes. This
module keeps the last report of each window for the code that makes the views.
The view is then handed over with ui::NativeView (or Batch::attach_native_view) and
stays the application’s: the Renderer places it and never destroys it.
Structs§
- Native
Parent - What one window reported about the handle its platform views are made against.
- Native
Parent Subscription - A registration for parent reports. Dropping it ends the registration.
Functions§
- native_
parent - The last report for
window(0 for the single window), orNonebefore there is one. A window that closed reports a zero handle, which is returned as it came. - native_
parents - Every window’s last report, in the order they first reported.
- subscribe_
native_ parent - Registers
notifyto be called each time a window reports a different parent.