00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef QEVENTLOOP_P_H
00032 #define QEVENTLOOP_P_H
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #include "qplatformdefs.h"
00047
00048
00049 #if defined(raise)
00050 # undef raise
00051 #endif
00052
00053 #include "qwindowdefs.h"
00054
00055 class QSocketNotifier;
00056
00057 #if defined(Q_OS_UNIX) || defined (Q_WS_WIN)
00058 #include <qptrlist.h>
00059 #endif // Q_OS_UNIX || Q_WS_WIN
00060
00061 #if defined(Q_OS_UNIX)
00062 struct QSockNot
00063 {
00064 QSocketNotifier *obj;
00065 int fd;
00066 fd_set *queue;
00067 };
00068
00069 class QSockNotType
00070 {
00071 public:
00072 QSockNotType();
00073 ~QSockNotType();
00074
00075 QPtrList<QSockNot> *list;
00076 fd_set select_fds;
00077 fd_set enabled_fds;
00078 fd_set pending_fds;
00079
00080 };
00081 #endif // Q_OS_UNIX
00082
00083 #if defined(Q_WS_WIN)
00084 struct QSockNot {
00085 QSocketNotifier *obj;
00086 int fd;
00087 };
00088 #endif // Q_WS_WIN
00089
00090 class QEventLoopPrivate
00091 {
00092 public:
00093 QEventLoopPrivate()
00094 {
00095 reset();
00096 }
00097
00098 void reset() {
00099 looplevel = 0;
00100 quitcode = 0;
00101 quitnow = FALSE;
00102 exitloop = FALSE;
00103 shortcut = FALSE;
00104 }
00105
00106 int looplevel;
00107 int quitcode;
00108 unsigned int quitnow : 1;
00109 unsigned int exitloop : 1;
00110 unsigned int shortcut : 1;
00111
00112 #if defined(Q_WS_MAC)
00113 EventLoopTimerRef select_timer;
00114 #endif
00115
00116 #if defined(Q_WS_X11)
00117 int xfd;
00118 #endif // Q_WS_X11
00119
00120 #if defined(Q_OS_UNIX)
00121 int thread_pipe[2];
00122
00123
00124 QPtrList<QSockNot> sn_pending_list;
00125
00126 int sn_highest;
00127
00128 QSockNotType sn_vec[3];
00129 #endif
00130
00131 #ifdef Q_WS_WIN
00132
00133 QPtrList<QSockNot> sn_pending_list;
00134 #endif // Q_WS_WIN
00135
00136 };
00137
00138 #endif // QEVENTLOOP_P_H