From c59e88aa6fa60c6f7424da737fcaf0496a0bf3d6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 May 2022 17:48:16 -0400 Subject: Add API support for multiple clipboards Adds a PuglClipboard enum, and uses it everywhere necessary to "structurally" support multiple clipboards. Towards re-using this API to support DnD. --- bindings/cpp/include/pugl/pugl.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bindings/cpp/include') diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp index b7f9fcf..18dd015 100644 --- a/bindings/cpp/include/pugl/pugl.hpp +++ b/bindings/cpp/include/pugl/pugl.hpp @@ -138,6 +138,9 @@ using ViewStyleFlag = PuglViewStyleFlag; /// @copydoc PuglViewStyleFlags using ViewStyleFlags = PuglViewStyleFlags; +/// @copydoc PuglClipboard +using Clipboard = PuglClipboard; + /// @copydoc PuglRealizeEvent using RealizeEvent = Event; @@ -636,15 +639,16 @@ public: } /// @copydoc puglGetNumClipboardTypes - uint32_t numClipboardTypes() const + uint32_t numClipboardTypes(const Clipboard clipboard) const { - return puglGetNumClipboardTypes(cobj()); + return puglGetNumClipboardTypes(cobj(), clipboard); } /// @copydoc puglGetClipboardType - const char* clipboardType(const uint32_t typeIndex) const + const char* clipboardType(const Clipboard clipboard, + const uint32_t typeIndex) const { - return puglGetClipboardType(cobj(), typeIndex); + return puglGetClipboardType(cobj(), clipboard, typeIndex); } /** -- cgit v1.2.1