[webkit-dev] Transparency on GTK/DirectFB
Iulian
iliescu.iulian at gmail.com
Fri Feb 20 06:49:42 PST 2009
Hi guys!
I'm trying to do something similar.
I have webkit (r30726 - because of this -
https://bugs.webkit.org/show_bug.cgi?id=19941)
with GTK over DirectFB.
I created the main page and browser page (as in GtkLauncher).
I successfully setted the ARGB color map for main window (made tests with
WebKit window too).
I called webkit_web_view_set_transparent() to set transparency to true.
I load a page with no background, just some divs on top of the page.
The problem is that i always have the white background (no matter what
background color i set to the FrameView).
If I create only the main window (without webkit) and i use expose-event to
draw a transparent background it works fine, so transparency support has no
problem.
Please help me!
Someone explain me how drawing are done in webkit, so i can have a clue
where to dig.
Iulian
Weber, Bernd wrote:
>
> Thanks Christian, great pointers!
>
> I got it working! Very cool!
>
> -Bernd
>
>
> For reference, here the changes I did in GtkLauncher:
>
> static void
> make_transparent(WebKitWebView* l_web_view)
> {
> GValue val = {0,};
> g_value_init (&val, G_TYPE_BOOLEAN);
> g_value_set_boolean (&val, 1);
> g_object_set_property (G_OBJECT (l_web_view), "transparent", &val);
> }
>
> static void
> make_transparent_cb (GtkWidget* widget, gpointer data)
> {
> make_transparent (web_view);
> }
>
> static void
> set_colormap(GtkWidget* window)
> {
> GdkScreen* screen = gtk_widget_get_screen (window);
> GdkColormap* colormap = gdk_screen_get_rgba_colormap (screen);
> if (!colormap) {
> g_warning ("No ARGB colormap available! Using RGB colormap!\n");
> colormap = gdk_screen_get_rgb_colormap (screen);
> } else {
> g_print ("Using ARGB colormap now! :-)\n");
> }
> gtk_widget_set_colormap (window, colormap);
> }
>
> In main.c:
> main_window = create_window ();
> set_colormap(main_window);
>
>
>
> -----Original Message-----
> From: webkit-dev-bounces at lists.webkit.org
> [mailto:webkit-dev-bounces at lists.webkit.org] On Behalf Of Christian
> Dywan
> Sent: Wednesday, September 24, 2008 3:48 PM
> To: webkit-dev at lists.webkit.org
> Subject: Re: [webkit-dev] Transparency on GTK/DirectFB
>
> Am Wed, 24 Sep 2008 15:16:24 -0700
> schrieb Darin Adler <darin at apple.com>:
>
>> On Sep 24, 2008, at 3:10 PM, Weber, Bernd wrote:
>>
>> > The holy grail however would be to achieve transparency to the
>> > underlying desktop, by defining "transparent" as the background
>> > color.
>>
>> WebKit definitely supports this. It's used this way in the Mac OS X
>> Dashboard.
>>
>> > I'm not sure whether Webkit, especially with GTK/DirectFB,
>> > supports this right now.
>>
>> I don't know if the GTK/DirectFB port supports it. That's a question
>> for someone else.
>
> Take a look at the headers. There's no other documentation at this
> point but it should be intuitive enough for most of what we have.
>
> webkit_web_view_set_transparent
>
> You will want that. And make sure you have an ARGB colour map on your
> window, ie. when you create your toplevel window.
>
> ciao,
> Christian
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
> -----------------------------------------
> This message (including any attachments) may contain confidential
> information intended for a specific individual and purpose. If you
> are not the intended recipient, delete this message. If you are
> not the intended recipient, disclosing, copying, distributing, or
> taking any action based on this message is strictly prohibited.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
--
View this message in context: http://www.nabble.com/Transparency-on-GTK-DirectFB-tp19659125p22120415.html
Sent from the Webkit mailing list archive at Nabble.com.
More information about the webkit-dev
mailing list