Attached is a small patch to get the DFB compilation going (against r40351)
and apart from this patch,
we need to add support code for DFB for the plugin's view
So see all the checks with  "#if PLATFORM(X11)" in
WebCore/plugins/gtk/PluginViewGtk.cpp
and do the necessary stuff for DFB.
NOTE: The Xembed and XtBin will not work for DFB

Also i still need to figure out how to send DFBEvents to the plugin ?


On Thu, Mar 5, 2009 at 10:39 AM, Sriram Neelakandan
<[email protected]> wrote:
>> I have built Webkit in order to get rid of X11  calls.
>
> This is fine
>
>> Tried to replace the X11 API  with GDK calls.
>
> If  you need true DFB support  this will not work. (X11 != GDK, but X11 == 
> DFB)
> As per 
> "https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Drawing_and_Event_Handling";
> the "void * window"  should be directly mapped to DFB surface or sub-surface.
> Then it would work great for even Window-ed and window-less plugins.
>
> More over all browser plugins today are written for X11 / Win32 / Mac
> and not for GTK / QT / WxWindows / Skia
>
> So going the DFB way is the right step forward.. and you can hope to
> get your code inside Webkit some day.
>
>> But it fails when there is conversion from GtkXtBin to GtkSocket
>
> No GTK if you want true DFB support. The XtBin is basically a X11 bridge
>
>>
>> And one more thing I found  gdk_window_add_filter()'s call back
>> function is not getting called in my plug in library.
>>
>> I doubt its because, the plug in window creation may be a problem.
>>
>>
>>
>> On Mon, Mar 2, 2009 at 11:00 PM, Sriram Neelakandan
>> <[email protected]> wrote:
>>> Well, what u need is a build time flag, which should first get rid of
>>> all X11 headers.
>>> Then you end up having to define or mapping the missing structure /
>>> defines in npruntime,h & npapi.h to appropriate DFB equivalents
>>>
>>> Now, after that, you will get stuck with gtk_socket_new .. a well
>>> known issue with DFB windowing which is currently not implemented in
>>> the gtk/dfb backend.
>>>
>>> I remember some how the mozilla guys managed to get DFB SWFDEC player
>>> plugin working.. wonder how ?
>>> I think mostly they rendered the plugin on a different Window !
>>>
>>> I heard that gtk_socket_new may get fixed in DFB-2.0.. untill then DFB
>>> plugins will have to wait !
>>> Not sure if there is a better way to render DFB plugins on to
>>> Webframe/view 's surface directly !
>>>
>>>
>>>
>>> On Mon, Mar 2, 2009 at 8:53 PM, Rick <[email protected]> wrote:
>>>> Having just looked up DirectFB on Wikipedia, I see it is an interface
>>>> that skips X and talks directly to the framebuffer.
>>>>
>>>> There is mention of an API called XDirectFB that mimics X11 calls.
>>>> You might look for that.
>>>>
>>>> On Mon, Mar 2, 2009 at 8:38 AM, Ariya Hidayat
>>>> <[email protected]> wrote:
>>>>>
>>>>>> I am running Webkit on DirectFB.
>>>>>> AFAIK, plug in support is not there on DirectFB/Webkit.
>>>>>> I found in WebCore/plugin calls are all Xt/X11 based.
>>>>>> Can any one suggest me , how can I modify these call for DirectFB ?
>>>>>
>>>>> DirectFB is a complete different beast, compared to X11. AFAICS you have 
>>>>> to
>>>>> implement the whole plugin infrastructure for that.
>>>>> _______________________________________________
>>>>> webkit-dev mailing list
>>>>> [email protected]
>>>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers!
>>>> Rick
>>>> _______________________________________________
>>>> webkit-dev mailing list
>>>> [email protected]
>>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Sriram Neelakandan
>>> Author - Embedded Linux System Design And Development
>>> (http://tinyurl.com/2doosu)
>>> _______________________________________________
>>> webkit-dev mailing list
>>> [email protected]
>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>
>> _______________________________________________
>> webkit-dev mailing list
>> [email protected]
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>
>
>
> --
> Sriram Neelakandan
> Author - Embedded Linux System Design And Development
> (http://tinyurl.com/2doosu)
>



-- 
Sriram Neelakandan
Author - Embedded Linux System Design And Development
(http://tinyurl.com/2doosu)
diff -puNr WebKit-r40351/GNUmakefile.am WebKit-r40351_m/GNUmakefile.am
--- WebKit-r40351/GNUmakefile.am	2009-01-21 10:43:27.000000000 +0530
+++ WebKit-r40351_m/GNUmakefile.am	2009-02-03 19:57:10.000000000 +0530
@@ -264,8 +264,15 @@ endif
 
 if TARGET_X11
 global_cppflags += -DXP_UNIX
+webcore_libadd += -lXt
+global_cppflags += -DGDK_BACKEND_X11
 endif
 
+if TARGET_DIRECTFB
+global_cppflags += -DXP_UNIX
+global_cppflags += -DGDK_BACKEND_DIRECTFB
+endif
+ 
 if !ENABLE_DEBUG
 global_cppflags += -DNDEBUG
 else
diff -puNr WebKit-r40351/WebCore/bridge/npapi.h WebKit-r40351_m/WebCore/bridge/npapi.h
--- WebKit-r40351/WebCore/bridge/npapi.h	2009-01-21 10:44:14.000000000 +0530
+++ WebKit-r40351_m/WebCore/bridge/npapi.h	2009-02-03 19:57:10.000000000 +0530
@@ -94,8 +94,12 @@
 #endif
 
 #ifdef XP_UNIX
+#ifdef GDK_BACKEND_DIRECTFB
+    #include <directfb/directfb.h>
+#else
     #include <X11/Xlib.h>
     #include <X11/Xutil.h>
+#endif
     #include <stdio.h>
 #endif
 
@@ -229,6 +233,13 @@ typedef struct _NPRect
 
 
 #ifdef XP_UNIX
+
+#ifdef GDK_BACKEND_DIRECTFB
+typedef int32 Display;
+typedef int32 Visual;
+typedef int32 Colormap;
+#endif
+
 /*
  * Unix specific structures and definitions
  */
@@ -552,7 +563,11 @@ typedef struct _NPEvent
     uint32   lParam;
 } NPEvent;
 #elif defined (XP_UNIX)
-typedef XEvent NPEvent;
+#ifdef GDK_BACKEND_DIRECTFB
+  typedef DFBEvent NPEvent;
+#else
+  typedef XEvent NPEvent;
+#endif
 #else
 typedef void*            NPEvent;
 #endif /* XP_MAC */
@@ -573,7 +588,11 @@ typedef CGPathRef NPCGRegion;
 #elif defined(XP_WIN)
 typedef HRGN NPRegion;
 #elif defined(XP_UNIX)
-typedef Region NPRegion;
+#ifdef GDK_BACKEND_DIRECTFB
+  typedef DFBRegion NPRegion;
+#else
+  typedef Region NPRegion;
+#endif
 #else
 typedef void *NPRegion;
 #endif /* XP_MAC */
diff -puNr WebKit-r40351/WebCore/bridge/npruntime_internal.h WebKit-r40351_m/WebCore/bridge/npruntime_internal.h
--- WebKit-r40351/WebCore/bridge/npruntime_internal.h	2009-01-21 10:44:14.000000000 +0530
+++ WebKit-r40351_m/WebCore/bridge/npruntime_internal.h	2009-02-03 19:57:10.000000000 +0530
@@ -30,6 +30,7 @@
 #include "npruntime.h"
 
 #ifdef XP_UNIX
+#ifdef GDK_BACKEND_X11
     #include <X11/Xresource.h>
 
     #undef None
@@ -48,3 +49,4 @@
     #undef FontChange
     #undef GrayScale
 #endif
+#endif

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to