Re: Exposing cairo based implementation of CSS as an API in GTK+/gtkmm



Hi;

On 25 June 2016 at 12:45, Samik Ganguly <sganguly87 gmail com> wrote:
Hello Gtk+ developers,

if you're trying to reach the GTK+ developers you're using the wrong
mailing list; you want to use gtk-devel-list. I've added the list to
the Cc:

    Gtk+ implements various CSS3 functionality so that widgets can be styled
with CSS. As far as I understand these effects are implemented with cairo
drawing API. Is there any chance to expose some of the effects such as
blurred shadow, transitions etc. as generic functions in Gtk+ API so that
they can be used without CSS?

No, there are no plans.

The CSS-based drawing is heavily tied to the state defined by the CSS
machinery, and that section of the API is private (for good reasons,
given the speed with which it's been changing and it's supposed to
change in the future).

For example, if someone is doing some custom drawing with cairo on Gtk+ such
as non rectangular widgets, curves with shadow etc. then they can take
advantages of such API instead having to implement those effects with cairo
themselves. For rectangular widgets StyleProvider's draw_background,
draw_frame methods can be used to specify such effects in CSS, but for
others I'm guessing they're probably not suitable.

The overall plan is to make widgets more lightweight and easier to
compose — similar to "<div>" elements in HTML. The idea is that if you
want something that draws with CSS semantics, you will be able to use
widgets.

Additionally, the plan is to add a Clutter-like scene graph that sits
below GTK, for UIs that do not rely on complex widget semantics (like
media player UIs or games).

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[ ] ebassi [ gmail com]


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