Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qeventloop_p.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** $Id: qeventloop_p.h,v 1.2 2003/07/10 02:40:11 llornkcor Exp $
00003 **
00004 ** Definition of QEventLoop class
00005 **
00006 ** Copyright (C) 1992-2003 Trolltech AS.  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 #include "qplatformdefs.h"
00047 
00048 // SCO OpenServer redefines raise -> kill
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     // pending socket notifiers list
00124     QPtrList<QSockNot> sn_pending_list;
00125     // highest fd for all socket notifiers
00126     int sn_highest;
00127     // 3 socket notifier types - read, write and exception
00128     QSockNotType sn_vec[3];
00129 #endif
00130 
00131 #ifdef Q_WS_WIN
00132     // pending socket notifiers list
00133     QPtrList<QSockNot> sn_pending_list;
00134 #endif // Q_WS_WIN
00135 
00136 };
00137 
00138 #endif // QEVENTLOOP_P_H

Generated on Sat Nov 5 16:18:22 2005 for OPIE by  doxygen 1.4.2