Am Thu, 12 Mar 2009 18:51:33 +0200 schrieb Cody Russell <brats...@gnome.org>:
> On Tue, Feb 24, 2009 at 12:30 AM, Alberto Ruiz <ar...@gnome.org> > wrote: > > > * All drawing funcitions to use a cario context and hide GtkWidget > > and GdkWindow (Strong request from 3rd party toolkits) > > > > After thinking some more about this, I'm not convinced that getting > rid of the GtkWidget* pointer is a good idea. We should not pass a > GdkWindow* handle, and we should pass the cairo context.. but if we > don't pass the GtkWidget* pointer then we will potentially lose a lot > of things that can be exposed to a theme engine won't we? > > For example, what if you want to know what is the type of the parent > container? We can dump it into the StyleContext under the "parent" > key. But what if we want to know the grandparent container? What if > we want to know next/previous widget in the parent container? It's > hard to forsee what's useful. > > On the other hand, what if the widget is NULL? I think the point of > removing the GtkWidget* pointer was so someone like Firefox can pass > all the useful information through the style context without needing > to have an instance of a widget. But I don't think we should bend > over backwards to suit their interests if it means restricting our > own possibilities and cutting out obvious use cases. > > Any thoughts? Hey Cody, I think you are pretty much giving the best reason for leaving out the GtkWidget* yourself: any use cases which do not involve actual widgets, such as XUL, WebKit, Qt theming, and so on will break soon enough if we make the same mistake as we did before, by assuming that a GtkWidget* is there. We likely would have themes which cannot be used outside of Gtk right from the start. I think considering those use cases you mention, such as inspecting the widget hierarchy, are solvable. And if a use case is missing after the first version it's not the end of the world, nothing is perfect from day one (GIO anyone? ;)). Just my 2 pfennig, Christian _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list