-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clipboard image data get/set methods #79561
Conversation
A rebase of godotengine#63826
boy am I glad I test things
perhaps they work?
I trust that at bruvzg knows better than me Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Gee golly I hope this works
How is this PR related to #63826? (aside from implementing |
Hi, it's going well! I can implement this without trouble in my PR once this or the other get merged, it should be pretty doable. Implementing it here wouldn't make sense as there's no Wayland code in the main branch yet.
That's a bummer. What do we do now? :/ This PR adds a set method but the other one was much more reviewed and approved... Perhaps the two could be merged together, implementing a set method there? |
Yes this PR seems an improvement of mine (#63826), there is similar base for a lot of code I think (?). All the checks passed mine and it was validated so maybe we could merge then rebase this one to get rid of duplicated code. If you have an other idea which require me to do an action let me know. |
Makes sense. |
#63826 was merged. This can now be rebased. |
#63826 got merged, which means it's time for me to rebase |
I don't think merging them would be extremely useful. If there is a demand, we can add a generic method in addition to these more specific ones, but there is no good reason to replace them. |
I never know what I'm doing
plus updating other files to use new methods, and xml tweaks
Is this merged or not? The site seems to be confused... |
Another similar PR was merged. |
@radzo73 If you're interested in further improving pasteboard support in Godot perhaps you have some thoughts on this proposal godotengine/godot-proposals#7899 . In short basically proposing to instead move the access of clipboard data into a new separate global Clipboard object, to enable more general access of multiple parallell data types on the clipboard. Basically to have it work more like macOS NSPasteboard and Windows system Clipboard class. On a more specific note regarding the macOS implementation, I think it would be worth moving away from the specific data formats specified now like This would mean it'll support all image formats the system can handle. However it also means the NSImage might not be a bitmap format, so it might not have a NSBitmapImageRep. However, all NSImages can be converted to tiff bitmap data using For setting image data to the pasteboard on macOS (and iOS) you shouldn't need to do a conversion to an NSImage (as the _convert_to_nsimg above implies). Just using |
Closing this in favor of a new PR inspired by godotengine/godot-proposals#7899 whenever I get around to working on it. |
Closes godotengine/godot-proposals#2949.
Explanation of implementations:
_convert_to_nsimg()
, very cool) to the clipboard._convert_to_nsimg()
)Unsupported (because I don't know how to):