2 * X events handling functions
4 * Copyright 1993 Alexandre Julliard
10 extern EVENT_DRIVER X11DRV_EVENT_Driver
;
12 /***********************************************************************
15 EVENT_DRIVER
*EVENT_GetDriver(void)
17 return &X11DRV_EVENT_Driver
;
20 /***********************************************************************
23 * Initialize network IO.
25 BOOL32
EVENT_Init(void)
27 return EVENT_GetDriver()->pInit();
30 /***********************************************************************
33 void EVENT_AddIO(int fd
, unsigned io_type
)
35 EVENT_GetDriver()->pAddIO(fd
, io_type
);
38 /***********************************************************************
41 void EVENT_DeleteIO(int fd
, unsigned io_type
)
43 EVENT_GetDriver()->pDeleteIO(fd
, io_type
);
46 /***********************************************************************
49 * Wait for a network event, optionally sleeping until one arrives.
50 * Return TRUE if an event is pending, FALSE on timeout or error
51 * (for instance lost connection with the server).
53 BOOL32
EVENT_WaitNetEvent(BOOL32 sleep
, BOOL32 peek
)
55 return EVENT_GetDriver()->pWaitNetEvent(sleep
, peek
);
58 /***********************************************************************
61 * Synchronize with the X server. Should not be used too often.
63 void EVENT_Synchronize(void)
65 EVENT_GetDriver()->pSynchronize();
68 /**********************************************************************
71 BOOL32
EVENT_CheckFocus(void)
73 return EVENT_GetDriver()->pCheckFocus();
76 /***********************************************************************
79 BOOL32
EVENT_QueryPointer(DWORD
*posX
, DWORD
*posY
, DWORD
*state
)
81 return EVENT_GetDriver()->pQueryPointer(posX
, posY
, state
);
85 /***********************************************************************
86 * EVENT_DummyMotionNotify
88 * Generate a dummy MotionNotify event. Used to force a WM_SETCURSOR message.
90 void EVENT_DummyMotionNotify(void)
92 EVENT_GetDriver()->pDummyMotionNotify();
95 /**********************************************************************
96 * X11DRV_EVENT_Pending
98 BOOL32
EVENT_Pending()
100 return EVENT_GetDriver()->pPending();
103 /***********************************************************************
104 * IsUserIdle (USER.333)
106 * Check if we have pending X events.
108 BOOL16 WINAPI
IsUserIdle(void)
110 return EVENT_GetDriver()->pIsUserIdle();