diff options
author | David Robillard <d@drobilla.net> | 2022-05-22 18:26:35 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-11-11 09:54:18 -0500 |
commit | 91051e9059b67b8d633e385afb48a36d4f9467ba (patch) | |
tree | 0d221ea736e27dec7f405acfe2b866b4f81398e3 /include/pugl/pugl.h | |
parent | c59e88aa6fa60c6f7424da737fcaf0496a0bf3d6 (diff) | |
download | pugl-91051e9059b67b8d633e385afb48a36d4f9467ba.tar.gz pugl-91051e9059b67b8d633e385afb48a36d4f9467ba.tar.bz2 pugl-91051e9059b67b8d633e385afb48a36d4f9467ba.zip |
Add action parameter to puglAcceptOffer()
Diffstat (limited to 'include/pugl/pugl.h')
-rw-r--r-- | include/pugl/pugl.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 852003f..e57f6aa 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -158,6 +158,19 @@ typedef enum { PUGL_CLIPBOARD_GENERAL, ///< General clipboard for copy/pasted data } PuglClipboard; +/** + 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. +*/ +typedef enum { + PUGL_ACTION_COPY, ///< Data will be copied + PUGL_ACTION_LINK, ///< Data will be linked to + PUGL_ACTION_MOVE, ///< Data will be moved + PUGL_ACTION_PRIVATE, ///< Unspecified private action +} PuglAction; + /// Common header for all event structs typedef struct { PuglEventType type; ///< Event type @@ -1540,6 +1553,10 @@ puglGetClipboardType(const PuglView* view, the `typeIndex` argument to the call of puglGetClipboardType() that returned the accepted type. + @param action The action that will be performed on the data. This may be + used to provide visual feedback to the user, for example by changing the + cursor. + @param region The region of the view that will accept the data. This may be used by the system to avoid sending redundant events. */ @@ -1548,6 +1565,7 @@ PuglStatus puglAcceptOffer(PuglView* view, const PuglDataOfferEvent* offer, uint32_t typeIndex, + PuglAction action, PuglRect region); /** |