Re: RFC: Re-Design GtkStyle to only pass cairo-context?

Hello Kalle,

> I guess it could work if one derives a GtkCairoStyle from GtkStyle and
> add the cairo-based API to that. That way casts to GtkStyle should
> work and engines could implement the old api with the wrapper
> approach.
> Or was that what you meant already?-)
Not really, because as far as I understand this would break existing
themes, wouldn't it? Would this tradeof be accepted, in favour of a
cleaner API?
The wrappers could be even implemented in GTK+ itself, removing legacy
code from the themes.

My idea was to re-implement the whole group of gtk_paint functions
again as e.g. gtk_cairo_paint - and gtk calls still the old functions
which are by default only wrappers to the new gtk_cairo_paint if the
theme engine does not overwrite them (-> if it overwrites it, its an
old theme engine and we don't use cairo). However this would not allow
to pass cairo-contexts to the gtk_paint functions, to be honest your
approach sounds much cleaner and better.

lg Clemens

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