Clipboard Events

enum PuglClipboard

A system clipboard.

A clipboard provides a mechanism for transferring data between views, including views in different processes. Clipboards are used for both “copy and paste” and “drag and drop” interactions.

enumerator PUGL_CLIPBOARD_GENERAL

General clipboard for copy/pasted data.

enumerator PUGL_CLIPBOARD_DRAG

Drag clipboard for drag and drop data.

enum PuglDataAction

An action that can be performed on data from a clipboard.

This is given when accepting a data offer, so the system can provide user feedback, for example by changing the cursor or showing an animation.

enumerator PUGL_DATA_ACTION_COPY

Data will be copied.

Data will be linked to.

enumerator PUGL_DATA_ACTION_MOVE

Data will be moved.

enumerator PUGL_DATA_ACTION_PRIVATE

Unspecified private action.

struct PuglDataEvent

Clipboard data event.

This is sent after accepting a data offer when the data has been retrieved and converted. While handling this event, the data can be accessed with puglGetClipboard().

PuglEventType type

PuglEventType.PUGL_DATA

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

double time

Time in seconds.

double x

View-relative X coordinate.

double y

View-relative Y coordinate.

PuglClipboard clipboard

Clipboard with available data.

uint32_t typeIndex

Index of datatype.

struct PuglDataOfferEvent

Clipboard data offer event.

This is sent when a clipboard has data present, possibly with several datatypes. While handling this event, the types can be investigated with puglGetClipboardType() to decide whether to accept the offer with puglAcceptOffer().

PuglEventType type

PuglEventType.PUGL_DATA_OFFER

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

double time

Time in seconds.

double x

View-relative X coordinate.

double y

View-relative Y coordinate.

PuglClipboard clipboard

Clipboard with available data.