From 661bb1019fbce1ad4cef9344fc3706cef79a82de Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 7 Sep 2020 00:17:52 -0700 Subject: [PATCH] Imported Upstream version 2.51.1.1 --- .gitignore | 12 +---- NEWS | 71 +++++++++++++++++++++++++++- configure.ac | 2 +- examples/Makefile.am | 11 ++--- gio/src/actionmap.hg | 11 ++--- gio/src/application.ccg | 1 + gio/src/application.hg | 15 +++--- gio/src/dbusactiongroup.hg | 5 +- gio/src/dbusinterface.hg | 2 - gio/src/dbusproxy.hg | 9 ++-- gio/src/drive.hg | 16 ++----- gio/src/gio_vfuncs.defs | 16 ++++++- gio/src/menu.hg | 8 ++-- gio/src/menuattributeiter.hg | 5 +- gio/src/menumodel.hg | 5 +- gio/src/mount.hg | 2 +- gio/src/mountoperation.hg | 8 +--- gio/src/pollableinputstream.hg | 2 + gio/src/pollableoutputstream.hg | 2 + gio/src/remoteactiongroup.hg | 14 ++---- gio/src/resolver.hg | 3 +- gio/src/settings.ccg | 1 + gio/src/settings.hg | 16 +++---- gio/src/settingsschemakey.hg | 11 +++-- gio/src/socketclient.hg | 4 +- gio/src/volumemonitor.hg | 5 +- glib/glibmm/class.cc | 11 +---- glib/glibmm/class.h | 23 +++------ glib/glibmm/dispatcher.cc | 12 ++--- glib/glibmm/interface.cc | 6 +-- glib/glibmm/main.cc | 76 +++++++----------------------- glib/glibmm/main.h | 27 +++++++---- glib/glibmm/object.cc | 35 ++++---------- glib/glibmm/objectbase.cc | 35 +++----------- glib/glibmm/objectbase.h | 55 +++++++--------------- glib/glibmm/signalproxy.cc | 31 ++++-------- glib/glibmm/signalproxy.h | 101 ++++++++++++---------------------------- tools/m4/convert_gio.m4 | 2 +- tools/m4/signal.m4 | 12 ++--- 39 files changed, 283 insertions(+), 400 deletions(-) diff --git a/.gitignore b/.gitignore index f66dece..434a9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -52,8 +52,8 @@ giommconfig.h /docs/reference/Doxyfile /docs/reference/doxygen.log /docs/reference/doxygen*.db -/docs/reference/glibmm-2.4.devhelp2 -/docs/reference/glibmm-2.4.tag +/docs/reference/glibmm-*.devhelp2 +/docs/reference/glibmm-*.tag /docs/reference/html/ # examples/ @@ -75,8 +75,6 @@ giommconfig.h /examples/settings/gschemas.compiled /examples/thread/dispatcher /examples/thread/dispatcher2 -/examples/thread/thread -/examples/thread/threadpool # gio/ /gio/giomm-*.pc @@ -139,10 +137,6 @@ giommconfig.h /glib/glibmm/shell.h /glib/glibmm/spawn.cc /glib/glibmm/spawn.h -/glib/glibmm/thread.cc -/glib/glibmm/thread.h -/glib/glibmm/threads.cc -/glib/glibmm/threads.h /glib/glibmm/timezone.cc /glib/glibmm/timezone.h /glib/glibmm/unicode.cc @@ -151,8 +145,6 @@ giommconfig.h /glib/glibmm/uriutils.h /glib/glibmm/value_basictypes.cc /glib/glibmm/value_basictypes.h -/glib/glibmm/valuearray.cc -/glib/glibmm/valuearray.h /glib/glibmm/variant.cc /glib/glibmm/variant.h /glib/glibmm/variant_basictypes.cc diff --git a/NEWS b/NEWS index fa3d1d0..8a2ead1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,72 @@ +2.51.1.1: + +General: +* Remove no_default_handler in some _WRAP_SIGNAL()s + This allows application developers to simply override + the default on_*() signal handlers for these signals too, + as they can already with most other signals. + If you are using, for instance, the -Wsuggest-override + compiler option, watch out for new compiler warnings suggesting + that your existing signal handler should now be marked with the + override keyword - that means you should do so but you should + also stop connecting the signal handler in your code. + (Kjell Ahlstedt) +* Build: examples/Makefile.am: Re-insert the dispatcher examples + (Kjell Ahlstedt) + +Glib: +* Dispatcher: Don't cast a HANDLE to an int on Windows. + (Kjell Ahlstedt) Bug #772074 +* ObjectBase: + - Remove connect_property_changed_with_return() + and let connect_property_changed() return a sigc::connection. + (Kjell Ahlstedt) + - Use std::forward_list for interface class pointers. + (Kjell Ahlstedt) + - Replace extra_object_base_data map by instance data. + (Kjell Ahlstedt) +* ObjectBase: overload get_property(). + (Marcin Kolny) +* Main, IOSource: autodeduce type of fd field. + (Marcin Kolny) Bug #770274 +* Settings: Add property_settings_schema(), and update + signal_changed(). + (Kjell Ahlstedt) +* Settings: Make set_enum() + set_flags() usable + (djb) Bug #774647 +* SettingsSchemaKey: Add missing value/range methods + (Daniel Boles) Bug #774903 +* SignalProxyNormal: Remove connect_() and connect_notify_(), + adding connect_impl(). + (Kjell Ahlstedt) +* Rename SignalProxyDetailed to SignalProxyDetailedBase, and + SignalProxyDetailedAnyType to SignalProxyDetailed. + Remove SignalProxyDetailed# aliases (# = 0..6). + (Kjell Ahlstedt) +* Source: Replace extra_source_data by instance data. + (Kjell Ahlstedt) Bug #561885 + +Gio: +* ActionMap::add_action_vfunc(): Const correction. + (Murray Cumming) +* Application: Add dbus_register/unregister_vfunc. + (Ritesh Khadgaray, Kjell Ahlstedt) Bug #762191 +* Menu: insert/prepend/add_item(): Const correction. + (Murray Cumming) +* MenuAttributeIter: get_value(): Const correction. + (Murray Cumming) +* MenuModel: get_item_atribute(): const correction. + (Murray Cumming) +* RemoteActionGroup: Derive from Gio::ActionGroup. + (Murray Cumming) + +Gio::Dbus: +* Proxy: Fix memory leak in get_cached_property_names(). + (Kjell Ahlstedt) Bug #775210 +* Proxy: Derive from (and implement) Gio::DBus::Interface. + (Murray Cumming) + + 2.51.1: This is the first release of the glibmm-2.52 API/ABI. @@ -70,7 +139,7 @@ gmmproc: * Remove DocsParser::non_object_method_name() (Kjell Ahlstedt) * swap() implementations: Use std::swap(). - (Murray Cumming + (Murray Cumming) Documentation: * Gio::SocketService: Update the class documentation diff --git a/configure.ac b/configure.ac index 03d994a..899d3d3 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . -AC_INIT([glibmm], [2.51.1], +AC_INIT([glibmm], [2.51.1.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm], [glibmm], [http://www.gtkmm.org/]) AC_PREREQ([2.59]) diff --git a/examples/Makefile.am b/examples/Makefile.am index 885552d..a32cfb8 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -32,7 +32,9 @@ check_PROGRAMS = \ options/example \ properties/example \ regex/example \ - settings/settings + settings/settings \ + thread/dispatcher \ + thread/dispatcher2 glibmm_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib) giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio) @@ -47,7 +49,6 @@ local_libgiomm = $(top_builddir)/gio/giomm/libgiomm-$(GIOMM_API_VERSION).la LDADD = $(GLIBMM_LIBS) $(local_libglibmm) giomm_ldadd = $(GIOMM_LIBS) $(local_libglibmm) $(local_libgiomm) -thread_ldadd = $(GLIBMM_LIBS) $(local_libglibmm) child_watch_child_watch_SOURCES = child_watch/main.cc iochannel_stream_example_SOURCES = \ @@ -64,13 +65,7 @@ properties_example_SOURCES = properties/properties_example.cc regex_example_SOURCES = regex/main.cc thread_dispatcher_SOURCES = thread/dispatcher.cc -thread_dispatcher_LDADD = $(thread_ldadd) thread_dispatcher2_SOURCES = thread/dispatcher2.cc -thread_dispatcher2_LDADD = $(thread_ldadd) -thread_thread_SOURCES = thread/thread.cc -thread_thread_LDADD = $(thread_ldadd) -thread_threadpool_SOURCES = thread/threadpool.cc -thread_threadpool_LDADD = $(thread_ldadd) # giomm examples dbus_session_bus_service_SOURCES = dbus/session_bus_service.cc diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg index e3bcdf0..b5f885d 100644 --- a/gio/src/actionmap.hg +++ b/gio/src/actionmap.hg @@ -31,10 +31,6 @@ namespace Gio class Action; -//TODO: Instead derive from ActionGroup, when we can break ABI, -//because the GActionMap interface requires the GActionGroup interface. -//LoadableIcon does a similar thing correctly, for instance. - /** ActionMap - Interface for action containers. * The ActionMap interface is implemented by ActionGroup implementations that * operate by containing a number of named Action instances, such as @@ -185,10 +181,9 @@ public: #m4 _CONVERSION(`Glib::RefPtr', `GAction*', `Glib::unwrap($3)') _WRAP_VFUNC(Glib::RefPtr lookup_action(const Glib::ustring& name) const, "lookup_action", refreturn) - //TODO: Change this to use const & when we can break ABI. - // ( Changing it causes a symbol lookup error when trying to run already-built applications. ) -#m4 _CONVERSION(`GAction*', `Glib::RefPtr', `Glib::wrap($3, true)') - _WRAP_VFUNC(void add_action(Glib::RefPtr action) const, "add_action") +#m4 _CONVERSION(`GAction*', `const Glib::RefPtr&', `Glib::wrap($3, true)') + _WRAP_VFUNC(void add_action(const Glib::RefPtr& action) const, "add_action") + _WRAP_VFUNC(void remove_action(const Glib::ustring& name), "remove_action") }; diff --git a/gio/src/application.ccg b/gio/src/application.ccg index 785d050..97f1c27 100644 --- a/gio/src/application.ccg +++ b/gio/src/application.ccg @@ -21,6 +21,7 @@ #include #include // std::memset() #include +#include #include namespace // anonymous diff --git a/gio/src/application.hg b/gio/src/application.hg index ea752fe..e4d3a63 100644 --- a/gio/src/application.hg +++ b/gio/src/application.hg @@ -367,13 +367,9 @@ public: _WRAP_PROPERTY("resource-base-path", bool, newin "2,44") _WRAP_PROPERTY("is-busy", bool) -//#m4 _CONVERSION(`const gchar*', `const Glib::ustring&', `Glib::ustring($3)') -//#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)') - _WRAP_SIGNAL(void startup(), "startup") - //TODO: Remove no_default_handler when we can break ABI - _WRAP_SIGNAL(void shutdown(), "shutdown", no_default_handler, newin "2,46") + _WRAP_SIGNAL(void shutdown(), "shutdown", newin "2,46") _WRAP_SIGNAL(void activate(), "activate") @@ -385,12 +381,12 @@ public: #m4 _CONVERSION(`GApplicationCommandLine*', `const Glib::RefPtr&',`Glib::wrap($3, true)') _WRAP_SIGNAL(int command_line(const Glib::RefPtr& command_line), "command-line") - //TODO: Remove no_default_handler when we can break ABI //TODO: Avoid the use of the Variants in the VariantDict? //options must be non-const. The handler is meant to modify it. See the description //of add_main_option_entry(OptionType, ...). #m4 _CONVERSION(`GVariantDict*',`const Glib::RefPtr&',`Glib::wrap($3, true)') - _WRAP_SIGNAL(int handle_local_options(const Glib::RefPtr& options), "handle-local-options", no_default_handler) +#m4 _CONVERSION(`const Glib::RefPtr&',`GVariantDict*',__CONVERT_REFPTR_TO_P) + _WRAP_SIGNAL(int handle_local_options(const Glib::RefPtr& options), "handle-local-options") protected: virtual void on_open(const type_vec_files& files, const Glib::ustring& hint); @@ -408,7 +404,6 @@ protected: _WRAP_VFUNC(bool local_command_line(char**& arguments, int& exit_status), local_command_line) #m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3,true)') - _WRAP_VFUNC(void before_emit(const Glib::VariantBase& platform_data), "before_emit") _WRAP_VFUNC(void after_emit(const Glib::VariantBase& platform_data), "after_emit") @@ -418,6 +413,10 @@ protected: _WRAP_VFUNC(void quit_mainloop(), "quit_mainloop") _WRAP_VFUNC(void run_mainloop(), "run_mainloop") +#m4 _CONVERSION(`GDBusConnection*', `const Glib::RefPtr&', `Glib::wrap($3, true)') +#m4 _CONVERSION(`const Glib::RefPtr&',`GDBusConnection*',__CONVERT_REFPTR_TO_P) + _WRAP_VFUNC(bool dbus_register(const Glib::RefPtr& connection, const Glib::ustring& object_path), "dbus_register", errthrow) + _WRAP_VFUNC(void dbus_unregister(const Glib::RefPtr& connection, const Glib::ustring& object_path), "dbus_unregister") private: /** This is just a way to call Glib::init() (which calls g_type_init()) before diff --git a/gio/src/dbusactiongroup.hg b/gio/src/dbusactiongroup.hg index 3872c1c..ecd72ad 100644 --- a/gio/src/dbusactiongroup.hg +++ b/gio/src/dbusactiongroup.hg @@ -39,11 +39,10 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,32} */ class ActionGroup -: public Glib::Object, public ::Gio::ActionGroup, public RemoteActionGroup +: public Glib::Object, public Gio::RemoteActionGroup { _CLASS_GOBJECT(ActionGroup, GDBusActionGroup, G_DBUS_ACTION_GROUP, Glib::Object, GObject) - _IMPLEMENTS_INTERFACE(::Gio::ActionGroup) - _IMPLEMENTS_INTERFACE(RemoteActionGroup) + _IMPLEMENTS_INTERFACE(Gio::RemoteActionGroup) protected: _CTOR_DEFAULT diff --git a/gio/src/dbusinterface.hg b/gio/src/dbusinterface.hg index ad11ea1..485d2b5 100644 --- a/gio/src/dbusinterface.hg +++ b/gio/src/dbusinterface.hg @@ -38,8 +38,6 @@ class Object; _GMMPROC_EXTRA_NAMESPACE(DBus) -//TODO: Have Proxy derive from this interface when there is an ABI break. - /** Interface - Base type for D-Bus interfaces. * The Interface type is the base type for D-Bus interfaces both on the service * side (see InterfaceSkeleton) and client side (see Proxy). diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg index 2e3729f..4e5e582 100644 --- a/gio/src/dbusproxy.hg +++ b/gio/src/dbusproxy.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2010 The giomm Development Team * * This library is free software; you can redistribute it and/or @@ -20,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -66,11 +65,13 @@ _WRAP_ENUM(ProxyFlags, GDBusProxyFlags, s#^DBUS_##, NO_GTYPE) class Proxy : public Glib::Object, public Initable, - public AsyncInitable + public AsyncInitable, + public Interface { _CLASS_GOBJECT(Proxy, GDBusProxy, G_DBUS_PROXY, Glib::Object, GObject) _IMPLEMENTS_INTERFACE(Initable) _IMPLEMENTS_INTERFACE(AsyncInitable) + _IMPLEMENTS_INTERFACE(DBus::Interface) protected: @@ -255,7 +256,7 @@ public: _WRAP_METHOD(void set_cached_property(const Glib::ustring& property_name, const Glib::VariantBase& value), g_dbus_proxy_set_cached_property) -#m4 _CONVERSION(`gchar**', `Glib::StringArrayHandle', `Glib::StringArrayHandle($3)') +#m4 _CONVERSION(`gchar**', `Glib::StringArrayHandle', `Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)') _WRAP_METHOD(Glib::StringArrayHandle get_cached_property_names() const, g_dbus_proxy_get_cached_property_names) _WRAP_METHOD(void set_interface_info(const Glib::RefPtr& info), g_dbus_proxy_set_interface_info) diff --git a/gio/src/drive.hg b/gio/src/drive.hg index a4eecee..0b87d19 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -153,18 +153,10 @@ public: _WRAP_METHOD(Glib::ustring get_sort_key() const, g_drive_get_sort_key) - /** @newin{2,20} - */ - _WRAP_SIGNAL(void changed(), changed, no_default_handler) - - /** @newin{2,20} - */ - _WRAP_SIGNAL(void disconnected(), disconnected, no_default_handler) - - /** @newin{2,20} - */ - _WRAP_SIGNAL(void eject_button(), eject_button, no_default_handler) - _WRAP_SIGNAL(void stop_button(), stop_button, no_default_handler) + _WRAP_SIGNAL(void changed(), changed, newin "2,20") + _WRAP_SIGNAL(void disconnected(), disconnected, newin "2,20") + _WRAP_SIGNAL(void eject_button(), eject_button, newin "2,20") + _WRAP_SIGNAL(void stop_button(), stop_button) //_WRAP_VFUNC(Glib::ustring get_name() const, get_name) //Careful of ref-counting: //_WRAP_VFUNC(Glib::RefPtr get_icon() const, get_icon) diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs index 4bcfa1e..116b003 100644 --- a/gio/src/gio_vfuncs.defs +++ b/gio/src/gio_vfuncs.defs @@ -311,9 +311,23 @@ (return-type "void") ) -(define-vfunc shutdown +(define-vfunc dbus_register + (of-object "GApplication") + (return-type "gboolean") + (parameters + '("GDBusConnection*" "connection") + '("const-gchar*" "object_path") + '("GError**" "error") + ) +) + +(define-vfunc dbus_unregister (of-object "GApplication") (return-type "void") + (parameters + '("GDBusConnection*" "connection") + '("const-gchar*" "object_path") + ) ) ; GAsyncInitable diff --git a/gio/src/menu.hg b/gio/src/menu.hg index ad129a9..e3f1d6d 100644 --- a/gio/src/menu.hg +++ b/gio/src/menu.hg @@ -48,10 +48,9 @@ public: _WRAP_METHOD(void freeze(), g_menu_freeze) - //TODO: Make the item "const Glib::RefPtr&" when we can break ABI? The function is documented as just copying its attributes. - _WRAP_METHOD(void insert_item(int position, const Glib::RefPtr& item), g_menu_insert_item) - _WRAP_METHOD(void prepend_item(const Glib::RefPtr& item), g_menu_prepend_item) - _WRAP_METHOD(void append_item(const Glib::RefPtr& item), g_menu_append_item) + _WRAP_METHOD(void insert_item(int position, const Glib::RefPtr& item), g_menu_insert_item) + _WRAP_METHOD(void prepend_item(const Glib::RefPtr& item), g_menu_prepend_item) + _WRAP_METHOD(void append_item(const Glib::RefPtr& item), g_menu_append_item) _WRAP_METHOD(void remove(int position), g_menu_remove) _WRAP_METHOD(void remove_all(), g_menu_remove_all) @@ -63,6 +62,7 @@ public: _WRAP_METHOD(void prepend(const Glib::ustring& label, const Glib::ustring& detailed_action{?}), g_menu_prepend) _WRAP_METHOD(void append(const Glib::ustring& label, const Glib::ustring& detailed_action{?}), g_menu_append) +// TODO: Should the MenuModel be const too? _WRAP_METHOD(void insert_section(int position, const Glib::ustring& label{?}, const Glib::RefPtr& section), g_menu_insert_section) _WRAP_METHOD(void prepend_section(const Glib::ustring& label{?}, const Glib::RefPtr& section), g_menu_prepend_section) _WRAP_METHOD(void append_section(const Glib::ustring& label{?}, const Glib::RefPtr& section), g_menu_append_section) diff --git a/gio/src/menuattributeiter.hg b/gio/src/menuattributeiter.hg index c66b45e..0e2c941 100644 --- a/gio/src/menuattributeiter.hg +++ b/gio/src/menuattributeiter.hg @@ -39,10 +39,7 @@ public: _WRAP_METHOD(Glib::ustring get_name() const, g_menu_attribute_iter_get_name) - //TODO: When we can break ABI, remove the method overload and just make it const. - //It makes no sense to return const by value. - _WRAP_METHOD(Glib::VariantBase get_value(), g_menu_attribute_iter_get_value) - _WRAP_METHOD(const Glib::VariantBase get_value() const, g_menu_attribute_iter_get_value, constversion) + _WRAP_METHOD(Glib::VariantBase get_value() const, g_menu_attribute_iter_get_value) _WRAP_METHOD(bool next(), g_menu_attribute_iter_next) }; diff --git a/gio/src/menumodel.hg b/gio/src/menumodel.hg index 696e8f5..bf29a12 100644 --- a/gio/src/menumodel.hg +++ b/gio/src/menumodel.hg @@ -132,16 +132,13 @@ public: #m4begin dnl See the .ccg implementation for how this conversion works. - //TODO: When we can break ABI, remove the method overload and just make it const. - //It makes no sense to return const by value. _CONVERSION(`MenuAttribute',`const gchar*',`giomm_get_menu_attribute($3)') #m4end //TODO: Add a get_item_attribute() templated method to get values directly //instead of returning a Glib::VariantBase? - _WRAP_METHOD(Glib::VariantBase get_item_attribute(int item_index, MenuAttribute attribute, const Glib::VariantType& expected_type), g_menu_model_get_item_attribute_value) - _WRAP_METHOD(const Glib::VariantBase get_item_attribute(int item_index, MenuAttribute attribute, const Glib::VariantType& expected_type) const, g_menu_model_get_item_attribute_value, constversion) + _WRAP_METHOD(Glib::VariantBase get_item_attribute(int item_index, MenuAttribute attribute, const Glib::VariantType& expected_type) const, g_menu_model_get_item_attribute_value) // Ignore varargs function _IGNORE(g_menu_model_get_item_attribute) diff --git a/gio/src/mount.hg b/gio/src/mount.hg index 4ad4790..3988452 100644 --- a/gio/src/mount.hg +++ b/gio/src/mount.hg @@ -232,7 +232,7 @@ public: _WRAP_SIGNAL(void changed(), changed) _WRAP_SIGNAL(void unmounted(), unmounted) - _WRAP_SIGNAL(void pre_unmount(), pre_unmount, no_default_handler) + _WRAP_SIGNAL(void pre_unmount(), pre_unmount) //There are no properties. }; diff --git a/gio/src/mountoperation.hg b/gio/src/mountoperation.hg index 450de59..a13ed1b 100644 --- a/gio/src/mountoperation.hg +++ b/gio/src/mountoperation.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2007 The gtkmm Development Team * * This library is free software; you can redistribute it and/or @@ -87,14 +85,12 @@ public: _WRAP_SIGNAL(void ask_question(const Glib::ustring& message, const Glib::StringArrayHandle& choices), ask_question) _WRAP_SIGNAL(void reply(MountOperationResult result), reply) - - //TODO: Remove no_default_handler when we can break ABI: - _WRAP_SIGNAL(void aborted(), aborted, no_default_handler) + _WRAP_SIGNAL(void aborted(), aborted) //TODO: The array of char* is not very pleasant to wrap: //_WRAP_SIGNAL( void show_processes(const Glib::ustring& message, GArray* processes, const gchar *choices[]); - _WRAP_SIGNAL(void show_unmount_progress(const Glib::ustring& message, gint64 time_left, gint64 bytes_left), "show_unmount_progress", no_default_handler) + _WRAP_SIGNAL(void show_unmount_progress(const Glib::ustring& message, gint64 time_left, gint64 bytes_left), "show_unmount_progress") _WRAP_PROPERTY("username", Glib::ustring) _WRAP_PROPERTY("password", Glib::ustring) diff --git a/gio/src/pollableinputstream.hg b/gio/src/pollableinputstream.hg index b1c3178..a5dcddf 100644 --- a/gio/src/pollableinputstream.hg +++ b/gio/src/pollableinputstream.hg @@ -33,6 +33,8 @@ class Cancellable; //TODO: Instead derive from InputStream, when we can break ABI, //because the GPollableInputStream interface requires the GInputStream interface. //LoadableIcon does a similar thing correctly, for instance. +// However, GInputStream is an actuall class, deriving from GObject, +// but GPollableInputStream is a GInterface, that "requires" GInputStream. /** PollableInputStream - Interface for pollable input streams. * PollableInputStream is implemented by InputStreams that can be polled for diff --git a/gio/src/pollableoutputstream.hg b/gio/src/pollableoutputstream.hg index c735fc6..2ab20cb 100644 --- a/gio/src/pollableoutputstream.hg +++ b/gio/src/pollableoutputstream.hg @@ -33,6 +33,8 @@ class Cancellable; //TODO: Instead derive from OutputStream, when we can break ABI, //because the GPollableOutputStream interface requires the GOutputStream interface. //LoadableIcon does a similar thing correctly, for instance. +// However, GOutputStream is an actual class, deriving from GObject, +// but GPollableOutputStream is a GInterface, that "requires" GOutputStream. /** PollableOutputStream - Interface for pollable output streams. * PollableOutputStream is implemented by OutputStreams that can be polled for diff --git a/gio/src/remoteactiongroup.hg b/gio/src/remoteactiongroup.hg index 0ce7159..5a70ac6 100644 --- a/gio/src/remoteactiongroup.hg +++ b/gio/src/remoteactiongroup.hg @@ -17,10 +17,10 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include +#include _DEFS(giomm,gio) -_PINCLUDE(glibmm/private/interface_p.h) +_PINCLUDE(giomm/private/actiongroup_p.h) _PINCLUDE(gio/gio.h) #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -30,12 +30,6 @@ typedef struct _GRemoteActionGroupInterface GRemoteActionGroupInterface; namespace Gio { - -//TODO: Instead derive from ActionGroup, when we can break ABI, -//because the GRemoteActionGroup interface requires the GActionGroup interface. -//LoadableIcon does a similar thing correctly, for instance. - - /** RemoteActionGroup - a ActionGroup that interacts with other processes. * The RemoteActionGroup interface is implemented by ActionGroup instances that * either transmit action invocations to other processes or receive action @@ -57,9 +51,9 @@ namespace Gio * platform data for action invocations that arrive by way of D-Bus. * @newin{2,32} */ -class RemoteActionGroup : public Glib::Interface +class RemoteActionGroup : public ActionGroup { - _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface) + _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface, ActionGroup, GActionGroup) public: _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter, const Glib::VariantBase& platform_data), g_remote_action_group_activate_action_full) diff --git a/gio/src/resolver.hg b/gio/src/resolver.hg index a958b07..67258e5 100644 --- a/gio/src/resolver.hg +++ b/gio/src/resolver.hg @@ -164,8 +164,7 @@ public: _WRAP_METHOD(std::vector lookup_records_finish(const Glib::RefPtr& result), g_resolver_lookup_records_finish, errthrow) - //TODO: Remove no_default_handler when we can break ABI: - _WRAP_SIGNAL(void reload(), reload, no_default_handler) + _WRAP_SIGNAL(void reload(), reload) }; std::string hostname_to_ascii (const Glib::ustring& hostname); diff --git a/gio/src/settings.ccg b/gio/src/settings.ccg index b5f33ef..d1fca86 100644 --- a/gio/src/settings.ccg +++ b/gio/src/settings.ccg @@ -18,6 +18,7 @@ #include #include #include +#include namespace Gio { diff --git a/gio/src/settings.hg b/gio/src/settings.hg index b886b2b..4fc2d8d 100644 --- a/gio/src/settings.hg +++ b/gio/src/settings.hg @@ -27,6 +27,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { +class SettingsSchema; _WRAP_ENUM(SettingsBindFlags, GSettingsBindFlags) @@ -46,12 +47,14 @@ protected: _WRAP_CTOR(Settings(const Glib::ustring& schema_id, const Glib::ustring& path), g_settings_new_with_path) //TODO: Requires SettingsBackend: _WRAP_CTOR(Settings(const Glib::ustring& schema_id, const Glib::RefPtr& backend), g_settings_new_with_backend) //TODO: Requires SettingsBackend: _WRAP_CTOR(Settings(const Glib::ustring& schema_id, const Glib::RefPtr& backend, const Glib::ustring& path), g_settings_new_with_backend_and_path) + //TODO: Requires SettingsBackend: _WRAP_CTOR(Settings(const Glib::RefPtr& settings_schema, const Glib::RefPtr& backend, const Glib::ustring& path), g_settings_new_full) public: _WRAP_CREATE(const Glib::ustring& schema_id) _WRAP_CREATE(const Glib::ustring& schema_id, const Glib::ustring& path) //TODO: Requires SettingsBackend: _WRAP_CREATE(const Glib::ustring& schema_id, const Glib::RefPtr& backend) //TODO: Requires SettingsBackend: _WRAP_CREATE(const Glib::ustring& schema_id, const Glib::RefPtr& backend, const Glib::ustring& path) + //TODO: Requires SettingsBackend: _WRAP_CREATE(const Glib::RefPtr& settings_schema, const Glib::RefPtr& backend, const Glib::ustring& path) //TODO: Rename these to get/set_*_value_variant() and add templated get/set_*_value() methods as elsewhere? _WRAP_METHOD(bool set_value(const Glib::ustring& key, const Glib::VariantBase& value), g_settings_set_value) @@ -136,7 +139,6 @@ public: _WRAP_METHOD(gint64 get_int64(const Glib::ustring& key) const, g_settings_get_int64) _WRAP_METHOD(void set_int64(const Glib::ustring& key, gint64 value), g_settings_set_int64) _WRAP_METHOD(guint get_uint(const Glib::ustring& key) const, g_settings_get_uint) - _IGNORE(g_settings_set_uint) _WRAP_METHOD(void set_uint(const Glib::ustring& key, guint value), g_settings_set_uint) _WRAP_METHOD(guint64 get_uint64(const Glib::ustring& key) const, g_settings_get_uint64) _WRAP_METHOD(void set_uint64(const Glib::ustring& key, guint64 value), g_settings_set_uint64) @@ -152,10 +154,10 @@ public: _WRAP_METHOD(bool set_string_array(const Glib::ustring& key, const Glib::StringArrayHandle& value), g_settings_set_strv) - _WRAP_METHOD(int get_enum(const Glib::ustring& key) const, g_settings_get_enum ) - _WRAP_METHOD(bool get_enum(const Glib::ustring& key, int value), g_settings_set_enum) + _WRAP_METHOD(int get_enum(const Glib::ustring& key) const, g_settings_get_enum) + _WRAP_METHOD(bool set_enum(const Glib::ustring& key, int value), g_settings_set_enum) _WRAP_METHOD(guint get_flags(const Glib::ustring& key) const, g_settings_get_flags) - _WRAP_METHOD(bool get_flags(const Glib::ustring& key, guint value), g_settings_set_flags) + _WRAP_METHOD(bool set_flags(const Glib::ustring& key, guint value), g_settings_set_flags) // Ignore varargs functions. _IGNORE(g_settings_get, g_settings_set) @@ -178,7 +180,6 @@ public: _IGNORE(g_settings_get_range, g_settings_list_relocatable_schemas) // deprecated _IGNORE(g_settings_range_check) - //TODO: Wrap GSettingsSchema #m4 _CONVERSION(`Glib::ObjectBase*',`gpointer',(gpointer)$3->gobj()) _WRAP_METHOD(void bind(const Glib::ustring& key, Glib::ObjectBase* object, const Glib::ustring& property, SettingsBindFlags flags=SETTINGS_BIND_DEFAULT), g_settings_bind) @@ -198,13 +199,12 @@ public: _IGNORE_PROPERTY("schema") _WRAP_PROPERTY("schema-id", Glib::ustring) - //TODO: _WRAP_PROPERTY("settings-schema", Glib::RefPtr) + _WRAP_PROPERTY("settings-schema", Glib::RefPtr, newin "2,52") //TODO?: _WRAP_SIGNAL(bool change_event(const Glib::ArrayHandle& keys, int n_keys), "change-event") - //TODO: Remove two_signal_methods when we can break ABI. #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING) - _WRAP_SIGNAL(void changed(const Glib::ustring& key), "changed", detail_name key, two_signal_methods) + _WRAP_SIGNAL(void changed(const Glib::ustring& key), "changed", detail_name key) _WRAP_SIGNAL(bool writable_change_event(GQuark key), "writable-change-event") _WRAP_SIGNAL(void writable_changed(const Glib::ustring& key), writable_changed) diff --git a/gio/src/settingsschemakey.hg b/gio/src/settingsschemakey.hg index e7894d6..cf5f0da 100644 --- a/gio/src/settingsschemakey.hg +++ b/gio/src/settingsschemakey.hg @@ -18,6 +18,7 @@ _CONFIGINCLUDE(giommconfig.h) #include +#include _DEFS(giomm,gio) _PINCLUDE(glibmm/private/object_p.h) @@ -50,14 +51,14 @@ protected: g_settings_schema_key_from_flags) public: - //TODO: _WRAP_METHOD(const GVariantType * g_settings_schema_key_get_value_type (), g_settings_schema_key_get_value_type) - //_WRAP_METHOD(GVariant * g_settings_schema_key_get_default_value (), g_settings_schema_key_get_default_value) - //_WRAP_METHOD(GVariant * g_settings_schema_key_get_range (), g_settings_schema_key_get_range) - //TODO: _WRAP_METHOD(bool range_check(GVariant *value), g_settings_schema_key_range_check) - _WRAP_METHOD(Glib::ustring get_name() const, g_settings_schema_key_get_name) _WRAP_METHOD(Glib::ustring get_summary() const, g_settings_schema_key_get_summary) _WRAP_METHOD(Glib::ustring get_description() const, g_settings_schema_key_get_description) + + _WRAP_METHOD(Glib::VariantType get_value_type() const, g_settings_schema_key_get_value_type) + _WRAP_METHOD(Glib::VariantBase get_default_value() const, g_settings_schema_key_get_default_value) + _WRAP_METHOD(Glib::VariantBase get_range() const, g_settings_schema_key_get_range) + _WRAP_METHOD(bool range_check(const Glib::VariantBase& value) const, g_settings_schema_key_range_check) }; } // namespace Gio diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg index 16257f7..5867943 100644 --- a/gio/src/socketclient.hg +++ b/gio/src/socketclient.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2010 Jonathon Jongsma * * This library is free software; you can redistribute it and/or @@ -171,7 +169,7 @@ public: #m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr&',`Glib::wrap($3)') #m4 _CONVERSION(`GIOStream*',`const Glib::RefPtr&',`Glib::wrap($3)') - _WRAP_SIGNAL(void event(SocketClientEvent event, const Glib::RefPtr& connectable, const Glib::RefPtr& connection), event, no_default_handler) + _WRAP_SIGNAL(void event(SocketClientEvent event, const Glib::RefPtr& connectable, const Glib::RefPtr& connection), event) }; } // namespace Gio diff --git a/gio/src/volumemonitor.hg b/gio/src/volumemonitor.hg index f12976f..b55fc7d 100644 --- a/gio/src/volumemonitor.hg +++ b/gio/src/volumemonitor.hg @@ -73,9 +73,8 @@ public: _WRAP_SIGNAL(void drive_disconnected(const Glib::RefPtr& drive), drive_disconnected) _WRAP_SIGNAL(void drive_changed(const Glib::RefPtr& drive), drive_changed) - //TODO: Remove no_default_handler when we can break ABI: - _WRAP_SIGNAL(void drive_eject_button(const Glib::RefPtr& drive), drive_eject_button, no_default_handler) - _WRAP_SIGNAL(void drive_stop_button(const Glib::RefPtr& drive), drive_stop_button, no_default_handler) + _WRAP_SIGNAL(void drive_eject_button(const Glib::RefPtr& drive), drive_eject_button) + _WRAP_SIGNAL(void drive_stop_button(const Glib::RefPtr& drive), drive_stop_button) //TODO: Use ListHandle? //_WRAP_VFUNC(GList* get_volumes(), get_volumes) diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc index 75b7d13..696bf79 100644 --- a/glib/glibmm/class.cc +++ b/glib/glibmm/class.cc @@ -85,14 +85,8 @@ Class::register_derived_type(GType base_type, GTypeModule* module) } GType -Class::clone_custom_type(const char* custom_type_name) const -{ - return clone_custom_type(custom_type_name, interface_class_vector_type()); -} - -GType Class::clone_custom_type( - const char* custom_type_name, const interface_class_vector_type& interface_classes) const + const char* custom_type_name, const interface_class_list_type& interface_classes) const { std::string full_name("gtkmm__CustomObject_"); Glib::append_canonical_typename(full_name, custom_type_name); @@ -136,9 +130,8 @@ Class::clone_custom_type( // Add derived versions of interfaces, if the C type implements any interfaces. // For instance, TreeModel_Class::add_interface(). - for (interface_class_vector_type::size_type i = 0; i < interface_classes.size(); i++) + for (auto interface_class : interface_classes) { - const Interface_Class* interface_class = interface_classes[i]; if (interface_class) { interface_class->add_interface(custom_type); diff --git a/glib/glibmm/class.h b/glib/glibmm/class.h index bc5a06a..849065b 100644 --- a/glib/glibmm/class.h +++ b/glib/glibmm/class.h @@ -1,9 +1,6 @@ -// -*- c++ -*- #ifndef _GLIBMM_CLASS_H #define _GLIBMM_CLASS_H -/* $Id$ */ - /* Copyright 2001 Free Software Foundation * Copyright (C) 1998-2002 The gtkmm Development Team * @@ -26,6 +23,7 @@ #include //Include this here so that the /private/*.h classes have access to GLIBMM_VFUNCS_ENABLED #include //For interface properties that custom types might override. +#include //For interface classes that custom types might implement. #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -54,20 +52,11 @@ public: inline GType get_type() const; - // TODO: Remove this method at the next ABI/API break. - /** Register a static custom GType, derived from the parent of this class's type. - * The parent type of the registered custom type is the same C class as the parent - * of the get_type() type. If a type with the specified name is already registered, - * nothing is done. register_derived_type() must have been called. - * @param custom_type_name The name of the registered type is - * "gtkmm__CustomObject_" + canonic(custom_type_name), where canonic() - * replaces special characters with '+'. - * @return The registered type. + /** The type that holds pointers to the interfaces of custom types. + * It's usually empty and never long. It's a std::forward_list to minimize + * storage requirement. */ - GType clone_custom_type(const char* custom_type_name) const; - - /// The type that holds pointers to the interfaces of custom types. - using interface_class_vector_type = std::vector; + using interface_class_list_type = std::forward_list; /** Register a static custom GType, derived from the parent of this class's type. * The parent type of the registered custom type is the same C class as the parent @@ -80,7 +69,7 @@ public: * @return The registered type. */ GType clone_custom_type( - const char* custom_type_name, const interface_class_vector_type& interface_classes) const; + const char* custom_type_name, const interface_class_list_type& interface_classes) const; protected: GType gtype_; diff --git a/glib/glibmm/dispatcher.cc b/glib/glibmm/dispatcher.cc index 3c8a65d..73b69be 100644 --- a/glib/glibmm/dispatcher.cc +++ b/glib/glibmm/dispatcher.cc @@ -165,8 +165,6 @@ private: /**** Glib::DispatchNotifier ***********************************************/ -// static - thread_local DispatchNotifier* DispatchNotifier::thread_specific_instance_ = nullptr; DispatchNotifier::DispatchNotifier(const Glib::RefPtr& context) @@ -186,11 +184,11 @@ DispatchNotifier::DispatchNotifier(const Glib::RefPtr& context) try { -#ifdef G_OS_WIN32 - const int fd = GPOINTER_TO_INT(fd_receiver_); -#else - const int fd = fd_receiver_; -#endif + // PollFD::fd_t is the type of GPollFD::fd. + // In Windows, it has the same size as HANDLE, but it's not guaranteed to be the same type. + // In Unix, a file descriptor is an int. + const auto fd = (PollFD::fd_t)fd_receiver_; + // The following code is equivalent to // context_->signal_io().connect( // sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler), fd, Glib::IO_IN); diff --git a/glib/glibmm/interface.cc b/glib/glibmm/interface.cc index 0ce998b..0429840 100644 --- a/glib/glibmm/interface.cc +++ b/glib/glibmm/interface.cc @@ -96,10 +96,10 @@ Interface::Interface(const Interface_Class& interface_class) } else // gobject_ == nullptr { - // The GObject is not instantiated yet. Add to the custom_interface_classes + // The GObject is not instantiated yet. Add to the custom_interface_classes_ // and add the interface in the Glib::Object constructor. - std::lock_guard lock(extra_object_base_data_mutex); - extra_object_base_data[this].custom_interface_classes.emplace_back(&interface_class); + // custom_interface_classes_ is a std::forward_list. There is no emplace_back(). + custom_interface_classes_.emplace_front(&interface_class); } } } diff --git a/glib/glibmm/main.cc b/glib/glibmm/main.cc index 27464d3..1f19f46 100644 --- a/glib/glibmm/main.cc +++ b/glib/glibmm/main.cc @@ -22,7 +22,6 @@ #include #include #include -#include // Needed until the next ABI break. namespace { @@ -36,25 +35,6 @@ time64_to_time_val(gint64 time64, Glib::TimeVal& time_val) time_val = Glib::TimeVal(seconds, microseconds); } -// TODO: At the next ABI break, replace ExtraSourceData by new data members in Source. -// Then the mutex is not necessary, but to keep the code thread-safe, use the -// g_atomic_*() functions on these data elements. -// These are new data members that can't be added to Glib::Source now, -// because it would break ABI. -struct ExtraSourceData -{ - ExtraSourceData() : ref_count(1), keep_wrapper(2) {} - int ref_count; - // When both Source::unreference() and SourceCallbackData::destroy_notify_callback() - // have decreased keep_wrapper, it's time to delete the C++ wrapper. - int keep_wrapper; -}; - -std::map extra_source_data; -// Source instances may be used in different threads. -// Accesses to extra_source_data must be thread-safe. -std::mutex extra_source_data_mutex; - class SourceConnectionNode : public sigc::notifiable { public: @@ -163,17 +143,8 @@ SourceCallbackData::destroy_notify_callback(void* data) if (self->node) SourceConnectionNode::destroy_notify_callback(self->node); - if (self->wrapper) - { - std::unique_lock lock(extra_source_data_mutex); - if (--extra_source_data[self->wrapper].keep_wrapper == 0) - { - // No other reference exists to the wrapper. Delete it! - extra_source_data.erase(self->wrapper); - lock.unlock(); - Glib::Source::destroy_notify_callback(self->wrapper); - } - } + // destroy_notify_callback2() does nothing if self->wrapper == nullptr. + Glib::Source::destroy_notify_callback2(self->wrapper); delete self; } @@ -353,14 +324,14 @@ PollFD::PollFD() gobject_.revents = 0; } -PollFD::PollFD(int fd) +PollFD::PollFD(PollFD::fd_t fd) { gobject_.fd = fd; gobject_.events = 0; gobject_.revents = 0; } -PollFD::PollFD(int fd, IOCondition events) +PollFD::PollFD(PollFD::fd_t fd, IOCondition events) { gobject_.fd = fd; gobject_.events = events; @@ -489,7 +460,7 @@ inline SignalIO::SignalIO(GMainContext* context) : context_(context) sigc::connection SignalIO::connect( - const sigc::slot& slot, int fd, IOCondition condition, int priority) + const sigc::slot& slot, PollFD::fd_t fd, IOCondition condition, int priority) { const auto source = IOSource::create(fd, condition); @@ -912,30 +883,17 @@ Source::gobj_copy() const void Source::reference() const { - std::lock_guard lock(extra_source_data_mutex); - ++extra_source_data[this].ref_count; + ++ref_count_; } void Source::unreference() const { - std::unique_lock lock(extra_source_data_mutex); - if (--extra_source_data[this].ref_count == 0) + if (--ref_count_ == 0) { GSource* const tmp_gobject = gobject_; - if (--extra_source_data[this].keep_wrapper == 0) - { - // The last reference from a RefPtr has been deleted, and - // SourceCallbackData::destroy_notify_callback() has been called while - // extra_source_data[this].keep_wrapper was > 1. - // Delete the wrapper! - extra_source_data.erase(this); - lock.unlock(); - destroy_notify_callback(const_cast(this)); - } - else - lock.unlock(); + destroy_notify_callback2(const_cast(this)); // Drop the one and only GSource reference held by the C++ wrapper. // If the GSource instance is attached to a main context, the GMainContext @@ -1076,17 +1034,19 @@ Source::dispatch_vfunc(GSource*, GSourceFunc callback, void* user_data) // static void -Source::destroy_notify_callback(void* data) +Source::destroy_notify_callback2(void* data) { if (data) { Source* const self = static_cast(data); + if (--self->keep_wrapper_ == 0) + { + // gobject_ is already invalid at this point. + self->gobject_ = nullptr; - // gobject_ is already invalid at this point. - self->gobject_ = nullptr; - - // No exception checking: if the dtor throws, you're out of luck anyway. - delete self; + // No exception checking: if the dtor throws, you're out of luck anyway. + delete self; + } } } @@ -1260,7 +1220,7 @@ IdleSource::dispatch(sigc::slot_base* slot) // static Glib::RefPtr -IOSource::create(int fd, IOCondition condition) +IOSource::create(PollFD::fd_t fd, IOCondition condition) { return Glib::RefPtr(new IOSource(fd, condition)); } @@ -1277,7 +1237,7 @@ IOSource::connect(const sigc::slot& slot) return connect_generic(slot); } -IOSource::IOSource(int fd, IOCondition condition) : poll_fd_(fd, condition) +IOSource::IOSource(PollFD::fd_t fd, IOCondition condition) : poll_fd_(fd, condition) { add_poll(poll_fd_); } diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h index 2671876..63b1ef1 100644 --- a/glib/glibmm/main.h +++ b/glib/glibmm/main.h @@ -26,6 +26,7 @@ #include #include #include +#include namespace Glib { @@ -38,12 +39,14 @@ namespace Glib class PollFD { public: + using fd_t = decltype(GPollFD::fd); + PollFD(); - explicit PollFD(int fd); - PollFD(int fd, IOCondition events); + explicit PollFD(fd_t fd); + PollFD(fd_t fd, IOCondition events); - void set_fd(int fd) { gobject_.fd = fd; } - int get_fd() const { return gobject_.fd; } + void set_fd(fd_t fd) { gobject_.fd = fd; } + fd_t get_fd() const { return gobject_.fd; } void set_events(IOCondition events) { gobject_.events = events; } IOCondition get_events() const { return static_cast(gobject_.events); } @@ -284,7 +287,7 @@ public: * @param priority The priority of the new event source. * @return A connection handle, which can be used to disconnect the handler. */ - sigc::connection connect(const sigc::slot& slot, int fd, IOCondition condition, + sigc::connection connect(const sigc::slot& slot, PollFD::fd_t fd, IOCondition condition, int priority = PRIORITY_DEFAULT); /** Connects an I/O handler that watches an I/O channel. @@ -770,6 +773,13 @@ protected: private: GSource* gobject_; + mutable std::atomic_int ref_count_ {1}; + // The C++ wrapper (the Source instance) is deleted, when both Source::unreference() + // and SourceCallbackData::destroy_notify_callback() have decreased keep_wrapper_ + // by calling destroy_notify_callback2(). + // https://bugzilla.gnome.org/show_bug.cgi?id=561885 + std::atomic_int keep_wrapper_ {2}; + #ifndef DOXYGEN_SHOULD_SKIP_THIS static inline Source* get_wrapper(GSource* source); @@ -780,7 +790,8 @@ private: static gboolean dispatch_vfunc(GSource* source, GSourceFunc callback, void* user_data); public: - static void destroy_notify_callback(void* data); + // Really destroys the object during the second call. See keep_wrapper_. + static void destroy_notify_callback2(void* data); // Used by SignalXyz, possibly in other files. static sigc::connection attach_signal_source(const sigc::slot_base& slot, int priority, GSource* source, GMainContext* context, GSourceFunc callback_func); @@ -836,13 +847,13 @@ class IOSource : public Glib::Source public: using CppObjectType = Glib::IOSource; - static Glib::RefPtr create(int fd, IOCondition condition); + static Glib::RefPtr create(PollFD::fd_t fd, IOCondition condition); static Glib::RefPtr create( const Glib::RefPtr& channel, IOCondition condition); sigc::connection connect(const sigc::slot& slot); protected: - IOSource(int fd, IOCondition condition); + IOSource(PollFD::fd_t fd, IOCondition condition); IOSource(const Glib::RefPtr& channel, IOCondition condition); /** Wrap an existing GSource object and install the given callback function. diff --git a/glib/glibmm/object.cc b/glib/glibmm/object.cc index e7f6f88..19f30d5 100644 --- a/glib/glibmm/object.cc +++ b/glib/glibmm/object.cc @@ -194,21 +194,14 @@ Object::Object() if (custom_type_name_ && !is_anonymous_custom_()) { - Class::interface_class_vector_type custom_interface_classes; - - { - std::lock_guard lock(extra_object_base_data_mutex); - const extra_object_base_data_type::iterator iter = extra_object_base_data.find(this); - if (iter != extra_object_base_data.end()) - { - custom_interface_classes = iter->second.custom_interface_classes; - extra_object_base_data.erase(iter); - } - } - object_class_.init(); + // Reverse the interface class list in order to have the interfaces added + // in the same order as they are declared. (Don't know if it makes any difference, + // but it's an inexpensive operation. The list is often empty, never long.) + custom_interface_classes_.reverse(); // This creates a type that is derived (indirectly) from GObject. - object_type = object_class_.clone_custom_type(custom_type_name_, custom_interface_classes); + object_type = object_class_.clone_custom_type(custom_type_name_, custom_interface_classes_); + custom_interface_classes_.clear(); } void* const new_object = g_object_newv(object_type, 0, nullptr); @@ -227,20 +220,10 @@ Object::Object(const Glib::ConstructParams& construct_params) if (custom_type_name_ && !is_anonymous_custom_()) { - Class::interface_class_vector_type custom_interface_classes; - - { - std::lock_guard lock(extra_object_base_data_mutex); - const extra_object_base_data_type::iterator iter = extra_object_base_data.find(this); - if (iter != extra_object_base_data.end()) - { - custom_interface_classes = iter->second.custom_interface_classes; - extra_object_base_data.erase(iter); - } - } - + custom_interface_classes_.reverse(); object_type = - construct_params.glibmm_class.clone_custom_type(custom_type_name_, custom_interface_classes); + construct_params.glibmm_class.clone_custom_type(custom_type_name_, custom_interface_classes_); + custom_interface_classes_.clear(); } // Create a new GObject with the specified array of construct properties. diff --git a/glib/glibmm/objectbase.cc b/glib/glibmm/objectbase.cc index d2a252d..429d11d 100644 --- a/glib/glibmm/objectbase.cc +++ b/glib/glibmm/objectbase.cc @@ -40,10 +40,6 @@ namespace Glib /**** Glib::ObjectBase *****************************************************/ -// static data members -ObjectBase::extra_object_base_data_type ObjectBase::extra_object_base_data; -std::mutex ObjectBase::extra_object_base_data_mutex; - ObjectBase::ObjectBase() : gobject_(nullptr), custom_type_name_(anonymous_custom_type_name), @@ -52,12 +48,14 @@ ObjectBase::ObjectBase() } ObjectBase::ObjectBase(const char* custom_type_name) -: gobject_(nullptr), custom_type_name_(custom_type_name), cpp_destruction_in_progress_(false) +: gobject_(nullptr), custom_type_name_(custom_type_name), + cpp_destruction_in_progress_(false) { } ObjectBase::ObjectBase(const std::type_info& custom_type_info) -: gobject_(nullptr), custom_type_name_(custom_type_info.name()), cpp_destruction_in_progress_(false) +: gobject_(nullptr), custom_type_name_(custom_type_info.name()), + cpp_destruction_in_progress_(false) { } @@ -154,14 +152,6 @@ ObjectBase::~ObjectBase() noexcept // we have to call g_object_unref() on our own. // - // Just a precaution. Unless a derived class's ctor has thrown an exception, - // 'this' should have been erased from extra_object_base_data by - // Glib::Object's constructor. - { - std::lock_guard lock(extra_object_base_data_mutex); - extra_object_base_data.erase(this); - } - if (GObject* const gobject = gobject_) { #ifdef GLIBMM_DEBUG_REFCOUNTING @@ -351,21 +341,8 @@ ObjectBase::get_property_value(const Glib::ustring& property_name, Glib::ValueBa g_object_get_property(const_cast(gobj()), property_name.c_str(), value.gobj()); } -void -ObjectBase::connect_property_changed( - const Glib::ustring& property_name, const sigc::slot& slot) -{ - connect_property_changed_with_return(property_name, slot); -} - -void -ObjectBase::connect_property_changed(const Glib::ustring& property_name, sigc::slot&& slot) -{ - connect_property_changed_with_return(property_name, std::move(slot)); -} - sigc::connection -ObjectBase::connect_property_changed_with_return( +ObjectBase::connect_property_changed( const Glib::ustring& property_name, const sigc::slot& slot) { // Create a proxy to hold our connection info @@ -378,7 +355,7 @@ ObjectBase::connect_property_changed_with_return( } sigc::connection -ObjectBase::connect_property_changed_with_return( +ObjectBase::connect_property_changed( const Glib::ustring& property_name, sigc::slot&& slot) { // Create a proxy to hold our connection info diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h index 6cbc767..4dce060 100644 --- a/glib/glibmm/objectbase.h +++ b/glib/glibmm/objectbase.h @@ -28,9 +28,6 @@ #include #include #include -#include // Needed until the next ABI break. -#include // Not used by ObjectBase any more, but user code may rely on it being here. -#include #ifndef DOXYGEN_SHOULD_SKIP_THIS extern "C" { @@ -120,34 +117,19 @@ public: template void get_property(const Glib::ustring& property_name, PropertyType& value) const; - // TODO: At the next ABI break, delete connect_property_changed_with_return() - // and let connect_property_changed() return sigc::connection. - /** You can use the signal_changed() signal of the property proxy instead. - * - * See also connect_property_changed_with_return(). - */ - void connect_property_changed(const Glib::ustring& property_name, const sigc::slot& slot); - - /** You can use the signal_changed() signal of the property proxy instead. - * - * @newin{2,48} - */ - void connect_property_changed(const Glib::ustring& property_name, sigc::slot&& slot); + /// You probably want to use a specific property_*() accessor method instead. + template + PropertyType get_property(const Glib::ustring& property_name) const; /** You can use the signal_changed() signal of the property proxy instead. - * - * This method was added because connect_property_changed() does not return a sigc::connection, - * and we could not break the ABI by changing that function. */ - sigc::connection connect_property_changed_with_return( - const Glib::ustring& property_name, const sigc::slot& slot); + sigc::connection connect_property_changed(const Glib::ustring& property_name, const sigc::slot& slot); /** You can use the signal_changed() signal of the property proxy instead. * * @newin{2,48} */ - sigc::connection connect_property_changed_with_return( - const Glib::ustring& property_name, sigc::slot&& slot); + sigc::connection connect_property_changed(const Glib::ustring& property_name, sigc::slot&& slot); /** Increases the freeze count on object. If the freeze count is non-zero, the * emission of "notify" signals on object is stopped. The signals are queued @@ -220,20 +202,9 @@ protected: bool is_anonymous_custom_() const; - // TODO: At the next ABI break, replace extra_object_base_data by a non-static - // data member. - // This is a new data member that can't be added as instance data to - // ObjectBase now, because it would break ABI. - struct ExtraObjectBaseData - { - Class::interface_class_vector_type custom_interface_classes; - }; - - using extra_object_base_data_type = std::map; - static extra_object_base_data_type extra_object_base_data; - // ObjectBase instances may be used in different threads. - // Accesses to extra_object_base_data must be thread-safe. - static std::mutex extra_object_base_data_mutex; + // List of pointers to the interfaces of custom types. + // Used only during the construction of named custom types. + Class::interface_class_list_type custom_interface_classes_; public: // is_derived_() must be public, so that overridden vfuncs and signal handlers can call it @@ -294,6 +265,16 @@ ObjectBase::get_property(const Glib::ustring& property_name, PropertyType& value value = property_value.get(); } +template +inline PropertyType +ObjectBase::get_property(const Glib::ustring& property_name) const +{ + PropertyType value; + get_property(property_name, value); + + return value; +} + #endif /* DOXYGEN_SHOULD_SKIP_THIS */ bool _gobject_cppinstance_already_deleted(GObject* gobject); diff --git a/glib/glibmm/signalproxy.cc b/glib/glibmm/signalproxy.cc index e7815df..9da33cc 100644 --- a/glib/glibmm/signalproxy.cc +++ b/glib/glibmm/signalproxy.cc @@ -43,19 +43,7 @@ SignalProxyNormal::~SignalProxyNormal() noexcept } sigc::slot_base& -SignalProxyNormal::connect_(const sigc::slot_base& slot, bool after) -{ - return connect_impl_(info_->callback, slot, after); -} - -sigc::slot_base& -SignalProxyNormal::connect_notify_(const sigc::slot_base& slot, bool after) -{ - return connect_impl_(info_->notify_callback, slot, after); -} - -sigc::slot_base& -SignalProxyNormal::connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after) +SignalProxyNormal::connect_impl_(bool notify, const sigc::slot_base& slot, bool after) { // create a proxy to hold our connection info auto pConnectionNode = new SignalProxyConnectionNode(slot, obj_->gobj()); @@ -63,8 +51,9 @@ SignalProxyNormal::connect_impl_(GCallback callback, const sigc::slot_base& slot // connect it to glib // pConnectionNode will be passed in the data argument to the callback. pConnectionNode->connection_id_ = g_signal_connect_data(obj_->gobj(), info_->signal_name, - callback, pConnectionNode, &SignalProxyConnectionNode::destroy_notify_handler, - static_cast((after) ? G_CONNECT_AFTER : 0)); + notify ? info_->notify_callback : info_->callback, pConnectionNode, + &SignalProxyConnectionNode::destroy_notify_handler, + static_cast(after ? G_CONNECT_AFTER : 0)); return pConnectionNode->slot_; } @@ -110,9 +99,9 @@ SignalProxyNormal::slot0_void_callback(GObject* self, void* data) } } -// SignalProxyDetailed implementation: +// SignalProxyDetailedBase implementation: -SignalProxyDetailed::SignalProxyDetailed( +SignalProxyDetailedBase::SignalProxyDetailedBase( Glib::ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name) : SignalProxyBase(obj), info_(info), @@ -121,12 +110,12 @@ SignalProxyDetailed::SignalProxyDetailed( { } -SignalProxyDetailed::~SignalProxyDetailed() noexcept +SignalProxyDetailedBase::~SignalProxyDetailedBase() noexcept { } sigc::slot_base& -SignalProxyDetailed::connect_impl_(bool notify, const sigc::slot_base& slot, bool after) +SignalProxyDetailedBase::connect_impl_(bool notify, const sigc::slot_base& slot, bool after) { // create a proxy to hold our connection info auto pConnectionNode = new SignalProxyConnectionNode(slot, obj_->gobj()); @@ -142,7 +131,7 @@ SignalProxyDetailed::connect_impl_(bool notify, const sigc::slot_base& slot, boo } sigc::slot_base& -SignalProxyDetailed::connect_impl_(bool notify, sigc::slot_base&& slot, bool after) +SignalProxyDetailedBase::connect_impl_(bool notify, sigc::slot_base&& slot, bool after) { // create a proxy to hold our connection info auto pConnectionNode = new SignalProxyConnectionNode(std::move(slot), obj_->gobj()); @@ -158,7 +147,7 @@ SignalProxyDetailed::connect_impl_(bool notify, sigc::slot_base&& slot, bool aft } void -SignalProxyDetailed::emission_stop() +SignalProxyDetailedBase::emission_stop() { g_signal_stop_emission_by_name(obj_->gobj(), detailed_name_.c_str()); } diff --git a/glib/glibmm/signalproxy.h b/glib/glibmm/signalproxy.h index 8aae39d..063bd91 100644 --- a/glib/glibmm/signalproxy.h +++ b/glib/glibmm/signalproxy.h @@ -47,7 +47,7 @@ struct SignalProxyInfo #endif // DOXYGEN_SHOULD_SKIP_THIS -// This base class is used by SignalProxyNormal, SignalProxyDetailed and SignalProxyProperty. +// This base class is used by SignalProxyNormal, SignalProxyDetailedBase and SignalProxyProperty. class SignalProxyBase { public: @@ -67,7 +67,7 @@ protected: ObjectBase* obj_; private: - SignalProxyBase& operator=(const SignalProxyBase&); // not implemented + SignalProxyBase& operator=(const SignalProxyBase&) = delete; }; // Shared portion of a Signal without detail @@ -79,7 +79,7 @@ private: * the template derivatives, which serve as gatekeepers for the * types allowed on a particular signal. * - * For signals with a detailed name (signal_name::detail_name) see SignalProxyDetailed. + * For signals with a detailed name (signal_name::detail_name) see SignalProxyDetailedBase. */ class SignalProxyNormal : public SignalProxyBase { @@ -103,28 +103,20 @@ protected: */ SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info); - /** Connects a generic signal handler to a signal. - * This is called by connect() in derived SignalProxy classes. + /** Connects a signal handler to a signal. + * This is called by connect() and connect_notify() in derived SignalProxy classes. * + * @param notify Whether this method is called by connect_notify() or by connect(). * @param slot The signal handler, usually created with sigc::mem_fun() or sigc::ptr_fun(). * @param after Whether this signal handler should be called before or after the default signal * handler. - */ - sigc::slot_base& connect_(const sigc::slot_base& slot, bool after); - - /** Connects a signal handler without a return value to a signal. - * This is called by connect_notify() in derived SignalProxy classes. * - * @param slot The signal handler, which should have a @c void return type, - * usually created with sigc::mem_fun() or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal - * handler. + * @newin{2,52} */ - sigc::slot_base& connect_notify_(const sigc::slot_base& slot, bool after); + sigc::slot_base& connect_impl_(bool notify, const sigc::slot_base& slot, bool after); /** Connects a signal handler to a signal. - * @see connect_(const sigc::slot_base& slot, bool after) and - * connect_notify_(const sigc::slot_base& slot, bool after). + * @see connect_impl_(bool notify, const sigc::slot_base& slot, bool after). * * @newin{2,48} */ @@ -133,24 +125,16 @@ protected: private: const SignalProxyInfo* info_; - // TODO: We could maybe replace both connect_() and connect_notify_() with this in future, because - // they don't do anything extra. - /** This is called by connect_() and connect_notify_(). - */ - sigc::slot_base& connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after); - // no copy assignment - SignalProxyNormal& operator=(const SignalProxyNormal&); + SignalProxyNormal& operator=(const SignalProxyNormal&) = delete; }; /**** Glib::SignalProxy ***************************************************/ -/** Proxy for signals with any number of arguments. - * Use the connect() or connect_notify() method, with sigc::mem_fun() or sigc::ptr_fun() - * to connect signal handlers to signals. - */ +#ifndef DOXYGEN_SHOULD_SKIP_THIS template class SignalProxy; +#endif // DOXYGEN_SHOULD_SKIP_THIS /** Proxy for signals with any number of arguments. * Use the connect() or connect_notify() method, with sigc::mem_fun() or sigc::ptr_fun() @@ -175,7 +159,7 @@ public: */ sigc::connection connect(const SlotType& slot, bool after = true) { - return sigc::connection(connect_(slot, after)); + return sigc::connection(connect_impl_(false, slot, after)); } /** Connects a signal handler to a signal. @@ -201,9 +185,8 @@ public: * connect_notify() binds return T() to the connected signal handler. * For instance, if the return type is @c bool, the following two calls are equivalent. * @code - * connect_notify( sigc::mem_fun(*this, &TheClass::on_something) ); - * connect( sigc::bind_return(sigc::mem_fun(*this, &TheClass::on_something), false), false - * ); + * connect_notify(sigc::mem_fun(*this, &TheClass::on_something)); + * connect(sigc::bind_return(sigc::mem_fun(*this, &TheClass::on_something), false), false); * @endcode * * @param slot The signal handler, which should have a @c void return type, @@ -213,7 +196,7 @@ public: */ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) { - return sigc::connection(connect_notify_(slot, after)); + return sigc::connection(connect_impl_(true, slot, after)); } /** Connects a signal handler without a return value to a signal. @@ -227,10 +210,6 @@ public: } }; -// TODO: When we can break ABI, consider renaming -// SignalProxyDetailed => SignalProxyDetailedBase -// SignalProxyDetailedAnyType => SignalProxyDetailed - // Shared portion of a Signal with detail /** The SignalProxy provides an API similar to sigc::signal that can be used to * connect sigc::slots to glib signals. @@ -240,10 +219,10 @@ public: * the template derivatives, which serve as gatekeepers for the * types allowed on a particular signal. */ -class SignalProxyDetailed : public SignalProxyBase +class SignalProxyDetailedBase : public SignalProxyBase { public: - ~SignalProxyDetailed() noexcept; + ~SignalProxyDetailedBase() noexcept; /// Stops the current signal emission (not in libsigc++) void emission_stop(); @@ -255,11 +234,11 @@ protected: * and the C callbacks that should be called by glib. * @param detail_name The detail name, if any. */ - SignalProxyDetailed( + SignalProxyDetailedBase( Glib::ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name); /** Connects a signal handler to a signal. - * This is called by connect() and connect_notify() in derived SignalProxyDetailedAnyType classes. + * This is called by connect() and connect_notify() in derived SignalProxyDetailed classes. * * @param notify Whether this method is called by connect_notify() or by connect(). * @param slot The signal handler, usually created with sigc::mem_fun() or sigc::ptr_fun(). @@ -280,26 +259,28 @@ private: const Glib::ustring detailed_name_; // signal_name[::detail_name] // no copy assignment - SignalProxyDetailed& operator=(const SignalProxyDetailed&); + SignalProxyDetailedBase& operator=(const SignalProxyDetailedBase&) = delete; }; +#ifndef DOXYGEN_SHOULD_SKIP_THIS +template +class SignalProxyDetailed; +#endif // DOXYGEN_SHOULD_SKIP_THIS + /** Proxy for signals with any number of arguments and possibly a detailed name. * Use the connect() or connect_notify() method, with sigc::mem_fun() or sigc::ptr_fun() * to connect signal handlers to signals. */ template -class SignalProxyDetailedAnyType; - -template -class SignalProxyDetailedAnyType : public SignalProxyDetailed +class SignalProxyDetailed : public SignalProxyDetailedBase { public: using SlotType = sigc::slot; using VoidSlotType = sigc::slot; - SignalProxyDetailedAnyType( + SignalProxyDetailed( ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name) - : SignalProxyDetailed(obj, info, detail_name) + : SignalProxyDetailedBase(obj, info, detail_name) { } @@ -339,9 +320,8 @@ public: * connect_notify() binds return T() to the connected signal handler. * For instance, if the return type is @c bool, the following two calls are equivalent. * @code - * connect_notify( sigc::mem_fun(*this, &TheClass::on_something) ); - * connect( sigc::bind_return(sigc::mem_fun(*this, &TheClass::on_something), false), false - * ); + * connect_notify(sigc::mem_fun(*this, &TheClass::on_something)); + * connect(sigc::bind_return(sigc::mem_fun(*this, &TheClass::on_something), false), false); * @endcode * * @param slot The signal handler, which should have a @c void return type, @@ -365,25 +345,6 @@ public: } }; -/* Templates below has been added to avoid API break, and should not be - * used in a newly created code. SignalProxyDetailedAnyType class should be - * used instead of SignalProxyDetailed# class. - */ -template -using SignalProxyDetailed0 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed1 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed2 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed3 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed4 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed5 = SignalProxyDetailedAnyType; -template -using SignalProxyDetailed6 = SignalProxyDetailedAnyType; - } // namespace Glib #endif /* _GLIBMM_SIGNALPROXY_H */ diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4 index e6f7cb4..3ff1c4b 100644 --- a/tools/m4/convert_gio.m4 +++ b/tools/m4/convert_gio.m4 @@ -229,7 +229,7 @@ _CONVERSION(`const Glib::RefPtr&',`GMenuModel*',__CONVERT_CONST_REFPT # MenuItem _CONVERSION(`GMenuItem*',`Glib::RefPtr',`Glib::wrap($3)') -_CONVERSION(`const Glib::RefPtr&',`GMenuItem*',__CONVERT_CONST_REFPTR_TO_P) +_CONVERSION(`const Glib::RefPtr&',`GMenuItem*',__CONVERT_CONST_REFPTR_TO_P) # Mount _CONVERSION(`GMount*',`Glib::RefPtr',`Glib::wrap($3)') diff --git a/tools/m4/signal.m4 b/tools/m4/signal.m4 index d121b15..fa2cd99 100644 --- a/tools/m4/signal.m4 +++ b/tools/m4/signal.m4 @@ -28,13 +28,13 @@ $10 ',dnl detail_name $14,0,`dnl $10 - Glib::SignalProxyDetailedAnyType<$5`'($6)> signal_$4`'(const Glib::ustring& $13 = Glib::ustring()); + Glib::SignalProxyDetailed<$5`'($6)> signal_$4`'(const Glib::ustring& $13 = Glib::ustring()); ',`dnl detail_name and two_signal_methods $10 Glib::SignalProxy<$5`'($6)> signal_$4`'(); $10 - Glib::SignalProxyDetailedAnyType<$5`'($6)> signal_$4`'(const Glib::ustring& $13); + Glib::SignalProxyDetailed<$5`'($6)> signal_$4`'(const Glib::ustring& $13); ')dnl end detail_name ifelse(`$9',,,`_DEPRECATE_IFDEF_END ')dnl @@ -167,9 +167,9 @@ Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'() } ',dnl detail_name $14,0,`dnl -Glib::SignalProxyDetailedAnyType<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13) +Glib::SignalProxyDetailed<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13) { - return Glib::SignalProxyDetailedAnyType<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13); + return Glib::SignalProxyDetailed<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13); } ',`dnl detail_name and two_signal_methods Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'() @@ -177,9 +177,9 @@ Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'() return Glib::SignalProxy<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info); } -Glib::SignalProxyDetailedAnyType<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13) +Glib::SignalProxyDetailed<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13) { - return Glib::SignalProxyDetailedAnyType<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13); + return Glib::SignalProxyDetailed<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13); } ')dnl end detail_name ifelse(`$9',,,`_DEPRECATE_IFDEF_END -- 2.7.4