Qt 4.8
qwsdisplay_qws_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QWSDISPLAY_QWS_P_H
43 #define QWSDISPLAY_QWS_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "qwsdisplay_qws.h"
57 #include "qwssocket_qws.h"
58 #include "qwsevent_qws.h"
59 #include <private/qwssharedmemory_p.h>
60 #include "qwscommand_qws_p.h"
61 #include "qwslock_p.h"
62 
64 
66 {
67 public:
68  Data(QObject* parent, bool singleProcess = false);
69  ~Data();
70 
71  void flush();
72 
73  bool queueNotEmpty();
74  QWSEvent *dequeue();
75  QWSEvent *peek();
76 
78  void fillQueue();
79 #ifndef QT_NO_QWS_MULTIPROCESS
80  void connectToPipe();
81  void waitForConnection();
82  void waitForPropertyReply();
83  void waitForRegionAck(int winId);
84  void waitForRegionEvents(int winId, bool ungrabDisplay);
85  bool hasPendingRegionEvents() const;
86 #endif
87  void waitForCreation();
88 #ifndef QT_NO_COP
89  void waitForQCopResponse();
90 #endif
91  void init();
92  void reinit( const QString& newAppName );
93  void create(int n = 1);
94 
95  void flushCommands();
96  void sendCommand(QWSCommand & cmd);
98 
99  QWSEvent *readMore();
100 
101  int takeId();
102 
103  void setMouseFilter(void (*filter)(QWSMouseEvent*));
104 
105  //####public data members
106 
107 // QWSRegionManager *rgnMan;
109 #ifndef QT_NO_QWS_MULTIPROCESS
111 #endif
113 
114 #ifndef QT_NO_QWS_MULTIPROCESS
116 
117  static bool lockClient(QWSLock::LockType, int timeout = -1);
118  static void unlockClient(QWSLock::LockType);
119  static bool waitClient(QWSLock::LockType, int timeout = -1);
120  static QWSLock* getClientLock();
121 #endif // QT_NO_QWS_MULTIPROCESS
122 
123 private:
124 #ifndef QT_NO_QWS_MULTIPROCESS
126 #endif
128 
129 #if 0
130  void debugQueue() {
131  for (int i = 0; i < queue.size(); ++i) {
132  QWSEvent *e = queue.at(i);
133  qDebug( " ev %d type %d sl %d rl %d", i, e->type, e->simpleLen, e->rawLen);
134  }
135  }
136 #endif
137 
145 #ifndef QT_NO_COP
147 #endif
150 #ifdef QAPPLICATION_EXTRA_DEBUG
151  int mouse_event_count;
152 #endif
154 
155  enum { VariableEvent=-1 };
156 
157 };
158 
160 
161 #endif // QWSDISPLAY_QWS_P_H
void reinit(const QString &newAppName)
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
bool hasPendingRegionEvents() const
QList< int > unused_identifiers
void(* mouseFilter)(QWSMouseEvent *)
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
QWSEvent * current_event
static QWSLock * clientLock
static bool waitClient(QWSLock::LockType, int timeout=-1)
The QWSEvent class encapsulates an event in Qt for Embedded Linux.
Definition: qwsevent_qws.h:59
void waitForRegionAck(int winId)
void sendCommand(QWSCommand &cmd)
Q_CORE_EXPORT void qDebug(const char *,...)
unsigned char uchar
Definition: qglobal.h:994
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
void waitForRegionEvents(int winId, bool ungrabDisplay)
static bool lockClient(QWSLock::LockType, int timeout=-1)
Data(QObject *parent, bool singleProcess=false)
static QWSLock * getClientLock()
QList< QWSEvent * > queue
QWSMouseEvent * mouse_event
static void unlockClient(QWSLock::LockType)
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
void create(int n=1)
void sendSynchronousCommand(QWSCommand &cmd)
QWSQCopMessageEvent * qcop_response
QWSSharedMemory shm
QWSConnectedEvent * connected_event
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
void setMouseFilter(void(*filter)(QWSMouseEvent *))