Commit bae8d173 authored by Kjell Ahlstedt's avatar Kjell Ahlstedt

Glib, Gio: Use _IS_REFCOUNTED_BOXEDTYPE where appropriate

* gio/src/dbusintrospection.hg: Add _IS_REFCOUNTED_BOXEDTYPE to
Gio::DBus::InterfaceInfo which is used in _WRAP_PROPERTY in Gio::DBus::Proxy.
* gio/src/settingsschema.hg: Add _IS_REFCOUNTED_BOXEDTYPE. SettingsSchema is
used in _WRAP_PROPERTY in Gio::Settings.
* glib/src/bytearray.[ccg|hg]: Replace the hand-coded Value specialization
with _IS_REFCOUNTED_BOXEDTYPE.
parent be00e913
......@@ -105,6 +105,7 @@ public:
class InterfaceInfo final
{
_CLASS_OPAQUE_REFCOUNTED(InterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref, g_dbus_interface_info_unref)
_IS_REFCOUNTED_BOXEDTYPE(g_dbus_interface_info_get_type)
_IGNORE(g_dbus_interface_info_ref, g_dbus_interface_info_unref)
public:
......
......@@ -53,6 +53,7 @@ namespace Gio
class SettingsSchema final
{
_CLASS_OPAQUE_REFCOUNTED(SettingsSchema, GSettingsSchema, NONE, g_settings_schema_ref, g_settings_schema_unref)
_IS_REFCOUNTED_BOXEDTYPE
protected:
_IGNORE(g_settings_schema_ref, g_settings_schema_unref)
......
......@@ -50,10 +50,4 @@ ByteArray::get_data() const
return gobj()->data;
}
GType
ByteArray::get_type()
{
return g_byte_array_get_type();
}
} // namespace Glib
......@@ -44,6 +44,7 @@ namespace Glib
class ByteArray final
{
_CLASS_OPAQUE_REFCOUNTED(ByteArray, GByteArray, NONE, g_byte_array_ref, g_byte_array_unref)
_IS_REFCOUNTED_BOXEDTYPE
_IGNORE(g_byte_array_ref, g_byte_array_unref)
public:
......@@ -90,21 +91,6 @@ public:
_IGNORE(g_byte_array_sort)
_WRAP_METHOD(Glib::RefPtr<ByteArray> set_size(guint length), g_byte_array_set_size, refreturn)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
#endif
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value< Glib::RefPtr<Glib::ByteArray> > : public ValueBase_Boxed
{
public:
static GType value_type() { return Glib::ByteArray::get_type(); }
void set(const Glib::RefPtr<Glib::ByteArray>& array) { set_boxed(Glib::unwrap(array)); }
Glib::RefPtr<Glib::ByteArray> get() { return make_refptr_for_instance<Glib::ByteArray>(reinterpret_cast<Glib::ByteArray*>(get_boxed())); }
};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
} // namespace Glib
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment