Diffstat (limited to 'qmake/include/private/qeventloop_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qeventloop_p.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/qmake/include/private/qeventloop_p.h b/qmake/include/private/qeventloop_p.h new file mode 100644 index 0000000..b64d0df --- a/dev/null +++ b/qmake/include/private/qeventloop_p.h | |||
@@ -0,0 +1,74 @@ | |||
1 | #ifndef QEVENTLOOP_P_H | ||
2 | #define QEVENTLOOP_P_H | ||
3 | |||
4 | #include "qplatformdefs.h" | ||
5 | #include "qwindowdefs.h" | ||
6 | |||
7 | class QSocketNotifier; | ||
8 | |||
9 | #if defined(Q_OS_UNIX) | ||
10 | #include <qptrlist.h> | ||
11 | |||
12 | struct QSockNot | ||
13 | { | ||
14 | QSocketNotifier *obj; | ||
15 | int fd; | ||
16 | fd_set *queue; | ||
17 | }; | ||
18 | |||
19 | class QSockNotType | ||
20 | { | ||
21 | public: | ||
22 | QSockNotType(); | ||
23 | ~QSockNotType(); | ||
24 | |||
25 | QPtrList<QSockNot> *list; | ||
26 | fd_set select_fds; | ||
27 | fd_set enabled_fds; | ||
28 | fd_set pending_fds; | ||
29 | |||
30 | }; | ||
31 | #endif // Q_OS_UNIX | ||
32 | |||
33 | |||
34 | class QEventLoopPrivate | ||
35 | { | ||
36 | public: | ||
37 | QEventLoopPrivate() | ||
38 | { | ||
39 | reset(); | ||
40 | } | ||
41 | |||
42 | void reset() { | ||
43 | looplevel = 0; | ||
44 | quitcode = 0; | ||
45 | quitnow = FALSE; | ||
46 | exitloop = FALSE; | ||
47 | } | ||
48 | |||
49 | int looplevel; | ||
50 | int quitcode; | ||
51 | bool quitnow; | ||
52 | bool exitloop; | ||
53 | |||
54 | #if defined(Q_WS_MAC) | ||
55 | EventLoopTimerRef select_timer; | ||
56 | #endif | ||
57 | |||
58 | #if defined(Q_WS_X11) | ||
59 | int xfd; | ||
60 | #endif // Q_WS_X11 | ||
61 | |||
62 | #if defined(Q_OS_UNIX) | ||
63 | int thread_pipe[2]; | ||
64 | |||
65 | // pending socket notifiers list | ||
66 | QPtrList<QSockNot> sn_pending_list; | ||
67 | // highest fd for all socket notifiers | ||
68 | int sn_highest; | ||
69 | // 3 socket notifier types - read, write and exception | ||
70 | QSockNotType sn_vec[3]; | ||
71 | #endif | ||
72 | }; | ||
73 | |||
74 | #endif // QEVENTLOOP_P_H | ||