From: Andy S. <laz...@gm...> - 2010-12-15 16:05:40
|
Hi John, John Lato <jw...@gm...> writes: > Hi Andy, > > From: Andy Stewart <laz...@gm...> > > Hi John, > > John Lato <jw...@gm...> writes: > > > Hello, > > > > I just managed to install gtkglext with the quartz backend provided by gtk-osx.? This was much > more > > work than it should be, > > although a lot of that is probably related to the packaging of gtkglext. > > > > If anyone's interested, instructions are at > > http://johnlato.blogspot.com/2010/12/installing-gtkglext-haskell-bindings.html > I have seen you patches, to be honest, i don't like them. > > I agree they're pretty dirty. But getting something to build at all is an important first step. > > > Such as : > > #if !defined(WIN32) > -foreign import ccall unsafe "gdk_x11_drawable_get_xid" > - gdk_x11_drawable_get_xid :: (Ptr Drawable) -> IO CInt > #else > foreign import ccall unsafe "gdk_win32_drawable_get_handle" > gdk_win32_drawable_get_handle :: (Ptr Drawable) -> IO (Ptr a) > @@ -609,7 +607,7 @@ > liftM toNativeWindowId $ > (\(Drawable drawable) -> > #if !defined(WIN32) > - withForeignPtr drawable gdk_x11_drawable_get_xid > + withForeignPtr drawable (error "drawableGetID not defined on OS X") > #else > withForeignPtr drawable gdk_win32_drawable_get_handle > #endif > > You just simple remove "gdk_x11_drawable_get_xid" for quartz backend, > but X11 backend, this function is exist. > > IMO, If haven't any flag for quartz backend, > we should add below flag in gtk.cabal > > Flag use-quartz-backend > Description: Flag for quartz backend, thereby disabling certain features. > Default: False > > then we can use "USE_QUARTZ_BACKEND" flag to disable > "gdk_x11_drawable_get_xid" on quartz backend. > > #ifdef USE_QUARTZ_BACKEND > .... > #endif > > Then you need pass "use-quartz-backend" to cabal explicitly when you install > gtk on quartz backend. > > I agree this is the right thing to do, but I don't like the user needing to specify it. It would be > much better if this > could be auto-discovered somehow. Yes, i agree, but looks haven't auto-discovered way until now. And i haven't MacOS that i can't help you, sorry. Of course, please let me know if you find perfect way, i'm happy to help you push patches. :) Cheers, -- Andy > > > Other patches about quartz backend should use same way. > > This is the only quartz-specific change I found. > > AFAICT all of the functions I error'ed in gtkglext should be removed entirely; I can't find them > anywhere in the gtkglext c > source. Hopefully somebody more familiar with gtkglext could confirm this. > > Also there's the issue of the gtkglext library names. But that's related to the gtk-osx package; > the macports quartz > version would likely require a different flag. > > John > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d_______________________________________________ > Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users |