Hi,

I defined in "plot.cc":

#include <gdk/gdk.h>
#include <wx/wx.h>


extern "C" {
  GdkWindow* gdk_get_drawable(wxPaintDC* dc)
  {
    return dc->GetGDKWindow();
  }
}

And then in my haskell source Plot.hs:

#else
foreign import ccall unsafe "plot.cc gdk_get_drawable"
        c_gdkGetDrawable :: DC a -> IO Gtk.DrawWindow
#endif

Which results in these errors:

[1 of 2] Compiling Graphics.UI.WX.Plot ( lib/Graphics/UI/WX/Plot.hs,
dist/build/Graphics/UI/WX/Plot.o )

lib/Graphics/UI/WX/Plot.hs:151:1:
    Unacceptable argument type in foreign declaration:
      Object (CWxObject (CDC a))
    When checking declaration:
      foreign import ccall unsafe "static plot.cc gdk_get_drawable"
c_gdkGetDrawable
        :: DC a -> IO Gtk.DrawWindow

lib/Graphics/UI/WX/Plot.hs:151:1:
    Unacceptable result type in foreign declaration: IO Gtk.DrawWindow
    When checking declaration:
      foreign import ccall unsafe "static plot.cc gdk_get_drawable"
c_gdkGetDrawable
        :: DC a -> IO Gtk.DrawWindow

How do I fix these errors?

Thanks,

Vivian
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to