Diffstat (limited to 'qmake/include/private/qeventloop_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qeventloop_p.h | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/qmake/include/private/qeventloop_p.h b/qmake/include/private/qeventloop_p.h index b64d0df..3a5350e 100644 --- a/qmake/include/private/qeventloop_p.h +++ b/qmake/include/private/qeventloop_p.h | |||
@@ -1,74 +1,138 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QEventLoop class | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed and/or modified under the terms of the | ||
11 | ** GNU General Public License version 2 as published by the Free Software | ||
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
13 | ** packaging of this file. | ||
14 | ** | ||
15 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
16 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
17 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
18 | ** | ||
19 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
20 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | ** | ||
22 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
23 | ** information about Qt Commercial License Agreements. | ||
24 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
25 | ** | ||
26 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
27 | ** not clear to you. | ||
28 | ** | ||
29 | **********************************************************************/ | ||
30 | |||
1 | #ifndef QEVENTLOOP_P_H | 31 | #ifndef QEVENTLOOP_P_H |
2 | #define QEVENTLOOP_P_H | 32 | #define QEVENTLOOP_P_H |
3 | 33 | ||
34 | // | ||
35 | // W A R N I N G | ||
36 | // ------------- | ||
37 | // | ||
38 | // This file is not part of the Qt API. This header file may | ||
39 | // change from version to version without notice, or even be | ||
40 | // removed. | ||
41 | // | ||
42 | // We mean it. | ||
43 | // | ||
44 | // | ||
45 | |||
4 | #include "qplatformdefs.h" | 46 | #include "qplatformdefs.h" |
47 | |||
48 | // SCO OpenServer redefines raise -> kill | ||
49 | #if defined(raise) | ||
50 | # undef raise | ||
51 | #endif | ||
52 | |||
5 | #include "qwindowdefs.h" | 53 | #include "qwindowdefs.h" |
6 | 54 | ||
7 | class QSocketNotifier; | 55 | class QSocketNotifier; |
8 | 56 | ||
9 | #if defined(Q_OS_UNIX) | 57 | #if defined(Q_OS_UNIX) || defined (Q_WS_WIN) |
10 | #include <qptrlist.h> | 58 | #include <qptrlist.h> |
59 | #endif // Q_OS_UNIX || Q_WS_WIN | ||
11 | 60 | ||
61 | #if defined(Q_OS_UNIX) | ||
12 | struct QSockNot | 62 | struct QSockNot |
13 | { | 63 | { |
14 | QSocketNotifier *obj; | 64 | QSocketNotifier *obj; |
15 | int fd; | 65 | int fd; |
16 | fd_set *queue; | 66 | fd_set *queue; |
17 | }; | 67 | }; |
18 | 68 | ||
19 | class QSockNotType | 69 | class QSockNotType |
20 | { | 70 | { |
21 | public: | 71 | public: |
22 | QSockNotType(); | 72 | QSockNotType(); |
23 | ~QSockNotType(); | 73 | ~QSockNotType(); |
24 | 74 | ||
25 | QPtrList<QSockNot> *list; | 75 | QPtrList<QSockNot> *list; |
26 | fd_set select_fds; | 76 | fd_set select_fds; |
27 | fd_set enabled_fds; | 77 | fd_set enabled_fds; |
28 | fd_set pending_fds; | 78 | fd_set pending_fds; |
29 | 79 | ||
30 | }; | 80 | }; |
31 | #endif // Q_OS_UNIX | 81 | #endif // Q_OS_UNIX |
32 | 82 | ||
83 | #if defined(Q_WS_WIN) | ||
84 | struct QSockNot { | ||
85 | QSocketNotifier *obj; | ||
86 | int fd; | ||
87 | }; | ||
88 | #endif // Q_WS_WIN | ||
33 | 89 | ||
34 | class QEventLoopPrivate | 90 | class QEventLoopPrivate |
35 | { | 91 | { |
36 | public: | 92 | public: |
37 | QEventLoopPrivate() | 93 | QEventLoopPrivate() |
38 | { | 94 | { |
39 | reset(); | 95 | reset(); |
40 | } | 96 | } |
41 | 97 | ||
42 | void reset() { | 98 | void reset() { |
43 | looplevel = 0; | 99 | looplevel = 0; |
44 | quitcode = 0; | 100 | quitcode = 0; |
45 | quitnow = FALSE; | 101 | quitnow = FALSE; |
46 | exitloop = FALSE; | 102 | exitloop = FALSE; |
103 | shortcut = FALSE; | ||
47 | } | 104 | } |
48 | 105 | ||
49 | int looplevel; | 106 | int looplevel; |
50 | int quitcode; | 107 | int quitcode; |
51 | bool quitnow; | 108 | unsigned int quitnow : 1; |
52 | bool exitloop; | 109 | unsigned int exitloop : 1; |
110 | unsigned int shortcut : 1; | ||
53 | 111 | ||
54 | #if defined(Q_WS_MAC) | 112 | #if defined(Q_WS_MAC) |
55 | EventLoopTimerRef select_timer; | 113 | EventLoopTimerRef select_timer; |
56 | #endif | 114 | #endif |
57 | 115 | ||
58 | #if defined(Q_WS_X11) | 116 | #if defined(Q_WS_X11) |
59 | int xfd; | 117 | int xfd; |
60 | #endif // Q_WS_X11 | 118 | #endif // Q_WS_X11 |
61 | 119 | ||
62 | #if defined(Q_OS_UNIX) | 120 | #if defined(Q_OS_UNIX) |
63 | int thread_pipe[2]; | 121 | int thread_pipe[2]; |
64 | 122 | ||
65 | // pending socket notifiers list | 123 | // pending socket notifiers list |
66 | QPtrList<QSockNot> sn_pending_list; | 124 | QPtrList<QSockNot> sn_pending_list; |
67 | // highest fd for all socket notifiers | 125 | // highest fd for all socket notifiers |
68 | int sn_highest; | 126 | int sn_highest; |
69 | // 3 socket notifier types - read, write and exception | 127 | // 3 socket notifier types - read, write and exception |
70 | QSockNotType sn_vec[3]; | 128 | QSockNotType sn_vec[3]; |
71 | #endif | 129 | #endif |
130 | |||
131 | #ifdef Q_WS_WIN | ||
132 | // pending socket notifiers list | ||
133 | QPtrList<QSockNot> sn_pending_list; | ||
134 | #endif // Q_WS_WIN | ||
135 | |||
72 | }; | 136 | }; |
73 | 137 | ||
74 | #endif // QEVENTLOOP_P_H | 138 | #endif // QEVENTLOOP_P_H |