int silc_select(SilcSchedule schedule, void *context)
{
SilcWin32Scheduler internal = (SilcWin32Scheduler)context;
int silc_select(SilcSchedule schedule, void *context)
{
SilcWin32Scheduler internal = (SilcWin32Scheduler)context;
/* Window callback. We get here when some event occurs on file descriptor
or socket that has been scheduled. We add them to dispatch queue and
/* Window callback. We get here when some event occurs on file descriptor
or socket that has been scheduled. We add them to dispatch queue and
static LRESULT CALLBACK
silc_schedule_wnd_proc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
{
static LRESULT CALLBACK
silc_schedule_wnd_proc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
{
SetWindowPos(internal->window, HWND_BOTTOM, 0, 0, 0, 0, SWP_FRAMECHANGED);
internal->wakeup_sema = CreateSemaphore(NULL, 0, 100, NULL);
SetWindowPos(internal->window, HWND_BOTTOM, 0, 0, 0, 0, SWP_FRAMECHANGED);
internal->wakeup_sema = CreateSemaphore(NULL, 0, 100, NULL);
/* Schedule for events. The silc_schedule_wnd_proc will be called to
deliver the events for this fd. */
WSAAsyncSelect(task->fd, internal->window, SILC_WM_EVENT, events);
/* Schedule for events. The silc_schedule_wnd_proc will be called to
deliver the events for this fd. */
WSAAsyncSelect(task->fd, internal->window, SILC_WM_EVENT, events);