author | zecke <zecke> | 2004-12-20 22:11:44 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-12-20 22:11:44 (UTC) |
commit | a50334dddaa542fd63726a639e852c30036f53a0 (patch) (unidiff) | |
tree | 30d0a41308f752c72d2c685fab60e2bd7c650bec /library/qcom.h | |
parent | 29e93ce47f7a52ded8956811d50b93e754caa3a6 (diff) | |
download | opie-a50334dddaa542fd63726a639e852c30036f53a0.zip opie-a50334dddaa542fd63726a639e852c30036f53a0.tar.gz opie-a50334dddaa542fd63726a639e852c30036f53a0.tar.bz2 |
Restore Files:
-QWSDecoration scaling fixes by mickeyl
-Readd macros for DEPRECATED and VISIBILITY
-Move out showWidget and execDialog to widget_sowing.cpp
-QPE_EXPORT_SYMBOL for Q_EXPORT_INTERFACE
-Deprecated for FileSelector, QPEMenubar and Toolbar
-rw-r--r-- | library/qcom.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/qcom.h b/library/qcom.h index 9972d8f..5703800 100644 --- a/library/qcom.h +++ b/library/qcom.h | |||
@@ -5,48 +5,49 @@ | |||
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 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef QCOM_H | 21 | #ifndef QCOM_H |
22 | #define QCOM_H | 22 | #define QCOM_H |
23 | 23 | ||
24 | #include <qstringlist.h> | 24 | #include <qstringlist.h> |
25 | 25 | ||
26 | #ifndef QT_NO_COMPONENT | 26 | #ifndef QT_NO_COMPONENT |
27 | 27 | ||
28 | #include <qpe/quuid.h> | 28 | #include <qpe/quuid.h> |
29 | #include <qpe/qpeglobal.h> | ||
29 | 30 | ||
30 | #define QRESULT unsigned long | 31 | #define QRESULT unsigned long |
31 | #define QS_OK (QRESULT)0x00000000 | 32 | #define QS_OK (QRESULT)0x00000000 |
32 | #define QS_FALSE (QRESULT)0x00000001 | 33 | #define QS_FALSE (QRESULT)0x00000001 |
33 | 34 | ||
34 | #define QE_NOTIMPL (QRESULT)0x80000001 | 35 | #define QE_NOTIMPL (QRESULT)0x80000001 |
35 | #define QE_OUTOFMEMORY (QRESULT)0x80000002 | 36 | #define QE_OUTOFMEMORY (QRESULT)0x80000002 |
36 | #define QE_INVALIDARG (QRESULT)0x80000003 | 37 | #define QE_INVALIDARG (QRESULT)0x80000003 |
37 | #define QE_NOINTERFACE (QRESULT)0x80000004 | 38 | #define QE_NOINTERFACE (QRESULT)0x80000004 |
38 | #define QE_NOCOMPONENT (QRESULT)0x80000005 | 39 | #define QE_NOCOMPONENT (QRESULT)0x80000005 |
39 | 40 | ||
40 | // {1D8518CD-E8F5-4366-99E8-879FD7E482DE} | 41 | // {1D8518CD-E8F5-4366-99E8-879FD7E482DE} |
41 | #ifndef IID_QUnknown | 42 | #ifndef IID_QUnknown |
42 | #define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde) | 43 | #define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde) |
43 | #endif | 44 | #endif |
44 | 45 | ||
45 | struct Q_EXPORT QUnknownInterface | 46 | struct Q_EXPORT QUnknownInterface |
46 | { | 47 | { |
47 | virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0; | 48 | virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0; |
48 | virtual ulong addRef() = 0; | 49 | virtual ulong addRef() = 0; |
49 | virtual ulong release() = 0; | 50 | virtual ulong release() = 0; |
50 | }; | 51 | }; |
51 | 52 | ||
52 | // {D16111D4-E1E7-4C47-8599-24483DAE2E07} | 53 | // {D16111D4-E1E7-4C47-8599-24483DAE2E07} |
@@ -130,42 +131,42 @@ public: | |||
130 | if ( iface ) | 131 | if ( iface ) |
131 | iface->release(); | 132 | iface->release(); |
132 | return &iface; | 133 | return &iface; |
133 | } | 134 | } |
134 | 135 | ||
135 | private: | 136 | private: |
136 | T* iface; | 137 | T* iface; |
137 | }; | 138 | }; |
138 | 139 | ||
139 | 140 | ||
140 | // internal class that wraps an initialized ulong | 141 | // internal class that wraps an initialized ulong |
141 | struct Q_EXPORT QtULong | 142 | struct Q_EXPORT QtULong |
142 | { | 143 | { |
143 | QtULong() : ref( 0 ) { } | 144 | QtULong() : ref( 0 ) { } |
144 | operator unsigned long () const { return ref; } | 145 | operator unsigned long () const { return ref; } |
145 | unsigned long& operator++() { return ++ref; } | 146 | unsigned long& operator++() { return ++ref; } |
146 | unsigned long operator++( int ) { return ref++; } | 147 | unsigned long operator++( int ) { return ref++; } |
147 | unsigned long& operator--() { return --ref; } | 148 | unsigned long& operator--() { return --ref; } |
148 | unsigned long operator--( int ) { return ref--; } | 149 | unsigned long operator--( int ) { return ref--; } |
149 | 150 | ||
150 | unsigned long ref; | 151 | unsigned long ref; |
151 | }; | 152 | }; |
152 | 153 | ||
153 | #define Q_EXPORT_INTERFACE() \ | 154 | #define Q_EXPORT_INTERFACE() \ |
154 | extern "C" QUnknownInterface* ucm_instantiate() | 155 | extern "C" QUnknownInterface* ucm_instantiate QPE_EXPORT_SYMBOL () |
155 | 156 | ||
156 | #define Q_REFCOUNT \ | 157 | #define Q_REFCOUNT \ |
157 | private: \ | 158 | private: \ |
158 | QtULong qtrefcount; \ | 159 | QtULong qtrefcount; \ |
159 | public: \ | 160 | public: \ |
160 | ulong addRef() {return qtrefcount++;} \ | 161 | ulong addRef() {return qtrefcount++;} \ |
161 | ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;} | 162 | ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;} |
162 | 163 | ||
163 | #else // QT_NO_COMPONENT | 164 | #else // QT_NO_COMPONENT |
164 | 165 | ||
165 | struct Q_EXPORT QUnknownInterface | 166 | struct Q_EXPORT QUnknownInterface |
166 | { | 167 | { |
167 | }; | 168 | }; |
168 | 169 | ||
169 | #endif // QT_NO_COMPONENT | 170 | #endif // QT_NO_COMPONENT |
170 | 171 | ||
171 | #endif // QCOM_H | 172 | #endif // QCOM_H |