[webkit-gtk] webkit2 missing webkit_web_view_set_transparent ?

Jérémy Lal kapouer at melix.org
Fri Jan 16 09:56:29 PST 2015


Le vendredi 16 janvier 2015 à 15:49 +0100, Carlos Garcia Campos a
écrit :
> El vie, 16-01-2015 a las 15:38 +0100, Carlos Garcia Campos escribió:
> > El jue, 15-01-2015 a las 18:38 +0100, Carlos Garcia Campos escribió:
> > > El jue, 15-01-2015 a las 13:14 +0100, Jérémy Lal escribió:
> > > > Le lundi 29 décembre 2014 à 10:32 +0100, Carlos Garcia Campos a écrit :
> > > > > 
> > > > > So, I find all this a bit messy. Exposing these methods in our API is
> > > > > easy, but first we need to understand what all those methods do, and
> > > > > what we want to expose and how.
> > > > 
> > > > Here are more usages described by
> > > > https://github.com/kapouer/node-webkitgtk/issues/15#issuecomment-70072579
> > > > and it seems to stop them from adopting webkit2gtk.
> > > 
> > > As I said, it should be easy to expose in our API, but I need to
> > > understand the different implementations and the use cases to decide the
> > > API. I'm already looking at it.
> > 
> > I've been looking at this, and playing with it a bit. I think there are
> > at least two different uses cases:
> > 
> >  a) A transparent window for a desktop environment.
> >  b) Taking snapshots of a web view (This is the node-webkitgtk case).
> > 
> > For a) we could add a method to WebKitWebView, but instead of
> > set_transparent we can add a more generic method
> > webkit_web_view_set_background_color() that receives a GdkRGBA. this
> > would allow to also use any other solid color, semi-transparent colors
> > or fully transparent (like WK1 does). This doesn't affect snapshots
> > taken with webkit_web_view_get_snapshot().
> 
> This is a screenshot of MiniBrowser with a rgba visual and app-pintable
> = TRUE using a fully transparent web view bakground in my desktop.
> 
> http://people.igalia.com/cgarcia/mini-browser-transparent.png

I guess it's not possible to set it using only gtk methods ? Then
the API you propose covers perfectly the uses discussed here (and i
can't think of anything else).

Thank you a lot for this.

Jérémy.




More information about the webkit-gtk mailing list