summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--x11/README37
-rw-r--r--x11/ipc/client/ocopclient.h5
-rw-r--r--x11/libqpe-x11/libqpe-x11.pro124
-rw-r--r--x11/libqpe-x11/qpe/fontmanager.h13
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.h60
-rw-r--r--x11/libqpe-x11/qt/qcopchannel_qws.cpp46
-rw-r--r--x11/libqpe-x11/qt/qcopchannel_qws.h40
-rw-r--r--x11/libqpe-x11/qt/qfontmanager_qws.h14
-rw-r--r--x11/libqpe-x11/qt/qgfx_qws.h0
-rw-r--r--x11/libqpe-x11/qt/qwindowsystem_qws.h18
-rw-r--r--x11/libqpe-x11/qt/qwsdefaultdecoration_qws.h0
11 files changed, 356 insertions, 1 deletions
diff --git a/x11/README b/x11/README
new file mode 100644
index 0000000..b8c88ed
--- a/dev/null
+++ b/x11/README
@@ -0,0 +1,37 @@
1We try hard to get Opie compiled with Qt2/X11
2
3While directly drawing into the framebuffer is fast
4and takes less memory compared to Qt2/X11
5sometimes you may want to use X11 cause you need
6some feature of the X protocol or you think it's just
7cute.
8
9We try hard to not break Opies normal compilation and to avoid
10#ifdefs at all cost
11
12Things that are different on X11 with Qt2/X11
13- No fonthandling
14- No Windowdecoration
15- No IPC
16- No keyhandling
17- No powerhandling
18
19are built in
20
21We will ignore fontloading for now cause it belongs to X11.
22The same applies to keyhandling
23X11 is taking care of APM if not it's the kernel...
24
25Ok so we need to replace IPC and do empty stubs for the other things
26
27IPC: Our X11 IPC system is called OCOP and we've an almost sc QCopChannel
28implementation. QCopEnvelope should work out of the box.
29We do some symlinks to built opie out of the box.
30
31How to build Opie/x11 currently it's quite hard to but I'll make it more easy
32soon
33
34
35regards Holger
36
37 10-15-2002
diff --git a/x11/ipc/client/ocopclient.h b/x11/ipc/client/ocopclient.h
index 5300132..db04d37 100644
--- a/x11/ipc/client/ocopclient.h
+++ b/x11/ipc/client/ocopclient.h
@@ -38,7 +38,10 @@ public:
38 void addChannel( const QCString& channel ); 38 void addChannel( const QCString& channel );
39 void delChannel( const QCString& channel ); 39 void delChannel( const QCString& channel );
40
41 /* make it singleton? */
42 //static OCOPClient* self();
40/* no direct signals due the design */ 43/* no direct signals due the design */
41signals: 44signals:
42 void called(const QCString&, const QCString&, const QByteArray ); 45 void called(const QCString&, const QCString&, const QByteArray& );
43private slots: 46private slots:
44 void init(const QCString& pa); 47 void init(const QCString& pa);
diff --git a/x11/libqpe-x11/libqpe-x11.pro b/x11/libqpe-x11/libqpe-x11.pro
new file mode 100644
index 0000000..1d30f90
--- a/dev/null
+++ b/x11/libqpe-x11/libqpe-x11.pro
@@ -0,0 +1,124 @@
1 TEMPLATE= lib
2 CONFIG += qt warn_on release
3 HEADERS= ../../library/calendar.h \
4 ../../library/global.h \
5 ../../library/resource.h \
6 ../../library/xmlreader.h \
7 ../../library/mimetype.h \
8 ../../library/menubutton.h \
9 ../../library/network.h \
10 ../../library/networkinterface.h \
11 ../../library/filemanager.h \
12 ../../library/qdawg.h \
13 ../../library/datebookmonth.h \
14 ../../library/fileselector.h \
15 ../../library/fileselector_p.h \
16 ../../library/imageedit.h \
17 ../../library/qcopenvelope_qws.h \
18 ../../library/qpestyle.h \
19 ../../library/qpedialog.h \
20 ../../library/lightstyle.h \
21 ../../library/config.h \
22 ../../library/applnk.h \
23 ../../library/sound.h \
24 ../../library/tzselect.h \
25 ../../library/qmath.h \
26 ../../library/datebookdb.h \
27 ../../library/alarmserver.h \
28 ../../library/process.h \
29 ../../library/password.h \
30 ../../library/timestring.h \
31 ../../library/power.h \
32 ../../library/storage.h \
33 ../../library/qpemessagebox.h \
34 ../../library/timeconversion.h \
35 ../../library/qpedebug.h \
36 ../../library/qpemenubar.h \
37 ../../library/qpetoolbar.h \
38 ../../library/backend/categories.h \
39 ../../library/stringutil.h \
40 ../../library/backend/palmtoprecord.h \
41 ../../library/backend/task.h \
42 ../../library/backend/event.h \
43 ../../library/backend/contact.h\
44 ../../library/categorymenu.h \
45 ../../library/categoryedit_p.h \
46 ../../library/categoryselect.h \
47 ../../library/categorywidget.h \
48 ../../library/ir.h \
49 ../../library/backend/vobject_p.h \
50 ../../library/findwidget_p.h \
51 ../../library/finddialog.h \
52 ../../library/lnkproperties.h \
53 ../../library/windowdecorationinterface.h \
54 ../../library/textcodecinterface.h \
55 ../../library/imagecodecinterface.h \
56 qpe/qpeapplication.h \
57 qpe/fontmanager.h
58
59 SOURCES= ../../library/calendar.cpp \
60 ../../library/global.cpp \
61 ../../library/xmlreader.cpp \
62 ../../library/mimetype.cpp \
63 ../../library/menubutton.cpp \
64 ../../library/network.cpp \
65 ../../library/networkinterface.cpp \
66 ../../library/filemanager.cpp \
67 ../../library/qdawg.cpp \
68 ../../library/datebookmonth.cpp \
69 ../../library/fileselector.cpp \
70 ../../library/imageedit.cpp \
71 ../../library/resource.cpp \
72 ../../library/qcopenvelope_qws.cpp \
73 ../../library/qpestyle.cpp \
74 ../../library/qpedialog.cpp \
75 ../../library/lightstyle.cpp \
76 ../../library/config.cpp \
77 ../../library/applnk.cpp \
78 ../../library/sound.cpp \
79 ../../library/tzselect.cpp \
80 ../../library/qmath.c \
81 ../../library/datebookdb.cpp \
82 ../../library/alarmserver.cpp \
83 ../../library/password.cpp \
84 ../../library/process.cpp \
85 ../../library/process_unix.cpp \
86 ../../library/timestring.cpp \
87 ../../library/power.cpp \
88 ../../library/storage.cpp \
89 ../../library/qpemessagebox.cpp \
90 ../../library/backend/timeconversion.cpp \
91 ../../library/qpedebug.cpp \
92 ../../library/qpemenubar.cpp \
93 ../../library/qpetoolbar.cpp \
94 ../../library/backend/categories.cpp \
95 ../../library/backend/stringutil.cpp \
96 ../../library/backend/palmtoprecord.cpp \
97 ../../library/backend/task.cpp \
98 ../../library/backend/event.cpp \
99 ../../library/backend/contact.cpp \
100 ../../library/categorymenu.cpp \
101 ../../library/categoryedit_p.cpp \
102 ../../library/categoryselect.cpp \
103 ../../library/categorywidget.cpp \
104 ../../library/ir.cpp \
105 ../../library/backend/vcc_yacc.cpp \
106 ../../library/backend/vobject.cpp \
107 ../../library/findwidget_p.cpp \
108 ../../library/finddialog.cpp \
109 ../../library/lnkproperties.cpp
110
111# Qt 3 compatibility
112qt2:HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h
113qt2:SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp
114INCLUDEPATH += $(OPIEDIR)/include backend
115 LIBS += -ldl -lcrypt -lm
116INTERFACES = ../../library/passwordbase_p.ui \
117 ../../library/categoryeditbase_p.ui \
118 ../../library/findwidgetbase_p.ui \
119 ../../library/lnkpropertiesbase_p.ui
120 TARGET = qpe-x11
121 DESTDIR = $(QTDIR)/lib$(PROJMAK)
122# This is set by configure$(OPIEDIR).
123 VERSION = 1.5.0.1
124
diff --git a/x11/libqpe-x11/qpe/fontmanager.h b/x11/libqpe-x11/qpe/fontmanager.h
new file mode 100644
index 0000000..49a8433
--- a/dev/null
+++ b/x11/libqpe-x11/qpe/fontmanager.h
@@ -0,0 +1,13 @@
1#ifndef OPIE_FONTMANAGER_H
2#define OPIE_FONTMANAGER_H
3
4#include <qfont.h>
5
6class FontManager {
7public:
8 enum Spacing { Fixed, Proportional };
9 static bool hasUnicodeFont();
10 static QFont unicodeFont( Spacing );
11};
12
13#endif
diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h
new file mode 100644
index 0000000..3713251
--- a/dev/null
+++ b/x11/libqpe-x11/qpe/qpeapplication.h
@@ -0,0 +1,60 @@
1#ifndef OPIE_QPE_APPLICATION_H
2#define OPIE_QPE_APPLICATION_H
3
4/**
5 * LGPLed
6 */
7
8#include <qapplication.h>
9
10#include <qpe/timestring.h>
11
12class QPEApplication : public QApplication {
13 Q_OBJECT
14public:
15 QPEApplication(int& argc, char** argv, Type=GuiClient );
16 ~QPEApplication();
17
18 static QString qpeDir();
19 static QString documentDir();
20 void applyStyle();
21
22 static int defaultRotation();
23 static void setDefaultRotation( int r );
24 static void grabKeyboard();
25 static void ungrabKeyboard();
26
27 enum StylusMode {
28 LeftOnly,
29 RightOnHold
30 };
31 static void setStylusOperation( QWidget*, StylusMode );
32 static StylusMode stylusOperation( QWidget* );
33
34 void showMainWidget( QWidget*, bool nomax = FALSE );
35 void showMainDocumentWidget( QWidget*, bool nomax = FALSE );
36
37 static void showDialog( QDialog*, bool nomax = FALSE );
38 static void execDialog( QDialog*, bool nomax = FALSE );
39
40 static void setKeepRunning();
41 bool keepRunning()const;
42
43 bool keyboardGrabbed()const;
44 int exec();
45
46signals:
47 void clientMoused();
48 void timeChanged();
49 void clockChanged( bool pm );
50 void micChanged( bool muted );
51 void volumeChanged( bool muted );
52 void appMessage( const QCString& msg, const QByteArray& data);
53 void weekChanged( bool startOnMonday );
54 void dateFormatChanged( DateFormat );
55 void flush();
56 void reload();
57
58};
59
60#endif
diff --git a/x11/libqpe-x11/qt/qcopchannel_qws.cpp b/x11/libqpe-x11/qt/qcopchannel_qws.cpp
new file mode 100644
index 0000000..efbef3f
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qcopchannel_qws.cpp
@@ -0,0 +1,46 @@
1
2#include "../ipc/client/ocopclient.h"
3
4#include <qcopchannel_qws.h>
5
6QCopChannel::QCopChannel( const QCString& channel, QObject* parent,
7 const char* name )
8 : QObject( parent, name ),m_chan(channel) {
9 init();
10}
11QCopChannel::~QCopChannel() {
12 m_client->delChannel( m_chan );
13 delete m_client;
14}
15void QCopChannel::init() {
16 m_client = new OCOPClient(QString::null, this );
17 m_client->addChannel(m_chan );
18 connect(m_client, SIGNAL(called(const QCString&, const QCString&, const QByteArray& ) ),
19 this, SLOT(rev(const QCString&, const QCString&, const QByteArray&) ) );
20}
21QCString QCopChannel::channel()const {
22 return m_chan;
23}
24bool QCopChannel::isRegistered( const QCString& chan) {
25 OCOPClient client;
26 return client.isRegistered( chan );
27}
28bool QCopChannel::send( const QCString& chan, const QCString& msg ) {
29 QByteArray ar(0);
30 return return sendLocally(chan, msg, ar );
31}
32bool QCString::send( const QCString& chan, const QCString& msg,
33 const QByteArray& ar ) {
34 return sendLocally( chan, msg, ar );
35}
36bool QCopChannel::sendLocally( const QCString& chan, const QCString& msg,
37 const QByteArray& ar ) {
38 OCOPClient client;
39 client.send( chan, msg, ar );
40
41 return true;
42}
43void QCopChannel::rev( const QCString& chan, const QCString& msg, const QByteArray& ar ) {
44 if (chan == m_chan )
45 emit received(chan, msg, ar );
46}
diff --git a/x11/libqpe-x11/qt/qcopchannel_qws.h b/x11/libqpe-x11/qt/qcopchannel_qws.h
new file mode 100644
index 0000000..b0a6ce0
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qcopchannel_qws.h
@@ -0,0 +1,40 @@
1#ifndef OPIE_QCOP_CHANNEL_QWS_H
2#define OPIE_QCOP_CHANNEL_QWS_H
3
4#include <qobject.h>
5#include <qcstring.h>
6
7class OCOPClient;
8class QCopChannel : public QObject {
9 Q_OBJECT
10public:
11 QCopChannel( const QCString& channel, QObject* parent = 0,
12 const char* name = 0);
13 virtual ~QCopChannel();
14
15 QCString channel()const;
16
17 static bool isRegistered( const QCString& channel );
18 static bool send( const QCString& channel, const QCString& msg );
19 static bool send( const QCString& channel, const QCString& msg,
20 const QByteArray& );
21 static bool sendLocally( const QCString& chan, const QCString& msg,
22 const QByteArray& data );
23
24signals:
25 void received( const QCString& msg, const QByteArray& );
26
27private slots:
28 void rev( const QCString& chan, const QCString&, const QByteArray& );
29
30private:
31 void init();
32 OCOPClient* m_client;
33 /* the channel */
34 QCString m_chan;
35 class Private;
36 Private *d;
37
38};
39
40#endif
diff --git a/x11/libqpe-x11/qt/qfontmanager_qws.h b/x11/libqpe-x11/qt/qfontmanager_qws.h
new file mode 100644
index 0000000..6311b92
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qfontmanager_qws.h
@@ -0,0 +1,14 @@
1#ifndef OPIE_QFONT_MANAGER_H
2#define OPIE_QFONT_MANAGER_H
3
4struct QFontFactory {
5
6};
7struct QDiskFont {
8
9};
10struct QFontManager {
11};
12extern QFontManager *qt_fontmanager;
13
14#endif \ No newline at end of file
diff --git a/x11/libqpe-x11/qt/qgfx_qws.h b/x11/libqpe-x11/qt/qgfx_qws.h
new file mode 100644
index 0000000..e69de29
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qgfx_qws.h
diff --git a/x11/libqpe-x11/qt/qwindowsystem_qws.h b/x11/libqpe-x11/qt/qwindowsystem_qws.h
new file mode 100644
index 0000000..7bc43c5
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qwindowsystem_qws.h
@@ -0,0 +1,18 @@
1#ifndef OPIE_QWINDOWSYSTEM_H
2#define OPIE_QWINDOWSYSTEM_H
3
4class QWSServer {
5public:
6QWSServer(){}
7~QWSServer(){}
8 static void sendKeyEvent(int, int, int, bool, bool ) { }
9 struct KeyboardFilter {
10 };
11 static void setKeyboardFilter( KeyboardFilter* ) {
12
13 }
14
15};
16
17
18#endif
diff --git a/x11/libqpe-x11/qt/qwsdefaultdecoration_qws.h b/x11/libqpe-x11/qt/qwsdefaultdecoration_qws.h
new file mode 100644
index 0000000..e69de29
--- a/dev/null
+++ b/x11/libqpe-x11/qt/qwsdefaultdecoration_qws.h