2 * X events handling functions
4 * Copyright 1993 Alexandre Julliard
10 /**********************************************************************/
12 EVENT_DRIVER *EVENT_Driver = NULL;
14 /***********************************************************************
17 * Initialize network IO.
21 return EVENT_Driver->pInit();
24 /***********************************************************************
27 void EVENT_AddIO(int fd, unsigned io_type)
29 EVENT_Driver->pAddIO(fd, io_type);
32 /***********************************************************************
35 void EVENT_DeleteIO(int fd, unsigned io_type)
37 EVENT_Driver->pDeleteIO(fd, io_type);
40 /***********************************************************************
43 * Wait for a network event, optionally sleeping until one arrives.
44 * Return TRUE if an event is pending, FALSE on timeout or error
45 * (for instance lost connection with the server).
47 BOOL EVENT_WaitNetEvent(BOOL sleep, BOOL peek)
49 return EVENT_Driver->pWaitNetEvent(sleep, peek);
52 /***********************************************************************
55 * Synchronize with the X server. Should not be used too often.
57 void EVENT_Synchronize(void)
59 EVENT_Driver->pSynchronize();
62 /**********************************************************************
65 BOOL EVENT_CheckFocus(void)
67 return EVENT_Driver->pCheckFocus();
70 /***********************************************************************
73 BOOL EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state)
75 return EVENT_Driver->pQueryPointer(posX, posY, state);
79 /***********************************************************************
80 * EVENT_DummyMotionNotify
82 * Generate a dummy MotionNotify event. Used to force a WM_SETCURSOR message.
84 void EVENT_DummyMotionNotify(void)
86 EVENT_Driver->pDummyMotionNotify();
89 /**********************************************************************
94 return EVENT_Driver->pPending();
97 /***********************************************************************
98 * IsUserIdle (USER.333)
100 * Check if we have pending X events.
102 BOOL16 WINAPI IsUserIdle16(void)
104 return EVENT_Driver->pIsUserIdle();
107 /***********************************************************************
110 * Wake up the scheduler (EVENT_WaitNetEvent). Use by 32 bit thread
111 * when thew want signaled an event to a 16 bit task. This function
112 * will become obsolete when an Asynchronous thread will be implemented
114 void EVENT_WakeUp(void)
116 EVENT_Driver->pWakeUp();