Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qt/qeventloop_p.h 3.3.8 edited Jan 11 14:38 $ 00003 ** 00004 ** Definition of QEventLoop class 00005 ** 00006 ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved. 00007 ** 00008 ** This file is part of the kernel module of the Qt GUI Toolkit. 00009 ** 00010 ** This file may be distributed and/or modified under the terms of the 00011 ** GNU General Public License version 2 as published by the Free Software 00012 ** Foundation and appearing in the file LICENSE.GPL included in the 00013 ** packaging of this file. 00014 ** 00015 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 00016 ** licenses for Qt/Embedded may use this file in accordance with the 00017 ** Qt Embedded Commercial License Agreement provided with the Software. 00018 ** 00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00021 ** 00022 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00023 ** information about Qt Commercial License Agreements. 00024 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00025 ** 00026 ** Contact info@trolltech.com if any conditions of this licensing are 00027 ** not clear to you. 00028 ** 00029 **********************************************************************/ 00030 00031 #ifndef QEVENTLOOP_P_H 00032 #define QEVENTLOOP_P_H 00033 00034 // 00035 // W A R N I N G 00036 // ------------- 00037 // 00038 // This file is not part of the Qt API. This header file may 00039 // change from version to version without notice, or even be 00040 // removed. 00041 // 00042 // We mean it. 00043 // 00044 // 00045 00046 #ifndef QT_H 00047 #include "qplatformdefs.h" 00048 #endif // QT_H 00049 00050 // SCO OpenServer redefines raise -> kill 00051 #if defined(raise) 00052 # undef raise 00053 #endif 00054 00055 #include "qwindowdefs.h" 00056 00057 class QSocketNotifier; 00058 #ifdef Q_OS_MAC 00059 class QMacSockNotPrivate; 00060 #endif 00061 00062 #if defined(Q_OS_UNIX) || defined (Q_WS_WIN) 00063 #include "qptrlist.h" 00064 #endif // Q_OS_UNIX || Q_WS_WIN 00065 00066 #if defined(Q_OS_UNIX) 00067 struct QSockNot 00068 { 00069 QSocketNotifier *obj; 00070 int fd; 00071 fd_set *queue; 00072 }; 00073 00074 class QSockNotType 00075 { 00076 public: 00077 QSockNotType(); 00078 ~QSockNotType(); 00079 00080 QPtrList<QSockNot> *list; 00081 fd_set select_fds; 00082 fd_set enabled_fds; 00083 fd_set pending_fds; 00084 00085 }; 00086 #endif // Q_OS_UNIX 00087 00088 #if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) 00089 struct QSockNot { 00090 QSocketNotifier *obj; 00091 int fd; 00092 }; 00093 #endif // Q_WS_WIN 00094 00095 class QEventLoopPrivate 00096 { 00097 public: 00098 QEventLoopPrivate() 00099 { 00100 reset(); 00101 } 00102 00103 void reset() { 00104 looplevel = 0; 00105 quitcode = 0; 00106 quitnow = FALSE; 00107 exitloop = FALSE; 00108 shortcut = FALSE; 00109 } 00110 00111 int looplevel; 00112 int quitcode; 00113 unsigned int quitnow : 1; 00114 unsigned int exitloop : 1; 00115 unsigned int shortcut : 1; 00116 00117 #if defined(Q_WS_MAC) 00118 uchar next_select_timer; 00119 EventLoopTimerRef select_timer; 00120 #endif 00121 00122 #if defined(Q_WS_X11) 00123 int xfd; 00124 #endif // Q_WS_X11 00125 00126 #if defined(Q_OS_UNIX) 00127 int thread_pipe[2]; 00128 00129 // pending socket notifiers list 00130 QPtrList<QSockNot> sn_pending_list; 00131 // highest fd for all socket notifiers 00132 int sn_highest; 00133 // 3 socket notifier types - read, write and exception 00134 QSockNotType sn_vec[3]; 00135 #endif 00136 00137 #if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) 00138 // pending socket notifiers list 00139 QPtrList<QSockNot> sn_pending_list; 00140 00141 // for controlling when to send posted events 00142 unsigned int wakeUps : 1; 00143 #endif // Q_WS_WIN 00144 00145 }; 00146 00147 #endif // QEVENTLOOP_P_H