[webkit-gtk] webkit2 missing webkit_web_view_set_transparent ?
Carlos Garcia Campos
cgarcia at igalia.com
Fri Jan 16 06:38:04 PST 2015
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().
For b) we could add a new flag to WebKitSnapshotOptions, something like
WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND. I'm not sure if it makes
sense to allow setting any color for snapshots and it would make the API
more complicated. Having a transparent background the user can compose
the resulting snapshot to get any background color. Another advantage is
that we can take transparent snapshots without affecting the web view
rendered in the screen.
Is there any other case missing, would this two things be enough for
people currently using webkit_web_view_set_transparent in WK1?
> > Jérémy.
> >
> >
> >
>
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
--
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20150116/946c8834/attachment.sig>
More information about the webkit-gtk
mailing list