Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Ranier VF
Hi, "Please ignore anyone who says "I don't need it so you can't have it" - but, obviously, it has to be a solution that causes them no pain when/if it does go in, and your proposal sounds just like that to me." I do not know if it was addressed to me. But I will answer anyway. I not agaist

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Pete Lomax via Iup-users
Hi there Eric, Thank you for looking at this - I just wanted to add my approval. I certainly get the point about battery life. The project I am currently working uses a background thread to handle a websocket feed, which arrives every 10s or so. While an IupTimer works, I run it at 10 times a

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Ranier VF
Hi, "IUP should not be the solution to every problem. It would be like incorporating a cross-platform C-runtime into IUP when that is the wrong approach. IUP is great as it is and for specialized problems it will never be able to beat a mature third party app, and right now my favorite app for the

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Ranier VF
Hi, "This proposal is a tiny patch to IUP, one that nobody except the implementors will notice. It does not break current behavior or create any trade offs. But it solves real problems deal with the fact that the real world uses threads, even inside the native platforms. If you don't have this

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Ranier VF
Hi, "I think we're in agreement here. The idea of "IupPostMessage", inspired from Windows PostMessage solves this problem elegantly. The implementation specific ways to pull this off on each platform are hidden from the user perspective." Great. "From my "Idea 2" proposal, what I'm suggesting

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Jörg F . Wittenberger
Eric, I'm afraid your comment bdelow does not make much sense to me. Also I did not suggest any polling. On Apr 19 2018, Eric Wing wrote: On 4/19/18, Jörg F. Wittenberger wrote: On Apr 19 2018, Eric Wing wrote: Since there seems to be so much concern and

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Eric Wing
On 4/19/18, Jörg F. Wittenberger wrote: > On Apr 19 2018, Eric Wing wrote: > >>Since there seems to be so much concern and speculation about the >>size, complexity, and implementation of what the patch might look >>like, I went ahead and implemented a fully

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Jörg F . Wittenberger
On Apr 19 2018, Eric Wing wrote: Since there seems to be so much concern and speculation about the size, complexity, and implementation of what the patch might look like, I went ahead and implemented a fully working version for Windows and GTK to provide something completely concrete to review.

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Jörg F . Wittenberger
On Apr 18 2018, Matt Welland wrote: On Wed, Apr 18, 2018 at 1:23 AM, Jörg F. Wittenberger < joerg.wittenber...@softeyes.net> wrote: Hi, just my two cents. On Apr 16 2018, Eric Wing wrote: This is a proposal to introduce a way to post and run events on the main UI thread. Currently (as

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Eric Wing
Since there seems to be so much concern and speculation about the size, complexity, and implementation of what the patch might look like, I went ahead and implemented a fully working version for Windows and GTK to provide something completely concrete to review. You can find the repo here:

Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Jörg F . Wittenberger
Eric, sorry, you missunderstood my proposed solution. I wanted to suggest to NOT put additional events into whatever queue Iup uses behind the scenes. Instead better maintain you own queue and process this before you complete Iup's queue once using IupFlush. On Apr 18 2018, Eric Wing