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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Kjell Ahlstedt-2

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.


_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

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

Chris Vine-3
On Fri, 1 Dec 2017 13:35:01 +0100
Kjell Ahlstedt <[hidden email]> 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
_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list