summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index c8e6e74..c782837 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1,152 +1,153 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19** $Id$ 19** $Id$
20** 20**
21**********************************************************************/ 21**********************************************************************/
22#define QTOPIA_INTERNAL_LANGLIST 22#define QTOPIA_INTERNAL_LANGLIST
23#include <stdlib.h> 23#include <stdlib.h>
24#include <unistd.h> 24#include <unistd.h>
25#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
25#include <qfile.h> 26#include <qfile.h>
26#ifdef Q_WS_QWS 27#ifdef Q_WS_QWS
27#ifndef QT_NO_COP 28#ifndef QT_NO_COP
28#if QT_VERSION <= 231 29#if QT_VERSION <= 231
29#define private public 30#define private public
30#define sendLocally processEvent 31#define sendLocally processEvent
31#include "qcopenvelope_qws.h" 32#include "qcopenvelope_qws.h"
32#undef private 33#undef private
33#else 34#else
34#include "qcopenvelope_qws.h" 35#include "qcopenvelope_qws.h"
35#endif 36#endif
36#endif 37#endif
37#include <qwindowsystem_qws.h> 38#include <qwindowsystem_qws.h>
38#endif 39#endif
39#include <qtextstream.h> 40#include <qtextstream.h>
40#include <qpalette.h> 41#include <qpalette.h>
41#include <qbuffer.h> 42#include <qbuffer.h>
42#include <qptrdict.h> 43#include <qptrdict.h>
43#include <qregexp.h> 44#include <qregexp.h>
44#include <qdir.h> 45#include <qdir.h>
45#include <qlabel.h> 46#include <qlabel.h>
46#include <qdialog.h> 47#include <qdialog.h>
47#include <qdragobject.h> 48#include <qdragobject.h>
48#include <qtextcodec.h> 49#include <qtextcodec.h>
49#include <qevent.h> 50#include <qevent.h>
50#include <qtooltip.h> 51#include <qtooltip.h>
51#include <qsignal.h> 52#include <qsignal.h>
52#include "qpeapplication.h" 53#include "qpeapplication.h"
53#include "qpestyle.h" 54#include "qpestyle.h"
54#include "styleinterface.h" 55#include "styleinterface.h"
55#if QT_VERSION >= 300 56#if QT_VERSION >= 300
56#include <qstylefactory.h> 57#include <qstylefactory.h>
57#else 58#else
58#include <qplatinumstyle.h> 59#include <qplatinumstyle.h>
59#include <qwindowsstyle.h> 60#include <qwindowsstyle.h>
60#include <qmotifstyle.h> 61#include <qmotifstyle.h>
61#include <qmotifplusstyle.h> 62#include <qmotifplusstyle.h>
62#include "lightstyle.h" 63#include "lightstyle.h"
63 64
64#include <qpe/qlibrary.h> 65#include <qpe/qlibrary.h>
65#endif 66#endif
66#include "global.h" 67#include "global.h"
67#include "resource.h" 68#include "resource.h"
68#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 69#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
69#include "qutfcodec.h" 70#include "qutfcodec.h"
70#endif 71#endif
71#include "config.h" 72#include "config.h"
72#include "network.h" 73#include "network.h"
73#ifdef QWS 74#ifdef QWS
74#include "fontmanager.h" 75#include "fontmanager.h"
75#endif 76#endif
76 77
77#include "alarmserver.h" 78#include "alarmserver.h"
78#include "applnk.h" 79#include "applnk.h"
79#include "qpemenubar.h" 80#include "qpemenubar.h"
80#include "textcodecinterface.h" 81#include "textcodecinterface.h"
81#include "imagecodecinterface.h" 82#include "imagecodecinterface.h"
82 83
83#include <unistd.h> 84#include <unistd.h>
84#include <sys/file.h> 85#include <sys/file.h>
85#include <sys/ioctl.h> 86#include <sys/ioctl.h>
86#include <sys/soundcard.h> 87#include <sys/soundcard.h>
87 88
88 89
89class QPEApplicationData 90class QPEApplicationData
90{ 91{
91public: 92public:
92 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ), 93 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ),
93 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), 94 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ),
94 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ), 95 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ),
95 keep_running( TRUE ) 96 keep_running( TRUE )
96 { 97 {
97 qcopq.setAutoDelete( TRUE ); 98 qcopq.setAutoDelete( TRUE );
98 } 99 }
99 100
100 int presstimer; 101 int presstimer;
101 QWidget* presswidget; 102 QWidget* presswidget;
102 QPoint presspos; 103 QPoint presspos;
103bool rightpressed : 104bool rightpressed :
104 1; // AEH why not use uint foobar :1; if it's tt style -zecke 105 1; // AEH why not use uint foobar :1; if it's tt style -zecke
105 int kbgrabber; 106 int kbgrabber;
106bool kbregrab : 107bool kbregrab :
107 1; 108 1;
108bool notbusysent : 109bool notbusysent :
109 1; 110 1;
110 QString appName; 111 QString appName;
111 struct QCopRec 112 struct QCopRec
112 { 113 {
113 QCopRec( const QCString &ch, const QCString &msg, 114 QCopRec( const QCString &ch, const QCString &msg,
114 const QByteArray &d ) : 115 const QByteArray &d ) :
115 channel( ch ), message( msg ), data( d ) 116 channel( ch ), message( msg ), data( d )
116 { } 117 { }
117 118
118 QCString channel; 119 QCString channel;
119 QCString message; 120 QCString message;
120 QByteArray data; 121 QByteArray data;
121 }; 122 };
122bool preloaded : 123bool preloaded :
123 1; 124 1;
124bool forceshow : 125bool forceshow :
125 1; 126 1;
126bool nomaximize : 127bool nomaximize :
127 1; 128 1;
128 QWidget* qpe_main_widget; 129 QWidget* qpe_main_widget;
129bool keep_running : 130bool keep_running :
130 1; 131 1;
131 QList<QCopRec> qcopq; 132 QList<QCopRec> qcopq;
132 133
133 void enqueueQCop( const QCString &ch, const QCString &msg, 134 void enqueueQCop( const QCString &ch, const QCString &msg,
134 const QByteArray &data ) 135 const QByteArray &data )
135 { 136 {
136 qcopq.append( new QCopRec( ch, msg, data ) ); 137 qcopq.append( new QCopRec( ch, msg, data ) );
137 } 138 }
138 void sendQCopQ() 139 void sendQCopQ()
139 { 140 {
140 QCopRec * r; 141 QCopRec * r;
141#ifndef QT_NO_COP 142#ifndef QT_NO_COP
142 143
143 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) 144 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it )
144 QCopChannel::sendLocally( r->channel, r->message, r->data ); 145 QCopChannel::sendLocally( r->channel, r->message, r->data );
145#endif 146#endif
146 147
147 qcopq.clear(); 148 qcopq.clear();
148 } 149 }
149 static void show_mx(QWidget* mw, bool nomaximize) 150 static void show_mx(QWidget* mw, bool nomaximize)
150 { 151 {
151 if ( mw->layout() && mw->inherits("QDialog") ) { 152 if ( mw->layout() && mw->inherits("QDialog") ) {
152 QPEApplication::showDialog((QDialog*)mw, nomaximize); 153 QPEApplication::showDialog((QDialog*)mw, nomaximize);