|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the QtGui module of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QVFBHDR_H |
|
43 #define QVFBHDR_H |
|
44 |
|
45 #include <QtGui/qcolor.h> |
|
46 #include <QtGui/qwindowdefs.h> |
|
47 #include <QtCore/qrect.h> |
|
48 |
|
49 QT_BEGIN_HEADER |
|
50 |
|
51 QT_BEGIN_NAMESPACE |
|
52 |
|
53 QT_MODULE(Gui) |
|
54 |
|
55 #ifndef QT_QWS_TEMP_DIR |
|
56 #define QT_QWS_TEMP_DIR "/tmp" |
|
57 #endif |
|
58 |
|
59 #ifdef QT_PRIVATE_QWS |
|
60 #define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2-%3") \ |
|
61 .arg(QT_QWS_TEMP_DIR).arg(getuid()).arg(DISPLAY) |
|
62 |
|
63 #define QT_VFB_MOUSE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
64 .append("/qtvfb_mouse") |
|
65 #define QT_VFB_KEYBOARD_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
66 .append("/qtvfb_keyboard") |
|
67 #define QT_VFB_MAP(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
68 .append("/qtvfb_map") |
|
69 #define QT_VFB_SOUND_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
70 .append("/qt_soundserver") |
|
71 #define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
72 .append("/QtEmbedded") |
|
73 #define QTE_PIPE_QVFB(DISPLAY) QTE_PIPE(DISPLAY) |
|
74 #else |
|
75 #define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2") \ |
|
76 .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) |
|
77 #define QT_VFB_MOUSE_PIPE(DISPLAY) QString("/tmp/.qtvfb_mouse-%1").arg(DISPLAY) |
|
78 #define QT_VFB_KEYBOARD_PIPE(DISPLAY) QString("/tmp/.qtvfb_keyboard-%1").arg(DISPLAY) |
|
79 #define QT_VFB_MAP(DISPLAY) QString("/tmp/.qtvfb_map-%1").arg(DISPLAY) |
|
80 #define QT_VFB_SOUND_PIPE(DISPLAY) QString("/tmp/.qt_soundserver-%1").arg(DISPLAY) |
|
81 #define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ |
|
82 .append("/QtEmbedded-%1") \ |
|
83 .arg(DISPLAY) |
|
84 #define QTE_PIPE_QVFB(DISPLAY) QString("/tmp/qtembedded-%1/QtEmbedded-%1") \ |
|
85 .arg(DISPLAY) |
|
86 #endif |
|
87 |
|
88 struct QVFbHeader |
|
89 { |
|
90 int width; |
|
91 int height; |
|
92 int depth; |
|
93 int linestep; |
|
94 int dataoffset; |
|
95 QRect update; |
|
96 bool dirty; |
|
97 int numcols; |
|
98 QRgb clut[256]; |
|
99 int viewerVersion; |
|
100 int serverVersion; |
|
101 int brightness; // since 4.4.0 |
|
102 WId windowId; // since 4.5.0 |
|
103 }; |
|
104 |
|
105 struct QVFbKeyData |
|
106 { |
|
107 unsigned int keycode; |
|
108 Qt::KeyboardModifiers modifiers; |
|
109 unsigned short int unicode; |
|
110 bool press; |
|
111 bool repeat; |
|
112 }; |
|
113 |
|
114 QT_END_NAMESPACE |
|
115 |
|
116 QT_END_HEADER |
|
117 |
|
118 #endif // QVFBHDR_H |