source: trunk/src/gui/embedded/qvfbhdr.h@ 855

Last change on this file since 855 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtGui module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
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** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
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
49QT_BEGIN_HEADER
50
51QT_BEGIN_NAMESPACE
52
53QT_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
88struct 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
105struct QVFbKeyData
106{
107 unsigned int keycode;
108 Qt::KeyboardModifiers modifiers;
109 unsigned short int unicode;
110 bool press;
111 bool repeat;
112};
113
114QT_END_NAMESPACE
115
116QT_END_HEADER
117
118#endif // QVFBHDR_H
Note: See TracBrowser for help on using the repository browser.