summaryrefslogtreecommitdiff
path: root/libopie
authoreilers <eilers>2003-11-03 16:52:18 (UTC)
committer eilers <eilers>2003-11-03 16:52:18 (UTC)
commitd34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff)
treeb57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /libopie
parentce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff)
downloadopie-d34dc773591a2d467c68875a68a671d6a809f861.zip
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms should work. Please see $OPIEDIR/development/macosx for details
Diffstat (limited to 'libopie') (more/less context) (show whitespace changes)
-rw-r--r--libopie/libopie.pro4
-rw-r--r--libopie/odevice.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index 0398775..bf6b78f 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -48,89 +48,85 @@ HEADERS = ofontmenu.h \
48 oticker.h owait.h 48 oticker.h owait.h
49 49
50SOURCES = ofontmenu.cc \ 50SOURCES = ofontmenu.cc \
51 ocolorbutton.cpp \ 51 ocolorbutton.cpp \
52 sharp_compat.cpp \ 52 sharp_compat.cpp \
53 xmltree.cc \ 53 xmltree.cc \
54 ofiledialog.cc ofileselector.cpp \ 54 ofiledialog.cc ofileselector.cpp \
55 ocheckitem.cpp \ 55 ocheckitem.cpp \
56 colordialog.cpp \ 56 colordialog.cpp \
57 colorpopupmenu.cpp oclickablelabel.cpp \ 57 colorpopupmenu.cpp oclickablelabel.cpp \
58 oprocctrl.cpp oprocess.cpp \ 58 oprocctrl.cpp oprocess.cpp \
59 odevice.cpp odevicebutton.cpp otimepicker.cpp \ 59 odevice.cpp odevicebutton.cpp otimepicker.cpp \
60 otabwidget.cpp otabbar.cpp \ 60 otabwidget.cpp otabbar.cpp \
61 ofontselector.cpp \ 61 ofontselector.cpp \
62 pim/otodo.cpp \ 62 pim/otodo.cpp \
63 pim/opimrecord.cpp \ 63 pim/opimrecord.cpp \
64 pim/otodoaccess.cpp \ 64 pim/otodoaccess.cpp \
65 pim/otodoaccessbackend.cpp \ 65 pim/otodoaccessbackend.cpp \
66 pim/otodoaccessxml.cpp \ 66 pim/otodoaccessxml.cpp \
67 pim/oconversion.cpp \ 67 pim/oconversion.cpp \
68 pim/ocontact.cpp \ 68 pim/ocontact.cpp \
69 pim/ocontactfields.cpp \ 69 pim/ocontactfields.cpp \
70 pim/ocontactaccess.cpp \ 70 pim/ocontactaccess.cpp \
71 pim/ocontactaccessbackend_vcard.cpp \ 71 pim/ocontactaccessbackend_vcard.cpp \
72 pim/ocontactaccessbackend_xml.cpp \ 72 pim/ocontactaccessbackend_xml.cpp \
73 pim/otodoaccessvcal.cpp \ 73 pim/otodoaccessvcal.cpp \
74 pim/orecur.cpp \ 74 pim/orecur.cpp \
75 pim/opimstate.cpp \ 75 pim/opimstate.cpp \
76 pim/opimxrefpartner.cpp \ 76 pim/opimxrefpartner.cpp \
77 pim/opimxref.cpp \ 77 pim/opimxref.cpp \
78 pim/opimxrefmanager.cpp \ 78 pim/opimxrefmanager.cpp \
79 pim/opimmaintainer.cpp \ 79 pim/opimmaintainer.cpp \
80 pim/opimnotify.cpp \ 80 pim/opimnotify.cpp \
81 pim/opimnotifymanager.cpp \ 81 pim/opimnotifymanager.cpp \
82 pim/opimmainwindow.cpp \ 82 pim/opimmainwindow.cpp \
83 pim/opimresolver.cpp \ 83 pim/opimresolver.cpp \
84 pim/oevent.cpp \ 84 pim/oevent.cpp \
85 pim/otimezone.cpp \ 85 pim/otimezone.cpp \
86 pim/odatebookaccess.cpp \ 86 pim/odatebookaccess.cpp \
87 pim/odatebookaccessbackend.cpp \ 87 pim/odatebookaccessbackend.cpp \
88 pim/odatebookaccessbackend_xml.cpp \ 88 pim/odatebookaccessbackend_xml.cpp \
89 orecurrancewidget.cpp \ 89 orecurrancewidget.cpp \
90 oticker.cpp owait.cpp 90 oticker.cpp owait.cpp
91 91
92TARGET = opie 92TARGET = opie
93INCLUDEPATH += $(OPIEDIR)/include 93INCLUDEPATH += $(OPIEDIR)/include
94DESTDIR = $(OPIEDIR)/lib$(PROJMAK) 94DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
95 95
96# The following is just for my Notebook !
97# It should never be committed !! (eilers)
98# QMAKE_CXXFLAGS += -DQT_NO_SOUND
99
100LIBS += -lqpe 96LIBS += -lqpe
101 97
102# Add SQL-Support if selected by config (eilers) 98# Add SQL-Support if selected by config (eilers)
103CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND ) 99CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND )
104contains( CONFTEST, y ){ 100contains( CONFTEST, y ){
105 101
106DEFINES += __USE_SQL 102DEFINES += __USE_SQL
107LIBS += -lopiedb2 -lsqlite 103LIBS += -lopiedb2 -lsqlite
108HEADERS += pim/otodoaccesssql.h pim/ocontactaccessbackend_sql.h 104HEADERS += pim/otodoaccesssql.h pim/ocontactaccessbackend_sql.h
109SOURCES += pim/otodoaccesssql.cpp pim/ocontactaccessbackend_sql.cpp 105SOURCES += pim/otodoaccesssql.cpp pim/ocontactaccessbackend_sql.cpp
110 106
111} 107}
112 108
113INTERFACES = otimepickerbase.ui orecurrancebase.ui 109INTERFACES = otimepickerbase.ui orecurrancebase.ui
114TARGET = opie 110TARGET = opie
115 111
116TRANSLATIONS = ../i18n/de/libopie.ts \ 112TRANSLATIONS = ../i18n/de/libopie.ts \
117 ../i18n/nl/libopie.ts \ 113 ../i18n/nl/libopie.ts \
118 ../i18n/xx/libopie.ts \ 114 ../i18n/xx/libopie.ts \
119 ../i18n/en/libopie.ts \ 115 ../i18n/en/libopie.ts \
120 ../i18n/es/libopie.ts \ 116 ../i18n/es/libopie.ts \
121 ../i18n/fr/libopie.ts \ 117 ../i18n/fr/libopie.ts \
122 ../i18n/hu/libopie.ts \ 118 ../i18n/hu/libopie.ts \
123 ../i18n/ja/libopie.ts \ 119 ../i18n/ja/libopie.ts \
124 ../i18n/ko/libopie.ts \ 120 ../i18n/ko/libopie.ts \
125 ../i18n/no/libopie.ts \ 121 ../i18n/no/libopie.ts \
126 ../i18n/pl/libopie.ts \ 122 ../i18n/pl/libopie.ts \
127 ../i18n/pt/libopie.ts \ 123 ../i18n/pt/libopie.ts \
128 ../i18n/pt_BR/libopie.ts \ 124 ../i18n/pt_BR/libopie.ts \
129 ../i18n/sl/libopie.ts \ 125 ../i18n/sl/libopie.ts \
130 ../i18n/zh_CN/libopie.ts \ 126 ../i18n/zh_CN/libopie.ts \
131 ../i18n/zh_TW/libopie.ts \ 127 ../i18n/zh_TW/libopie.ts \
132 ../i18n/da/libopie.ts 128 ../i18n/da/libopie.ts
133 129
134include ( big-screen/big-screen.pro ) 130include ( big-screen/big-screen.pro )
135 131
136include ( $(OPIEDIR)/include.pro ) 132include ( $(OPIEDIR)/include.pro )
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 3edf8e7..fef623a 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1,74 +1,76 @@
1/* This file is part of the OPIE libraries 1/* This file is part of the OPIE libraries
2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) 2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <stdlib.h> 20#include <stdlib.h>
21#include <unistd.h> 21#include <unistd.h>
22#include <fcntl.h> 22#include <fcntl.h>
23#include <sys/ioctl.h> 23#include <sys/ioctl.h>
24#include <signal.h> 24#include <signal.h>
25#include <sys/time.h> 25#include <sys/time.h>
26#ifndef QT_NO_SOUND
26#include <linux/soundcard.h> 27#include <linux/soundcard.h>
28#endif
27#include <math.h> 29#include <math.h>
28 30
29#include <qapplication.h> 31#include <qapplication.h>
30 32
31#include <qfile.h> 33#include <qfile.h>
32#include <qtextstream.h> 34#include <qtextstream.h>
33#include <qpe/sound.h> 35#include <qpe/sound.h>
34#include <qpe/resource.h> 36#include <qpe/resource.h>
35#include <qpe/config.h> 37#include <qpe/config.h>
36#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
37 39
38#include "odevice.h" 40#include "odevice.h"
39 41
40#include <qwindowsystem_qws.h> 42#include <qwindowsystem_qws.h>
41 43
42#ifndef ARRAY_SIZE 44#ifndef ARRAY_SIZE
43#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 45#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
44#endif 46#endif
45 47
46// _IO and friends are only defined in kernel headers ... 48// _IO and friends are only defined in kernel headers ...
47 49
48#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 50#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
49 51
50#define OD_IO(type,number) OD_IOC(0,type,number,0) 52#define OD_IO(type,number) OD_IOC(0,type,number,0)
51#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 53#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
52#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 54#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
53#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 55#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
54 56
55using namespace Opie; 57using namespace Opie;
56 58
57class ODeviceData { 59class ODeviceData {
58public: 60public:
59 QString m_vendorstr; 61 QString m_vendorstr;
60 OVendor m_vendor; 62 OVendor m_vendor;
61 63
62 QString m_modelstr; 64 QString m_modelstr;
63 OModel m_model; 65 OModel m_model;
64 66
65 QString m_systemstr; 67 QString m_systemstr;
66 OSystem m_system; 68 OSystem m_system;
67 69
68 QString m_sysverstr; 70 QString m_sysverstr;
69 71
70 Transformation m_rotation; 72 Transformation m_rotation;
71 ODirection m_direction; 73 ODirection m_direction;
72 74
73 QValueList <ODeviceButton> *m_buttons; 75 QValueList <ODeviceButton> *m_buttons;
74 uint m_holdtime; 76 uint m_holdtime;