X header help
Lucas Goss
lgoss007 at gmail.com
Sat Mar 11 18:09:27 PST 2006
Has anyone translated X C headers to D? I have X.h done and Xlib.h is
partly done.
Anyways, I've run into some code that I'm not sure how to translate it to D.
//----------
typedef void (*XIMProc)(
XIM,
XPointer,
XPointer
);
// then later a struct which uses the above function pointer
typedef struct {
XPointer client_data;
XIMProc callback;
} XIMCallback;
//----------
I translated the it as:
//----------
void function(XIM, XPointer, XPointer) XIMProc;
struct XIMCallback
{
XPointer client_data;
// XIMProc callback; ??? nope.
// void* callback = XIMProc(); ??? nope.
}
//----------
Obviously it failed to compile, but I'm not sure how to translate it.
More information about the Digitalmars-d
mailing list