[Xcb] Feature Request: Function "xcb_test_for_event"
Christian Heller
christian.heller at tuxtax.de
Sat May 4 15:37:36 PDT 2013
> That's what you do if you build your application specifically on XCB.
> When building a generic event loop, you block until you have data from
> any source. And I can understand wanting to keep all the processing in
> a single thread; it seems like a waste to read out an event from XCB,
> stuff it in a queue or mailbox, and process it in another thread, if you
> could just have XCB unblock you when you have an event. (Also, you'd
> have to do that cross-thread communication for every event, to avoid
> getting events out of order.)
Not that I am a windows fan, but currently try to adapt CYBOI to it
(in addition to X Window System), so that it gets platform-independent.
The Win32 API:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632590(v=vs.85).aspx
describes, among others, these functions:
GetMessage (blocking)
PeekMessage (non-blocking)
Using "PeekMessage", one can choose between "PM_NOREMOVE" and
"PM_REMOVE", to be handed over as last argument.
Also, there are these functions:
GetQueueStatus
GetInputState
Some reasons for why they might be useful are here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644928(v=vs.85).aspx#examining_queue
Just wanted to let you know ...
Christian
--
Reform our monetary system! Money is a public infrastructure.
Use flowing money with demurrage, complementary, community currencies!
http://www.humane-wirtschaft.de/beitraege/in-english/
More information about the Xcb
mailing list