UI: Capabilities Flag for Clipboard Image copy/paste

This adds an WM_capabilities_flag to indicate that a platform
implements support for copying and pasting images using a shared
clipboard.

Pull Request: https://projects.blender.org/blender/blender/pulls/106990
This commit is contained in:
Harley Acheson
2023-04-16 21:04:55 +02:00
committed by Harley Acheson
parent 254d148458
commit de7e3454fb
8 changed files with 24 additions and 5 deletions

View File

@@ -138,6 +138,8 @@ typedef enum eWM_CapabilitiesFlag {
* Reading from the back-buffer is supported.
*/
WM_CAPABILITY_GPU_FRONT_BUFFER_READ = (1 << 3),
/** Ability to copy/paste system clipboard images. */
WM_CAPABILITY_CLIPBOARD_IMAGES = (1 << 4),
} eWM_CapabilitiesFlag;
eWM_CapabilitiesFlag WM_capabilities_flag(void);

View File

@@ -1852,6 +1852,9 @@ eWM_CapabilitiesFlag WM_capabilities_flag(void)
if (ghost_flag & GHOST_kCapabilityGPUReadFrontBuffer) {
flag |= WM_CAPABILITY_GPU_FRONT_BUFFER_READ;
}
if (ghost_flag & GHOST_kCapabilityClipboardImages) {
flag |= WM_CAPABILITY_CLIPBOARD_IMAGES;
}
return flag;
}