More C interfacing issues
Ian Lynagh
igloo at earth.li
Tue Jul 2 13:00:57 EDT 2002
Hi all,
A couple more questions.
Firstly, some ncurses calls return a *WINDOW and others take one as an
argument but you never actually look at the contents of one yourself. I
have defined "data Window = Window" and am using Ptr Window for the
types of these. However, this means I get a warning about an unused
constructor. Is there a better way to do this?
Secondly, does anyone have any suggestions on how to provide an
interface to this?
void getyx(WINDOW *win, int y, int x);
The getyx macro places the current cursor position of the
given window in the two integer variables y and x.
The type would probably ideally be "Ptr Window -> IO (CInt, CInt)".
Thanks
Ian
More information about the FFI
mailing list