|
From: Diogo T. <fo...@gm...> - 2007-09-19 23:22:14
|
Let's get the event handling discussion started. ----- After some debate we ended up with two options on the table regarding the event system implementation. 1) The first one is straightforward, it involves a global event queue. The system and input events are captured by a platform event handler and posted to the global queue using kdPostEvent. In this case we would have to do our own callback handling which would probably require another container. 2) An alternative implementation is to use the event system and callback handler provided by the operating system. In Mac and Windows this implementation would be very straightforward as both are thread safe and support events and callbacks. However, this might not be true for all platforms so the first implementation might still be required as a fall back. Unless we have more options, I think we have no choice but to implement the first one. Once it's done, supporting new platforms becomes almost trivial. The second option, however, might still be useful by saving us some resources and processing on some platforms. Fire away. |