summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-15 21:38:43 (UTC)
committer zecke <zecke>2002-10-15 21:38:43 (UTC)
commitb774e015816e51ac65e5d1c685306f8404a3a19e (patch) (side-by-side diff)
treeccb4881ffce2a027b6c0b95854623bb713b69554
parentfb99aec5215da635abfa28288d170f110114bba3 (diff)
downloadopie-b774e015816e51ac65e5d1c685306f8404a3a19e.zip
opie-b774e015816e51ac65e5d1c685306f8404a3a19e.tar.gz
opie-b774e015816e51ac65e5d1c685306f8404a3a19e.tar.bz2
More OPIE X11 Stuff
Some empty stubs to compile against Qt2/X it will not link though
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 @@
+We try hard to get Opie compiled with Qt2/X11
+
+While directly drawing into the framebuffer is fast
+and takes less memory compared to Qt2/X11
+sometimes you may want to use X11 cause you need
+some feature of the X protocol or you think it's just
+cute.
+
+We try hard to not break Opies normal compilation and to avoid
+#ifdefs at all cost
+
+Things that are different on X11 with Qt2/X11
+- No fonthandling
+- No Windowdecoration
+- No IPC
+- No keyhandling
+- No powerhandling
+
+are built in
+
+We will ignore fontloading for now cause it belongs to X11.
+The same applies to keyhandling
+X11 is taking care of APM if not it's the kernel...
+
+Ok so we need to replace IPC and do empty stubs for the other things
+
+IPC: Our X11 IPC system is called OCOP and we've an almost sc QCopChannel
+implementation. QCopEnvelope should work out of the box.
+We do some symlinks to built opie out of the box.
+
+How to build Opie/x11 currently it's quite hard to but I'll make it more easy
+soon
+
+
+regards Holger
+
+ 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
@@ -1,56 +1,59 @@
#ifndef OPIE_OCOP_CLIENT_H
#define OPIE_OCOP_CLIENT_H
#include <qobject.h>
#include <qcstring.h>
#include <qmap.h>
#include <qsignal.h>
#include <qstring.h>
#include <qsocketnotifier.h>
/**
* This is the OCOP client
* It currently only supports
* asking if a Channel is registered,
* calling and receiving calls
*/
class OCOPPacket;
class OCOPClient : public QObject{
Q_OBJECT
public:
/**
* Occasionally I decide to start a Server from here
*/
OCOPClient(const QString& pathToServer = QString::null, QObject* obj = 0l);
~OCOPClient();
bool isRegistered( const QCString& )const;
void send( const QCString& chan, const QCString&, const QByteArray& msg );
/**
* add a channel and does connect to a signal
* callback is the object
* slot is the SLOT()
*/
void addChannel( const QCString& channel );
void delChannel( const QCString& channel );
+
+ /* make it singleton? */
+ //static OCOPClient* self();
/* no direct signals due the design */
signals:
- void called(const QCString&, const QCString&, const QByteArray );
+ void called(const QCString&, const QCString&, const QByteArray& );
private slots:
void init(const QCString& pa);
void newData();
private:
OCOPPacket packet();
void call( const OCOPPacket& );
QSocketNotifier* m_notify;
int m_socket;
private slots:
};
#endif
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 @@
+TEMPLATE = lib
+CONFIG += qt warn_on release
+HEADERS = ../../library/calendar.h \
+ ../../library/global.h \
+ ../../library/resource.h \
+ ../../library/xmlreader.h \
+ ../../library/mimetype.h \
+ ../../library/menubutton.h \
+ ../../library/network.h \
+ ../../library/networkinterface.h \
+ ../../library/filemanager.h \
+ ../../library/qdawg.h \
+ ../../library/datebookmonth.h \
+ ../../library/fileselector.h \
+ ../../library/fileselector_p.h \
+ ../../library/imageedit.h \
+ ../../library/qcopenvelope_qws.h \
+ ../../library/qpestyle.h \
+ ../../library/qpedialog.h \
+ ../../library/lightstyle.h \
+ ../../library/config.h \
+ ../../library/applnk.h \
+ ../../library/sound.h \
+ ../../library/tzselect.h \
+ ../../library/qmath.h \
+ ../../library/datebookdb.h \
+ ../../library/alarmserver.h \
+ ../../library/process.h \
+ ../../library/password.h \
+ ../../library/timestring.h \
+ ../../library/power.h \
+ ../../library/storage.h \
+ ../../library/qpemessagebox.h \
+ ../../library/timeconversion.h \
+ ../../library/qpedebug.h \
+ ../../library/qpemenubar.h \
+ ../../library/qpetoolbar.h \
+ ../../library/backend/categories.h \
+ ../../library/stringutil.h \
+ ../../library/backend/palmtoprecord.h \
+ ../../library/backend/task.h \
+ ../../library/backend/event.h \
+ ../../library/backend/contact.h\
+ ../../library/categorymenu.h \
+ ../../library/categoryedit_p.h \
+ ../../library/categoryselect.h \
+ ../../library/categorywidget.h \
+ ../../library/ir.h \
+ ../../library/backend/vobject_p.h \
+ ../../library/findwidget_p.h \
+ ../../library/finddialog.h \
+ ../../library/lnkproperties.h \
+ ../../library/windowdecorationinterface.h \
+ ../../library/textcodecinterface.h \
+ ../../library/imagecodecinterface.h \
+ qpe/qpeapplication.h \
+ qpe/fontmanager.h
+
+SOURCES = ../../library/calendar.cpp \
+ ../../library/global.cpp \
+ ../../library/xmlreader.cpp \
+ ../../library/mimetype.cpp \
+ ../../library/menubutton.cpp \
+ ../../library/network.cpp \
+ ../../library/networkinterface.cpp \
+ ../../library/filemanager.cpp \
+ ../../library/qdawg.cpp \
+ ../../library/datebookmonth.cpp \
+ ../../library/fileselector.cpp \
+ ../../library/imageedit.cpp \
+ ../../library/resource.cpp \
+ ../../library/qcopenvelope_qws.cpp \
+ ../../library/qpestyle.cpp \
+ ../../library/qpedialog.cpp \
+ ../../library/lightstyle.cpp \
+ ../../library/config.cpp \
+ ../../library/applnk.cpp \
+ ../../library/sound.cpp \
+ ../../library/tzselect.cpp \
+ ../../library/qmath.c \
+ ../../library/datebookdb.cpp \
+ ../../library/alarmserver.cpp \
+ ../../library/password.cpp \
+ ../../library/process.cpp \
+ ../../library/process_unix.cpp \
+ ../../library/timestring.cpp \
+ ../../library/power.cpp \
+ ../../library/storage.cpp \
+ ../../library/qpemessagebox.cpp \
+ ../../library/backend/timeconversion.cpp \
+ ../../library/qpedebug.cpp \
+ ../../library/qpemenubar.cpp \
+ ../../library/qpetoolbar.cpp \
+ ../../library/backend/categories.cpp \
+ ../../library/backend/stringutil.cpp \
+ ../../library/backend/palmtoprecord.cpp \
+ ../../library/backend/task.cpp \
+ ../../library/backend/event.cpp \
+ ../../library/backend/contact.cpp \
+ ../../library/categorymenu.cpp \
+ ../../library/categoryedit_p.cpp \
+ ../../library/categoryselect.cpp \
+ ../../library/categorywidget.cpp \
+ ../../library/ir.cpp \
+ ../../library/backend/vcc_yacc.cpp \
+ ../../library/backend/vobject.cpp \
+ ../../library/findwidget_p.cpp \
+ ../../library/finddialog.cpp \
+ ../../library/lnkproperties.cpp
+
+# Qt 3 compatibility
+qt2:HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h
+qt2:SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp
+INCLUDEPATH += $(OPIEDIR)/include backend
+LIBS += -ldl -lcrypt -lm
+INTERFACES = ../../library/passwordbase_p.ui \
+ ../../library/categoryeditbase_p.ui \
+ ../../library/findwidgetbase_p.ui \
+ ../../library/lnkpropertiesbase_p.ui
+TARGET = qpe-x11
+DESTDIR = $(QTDIR)/lib$(PROJMAK)
+# This is set by configure$(OPIEDIR).
+VERSION = 1.5.0.1
+
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 @@
+#ifndef OPIE_FONTMANAGER_H
+#define OPIE_FONTMANAGER_H
+
+#include <qfont.h>
+
+class FontManager {
+public:
+ enum Spacing { Fixed, Proportional };
+ static bool hasUnicodeFont();
+ static QFont unicodeFont( Spacing );
+};
+
+#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 @@
+#ifndef OPIE_QPE_APPLICATION_H
+#define OPIE_QPE_APPLICATION_H
+
+/**
+ * LGPLed
+ */
+
+#include <qapplication.h>
+
+#include <qpe/timestring.h>
+
+class QPEApplication : public QApplication {
+ Q_OBJECT
+public:
+ QPEApplication(int& argc, char** argv, Type=GuiClient );
+ ~QPEApplication();
+
+ static QString qpeDir();
+ static QString documentDir();
+ void applyStyle();
+
+ static int defaultRotation();
+ static void setDefaultRotation( int r );
+ static void grabKeyboard();
+ static void ungrabKeyboard();
+
+ enum StylusMode {
+ LeftOnly,
+ RightOnHold
+ };
+ static void setStylusOperation( QWidget*, StylusMode );
+ static StylusMode stylusOperation( QWidget* );
+
+ void showMainWidget( QWidget*, bool nomax = FALSE );
+ void showMainDocumentWidget( QWidget*, bool nomax = FALSE );
+
+ static void showDialog( QDialog*, bool nomax = FALSE );
+ static void execDialog( QDialog*, bool nomax = FALSE );
+
+ static void setKeepRunning();
+ bool keepRunning()const;
+
+ bool keyboardGrabbed()const;
+ int exec();
+
+signals:
+ void clientMoused();
+ void timeChanged();
+ void clockChanged( bool pm );
+ void micChanged( bool muted );
+ void volumeChanged( bool muted );
+ void appMessage( const QCString& msg, const QByteArray& data);
+ void weekChanged( bool startOnMonday );
+ void dateFormatChanged( DateFormat );
+ void flush();
+ void reload();
+
+};
+
+#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 @@
+
+#include "../ipc/client/ocopclient.h"
+
+#include <qcopchannel_qws.h>
+
+QCopChannel::QCopChannel( const QCString& channel, QObject* parent,
+ const char* name )
+ : QObject( parent, name ),m_chan(channel) {
+ init();
+}
+QCopChannel::~QCopChannel() {
+ m_client->delChannel( m_chan );
+ delete m_client;
+}
+void QCopChannel::init() {
+ m_client = new OCOPClient(QString::null, this );
+ m_client->addChannel(m_chan );
+ connect(m_client, SIGNAL(called(const QCString&, const QCString&, const QByteArray& ) ),
+ this, SLOT(rev(const QCString&, const QCString&, const QByteArray&) ) );
+}
+QCString QCopChannel::channel()const {
+ return m_chan;
+}
+bool QCopChannel::isRegistered( const QCString& chan) {
+ OCOPClient client;
+ return client.isRegistered( chan );
+}
+bool QCopChannel::send( const QCString& chan, const QCString& msg ) {
+ QByteArray ar(0);
+ return return sendLocally(chan, msg, ar );
+}
+bool QCString::send( const QCString& chan, const QCString& msg,
+ const QByteArray& ar ) {
+ return sendLocally( chan, msg, ar );
+}
+bool QCopChannel::sendLocally( const QCString& chan, const QCString& msg,
+ const QByteArray& ar ) {
+ OCOPClient client;
+ client.send( chan, msg, ar );
+
+ return true;
+}
+void QCopChannel::rev( const QCString& chan, const QCString& msg, const QByteArray& ar ) {
+ if (chan == m_chan )
+ emit received(chan, msg, ar );
+}
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 @@
+#ifndef OPIE_QCOP_CHANNEL_QWS_H
+#define OPIE_QCOP_CHANNEL_QWS_H
+
+#include <qobject.h>
+#include <qcstring.h>
+
+class OCOPClient;
+class QCopChannel : public QObject {
+ Q_OBJECT
+public:
+ QCopChannel( const QCString& channel, QObject* parent = 0,
+ const char* name = 0);
+ virtual ~QCopChannel();
+
+ QCString channel()const;
+
+ static bool isRegistered( const QCString& channel );
+ static bool send( const QCString& channel, const QCString& msg );
+ static bool send( const QCString& channel, const QCString& msg,
+ const QByteArray& );
+ static bool sendLocally( const QCString& chan, const QCString& msg,
+ const QByteArray& data );
+
+signals:
+ void received( const QCString& msg, const QByteArray& );
+
+private slots:
+ void rev( const QCString& chan, const QCString&, const QByteArray& );
+
+private:
+ void init();
+ OCOPClient* m_client;
+ /* the channel */
+ QCString m_chan;
+ class Private;
+ Private *d;
+
+};
+
+#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 @@
+#ifndef OPIE_QFONT_MANAGER_H
+#define OPIE_QFONT_MANAGER_H
+
+struct QFontFactory {
+
+};
+struct QDiskFont {
+
+};
+struct QFontManager {
+};
+extern QFontManager *qt_fontmanager;
+
+#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 @@
+#ifndef OPIE_QWINDOWSYSTEM_H
+#define OPIE_QWINDOWSYSTEM_H
+
+class QWSServer {
+public:
+QWSServer(){}
+~QWSServer(){}
+ static void sendKeyEvent(int, int, int, bool, bool ) { }
+ struct KeyboardFilter {
+ };
+ static void setKeyboardFilter( KeyboardFilter* ) {
+
+ }
+
+};
+
+
+#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