Gin
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
SystemClipboard Class Reference

Utilities for reading and writing images to the system clipboard. More...

#include <gin_systemclipboard.h>

Static Public Member Functions

static void copyImageToClipboard (const juce::Image &image)
 Copies an image to the system clipboard.
 
static juce::Image getImageFromClipboard ()
 Retrieves an image from the system clipboard.
 

Detailed Description

Utilities for reading and writing images to the system clipboard.

This class provides platform-specific clipboard operations for images, going beyond JUCE's text-only clipboard support. It handles the native image formats for each platform (NSImage on macOS, HBITMAP on Windows, etc.).

Unlike juce::SystemClipboard which only handles text, this allows you to copy and paste images directly to/from the system clipboard for integration with other applications.

See also
copyImageToClipboard, getImageFromClipboard

Member Function Documentation

◆ copyImageToClipboard()

static void SystemClipboard::copyImageToClipboard ( const juce::Image &  image)
static

Copies an image to the system clipboard.

The image will be converted to the platform's native format and placed on the clipboard, making it available to other applications.

Parameters
imageThe JUCE image to copy to the clipboard

◆ getImageFromClipboard()

static juce::Image SystemClipboard::getImageFromClipboard ( )
static

Retrieves an image from the system clipboard.

If the clipboard contains an image in a supported format, it will be converted to a JUCE Image and returned.

Returns
The image from the clipboard, or an invalid Image if the clipboard doesn't contain an image

The documentation for this class was generated from the following file: