On 4/18/18, Ranier VF <ranier_...@hotmail.com> wrote: > Hi, > > "This is a proposal to introduce a way to post and run events on the > main UI thread." > > Just my two cents too. >
> IUP Dialog have a WID (windows HWND). Why not use PostMessage and > leave Windows do work? > BOOL WINAPI PostMessage( > _In_opt_ HWND hWnd, > _In_ UINT Msg, > _In_ WPARAM wParam, > _In_ LPARAM lParam > ); > Yes, in my proposal, I talked about Window's PostMessage. My API proposal name is called "IupPostMessage" partly because I wanted people familiar with the Windows API to make the connection because my proposal draws from the same spirit of the idea. But in when using IUP, we can't just reasonably call Window's PostMessage because it is not cross-platform. It won't work on any other platform except Windows. This whole proposal is on how to make something like PostMessage cross-platform. My IupALmixer example, which I linked, started off as a prototype to see how to implement this without modifying IUP. But what it showed is that on some platforms, it requires cooperation by the event loop processing code. And because IUP also wraps/abstracts the event loop management in a cross-platform way, the solution requires that the solution be in IUP itself because some changes need to be made in IUP's platform specific event loop implementations. Finally, my specific proposal implementation for Windows refers to renown Microsoft Engineer, Raymond Chen, and his deep discussion of PostThreadMessage vs. PostMessage. Please re-read that section where I explain why PostThreadMessage is the better solution for making this cross-platform in IUP. But in spirit, yes, this is the Windows PostMessage API, simply made cross-platform and available in IUP. Thanks, Eric ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users