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

docs(mutations): add Attributes sections to the remaining op docstrings by ernesthenry · Pull Request #66 · pythonnative/pythonnative · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
21 changes: 21 additions & 0 deletions src/pythonnative/mutations.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ class UpdateOp:

Removed props are signaled with a value of ``None``, matching the
pre-existing handler contract.

Attributes:
tag: Unique integer identity of the target view.
changed_props: Mapping of modified prop names to their new values.
Removed props appear with a value of ``None``.
"""

tag: int
Expand All @@ -78,6 +83,12 @@ class InsertOp:
attached to the parent at a different position, it is moved rather
than duplicated. ``index`` is clamped by handlers to the current
child count.

Attributes:
parent_tag: Integer tag of the container view.
child_tag: Integer tag of the child view to insert or move.
index: Zero-based insertion index, clamped by handlers to the
current child count.
"""

parent_tag: int
Expand All @@ -92,6 +103,9 @@ class DestroyOp:
The registry drops its tag record and calls the handler's
``destroy`` hook so platform resources (listeners, timers, image
loads) can be released eagerly instead of waiting for GC.

Attributes:
tag: Unique integer identity of the view to destroy.
"""

tag: int
Expand All @@ -103,6 +117,13 @@ class SetFrameOp:

Coordinates are points relative to the parent's content origin,
exactly as computed by the layout engine.

Attributes:
tag: Unique integer identity of the target view.
x: Horizontal origin offset in points relative to the parent.
y: Vertical origin offset in points relative to the parent.
width: View width in points.
height: View height in points.
"""

tag: int
Expand Down
Loading

Back | FazBrowse Home | New Git URL