On 09/16/2016 07:34 AM, dan hitt wrote:

I had to use 0 instead of STDIN, which doesn't seem to exist in stand-alone form in /usr/local/include/d/gtkd-3 (but if it did exist, it would no doubt be zero).

Oh sorry, that one is defined in druntime (core.sys.posix.unistd) it is
indeed 0.

And i haven't included any error control, or even used everything available (such as terminator_pos).

Also, i'm a little dubious about the signature of the callback. I declared it that way to make it more nearly conformant with the alias GIOFunc defined in glibtypes.d, but i was kind of torn as to how to type the data (void) part (third arg). (So if i left it at void i'd need one less cast in object initialization, but one more cast in the call back.)

GtkD does the same for the callbacks it uses, hasn't caused any problems
sofar.

So i'll need to tune it up, but just putting it up in case somebody is doing a search and needs a starting point. And also, of course, there may be weaknesses, maybe lots of them, besides those i've pointed out, which of course i'd like to hear about from anybody inclined to report them.

And thanks again for your work on gtkd, which is helping me a great deal.

Thanks.

dan