Hi Axel,

I almost to fix this problem.

First this have five problem in WebKit patch.

1-> In Makefile.am file, lost #ENABLE_GTK and #ENABLE_GSTREAMER after
endif.

2-> Need import `System.Glib.GObject` in WebKit.Types.chs for
support. So i rewrite WebKit template code with below:

webkit/Graphics/UI/Gtk/WebKit/Types.chs : 
$(srcdir)/tools/hierarchyGen/hierarchy.list \
                      $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT)  \
                      $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template
                      $(strip 
$(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
                      $(srcdir)/tools/hierarchyGen/hierarchy.list \
                      $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template \
                      $@ --tag=webkit --lib=webkit --prefix=webkit \
                      --modname=Graphics.UI.Gtk.WebKit.Types \
                      --forward=*System.Glib.GObject \
                      --destructor=objectUnrefFromMainloop \
                      --forward=*Graphics.UI.Gtk.Types)

Make sure will generate

{#import System.Glib.GObject#}
{#import Graphics.UI.Gtk.Types#}

in WebKit.Types.chs

3-> error in `onCreateWebView` function define. I have fix it.

4-> You write *all* WebKit modules in hierarchy.list, but below module
haven't corresponding *.chs.pp file exist under WebKit directory.

                        WebkitWebNavigationAction as WebNavigationAction if 
webkit 
                        WebkitWebPolicyDecision as WebPolicyDecision if webkit
                        WebkitWebWindowFeatures as WebWindowFeatures if webkit
                        WebkitWebDatabase as WebDatabase if webkit
                        WebkitWebDataSource as WebDataSource if webkit
                        WebkitWebResource as WebResource if webkit
                        WebkitSecurityOrigin as SecurityOrigin if webkit

,-------------------------------------------------------------            
|I have fix above four problems, just problem (5) haven't fix.
|I think WebKit can compile pass after fix problem (5).
`-------------------------------------------------------------            

5-> Wrong hierarchy for WebKit module.
For exist WebKit modules with below Type:

WebView.chs.pp                                  GtkContainer
WebFrame.chs.pp                                 GObject
WebSettings.chs.pp                              GObject
WebBackForwardList.chs.pp               GObject
WebHistoryItem.chs.pp                   GObject
NetworkRequest.chs.pp                   GObject
NetworkResponse.chs.pp                  GObject
WebInspector.chs.pp                             GObject
Download.chs.pp                                 GObject

Just WebView is derive from Container, otherwise type is derive from GObject .

I wrote below code in file hierarchy.list:

....


                            GtkSeparatorToolItem        if gtk-2.4
                        GtkMozEmbed             if mozembed
            WebkitWebFrame as WebFrame          if webkit 
            WebkitWebSettings as WebSettings    if webkit
            WebkitNetworkRequest as NetworkRequest  if webkit
            WebkitNetworkResponse as NetworkResponse    if webkit
            WebkitDownload as Download  if webkit
            WebkitWebBackForwardList as WebBackForwardList if webkit
            WebkitWebHistoryItem as WebHistoryItem if webkit
            WebkitWebInspector as WebInspector if webkit
                        WebkitWebView as WebView            if webkit 
                        VteTerminal as Terminal if vte
                    GtkBox
                        GtkButtonBox

.....

But generate below code in gtk2hs/gtk/Graphics/UI/Gtk/Types.chs:

class WebInspectorClass o => BoxClass o
toBox :: BoxClass o => o -> Box
toBox = unsafeCastGObject . toGObject

instance BoxClass Box
instance WebInspectorClass Box
instance ObjectClass Box
instance GObjectClass Box where
  toGObject = GObject . castForeignPtr . unBox
  unsafeCastGObject = Box . castForeignPtr . unGObject

Looks, generator consider Box is derive from WindowInspectorClass, but
it's not.
So how to write those module hierarchy in hierarchy.list? 

Thanks, 

  -- Andy





------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to