On 10 Jul 2012, at 09:00, Axel Simon wrote: >> P.S. What does tools/hierarchyGen/hierarchy.list actually do? > > It is used by a small tool called HierarchyGen.hs to generate Types.chs.
I suspect Peter might have been wondering why there is a hierarchy.list file tools/hierarchyGen/hierarchy.list as well as gtk/hierarchy.list. It seems like gtk/hierarchy.list is the one that is actually used. > If it is really too much hassle to add tags to the file for Gtk3, you should > be able to use a specify a different file in the cabal file using if's: > > if flag(have-gtk3) > x-Types-Hierarchy: hierarchy3.list > else > x-Types-Hierarchy: hierarchy.list > > or something like that. I had a quick play around and I don't think we should use the tags system. I think it would be messy as GtkObject needs to go away and there does not seem to be a way to do that (I tried using a tag, but it still left the references to the parent class in the children). I think it might be a good time to do a spring clean and remove some of the old depricated stuff. I have attached my attempt at hierarchy3.list.
hierarchy3.list
Description: Binary data
In gtk.cabal I now have this (I removed the original x-Type-Hierarchy line)... if flag(gtk3) x-Types-Hierarchy: hierarchy3.list x-Types-Tag: default pkgconfig-depends: gthread-2.0, gtk+-3.0 else x-Types-Hierarchy: hierarchy.list x-Types-Tag: default plugNsocket pkgconfig-depends: gthread-2.0, gtk+-2.0 I had to disable plugNsocket because they have moved to gtk/gtkx.h and I could not work out how to get them to work. I tried creating a gtk3.h that #included gtk/gtk.h and gtk/gtkx.h, but that did not seem to work. How is it working out what header file to look in? After doing this and applying Peter's patch, it is getting this far for me (I am off to dinner, but will be online again later)... Resolving dependencies... Ready to install gtk-0.12.3.1 Waiting for install task to finish... Configuring gtk-0.12.3.1... Building gtk-0.12.3.1... Preprocessing library gtk-0.12.3.1... Embedding.hsc: In function ‘main’: Embedding.hsc:44: error: expected specifier-qualifier-list before ‘GtkSocket’ Embedding.hsc:44: error: expected ‘;’ before ‘)’ token Embedding.hsc:44: error: expected statement before ‘)’ token compiling dist/build/Graphics/UI/Gtk/Embedding/Embedding_hsc_make.c failed (exit code 1)
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel