dnd: Add Python API for DataTransfer and ported the example - #11686
Merged
Conversation
tronical
force-pushed
the
simon/dnd-python
branch
from
May 11, 2026 17:49
b9f5b0e to
e5e2a49
Compare
tronical
force-pushed
the
simon/dnd-python
branch
from
May 11, 2026 19:32
e5e2a49 to
ecdacb2
Compare
tronical
force-pushed
the
simon/dnd-python
branch
from
May 11, 2026 20:37
ecdacb2 to
16592df
Compare
tronical
force-pushed
the
simon/dnd-python
branch
from
May 11, 2026 21:00
16592df to
768357a
Compare
The Python API exposes `user_data`, `has_plaintext`, and `has_image` as properties. For the set/fetch operations on image and plain text, the function style syntax remains for now. This also fixes a bug with the reference docs not showing the right types due to a pdoc reference issue.
…ds to user_data Implement the GC protocol to make cycles collectible.
tronical
force-pushed
the
simon/dnd-python
branch
from
May 13, 2026 09:43
5b19a30 to
490766e
Compare
ogoffart
approved these changes
May 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Python API uses a property for user_data instead of setter and getter. For image and plain text, the function style syntax remains for now.
This also fixes a bug with the reference docs not showing the right types due to a pdoc reference issue.