- Timestamp:
- Mar 18, 2011, 4:53:58 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/3rdparty/os2/xsystray/apilib/xsystray.h
r837 r838 33 33 #endif 34 34 35 // Use #define XSTAPI_FPTRS before including this header to declare funciton 36 // pointers instead of functions (useful for dynamic linking to the DLL). 37 // Use #define XSTAPI_FPTRS_STATIC to declare static pointers. Note that all 38 // pointers must be initialized with a valid function address before calling! 39 35 40 #ifdef XSTAPI_IMPL 36 # define XSTAPI __declspec(dllexport) EXPENTRY41 # define XSTAPI(rt,fn) rt __declspec(dllexport) EXPENTRY fn 37 42 #else 38 #define XSTAPI EXPENTRY 43 # if defined(XSTAPI_FPTRS) 44 # define XSTAPI(rt,fn) rt (* EXPENTRY fn) 45 # elif defined(XSTAPI_FPTRS_STATIC) 46 # define XSTAPI(rt,fn) static rt (* EXPENTRY fn) 47 # else 48 # define XSTAPI(rt,fn) rt EXPENTRY fn 49 # endif 39 50 #endif 40 51 … … 97 108 */ 98 109 99 BOOL XSTAPI xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor,100 PULONG pulRevision);110 XSTAPI(BOOL, xstQuerySysTrayVersion)(PULONG pulMajor, PULONG pulMinor, 111 PULONG pulRevision); 101 112 102 113 /* … … 141 152 */ 142 153 143 BOOL XSTAPI xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon,144 PCSZ pcszToolTip, ULONG ulMsgId, ULONG ulFlags);154 XSTAPI(BOOL, xstAddSysTrayIcon)(HWND hwnd, USHORT usId, HPOINTER hIcon, 155 PCSZ pcszToolTip, ULONG ulMsgId, ULONG ulFlags); 145 156 146 157 /* … … 153 164 */ 154 165 155 BOOL XSTAPI xstReplaceSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon);166 XSTAPI(BOOL, xstReplaceSysTrayIcon)(HWND hwnd, USHORT usId, HPOINTER hIcon); 156 167 157 168 /* … … 164 175 */ 165 176 166 BOOL XSTAPI xstRemoveSysTrayIcon(HWND hwnd, USHORT usId);177 XSTAPI(BOOL, xstRemoveSysTrayIcon)(HWND hwnd, USHORT usId); 167 178 168 179 /* … … 183 194 */ 184 195 185 BOOL XSTAPI xstSetSysTrayIconToolTip(HWND hwnd, USHORT usId, PCSZ pcszToolTip);196 XSTAPI(BOOL, xstSetSysTrayIconToolTip)(HWND hwnd, USHORT usId, PCSZ pcszToolTip); 186 197 187 198 /* … … 191 202 */ 192 203 193 BOOL XSTAPI xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PCSZ pcszTitle,204 XSTAPI(BOOL, xstShowSysTrayIconBalloon)(HWND hwnd, USHORT usId, PCSZ pcszTitle, 194 205 PCSZ pcszText, ULONG ulFlags, 195 206 ULONG ulTimeout); … … 201 212 */ 202 213 203 BOOL XSTAPI xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);214 XSTAPI(BOOL, xstHideSysTrayIconBalloon)(HWND hwnd, USHORT usId); 204 215 205 216 /* … … 212 223 */ 213 224 214 BOOL XSTAPI xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);225 XSTAPI(BOOL, xstQuerySysTrayIconRect)(HWND hwnd, USHORT usId, PRECTL prclRect); 215 226 216 227 /* … … 226 237 */ 227 238 228 ULONG XSTAPI xstGetSysTrayCreatedMsgId();239 XSTAPI(ULONG, xstGetSysTrayCreatedMsgId)(); 229 240 230 241 /* … … 246 257 */ 247 258 248 ULONG XSTAPI xstGetSysTrayMaxTextLen();259 XSTAPI(ULONG, xstGetSysTrayMaxTextLen)(); 249 260 250 261 #if __cplusplus -
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r835 r838 51 51 #include "qt_os2.h" 52 52 53 // for dynamic linking to xsystray DLL 54 #define xstQuerySysTrayVersion (*_xstQuerySysTrayVersion) 55 #define xstAddSysTrayIcon (*_xstAddSysTrayIcon) 56 #define xstReplaceSysTrayIcon (*_xstReplaceSysTrayIcon) 57 #define xstRemoveSysTrayIcon (*_xstRemoveSysTrayIcon) 58 #define xstSetSysTrayIconToolTip (*_xstSetSysTrayIconToolTip) 59 #define xstQuerySysTrayIconRect (*_xstQuerySysTrayIconRect) 60 #define xstGetSysTrayCreatedMsgId (*_xstGetSysTrayCreatedMsgId) 61 #define xstGetSysTrayMaxTextLen (*_xstGetSysTrayMaxTextLen) 62 53 // declare function pointers for dynamic linking to xsystray DLL 54 #define XSTAPI_FPTRS_STATIC 63 55 #include "xsystray.h" 64 56 … … 325 317 QLibrary xsystray(QLatin1String("xsystray")); 326 318 327 #define R(f) if ((*((void **)& _##f) = xsystray.resolve(#f)) == NULL) return false319 #define R(f) if ((*((void **)&f) = xsystray.resolve(#f)) == NULL) return false 328 320 329 321 R(xstQuerySysTrayVersion); … … 333 325 R(xstSetSysTrayIconToolTip); 334 326 R(xstQuerySysTrayIconRect); 327 R(xstShowSysTrayIconBalloon); 328 R(xstHideSysTrayIconBalloon); 335 329 R(xstGetSysTrayCreatedMsgId); 336 330 R(xstGetSysTrayMaxTextLen);
Note:
See TracChangeset
for help on using the changeset viewer.