1 #ifndef EVENT_EXTENSIONS_IMPLEMENTATION_FILE
2 #define EVENT_EXTENSIONS_IMPLEMENTATION_FILE
23 #include <basis/portable.h>
24 #include <mechanisms/time_stamp.h>
28 bool event_extensions::poll()
34 bool event_extensions::poll(MSG &message)
36 return windoze_helper::event_poll(message);
50 bool event_extensions::poll(
int wait)
52 time_stamp start_time;
55 if (!poll(message))
return false;
56 }
while (wait && (time_stamp().value() - start_time.value() <= wait));
60 bool event_extensions::poll_on_message(
window_handle handle, UINT look_for,
61 int wait, MSG &message)
63 time_stamp start_time;
65 bool okay = poll(message);
66 if (!okay)
return false;
67 if ( (message.hwnd == handle) && (message.message == look_for) )
69 }
while (time_stamp().value() - start_time.value() <= wait);
74 bool event_extensions::poll_on_message_and_wparam(
window_handle handle,
75 UINT look_for, WPARAM look_also,
int wait, MSG &message)
77 time_stamp start_time;
79 bool okay = poll(message);
80 if (!okay)
return false;
81 if ( (message.hwnd == handle) && (message.wParam == look_also)
82 && (message.message == look_for) )
84 }
while (time_stamp().value() - start_time.value() <= wait);