diff options
Diffstat (limited to 'include/pugl')
-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); /** |