FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

pythonnative/docs/api/native_views.md at v0.41.0 · pythonnative/pythonnative · GitHub

Repository navigation

Latest commit

 

History

History
67 lines (54 loc) · 2.29 KB

File metadata and controls

67 lines (54 loc) · 2.29 KB

Native views

The boundary between PythonNative's element tree and concrete native widgets. Each commit's diff is expressed as a flat list of mutation ops referencing integer tags, applied through a single [apply_mutations][pythonnative.native_views.NativeViewRegistry.apply_mutations] call on a [NativeViewRegistry][pythonnative.native_views.NativeViewRegistry]. On device that registry is the [BridgeBackend][pythonnative.native_views.bridge_backend.BridgeBackend], which forwards the transaction to Swift and Kotlin component managers over the native bridge. The browser preview uses the same backend with a WebSocket transport to the page. In tests it dispatches to Python [ViewHandler][pythonnative.native_views.base.ViewHandler] objects (an in-memory fake).

::: pythonnative.native_views options: show_root_heading: false show_root_toc_entry: false members_order: source filters: ["!^_"]

Mutation ops

The op types themselves are documented in Mutation ops.

Event routing

The registry and its dispatch entry point are documented in Events.

Base classes

::: pythonnative.native_views.base options: show_root_heading: false show_root_toc_entry: false members_order: source filters: ["!^_"]

On-device backend

::: pythonnative.native_views.bridge_backend options: show_root_heading: false show_root_toc_entry: false members_order: source filters: ["!^_"]

!!! note "Component managers" The native implementations live in the templates: PythonNativeKit/Sources/PythonNativeKit/Components (Swift) and pythonnative/src/main/java/com/pythonnative/runtime/components (Kotlin). Their hooks are described in Native views (concept).

Next steps


Back | FazBrowse Home | New Git URL