summaryrefslogtreecommitdiff
path: root/glib/src/bytes.hg
diff options
context:
space:
mode:
Diffstat (limited to 'glib/src/bytes.hg')
-rw-r--r--glib/src/bytes.hg16
1 files changed, 16 insertions, 0 deletions
diff --git a/glib/src/bytes.hg b/glib/src/bytes.hg
index db0a23f7..e01c89c1 100644
--- a/glib/src/bytes.hg
+++ b/glib/src/bytes.hg
@@ -20,6 +20,7 @@ _DEFS(glibmm,glib)
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <glibmm/error.h>
+#include <glibmm/value.h>
#include <glib.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -66,4 +67,19 @@ public:
_WRAP_METHOD(static gint compare(gconstpointer bytes1, gconstpointer bytes2), g_bytes_compare)
};
+// This is needed so Glib::RefPtr<Glib::Bytes> can be used with
+// Glib::Value and _WRAP_PROPERTY in Gio::BytesIcon.
+template <>
+class GLIBMM_API Value<Glib::RefPtr<Glib::Bytes>> : public ValueBase_Boxed
+{
+public:
+ using CppType = Glib::RefPtr<Glib::Bytes>;
+ using CType = GBytes*;
+
+ static GType value_type();
+
+ void set(const CppType& data);
+ CppType get() const;
+};
+
} // namespace Glib