General tidy up of the MetaFile driver - make sure that everything
[wine.git] / windows / event.c
blob5deeb86ab7924aa96b96c163f111138722e525bb
1 /*
2 * X events handling functions
3 *
4 * Copyright 1993 Alexandre Julliard
5 *
6 */
8 #include "message.h"
10 /**********************************************************************/
12 EVENT_DRIVER *EVENT_Driver = NULL;
14 /***********************************************************************
15 * EVENT_Init
17 * Initialize network IO.
19 BOOL EVENT_Init(void)
21 return EVENT_Driver->pInit();
24 /***********************************************************************
25 * EVENT_AddIO
27 void EVENT_AddIO(int fd, unsigned io_type)
29 EVENT_Driver->pAddIO(fd, io_type);
32 /***********************************************************************
33 * EVENT_DeleteIO
35 void EVENT_DeleteIO(int fd, unsigned io_type)
37 EVENT_Driver->pDeleteIO(fd, io_type);
40 /***********************************************************************
41 * EVENT_WaitNetEvent
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 /***********************************************************************
53 * EVENT_Synchronize
55 * Synchronize with the X server. Should not be used too often.
57 void EVENT_Synchronize(void)
59 EVENT_Driver->pSynchronize();
62 /**********************************************************************
63 * EVENT_CheckFocus
65 BOOL EVENT_CheckFocus(void)
67 return EVENT_Driver->pCheckFocus();
70 /***********************************************************************
71 * EVENT_QueryPointer
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 /**********************************************************************
90 * EVENT_Pending
92 BOOL EVENT_Pending()
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 /***********************************************************************
108 * EVENT_WakeUp
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();