diff options
Diffstat (limited to 'bindings/cpp/include/pugl/pugl.hpp')
-rw-r--r-- | bindings/cpp/include/pugl/pugl.hpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp index d691123..a3c26e0 100644 --- a/bindings/cpp/include/pugl/pugl.hpp +++ b/bindings/cpp/include/pugl/pugl.hpp @@ -641,8 +641,14 @@ public: puglSetCursor(cobj(), static_cast<PuglCursor>(cursor))); } + /// @copydoc puglRegisterDragType + Status registerDragType(const char* const type) + { + return static_cast<Status>(puglRegisterDragType(cobj(), type)); + } + /// @copydoc puglGetNumClipboardTypes - uint32_t numClipboardTypes(const Clipboard clipboard) const + size_t numClipboardTypes(const Clipboard clipboard) const { return puglGetNumClipboardTypes(cobj(), clipboard); } @@ -693,6 +699,26 @@ public: } /** + Reject data offered from a clipboard. + + This can be called instead of puglAcceptOffer() to explicitly reject the + offer. Note that drag-and-drop will still work if this isn't called, but + applications should always explicitly accept or reject each data offer for + optimal behaviour. + + @param offer The data offer event. + + @param region The region of the view that will refuse this drop. This may + be used by the system to avoid sending redundant events when the item is + dragged within the region. This is only an optimization, an all-zero + region can safely be passed. + */ + Status rejectOffer(const DataOfferEvent& offer, const Rect& region) + { + return static_cast<Status>(puglRejectOffer(cobj(), &offer, region)); + } + + /** Activate a repeating timer event. This starts a timer which will send a timer event to `view` every |