Re: gtkmm-4: Widget wrappers can't be deleted like in gtkmm-3



On Fri, 1 Dec 2017 13:35:01 +0100
Kjell Ahlstedt <kjellahlstedt gmail com> wrote:
Changes in gtk+-4 make it impossible to delete C++ widget wrappers
like it's done in Gtk::Object::~Object() and 
Gtk::Object::_release_c_instance(). See 
https://bugzilla.gnome.org/show_bug.cgi?id=773642#c20. How can we do
it in gtkmm-4? Comments ans suggestions are welcome.

I guess one approach is to retain the Gtk::Widget/Gtk::Window class for
top level widgets, on which gtk_widget_destroy() can be called with the
correct result, and to manage everything else by operating only on the
GObject reference count (as with Glib::RefPtr) and by adding and
removing widgets from their containers.  That is essentially (and
somewhat fortuitously) what a wrapper of my own which I sometimes use
does, and what (as I understand it) C code is supposed to do with GTK+4.

It would however give rise to a fearsome amount of work and a complete
redesign of the interfaces, which I imagine would not be welcome to
gtkmm users.

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]