GtkBin as a publicly derivable abstract class please.
- From: Tristan Van Berkom <tristanvb openismus com>
- To: gtk-devel-list gnome org
- Subject: GtkBin as a publicly derivable abstract class please.
- Date: Fri, 12 Nov 2010 14:50:16 +0900
Guys,
this is the kind of thing we could probably just
resolve on irc but I work an opposite schedule so I'm
taking it to the list.
Today I found '_gtk_bin_set_child()'
Making that a private api render's GtkBin completely
useless as a subclassable container outside of GTK+.
But I beg to differ, GtkBin is definitely a useful
abstract class to derive from.
Also I noticed that the implementation takes no
reference to the child.
Please lets not make the mistake of gtk_widget_set_window()
again, foo_class_set_bar() apis invariably take a ref
to the object 'bar'... accept for the awkward case of
gtk_widget_set_window().
My recommended course of action is that gtk_bin_set_child()
should not directly make the reference but instead do so
implicitly by way of gtk_widget_set_parent(), thus somewhat
further reducing the workload of GtkBin subclasses.
It should return_if_fail() if (bin->child != NULL) as well.
Regards,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]