Am 27.07.2015 um 12:48 schrieb Nodir Temirkhodjaev: > Monday, July 27, 2015, 3:07:18 PM, Jörg F. Wittenberger wrote: >> Am 25.07.2015 um 16:24 schrieb Nodir Temirkhodjaev: >>>> The best thing I could hope for would be if I could ask Iup for a file >>>> descriptor to listen on. Whenever data is ready to read on this fd, I >>>> would know that Iup wants to become active and I should call the stepper >>>> until it eat up all this input. > >>> We need new global attribute (maybe "XSOCKETFD"), >>> which will contain result of ConnectionNumber(iupmot_display). > >> Alike. >> But this one would only work for Motif, wouldn't it? > > Similar in gtkSetGlobalAttrib(): > IupSetGlobal("XSOCKETFD", ConnectionNumber(xdisplay)); > > My usage of IUP with poll()-like based message loop in Windows: > https://github.com/tnodir/wipf/blob/master/bin/lua/main.lua#L64
Somehow my attempts to do something alike (though I'm using the gtk version on Linux), fail. The point is: where to run the IupLoopStep, ~flush etc. I gather that should be done from the same thread running the IupMainLoop. Therefore the only way is to run those from a callback. Correct? If so, it should be OK to run them from a timers action callback. But whatever I try, it looks as if nothing took effect until this very timer callback returns to the main loop. (Which means that I can skip the magic, the main loop itself would suffice.) I'm confused. ------------------------------------------------------------------------------ _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users