would be a nice task for the consortium engineer :) Stef On Sep 22, 2012, at 8:22 PM, Igor Stasenko wrote:
First, we need to make one thing:
Change the VM to not call ioProcessEvents function directly, but rather use a variable which will hold a function pointer. Initially, when VM starts, that function pointer is NULL, and so, "process events" is NOP.
Then we need to implement a module which will manage host windows, and once image tells it to create a window, it can change the function pointer to ioProcessEvents to own function.
This change, would allow us to temporary disable any external event processing (like in case of callbacks).
Second, we should move all event-related stuff to new plugin (for instance, all definitions in sq.h like sqInputEvent , ioSetInputSemaphore() ioGetNextEvent() etc).
For all UI-related stuff the image should communicate with a new plugin, while VM should get rid of all knowledge of any existence of UI events, like input semaphores, primitives for fetching them etc.
Third, of course, all screen update/refresh primitives should be deprecated, and image should use new primitives to update the contents of host window(s).
-- Best regards, Igor Stasenko.