Re: Gtk+ 3.0 Theming API Hackfest Minutes



2009/3/12 Cody Russell <bratsche gnome org>:
> On Tue, Feb 24, 2009 at 12:30 AM, Alberto Ruiz <aruiz 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.

Hiding the widget pointer is not only something that we are doing to
please the third party toolkits. We are doing it because it is easy to
abuse implementation details of the widget that makes widget
maintainers life harder. The widget implementation becomes public data
that cannot change without breaking engines making use of it.

The idea is that CSS selectors allows us to represent the widget
hierarchy, and we use this Dom to get rid of the widget pointer.

> Any thoughts?
>
> / Cody
>



-- 
Un saludo,
Alberto Ruiz


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